-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpgm-single_sku.php
125 lines (101 loc) · 4.99 KB
/
pgm-single_sku.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?php
error_reporting(E_PARSE);
if($_GET['_SESSION'] != '' || $_POST['_SESSION'] != '' || $_COOKIE['_SESSION'] != '') { exit; }
###############################################################################
## Soholaunch(R) Site Management Tool
## Version 4.5
##
## Author: Mike Johnston [mike.johnston@soholaunch.com]
## Homepage: http://www.soholaunch.com
## Bug Reports: http://bugzilla.soholaunch.com
## Release Notes: sohoadmin/build.dat.php
###############################################################################
##############################################################################
## COPYRIGHT NOTICE
## Copyright 1999-2003 Soholaunch.com, Inc. and Mike Johnston
## Copyright 2003-2007 Soholaunch.com, Inc.
## All Rights Reserved.
##
## This script may be used and modified in accordance to the license
## agreement attached (license.txt) except where expressly noted within
## commented areas of the code body. This copyright notice and the comments
## comments above and below must remain intact at all times. By using this
## code you agree to indemnify Soholaunch.com, Inc, its coporate agents
## and affiliates from any liability that might arise from its use.
##
## Selling the code for this program without prior written consent is
## expressly forbidden and in violation of Domestic and International
## copyright laws.
###############################################################################
$result = mysql_query("SELECT * FROM cart_options");
$OPTIONS = mysql_fetch_array($result);
$result = mysql_query("SELECT PRIKEY, PROD_SKU, PROD_NAME, PROD_DESC, PROD_UNITPRICE, PROD_THUMBNAIL, PROD_FULLIMAGENAME FROM cart_products WHERE PROD_SKU = '$sku_number'");
$PROD = mysql_fetch_array($result);
$SINGLE_SKU_PROMO_HTML = '';
$module_css = '';
if($shopping_style_include != 1){
include_once($_SESSION['docroot_path']."/sohoadmin/client_files/shopping_cart/pgm-shopping_css.inc.php"); // Defines $module_css
}
$shopping_style_include = 1;
$SINGLE_SKU_PROMO_HTML = $module_css;
// Find thumbnail and deal with it
// --------------------------------------------------
//$imagesrc = chop($PROD[PROD_THUMBNAIL]);
if (strlen($PROD['PROD_THUMBNAIL']) > 2) {
$imagesrc = chop($PROD[PROD_THUMBNAIL]);
} else {
$imagesrc = chop($PROD[PROD_FULLIMAGENAME]);
}
//Added 040406 for intl currencies
$dSign = $OPTIONS['PAYMENT_CURRENCY_SIGN'];
$dType = $OPTIONS['PAYMENT_CURRENCY_TYPE'];
$directory = "$doc_root/images";
if (file_exists("$directory/$imagesrc")) {
$tmparray = getImageSize("$directory/$imagesrc");
$origw = $tmparray[0];
$origh = $tmparray[1];
$WH = "width=$origw height=$origh";
if ($origw > 114) {
$calc = 114 / $origw;
$hcalc = $origh * $calc;
$nheight = round($hcalc);
$WH = "width=115 height=$nheight";
}
$IMAGE_PLACEMENT = "<a href=\"shopping/pgm-more_information.php?id=$PROD[PRIKEY]&=SID\">";
$IMAGE_PLACEMENT .= "<img src=\"images/$imagesrc\" $WH border=0 align=left vspace=2 hspace=3 alt=\"".lang("Click Here for Product Details")."!\">";
$IMAGE_PLACEMENT .= "</a>";
} else {
$IMAGE_PLACEMENT = "";
$txt_format = "";
} // End confirm image exists
// ------------------------------------------------------------------------
// BUILD DISPLAY HTML
// ------------------------------------------------------------------------
$SINGLE_SKU_PROMO_HTML .= "<div id=\"shopping_module\">\n";
$SINGLE_SKU_PROMO_HTML .= " <form method=\"get\" action=\"shopping/pgm-more_information.php\">\n";
$SINGLE_SKU_PROMO_HTML .= " <input type=\"hidden\" name=\"id\" value=\"".$PROD['PRIKEY']."\">\n";
$SINGLE_SKU_PROMO_HTML .= " <table class=\"shopping-selfcontained_box\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"90%\">\n";
$SINGLE_SKU_PROMO_HTML .= " <tr>\n";
$SINGLE_SKU_PROMO_HTML .= " <th>\n";
$SINGLE_SKU_PROMO_HTML .= " ".$PROD['PROD_NAME']."\n";
$SINGLE_SKU_PROMO_HTML .= " </th>\n";
$SINGLE_SKU_PROMO_HTML .= " <th style=\"text-align: right;\">\n";
$SINGLE_SKU_PROMO_HTML .= " ".$dSign.$PROD['PROD_UNITPRICE']."\n";
$SINGLE_SKU_PROMO_HTML .= " </th>\n";
$SINGLE_SKU_PROMO_HTML .= " </tr>\n";
$SINGLE_SKU_PROMO_HTML .= " <tr>\n";
$SINGLE_SKU_PROMO_HTML .= " <td colspan=\"2\" align=\"left\" valign=\"top\" class=\"text\">\n";
$SINGLE_SKU_PROMO_HTML .= " ".$IMAGE_PLACEMENT;
$SINGLE_SKU_PROMO_HTML .= " ".$PROD['PROD_DESC']."<BR><div align=\"left\">\n";
$SINGLE_SKU_PROMO_HTML .= " [ <a href=\"shopping/pgm-more_information.php?id=$PROD[PRIKEY]&=SID\">".lang("More Information")."</a> ]</div>\n";
$SINGLE_SKU_PROMO_HTML .= " </td>\n";
$SINGLE_SKU_PROMO_HTML .= " </tr>\n";
$SINGLE_SKU_PROMO_HTML .= " <tr>\n";
$SINGLE_SKU_PROMO_HTML .= " <td colspan=\"2\" align=\"center\" valign=\"middle\">\n";
$SINGLE_SKU_PROMO_HTML .= " <input type=\"submit\" class=\"FormLt1\" value=\" ".lang("Buy Now")."! \">\n";
$SINGLE_SKU_PROMO_HTML .= " </td>\n";
$SINGLE_SKU_PROMO_HTML .= " </tr>\n";
$SINGLE_SKU_PROMO_HTML .= " </table>\n";
$SINGLE_SKU_PROMO_HTML .= " </form>\n";
$SINGLE_SKU_PROMO_HTML .= "</div>\n";
?>