Make copies of all the existing files you are about to modify, and keep them so you can return to these if the modifications we are making cause problems with your existing modifications.
<!-- END admin_approval -->
<td class="admin_menu"><a href="shop.php" title="Shop">Shop Admin</a></td>
// HTML template for gallery admin menu $template_gallery_admin_menu = <<<EOT <div align="center"> <table cellpadding="0" cellspacing="1"> <tr> <!-- BEGIN admin_approval --> <td class="admin_menu" id="admin_menu_anim"><a href="editpics.php?mode=upload_approval" title="{UPL_APP_TITLE}">{UPL_APP_LNK}</a></td> <!-- END admin_approval --> <td class="admin_menu"><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></td> <td class="admin_menu"><a href="shop.php" title="Shop">Shop Admin</a></td> <td class="admin_menu"><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></td> <td class="admin_menu"><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></td> <td class="admin_menu"><a href="groupmgr.php" title="{GROUPS_TITLE}">{GROUPS_LNK}</a></td> <td class="admin_menu"><a href="usermgr.php" title="{USERS_TITLE}">{USERS_LNK}</a></td> <td class="admin_menu"><a href="banning.php" title="{BAN_TITLE}">{BAN_LNK}</a></td> <td class="admin_menu"><a href="reviewcom.php" title="{COMMENTS_TITLE}">{COMMENTS_LNK}</a></td> <!-- BEGIN log_ecards --> <td class="admin_menu"><a href="db_ecard.php" title="{DB_ECARD_TITLE}">{DB_ECARD_LNK}</a></td> <!-- END log_ecards --> <td class="admin_menu"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></td> <td class="admin_menu"><a href="searchnew.php" title="{SEARCHNEW_TITLE}">{SEARCHNEW_LNK}</a></td> <td class="admin_menu"><a href="util.php" title="{UTIL_TITLE}">{UTIL_LNK}</a></td> <td class="admin_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></td> <!-- BEGIN documentation --> <td class="admin_menu"><a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation">{DOCUMENTATION_LNK}</a></td> <!-- END documentation --> </tr> </table> </div> EOT;
$template_thumb_view_title_row
class="sortorder_options"
<td> {CLICK} </td>
// HTML template for title row of the thumbnail view (album title + sort options) if (!isset($template_thumb_view_title_row)) //{THEMES} $template_thumb_view_title_row = <<<EOT <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td width="35%" class="statlink"><h2>{ALBUM_NAME}</h2></td> <td><img src="images/spacer.gif" width="1" alt="" /></td> <td> {CLICK} </td> </tr> </table> EOT;
'{SORT_PD}' => $lang_thumb_view['sort_pd'],
'{CLICK}' => $lang_thumb_view['click'],
if (!function_exists('theme_display_thumbnails')) { //{THEMES} function theme_display_thumbnails(&$thumb_list, $nbThumb, $album_name, $aid, $cat, $page, $total_pages, $sort_options, $display_tabs, $mode = 'thumb') { global $CONFIG; global $template_thumb_view_title_row,$template_fav_thumb_view_title_row, $lang_thumb_view, $template_tab_display, $template_thumbnail_view, $lang_album_list; static $header = ''; static $thumb_cell = ''; static $empty_cell = ''; static $row_separator = ''; static $footer = ''; static $tabs = ''; static $spacer = ''; if ($header == '') { $thumb_cell = template_extract_block($template_thumbnail_view, 'thumb_cell'); $tabs = template_extract_block($template_thumbnail_view, 'tabs'); $header = template_extract_block($template_thumbnail_view, 'header'); $empty_cell = template_extract_block($template_thumbnail_view, 'empty_cell'); $row_separator = template_extract_block($template_thumbnail_view, 'row_separator'); $footer = template_extract_block($template_thumbnail_view, 'footer'); $spacer = template_extract_block($template_thumbnail_view, 'spacer'); } $cat_link = is_numeric($aid) ? '' : '&cat=' . $cat; $theme_thumb_tab_tmpl = $template_tab_display; if ($mode == 'thumb') { $theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $aid == 'lastalb' ? $lang_album_list['album_on_page'] : $lang_thumb_view['pic_on_page'])); $theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&page=%d')); $theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&page=%d')); $theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&page=%d')); } else { $theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['user_on_page'])); $theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d')); $theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d')); $theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d')); } $thumbcols = $CONFIG['thumbcols']; $cell_width = ceil(100 / $CONFIG['thumbcols']) . '%'; $tabs_html = $display_tabs ? create_tabs($nbThumb, $page, $total_pages, $theme_thumb_tab_tmpl) : ''; // The sort order options are not available for meta albums if ($sort_options) { $param = array('{ALBUM_NAME}' => $album_name, '{AID}' => $aid, '{PAGE}' => $page, '{NAME}' => $lang_thumb_view['name'], '{TITLE}' => $lang_thumb_view['title'], '{DATE}' => $lang_thumb_view['date'], '{SORT_TA}' => $lang_thumb_view['sort_ta'], '{SORT_TD}' => $lang_thumb_view['sort_td'], '{SORT_NA}' => $lang_thumb_view['sort_na'], '{SORT_ND}' => $lang_thumb_view['sort_nd'], '{SORT_DA}' => $lang_thumb_view['sort_da'], '{SORT_DD}' => $lang_thumb_view['sort_dd'], '{POSITION}' => $lang_thumb_view['position'], '{SORT_PA}' => $lang_thumb_view['sort_pa'], '{SORT_PD}' => $lang_thumb_view['sort_pd'], '{CLICK}' => $lang_thumb_view['click'], ); $title = template_eval($template_thumb_view_title_row, $param); } else if ($aid == 'favpics' && $CONFIG['enable_zipdownload'] == 1) { //Lots of stuff can be added here later $param = array('{ALBUM_NAME}' => $album_name, '{DOWNLOAD_ZIP}'=>$lang_thumb_view['download_zip'] ); $title = template_eval($template_fav_thumb_view_title_row, $param); }else{ $title = $album_name; } if ($mode == 'thumb') { starttable('100%', $title, $thumbcols); } else { starttable('100%'); } echo $header; $i = 0; foreach($thumb_list as $thumb) { $i++; if ($mode == 'thumb') { if ($aid == 'lastalb') { $params = array('{CELL_WIDTH}' => $cell_width, '{LINK_TGT}' => "thumbnails.php?album={$thumb['aid']}", '{THUMB}' => $thumb['image'], '{CAPTION}' => $thumb['caption'], '{ADMIN_MENU}' => $thumb['admin_menu'] ); } else { $params = array('{CELL_WIDTH}' => $cell_width, '{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}", '{THUMB}' => $thumb['image'], '{CAPTION}' => $thumb['caption'], '{ADMIN_MENU}' => $thumb['admin_menu'] ); } } else { $params = array('{CELL_WIDTH}' => $cell_width, '{LINK_TGT}' => "index.php?cat={$thumb['cat']}", '{THUMB}' => $thumb['image'], '{CAPTION}' => $thumb['caption'], '{ADMIN_MENU}' => '' ); } echo template_eval($thumb_cell, $params); if ((($i % $thumbcols) == 0) && ($i < count($thumb_list))) { echo $row_separator; } } for (;($i % $thumbcols); $i++) { echo $empty_cell; } echo $footer; if ($display_tabs) { $params = array('{THUMB_COLS}' => $thumbcols, '{TABS}' => $tabs_html ); echo template_eval($tabs, $params); } endtable(); echo $spacer; } }
$lang_thumb_view = array(
'click' => 'Click on the thumbnails to see larger version, and to purchase.',
array('Field 1 name', 'user_field1_name', 0, 'f=index.htm&as=admin_custom_image&ae=admin_custom_image_end'), //cpg1.4 array('Field 2 name', 'user_field2_name', 0),
array('Field 2 name', 'user_field2_name', 0, 'f=index.htm&as=admin_custom_image&ae=admin_custom_image_end'), //cpg1.4
// ------------------------------------------------------------------------- // // File db_ecard.php // ------------------------------------------------------------------------- //
// ------------------------------------------------------------------------- // // File shop.php //cpg1.4 // ------------------------------------------------------------------------- // if (defined('SHOP_PHP')) $lang_shop_php = array( 'title' => 'Shop Configuration', //cpg1.4 'save_cfg' => 'Save new configuration', 'upd_success' => 'Your shop configuration was updated', 'click_expand' => 'click section name to expand', 'expand_all' => 'Expand All', //cpg1.4 ); if (defined('SHOP_PHP')) $lang_shop_data = array( 'Shop main settings', array('Paypal email account', 'paypal_email', 0), array('Currency symbol US$ - Can$ - £ - € - ¥', 'currency_symbol', 0), array('Currency USD-CAD-GBP-EUR-JPY', 'currency', 0), array('Main options display in edit form(only change this if translating)', 'user_field1_name', 0), array('Main options name (i.e. Print and Mat size)', 'main_option_name', 0), 'Shop Main Option, Set 1, options and prices', array('Main Option Set 1', 'main_option_1', 0), array('Option 1', '1size1', 0), array('Price Option 1', '1size1_price', 0), array('Option 2', '1size2', 0), array('Price Option 2', '1size2_price', 0), array('Option 3', '1size3', 0), array('Price Option 3', '1size3_price', 0), array('Option 4', '1size4', 0), array('Price Option 4', '1size4_price', 0), array('Option 5', '1size5', 0), array('Price Option 5', '1size5_price', 0), array('Option 6', '1size6', 0), array('Price Option 6', '1size6_price', 0), array('Option 7', '1size7', 0), array('Price Option 7', '1size7_price', 0), array('Option 8', '1size8', 0), array('Price Option 8', '1size8_price', 0), array('Option 9', '1size9', 0), array('Price Option 9', '1size9_price', 0), array('Option 10', '1size10', 0), array('Price Option 10', '1size10_price', 0), 'Shop Main Option, Set 2, options and prices', array('Main Option Set 2', 'main_option_2', 0), array('Option 1', '2size1', 0), array('Price Option 1', '2size1_price', 0), array('Option 2', '2size2', 0), array('Price Option 2', '2size2_price', 0), array('Option 3', '2size3', 0), array('Price Option 3', '2size3_price', 0), array('Option 4', '2size4', 0), array('Price Option 4', '2size4_price', 0), array('Option 5', '2size5', 0), array('Price Option 5', '2size5_price', 0), array('Option 6', '2size6', 0), array('Price Option 6', '2size6_price', 0), array('Option 7', '2size7', 0), array('Price Option 7', '2size7_price', 0), array('Option 8', '2size8', 0), array('Price Option 8', '2size8_price', 0), array('Option 9', '2size9', 0), array('Price Option 9', '2size9_price', 0), array('Option 10', '2size10', 0), array('Price Option 10', '2size10_price', 0), 'Shop Main Option, Set 3, options and prices', array('Main Option Set 3', 'main_option_3', 0), array('Option 1', '3size1', 0), array('Price Option 1', '3size1_price', 0), array('Option 2', '3size2', 0), array('Price Option 2', '3size2_price', 0), array('Option 3', '3size3', 0), array('Price Option 3', '3size3_price', 0), array('Option 4', '3size4', 0), array('Price Option 4', '3size4_price', 0), array('Option 5', '3size5', 0), array('Price Option 5', '3size5_price', 0), array('Option 6', '3size6', 0), array('Price Option 6', '3size6_price', 0), array('Option 7', '3size7', 0), array('Price Option 7', '3size7_price', 0), array('Option 8', '3size8', 0), array('Price Option 8', '3size8_price', 0), array('Option 9', '3size9', 0), array('Price Option 9', '3size9_price', 0), array('Option 10', '3size10', 0), array('Price Option 10', '3size10_price', 0), 'Shop Main Option, Set 4 options and prices', array('Main Option Set 4', 'main_option_4', 0), array('Option 1', '4size1', 0), array('Price Option 1', '4size1_price', 0), array('Option 2', '4size2', 0), array('Price Option 2', '4size2_price', 0), array('Option 3', '4size3', 0), array('Price Option 3', '4size3_price', 0), array('Option 4', '4size4', 0), array('Price Option 4', '4size4_price', 0), array('Option 5', '4size5', 0), array('Price Option 5', '4size5_price', 0), array('Option 6', '4size6', 0), array('Price Option 6', '4size6_price', 0), array('Option 7', '4size7', 0), array('Price Option 7', '4size7_price', 0), array('Option 8', '4size8', 0), array('Price Option 8', '4size8_price', 0), array('Option 9', '4size9', 0), array('Price Option 9', '4size9_price', 0), array('Option 10', '4size10', 0), array('Price Option 10', '4size10_price', 0), 'Shop Main Option, Set 5, options and prices', array('Main Option Set 5', 'main_option_5', 0), array('Option 1', '5size1', 0), array('Price Option 1', '5size1_price', 0), array('Option 2', '5size2', 0), array('Price Option 2', '5size2_price', 0), array('Option 3', '5size3', 0), array('Price Option 3', '5size3_price', 0), array('Option 4', '5size4', 0), array('Price Option 4', '5size4_price', 0), array('Option 5', '5size5', 0), array('Price Option 5', '5size5_price', 0), array('Option 6', '5size6', 0), array('Price Option 6', '5size6_price', 0), array('Option 7', '5size7', 0), array('Price Option 7', '5size7_price', 0), array('Option 8', '5size8', 0), array('Price Option 8', '5size8_price', 0), array('Option 9', '5size9', 0), array('Price Option 9', '5size9_price', 0), array('Option 10', '5size10', 0), array('Price Option 10', '5size10_price', 0), 'Shop secondary options lists and prices<br /><li>Setting additional charges.</b><br />For set charges, just add the figure with a plus sign, i.e. for £1 add +1.<br />For percentages use with the % sign first like this, %5 for 5%</li>', array('<b>Second options name (i.e. Medium type)</b>(leave blank if not wanted)(this option set provides 3 radio buttons)', 'option2_name', 0), array('--option 1', '2option1', 0), array('--option 1 surcharge ', '2option1_charge', 0), array('--option 2', '2option2', 0), array('--option 2 surcharge ', '2option2_charge', 0), array('--option 3', '2option3', 0), array('--option 3 surcharge<br /><br /><br /><br /> ', '2option3_charge', 0), array('<b>Third options name (i.e. Print tone type)</b>(leave blank if not wanted)(this option set provides a dropdown list with up to 5 options)', 'option3_name', 0), array('--option 1', '3option1', 0), array('--option 1 surcharge ', '3option1_charge', 0), array('--option 2', '3option2', 0), array('--option 2 surcharge ', '3option2_charge', 0), array('--option 3', '3option3', 0), array('--option 3 surcharge ', '3option3_charge', 0), array('--option 4', '3option4', 0), array('--option 4 surcharge ', '3option4_charge', 0), array('--option 5', '3option5', 0), array('--option 5 surcharge <br /><br /><br /><br />', '3option5_charge', 0), array('<b>Forth options name (i.e. Mat colour)</b>(leave blank if not wanted)(this option set provides a dropdown list with up to 5 options)', 'option4_name', 0), array('--option 1', '4option1', 0), array('--option 1 surcharge ', '4option1_charge', 0), array('--option 2', '4option2', 0), array('--option 2 surcharge ', '4option2_charge', 0), array('--option 3', '4option3', 0), array('--option 3 surcharge ', '4option3_charge', 0), array('--option 4', '4option4', 0), array('--option 4 surcharge ', '4option4_charge', 0), array('--option 5', '4option5', 0), array('--option 5 surcharge <br /><br /><br /><br />', '4option5_charge', 0), array('<b>Fifth options name (i.e. Decorative overlay)</b>(leave blank if not wanted)(this option set provides a dropdown list with up to 5 options)', 'option5_name', 0), array('--option 1', '5option1', 0), array('--option 1 surcharge ', '5option1_charge', 0), array('--option 2', '5option2', 0), array('--option 2 surcharge ', '5option2_charge', 0), array('--option 3', '5option3', 0), array('--option 3 surcharge ', '5option3_charge', 0), array('--option 4', '5option4', 0), array('--option 4 surcharge ', '5option4_charge', 0), array('--option 5', '5option5', 0), array('--option 5 surcharge <br /><br /><br /><br />', '5option5_charge', 0), array('<b>Sixth options name (i.e. Gift wrapping)</b>(leave blank if not wanted)(this option set provides a dropdown list with up to 8 options)', 'option6_name', 0), array('option 1', '6option1', 0), array('--option 1 surcharge ', '6option1_charge', 0), array('--option 2', '6option2', 0), array('--option 2 surcharge ', '6option2_charge', 0), array('--option 3', '6option3', 0), array('--option 3 surcharge ', '6option3_charge', 0), array('--option 4', '6option4', 0), array('--option 4 surcharge ', '6option4_charge', 0), array('--option 5', '6option5', 0), array('--option 5 surcharge ', '6option5_charge', 0), array('--option 6', '6option6', 0), array('--option 6 surcharge ', '6option6_charge', 0), array('--option 7', '6option7', 0), array('--option 7 surcharge ', '6option7_charge', 0), array('--option 8', '6option8', 0), array('--option 8 surcharge ', '6option8_charge', 0), );
$lang_picinfo = array(
'customise' => 'Place your order here', 'select' => 'Select', 'confidence' => 'Buy with confidence', 'sorry' => 'Please email for details on this item', 'looking' => 'You are looking at ', 'looking2' => 'Regardless of size, all of our products are made to provide you with the best possible image quality and workmanship. All products come with a money back guarantee. See our products info page for full details.',
if (GALLERY_ADMIN_MODE) { $width = 800; $height = 500; } else { $width = 400; $height = 250; }
pagefooter(); ob_end_flush(); } ?>
//BEGIN Paypal Mod // Get picture thumbnail url $pid = $CURRENT_PIC_DATA['pid']; // Get picture url and some constants to use with this form $result = cpg_db_query("SELECT * from {$CONFIG['TABLE_PICTURES']} WHERE pid='$pid' $ALBUM_SET"); if (!mysql_num_rows($result)) cpg_die(ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__); $row = mysql_fetch_array($result); $pic_url = get_pic_url($row, 'fullsize'); // url to fullsize picture $pic_normal_url = get_pic_url($row, 'normal'); // url to intermediate sized picture $pic_thumb_url = get_pic_url($row, 'thumb'); // url to thumbnail $pic_title = $row['title']; // file title $caption = $row['caption']; // file caption $pic_id = $row['filename']; // filename $aid = $row['aid']; // album # $pwidth = $row['pwidth']; // width of fullsize image $pheight = $row['pheight']; // height of fullsize image $set_item = $row['title']; // we will use this in our product descriptions. $user1 = $row['user1']; $user2 = $row['user2'] ; $user3 = $row['user3']; $user4 = $row['user4']; $keywords = $row['keywords']; $result = cpg_db_query("SELECT * from {$CONFIG['TABLE_ALBUMS']} WHERE aid='$aid' $ALBUM_SET"); if (!mysql_num_rows($result)) cpg_die(ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__); $row = mysql_fetch_array($result); $album= $row['title']; // Set paypal ID and currency type $paypal_ID = "{$CONFIG['paypal_email']}"; $currency_code = "{$CONFIG[currency]}"; $currency_sign = "{$CONFIG[currency_symbol]}"; // Set custom image description field to be used for setting price (Default is the first field or $user1, other options are $user2,$user3,and $user4). $pricing_setup = $user1; // Set dropdown list options. EDIT these pairs to set your price and descriptions accordingly. // IF/Else Set Pricing Block if ($pricing_setup=="1") //custom field entry is "{$CONFIG['main_option_1']}" { $Option1 = " {$CONFIG['1size1']} @{$CONFIG['1size1_price']} "; $Desc1 = " {$CONFIG['1size1']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size1_price']} " ; $Option2 = " {$CONFIG['1size2']} @{$CONFIG['1size2_price']} "; $Desc2 = " {$CONFIG['1size2']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size2_price']} "; $Option3 = " {$CONFIG['1size3']} @{$CONFIG['1size3_price']} "; $Desc3 = " {$CONFIG['1size3']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size3_price']} "; $Option4 = " {$CONFIG['1size4']} @{$CONFIG['1size4_price']} "; $Desc4 = " {$CONFIG['1size4']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size4_price']} "; $Option5 = " {$CONFIG['1size5']} @{$CONFIG['1size5_price']} "; $Desc5 = " {$CONFIG['1size5']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size5_price']} "; $Option6 = "{$CONFIG['1size6']} @{$CONFIG['1size6_price']}"; $Desc6 = "{$CONFIG['1size6']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size6_price']}"; $Option7 = "{$CONFIG['1size7']} @{$CONFIG['1size7_price']}"; $Desc7 = "{$CONFIG['1size7']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size7_price']}"; $Option8 = "{$CONFIG['1size8']} @{$CONFIG['1size8_price']}"; $Desc8 = "{$CONFIG['1size8']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size8_price']}"; $Option9 = "{$CONFIG['1size9']} @{$CONFIG['1size9_price']}"; $Desc9 = "{$CONFIG['1size9']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size9_price']}"; $Option10 = "{$CONFIG['1size10']} @{$CONFIG['1size10_price']}"; $Desc10 = "{$CONFIG['1size10']} @ {$CONFIG[currency_symbol]}{$CONFIG['1size10_price']}"; } else // 2nd option if ($pricing_setup=="2") { $Option1 = " {$CONFIG['2size1']} @{$CONFIG['2size1_price']} "; $Desc1 = " {$CONFIG['2size1']} @ {$CONFIG[currency_symbol]}{$CONFIG['2size1_price']} " ; $Option2 = " {$CONFIG['2size2']} @{$CONFIG['2size2_price']} "; $Desc2 = " {$CONFIG['2size2']} @ {$CONFIG[currency_symbol]}{$CONFIG['2size2_price']} "; $Option3 = " {$CONFIG['2size3']} @{$CONFIG['2size3_price']} "; $Desc3 = " {$CONFIG['2size3']} @ {$CONFIG[currency_symbol]}{$CONFIG['2size3_price']} "; $Option4 = " {$CONFIG['2size4']} @{$CONFIG['2size4_price']} "; $Desc4 = " {$CONFIG['2size4']} @ {$CONFIG[currency_symbol]}{$CONFIG['2size4_price']} "; $Option5 = " {$CONFIG['2size5']} @{$CONFIG['2size5_price']} "; $Desc5 = " {$CONFIG['2size5']} @ {$CONFIG[currency_symbol]}{$CONFIG['2size5_price']} "; $Option6 = "{$CONFIG['2size6']} @{$CONFIG['2size6_price']}"; $Desc6 = "{$CONFIG['2size6']} @ {$CONFIG[currency_symbol]}{$CONFIG['2size6_price']}"; $Option7 = "{$CONFIG['2size7']} @{$CONFIG['2size7_price']}"; $Desc7 = "{$CONFIG['2size7']} @ {$CONFIG[currency_symbol]}{$CONFIG['2size7_price']}"; $Option8 = "{$CONFIG['2size8']} @{$CONFIG['2size8_price']}"; $Desc8 = "{$CONFIG['2size8']} @ {$CONFIG[currency_symbol]}{$CONFIG['2size8_price']}"; $Option9 = "{$CONFIG['2size9']} @{$CONFIG['2size9_price']}"; $Desc9 = "{$CONFIG['2size9']} @ {$CONFIG[currency_symbol]}{$CONFIG['2size9_price']}"; $Option10 = "{$CONFIG['2size10']} @{$CONFIG['2size10_price']}"; $Desc10 = "{$CONFIG['2size10']} @ {$CONFIG[currency_symbol]}{$CONFIG['2size10_price']}"; } else // third option if ($pricing_setup=="3") { $Option1 = " {$CONFIG['3size1']} @{$CONFIG['3size1_price']} "; $Desc1 = " {$CONFIG['3size1']} @ {$CONFIG[currency_symbol]}{$CONFIG['3size1_price']} " ; $Option2 = " {$CONFIG['3size2']} @{$CONFIG['3size2_price']} "; $Desc2 = " {$CONFIG['3size2']} @ {$CONFIG[currency_symbol]}{$CONFIG['3size2_price']} "; $Option3 = " {$CONFIG['3size3']} @{$CONFIG['3size3_price']} "; $Desc3 = " {$CONFIG['3size3']} @ {$CONFIG[currency_symbol]}{$CONFIG['3size3_price']} "; $Option4 = " {$CONFIG['3size4']} @{$CONFIG['3size4_price']} "; $Desc4 = " {$CONFIG['3size4']} @ {$CONFIG[currency_symbol]}{$CONFIG['3size4_price']} "; $Option5 = " {$CONFIG['3size5']} @{$CONFIG['3size5_price']} "; $Desc5 = " {$CONFIG['3size5']} @ {$CONFIG[currency_symbol]}{$CONFIG['3size5_price']} "; $Option6 = "{$CONFIG['3size6']} @{$CONFIG['3size6_price']}"; $Desc6 = "{$CONFIG['3size6']} @ {$CONFIG[currency_symbol]}{$CONFIG['3size6_price']}"; $Option7 = "{$CONFIG['3size7']} @{$CONFIG['3size7_price']}"; $Desc7 = "{$CONFIG['3size7']} @ {$CONFIG[currency_symbol]}{$CONFIG['3size7_price']}"; $Option8 = "{$CONFIG['3size8']} @{$CONFIG['3size8_price']}"; $Desc8 = "{$CONFIG['3size8']} @ {$CONFIG[currency_symbol]}{$CONFIG['3size8_price']}"; $Option9 = "{$CONFIG['3size9']} @{$CONFIG['3size9_price']}"; $Desc9 = "{$CONFIG['3size9']} @ {$CONFIG[currency_symbol]}{$CONFIG['3size9_price']}"; $Option10 = "{$CONFIG['3size10']} @{$CONFIG['3size10_price']}"; $Desc10 = "{$CONFIG['3size10']} @ {$CONFIG[currency_symbol]}{$CONFIG['3size10_price']}"; } else // fourth option if ($pricing_setup=="4") { $Option1 = " {$CONFIG['4size1']} @{$CONFIG['4size1_price']} "; $Desc1 = " {$CONFIG['4size1']} @ {$CONFIG[currency_symbol]}{$CONFIG['4size1_price']} " ; $Option2 = " {$CONFIG['4size2']} @{$CONFIG['4size2_price']} "; $Desc2 = " {$CONFIG['4size2']} @ {$CONFIG[currency_symbol]}{$CONFIG['4size2_price']} "; $Option3 = " {$CONFIG['4size3']} @{$CONFIG['4size3_price']} "; $Desc3 = " {$CONFIG['4size3']} @ {$CONFIG[currency_symbol]}{$CONFIG['4size3_price']} "; $Option4 = " {$CONFIG['4size4']} @{$CONFIG['4size4_price']} "; $Desc4 = " {$CONFIG['4size4']} @ {$CONFIG[currency_symbol]}{$CONFIG['4size4_price']} "; $Option5 = " {$CONFIG['4size5']} @{$CONFIG['4size5_price']} "; $Desc5 = " {$CONFIG['4size5']} @ {$CONFIG[currency_symbol]}{$CONFIG['4size5_price']} "; $Option6 = "{$CONFIG['4size6']} @{$CONFIG['4size6_price']}"; $Desc6 = "{$CONFIG['4size6']} @ {$CONFIG[currency_symbol]}{$CONFIG['4size6_price']}"; $Option7 = "{$CONFIG['4size7']} @{$CONFIG['4size7_price']}"; $Desc7 = "{$CONFIG['4size7']} @ {$CONFIG[currency_symbol]}{$CONFIG['4size7_price']}"; $Option8 = "{$CONFIG['4size8']} @{$CONFIG['4size8_price']}"; $Desc8 = "{$CONFIG['4size8']} @ {$CONFIG[currency_symbol]}{$CONFIG['4size8_price']}"; $Option9 = "{$CONFIG['4size9']} @{$CONFIG['4size9_price']}"; $Desc9 = "{$CONFIG['4size9']} @ {$CONFIG[currency_symbol]}{$CONFIG['4size9_price']}"; $Option10 = "{$CONFIG['4size10']} @{$CONFIG['4size10_price']}"; $Desc10 = "{$CONFIG['4size10']} @ {$CONFIG[currency_symbol]}{$CONFIG['4size10_price']}"; } else // fifth option if ($pricing_setup=="5") { $Option1 = " {$CONFIG['5size1']} @{$CONFIG['5size1_price']} "; $Desc1 = " {$CONFIG['5size1']} @ {$CONFIG[currency_symbol]}{$CONFIG['5size1_price']} " ; $Option2 = " {$CONFIG['5size2']} @{$CONFIG['5size2_price']} "; $Desc2 = " {$CONFIG['5size2']} @ {$CONFIG[currency_symbol]}{$CONFIG['5size2_price']} "; $Option3 = " {$CONFIG['5size3']} @{$CONFIG['5size3_price']} "; $Desc3 = " {$CONFIG['5size3']} @ {$CONFIG[currency_symbol]}{$CONFIG['5size3_price']} "; $Option4 = " {$CONFIG['5size4']} @{$CONFIG['5size4_price']} "; $Desc4 = " {$CONFIG['5size4']} @ {$CONFIG[currency_symbol]}{$CONFIG['5size4_price']} "; $Option5 = " {$CONFIG['5size5']} @{$CONFIG['5size5_price']} "; $Desc5 = " {$CONFIG['5size5']} @ {$CONFIG[currency_symbol]}{$CONFIG['5size5_price']} "; $Option6 = "{$CONFIG['5size6']} @{$CONFIG['5size6_price']}"; $Desc6 = "{$CONFIG['5size6']} @ {$CONFIG[currency_symbol]}{$CONFIG['5size6_price']}"; $Option7 = "{$CONFIG['5size7']} @{$CONFIG['5size7_price']}"; $Desc7 = "{$CONFIG['5size7']} @ {$CONFIG[currency_symbol]}{$CONFIG['5size7_price']}"; $Option8 = "{$CONFIG['5size8']} @{$CONFIG['5size8_price']}"; $Desc8 = "{$CONFIG['5size8']} @ {$CONFIG[currency_symbol]}{$CONFIG['5size8_price']}"; $Option9 = "{$CONFIG['5size9']} @{$CONFIG['5size9_price']}"; $Desc9 = "{$CONFIG['5size9']} @ {$CONFIG[currency_symbol]}{$CONFIG['5size9_price']}"; $Option10 = "{$CONFIG['5size10']} @{$CONFIG['5size10_price']}"; $Desc10 = "{$CONFIG['5size10']} @ {$CONFIG[currency_symbol]}{$CONFIG['5size10_price']}"; } else // fall back when nothing matches. { $Option1 = "{$lang_picinfo['sorry']}"; $Desc1 = "{$lang_picinfo['sorry']}" ; $Option2 = ""; $Desc2 = ""; $Option3 = ""; $Desc3 = ""; $Option4 = ""; $Desc4 = ""; $Option5 = " "; $Desc5 = " "; $Option6 = " "; $Desc6 = " "; $Desc8 = " "; $Option9 = " "; $Desc9 = " "; $Option10 = " "; $Desc10 = " "; } } Print <<<EOT <!--//Start JavaScript for Mod --> <script type="text/javascript"> <!-- // Hide from Xhtml validators function Dollar (val) { // force to valid dollar amount var str,pos,rnd=0; if (val < .995) rnd = 1; // for old Netscape browsers str = escape (val*1.0 + 0.005001 + rnd); // float, round, escape pos = str.indexOf ("."); if (pos > 0) str = str.substring (rnd, pos + 3); return str; } var amt,des,obj,val,op1a,op1b,op2a,op2b,itmn; function ChkTok (obj1) { var j,tok,ary=new Array (); // where we parse ary = val.split (" "); // break apart for (j=0; j<ary.length; j++) { // look at all items // first we do single character tokens... if (ary[j].length < 2) continue; tok = ary[j].substring (0,1); // first character val = ary[j].substring (1); // get data if (tok == "@") amt = val * 1.0; if (tok == "+") amt = amt + val*1.0; if (tok == "%") amt = amt + (amt * val/100.0); if (tok == "#") { // record item number if (obj1.item_number) obj1.item_number.value = val; ary[j] = ""; // zap this array element } // Now we do 3-character tokens... if (ary[j].length < 4) continue; tok = ary[j].substring (0,3); // first 3 chars val = ary[j].substring (3); // get data if (tok == "s1=") { // value for shipping if (obj1.shipping) obj1.shipping.value = val; ary[j] = ""; // clear it out } if (tok == "s2=") { // value for shipping2 if (obj1.shipping2) obj1.shipping2.value = val; ary[j] = ""; // clear it out } } val = ary.join (" "); // rebuild val with what's left } function StorVal () { var tag; tag = obj.name.substring (obj.name.length-2); // get flag if (tag == "1a") op1a = op1a + " " + val; else if (tag == "1b") op1b = op1b + " " + val; else if (tag == "2a") op2a = op2a + " " + val; else if (tag == "2b") op2b = op2b + " " + val; else if (tag == "3i") itmn = itmn + " " + val; else if (des.length == 0) des = val; else des = des + ", " + val; } function ReadForm (obj1, tst) { // Read the user form var i,j,pos; amt=0;des="";op1a="";op1b="";op2a="";op2b="";itmn=""; if (obj1.baseamt) amt = obj1.baseamt.value*1.0; // base amount if (obj1.basedes) des = obj1.basedes.value; // base description if (obj1.baseon0) op1a = obj1.baseon0.value; // base options if (obj1.baseos0) op1b = obj1.baseos0.value; if (obj1.baseon1) op2a = obj1.baseon1.value; if (obj1.baseos1) op2b = obj1.baseos1.value; if (obj1.baseitn) itmn = obj1.baseitn.value; for (i=0; i<obj1.length; i++) { // run entire form obj = obj1.elements[i]; // a form element if (obj.type == "select-one") { // just selects if (obj.name == "quantity" || obj.name == "amount") continue; pos = obj.selectedIndex; // which option selected val = obj.options[pos].value; // selected value ChkTok (obj1); // check for any specials if (obj.name == "on0" || // let this go where it wants obj.name == "os0" || obj.name == "on1" || obj.name == "os1") continue; StorVal (); } else if (obj.type == "checkbox" || // just get checkboxex obj.type == "radio") { // and radios if (obj.checked) { val = obj.value; // the value of the selection ChkTok (obj1); StorVal (); } } else if (obj.type == "select-multiple") { //one or more for (j=0; j<obj.options.length; j++) { // run all options if (obj.options[j].selected) { val = obj.options[j].value; // selected value (default) ChkTok (obj1); StorVal (); } } } else if ((obj.type == "text" || // just read text, obj.type == "textarea") && obj.name != "tot" && // but not from here obj.name != "quantity") { val = obj.value; // get the data if (val == "" && tst) { // force an entry alert ("Enter data for " + obj.name); return false; } StorVal (); } } // Now summarize stuff we just processed, above if (op1a.length > 0) obj1.on0.value = op1a; if (op1b.length > 0) obj1.os0.value = op1b; if (op2a.length > 0) obj1.on1.value = op2a; if (op2b.length > 0) obj1.os1.value = op2b; if (itmn.length > 0) obj1.item_number.value = itmn; obj1.item_name.value = des; obj1.amount.value = Dollar (amt); if (obj1.tot) obj1.tot.value = "$" + Dollar (amt); } function TallyIt (obj1) { // process un-named selects var i,obj,pos,tot=0,txt=""; for (i=0; i<obj1.length; i++) { // run entire form obj = obj1.elements[i]; // a form element if (obj.type == "select-one" && // what sort is it obj.name == "") { // must be un-named pos = obj.selectedIndex; // which option selected tot = tot + obj.options[pos].value*1.00; // price mod txt = txt + " +" + obj.options[pos].text; // and text } } obj1.amount.value = Dollar ( tot + amt); } --> </script> <!--//End JavaScript for Mod--> <!--Start Form Block for purchase options --> <!--// Display image storyline--> <table align="center" width="90%"> <tr > <td> <fieldset><legend><b><big><big>{$lang_picinfo['confidence']}</big></big></b> </legend> <blockquote><div align="justify" > <font size=-1> <p><center>{$lang_picinfo['looking']} <b>$pic_title</b>, file ref:<i> $pic_id</i>. </center><br /> {$lang_picinfo['looking2']}</p> </font> </blockquote></fieldset> </td> </tr> </table> <!--// END image storyline--> <!--// START purchase FORM block --> <form action="https://www.paypal.com/cgi-bin/webscr" method="post" onsubmit="this.target = 'paypal'; return ReadForm(this, true);"> <input type="hidden" name="cmd" value="_cart" /> <input type="hidden" name="add" value="1" /> <input type="hidden" name="business" value="$paypal_ID" /> <input type="hidden" name="item_name" value="" /> <input type="hidden" name="amount" value="" /> <input type="hidden" name="currency_code" value="$currency_code" /> <input type="hidden" name="basedes" value="Title: $pic_title, Ref#: $pic_id " /> <input type="hidden" name="baseon0" value="" /> <input type="hidden" name="baseon1" value="" /> <input type="hidden" name="baseon2" value="" /> <input type="hidden" name="baseon3" value="" /> <input type="hidden" name="baseitn" value="" /> <input type="hidden" name="item_number" value="$pid" /> <!--//START 1st Dropdown List for Form --> <table align="center" width="80%" class="tableb"> <tr > <td> <fieldset><legend> <font size="4">{$lang_picinfo['customise']}</font></legend> <blockquote><blockquote> <font size="2"><b>{$lang_picinfo['select']} {$CONFIG['main_option_name']}</b></font> <blockquote> <select onchange="ReadForm (this.form, false);"> <option value='$Option1 selected'> $Desc1</option> <option value='$Option2'> $Desc2</option> <option value='$Option3'> $Desc3</option> <option value='$Option4'> $Desc4</option> <option value='$Option5'> $Desc5</option> <option value='$Option6'> $Desc6</option> <option value='$Option7'> $Desc7</option> <option value='$Option8'> $Desc8</option> <option value='$Option9'> $Desc9</option> <option value='$Option10'> $Desc10</option> </select></blockquote> <!--//END 1st Dropdown List Form --> EOT; if ($CONFIG['option2_name'] != '') echo <<<EOT <!--//START Radio Buttons--> <font size="2"><b>{$lang_picinfo['select']} {$CONFIG['option2_name']}</b></font> <blockquote> <input onclick="ReadForm (this.form, false);" type=radio CHECKED value= "{$CONFIG['option2_name']}: {$CONFIG['2option1']} {$CONFIG['2option1_charge']}" name=r1> {$CONFIG['2option1']} (+ {$CONFIG['2option1_charge']}) <br /> <input onclick="ReadForm (this.form, false);" type=radio value= "{$CONFIG['option2_name']}: {$CONFIG['2option2']} {$CONFIG['2option2_charge']}" name=r1> {$CONFIG['2option2']} (+ {$CONFIG['2option2_charge']}) <br /> <input onclick="ReadForm (this.form, false);" type=radio value= "{$CONFIG['option2_name']}: {$CONFIG['2option3']} {$CONFIG['2option3_charge']}" name=r1> {$CONFIG['2option3']} (+{$CONFIG['2option3_charge']}) </blockquote> <!--//END Radio Buttons--> EOT; if ($CONFIG['option3_name'] != '') echo <<<EOT <!--//START 2nd Dropdown List Form --> <font size="2"><b>{$lang_picinfo['select']} {$CONFIG['option3_name']}</b></font> <blockquote> <select onchange="ReadForm (this.form, false);"> <option value=' {$CONFIG['option3_name']}:{$CONFIG['3option1']} {$CONFIG['3option1_charge']}' selected> {$CONFIG['3option1']} </option> <option value=' {$CONFIG['option3_name']}:{$CONFIG['3option2']} {$CONFIG['3option2_charge']} '> {$CONFIG['3option2']}</option> <option value=' {$CONFIG['option3_name']}:{$CONFIG['3option3']} {$CONFIG['3option3_charge']}'> {$CONFIG['3option3']}</option> <option value=' {$CONFIG['option3_name']}:{$CONFIG['3option4']} {$CONFIG['3option4_charge']}'>{$CONFIG['3option4']}</option> <option value=' {$CONFIG['option3_name']}:{$CONFIG['3option5']} {$CONFIG['3option5_charge']}'>{$CONFIG['3option5']}</option> </select> </blockquote> <!--//END 2nd Dropdown List Form --> EOT; if ($CONFIG['option4_name'] != '') echo <<<EOT <!--//START 3rd Dropdown List Form --> <font size="2"><b>{$lang_picinfo['select']} {$CONFIG['option4_name']}</b></font> <blockquote> <select> <option value="{$CONFIG['option4_name']}:None">Select.</option> <option value="{$CONFIG['option4_name']}:{$CONFIG['4option1']} {$CONFIG['4option1_charge']}" select>{$CONFIG['4option1']}</option> <option value="{$CONFIG['option4_name']}:{$CONFIG['4option2']} {$CONFIG['4option2_charge']}" select>{$CONFIG['4option2']}</option> <option value="{$CONFIG['option4_name']}:{$CONFIG['4option3']} {$CONFIG['4option3_charge']}" select>{$CONFIG['4option3']}</option> <option value="{$CONFIG['option4_name']}:{$CONFIG['4option4']} {$CONFIG['4option4_charge']}" select>{$CONFIG['4option4']}</option> <option value="{$CONFIG['option4_name']}:{$CONFIG['4option5']} {$CONFIG['4option5_charge']}" select>{$CONFIG['4option5']}</option> </select> </blockquote> <!--//END 3rd Dropdown List Form --> EOT; if ($CONFIG['option5_name'] != '') echo <<<EOT <!--//START 4th dropdown list Form--> <font size="2"><b>{$lang_picinfo['select']} {$CONFIG['option5_name']}</b></font> <blockquote> <select> <option value="{$CONFIG['option5_name']}:No Thankyou.">Select.</option> <option value="{$CONFIG['option5_name']}:No Thankyou.">No Thankyou.</option> <option value="{$CONFIG['option5_name']}:{$CONFIG['5option1']} {$CONFIG['5option1_charge']}" select>{$CONFIG['5option1']}</option> <option value="{$CONFIG['option5_name']}:{$CONFIG['5option2']} {$CONFIG['5option2_charge']}" select>{$CONFIG['5option2']}</option> <option value="{$CONFIG['option5_name']}:{$CONFIG['5option3']} {$CONFIG['5option3_charge']}" select>{$CONFIG['5option3']}</option> <option value="{$CONFIG['option5_name']}:{$CONFIG['5option4']} {$CONFIG['5option4_charge']}" select>{$CONFIG['5option4']}</option> <option value="{$CONFIG['option5_name']}:{$CONFIG['5option5']} {$CONFIG['5option5_charge']}" select>{$CONFIG['5option5']}</option> </select> </blockquote> <!--//END 4th Dropdown list Form --> EOT; if ($CONFIG['option6_name'] != '') echo <<<EOT <!--//START 5th dropdown list Form--> <font size="2"><b>{$lang_picinfo['select']} {$CONFIG['option6_name']}</b></font> <blockquote> <select> <option value="{$CONFIG['option6_name']}:None">Select.</option> <option value="{$CONFIG['option6_name']}:None">No Thankyou.</option> <option value="{$CONFIG['option6_name']}:{$CONFIG['6option1']} {$CONFIG['6option1_charge']}" select>{$CONFIG['6option1']}</option> <option value="{$CONFIG['option6_name']}:{$CONFIG['6option2']} {$CONFIG['6option2_charge']}" select>{$CONFIG['6option2']}</option> <option value="{$CONFIG['option6_name']}:{$CONFIG['6option3']} {$CONFIG['6option3_charge']}" select>{$CONFIG['6option3']}</option> <option value="{$CONFIG['option6_name']}:{$CONFIG['6option4']} {$CONFIG['6option4_charge']}" select>{$CONFIG['6option4']}</option> <option value="{$CONFIG['option6_name']}:{$CONFIG['6option5']} {$CONFIG['6option5_charge']}" select>{$CONFIG['6option5']}</option> <option value="{$CONFIG['option6_name']}:{$CONFIG['6option6']} {$CONFIG['6option6_charge']}" select>{$CONFIG['6option6']}</option> <option value="{$CONFIG['option6_name']}:{$CONFIG['6option7']} {$CONFIG['6option7_charge']}" select>{$CONFIG['6option7']}</option> <option value="{$CONFIG['option6_name']}:{$CONFIG['6option8']} {$CONFIG['6option8_charge']}" select>{$CONFIG['6option8']}</option> </select> </blockquote> EOT; echo <<<EOT </fieldset> </td> </tr> </table> <!--//END 5th dropdown list--> <!--//START Order Now process --> <table align = "center"> <tr> <td > <input type="submit" value="Place Order" border="0" name="Order Now!" onclick = "TallyIt (this.form);"> <input type="hidden" name="add" value="1"> </td> <td> <input type = "button" value = "Reset Form" onclick = "this.form.reset ();" /> </td> </form> <!--//END Order Now process --> <!--//START view cart Form --> <form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="viewcart" name="viewcart"> <input type="hidden" name="cmd" value="_cart" /> <input type="hidden" name="display" value="1" /> <input type="hidden" name="business" value="$paypal_ID" /> </form> <td> <input type="submit" value="View Purchases" border="0" name="View Cart" onclick="document.forms.viewcart.target = 'paypal'; document.forms.viewcart.submit (); return false;" /> </td> </tr> </table> <!-- //End of the viewcart FORM --> <hr> EOT; //END PAYPAL MOD pagefooter(); ob_end_flush(); ?>