<%args> $c => 'item_description' <%shared> my %IARGS; my $current_cat; my $database ='chaliceart'; my $database_login = 'chaliceart'; my $database_pass = 'chaliceart'; my $dbh; <%init> %IARGS = %ARGS; use Data::Dumper; $dbh = DBI->connect("DBI:mysql:$database", $database_login, $database_pass) || $m->comp("error_noreturn", message => "Database name,
login, or password is incorrect."); $current_cat = $dbh->selectrow_array("Select category_id from Classified_connect where ad_id = ?",undef,$m->request_args->{id}); <& $c&> <%def item_description> <%init> my $data = $dbh->selectrow_hashref("Select * from Classified_ad where ad_id = ?",undef,$m->request_args->{id}); #print "
";
#print Dumper($m->session);
#$m->flush_buffer;
#$m->abort;

<%doc>






   Unitarian chalice jewelry by ChaliceArt

   

   

   









<%doc>
ChaliceArt Home Page
ChaliceArt Catalog
ChaliceArt One Of A Kind Limited Edition
ChaliceArt Shipping And Guarantee
ChaliceArt About Us
 


<%$data->{ad_title}%>


% my $temp = $data->{ad_description}; % $temp =~ s/\n/
/; <%$temp%>


<%perl> # # Time to get the optios into an array of arrays my $options = $data->{ad_sku_colors}; # # Headers have no pipes '|' in them, so if there is a pipe, then its an item. my @option_lines = split(/\n/,$options); my @code; my $current_header; foreach my $line (@option_lines) { #print $line."
"; if ($line !~ /\|/g) { push(@code,{'type' => 'header', 'name' => $line}); $current_header = $line; next; } # # must be an item my @bits; foreach my $bita ( split(/\|/,$line)) { my ($bitb) = ($bita =~ /^\s*(.+)\s*$/); push (@bits,$bitb); } push (@code,{'type' => 'item', 'title' => $bits[0], 'extra' => $bits[1], 'price' => $bits[2], 'sql' => $data, 'header' => $current_header, 'has_comment' => $bits[3]}); } use Data::Dumper; #print "
";
#print Dumper(\@code);
#$m->flush_buffer;
#$m->abort;


% foreach my $row (@code) {
 <& $row->{type}, data => $row &>
% }
     

   

<%$data->{ad_title}%>

<%$data->{ad_short_description}%>

If you have questions
or
if you prefer to order by phone, call us at (903)786-8646

Order with MC, Visa, Am Ex
or mail your order with payment to us at

ChaliceArt
49 Nottingham Drive
Pottsboro, Texas 75076

e-mail chaliceart@yahoo.com

%if($IARGS{'current_cat'}){ <&productlist.htm, c=> 'get_header', cat => $IARGS{'current_cat'}&> %}else{ limited edition %}

<%def header> <%doc>   <%$ARGS{data}->{name}%>   <%def item> <%init> my @classic = ( 'Sapphire', 'Garnet', 'Amethyst', 'Emerald' ); my @smclassic= ( 'Sapphire', 'Ruby', 'Amethyst', 'Emerald' ); my @classear= ( 'Sapphire', 'Ruby', 'Amethyst', 'Emerald' ); my $extra = $ARGS{data}->{extra}; my $options = $extra; my @options; my $default; if($ARGS{data}->{has_comment} == 2){ ($options) = ($options =~ /.*\[(.*)\]/); @options = split(/,/,$options); $extra =~ s/\[.*?\]//; $default = $extra; ($default) = ($default =~ /.*~(.*)~/); $extra =~ s/~$default~//; #print "
";
#print Dumper(\%options,$extra,$options);
#$m->flush_buffer;
}
#for(my $i=0;$i <= $#options;$i = $i+2){
#print $options[$i]."  ".$options[$i + 1]."
"; #} #print "<------------------------------- Option ---------------------------->
"; #print "
";
#print Dumper($m->request_args->{'id'});
#$m->flush_buffer;
#$m->abort;
my $comment;


<%$ARGS{data}->{title}%><%$extra%> % if ($ARGS{data}->{has_comment} == 1) { % }elsif($ARGS{data}->{has_comment} == 2){
Choose Length
% }else{ % } %if ($m->request_args->{'id'} eq '4'){
Choose Stone
%# % foreach(@smclassic){ % } %} %if ($m->request_args->{'id'} eq '44'){
Choose Stone
%}
$<%$ARGS{data}->{price}%>