Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
help me ! i down't know $cur
Old 05-06-2009, 11:47 PM help me ! i down't know $cur
Experienced Talker

Posts: 32
Trades: 0
Quote:
function goods($pid) {
global $db, $prefix, $module_name, $admin, $cur, $width_trumb, $width_trumb, $chdimage;
checkgoods();
$pid = intval($pid);

$fresult = $db->sql_query("SELECT * FROM ".$prefix."_shop WHERE pid='$pid'");
if ($db->sql_numrows($fresult) != 1) { Header("Location: modules.php?name=$module_name"); exit(); }
$goods = $db->sql_fetchrow($fresult);
list($yview, $ygroups) = $db->sql_fetchrow($db->sql_query("SELECT view, groups FROM ".$prefix."_shop_categories WHERE cid ='$goods[cid]'"));
if ((isset($admin)) || ($yview > 3 AND in_groups($ygroups)) || ($yview == 3 AND !is_user($user)) || ($yview == 1 AND is_user($user)) || ($yview == 0)) {
include("header.php");
imgme();
docookieclient($urlrefl);
menu($goods[cid], $pid);
OpenTable();
if($goods[pic] != "") {
if (file_exists("uploads/Shop/trumb_pic/$goods[pic]")) {
// echo "<A HREF=\"javascript:CaricaFoto('uploads/Shop/pic/$goods[pic]')\" BORDER=\"0\">";
echo "<a href=\"uploads/Shop/pic/$goods[pic]\" rel=\"lightbox[roadtrip]\">";
echo "<img border=\"0\" style=\"float: left\" border=\"0\" src=\"uploads/Shop/trumb_pic/$goods[pic]\" width=\"150\">";
echo "</a>";
} else {
// echo "<A HREF=\"javascript:CaricaFoto('uploads/Shop/pic/$goods[pic]')\" BORDER=\"0\">";
echo "<a href=\"uploads/Shop/pic/$goods[pic]\" rel=\"lightbox[roadtrip]\">";
echo "<img border=\"0\" style=\"float: right\" border=\"0\" src=\"uploads/Shop/pic/$goods[pic]\" width=\"150\">";
echo "</a>";
}
} else {
if ($chdimage == 1) {
echo "<img border=\"1\" style=\"float: right\" src=\"uploads/Shop/default_02.gif\" width=\"150\"></a>";
}
}
echo "<td align=\"right center\"><font class=storytitle3>"._TTSP."</font><br><font class=storytitle>Tên sản phẩm: $goods[title]</font><br>";
echo "<font class=storytitle2>"._MAH.": $goods[addition]<br>"._MOTA.": $goods[description]<br>";
if($goods[firm] != "") {
if ($goods[site_firm] != "") {
if (!eregi("http://", $goods[site_firm])) { $goods[site_firm] = "http://$goods[site_firm]"; }
echo ""._FIRMURL.": <a href=\"$goods[site_firm]\" target=\"_blank\">$goods[firm]</a><br><br>";
} else {
echo ""._FIRMURL.": $goods[firm]<br>";
}
}
if ($goods[action] == 1) {
echo ""._OBPRICE.": <strike>".number_format($goods[price], 0, '.', ' ')." ".$cur."</strike>&nbsp;&nbsp;&nbsp;"._ACPRICE.": <b><font color=red>".number_format($goods[action_price], 0, '.', ' ')." ".$cur."</font></td></b>";
} else { echo ""; }
echo "&nbsp;&nbsp;&nbsp;";
CloseTable();
if (isset($admin)) {

//OpenTable();
// echo "<br><center><b>"._ADMINSG."</b><br><br><a href=admin/admin.php?op=shop_delit_goods&pid=$pid>"._DELPAGE. "</a> | <a href=admin/admin.php?op=shop_edit_goods&pid=$pid>"._EDITPAGE. "</a> | <a href=admin/admin.php?op=shop_status_goods&pid=$pid&act=off>". _OFFPAGE."</a></center><br>";
//CloseTable();//
}
$hresult = $db->sql_query("SELECT * FROM ".$prefix."_shop WHERE pid!='$goods[pid]' AND cid='$goods[cid]' ORDER BY pid DESC LIMIT 20");
if ($db->sql_numrows($hresult) != 0) {
echo "<br><center><font color=\"red\" size=\"5\"><b>"._SPCUNGL."</b></font></center><br>";
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
echo "<tr><td height=\"20\" style=\"border-bottom-style: solid; border-bottom-width: 1px\"><b>"._TENH."</b></td><td style=\"border-bottom-style: solid; border-bottom-width: 1px\" width=\"0%\"></td><td style=\"border-bottom-style: solid; border-bottom-width: 1px\" width=\"30%\">&nbsp;</td></tr>";
while ($hrow = $db->sql_fetchrow($hresult)) {
$gia = "".number_format($hrow[price], 0, '.', ' ')." ".$cur."";
if ($hrow[action] == 1) {
$gia = "".number_format($hrow[action_price], 0, '.', ' ')." ".$cur."";
}
echo"<tr><td height=\"20\" style=\"border-bottom-style: solid; border-bottom-width: 1px\"><a href=\"modules.php?name=Shop&go=goods&pid=$hrow[pid]\"><b>$hrow[title]</b></a></td><td style=\"border-bottom-style: solid; border-bottom-width: 1px\"></td><td style=\"border-bottom-style: solid; border-bottom-width: 1px\" align=\"right\"><a href=modules.php?name=$module_name&go=goods&pid=$h row[pid]><b>"._GOODSMORE."</b></td></tr>";
}
echo "</table><br>";
}
footmenu();
include("footer.php");
} else {
Header("Location: modules.php?name=$module_name"); exit();
}
}
My Website as http://lamchuyen.com/shopdemo/module...o=goods&pid=12
Their website: http://hanco.com.vn/Products_view.asp?tab=inox&id=251
I want to add images to related products like this: http://hanco.com.vn/Products_view.asp?tab=inox&id=251
Please help me. Thank You
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
nguaden is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to help me ! i down't know $cur
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15292 seconds with 12 queries