Title says all. Cant see webshop.
here is my webshop script:
Code:<? if ($_GET['expand'] == 1){ ?> <tr> <td width="917" colspan="5" height="26" style="background-image: url('images/subbar.png'); background-repeat: no-repeat; background-position: center top"> <p align="center"> <a href="index.php?do=myaccount&act=viewmyitems"> <img border="0" src="http://forum.ragezone.com/images/subbar/myitems.jpg" width="64" height="13"></a><a href="index.php?do=itemshop&sub=listallitems&expand=1&type=3&pagenum=1"><img border="0" src="http://forum.ragezone.com/images/subbar/listallitems.jpg" width="100" height="13"></a><a href="index.php?do=gift"><img border="0" src="http://forum.ragezone.com/images/subbar/giftcoin.jpg" width="52" height="13"></a></td> </tr> <? } if(!function_exists("ListAllItems")){ function ListAllItems(){ if(!isset($_GET['type'])){ $type = ""; }else{ $type = "Slot = '".antisql($_GET['type'])."' AND"; } if(($_GET['type']) == 10){ msgbox ("Press Ok to go to Change Character Name page","index.php?do=ccn"); } if ((!isset($_GET['pagenum'])) || (!is_numeric($_GET['pagenum'])) || ($_GET['pagenum'] < 1)) { $pagenum = 1; } else { $pagenum = $_GET['pagenum']; } $result = mssql_query ("SELECT * FROM CashShop WHERE ".$type." Opened = '1'") or die(mssql_error()); $rows = mssql_num_rows($result); $page_rows = 6; $last = ceil($rows/$page_rows); if (($pagenum > $last) && ($last > 0)) { $pagenum = $last; } $max = ($pagenum - 1) * $page_rows; $res = mssql_query("select top $page_rows * from CashShop WHERE ".$type." CSID not in (select top $max CSID from CashShop WHERE Slot = '".antisql($_GET['type'])."' order by CSID ASC) AND Opened = '1' order by CSID ASC"); echo "<p>"; echo " --Page $pagenum of $last-- <p>"; if ($pagenum == 1) { } else { echo " <a href='index.php?do=itemshop&sub=listallitems&expand=1&type={$_GET['type']}&pagenum=1'><font color=#FF0000>[First Page]</font></a> "; echo " "; $previous = $pagenum-1; echo " <a href='index.php?do=itemshop&sub=listallitems&expand=1&type={$_GET['type']}&pagenum=$previous'><font color=#00FF00>[Previous Page]</font></a> "; } echo " ----------- "; if ($pagenum == $last) { } else { $next = $pagenum+1; echo " <a href='index.php?do=itemshop&sub=listallitems&expand=1&type={$_GET['type']}&pagenum=$next'><font color=#00FF00>[Next Page]</font></a> "; echo " "; echo " <a href='index.php?do=itemshop&sub=listallitems&expand=1&type={$_GET['type']}&pagenum=$last'><font color=#FF0000>[Last Page]</font></a> "; } ?> <div align="center"> <table border="0" width="456" style="border-collapse: collapse"> <tr> <td background="http://forum.ragezone.com/images/cont_up.jpg"> </td> </tr> <tr> <td background="http://forum.ragezone.com/images/cont_bg.jpg"> <div align="center"> <table border="0" style="border-collapse: collapse" width="454" height="100%"> <tr> <td width="4" rowspan="11"> </td> <td width="440" colspan="2"> <img border="0" src="http://forum.ragezone.com/images/inf/listallitems.jpg"></td> <td width="30"> </td> </tr> <tr> <td width="12" colspan="2"></td> </tr> <tr> <td width="449" colspan="2"> <form name="itemtype"><select size="1" name="type" onchange="SwitchItem()"> <option value="0">Click here</option> <option value="1">Range Items</option> <option value="24">Male Hats #2</option> <option value="2">Female Hats #1</option> <option value="15">Female Hats #2</option> <option value="3">Male Coats/Jackets #1</option> <option value="16">Male Coats/Jackets #2</option> <option value="4">Female Coats/Jackets #1</option> <option value="17">Female Coats/Jackets #2</option> <option value="5">Male Gloves #1</option> <option value="18">Male Gloves #2</option> <option value="6">Female Gloves #1</option> <option value="19">Female Gloves #2</option> <option value="7">Male Trousers #1</option> <option value="20">Male Trousers #2</option> <option value="8">Female Trousers #1</option> <option value="21">Female Trousers #2</option> <option value="9">Male Boots #1</option> <option value="22">Male Boots #2</option> <option value="10">Female Boots #1</option> <option value="23">Female Boots #2</option> <option value="11">Elements</option> </select></form></td> </tr> <tr> <td width="449" colspan="2"> </td> </tr> <tr> <? while($item = mssql_fetch_assoc($res)) { if ($count == 2) { $count = 1; echo " </tr><tr> <td width='184'> </td> <td width='184'> </td> <td width='184'> </td> </tr><tr>"; ?> <td width="208"> <table border="0" style="border-collapse: collapse" width="102%" height="100%"> <tr> <td width="105" rowspan="8" valign="top"> <p align="center"> <img border="2" src="http://forum.ragezone.com/images/shop/ALL/item_coala.gif"></td> <td width="106" valign="top"> <font color="#FF9933">Coala</font></td> </tr> <tr> <td width="106" valign="top"><b><font color="#FF0000"><? switch ( $item['0'] ){ case "0"; $Sale = " "; break; case "1"; $Sale = "NOT FOR SALE"; break; } echo $Sale; ?> </font></b></td> </tr> <tr> <td width="106" valign="top"> Type: <? switch ( $item['3'] ){ case "1"; $slot = "Ranged"; break; case "9"; $slot = "Melee"; break; case "3"; $slot = "Armor"; break; case "4"; $slot = "Armor"; break; case "5"; $slot = "Armor"; break; case "6"; $slot = "Armor"; break; case "7"; $slot = "Armor"; break; case "8"; $slot = "Special"; break; } echo $slot; ?></td> </tr> <tr> <td width="106" valign="top"> Sex: <? switch ($item['1']){ case "0"; $sex = "Man"; break; case "1"; $sex = "Woman"; break; case "2"; $sex = "All"; break; } echo $sex; ?></td> </tr> <tr> <td width="106" valign="top"> Lv. Min: <?=$item['15']?></td> </tr> <tr> <td width="106" valign="top"> Coins: <?=$item['20']?></td> </tr> <tr> <td width="106"> <p align="center"> <a href="index.php?do=itemshop&sub=details&id=<?=$item['1']?>"><img border="0" src="http://forum.ragezone.com/images/buy_btn.jpg" width="47" height="19"></a></td> </tr> <tr> <td width="106"> </td> </tr> <tr> <td width="105"> </td> <td width="106"> </td> </tr> </table> </body> </html> </td> <? }else{ ?> <td width="208"> <table border="0" style="border-collapse: collapse" width="100%" height="100%"> <tr> <td width="105" rowspan="8" valign="top"> <p align="center"> <img border="2" src="http://forum.ragezone.com/images/shop/<?=$item['WebImgName']?>"></td> <td width="110" valign="top"> <font color="#FF9933"><?=$item['Name']?></font></td> </tr> <tr> <td width="110" valign="top"><b><font color="#FF0000"><? switch ( $item['ForSale'] ){ case "0"; $Sale = " "; break; case "1"; $Sale = "NOT FOR SALE"; break; } echo $Sale; ?></font></b></td> </tr> <tr> <td width="110" valign="top"> Type: <? switch ( $item['Slot'] ){ case "1"; $slot = "Ranged"; break; case "9"; $slot = "Melee"; break; case "3"; $slot = "Armor"; break; case "4"; $slot = "Armor"; break; case "5"; $slot = "Armor"; break; case "6"; $slot = "Armor"; break; case "7"; $slot = "Armor"; break; case "8"; $slot = "Special"; break; } echo $slot; ?></td> </tr> <tr> <td width="110" valign="top"> Sex: <? switch ($item['ResSex']){ case "0"; $sex = "Man"; break; case "1"; $sex = "Woman"; break; case "2"; $sex = "All"; break; } echo $sex; ?></td> </tr> <tr> <td width="110" valign="top"> Lv. Min: <?=$item['ResLevel']?></td> </tr> <tr> <td width="110" valign="top"> Coins: <?=$item['CashPrice']?></td> </tr> <tr> <td width="110"> <p align="center"> <a href="index.php?do=itemshop&sub=details&id=<?=$item['CSID']?>"><img border="0" src="http://forum.ragezone.com/images/buy_btn.jpg" width="47" height="19"></a></td> </tr> <tr> <td width="110"> </td> </tr> <tr> <td width="105"> </td> <td width="110"> </td> </tr> </table> </body> </html> </td> <? $count++; } } ?> <td width="30"> <p> </p> <p> </p> <p> </td> </tr> <tr> <td width="445" colspan="2"> </td> </tr> <tr> <td width="12" colspan="2"></td> </tr> </table> </div> </td> </tr> <tr> <td background="http://forum.ragezone.com/images/cont_top.jpg" height="27"> </td> </tr> </table> </div> <td width="206" valign="top"> <p><? include "modules/mod_iLogin.php" ?></p> <p> </p> <p> </td> <td width="12"> </td> <? } } //Items details if(!function_exists("ShowItemsDetails")){ function ShowItemsDetails(){ if($_GET['id'] == ""){ re_dir("index.php"); } $itemid = antisql($_GET['id']); $res = mssql_query("SELECT * FROM CashShop WHERE CSID = '$itemid'"); $item = mssql_fetch_assoc($res); if($item['ForSale'] > 0){ msgbox("You cant buy this","index.php?do=itemshop&sub=listallitems&expand=1&type=3"); die("You cant buy this"); } ?> <div align="center"> <table border="0" width="456" style="border-collapse: collapse"> <tr> <td background="http://forum.ragezone.com/images/cont_up.jpg"> </td> </tr> <tr> <td background="http://forum.ragezone.com/images/cont_bg.jpg"> <div align="center"> <table border="0" style="border-collapse: collapse" width="454" height="100%"> <tr> <td width="4" rowspan="7"> </td> <td width="429"> <img border="0" src="http://forum.ragezone.com/images/inf/itemdetails.jpg" width="413" height="18"></td> <td width="8"> </td> </tr> <tr> <td width="1"></td> </tr> <tr> <td width="438"> <table border="0" style="border-collapse: collapse" width="436" height="100%"> <tr> <td width="122" valign="top"> <table border="0" style="border-collapse: collapse" width="122"> <tr> <td width="11"> </td> <td width="91"> </td> <td width="14"> </td> </tr> <tr> <td width="11"> </td> <td width="91"> <img border="2" src="http://forum.ragezone.com/images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td> <td width="14"> </td> </tr> <tr> <td width="11"> </td> <td width="91"> </td> <td width="14"> </td> </tr> </table> </td> <td width="310" valign="top"> <table border="0" style="border-collapse: collapse" width="310" height="100%"> <tr> <td height="15" width="308" colspan="2"> </td> </tr> <tr> <td height="15" width="308" colspan="2"> <!-- //left item picture --> <!-- right item info box --> <div class="item_name"> <b> <span class="item_name"> <?=$item['Name']?></span></b></div> </td> </tr> <tr> <td width="55" height="15"><? switch ( $item['ForSale'] ){ case "0"; $Sale = "For Sale"; break; case "1"; $Sale = "NOT FOR SALE"; break; } echo $Sale; ?> </td> <td width="251" height="15"> </td> </tr> <tr> <td width="55"><b>Type:</b></td> <td width="251"><? switch ( $item['Slot'] ){ case "1"; $slot = "Ranged"; break; case "9"; $slot = "Melee"; break; case "3"; $slot = "Armor"; break; case "4"; $slot = "Armor"; break; case "5"; $slot = "Armor"; break; case "6"; $slot = "Armor"; break; case "7"; $slot = "Armor"; break; case "8"; $slot = "Special"; break; } echo $slot; ?></td> </tr> <tr> <td width="55"><b>Sex:</b></td> <td width="251"> <? switch ($item['ResSex']){ case "0"; $sex = "Man"; break; case "1"; $sex = "Woman"; break; case "2"; $sex = "All"; break; } echo $sex; ?></td> </tr> <tr> <td width="55"><b>Level:</b></td> <td width="251"><?=$item['ResLevel']?></td> </tr> <tr> <td width="55"> <b>Weight:</b></td> <td width="251"><?=$item['Weight']?></td> </tr> <tr> <td width="55"><b>Coins:</b></td> <td width="251"><?=$item['CashPrice']?> Premium Coins For 15 days</td> </tr> <tr> <td width="55"> </td> <td width="251"> </td> </tr> </table> </td> </tr> <tr> <td width="432" valign="top" colspan="2"> <div align="center"> <table border="0" style="border-collapse: collapse; background-image: url('images/iteminfo.jpg'); background-repeat: no-repeat; background-position: center top" width="422" height="110"> <tr> <td> <table border="0" style="border-collapse: collapse" width="420" height="100%"> <tr> <td width="130" height="27" colspan="4"> </td> <td width="146" height="27" colspan="3"> </td> <td width="128" height="27" colspan="3"> </td> </tr> <tr> <td width="7"> </td> <td width="75"> <b> Damage</b></td> <td width="44" align="right"> <?=$item['Damage']?></td> <td width="4" style="background-image: url('images/table_sep.jpg')"> </td> <td width="88"> <b>AP</b></td> <td width="48" align="right"> <?=$item['AP']?></td> <td width="4" style="background-image: url('images/table_sep.jpg')"> </td> <td width="67"> <b>FR</b></td> <td width="62" align="right"> <?=$item['FR']?></td> <td width="4"> </td> </tr> <tr> <td width="7"> </td> <td width="75"> <b>Delay</b></td> <td width="44" align="right"> <?=$item['Delay']?></td> <td width="4" style="background-image: url('images/table_sep.jpg')"> </td> <td width="88"> <b>HP</b></td> <td width="48" align="right"> <?=$item['HP']?></td> <td width="4" style="background-image: url('images/table_sep.jpg')"> </td> <td width="67"> <b>PR</b></td> <td width="62" align="right"> <?=$item['PR']?></td> <td width="4"> </td> </tr> <tr> <td width="7"> </td> <td width="75"> <b> Magazine</b></td> <td width="44" align="right"> <?=$item['Magazine']?></td> <td width="4" style="background-image: url('images/table_sep.jpg')"> </td> <td width="88"> <b>Max Weight</b></td> <td width="48" align="right"> <?=$item['MaxWeight']?></td> <td width="4" style="background-image: url('images/table_sep.jpg')"> </td> <td width="67"> <b>CR</b></td> <td width="62" align="right"> <?=$item['CR']?></td> <td width="4"> </td> </tr> <tr> <td width="7"> </td> <td width="75"> <b>Max Bullet</b></td> <td width="44" align="right"> <?=$item['MaxBullet']?></td> <td width="4" style="background-image: url('images/table_sep.jpg')"> </td> <td width="88"> <b> Reload Time</b></td> <td width="48" align="right"> <?=$item['ReloadTime']?></td> <td width="4" style="background-image: url('images/table_sep.jpg')"> </td> <td width="67"> <b>LR</b></td> <td width="62" align="right"> <?=$item['LR']?></td> <td width="4"> </td> </tr> <tr> <td width="7"> </td> <td width="75"> <b> Control</b></td> <td width="44" align="right"> <?=$item['Control']?></td> <td width="4" style="background-image: url('images/table_sep.jpg')"> </td> <td width="88"> <b> Duration</b></td> <td width="48" align="right"> <?=$item['Duration']?></td> <td width="4" style="background-image: url('images/table_sep.jpg')"> </td> <td width="67"> </td> <td width="62"> </td> <td width="4"> </td> </tr> <tr> <td width="7"> </td> <td width="75"> </td> <td width="51" colspan="2"> </td> <td width="88"> </td> <td width="54" colspan="2"> </td> <td width="67"> </td> <td width="68" colspan="2"> </td> </tr> </table> </td> </tr> </table> </div> </td> </tr> <tr> <td width="432" valign="top" colspan="2"> </td> </tr> <tr> <td width="432" valign="top" colspan="2"> <p align="center"> <b>Description :</b> <?=$item['Description']?> </td> <td width="68" colspan="2"> </td> </tr> <tr> <td width="432" valign="top" colspan="2"> </td> </tr> <tr> <td width="432" valign="top" colspan="2"> <p align="center"> <a href="index.php?do=itemshop&sub=buyitem&expand=1&itemid=<?=$item['CSID']?>"> <img border="0" src="http://forum.ragezone.com/images/buyitem.jpg" width="70" height="27"></a> <a href="index.php?do=gift"><img border="0" src="http://forum.ragezone.com/images/giftitem.jpg" width="70" height="27" "></a></td> </tr> <tr> <td width="432" valign="top" colspan="2"> </td> </tr> </table> </td> </tr> <tr> <td width="1"></td> </tr> </table> </div> </td> </tr> <tr> <td background="http://forum.ragezone.com/images/cont_top.jpg" height="27"> </td> </tr> </table> </div> <td width="206" valign="top"> <p><? include "modules/mod_iLogin.php" ?></p> <p> </p> <p> </td> <td width="12"> </td> <? } } if(!function_exists("ShowBuyItem")){ function ShowBuyItem(){ if($_SESSION['AID'] == ""){ re_dir("index.php?do=login"); } $item2 = antisql($_GET['itemid']); $res = mssql_query("SELECT * FROM CashShop WHERE CSID = '$item2'"); $item = mssql_fetch_assoc($res); //And another one. $res2 = mssql_query("SELECT euCoins FROM Login WHERE AID = '" . antisql($_SESSION['AID']) . "'"); $acc = mssql_fetch_assoc($res2); if(isset($_POST['submit'])){ $itemid = antisql($_POST['ItemID']); $res = mssql_query("SELECT * FROM CashShop WHERE CSID = '$itemid'"); $item = mssql_fetch_assoc($res); if($item['ForSale'] > 0){ msgbox("You cant buy this","index.php?do=itemshop&sub=listallitems&expand=1&type=3"); die("You cant buy this"); } //Oops? $res2 = mssql_query("SELECT euCoins FROM Login WHERE AID = '" . antisql($_SESSION['AID']) . "'"); $acc = mssql_fetch_assoc($res2); //Why create it here when you've used it without variable above? //Anyway. Antisql function applied. $aid = antisql($_SESSION['AID']); $updatecoins = $acc['euCoins'] - $item['CashPrice']; $zitemid = $item['zItemID']; if($updatecoins < 0){ die("GTFO"); } mssql_query("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [RentHourPeriod], [Cnt],[Quantity])VALUES('$itemid', '$aid', '$CSSID', GETDATE(), 168, 0,1)"); mssql_query("UPDATE CashShop SET Selled = Selled + 1 WHERE CSID = $itemid"); mssql_query("UPDATE Login SET euCoins = '$updatecoins' WHERE AID = '$aid'"); msgbox("Item purchased correctly, you will be introduced in Storage","index.php?do=itemshop&sub=listallitems&expand=1&type=3"); } ?> <div align="center"> <table border="0" width="456" style="border-collapse: collapse"> <tr> <td background="http://forum.ragezone.com/images/cont_up.jpg"> </td> </tr> <tr> <td background="http://forum.ragezone.com/images/cont_bg.jpg"> <div align="center"> <table border="0" style="border-collapse: collapse" width="454" height="100%"> <tr> <td width="4" rowspan="7"> </td> <td width="429"> <img border="0" src="http://forum.ragezone.com/images/inf/buyitem.jpg" width="414" height="19"></td> <td width="8"> </td> </tr> <tr> <td width="1"></td> </tr> <tr> <td width="438"> <table border="0" style="border-collapse: collapse" width="436" height="100%"> <tr> <td width="200" valign="top"> </td> <td width="8" valign="top"> </td> <td width="222" valign="top"> </td> </tr> <tr> <td width="200" valign="top"> <p align="right">Name of item</td> <td width="8" valign="top"> </td> <td width="222" valign="top"> <b><?=$item['Name']?></b></td> </tr> <tr> <td width="200" valign="top"> <p align="right">Bill Current</td> <td width="8" valign="top"> </td> <td width="222" valign="top"> <b><?=$_SESSION['UserID']?></b></td> </tr> <tr> <td width="200" valign="top"> <p align="right">Coins</td> <td width="8" valign="top"> </td> <td width="222" valign="top"> <b><?=$item['CashPrice']?> Coins </b></td> </tr> <tr> <td width="200" valign="top"> <p align="right">Premium Coins you have</td> <td width="8" valign="top"> </td> <td width="222" valign="top"> <b><?=$acc['euCoins']?> Coins </b></td> </tr> <tr> <td width="200" valign="top"> <p align="right">Premium Coins To you later</td> <td width="8" valign="top"> </td> <td width="222" valign="top"> <b><? $result = $acc['euCoins']-$item['CashPrice']; if($result < 0){ $boton = "<b>insufficient Premium Coins</b>"; }else{ $boton = "<input type='submit' value='Buy item' name='submit'>"; } echo $acc['euCoins']-$item['CashPrice'];?> Coins </b></td> </tr> <tr> <td width="200" valign="top"> </td> <td width="8" valign="top"> </td> <td width="222" valign="top"> </td> </tr> <tr> <td width="430" valign="top" colspan="3"> <p align="center"> <font color="#FF0000"><b> NOTE: If you buy an item and then do not want, or is mistaken, we are not responsible</b></font></td> </tr> <tr> <td width="200" valign="top"> </td> <td width="8" valign="top"> </td> <td width="222" valign="top"> </td> </tr> <tr> <td width="430" valign="top" colspan="3"> <form method="POST" action="index.php?do=itemshop&sub=buyitem"> <p align="center"> <?=$boton?> <input type="hidden" value="<?=$_GET['itemid']?>" name="ItemID"> </p> </form> </td> </tr> </table> </td> </tr> <tr> <td width="1"></td> </tr> </table> </div> </td> </tr> <tr> <td background="http://forum.ragezone.com/images/cont_top.jpg" height="27"> </td> </tr> </table> </div> <td width="206" valign="top"> <p><? include "modules/mod_iLogin.php" ?></p> <p> </p> <p> </td> <td width="12"> </td> <? } } if($_GET['expand'] == 0){ switch($_GET['sub']){ case "listallitems"; ListAllItems(); break; case "details"; ShowItemsDetails(); break; case "buyitem"; ShowBuyItem(); break; } } ?>


Reply With Quote![Cant see webshop [PHP]!](http://ragezone.com/hyper728.png)


