This is topic Clueless twat monkeys around with HTML in forum Web at TMO Talk.


To visit this topic, use this URL:
http://www.themoononline.com/cgi-bin/Forum/ultimatebb.cgi?ubb=get_topic;f=4;t=001718

Posted by Thorn Davis (Member # 65) on :
 
I don't even know where to start with this. I'm completely clueless about HTML, but I want to add a section to the standard book page that says 'Enjoy this? Try this!' and has a link and an image to another book. Most of the changes I make, to the site I do through and idiot-proof tool designed by the owners' son, but this it can't do.

I think this is the code for the product page template...

code:
<!-- Make sure that there are no open and closing <HTML> tags because this is wrapped by the store template file which already has those. -->
<!-- Start productPageHTML.txt file -->
<div align="center">
<center>
<table border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top">
<p align="center">
<a href="pid_{product_id}.htm">
<IMG SRC="../../books/covers/{image}" BORDER="0" alt="{name}"><font face="ARIAL" size="3"><b><br>
</b></font><font face="ARIAL" size="2">{name}<br>
{price}
</font></a></p>
</td>
</tr>
</table>
</center>
</div>
<!-- End productPageHTML.txt file -->

How would I make a 'recommended' thing come on the bottom?
 
Posted by ralph (Member # 773) on :
 
code:
<!-- Make sure that there are no open and closing <HTML> tags because this is wrapped by the store template file which already has those. -->
<!-- Start productPageHTML.txt file -->
<div align="center">
<center>
<table border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top">
<p align="center">
<a href="pid_{product_id}.htm">
<IMG SRC="../../books/covers/{image}" BORDER="0" alt="{name}"><font face="ARIAL" size="3"><b><br>
</b></font><font face="ARIAL" size="2">{name}<br>
{price}
</font></a></p>
</td>
</tr>

*** ADD THIS PART THORN YOU IDIOT
<tr>
<td>
<a href=''>Enjoy this? Try this!</a>
<br>
<IMG SRC="../../books/covers/{image}" BORDER="0" alt="{name}">
</td>
</tr>
*** END OF ADD THIS PART THORN YOU IDIOT

</table>
</center>
</div>
<!-- End productPageHTML.txt file -->



[ 03.10.2008, 07:34: Message edited by: ralph ]
 
Posted by Thorn Davis (Member # 65) on :
 
Thank you Ralph! Welcome back!
 
Posted by MiscellaneousFiles (Member # 60) on :
 
Looks like you've got a missing image on *this page. You should probably fix that...
 
Posted by Cherry In Hove (Member # 49) on :
 
Didn't people stop using tables about 5 years ago?
 
Posted by MiscellaneousFiles (Member # 60) on :
 
I'd do it like this so the image also links to the other book's page.

code:
<tr>
<td>
<a href="{link}">Enjoy this? Try this!</a>
<br>
<a href="{link}"><IMG SRC="../../books/covers/{image}" BORDER="0" alt="{name}"></a>
</td>
</tr>


 
Posted by Thorn Davis (Member # 65) on :
 
quote:
Originally posted by MiscellaneousFiles:
Looks like you've got a missing image on *this page. You should probably fix that...

eh? where?
 
Posted by MiscellaneousFiles (Member # 60) on :
 
quote:
Originally posted by Thorn Davis:
quote:
Originally posted by MiscellaneousFiles:
Looks like you've got a missing image on *this page. You should probably fix that...

eh? where?
The January-June 2009 image is linking to a local file - file:///O:/Marketing%20&%20PR/cat09.jpg rather than your server. I'm sure it works in your office, but anyone elsewhere will see this:

 -

ETA: In fact, looking at the source, there are loads of links to:

code:
file:///O:/Marketing%20&amp;%20PR/website/ONEWORLD%20WEBSITE%20BACKUP/www/...

These are mostly spacer images I think, but it's probably worth switching them over anyway.

[ 03.10.2008, 09:00: Message edited by: MiscellaneousFiles ]
 
Posted by Thorn Davis (Member # 65) on :
 
Yeah, I see what's happened. Hurm. Turns out the idiot proof tool isn't that idiot proof.
 
Posted by MiscellaneousFiles (Member # 60) on :
 
<img src="http://www.oneworld-publications.com/books/covers/cat09.jpg" alt="January-June 2009 Catalogue" />
 
Posted by Thorn Davis (Member # 65) on :
 
I tried something else. Does it work now?
 
Posted by Thorn Davis (Member # 65) on :
 
Apparently that catalogue is "the best looking one we've ever had".
 
Posted by MiscellaneousFiles (Member # 60) on :
 
quote:
Originally posted by Thorn Davis:
I tried something else. Does it work now?

It works, but you've got loads of space underneath the image.

Replace this:

code:
<tr>
<td height="150" colspan="2">
<div align="left">
<a href="http://http//www.oneworld-publications.com/books/covers/cat09.jpg"/>
</div>
</td>
<td height="150" width="231">
<div align="center"/>
</td>
</tr>

with this:

code:
<tr>
<td height="150"><a href="http://www.oneworld-publications.com/books/covers/cat09.jpg"/></td>
</tr>

quote:
Originally posted by Thorn Davis:
Apparently that catalogue is "the best looking one we've ever had".

Then don't sell it short with that dodgy image. Use this one instead:

 -

(no charge)

[ 03.10.2008, 09:23: Message edited by: MiscellaneousFiles ]
 
Posted by dang65 (Member # 102) on :
 
quote:
Originally posted by Thorn Davis:
I tried something else. Does it work now?

The image shows now and the PDF opens fine, but it looks like you've got a spurious table row beneath the image and before the text link, so there's a big space there. I don't know if that's intentional though. Doesn't look right if it is.

code:
<tr>
<td height="150" colspan="2">
<div align="left">
<a href="http://http//www.oneworld-publications.com/books/covers/cat09.jpg"/>
</div>
</td>
<td width="231" height="150">
<div align="center"/>
</td>
</tr>

EDIT. Yeah, a bit like Misc said.

[ 03.10.2008, 09:28: Message edited by: dang65 ]
 
Posted by MiscellaneousFiles (Member # 60) on :
 
For the first time in literally years I didn't drink or smoke anything last night. So don't worry if you can't keep pace Dang, I'm on fucking fire today.
 
Posted by Thorn Davis (Member # 65) on :
 
Yeah that's much better [Mad]
 
Posted by dang65 (Member # 102) on :
 
quote:
Originally posted by MiscellaneousFiles:
For the first time in literally years I didn't drink or smoke anything last night. So don't worry if you can't keep pace Dang, I'm on fucking fire today.

You are, but I don't think your fix will solve the problem. I'm suggesting that whole row needs to go. The anchor tag in that row doesn't do anything (it's empty). The image link is in the previous row, and the text link is in the next row.

EDIT: See.

[ 03.10.2008, 09:44: Message edited by: dang65 ]
 
Posted by MiscellaneousFiles (Member # 60) on :
 
LOL, I mistook the <a> for an <img>

What a retard!

Now Thorn's copied the code in through his WYSIWYG editor and fucked it up good and proper...

[Roll Eyes]
 
Posted by Thorn Davis (Member # 65) on :
 
It's about to get better! I've opened the html file in Dreamweaver and sort of spannered about with it without really understanding things. About to upload now, so fans of total fuck up should get their fingers on the 'refresh' button!
 
Posted by Thorn Davis (Member # 65) on :
 
That's dang's code that's not working now. Although I may have not implemented it properly. Going back into the crummy editor thing now to see if I can fuck things up from that end too.
 
Posted by dang65 (Member # 102) on :
 
quote:
Originally posted by Thorn Davis:
That's dang's code that's not working now. Although I may have not implemented it properly.

Yeah, what you've done is to delete the good rows (with the image and text links) and leave the row which I said needs to be deleted. Still, it's progress of sorts.
 
Posted by MiscellaneousFiles (Member # 60) on :
 
Edit:

This is fucking brilliant! [Cool]

Can't you test your pages without putting them live or something?

[ 03.10.2008, 09:57: Message edited by: MiscellaneousFiles ]
 
Posted by New Way Of Decay (Member # 106) on :
 
Fucking hell Thorn this is a shambles. When they asked you what web development you've done did you tell them your sister had a MySpace page or something? Jesus! Stop playing with code. You could erase the whole internet.
 
Posted by New Way Of Decay (Member # 106) on :
 
lol @ Novin Doostdar. Is Jason Statham going to play him in his life story?
 
Posted by Black Mask (Member # 185) on :
 
There's a lot of jew books on that website...
 
Posted by dang65 (Member # 102) on :
 
I just hope that none of the readers of this book happen to be visiting the site this afternoon...

 -
 
Posted by Thorn Davis (Member # 65) on :
 
quote:
Originally posted by New Way Of Decay:
Fucking hell Thorn this is a shambles. When they asked you what web development you've done did you tell them your sister had a MySpace page or something? Jesus! Stop playing with code. You could erase the whole internet.

It's not my fault - I was happy with the big gap because I knew if I tried to get it - you know - perfect, then this would happen.
 
Posted by Black Mask (Member # 185) on :
 
You should take a look at this...

 -
 
Posted by Thorn Davis (Member # 65) on :
 
Alright man! We're cooking on gas now!

Maybe this should be a friday afternoon regular, where people give me pieces of HTML code and I implement them on a live site with no idea what they do or where to put them.
 
Posted by MiscellaneousFiles (Member # 60) on :
 
[Removed for wide-on reasons]

[ 03.10.2008, 10:26: Message edited by: MiscellaneousFiles ]
 
Posted by MiscellaneousFiles (Member # 60) on :
 
LOL! He didn't notice that I added [ ] Rimming to the Subject(s) of Interest checkboxes at the bottom of the page....

[Big Grin] [Big Grin] [Big Grin]
 
Posted by Thorn Davis (Member # 65) on :
 
quote:
Originally posted by Black Mask:
There's a lot of jew books on that website...

I'd have thought you'd be more interested in 'A Beginner's Guide to Bioterror and Biowarfare'. Except it's not educational in the way you might wish.
 
Posted by MiscellaneousFiles (Member # 60) on :
 
 -
 
Posted by Black Mask (Member # 185) on :
 
 -
 
Posted by New Way Of Decay (Member # 106) on :
 
 -

Ha ha! I'm on the internets!
 
Posted by New Way Of Decay (Member # 106) on :
 
[img]http://www.hetemeel.com/haha/125720.I%27m+cunting+code%20RIGHT+UP%21%21%21%2111.jpg [/img]

loolus, the irony!

[ 03.10.2008, 10:49: Message edited by: New Way Of Decay ]
 
Posted by MiscellaneousFiles (Member # 60) on :
 
 -
 
Posted by MiscellaneousFiles (Member # 60) on :
 
 -
 
Posted by New Way Of Decay (Member # 106) on :
 
 -
 
Posted by MiscellaneousFiles (Member # 60) on :
 
Separated at birth?

 -  -
 
Posted by Thorn Davis (Member # 65) on :
 
 -

[ 03.10.2008, 11:28: Message edited by: Thorn Davis ]
 
Posted by Thorn Davis (Member # 65) on :
 
By the way I couldn't get the code for the 'Try This' thing to work either. [Frown]
 
Posted by New Way Of Decay (Member # 106) on :
 
quote:
Originally posted by Thorn Davis:
 -

That's a sweet threadless tee:
Yayzors!
 
Posted by Thorn Davis (Member # 65) on :
 
So back to the original problem. I've got this editing tool which is used to make changes to the book pages on the website so an intern (or! An inept like me!) can easily edit books without having to know html. It looks like this...

code:
#########################################################
# Manager process file
#
# The manager is designed to be very expandable and all
# You need to do is download new process files and add
# them to your /manager/process/ folder.
#########################################################

#########################################################
# Configuration Section
#
# If there are any variables that need to be set by the
# user then add those here.
#########################################################

# $URL_of_images_directory = "http://www.commerce-cgi.com/commerce401/images";

#########################################################
# Menu Items
#
# Items to appear on the menu, and the sub that will
# run when clicked.
#########################################################

%menu_action2 = ('Edit Product', 'edit_categories');

#########################################################
# Main Code Section
#
# All subs should include an 'action' vaiable that tells it
# which sub should be executed next.
#########################################################

sub edit_categories
{
local ($category, $bgcolor);
open(DATAFILE, "$datafile");
while (<DATAFILE>)
{
@db_row = split(/\|/,$_);
$category_list{$db_row[1]}++;
}
close (DATAFILE);

print qq~

<CENTER>
<TABLE WIDTH=90%>
<TR>
<TD>
<FONT FACE=ARIAL>
This is the Edit Product screen of the <b>Online Database</b>. Click the <b>'Edit'</b> link to make changes to books in the Online Database.</TR>
</TABLE>
</CENTER>
<CENTER>
<HR WIDTH=90%>
</CENTER>
<CENTER>

<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="90%" bordercolor="#000000">
<tr>
<td width="100%">
<div align="center">
<table border="0" cellpadding="3" cellspacing="0" width="100%">
<CENTER>
<tr>
<td bgcolor="$table_color">
<B><font color="#FFFFFF" face="Arial">Ref. #</font></B>
</td>
<td bgcolor="$table_color">
<B><font color="#FFFFFF" face="Arial">Category</font></B>
</td>
<td bgcolor="$table_color">
<B><font color="#FFFFFF" face="Arial">Book Title</font></B>
</td>
<td width="75" bgcolor="$table_color">
<B><font color="#FFFFFF" face="Arial" align="right">Price</font></B>
</td>
</tr>

~;

#foreach $category (sort(keys(%category_list)))
{


open (DATABASE, "$datafile") || &errorcode(__FILE__, __LINE__, "$datafile", "$!", "die", "FILE OPEN ERROR", "Unable to open the file listed. Make sure that it exists and that it has read/write permissions");

while(<DATABASE>)
{
($sku, $category, $categoryOne, $categoryTwo, $categoryThree, $categoryFour, $categoryFive, $price, $short_description, $image, $long_description, $options, $saleprice, $pdf) = split(/\|/,$_);
chop($options);
# foreach ($sku)}

#if ($category eq $form_data{'category'})
{
$display_cat = $category;
$display_cat =~ s/_/ /g;

if ($bgcolor eq "#FFFFFF")
{
$bgcolor = "#EBEBEB";
} else {
$bgcolor = "#FFFFFF";
}

print qq~
<tr>
<TD WIDTH=100 bgcolor="$bgcolor">
<a href="index.cgi?EditWhichProduct=$sku&amp;action=display_perform_edit_screen"><font face="Arial">$sku - EDIT</font></a>

</TD>
<TD bgcolor="$bgcolor">
<font face="Arial">$display_cat</font>
</TD>
<TD bgcolor="$bgcolor">
<font face="Arial">$short_description</font>
</TD>
<TD WIDTH=75 bgcolor="$bgcolor" align="right">
<font face="Arial">$price</font>
</TD>
</TR>
</CENTER>
~;
}
}

print qq~
</table>
</div>
<p><font face="Arial"> </font></p>
</td>
</tr>
</table>
</center>
</div>
~;
}
}

#############################################################################################

sub action_submit_edit_product
{
local($sku, $category, $categoryOne, $categoryTwo, $categoryThree, $categoryFour, $categoryFive, $price, $short_description, $subname, $image, $long_description, $shipping_price, $userDefinedOne, $userDefinedTwo, $userDefinedThree, $userDefinedFour, $userDefinedFive, $dateyear, $datenum, $userDefinedSix, $userDefinedSeven, $userDefinedEight, $userDefinedNine, $userDefinedTen, $userDefinedEleven, $userDefinedTwelve, $userDefinedThirteen, $userDefinedFourteen, $userDefinedFifteen, $userDefinedSixteen, $userDefinedSeventeen, $userDefinedEighteen, $userDefinedNineteen, $options, $saleprice, $pdf);

$formatted_description = $form_data{'description'};
$formatted_description =~ s/\r/ /g;
$formatted_description =~ s/\t/ /g;
$formatted_description =~ s/\n/ /g;
$formatted_description =~ s/\"/\"\;/g;


$categoryOne = $form_data{'categoryOne'};
$categoryOne =~ s/\"/\"\;/g;
$categoryTwo = $form_data{'categoryTwo'};
$categoryTwo =~ s/\"/\"\;/g;
$categoryThree = $form_data{'categoryThree'};
$categoryThree =~ s/\"/\"\;/g;
$categoryFour = $form_data{'categoryFour'};
$categoryFour =~ s/\"/\"\;/g;
$categoryFive = $form_data{'categoryFive'};
$categoryFive =~ s/\"/\"\;/g;


if ($categoryOne ne "" && $categoryTwo ne "" && $categoryThree ne "" && $categoryFour ne "" && $categoryFive ne "")
{
@cats = ($categoryOne, $categoryTwo, $categoryThree, $categoryFour, $categoryFive);
}

if ($categoryOne ne "" && $categoryTwo ne "" && $categoryThree ne "" && $categoryFour ne "" && $categoryFive eq "")
{
@cats = ($categoryOne, $categoryTwo, $categoryThree, $categoryFour);
}

if ($categoryOne ne "" && $categoryTwo ne "" && $categoryThree ne "" && $categoryFour eq "" && $categoryFive eq "")
{
@cats = ($categoryOne, $categoryTwo, $categoryThree);
}

if ($categoryOne ne "" && $categoryTwo ne "" && $categoryThree eq "" && $categoryFour eq "" && $categoryFive eq "")
{
@cats = ($categoryOne, $categoryTwo);
}

if ($categoryOne ne "" && $categoryTwo eq "" && $categoryThree eq "" && $categoryFour eq "" && $categoryFive eq "")
{
@cats = ($categoryOne);
}

@catsSort = sort(@cats);
$category = join("_",@catsSort);

$userDefinedFive = $form_data{'userDefinedFive'};
$userDefinedFive =~ s/\"/\"\;/g;
$dateyear = $form_data{'dateyear'};
$dateyear =~ s/\"/\"\;/g;
$datenum = $form_data{'datenum'};
$datenum =~ s/\"/\"\;/g;

$datemonth = "00";

if($userDefinedFive eq "Jan")
{
$datemonth = "01";
}
elsif($userDefinedFive eq "Feb")
{
$datemonth = "02";
}
elsif($userDefinedFive eq "Mar")
{
$datemonth = "03";
}
elsif($userDefinedFive eq "Apr")
{
$datemonth = "04";
}
elsif($userDefinedFive eq "May")
{
$datemonth = "05";
}
elsif($userDefinedFive eq "Jun")
{
$datemonth = "06";
}
elsif($userDefinedFive eq "Jul")
{
$datemonth = "07";
}
elsif($userDefinedFive eq "Aug")
{
$datemonth = "08";
}
elsif($userDefinedFive eq "Sep")
{
$datemonth = "09";
}
elsif($userDefinedFive eq "Oct")
{
$datemonth = "10";
}
elsif($userDefinedFive eq "Nov")
{
$datemonth = "11";
}
elsif($userDefinedFive eq "Dec")
{
$datemonth = "12";
}


$form_data{'name'} =~ s/\"/\"\;/g;
$form_data{'subname'} =~ s/\"/\"\;/g;

$formatted_one = $form_data{'userDefinedOne'};
$formatted_one =~ s/\r/ /g;
$formatted_one =~ s/\t/ /g;
$formatted_one =~ s/\n/ /g;
$formatted_one =~ s/\"/\"\;/g;

$formatted_two = $form_data{'userDefinedTwo'};
$formatted_two =~ s/\r/ /g;
$formatted_two =~ s/\t/ /g;
$formatted_two =~ s/\n/ /g;
$formatted_two =~ s/\"/\"\;/g;

$formatted_three = $form_data{'userDefinedThree'};
$formatted_three =~ s/\r/ /g;
$formatted_three =~ s/\t/ /g;
$formatted_three =~ s/\n/ /g;
$formatted_three =~ s/\"/\"\;/g;

$formatted_four = $form_data{'userDefinedFour'};
$formatted_four =~ s/\r/ /g;
$formatted_four =~ s/\t/ /g;
$formatted_four =~ s/\n/ /g;
$formatted_four =~ s/\"/\"\;/g;

$formatted_six = $form_data{'userDefinedSix'};
$formatted_six =~ s/\r/ /g;
$formatted_six =~ s/\t/ /g;
$formatted_six =~ s/\n/ /g;
$formatted_six =~ s/\"/\"\;/g;

$formatted_seven = $form_data{'userDefinedSeven'};
$formatted_seven =~ s/\r/ /g;
$formatted_seven =~ s/\t/ /g;
$formatted_seven =~ s/\n/ /g;
$formatted_seven =~ s/\"/\"\;/g;

$formatted_eight = $form_data{'userDefinedEight'};
$formatted_eight =~ s/\r/ /g;
$formatted_eight =~ s/\t/ /g;
$formatted_eight =~ s/\n/ /g;
$formatted_eight =~ s/\"/\"\;/g;

$formatted_nine = $form_data{'userDefinedNine'};
$formatted_nine =~ s/\r/ /g;
$formatted_nine =~ s/\t/ /g;
$formatted_nine =~ s/\n/ /g;
$formatted_nine =~ s/\"/\"\;/g;

$formatted_ten = $form_data{'userDefinedTen'};
$formatted_ten =~ s/\r/ /g;
$formatted_ten =~ s/\t/ /g;
$formatted_ten =~ s/\n/ /g;
$formatted_ten =~ s/\"/\"\;/g;

$formatted_eleven = $form_data{'userDefinedEleven'};
$formatted_eleven =~ s/\r/ /g;
$formatted_eleven =~ s/\t/ /g;
$formatted_eleven =~ s/\n/ /g;
$formatted_eleven =~ s/\"/\"\;/g;

$formatted_twelve = $form_data{'userDefinedTwelve'};
$formatted_twelve =~ s/\r/ /g;
$formatted_twelve =~ s/\t/ /g;
$formatted_twelve =~ s/\n/ /g;
$formatted_twelve =~ s/\"/\"\;/g;

$formatted_thirteen = $form_data{'userDefinedThirteen'};
$formatted_thirteen =~ s/\r/ /g;
$formatted_thirteen =~ s/\t/ /g;
$formatted_thirteen =~ s/\n/ /g;
$formatted_thirteen =~ s/\"/\"\;/g;

$formatted_fourteen = $form_data{'userDefinedFourteen'};
$formatted_fourteen =~ s/\r/ /g;
$formatted_fourteen =~ s/\t/ /g;
$formatted_fourteen =~ s/\n/ /g;
$formatted_fourteen =~ s/\"/\"\;/g;

$formatted_fifteen = $form_data{'userDefinedFifteen'};
$formatted_fifteen =~ s/\r/ /g;
$formatted_fifteen =~ s/\t/ /g;
$formatted_fifteen =~ s/\n/ /g;
$formatted_fifteen =~ s/\"/\"\;/g;

$formatted_sixteen = $form_data{'userDefinedSixteen'};
$formatted_sixteen =~ s/\r/ /g;
$formatted_sixteen =~ s/\t/ /g;
$formatted_sixteen =~ s/\n/ /g;
$formatted_sixteen =~ s/\"/\"\;/g;

$formatted_seventeen = $form_data{'userDefinedSeventeen'};
$formatted_seventeen =~ s/\r/ /g;
$formatted_seventeen =~ s/\t/ /g;
$formatted_seventeen =~ s/\n/ /g;
$formatted_seventeen =~ s/\"/\"\;/g;

$formatted_eighteen = $form_data{'userDefinedEighteen'};
$formatted_eighteen =~ s/\r/ /g;
$formatted_eighteen =~ s/\t/ /g;
$formatted_eighteen =~ s/\n/ /g;
$formatted_eighteen =~ s/\"/\"\;/g;

$formatted_nineteen = $form_data{'userDefinedNineteen'};
$formatted_nineteen =~ s/\r/ /g;
$formatted_nineteen =~ s/\t/ /g;
$formatted_nineteen =~ s/\n/ /g;
$formatted_nineteen =~ s/\"/\"\;/g;

$formatted_saleprice = $form_data{'saleprice'};
$formatted_saleprice =~ s/\r/ /g;
$formatted_saleprice =~ s/\t/ /g;
$formatted_saleprice =~ s/\n/ /g;
$formatted_saleprice =~ s/\"/\"\;/g;

$formatted_pdf = $form_data{'pdf'};
$formatted_pdf =~ s/\r/ /g;
$formatted_pdf =~ s/\t/ /g;
$formatted_pdf =~ s/\n/ /g;
$formatted_pdf =~ s/\"/\"\;/g;


if ($form_data{'image'} ne "")
{
$formatted_image = $form_data{'image'};
} else {
$formatted_image = "notavailable.gif";
}

if ($form_data{'option_file'} ne "")
{
$formatted_option_file = "\%\%OPTION\%\%$form_data{'option_file'}";
} else {
$formatted_option_file = "\%\%OPTION\%\%blank.html";
}

open(OLDFILE, "$datafile") || &errorcode(__FILE__, __LINE__, "$datafile", "$!", "die", "FILE OPEN ERROR", "Unable to open the file listed. Make sure that it exists and that it has read/write permissions");
@lines = <OLDFILE>;
close (OLDFILE);

open(NEWFILE,">$datafile") || &errorcode(__FILE__, __LINE__, "$datafile", "$!", "die", "FILE OPEN ERROR", "Unable to open the file listed. Make sure that it exists and that it has read/write permissions");
foreach $line (@lines)
{
($sku, $category, $categoryOne, $categoryTwo, $categoryThree, $categoryFour, $categoryFive, $price, $short_description, $subname, $image, $long_description, $shipping_price, $userDefinedOne, $userDefinedTwo, $userDefinedThree, $userDefinedFour, $userDefinedFive, $dateyear, $datenum, $userDefinedSix, $userDefinedSeven, $userDefinedEight, $userDefinedNine, $userDefinedTen, $userDefinedEleven, $userDefinedTwelve, $userDefinedThirteen, $userDefinedFourteen, $userDefinedFifteen, $userDefinedSixteen, $userDefinedSeventeen, $userDefinedEighteen, $userDefinedNineteen, $options, $saleprice, $pdf) = split(/\|/,$line);

if ($sku == $form_data{'ProductEditSku'})
{
print (NEWFILE $form_data{'ProductEditSku'} . "|" . "$form_data{'categoryOne'}_$form_data{'categoryTwo'}_$form_data{'categoryThree'}_$form_data{'categoryFour'}_$form_data{'categoryFive'}" . "|" . $form_data{'categoryOne'} . "|" . $form_data{'categoryTwo'} . "|" . $form_data{'categoryThree'} . "|" . $form_data{'categoryFour'} . "|" . $form_data{'categoryFive'} . "|" . $form_data{'price'} . "|" . $form_data{'name'} . "|" . $form_data{'subname'} . "|$formatted_image|$formatted_description|" . $form_data{'shipping_price'} . "|" . $form_data{'userDefinedOne'} . "|" . $form_data{'userDefinedTwo'} . "|" . $form_data{'userDefinedThree'} . "|" . $form_data{'userDefinedFour'} . "|" . $form_data{'userDefinedFive'} . "|" . $form_data{'dateyear'} . "|" . $form_data{'dateyear'} . $datemonth . "|" . $form_data{'userDefinedSix'} . "|" . $form_data{'userDefinedSeven'} . "|" . $form_data{'userDefinedEight'} . "|" . $form_data{'userDefinedNine'} . "|" . $form_data{'userDefinedTen'} . "|" . $form_data{'userDefinedEleven'} . "|" . $form_data{'userDefinedTwelve'} . "|" . $form_data{'userDefinedThirteen'} . "|" . $form_data{'userDefinedFourteen'} . "|" . $form_data{'userDefinedFifteen'} . "|" . $form_data{'userDefinedSixteen'} . "|" . $form_data{'userDefinedSeventeen'} . "|" . $form_data{'userDefinedEighteen'} . "|" . $form_data{'userDefinedNineteen'} . "|$formatted_option_file|$formatted_saleprice|$formatted_pdf\n");
} else {
print NEWFILE $line;
}
}
close (NEWFILE);

&display_perform_edit_screen;

}

#############################################################################################

sub edit_product_screen
{
local ($bgcolor);
print qq~
<CENTER>
<TABLE WIDTH=90%>
<TR>
<TD>
<FONT FACE=ARIAL>
This is the Edit Product screen of the <b>Online Database</b>. Click the <b>'Edit'</b> link to make changes to books in the Online Database.</TR>
</TABLE>
</CENTER>
<CENTER>
<HR WIDTH=90%>
</CENTER>
<CENTER>

<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="90%" bordercolor="#000000">
<tr>
<td width="100%">
<div align="center">
<table border="0" cellpadding="3" cellspacing="0" width="100%">
<CENTER>
<tr>
<td bgcolor="$table_color">
<B><font color="#FFFFFF" face="Arial">Ref. #</font></B>
</td>
<td bgcolor="$table_color">
<B><font color="#FFFFFF" face="Arial">Category</font></B>
</td>
<td bgcolor="$table_color">
<B><font color="#FFFFFF" face="Arial">Book Title</font></B>
</td>
<td bgcolor="$table_color">
<B><font color="#FFFFFF" face="Arial" align="right">Price</font></B>
</td>
</tr>
~;

open (DATABASE, "$datafile") || &errorcode(__FILE__, __LINE__, "$datafile", "$!", "die", "FILE OPEN ERROR", "Unable to open the file listed. Make sure that it exists and that it has read/write permissions");

while(<DATABASE>)
{
($sku, $category, $categoryOne, $categoryTwo, $categoryThree, $categoryFour, $categoryFive, $price, $short_description, $subname, $image, $long_description, $options, $saleprice, $pdf) = split(/\|/,$_);
chop($options);
# foreach ($sku)}

if ($category eq $form_data{'category'})
{

if ($bgcolor eq "#FFFFFF")
{
$bgcolor = "#EBEBEB";
} else {
$bgcolor = "#FFFFFF";
}

print qq~
<tr>
<TD WIDTH=100 bgcolor="$bgcolor">
<a href="index.cgi?EditWhichProduct=$sku&amp;action=display_perform_edit_screen"><font face="Arial">$sku</font></a>

</TD>
<TD WIDTH=75 bgcolor="$bgcolor">
<font face="Arial">$category</font>
</TD>
<TD bgcolor="$bgcolor">
<font face="Arial">$short_description</font>
</TD>
<TD WIDTH=75 bgcolor="$bgcolor" align="right">
<font face="Arial">$price</font>
</TD>
</TR>
</CENTER>
~;
}
}

print qq~
</table>
</div>
<p><font face="Arial"> </font></p>
</td>
</tr>
</table>
</center>
</div>
~;

}

#############################################################################################
sub display_perform_edit_screen
{

open (CHECKSKU, "$datafile") || &errorcode(__FILE__, __LINE__, "$datafile", "$!", "die", "FILE OPEN ERROR", "Unable to open the file listed. Make sure that it exists and that it has read/write permissions");
while(<CHECKSKU>)
{
($sku, $category, $categoryOne, $categoryTwo, $categoryThree, $categoryFour, $categoryFive, $price, $short_description, $subname, $image, $long_description, $shipping_price, $userDefinedOne, $userDefinedTwo, $userDefinedThree, $userDefinedFour, $userDefinedFive, $dateyear, $datenum, $userDefinedSix, $userDefinedSeven, $userDefinedEight, $userDefinedNine, $userDefinedTen, $userDefinedEleven, $userDefinedTwelve, $userDefinedThirteen, $userDefinedFourteen, $userDefinedFifteen, $userDefinedSixteen, $userDefinedSeventeen, $userDefinedEighteen, $userDefinedNineteen, $options, $saleprice, $pdf) = split(/\|/,$_);
if ($sku eq $form_data{'EditWhichProduct'})
{
$option =~ s/%%OPTION%%//g;
last;
}
}
close (CHECKSKU);

$unixpath = "$Path1/options";
opendir(CURDIR,"$unixpath") || &errorcode(__FILE__, __LINE__, "$unixpath", "$!", "die", "DIRECTORY OPEN ERROR", "Unable to open the directory listed. Make sure that it exists and that it has read permissions");
@names=readdir(CURDIR);
for $name(@names)
{
($iname, $ext, $inc) = split(/\./,$name);
if (($ext eq "html")||($ext eq "htm"))
{
if ($inc ne "inc")
{
$options .= "<option>$name</option>\n";
}
}
}

open(CATFILE, "$catfile") || &errorcode(__FILE__, __LINE__, "$catfile", "$!", "die", "FILE OPEN ERROR", "Unable to open the file listed. Make sure that it exists and that it has read permissions");
while (<CATFILE>)
{
$catdata .= "<option>$_</option>\n";
}
close (CATFILE);

print qq~

<CENTER>
<TABLE>
<TR>
<TD>
<FONT FACE=ARIAL SIZE=2 COLOR=RED>Click here to view <a href=../commerce.cgi?pid=$sku target="_blank">$userDefinedNineteen $short_description $subname</a> on the website.</FONT>
</TD>
</TR>
</TABLE>
</CENTER>

<FORM METHOD=POST>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="90%" bordercolor="#000000">
<tr>
<td width="100%">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" colspan="5" bgcolor="$table_color">
<p><b><font face="Arial" color="#FFFFFF"> Book  #$sku</font></b></p>
</td>
</tr>
<CENTER>
<tr>
<td colspan="5" bgcolor="$table_color"></td>
</tr>
<tr>
<td colspan="3" bgcolor="$table_color"><font color="#FFFFFF"> </font></td>
<td width="100%" bgcolor="$table_color" colspan="2"> <FONT face=ARIAL SIZE=2 color="#FFFFFF"><br>
Select category for book <br>(if MORE THAN ONE please use the other four drop-down lists. To create a NEW category click the 'Edit Category' link on the left)
</font></td>
</tr>

</CENTER>
<tr>
<td colspan="3">
<p align="right"><b><FONT face=ARIAL SIZE=2>Category: </font></b> </p>
</td>
<CENTER>
<td colspan="2"><font face="Arial">

<select size="1" name="categoryOne">
<option>$categoryOne</option>
<option></option>
$catdata
</select>

<select size="1" name="categoryTwo">
<option>$categoryTwo</option>
<option></option>
$catdata
</select>

<select size="1" name="categoryThree">
<option>$categoryThree</option>
<option></option>
$catdata
</select>

<select size="1" name="categoryFour">
<option>$categoryFour</option>
<option></option>
$catdata
</select>

<select size="1" name="categoryFive">
<option>$categoryFive</option>
<option></option>
$catdata
</select>

</font></td>
</tr>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td bgcolor="$table_color">&nbsp;</td>
<td colspan="4" bgcolor="$table_color"> <FONT face=ARIAL SIZE=2 color="#FFFFFF"> Full title and sub-heading</font></td>
</tr>

</CENTER>
<tr>
<td>
<p align="right"><b><FONT face=ARIAL SIZE=2>Book Name: </font></b> </p>
</td>
<CENTER>
<td colspan="4"><font face="Arial">
<INPUT NAME="name" SIZE=45 value="$short_description"><FONT face=ARIAL SIZE=1 COLOR="BLACK"> (Title)</font><br>
<INPUT NAME="subname" SIZE=45 value="$subname"><FONT face=ARIAL SIZE=1 COLOR="BLACK"> (sub-heading)</font><br>
<INPUT NAME="userDefinedNineteen" SIZE=5 value="$userDefinedNineteen"><FONT face=ARIAL SIZE=1 COLOR="BLACK"> (enter 'The' or 'A' if the beginning of the book starts with it)</font><br>
</font></td>
</tr>
<tr>
<td colspan="5"><font face="Arial" size="2"> </font></td>
</tr>
<tr>
<td colspan="2" bgcolor="$table_color">&nbsp;</td>
<td colspan="3" bgcolor="$table_color"><font face="Arial" size="2" color="#FFFFFF">No \£ sign needed</font></td>
</tr>

</CENTER>
<tr>
<td colspan="2">
<p align="right"><font face="Arial" size="2"><b>Price: </b> </font></td>
<CENTER>
<td colspan="3"><font face="Arial"><INPUT NAME="price" SIZE=14 value="$price"></font></td>
</tr>
<tr>
<td colspan="2">
<p align="right"><font face="Arial" size="2"><b>Sale Price: </b> </font></td>
<CENTER>
<td colspan="3"><font face="Arial"><INPUT NAME="saleprice" SIZE=14 value="$saleprice"><FONT face=ARIAL SIZE=1 COLOR="BLACK"> (leave empty if not on sale as sale price will OVERIDE original price)</font></td>
</tr>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="2" bgcolor="$table_color">&nbsp;</td>
<td colspan="3" bgcolor="$table_color"> <FONT face=ARIAL SIZE=2 color="#FFFFFF">Enter the book description here. (nb: for ONE line break add '\<\ br \>\' and for an EMPTY SPACE (for seperate paragraphs) add '\<\ br \>\ \<\ br \>\'.</font></td>
</tr>

</CENTER>
<tr>
<td colspan="2" valign="top">
<p align="right"><b><FONT face=ARIAL SIZE=2>Long Description: 
</font></b> </p>
</td>
<CENTER>
<td colspan="3"><font face="Arial"><TEXTAREA NAME="description" ROWS=6 COLS=51 wrap=soft>$long_description</TEXTAREA></font></td>
</tr>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="3" bgcolor="$table_color">&nbsp;</td>
<td bgcolor="$table_color" colspan="2"> <FONT face=ARIAL SIZE=2 color="#FFFFFF"> filename.jpg</font></td>
</tr>
<tr>
<td colspan="3" valign="top">
<p align="right"><b><FONT face=ARIAL SIZE=2>Image File: </font></b> </p>
</td>
<CENTER>
<td valign="top"><font face="Arial"><INPUT NAME="image" SIZE=35 value="$image"><FONT face=ARIAL SIZE=1 COLOR="BLACK"> (<a href="http://www.oneworld-publications.com/cgi-bin/cart/shop/index.cgi?action=image_screen" target="_blank">click here</a> to upload an image or view current images)</font></td>
</center>
<td>
<p align="center"><img border="0" src="$URL_of_images_directory/../books/covers/$image"></td>
</tr>
<center>
<tr>
<td colspan="5">&nbsp;</td>
</tr>

<tr>
<td colspan="3" bgcolor="$table_color">&nbsp;</td>
<td bgcolor="$table_color" colspan="2"> <FONT face=ARIAL SIZE=2 color="#FFFFFF"> filename.pdf</font></td>
</tr>
<tr>
<td colspan="3" valign="top">
<p align="right"><b><FONT face=ARIAL SIZE=2>PDF File: </font></b> </p>
</td>
<CENTER>
<td valign="top"><font face="Arial"><INPUT NAME="pdf" SIZE=35 value="$pdf"><FONT face=ARIAL SIZE=1 COLOR="BLACK"> (<a href="http://www.oneworld-publications.com/cgi-bin/cart/shop/index.cgi?action=pdf_screen" target="_blank">click here</a> to upload a PDF or view current PDFs)</font></td>
</center>
<td>
<p align="center"><img border="0" src="http://www.oneworld-publications.com/my-new-imgs/pdf_icon.jpg"></td>
</tr>
<center>
<tr>
<td>
.
</td>
</tr>


<tr>
<td colspan="2" bgcolor="$table_color">&nbsp;</td>
<td colspan="3" bgcolor="$table_color"><FONT face=ARIAL SIZE=2 color="#FFFFFF">filename.html</font></td>
</tr>
<tr>
<td colspan="2">
<p align="right"><b><FONT face=ARIAL SIZE=2>Option File</font></b><FONT face=ARIAL SIZE=2><b>: </b> </font></td>
<CENTER>
<td colspan="3"><font face="Arial">

<select size="1" name="option_file">
<option>$option</option>
$options
</select>

</font></td>
</tr>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="2" bgcolor="$table_color">&nbsp;</td>
<td colspan="3" bgcolor="$table_color">
<font size="2" face="Arial" color="#FFFFFF">$shipping_title_desc.</font></td>
</tr>

</CENTER>
<tr>
<td colspan="2">
<p align="right"><b><FONT face=ARIAL SIZE=2>$shipping_title_name: </font></b></p>
</td>
<CENTER>
<td colspan="3"><font face="Arial"><INPUT NAME="shipping_price" SIZE=11 VALUE="$shipping_price"></font></td>
</tr>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="5">
<hr noshade size="1" color="#000000">
</td>
</tr>
<tr>
<td colspan="5" bgcolor="$table_color">
<p align="center"><font face="Arial" color="#FFFFFF"><b>Book Details</b></font>
<blockquote>
<p align="left"><font face="Arial" size="2" color="#FFFFFF">Fill in the main book details below. You may use '\<\ i \>\', '\<\ b \>\', '\<\ u \>\' for italics,bold, and underline respectively. eg: \<\ b \>\ bold text here \<\ /b \>\ . To create a text link use \<\ a href=http://www.google.com\>\ click here\<\ /a \>\. And remember that ONE line break is '\<\ br \>\' and an EMPTY SPACE (for seperate paragraphs) is '\<\ br \>\ \<\ br \>\'. To link to another Oneworld book then you can use: <br> \<\ a href=http://www.oneworld-publications.com/cgi-bin/cart/commerce.cgi?pid=BOOK-NUMBER-HERE\>\ BOOK NAME HERE\<\ /a \>\. </font></p>
</blockquote>
</td>
</tr>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="right"><FONT face=ARIAL SIZE=2 COLOR="RED">Author: </font></td>
<td colspan="3"><font face="Arial"><INPUT NAME="userDefinedOne" SIZE=35 value="$userDefinedOne"></font></td>
</tr>
<tr>
<td colspan="2" align="right"><FONT face=ARIAL SIZE=2 COLOR="RED">Book Type: </font></td>
<td colspan="3"><font face="Arial">

<select name="userDefinedTwo">
<option>$userDefinedTwo</option>
<option value="Paperback">Paperback</option>
<option value="Casebound">Casebound</option>
</select>

</font></td>
</tr>
<tr>
<td colspan="2" align="right" nowrap><FONT face=ARIAL SIZE=2 COLOR="RED">No. of Pages: </font></td>
<td colspan="3"><font face="Arial"><INPUT NAME="userDefinedThree" SIZE=35 value="$userDefinedThree"></font></td>
</tr>
<tr>
<td colspan="2" align="right"><FONT face=ARIAL SIZE=2 COLOR="RED">ISBN: </font></td>
<td colspan="3"><font face="Arial"><INPUT NAME="userDefinedFour" SIZE=35 value="$userDefinedFour"></font></td>
</tr>
<tr>
<td colspan="2" align="right"><FONT face=ARIAL SIZE=2 COLOR="RED">Pub. Date: </font></td>
<td colspan="3"><font face="Arial">

<select name="userDefinedFive">
<option>$userDefinedFive</option>
<option></option>
<option value="Jan">Jan</option>
<option value="Feb">Feb</option>
<option value="Mar">Mar</option>
<option value="Apr">Apr</option>
<option value="May">May</option>
<option value="Jun">Jun</option>
<option value="Jul">Jul</option>
<option value="Aug">Aug</option>
<option value="Sep">Sep</option>
<option value="Oct">Oct</option>
<option value="Nov">Nov</option>
<option value="Dec">Dec</option>
</select>



<select name="dateyear">
<option>$dateyear</option>
<option></option>
<option value="1980">1980</option>
<option value="1981">1981</option>
<option value="1982">1982</option>
<option value="1983">1983</option>
<option value="1984">1984</option>
<option value="1985">1985</option>
<option value="1986">1986</option>
<option value="1987">1987</option>
<option value="1988">1988</option>
<option value="1989">1989</option>
<option value="1990">1990</option>
<option value="1991">1991</option>
<option value="1992">1992</option>
<option value="1993">1993</option>
<option value="1994">1994</option>
<option value="1995">1995</option>
<option value="1996">1996</option>
<option value="1997">1997</option>
<option value="1998">1998</option>
<option value="1999">1999</option>
<option value="2000">2000</option>
<option value="2001">2001</option>
<option value="2002">2002</option>
<option value="2003">2003</option>
<option value="2004">2004</option>
<option value="2005">2005</option>
<option value="2006">2006</option>
<option value="2007">2007</option>
<option value="2008">2008</option>
<option value="2009">2009</option>
<option value="2010">2010</option>
<option value="2011">2011</option>
<option value="2012">2012</option>
<option value="2013">2013</option>
<option value="2014">2014</option>
<option value="2015">2015</option>
<option value="2016">2016</option>
<option value="2017">2017</option>
<option value="2018">2018</option>
<option value="2019">2019</option>
</select>

</font></td>
</tr>


<tr>
<td colspan="2" align="right"><FONT face=ARIAL SIZE=2 COLOR="RED">Author Biography: </font><FONT face=ARIAL SIZE=1 COLOR="BLACK">(remember to bold the author name)</font> </font></td>
<td colspan="3"><font face="Arial"><TEXTAREA NAME="userDefinedSix" ROWS=6 COLS=51 wrap=soft>$userDefinedSix</TEXTAREA></font></td>
</tr>

<tr>
<td colspan="2" align="right"><FONT face=ARIAL SIZE=2 COLOR="RED">Short Description: </font></td>
<td colspan="3"><font face="Arial"><TEXTAREA NAME="userDefinedSeven" ROWS=6 COLS=51 wrap=soft>$userDefinedSeven</TEXTAREA></font></td>
</tr>
<tr>
<td colspan="2" align="right"><FONT face=ARIAL SIZE=2 COLOR="RED">Review ONE: </font> </font></td>
<td colspan="3"><font face="Arial"><TEXTAREA NAME="userDefinedEight" ROWS=6 COLS=51 wrap=soft>$userDefinedEight</TEXTAREA></font></td>
</tr>
<tr>
<td colspan="2" align="right"><FONT face=ARIAL SIZE=2 COLOR="RED">Reviewer ONE: </font> </font></td>
<td colspan="3"><font face="Arial"><TEXTAREA NAME="userDefinedNine" ROWS=3 COLS=51 wrap=soft>$userDefinedNine</TEXTAREA></font></td>
</tr>
<tr>
<td colspan="2" align="right"><FONT face=ARIAL SIZE=2 COLOR="RED">Review TWO: </font> </font></td>
<td colspan="3"><font face="Arial"><TEXTAREA NAME="userDefinedTen" ROWS=6 COLS=51 wrap=soft>$userDefinedTen</TEXTAREA></font></td>
</tr>
<tr>
<td colspan="2" align="right"><FONT face=ARIAL SIZE=2 COLOR="RED">Reviewer TWO: </font> </font></td>
<td colspan="3"><font face="Arial"><TEXTAREA NAME="userDefinedEleven" ROWS=3 COLS=51 wrap=soft>$userDefinedEleven</TEXTAREA></font></td>
</tr>
<tr>
<td colspan="2" align="right"><FONT face=ARIAL SIZE=2 COLOR="RED">Review THREE: </font> </font></td>
<td colspan="3"><font face="Arial"><TEXTAREA NAME="userDefinedTwelve" ROWS=6 COLS=51 wrap=soft>$userDefinedTwelve</TEXTAREA></font></td>
</tr>
<tr>
<td colspan="2" align="right"><FONT face=ARIAL SIZE=2 COLOR="RED">Reviewer THREE: </font> </font></td>
<td colspan="3"><font face="Arial"><TEXTAREA NAME="userDefinedThirteen" ROWS=3 COLS=51 wrap=soft>$userDefinedThirteen</TEXTAREA></font></td>
</tr>
<tr>
<td colspan="2" align="right"><FONT face=ARIAL SIZE=2 COLOR="RED">Endorsement ONE: </font> </font></td>
<td colspan="3"><font face="Arial"><TEXTAREA NAME="userDefinedFourteen" ROWS=6 COLS=51 wrap=soft>$userDefinedFourteen</TEXTAREA></font></td>
</tr>
<tr>
<td colspan="2" align="right"><FONT face=ARIAL SIZE=2 COLOR="RED">Endorsee ONE: </font> </font></td>
<td colspan="3"><font face="Arial"><TEXTAREA NAME="userDefinedFifteen" ROWS=3 COLS=51 wrap=soft>$userDefinedFifteen</TEXTAREA></font></td>
</tr>
<tr>
<td colspan="2" align="right"><FONT face=ARIAL SIZE=2 COLOR="RED">Endorsement TWO: </font> </font></td>
<td colspan="3"><font face="Arial"><TEXTAREA NAME="userDefinedSixteen" ROWS=6 COLS=51 wrap=soft>$userDefinedSixteen</TEXTAREA></font></td>
</tr>
<tr>
<td colspan="2" align="right"><FONT face=ARIAL SIZE=2 COLOR="RED">Endorsee TWO: </font> </font></td>
<td colspan="3"><font face="Arial"><TEXTAREA NAME="userDefinedSeventeen" ROWS=3 COLS=51 wrap=soft>$userDefinedSeventeen</TEXTAREA></font></td>
</tr>
<tr>
<td colspan="2" align="right"><FONT face=ARIAL SIZE=2 COLOR="RED">Contents: </font><FONT face=ARIAL SIZE=1 COLOR="BLACK">(remember to add 'CONTENTS:\<\ br \> \<\ br \>' at the top)</font> </font></td>
<td colspan="3"><font face="Arial"><TEXTAREA NAME="userDefinedEighteen" ROWS=8 COLS=51 wrap=soft>$userDefinedEighteen</TEXTAREA></font></td>
</tr>
<tr>
<td colspan="5">
<hr noshade size="1" color="#000000">
</td>
</tr>
<tr>
<td colspan="2"></td>
<td colspan="3">&nbsp;</td>
</tr>
</table>
</div>
<table border="0" cellpadding="0" cellspacing="0" width="90%">
<tr>
<td width="100%">
<p align="center"><font face="Arial">
<INPUT TYPE=HIDDEN NAME=EditWhichProduct VALUE="$sku">
<INPUT TYPE=HIDDEN NAME=ProductEditSku VALUE="$sku">
<INPUT TYPE=HIDDEN NAME=action VALUE="action_submit_edit_product">
<INPUT TYPE=SUBMIT NAME=EditProduct VALUE=" Edit Book ">
</font></p>
</td>
</tr>
</table>
<p><font face="Arial"> </font></p>

</CENTER>
</td>
</tr>
</table>
</center>
</div>
<CENTER>
<p>&nbsp;</p>

</CENTER>
</FORM>
~;
}

1;

As I say, I'd like to be able to edd in something for each book that prompts for an image and a link and a title to another book with the 'Enjoy this? Try this!' recommendation thing? Is that possible? The page it then feeds into is this...

code:
<!-- Make sure that there are no open and closing <HTML> tags because this is wrapped by the store template file which already has those. -->
<!-- Start productPage.inc file -->
<FORM METHOD = "post" action="{scriptURL}">
{hidden_fields}

<div align="center">
<center>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD colspan="4"></TD>
</TR>
<TR>
<TD height=1 colspan="4" bgcolor="#cccccc"><IMG height=1
src="new%20imgs/spacer.gif" width=1></TD>
</TR>
<TR>
<TD height=1 colspan="3"><IMG height=1
src="new%20imgs/spacer.gif" width=1></TD>
</TR>
<TR>
<TD height=1 colspan="3"><IMG height=1
src="new%20imgs/spacer.gif" width=1></TD>
</TR>
<TR>
<TD height=1 colspan="3"><IMG height=1
src="new%20imgs/spacer.gif" width=1></TD>
</TR>
<TR>
<TD height=1 colspan="3"><IMG height=1
src="new%20imgs/spacer.gif" width=1></TD>
</TR>
<TR>

<TD height=6 colspan="3" align="left" valign="top"><span class="bookpage-title">{user19} {name}<br>{subname} </span><br>
<span class="author-name">{user1}</span></TD>
<TD width="39%" rowspan="7" align="right"><img src="../../books/covers/{image}" width="100" alt="{name}"></TD>
</TR>
<TR>
<TD height=1 colspan="3" bgcolor="#cccccc"><IMG height=1
src="new%20imgs/spacer.gif" width=1></TD>
</TR>
<TR>
<TD width="14%" height=0 align="left" valign="middle" bgcolor="#E5EEEE" class="bookpage-price">{price} {saleprice}</TD>
<TD width="14%" align="center" valign="middle" bgcolor="#F1F5F5">
<!-- START SELECT QUANITY BUTTON-->
<input type="hidden" name="product_id" value="{product_id}">
<input type="hidden" name="name" value="{name}">
<input type="hidden" name="price" value="{hidden_price}">
<input type="hidden" name="shipping" value="{shipping}">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="user1" value="{user1}">
<input type="hidden" name="user2" value="{user2}">
<input type="hidden" name="user3" value="{user3}">
<input type="hidden" name="user4" value="{user4}">
<input type="hidden" name="user5" value="{user5}">
<input type="hidden" name="dateyear" value="{dateyear}">
<input type="hidden" name="datenum" value="{datenum}">
<input type="hidden" name="user6" value="{user6}">
<input type="hidden" name="user7" value="{user7}">
<input type="hidden" name="user8" value="{user8}">
<input type="hidden" name="user9" value="{user9}">
<input type="hidden" name="user10" value="{user10}">
<input type="hidden" name="user11" value="{user11}">
<input type="hidden" name="user12" value="{user12}">
<input type="hidden" name="user13" value="{user13}">
<input type="hidden" name="user14" value="{user14}">
<input type="hidden" name="user15" value="{user15}">
<input type="hidden" name="user16" value="{user16}">
<input type="hidden" name="user17" value="{user17}">
<input type="hidden" name="user18" value="{user18}">
<input type="hidden" name="user19" value="{user19}">
<input type="hidden" name="subname" value="{subname}">
<input type="hidden" name="option1" value="{option1}">
<input type="hidden" name="saleprice" value="{saleprice}">

<INPUT TYPE="IMAGE" NAME="add_to_cart_button" VALUE="Add To Cart" SRC="{URLofImages}/add_to_cart.gif" BORDER="0" align="absmiddle">

</TD>
<TD width="23%" align="center" valign="bottom" bgcolor="#F1F5F5">
<p align="center">
<FONT FACE="ARIAL" SIZE="2">
<br>{optionFile}
</FONT>
</p>
</TD>
</TR>
<TR>
<TD height=1 colspan="3" bgcolor="#cccccc"><IMG height=1
src="new%20imgs/spacer.gif" width=1></TD>
</TR>
<TR>
<TD height=1 colspan="3" align="left" valign="middle" class="bookpage-details">&nbsp;</TD>
</TR>
<TR>
<TD height=1 colspan="3" align="left" valign="middle" class="bookpage-details">Details: {user2} | {user3} pages | ISBN {user4} | {user5} {dateyear}<br>{pdf}<font color="#ffffff">.</font></TD>
</TR>
<TR>
<TD height=12 colspan="3">&nbsp;</TD>
</TR>
<TR>
<TD height=1 colspan="3"><IMG height=1
src="new%20imgs/spacer.gif" width=1></TD>
</TR>
<TR>
<TD height=1 colspan="3"><IMG height=1
src="new%20imgs/spacer.gif" width=1></TD>
</TR>
<TR>
<TD height=1 colspan="3"><IMG height=1
src="new%20imgs/spacer.gif" width=1></TD>
</TR>
<TR>
<TD height=1 colspan="3"><IMG height=1
src="new%20imgs/spacer.gif" width=1></TD>
</TR>
<TR>
<TD height=1 colspan="4" bgcolor="#cccccc"><IMG height=1
src="new%20imgs/spacer.gif" width=1></TD>
</TR>
<TR>
<TD height=12 colspan="4">&nbsp;</TD>
</TR>
<TR valign="top">
<TD height=177 colspan="4" class="text"> <p class="text">{description}</p>
<p class="text">{user6}</p>
<blockquote>

<p class="text"><em>{user8}</em> <strong> {user9}</strong></p>
<p class="text"><em>{user10}</em><strong> {user11}</strong></p>
<p class="text"><em>{user12}</em><strong> {user13}</strong></p>
<p class="text"><em>{user14}</em><strong> {user15}</strong></p>
<p class="text"><em>{user16}</em><strong> {user17}</strong></p>
</blockquote>
<p class="text">{user18}</p></TD>

</tr></TR>



</td>
</tr>



</table>
</center>
</div>
</FORM>

<!-- End productPage.inc file -->

Which I know is different from what I posted earlier, but I was confused then whereas now I know everything. Except how to do this.
 
Posted by MiscellaneousFiles (Member # 60) on :
 
I'd recommend *XStandard - a free WYSIWYG editor that generates perfect, clean, standards-compliant code that actually IS idiot proof. Believe me, we've got some real idiots here and they haven't managed to break it yet. Nice efficient code will also help your Google ranking.

It's Friday afternoon and it's gone 5:30pm so that's all you're getting for now.
 
Posted by dang65 (Member # 102) on :
 
quote:
Originally posted by Thorn Davis:
As I say, I'd like to be able to edd in something for each book that prompts for an image and a link and a title to another book with the 'Enjoy this? Try this!' recommendation thing? Is that possible?

It's certainly possible, but you'd really need to get the guy who originally wrote that code to add it in - or someone else who has access to the server-side PHP and the database.

That's what's behind that editing page, not just the HTML which you've been editing so successfully this afternoon. When you set up a book's product page by filling in the form, you submit your choices and content to the database, and the product page loads from the database when someone views it.

If you want to add recommendations then those would have to go in to the database as well, which would require new form and database fields. That's probably not something you want to go poking around with really, at least without reading a few manuals first.

Incidentally, going by the kind of books you publish, I'd make "Enjoy this?" a variable statement...

Modern Child Slavery And Horrible Lingering Death by E.F.Todd

ENJOY THIS?

WHY NOT TRY:

Plague And Infant Prostitution by William Grodd

Doesn't really look right. Unless you're Black Mask. Or my missus.

Instead, perhaps...

NOT TERMINALLY TRAUMATISED BY THIS?

YOU MIGHT MANAGE A COUPLE OF CHAPTERS OF:
 
Posted by Samuelnorton (Member # 48) on :
 
quote:
Originally posted by dang65:
...you'd really need to get the guy who originally wrote that code to add it in

Good idea. And after that, I'd shoot the fucker. That has to be the clunkiest, shittiest piece of code I've ever seen.

I actually feel sorry for you now, Thorn. Maybe I'm mellowing.

I agree with Mask though. Far too many Joo books on that site.

[ 06.10.2008, 07:40: Message edited by: Samuelnorton ]
 


copyright TMO y2k+

Powered by Infopop Corporation
UBB.classic™ 6.6.1