Event/Donator Page

Results 1 to 21 of 21
  1. #1
    Banned Flavinho153 is offline
    BannedRank
    Dec 2008 Join Date
    182Posts

    Event/Donator Page

    Type in the Web site has MPOG Pages donator items or items of event ... pq ñ give just to put more than 6 items there ...

    First image taken by the System Gunz. There are great programmers. I wanted to create another page donator.
    Does anyone know?

    ---------- Post added at 11:26 AM ---------- Previous post was at 11:24 AM ----------

    My RZItemShop Is :

    <?
    if ($_SESSION['AID'] == ""){
    re_dir("index.php?do=login");
    }
    ?>
    <?
    if ($_GET['expand'] == 1){
    ?>
    <? }





    if(!function_exists("ListAllItems")){
    function ListAllItems(){
    if(!isset($_GET['type'])){
    $type = "";
    }else{
    $type = "Slot = '".clean($_GET['type'])."' AND";
    }

    $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE ".$type." Opened = '1'");

    ?>
    <div align="center">
    <table border="0" width="456" style="border-collapse: collapse">
    <tr>
    <td background="images/cont_up.jpg">&nbsp;</td>
    </tr>
    <tr>
    <td background="images/cont_bg.jpg">
    <div align="center">
    <table border="0" style="border-collapse: collapse" width="454" height="100%">
    <tr>
    <td width="4" rowspan="11">&nbsp;</td>
    <td width="440" colspan="2">
    <img border="0" src="images/inf/shop.png"></td>
    <td width="30">&nbsp;</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()">
    <optgroup label="">
    <option>Selecione uma Categoria</option>
    <option value="6">Espadas</option>
    <option value="1">Armas Curtas</option>
    <option value="2">Armas Longas</option>
    <option value="3">Equipamento</option>
    <option value="4">Roupa Completa</option>
    <option value="5">Item Especial</option>
    </optgroup></select></form></td>
    </tr>

    <tr>
    <td width="449" colspan="2">
    &nbsp;</td>
    </tr>

    <tr>
    <?
    while($item = mssql_fetch_assoc($res)) {
    if ($count == 2) {
    $count = 1;
    echo "
    </tr><tr>
    <td width='184'>&nbsp;</td>
    <td width='184'>&nbsp;</td>
    <td width='184'>&nbsp;</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="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
    <td width="106" valign="top">
    <font color="#FF00FF"><?=$item['Name']?></font></td>
    </tr>
    <tr>
    <td width="106" valign="top">&nbsp;</td>
    </tr>
    <tr>
    <td width="106" valign="top">
    Type: <?
    switch ( $item['Slot'] ){
    case "1";
    $slot = "Melee";
    break;
    case "2";
    $slot = "Ranged";
    break;
    case "3";
    $slot = "Armor";
    break;
    case "4";
    $slot = "Set";
    break;
    case "5";
    $slot = "Special";
    break;
    } echo $slot;

    ?></td>
    </tr>
    <tr>
    <td width="106" 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="106" valign="top">
    Lv. Min: <?=$item['ResLevel']?></td>
    </tr>
    <tr>
    <td width="106" valign="top">
    Price: <?=$item['CashPrice']?></td>
    </tr>
    <tr>
    <td width="106">
    <p align="center">
    <a href="index.php?do=rzitemshop&sub=details&id=<?=$item['CSID']?>"><img border="0" src="images/buy_btn.jpg" width="50" height="20"></a></td>
    </tr>
    <tr>
    <td width="106">&nbsp;</td>
    </tr>
    <tr>
    <td width="105">&nbsp;</td>
    <td width="106">&nbsp;</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="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
    <td width="110" valign="top">
    <font color="#FF00FF"><?=$item['Name']?></font></td>
    </tr>
    <tr>
    <td width="110" valign="top">&nbsp;</td>
    </tr>
    <tr>
    <td width="110" valign="top">
    Type: <?
    switch ( $item['Slot'] ){
    case "1";
    $slot = "Melee";
    break;
    case "2";
    $slot = "Ranged";
    break;
    case "3";
    $slot = "Armor";
    break;
    case "4";
    $slot = "Set";
    break;
    case "5";
    $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">
    Price: <?=$item['CashPrice']?></td>
    </tr>
    <tr>
    <td width="110">
    <p align="center">
    <a href="index.php?do=rzitemshop&sub=details&id=<?=$item['CSID']?>"><img border="0" src="images/buy_btn.jpg" width="50" height="20"></a></td>
    </tr>
    <tr>
    <td width="110">&nbsp;</td>
    </tr>
    <tr>
    <td width="105">&nbsp;</td>
    <td width="110">&nbsp;</td>
    </tr>
    </table>

    </body>

    </html>
    </td> <?
    $count++;
    }
    } ?>
    <td width="30">
    &nbsp;<p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</td>
    </tr>

    <tr>
    <td width="445" colspan="2">&nbsp;</td>
    </tr>

    <tr>
    <td width="12" colspan="2"></td>
    </tr>
    </table>
    </div>
    </td>
    </tr>
    <tr>
    <td background="images/cont_top.jpg" height="27">&nbsp;</td>
    </tr>
    </table>
    </div>
    <?
    } }



    //Items details




    if(!function_exists("ShowItemsDetails")){
    function ShowItemsDetails(){
    if($_GET['id'] == ""){
    re_dir("index.php");
    }
    $itemid = clean($_GET['id']);
    $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
    $item = mssql_fetch_assoc($res);
    ?>
    <div align="center">
    <table border="0" width="456" style="border-collapse: collapse">
    <tr>
    <td background="images/cont_up.jpg">&nbsp;</td>
    </tr>
    <tr>
    <td background="images/cont_bg.jpg">
    <div align="center">
    <table border="0" style="border-collapse: collapse" width="454" height="100%">
    <tr>
    <td width="4" rowspan="7">&nbsp;</td>
    <td width="429">
    <img border="0" src="images/inf/itemdetails.png" width="413" height="18"></td>
    <td width="8">&nbsp;</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">&nbsp;</td>
    <td width="91">&nbsp;</td>
    <td width="14">&nbsp;</td>
    </tr>
    <tr>
    <td width="11">&nbsp;</td>
    <td width="91">
    <img border="2" src="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
    <td width="14">&nbsp;</td>
    </tr>
    <tr>
    <td width="11">&nbsp;</td>
    <td width="91">&nbsp;</td>
    <td width="14">&nbsp;</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">
    <font color="#FF00FF"><?=$item['Name']?></fonts></span></b></div>
    <br><font color="#FFFFFF"><?=$item['Description']?></fonts>
    </td>
    </tr>
    <tr>
    <td width="55" height="15">
    </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 = "Melee";
    break;
    case "2";
    $slot = "Ranged";
    break;
    case "3";
    $slot = "Armor";
    break;
    case "4";
    $slot = "Set";
    break;
    case "5";
    $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>Price:</b></td>
    <td width="251"><?=$item['CashPrice']?></td>
    </tr>
    <tr>
    <td width="55">&nbsp;</td>
    <td width="251">&nbsp;</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">&nbsp;</td>
    <td width="146" height="27" colspan="3">&nbsp;</td>
    <td width="128" height="27" colspan="3">&nbsp;</td>
    </tr>
    <tr>
    <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
    <td width="67">
    <b>FR</b></td>
    <td width="62" align="right">
    <?=$item['FR']?></td>
    <td width="4">&nbsp;</td>
    </tr>
    <tr>
    <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
    <td width="67">
    <b>PR</b></td>
    <td width="62" align="right">
    <?=$item['PR']?></td>
    <td width="4">&nbsp;</td>
    </tr>
    <tr>
    <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
    <td width="67">
    <b>CR</b></td>
    <td width="62" align="right">
    <?=$item['CR']?></td>
    <td width="4">&nbsp;</td>
    </tr>
    <tr>
    <td width="7">&nbsp;</td>
    <td width="75">
    <b>Reload
    Time</b></td>
    <td width="44" align="right">
    <?=$item['ReloadTime']?></td>
    <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
    <td width="88">
    <b>
    Control</b></td>
    <td width="48" align="right">
    <?=$item['Control']?></td>
    <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
    <td width="67">
    <b>LR</b></td>
    <td width="62" align="right">
    <?=$item['LR']?></td>
    <td width="4">&nbsp;</td>
    </tr>
    <tr>
    <td width="4">&nbsp;</td>
    <td width="88">
    <b>Max
    Bullet</b></td>
    <td width="44" align="right">
    <?=$item['MaxBullet']?></td>
    <td width="7" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
    <td width="75">
    <b>
    Duration</b></td>
    <td width="48" align="right">
    Unlimited</td>
    <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
    <td width="67">&nbsp;</td>
    <td width="62">&nbsp;</td>
    <td width="4">&nbsp;</td>
    </tr>
    <tr>
    <td width="7">&nbsp;</td>
    <td width="75">&nbsp;</td>
    <td width="51" colspan="2">&nbsp;</td>
    <td width="88">&nbsp;</td>
    <td width="54" colspan="2">&nbsp;</td>
    <td width="67">&nbsp;</td>
    <td width="68" colspan="2">&nbsp;</td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </div>
    </td>
    </tr>
    <tr>
    <td width="432" valign="top" colspan="2">&nbsp;</td>
    </tr>
    <tr>
    <td width="432" valign="top" colspan="2">
    <p align="center">
    <a href="index.php?do=rzitemshop&sub=buyitem&expand=1&itemid=<?=$item['CSID']?>">
    <img border="0" src="images/buyitem.jpg" width="50" height="20"></a>&nbsp;
    <a href="index.php?do=rzitemshop&sub=giftitem&expand=1&itemid=<?=$item['CSID']?>">
    <img border="0" src="images/giftitem.jpg" width="50" height="20"></a></td>
    </tr>
    <tr>
    <td width="432" valign="top" colspan="2">&nbsp;</td>
    </tr>
    </table>
    </td>
    </tr>

    <tr>
    <td width="1"></td>
    </tr>
    </table>
    </div>
    </td>
    </tr>
    <tr>
    <td background="images/cont_top.jpg" height="27">&nbsp;</td>
    </tr>
    </table>
    </div>
    <?

    } }


    if(!function_exists("ShowBuyItem")){
    function ShowBuyItem(){
    if($_SESSION['AID'] == ""){
    re_dir("index.php?do=login");
    }
    $item2 = clean($_GET['itemid']);
    $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
    $item = mssql_fetch_assoc($res);
    $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
    $acc = mssql_fetch_assoc($res2);
    if(isset($_POST['submit'])){
    $itemid = clean($_POST['ItemID']);
    $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
    $item = mssql_fetch_assoc($res);
    $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
    $acc = mssql_fetch_assoc($res2);
    $aid = $_SESSION['AID'];
    $updatecoins = $acc['RZCoins'] - $item['CashPrice'];
    $zitemid = $item['ItemID'];
    if($updatecoins < 0){
    die("No Bug here :) CoDeD By LaMbDa FrOm SpAiN!!! :)");
    }
    mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$aid', '$zitemid', GETDATE(), 0)");
    mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
    msgbox("Item purchased correctly, you can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
    }
    ?>
    <div align="center">
    <table border="0" width="456" style="border-collapse: collapse">
    <tr>
    <td background="images/cont_up.jpg">&nbsp;</td>
    </tr>
    <tr>
    <td background="images/cont_bg.jpg">
    <div align="center">
    <table border="0" style="border-collapse: collapse" width="454" height="100%">
    <tr>
    <td width="4" rowspan="7">&nbsp;</td>
    <td width="429">
    <img border="0" src="images/inf/buyitem.png" width="414" height="19"></td>
    <td width="8">&nbsp;</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">&nbsp;</td>
    <td width="8" valign="top">&nbsp;</td>
    <td width="222" valign="top">&nbsp;</td>
    </tr>
    <tr>
    <td width="200" valign="top">
    <p align="right">Name of
    item</td>
    <td width="8" valign="top">&nbsp;</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">&nbsp;</td>
    <td width="222" valign="top">
    <b><?=$_SESSION['UserID']?></b></td>
    </tr>
    <tr>
    <td width="200" valign="top">
    <p align="right">Price</td>
    <td width="8" valign="top">&nbsp;</td>
    <td width="222" valign="top">
    <b><?=$item['CashPrice']?></b></td>
    </tr>
    <tr>
    <td width="200" valign="top">
    <p align="right">RZ Coins
    you have</td>
    <td width="8" valign="top">&nbsp;</td>
    <td width="222" valign="top">
    <b><?=$acc['RZCoins']?></b></td>
    </tr>
    <tr>
    <td width="200" valign="top">
    <p align="right">RZ Coins
    To you later</td>
    <td width="8" valign="top">&nbsp;</td>
    <td width="222" valign="top">
    <b><?
    $result = $acc['RZCoins']-$item['CashPrice'];
    if($result < 0){
    $boton = "<b>RZ Coins insufficient</b>";
    }else{
    $boton = "<input type='submit' value='Buy item' name='submit'>";
    }

    echo $acc['RZCoins']-$item['CashPrice'];?> </b></td>
    </tr>
    <tr>
    <td width="200" valign="top">&nbsp;</td>
    <td width="8" valign="top">&nbsp;</td>
    <td width="222" valign="top">&nbsp;</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">&nbsp;</td>
    <td width="8" valign="top">&nbsp;</td>
    <td width="222" valign="top">&nbsp;</td>
    </tr>
    <tr>
    <td width="430" valign="top" colspan="3">
    <form method="POST" action="index.php?do=rzitemshop&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="images/cont_top.jpg" height="27">&nbsp;</td>
    </tr>
    </table>
    </div>

    <?

    } }
    if(!function_exists("ShowGiftItem")){
    function ShowgiftItem(){
    if($_SESSION['AID'] == ""){
    re_dir("index.php?do=login");
    }
    $item2 = clean($_GET['itemid']);
    $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
    $item = mssql_fetch_assoc($res);
    $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
    $acc = mssql_fetch_assoc($res2);

    if (isset($_POST['submit'])){
    $type = clean($_POST['type']);
    $id = clean($_POST['id']);
    $reason = clean($_POST['reason']);
    $custom = clean($_POST['cstom']);
    $itemid = clean($_POST['ItemID']);
    $item2 = clean($_GET['itemid']);
    //--
    if($reason == 1){
    $reason = $custom;
    $custom = str_replace("
    ","</br>",$custom);
    }
    //--
    if ($type == 1){
    $res = mssql_query_logged("SELECT * FROM Account WHERE UserID = '$id'");
    if(mssql_num_rows($res) == 0){
    msgbox("UserID $id doesnt exist","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
    }else{
    $data = mssql_fetch_assoc($res);
    $userID = $data['UserID'];
    $UserAID = $data['AID'];
    $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
    $item = mssql_fetch_assoc($res);
    $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
    $acc = mssql_fetch_assoc($res2);
    $aid = $_SESSION['AID'];
    $updatecoins = $acc['RZCoins'] - $item['CashPrice'];
    $zitemid = $item['ItemID'];
    if($updatecoins < 0){
    die("No Bug here :) CoDeD By NoLiFe_X!!! :)");
    }
    mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$UserAID', '$zitemid', GETDATE(), 0)");
    mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
    msgbox("Item purchased and gifted correctly, your friend can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
    }
    }else{
    $res = mssql_query_logged("SELECT * FROM Character WHERE Name = '$id'");
    if(mssql_num_rows($res) == 0){
    msgbox("The character $id doesnt exist","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
    }else{
    $res = mssql_query_logged("SELECT * FROM Character WHERE Name = '$id'");
    $data = mssql_fetch_assoc($res);
    $UserAID = $data['AID'];
    $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
    $item = mssql_fetch_assoc($res);
    $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
    $acc = mssql_fetch_assoc($res2);
    $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
    $item = mssql_fetch_assoc($res);
    $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
    $acc = mssql_fetch_assoc($res2);
    $aid = $_SESSION['AID'];
    $updatecoins = $acc['RZCoins'] - $item['CashPrice'];
    $zitemid = $item['ItemID'];
    if($updatecoins < 0){
    die("No Bug here :) CoDeD By NoLiFe_X!!! :)");
    }

    mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$UserAID', '$zitemid', GETDATE(), 0)");
    mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
    msgbox("Item purchased and gifted correctly, your friend can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
    }
    }

    }


    ?>
    <head>
    <meta http-equiv="Content-Language" content="es">
    <link rel="stylesheet" type="text/css" href="images/style.css">
    </head>


    <body bgcolor="#312F30">

    <div align="center">
    <table border="0" width="456" style="border-collapse: collapse">
    <tr>
    <td background="images/cont_up.jpg">&nbsp;</td>
    </tr>
    <tr>
    <td background="images/cont_bg.jpg">
    <div align="center">
    <table border="0" style="border-collapse: collapse" width="454" height="100%">
    <tr>
    <td width="4" rowspan="7">&nbsp;</td>
    <td width="429">
    <img border="0" src="images/inf/gift3.png" width="414" height="19"></td>
    <td width="8">&nbsp;</td>
    </tr>

    <tr>
    <td width="1"></td>
    </tr>

    <tr>
    <td width="438">
    <form name="gift" method="POST" action=""> <table border="0" style="border-collapse: collapse" width="436" height="100%">
    <tr>
    <td width="200" valign="top">&nbsp;</td>
    <td width="8" valign="top">&nbsp;</td>
    <td width="222" valign="top">&nbsp;</td>
    </tr>
    <tr>
    <td width="200" valign="top">
    <p align="right">Name of
    item</td>
    <td width="8" valign="top">&nbsp;</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">&nbsp;</td>
    <td width="222" valign="top">
    <b><?=$_SESSION['UserID']?></b></td>
    </tr>
    <tr>
    <td width="149">
    <p align="right">
    <select size="1" name="type">
    <option selected value="1">Gifting User ID
    </option>
    <option value="2">Gifting Character Name
    </option>
    </select></td>
    <td width="4">
    &nbsp;</td>
    <td width="279">
    <input type="text" name="id" size="26">&nbsp;
    </td>
    </tr>
    <tr>
    <td width="200" valign="top">
    <p align="right">Price</td>
    <td width="8" valign="top">&nbsp;</td>
    <td width="222" valign="top">
    <b><?=$item['CashPrice']?></b></td>
    </tr>
    <tr>
    <td width="200" valign="top">
    <p align="right">RZ Coins
    you have</td>
    <td width="8" valign="top">&nbsp;</td>
    <td width="222" valign="top">
    <b><?=$acc['RZCoins']?></b></td>
    </tr>
    <tr>
    <td width="200" valign="top">
    <p align="right">RZ Coins
    To you later</td>
    <td width="8" valign="top">&nbsp;</td>
    <td width="222" valign="top">
    <b><?
    $result = $acc['RZCoins']-$item['CashPrice'];
    if($result < 0){
    $boton = "<b>RZ Coins insufficient</b>";
    }else{
    $boton = "<input type='submit' value='Gift Item' name='submit'>";
    }

    echo $acc['RZCoins']-$item['CashPrice'];?> </b></td>
    </tr>
    <tr>
    <td width="200" valign="top">&nbsp;</td>
    <td width="8" valign="top">&nbsp;</td>
    <td width="222" valign="top">&nbsp;</td>
    </tr>
    <tr>
    <td width="430" valign="top" colspan="3">
    <p align="center">
    <font color="#FF0000"><b>
    NOTE: If you gift an item and then do not want, or is mistaken, we are not responsible</b></font></td>
    </tr>
    <tr>
    <td width="200" valign="top">&nbsp;</td>
    <td width="8" valign="top">&nbsp;</td>
    <td width="222" valign="top">&nbsp;</td>
    </tr>
    <tr>
    <td width="430" valign="top" colspan="3">
    <form method="POST" action="index.php?do=rzitemshop&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="images/cont_top.jpg" height="27">&nbsp;</td>
    </tr>
    </table>
    </div>


    <?
    }
    }


    if($_GET['expand'] == 0){

    switch($_GET['sub']){
    case "listallitems";
    ListAllItems();
    break;
    case "details";
    ShowItemsDetails();
    break;
    case "buyitem";
    ShowBuyItem();
    break;
    case "giftitem";
    ShowGiftItem();
    break;
    }
    }





    ?>


  2. #2
    Account Upgraded | Title Enabled! alfredao is offline
    MemberRank
    Jan 2008 Join Date
    Coronel FabriciLocation
    705Posts

    Re: Event/Donator Page

    Here is my paginator script, now, DIY.

    PHP Code:
    <?

    $num_por_pagina 
    8
    $pagina $_GET["pagina"]; 

    if(!
    $pagina)
    {
        
    $pagina 1;
    }

    $primeiro_registro = ($pagina*$num_por_pagina) - $num_por_pagina;
    if (
    $pagina == 1)
    {
        
    $res mssql_query("SELECT TOP $num_por_pagina * FROM ShopCash WHERE ID > $primeiro_registro-1 AND Opened = 1 ORDER BY ID ASC");
    }
    else
    {
        
    $res mssql_query("SELECT TOP $num_por_pagina * FROM ShopCash WHERE ID >= $primeiro_registro AND Opened = 1 ORDER BY ID ASC");
    }

    $consulta mssql_query("SELECT COUNT(*) FROM ShopCash");
    list(
    $total_usuarios) = mssql_fetch_array($consulta);

    $total_paginas $total_usuarios/$num_por_pagina;

    $prev $pagina 1;
    $next $pagina 1;

    if (
    $pagina 1
    {
        
    $prev_link "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$prev\"><b>&laquo; Anterior</b></a></span>";
    }


    if (
    $total_paginas $pagina
    {
        
    $next_link "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$next\"><b>Próxima &raquo;</b></span>";
    }


    $total_paginas ceil($total_paginas);
    $painel "";
    for (
    $x=1$x<=$total_paginas$x++) 
    {
        if (
    $x==$pagina
        { 
            
    $painel .= " <span class=\"pagecurrent\"><b>$x</b></span>";
        }
        else
        {
            
    $painel .= " <span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$x\">$x</a></span>";
        }
    }
    ?>

  3. #3
      Phoenix is offline
    ModeratorRank
    Mar 2009 Join Date
    6,890Posts
    Quote Originally Posted by alfredao View Post
    Here is my paginator script, now, DIY.

    PHP Code:
    <?

    $num_por_pagina 
    8
    $pagina $_GET["pagina"]; 

    if(!
    $pagina)
    {
        
    $pagina 1;
    }

    $primeiro_registro = ($pagina*$num_por_pagina) - $num_por_pagina;
    if (
    $pagina == 1)
    {
        
    $res mssql_query("SELECT TOP $num_por_pagina * FROM ShopCash WHERE ID > $primeiro_registro-1 AND Opened = 1 ORDER BY ID ASC");
    }
    else
    {
        
    $res mssql_query("SELECT TOP $num_por_pagina * FROM ShopCash WHERE ID >= $primeiro_registro AND Opened = 1 ORDER BY ID ASC");
    }

    $consulta mssql_query("SELECT COUNT(*) FROM ShopCash");
    list(
    $total_usuarios) = mssql_fetch_array($consulta);

    $total_paginas $total_usuarios/$num_por_pagina;

    $prev $pagina 1;
    $next $pagina 1;

    if (
    $pagina 1
    {
        
    $prev_link "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$prev\"><b>&laquo; Anterior</b></a></span>";
    }


    if (
    $total_paginas $pagina
    {
        
    $next_link "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$next\"><b>Próxima &raquo;</b></span>";
    }


    $total_paginas ceil($total_paginas);
    $painel "";
    for (
    $x=1$x<=$total_paginas$x++) 
    {
        if (
    $x==$pagina
        { 
            
    $painel .= " <span class=\"pagecurrent\"><b>$x</b></span>";
        }
        else
        {
            
    $painel .= " <span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$x\">$x</a></span>";
        }
    }
    ?>
    How can this be used with the item shop page? I mean how do we integrate it?
    Posted via Mobile Device

  4. #4

    Re: Event/Donator Page

    Quote Originally Posted by phoenix_147 View Post
    How can this be used with the item shop page? I mean how do we integrate it?
    Posted via Mobile Device
    It's a D-I-Y code.

  5. #5
      Phoenix is offline
    ModeratorRank
    Mar 2009 Join Date
    6,890Posts

    Re: Event/Donator Page

    Quote Originally Posted by Linear88 View Post
    It's a D-I-Y code.
    I'm sorry I don't know but, What is that supposed to mean? How can it be used?

  6. #6
    Account Upgraded | Title Enabled! alfredao is offline
    MemberRank
    Jan 2008 Join Date
    Coronel FabriciLocation
    705Posts

    Re: Event/Donator Page

    In Flavinho153's page, you will need to change

    PHP Code:
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE ".$type." Opened = '1'"); 
    To my Script.

  7. #7
    Banned Flavinho153 is offline
    BannedRank
    Dec 2008 Join Date
    182Posts

    Re: Event/Donator Page

    Quote Originally Posted by alfredao View Post
    In Flavinho153's page, you will need to change

    PHP Code:
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE ".$type." Opened = '1'"); 
    To my Script.
    Change to...>>
    alfredao > GM system gunz D: ?
    can you give me the page plz?
    Last edited by Flavinho153; 30-11-09 at 07:42 PM.

  8. #8
    Account Upgraded | Title Enabled! alfredao is offline
    MemberRank
    Jan 2008 Join Date
    Coronel FabriciLocation
    705Posts

    Re: Event/Donator Page

    Quote Originally Posted by Flavinho153 View Post
    Change to...>>
    alfredao > GM system gunz D: ?
    can you give me the page plz?
    Yes and I posted the script, now put in your page.

    To show the pages, put

    PHP Code:
    <? echo $painel?>
    Where you want to see the links.
    Last edited by alfredao; 30-11-09 at 08:18 PM.

  9. #9
    Banned Flavinho153 is offline
    BannedRank
    Dec 2008 Join Date
    182Posts

    Re: Event/Donator Page

    Code:
       <?
    
    $num_por_pagina = 8; 
    $pagina = $_GET["pagina"]; 
    
    if(!$pagina)
    {
        $pagina = 1;
    }
    
    $primeiro_registro = ($pagina*$num_por_pagina) - $num_por_pagina;
    if ($pagina == 1)
    {
        $res = mssql_query("SELECT TOP $num_por_pagina * FROM RZCashshop WHERE ID > $primeiro_registro-1 AND Opened = '1' ORDER BY ID ASC");
    }
    else
    {
        $res = mssql_query("SELECT TOP $num_por_pagina * FROM RZCashshop WHERE ID >= $primeiro_registro AND Opened = '1' ORDER BY ID ASC");
    }
    
    $consulta = mssql_query("SELECT COUNT(*) FROM RZCashShop");
    list($total_usuarios) = mssql_fetch_array($consulta);
    
    $total_paginas = $total_usuarios/$num_por_pagina;
    
    $prev = $pagina - 1;
    $next = $pagina + 1;
    
    if ($pagina > 1) 
    {
        $prev_link = "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$prev\"><b>&laquo; Anterior</b></a></span>";
    }
    
    
    if ($total_paginas > $pagina) 
    {
        $next_link = "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$next\"><b>Próxima &raquo;</b></span>";
    }
    
    
    $total_paginas = ceil($total_paginas);
    $painel = "";
    for ($x=1; $x<=$total_paginas; $x++) 
    {
        if ($x==$pagina) 
        { 
            $painel .= " <span class=\"pagecurrent\"><b>$x</b></span>";
        }
        else
        {
            $painel .= " <span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$x\">$x</a></span>";
        }
    }
    ?> 
    <?
    if ($_SESSION['AID'] == ""){
        re_dir("index.php?do=login");
    }
    ?>
    <?
    if ($_GET['expand'] == 1){
    ?>
    <? }
    
    
    
    
    
    if(!function_exists("ListAllItems")){
    function ListAllItems(){
        if(!isset($_GET['type'])){
            $type = "";
        }else{
            $type = "Slot = '".clean($_GET['type'])."' AND";
        }
    
        $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE ".$type." Opened = '1'");
    
        ?>
        <div align="center">
    						<table border="0" width="456" style="border-collapse: collapse">
    							<tr>
    								<td background="images/cont_up.jpg">&nbsp;</td>
    							</tr>
    							<tr>
    								<td background="images/cont_bg.jpg">
    								<div align="center">
    									<table border="0" style="border-collapse: collapse" width="454" height="100%">
    										<tr>
    											<td width="4" rowspan="11">&nbsp;</td>
    											<td width="440" colspan="2">
    											<img border="0" src="images/inf/shop.png"></td>
    											<td width="30">&nbsp;</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()">
    											<optgroup label="">
    											<option>Selecione uma Categoria</option>
    											<option value="6">Espadas</option>
    											<option value="1">Armas Curtas</option>
    											<option value="2">Armas Longas</option>
    											<option value="3">Equipamento</option>
    											<option value="4">Roupa Completa</option>
    											<option value="5">Item Especial</option>
    											</optgroup></select></form></td>
    										</tr>
    
    										<tr>
    											<td width="449" colspan="2">
    											&nbsp;</td>
    										</tr>
    
    										<tr>
                                                                                    <?
                                            while($item = mssql_fetch_assoc($res)) {
                                                if ($count == 2) {
                                                    $count = 1;
                                                    echo "
                                                        </tr><tr>
    												        <td width='184'>&nbsp;</td>
    												        <td width='184'>&nbsp;</td>
    												        <td width='184'>&nbsp;</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="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
    													<td width="106" valign="top">
    													<font color="#FF00FF"><?=$item['Name']?></font></td>
    												</tr>
    												<tr>
    													<td width="106" valign="top">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="106" valign="top">
    													Type: <?
                                                        switch ( $item['Slot'] ){
                                                            case "1";
                                                            $slot = "Melee";
                                                            break;
                                                            case "2";
                                                            $slot = "Ranged";
                                                            break;
                                                            case "3";
                                                            $slot = "Armor";
                                                            break;
                                                            case "4";
                                                            $slot = "Set";
                                                            break;
                                                            case "5";
                                                            $slot = "Special";
                                                            break;
                                                        } echo $slot;
    
                                                            ?></td>
    												</tr>
    												<tr>
    													<td width="106" 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="106" valign="top">
    													Lv. Min: <?=$item['ResLevel']?></td>
    												</tr>
    												<tr>
    													<td width="106" valign="top">
    													Price: <?=$item['CashPrice']?></td>
    												</tr>
    												<tr>
    													<td width="106">
    													<p align="center">
    													<a href="index.php?do=rzitemshop&sub=details&id=<?=$item['CSID']?>"><img border="0" src="images/buy_btn.jpg" width="50" height="20"></a></td>
    												</tr>
    												<tr>
    													<td width="106">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="105">&nbsp;</td>
    													<td width="106">&nbsp;</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="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
    													<td width="110" valign="top">
    													<font color="#FF00FF"><?=$item['Name']?></font></td>
    												</tr>
    												<tr>
    													<td width="110" valign="top">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="110" valign="top">
    													Type: <?
                                                        switch ( $item['Slot'] ){
                                                            case "1";
                                                            $slot = "Melee";
                                                            break;
                                                            case "2";
                                                            $slot = "Ranged";
                                                            break;
                                                            case "3";
                                                            $slot = "Armor";
                                                            break;
                                                            case "4";
                                                            $slot = "Set";
                                                            break;
                                                            case "5";
                                                            $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">
    													Price: <?=$item['CashPrice']?></td>
    												</tr>
    												<tr>
    													<td width="110">
    													<p align="center">
    													<a href="index.php?do=rzitemshop&sub=details&id=<?=$item['CSID']?>"><img border="0" src="images/buy_btn.jpg" width="50" height="20"></a></td>
    												</tr>
    												<tr>
    													<td width="110">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="105">&nbsp;</td>
    													<td width="110">&nbsp;</td>
    												</tr>
    											</table>
    
    </body>
    
    </html>
    </td>                                                <?
                                                     $count++;
                                                }
                                            }   ?>
    											<td width="30">
    											&nbsp;<p>&nbsp;</p>
    											<p>&nbsp;</p>
    											<p>&nbsp;</td>
    										</tr>
    
    										<tr>
    											<td width="445" colspan="2">&nbsp;</td>
    										</tr>
    
    										<tr>
    											<td width="12" colspan="2"></td>
    										</tr>
    										</table>
    								</div>
    								</td>
    							</tr>
    							<tr>
    								<td background="images/cont_top.jpg" height="27">&nbsp;</td>
    							</tr>
    						</table>
    					</div>
        <?
        }  }
    
    
    
    //Items details
    
    
    
    
    if(!function_exists("ShowItemsDetails")){
        function ShowItemsDetails(){
        if($_GET['id'] == ""){
            re_dir("index.php");
        }
        $itemid = clean($_GET['id']);
        $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
        $item = mssql_fetch_assoc($res);
        ?>
        					<div align="center">
    						<table border="0" width="456" style="border-collapse: collapse">
    							<tr>
    								<td background="images/cont_up.jpg">&nbsp;</td>
    							</tr>
    							<tr>
    								<td background="images/cont_bg.jpg">
    								<div align="center">
    									<table border="0" style="border-collapse: collapse" width="454" height="100%">
    										<tr>
    											<td width="4" rowspan="7">&nbsp;</td>
    											<td width="429">
    											<img border="0" src="images/inf/itemdetails.png" width="413" height="18"></td>
    											<td width="8">&nbsp;</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">&nbsp;</td>
    															<td width="91">&nbsp;</td>
    															<td width="14">&nbsp;</td>
    														</tr>
    														<tr>
    															<td width="11">&nbsp;</td>
    															<td width="91">
    															<img border="2" src="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
    															<td width="14">&nbsp;</td>
    														</tr>
    														<tr>
    															<td width="11">&nbsp;</td>
    															<td width="91">&nbsp;</td>
    															<td width="14">&nbsp;</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">
    																<font color="#FF00FF"><?=$item['Name']?></fonts></span></b></div>
                                                                                                                                    <br><font color="#FFFFFF"><?=$item['Description']?></fonts>
    															</td>
    														</tr>
    														<tr>
    															<td width="55" height="15">
    															</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 = "Melee";
                                                            break;
                                                            case "2";
                                                            $slot = "Ranged";
                                                            break;
                                                            case "3";
                                                            $slot = "Armor";
                                                            break;
                                                            case "4";
                                                            $slot = "Set";
                                                            break;
                                                            case "5";
                                                            $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>Price:</b></td>
    															<td width="251"><?=$item['CashPrice']?></td>
    														</tr>
    														<tr>
    															<td width="55">&nbsp;</td>
    															<td width="251">&nbsp;</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">&nbsp;</td>
    																		<td width="146" height="27" colspan="3">&nbsp;</td>
    																		<td width="128" height="27" colspan="3">&nbsp;</td>
    																	</tr>
    																	<tr>
    																		<td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
    																		<td width="67">
    																		<b>FR</b></td>
    																		<td width="62" align="right">
    																		<?=$item['FR']?></td>
    																		<td width="4">&nbsp;</td>
    																	</tr>
    																	<tr>
    																		<td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
    																		<td width="67">
    																		<b>PR</b></td>
    																		<td width="62" align="right">
    																		<?=$item['PR']?></td>
    																		<td width="4">&nbsp;</td>
    																	</tr>
    																	<tr>
    																		<td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
    																		<td width="67">
    																		<b>CR</b></td>
    																		<td width="62" align="right">
    																		<?=$item['CR']?></td>
    																		<td width="4">&nbsp;</td>
    																	</tr>
    																	<tr>
    																		<td width="7">&nbsp;</td>
    																		<td width="75">
    																		<b>Reload
    																		Time</b></td>
    																		<td width="44" align="right">
    																		<?=$item['ReloadTime']?></td>
    																		<td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
    																		<td width="88">
    																		<b>
    																		Control</b></td>
    																		<td width="48" align="right">
    																		<?=$item['Control']?></td>
    																		<td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
    																		<td width="67">
    																		<b>LR</b></td>
    																		<td width="62" align="right">
    																		<?=$item['LR']?></td>
    																		<td width="4">&nbsp;</td>
    																	</tr>
    																	<tr>
    																		<td width="4">&nbsp;</td>
    																		<td width="88">
    																		<b>Max
    																		Bullet</b></td>
    																		<td width="44" align="right">
    																		<?=$item['MaxBullet']?></td>
    																		<td width="7" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
    																		<td width="75">
    																		<b>
    																		Duration</b></td>
    																		<td width="48" align="right">
    																		Unlimited</td>
    																		<td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
    																		<td width="67">&nbsp;</td>
    																		<td width="62">&nbsp;</td>
    																		<td width="4">&nbsp;</td>
    																	</tr>
    																	<tr>
    																		<td width="7">&nbsp;</td>
    																		<td width="75">&nbsp;</td>
    																		<td width="51" colspan="2">&nbsp;</td>
    																		<td width="88">&nbsp;</td>
    																		<td width="54" colspan="2">&nbsp;</td>
    																		<td width="67">&nbsp;</td>
    																		<td width="68" colspan="2">&nbsp;</td>
    																	</tr>
    																</table>
    																</td>
    															</tr>
    														</table>
    													</div>
    													</td>
    												</tr>
    												<tr>
    													<td width="432" valign="top" colspan="2">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="432" valign="top" colspan="2">
    													<p align="center">
    													<a href="index.php?do=rzitemshop&sub=buyitem&expand=1&itemid=<?=$item['CSID']?>">
    													<img border="0" src="images/buyitem.jpg" width="50" height="20"></a>&nbsp;
    													<a href="index.php?do=rzitemshop&sub=giftitem&expand=1&itemid=<?=$item['CSID']?>">
    													<img border="0" src="images/giftitem.jpg" width="50" height="20"></a></td>
    												</tr>
    												<tr>
    													<td width="432" valign="top" colspan="2">&nbsp;</td>
    												</tr>
    											</table>
    											</td>
    										</tr>
    
    										<tr>
    											<td width="1"></td>
    										</tr>
    										</table>
    								</div>
    								</td>
    							</tr>
    							<tr>
    								<td background="images/cont_top.jpg" height="27">&nbsp;</td>
    							</tr>
    						</table>
    					</div>
        <?
    
    }   }
    
    
    if(!function_exists("ShowBuyItem")){
        function ShowBuyItem(){
           if($_SESSION['AID'] == ""){
                re_dir("index.php?do=login");
           }
           $item2 = clean($_GET['itemid']);
           $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           $item = mssql_fetch_assoc($res);
           $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           $acc = mssql_fetch_assoc($res2);
           if(isset($_POST['submit'])){
                $itemid = clean($_POST['ItemID']);
                $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                $item = mssql_fetch_assoc($res);
                $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                $acc = mssql_fetch_assoc($res2);
                $aid = $_SESSION['AID'];
                $updatecoins = $acc['RZCoins'] - $item['CashPrice'];
                $zitemid = $item['ItemID'];
                if($updatecoins < 0){
                    die("No Bug here :) CoDeD By LaMbDa FrOm SpAiN!!! :)");
                }
                mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$aid', '$zitemid', GETDATE(), 0)");
                mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                msgbox("Item purchased correctly, you can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
           }
           ?>
           					<div align="center">
    						<table border="0" width="456" style="border-collapse: collapse">
    							<tr>
    								<td background="images/cont_up.jpg">&nbsp;</td>
    							</tr>
    							<tr>
    								<td background="images/cont_bg.jpg">
    								<div align="center">
    									<table border="0" style="border-collapse: collapse" width="454" height="100%">
    										<tr>
    											<td width="4" rowspan="7">&nbsp;</td>
    											<td width="429">
    											<img border="0" src="images/inf/buyitem.png" width="414" height="19"></td>
    											<td width="8">&nbsp;</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">&nbsp;</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">
    													<p align="right">Name of
    													item</td>
    													<td width="8" valign="top">&nbsp;</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">&nbsp;</td>
    													<td width="222" valign="top">
    													<b><?=$_SESSION['UserID']?></b></td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">
    													<p align="right">Price</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">
    													<b><?=$item['CashPrice']?></b></td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">
    													<p align="right">RZ Coins
    													you have</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">
    													<b><?=$acc['RZCoins']?></b></td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">
    													<p align="right">RZ Coins
    													To you later</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">
    													<b><?
                                                        $result = $acc['RZCoins']-$item['CashPrice'];
                                                        if($result < 0){
                                                            $boton = "<b>RZ Coins insufficient</b>";
                                                        }else{
                                                            $boton = "<input type='submit' value='Buy item' name='submit'>";
                                                        }
    
                                                            echo $acc['RZCoins']-$item['CashPrice'];?> </b></td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">&nbsp;</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">&nbsp;</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">&nbsp;</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="430" valign="top" colspan="3">
    													<form method="POST" action="index.php?do=rzitemshop&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="images/cont_top.jpg" height="27">&nbsp;</td>
    							</tr>
    						</table>
    					</div>
    
    <?
    
    }   }
    if(!function_exists("ShowGiftItem")){
        function ShowgiftItem(){
           if($_SESSION['AID'] == ""){
                re_dir("index.php?do=login");
           }
           $item2 = clean($_GET['itemid']);
           $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           $item = mssql_fetch_assoc($res);
           $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           $acc = mssql_fetch_assoc($res2);
    
    if (isset($_POST['submit'])){
        $type = clean($_POST['type']);
        $id = clean($_POST['id']);
        $reason = clean($_POST['reason']);
        $custom = clean($_POST['cstom']);
        $itemid = clean($_POST['ItemID']);
        $item2 = clean($_GET['itemid']);
        //--
        if($reason == 1){
            $reason = $custom;
            $custom = str_replace("
            ","</br>",$custom);
        }
        //--
        if ($type == 1){
            $res = mssql_query_logged("SELECT * FROM Account WHERE UserID = '$id'");
            if(mssql_num_rows($res) == 0){
                msgbox("UserID $id doesnt exist","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
    }else{
                $data = mssql_fetch_assoc($res);
                $userID = $data['UserID'];
                $UserAID = $data['AID'];
                $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                $item = mssql_fetch_assoc($res);
                $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                $acc = mssql_fetch_assoc($res2);
                $aid = $_SESSION['AID'];
                $updatecoins = $acc['RZCoins'] - $item['CashPrice'];
                $zitemid = $item['ItemID'];
                if($updatecoins < 0){
                    die("No Bug here :) CoDeD By NoLiFe_X!!! :)");
                }
                mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$UserAID', '$zitemid', GETDATE(), 0)");
                mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                msgbox("Item purchased and gifted correctly, your friend can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }
        }else{
            $res = mssql_query_logged("SELECT * FROM Character WHERE Name = '$id'");
            if(mssql_num_rows($res) == 0){
                msgbox("The character $id doesnt exist","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }else{
                $res = mssql_query_logged("SELECT * FROM Character WHERE Name = '$id'");
                $data = mssql_fetch_assoc($res);
                $UserAID = $data['AID'];
           $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           $item = mssql_fetch_assoc($res);
           $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           $acc = mssql_fetch_assoc($res2);
                $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                $item = mssql_fetch_assoc($res);
                $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                $acc = mssql_fetch_assoc($res2);
                $aid = $_SESSION['AID'];
                $updatecoins = $acc['RZCoins'] - $item['CashPrice'];
                $zitemid = $item['ItemID'];
                if($updatecoins < 0){
                    die("No Bug here :) CoDeD By NoLiFe_X!!! :)");
                }
    
                mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$UserAID', '$zitemid', GETDATE(), 0)");
                mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                msgbox("Item purchased and gifted correctly, your friend can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }
        }
    
    }
    
    
    ?>
    <head>
    <meta http-equiv="Content-Language" content="es">
    <link rel="stylesheet" type="text/css" href="images/style.css">
    </head>
    
    
    	<body bgcolor="#312F30">
    
    					<div align="center">
    						<table border="0" width="456" style="border-collapse: collapse">
    							<tr>
    								<td background="images/cont_up.jpg">&nbsp;</td>
    							</tr>
    							<tr>
    								<td background="images/cont_bg.jpg">
    								<div align="center">
    									<table border="0" style="border-collapse: collapse" width="454" height="100%">
    										<tr>
    											<td width="4" rowspan="7">&nbsp;</td>
    											<td width="429">
    											<img border="0" src="images/inf/gift3.png" width="414" height="19"></td>
    											<td width="8">&nbsp;</td>
    										</tr>
    
    										<tr>
    											<td width="1"></td>
    										</tr>
    
    										<tr>
    											<td width="438">
    									<form name="gift" method="POST" action="">											<table border="0" style="border-collapse: collapse" width="436" height="100%">
    												<tr>
    													<td width="200" valign="top">&nbsp;</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">
    													<p align="right">Name of
    													item</td>
    													<td width="8" valign="top">&nbsp;</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">&nbsp;</td>
    													<td width="222" valign="top">
    													<b><?=$_SESSION['UserID']?></b></td>
    												</tr>
    										<tr>
    											<td width="149">
    											<p align="right">
    											<select size="1" name="type">
    											<option selected value="1">Gifting User ID
    											</option>
    											<option value="2">Gifting Character Name
    											</option>
    											</select></td>
    											<td width="4">
    											&nbsp;</td>
    											<td width="279">
    											<input type="text" name="id" size="26">&nbsp;
    											</td>
    										</tr>
    												<tr>
    													<td width="200" valign="top">
    													<p align="right">Price</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">
    													<b><?=$item['CashPrice']?></b></td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">
    													<p align="right">RZ Coins
    													you have</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">
    													<b><?=$acc['RZCoins']?></b></td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">
    													<p align="right">RZ Coins
    													To you later</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">
    													<b><?
                                                        $result = $acc['RZCoins']-$item['CashPrice'];
                                                        if($result < 0){
                                                            $boton = "<b>RZ Coins insufficient</b>";
                                                        }else{
                                                            $boton = "<input type='submit' value='Gift Item' name='submit'>";
                                                        }
    
                                                            echo $acc['RZCoins']-$item['CashPrice'];?> </b></td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">&nbsp;</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="430" valign="top" colspan="3">
    													<p align="center">
    													<font color="#FF0000"><b>
    													NOTE: If you gift an item and then do not want, or is mistaken, we are not responsible</b></font></td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">&nbsp;</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="430" valign="top" colspan="3">
    													<form method="POST" action="index.php?do=rzitemshop&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="images/cont_top.jpg" height="27">&nbsp;</td>
    							</tr>
    						</table>
    					</div>
    
    
    <?
        }
    }
    
    
    if($_GET['expand'] == 0){
    
    switch($_GET['sub']){
        case "listallitems";
            ListAllItems();
        break;
        case "details";
            ShowItemsDetails();
        break;
        case "buyitem";
            ShowBuyItem();
        break;
        case "giftitem";
            ShowGiftItem();
        break;
    }
    }
    
    
    
    
    
    ?>
    Right or Wrong?
    I'm using MPOG Website

  10. #10
    Account Upgraded | Title Enabled! alfredao is offline
    MemberRank
    Jan 2008 Join Date
    Coronel FabriciLocation
    705Posts

    Re: Event/Donator Page

    Wrong, replace this

    PHP Code:
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE ".$type." Opened = '1'"); 
    with my code.
    Last edited by alfredao; 01-12-09 at 02:14 AM.

  11. #11
    Banned Flavinho153 is offline
    BannedRank
    Dec 2008 Join Date
    182Posts

    Re: Event/Donator Page

    Quote Originally Posted by alfredao View Post
    Wrong, replace this

    PHP Code:
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE ".$type." Opened = '1'"); 
    with my code.
    Sure, but where I changed? I traded for this:

    Code:
       <?
    
    $num_por_pagina = 8; 
    $pagina = $_GET["pagina"]; 
    
    if(!$pagina)
    {
        $pagina = 1;
    }
    
    $primeiro_registro = ($pagina*$num_por_pagina) - $num_por_pagina;
    if ($pagina == 1)
    {
    $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE ".$type." Opened = '1'");  
    }
    else
    {
    $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE ".$type." Opened = '1'");  
    }
    
    $consulta = mssql_query("SELECT COUNT(*) FROM RZCashShop");
    list($total_usuarios) = mssql_fetch_array($consulta);
    
    $total_paginas = $total_usuarios/$num_por_pagina;
    
    $prev = $pagina - 1;
    $next = $pagina + 1;
    
    if ($pagina > 1) 
    {
        $prev_link = "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$prev\"><b>&laquo; Anterior</b></a></span>";
    }
    
    
    if ($total_paginas > $pagina) 
    {
        $next_link = "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$next\"><b>Próxima &raquo;</b></span>";
    }
    
    
    $total_paginas = ceil($total_paginas);
    $painel = "";
    for ($x=1; $x<=$total_paginas; $x++) 
    {
        if ($x==$pagina) 
        { 
            $painel .= " <span class=\"pagecurrent\"><b>$x</b></span>";
        }
        else
        {
            $painel .= " <span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$x\">$x</a></span>";
        }
    }
    ?> 
    <?
    if ($_SESSION['AID'] == ""){
        re_dir("index.php?do=login");
    }
    ?>
    <?
    if ($_GET['expand'] == 1){
    ?>
    <? }
    
    
    
    
    
    if(!function_exists("ListAllItems")){
    function ListAllItems(){
        if(!isset($_GET['type'])){
            $type = "";
        }else{
            $type = "Slot = '".clean($_GET['type'])."' AND";
        }
    
    $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE ".$type." Opened = '1'");  
    
        ?>
       <? echo $painel; ?>    
        <div align="center">
    						<table border="0" width="456" style="border-collapse: collapse">
    							<tr>
    								<td background="images/cont_up.jpg">&nbsp;</td>
    							</tr>
    							<tr>
    								<td background="images/cont_bg.jpg">
    								<div align="center">
    									<table border="0" style="border-collapse: collapse" width="454" height="100%">
    										<tr>
    											<td width="4" rowspan="11">&nbsp;</td>
    											<td width="440" colspan="2">
    											<img border="0" src="images/inf/shop.png"></td>
    											<td width="30">&nbsp;</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()">
    											<optgroup label="">
    											<option>Selecione uma Categoria</option>
    											<option value="6">Espadas</option>
    											<option value="1">Armas Curtas</option>
    											<option value="2">Armas Longas</option>
    											<option value="3">Equipamento</option>
    											<option value="4">Roupa Completa</option>
    											<option value="5">Item Especial</option>
    											</optgroup></select></form></td>
    										</tr>
    										<tr>
    											<td width="449" colspan="2">
    <center><a href="index.php?do=rzitemshop&sub=listallitems&expand=1&page=<?=$_GET['page'] - 1?>">« Anterior</a>
     - <a href="index.php?do=rzitemshop&sub=listallitems&expand=1&page=1?>"> 1</a>
     | <a href="index.php?do=rzitemsho&sub=listallitems&expand=1&page=2">2</a>
     | <a href="index.php?do=rzitemsho&sub=listallitems&expand=1&page=3">3</a>
     | <a href="index.php?do=rzitemsho&sub=listallitems&expand=1&page=4">4</a>
     | <a href="index.php?do=rzitemsho&sub=listallitems&expand=1&page=5">5</a>
     - <a href="index.php?do=rzitemsho&sub=listallitems&expand=1&page=<?=$_GET['page'] + 1?>">Próxima »</a></center></td></tr>
    
    										<tr>
    											<td width="449" colspan="2">
    											&nbsp;</td>
    										</tr>
    
    										<tr>
                                                                                    <?
                                            while($item = mssql_fetch_assoc($res)) {
                                                if ($count == 2) {
                                                    $count = 1;
                                                    echo "
                                                        </tr><tr>
    												        <td width='184'>&nbsp;</td>
    												        <td width='184'>&nbsp;</td>
    												        <td width='184'>&nbsp;</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="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
    													<td width="106" valign="top">
    													<font color="#FF00FF"><?=$item['Name']?></font></td>
    												</tr>
    												<tr>
    													<td width="106" valign="top">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="106" valign="top">
    													Type: <?
                                                        switch ( $item['Slot'] ){
                                                            case "1";
                                                            $slot = "Melee";
                                                            break;
                                                            case "2";
                                                            $slot = "Ranged";
                                                            break;
                                                            case "3";
                                                            $slot = "Armor";
                                                            break;
                                                            case "4";
                                                            $slot = "Set";
                                                            break;
                                                            case "5";
                                                            $slot = "Special";
                                                            break;
                                                        } echo $slot;
    
                                                            ?></td>
    												</tr>
    												<tr>
    													<td width="106" 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="106" valign="top">
    													Lv. Min: <?=$item['ResLevel']?></td>
    												</tr>
    												<tr>
    													<td width="106" valign="top">
    													Price: <?=$item['CashPrice']?></td>
    												</tr>
    												<tr>
    													<td width="106">
    													<p align="center">
    													<a href="index.php?do=rzitemshop&sub=details&id=<?=$item['CSID']?>"><img border="0" src="images/buy_btn.jpg" width="50" height="20"></a></td>
    												</tr>
    												<tr>
    													<td width="106">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="105">&nbsp;</td>
    													<td width="106">&nbsp;</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="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
    													<td width="110" valign="top">
    													<font color="#FF00FF"><?=$item['Name']?></font></td>
    												</tr>
    												<tr>
    													<td width="110" valign="top">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="110" valign="top">
    													Type: <?
                                                        switch ( $item['Slot'] ){
                                                            case "1";
                                                            $slot = "Melee";
                                                            break;
                                                            case "2";
                                                            $slot = "Ranged";
                                                            break;
                                                            case "3";
                                                            $slot = "Armor";
                                                            break;
                                                            case "4";
                                                            $slot = "Set";
                                                            break;
                                                            case "5";
                                                            $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">
    													Price: <?=$item['CashPrice']?></td>
    												</tr>
    												<tr>
    													<td width="110">
    													<p align="center">
    													<a href="index.php?do=rzitemshop&sub=details&id=<?=$item['CSID']?>"><img border="0" src="images/buy_btn.jpg" width="50" height="20"></a></td>
    												</tr>
    												<tr>
    													<td width="110">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="105">&nbsp;</td>
    													<td width="110">&nbsp;</td>
    												</tr>
    											</table>
    
    </body>
    
    </html>
    </td>                                                <?
                                                     $count++;
                                                }
                                            }   ?>
    											<td width="30">
    											&nbsp;<p>&nbsp;</p>
    											<p>&nbsp;</p>
    											<p>&nbsp;</td>
    										</tr>
    
    										<tr>
    											<td width="445" colspan="2">&nbsp;</td>
    										</tr>
    
    										<tr>
    											<td width="12" colspan="2"></td>
    										</tr>
    										</table>
    								</div>
    								</td>
    							</tr>
    							<tr>
    								<td background="images/cont_top.jpg" height="27">&nbsp;</td>
    							</tr>
    						</table>
    					</div>
        <?
        }  }
    
    
    
    //Items details
    
    
    
    
    if(!function_exists("ShowItemsDetails")){
        function ShowItemsDetails(){
        if($_GET['id'] == ""){
            re_dir("index.php");
        }
        $itemid = clean($_GET['id']);
        $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
        $item = mssql_fetch_assoc($res);
        ?>
        					<div align="center">
    						<table border="0" width="456" style="border-collapse: collapse">
    							<tr>
    								<td background="images/cont_up.jpg">&nbsp;</td>
    							</tr>
    							<tr>
    								<td background="images/cont_bg.jpg">
    								<div align="center">
    									<table border="0" style="border-collapse: collapse" width="454" height="100%">
    										<tr>
    											<td width="4" rowspan="7">&nbsp;</td>
    											<td width="429">
    											<img border="0" src="images/inf/itemdetails.png" width="413" height="18"></td>
    											<td width="8">&nbsp;</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">&nbsp;</td>
    															<td width="91">&nbsp;</td>
    															<td width="14">&nbsp;</td>
    														</tr>
    														<tr>
    															<td width="11">&nbsp;</td>
    															<td width="91">
    															<img border="2" src="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
    															<td width="14">&nbsp;</td>
    														</tr>
    														<tr>
    															<td width="11">&nbsp;</td>
    															<td width="91">&nbsp;</td>
    															<td width="14">&nbsp;</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">
    																<font color="#FF00FF"><?=$item['Name']?></fonts></span></b></div>
                                                                                                                                    <br><font color="#FFFFFF"><?=$item['Description']?></fonts>
    															</td>
    														</tr>
    														<tr>
    															<td width="55" height="15">
    															</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 = "Melee";
                                                            break;
                                                            case "2";
                                                            $slot = "Ranged";
                                                            break;
                                                            case "3";
                                                            $slot = "Armor";
                                                            break;
                                                            case "4";
                                                            $slot = "Set";
                                                            break;
                                                            case "5";
                                                            $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>Price:</b></td>
    															<td width="251"><?=$item['CashPrice']?></td>
    														</tr>
    														<tr>
    															<td width="55">&nbsp;</td>
    															<td width="251">&nbsp;</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">&nbsp;</td>
    																		<td width="146" height="27" colspan="3">&nbsp;</td>
    																		<td width="128" height="27" colspan="3">&nbsp;</td>
    																	</tr>
    																	<tr>
    																		<td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
    																		<td width="67">
    																		<b>FR</b></td>
    																		<td width="62" align="right">
    																		<?=$item['FR']?></td>
    																		<td width="4">&nbsp;</td>
    																	</tr>
    																	<tr>
    																		<td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
    																		<td width="67">
    																		<b>PR</b></td>
    																		<td width="62" align="right">
    																		<?=$item['PR']?></td>
    																		<td width="4">&nbsp;</td>
    																	</tr>
    																	<tr>
    																		<td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
    																		<td width="67">
    																		<b>CR</b></td>
    																		<td width="62" align="right">
    																		<?=$item['CR']?></td>
    																		<td width="4">&nbsp;</td>
    																	</tr>
    																	<tr>
    																		<td width="7">&nbsp;</td>
    																		<td width="75">
    																		<b>Reload
    																		Time</b></td>
    																		<td width="44" align="right">
    																		<?=$item['ReloadTime']?></td>
    																		<td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
    																		<td width="88">
    																		<b>
    																		Control</b></td>
    																		<td width="48" align="right">
    																		<?=$item['Control']?></td>
    																		<td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
    																		<td width="67">
    																		<b>LR</b></td>
    																		<td width="62" align="right">
    																		<?=$item['LR']?></td>
    																		<td width="4">&nbsp;</td>
    																	</tr>
    																	<tr>
    																		<td width="4">&nbsp;</td>
    																		<td width="88">
    																		<b>Max
    																		Bullet</b></td>
    																		<td width="44" align="right">
    																		<?=$item['MaxBullet']?></td>
    																		<td width="7" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
    																		<td width="75">
    																		<b>
    																		Duration</b></td>
    																		<td width="48" align="right">
    																		Unlimited</td>
    																		<td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
    																		<td width="67">&nbsp;</td>
    																		<td width="62">&nbsp;</td>
    																		<td width="4">&nbsp;</td>
    																	</tr>
    																	<tr>
    																		<td width="7">&nbsp;</td>
    																		<td width="75">&nbsp;</td>
    																		<td width="51" colspan="2">&nbsp;</td>
    																		<td width="88">&nbsp;</td>
    																		<td width="54" colspan="2">&nbsp;</td>
    																		<td width="67">&nbsp;</td>
    																		<td width="68" colspan="2">&nbsp;</td>
    																	</tr>
    																</table>
    																</td>
    															</tr>
    														</table>
    													</div>
    													</td>
    												</tr>
    												<tr>
    													<td width="432" valign="top" colspan="2">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="432" valign="top" colspan="2">
    													<p align="center">
    													<a href="index.php?do=rzitemshop&sub=buyitem&expand=1&itemid=<?=$item['CSID']?>">
    													<img border="0" src="images/buyitem.jpg" width="50" height="20"></a>&nbsp;
    													<a href="index.php?do=rzitemshop&sub=giftitem&expand=1&itemid=<?=$item['CSID']?>">
    													<img border="0" src="images/giftitem.jpg" width="50" height="20"></a></td>
    												</tr>
    												<tr>
    													<td width="432" valign="top" colspan="2">&nbsp;</td>
    												</tr>
    											</table>
    											</td>
    										</tr>
    
    										<tr>
    											<td width="1"></td>
    										</tr>
    										</table>
    								</div>
    								</td>
    							</tr>
    							<tr>
    								<td background="images/cont_top.jpg" height="27">&nbsp;</td>
    							</tr>
    						</table>
    					</div>
        <?
    
    }   }
    
    
    if(!function_exists("ShowBuyItem")){
        function ShowBuyItem(){
           if($_SESSION['AID'] == ""){
                re_dir("index.php?do=login");
           }
           $item2 = clean($_GET['itemid']);
           $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           $item = mssql_fetch_assoc($res);
           $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           $acc = mssql_fetch_assoc($res2);
           if(isset($_POST['submit'])){
                $itemid = clean($_POST['ItemID']);
                $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                $item = mssql_fetch_assoc($res);
                $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                $acc = mssql_fetch_assoc($res2);
                $aid = $_SESSION['AID'];
                $updatecoins = $acc['RZCoins'] - $item['CashPrice'];
                $zitemid = $item['ItemID'];
                if($updatecoins < 0){
                    die("No Bug here :) CoDeD By LaMbDa FrOm SpAiN!!! :)");
                }
                mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$aid', '$zitemid', GETDATE(), 0)");
                mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                msgbox("Item purchased correctly, you can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
           }
           ?>
           					<div align="center">
    						<table border="0" width="456" style="border-collapse: collapse">
    							<tr>
    								<td background="images/cont_up.jpg">&nbsp;</td>
    							</tr>
    							<tr>
    								<td background="images/cont_bg.jpg">
    								<div align="center">
    									<table border="0" style="border-collapse: collapse" width="454" height="100%">
    										<tr>
    											<td width="4" rowspan="7">&nbsp;</td>
    											<td width="429">
    											<img border="0" src="images/inf/buyitem.png" width="414" height="19"></td>
    											<td width="8">&nbsp;</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">&nbsp;</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">
    													<p align="right">Name of
    													item</td>
    													<td width="8" valign="top">&nbsp;</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">&nbsp;</td>
    													<td width="222" valign="top">
    													<b><?=$_SESSION['UserID']?></b></td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">
    													<p align="right">Price</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">
    													<b><?=$item['CashPrice']?></b></td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">
    													<p align="right">RZ Coins
    													you have</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">
    													<b><?=$acc['RZCoins']?></b></td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">
    													<p align="right">RZ Coins
    													To you later</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">
    													<b><?
                                                        $result = $acc['RZCoins']-$item['CashPrice'];
                                                        if($result < 0){
                                                            $boton = "<b>RZ Coins insufficient</b>";
                                                        }else{
                                                            $boton = "<input type='submit' value='Buy item' name='submit'>";
                                                        }
    
                                                            echo $acc['RZCoins']-$item['CashPrice'];?> </b></td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">&nbsp;</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">&nbsp;</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">&nbsp;</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="430" valign="top" colspan="3">
    													<form method="POST" action="index.php?do=rzitemshop&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="images/cont_top.jpg" height="27">&nbsp;</td>
    							</tr>
    						</table>
    					</div>
    
    <?
    
    }   }
    if(!function_exists("ShowGiftItem")){
        function ShowgiftItem(){
           if($_SESSION['AID'] == ""){
                re_dir("index.php?do=login");
           }
           $item2 = clean($_GET['itemid']);
           $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           $item = mssql_fetch_assoc($res);
           $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           $acc = mssql_fetch_assoc($res2);
    
    if (isset($_POST['submit'])){
        $type = clean($_POST['type']);
        $id = clean($_POST['id']);
        $reason = clean($_POST['reason']);
        $custom = clean($_POST['cstom']);
        $itemid = clean($_POST['ItemID']);
        $item2 = clean($_GET['itemid']);
        //--
        if($reason == 1){
            $reason = $custom;
            $custom = str_replace("
            ","</br>",$custom);
        }
        //--
        if ($type == 1){
            $res = mssql_query_logged("SELECT * FROM Account WHERE UserID = '$id'");
            if(mssql_num_rows($res) == 0){
                msgbox("UserID $id doesnt exist","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
    }else{
                $data = mssql_fetch_assoc($res);
                $userID = $data['UserID'];
                $UserAID = $data['AID'];
                $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                $item = mssql_fetch_assoc($res);
                $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                $acc = mssql_fetch_assoc($res2);
                $aid = $_SESSION['AID'];
                $updatecoins = $acc['RZCoins'] - $item['CashPrice'];
                $zitemid = $item['ItemID'];
                if($updatecoins < 0){
                    die("No Bug here :) CoDeD By NoLiFe_X!!! :)");
                }
                mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$UserAID', '$zitemid', GETDATE(), 0)");
                mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                msgbox("Item purchased and gifted correctly, your friend can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }
        }else{
            $res = mssql_query_logged("SELECT * FROM Character WHERE Name = '$id'");
            if(mssql_num_rows($res) == 0){
                msgbox("The character $id doesnt exist","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }else{
                $res = mssql_query_logged("SELECT * FROM Character WHERE Name = '$id'");
                $data = mssql_fetch_assoc($res);
                $UserAID = $data['AID'];
           $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           $item = mssql_fetch_assoc($res);
           $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           $acc = mssql_fetch_assoc($res2);
                $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                $item = mssql_fetch_assoc($res);
                $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                $acc = mssql_fetch_assoc($res2);
                $aid = $_SESSION['AID'];
                $updatecoins = $acc['RZCoins'] - $item['CashPrice'];
                $zitemid = $item['ItemID'];
                if($updatecoins < 0){
                    die("No Bug here :) CoDeD By NoLiFe_X!!! :)");
                }
    
                mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$UserAID', '$zitemid', GETDATE(), 0)");
                mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                msgbox("Item purchased and gifted correctly, your friend can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }
        }
    
    }
    
    
    ?>
    <head>
    <meta http-equiv="Content-Language" content="es">
    <link rel="stylesheet" type="text/css" href="images/style.css">
    </head>
    
    
    	<body bgcolor="#312F30">
    
    					<div align="center">
    						<table border="0" width="456" style="border-collapse: collapse">
    							<tr>
    								<td background="images/cont_up.jpg">&nbsp;</td>
    							</tr>
    							<tr>
    								<td background="images/cont_bg.jpg">
    								<div align="center">
    									<table border="0" style="border-collapse: collapse" width="454" height="100%">
    										<tr>
    											<td width="4" rowspan="7">&nbsp;</td>
    											<td width="429">
    											<img border="0" src="images/inf/gift3.png" width="414" height="19"></td>
    											<td width="8">&nbsp;</td>
    										</tr>
    
    										<tr>
    											<td width="1"></td>
    										</tr>
    
    										<tr>
    											<td width="438">
    									<form name="gift" method="POST" action="">											<table border="0" style="border-collapse: collapse" width="436" height="100%">
    												<tr>
    													<td width="200" valign="top">&nbsp;</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">
    													<p align="right">Name of
    													item</td>
    													<td width="8" valign="top">&nbsp;</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">&nbsp;</td>
    													<td width="222" valign="top">
    													<b><?=$_SESSION['UserID']?></b></td>
    												</tr>
    										<tr>
    											<td width="149">
    											<p align="right">
    											<select size="1" name="type">
    											<option selected value="1">Gifting User ID
    											</option>
    											<option value="2">Gifting Character Name
    											</option>
    											</select></td>
    											<td width="4">
    											&nbsp;</td>
    											<td width="279">
    											<input type="text" name="id" size="26">&nbsp;
    											</td>
    										</tr>
    												<tr>
    													<td width="200" valign="top">
    													<p align="right">Price</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">
    													<b><?=$item['CashPrice']?></b></td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">
    													<p align="right">RZ Coins
    													you have</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">
    													<b><?=$acc['RZCoins']?></b></td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">
    													<p align="right">RZ Coins
    													To you later</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">
    													<b><?
                                                        $result = $acc['RZCoins']-$item['CashPrice'];
                                                        if($result < 0){
                                                            $boton = "<b>RZ Coins insufficient</b>";
                                                        }else{
                                                            $boton = "<input type='submit' value='Gift Item' name='submit'>";
                                                        }
    
                                                            echo $acc['RZCoins']-$item['CashPrice'];?> </b></td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">&nbsp;</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="430" valign="top" colspan="3">
    													<p align="center">
    													<font color="#FF0000"><b>
    													NOTE: If you gift an item and then do not want, or is mistaken, we are not responsible</b></font></td>
    												</tr>
    												<tr>
    													<td width="200" valign="top">&nbsp;</td>
    													<td width="8" valign="top">&nbsp;</td>
    													<td width="222" valign="top">&nbsp;</td>
    												</tr>
    												<tr>
    													<td width="430" valign="top" colspan="3">
    													<form method="POST" action="index.php?do=rzitemshop&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="images/cont_top.jpg" height="27">&nbsp;</td>
    							</tr>
    						</table>
    					</div>
    
    
    <?
        }
    }
    
    
    if($_GET['expand'] == 0){
    
    switch($_GET['sub']){
        case "listallitems";
            ListAllItems();
        break;
        case "details";
            ShowItemsDetails();
        break;
        case "buyitem";
            ShowBuyItem();
        break;
        case "giftitem";
            ShowGiftItem();
        break;
    }
    }
    
    
    
    
    
    ?>

  12. #12

    Re: Event/Donator Page

    Quote Originally Posted by Flavinho153 View Post
    Sure, but where I changed? I traded for this:

    Spoiler:
    Code:
       <?
    
    $num_por_pagina = 8; 
    $pagina = $_GET["pagina"]; 
    
    if(!$pagina)
    {
        $pagina = 1;
    }
    
    $primeiro_registro = ($pagina*$num_por_pagina) - $num_por_pagina;
    if ($pagina == 1)
    {
    $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE ".$type." Opened = '1'");  
    }
    else
    {
    $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE ".$type." Opened = '1'");  
    }
    
    $consulta = mssql_query("SELECT COUNT(*) FROM RZCashShop");
    list($total_usuarios) = mssql_fetch_array($consulta);
    
    $total_paginas = $total_usuarios/$num_por_pagina;
    
    $prev = $pagina - 1;
    $next = $pagina + 1;
    
    if ($pagina > 1) 
    {
        $prev_link = "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$prev\"><b>&laquo; Anterior</b></a></span>";
    }
    
    
    if ($total_paginas > $pagina) 
    {
        $next_link = "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$next\"><b>Próxima &raquo;</b></span>";
    }
    
    
    $total_paginas = ceil($total_paginas);
    $painel = "";
    for ($x=1; $x<=$total_paginas; $x++) 
    {
        if ($x==$pagina) 
        { 
            $painel .= " <span class=\"pagecurrent\"><b>$x</b></span>";
        }
        else
        {
            $painel .= " <span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$x\">$x</a></span>";
        }
    }
    ?> 
    <?
    if ($_SESSION['AID'] == ""){
        re_dir("index.php?do=login");
    }
    ?>
    <?
    if ($_GET['expand'] == 1){
    ?>
    <? }
    
    
    
    
    
    if(!function_exists("ListAllItems")){
    function ListAllItems(){
        if(!isset($_GET['type'])){
            $type = "";
        }else{
            $type = "Slot = '".clean($_GET['type'])."' AND";
        }
    
    $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE ".$type." Opened = '1'");  
    
        ?>
       <? echo $painel; ?>    
        <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="images/cont_up.jpg">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td background="images/cont_bg.jpg">
                                    <div align="center">
                                        <table border="0" style="border-collapse: collapse" width="454" height="100%">
                                            <tr>
                                                <td width="4" rowspan="11">&nbsp;</td>
                                                <td width="440" colspan="2">
                                                <img border="0" src="images/inf/shop.png"></td>
                                                <td width="30">&nbsp;</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()">
                                                <optgroup label="">
                                                <option>Selecione uma Categoria</option>
                                                <option value="6">Espadas</option>
                                                <option value="1">Armas Curtas</option>
                                                <option value="2">Armas Longas</option>
                                                <option value="3">Equipamento</option>
                                                <option value="4">Roupa Completa</option>
                                                <option value="5">Item Especial</option>
                                                </optgroup></select></form></td>
                                            </tr>
                                            <tr>
                                                <td width="449" colspan="2">
    <center><a href="index.php?do=rzitemshop&sub=listallitems&expand=1&page=<?=$_GET['page'] - 1?>">« Anterior</a>
     - <a href="index.php?do=rzitemshop&sub=listallitems&expand=1&page=1?>"> 1</a>
     | <a href="index.php?do=rzitemsho&sub=listallitems&expand=1&page=2">2</a>
     | <a href="index.php?do=rzitemsho&sub=listallitems&expand=1&page=3">3</a>
     | <a href="index.php?do=rzitemsho&sub=listallitems&expand=1&page=4">4</a>
     | <a href="index.php?do=rzitemsho&sub=listallitems&expand=1&page=5">5</a>
     - <a href="index.php?do=rzitemsho&sub=listallitems&expand=1&page=<?=$_GET['page'] + 1?>">Próxima »</a></center></td></tr>
    
                                            <tr>
                                                <td width="449" colspan="2">
                                                &nbsp;</td>
                                            </tr>
    
                                            <tr>
                                                                                    <?
                                            while($item = mssql_fetch_assoc($res)) {
                                                if ($count == 2) {
                                                    $count = 1;
                                                    echo "
                                                        </tr><tr>
                                                            <td width='184'>&nbsp;</td>
                                                            <td width='184'>&nbsp;</td>
                                                            <td width='184'>&nbsp;</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="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
                                                        <td width="106" valign="top">
                                                        <font color="#FF00FF"><?=$item['Name']?></font></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" valign="top">
                                                        Type: <?
                                                        switch ( $item['Slot'] ){
                                                            case "1";
                                                            $slot = "Melee";
                                                            break;
                                                            case "2";
                                                            $slot = "Ranged";
                                                            break;
                                                            case "3";
                                                            $slot = "Armor";
                                                            break;
                                                            case "4";
                                                            $slot = "Set";
                                                            break;
                                                            case "5";
                                                            $slot = "Special";
                                                            break;
                                                        } echo $slot;
    
                                                            ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" 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="106" valign="top">
                                                        Lv. Min: <?=$item['ResLevel']?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" valign="top">
                                                        Price: <?=$item['CashPrice']?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106">
                                                        <p align="center">
                                                        <a href="index.php?do=rzitemshop&sub=details&id=<?=$item['CSID']?>"><img border="0" src="images/buy_btn.jpg" width="50" height="20"></a></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="105">&nbsp;</td>
                                                        <td width="106">&nbsp;</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="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
                                                        <td width="110" valign="top">
                                                        <font color="#FF00FF"><?=$item['Name']?></font></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110" valign="top">
                                                        Type: <?
                                                        switch ( $item['Slot'] ){
                                                            case "1";
                                                            $slot = "Melee";
                                                            break;
                                                            case "2";
                                                            $slot = "Ranged";
                                                            break;
                                                            case "3";
                                                            $slot = "Armor";
                                                            break;
                                                            case "4";
                                                            $slot = "Set";
                                                            break;
                                                            case "5";
                                                            $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">
                                                        Price: <?=$item['CashPrice']?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110">
                                                        <p align="center">
                                                        <a href="index.php?do=rzitemshop&sub=details&id=<?=$item['CSID']?>"><img border="0" src="images/buy_btn.jpg" width="50" height="20"></a></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="105">&nbsp;</td>
                                                        <td width="110">&nbsp;</td>
                                                    </tr>
                                                </table>
    
    </body>
    
    </html>
    </td>                                                <?
                                                     $count++;
                                                }
                                            }   ?>
                                                <td width="30">
                                                &nbsp;<p>&nbsp;</p>
                                                <p>&nbsp;</p>
                                                <p>&nbsp;</td>
                                            </tr>
    
                                            <tr>
                                                <td width="445" colspan="2">&nbsp;</td>
                                            </tr>
    
                                            <tr>
                                                <td width="12" colspan="2"></td>
                                            </tr>
                                            </table>
                                    </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td background="images/cont_top.jpg" height="27">&nbsp;</td>
                                </tr>
                            </table>
                        </div>
        <?
        }  }
    
    
    
    //Items details
    
    
    
    
    if(!function_exists("ShowItemsDetails")){
        function ShowItemsDetails(){
        if($_GET['id'] == ""){
            re_dir("index.php");
        }
        $itemid = clean($_GET['id']);
        $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
        $item = mssql_fetch_assoc($res);
        ?>
                            <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="images/cont_up.jpg">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td background="images/cont_bg.jpg">
                                    <div align="center">
                                        <table border="0" style="border-collapse: collapse" width="454" height="100%">
                                            <tr>
                                                <td width="4" rowspan="7">&nbsp;</td>
                                                <td width="429">
                                                <img border="0" src="images/inf/itemdetails.png" width="413" height="18"></td>
                                                <td width="8">&nbsp;</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">&nbsp;</td>
                                                                <td width="91">&nbsp;</td>
                                                                <td width="14">&nbsp;</td>
                                                            </tr>
                                                            <tr>
                                                                <td width="11">&nbsp;</td>
                                                                <td width="91">
                                                                <img border="2" src="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
                                                                <td width="14">&nbsp;</td>
                                                            </tr>
                                                            <tr>
                                                                <td width="11">&nbsp;</td>
                                                                <td width="91">&nbsp;</td>
                                                                <td width="14">&nbsp;</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">
                                                                    <font color="#FF00FF"><?=$item['Name']?></fonts></span></b></div>
                                                                                                                                    <br><font color="#FFFFFF"><?=$item['Description']?></fonts>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td width="55" height="15">
                                                                </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 = "Melee";
                                                            break;
                                                            case "2";
                                                            $slot = "Ranged";
                                                            break;
                                                            case "3";
                                                            $slot = "Armor";
                                                            break;
                                                            case "4";
                                                            $slot = "Set";
                                                            break;
                                                            case "5";
                                                            $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>Price:</b></td>
                                                                <td width="251"><?=$item['CashPrice']?></td>
                                                            </tr>
                                                            <tr>
                                                                <td width="55">&nbsp;</td>
                                                                <td width="251">&nbsp;</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">&nbsp;</td>
                                                                            <td width="146" height="27" colspan="3">&nbsp;</td>
                                                                            <td width="128" height="27" colspan="3">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>FR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['FR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>PR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['PR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>CR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['CR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</td>
                                                                            <td width="75">
                                                                            <b>Reload
                                                                            Time</b></td>
                                                                            <td width="44" align="right">
                                                                            <?=$item['ReloadTime']?></td>
                                                                            <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="88">
                                                                            <b>
                                                                            Control</b></td>
                                                                            <td width="48" align="right">
                                                                            <?=$item['Control']?></td>
                                                                            <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>LR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['LR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="4">&nbsp;</td>
                                                                            <td width="88">
                                                                            <b>Max
                                                                            Bullet</b></td>
                                                                            <td width="44" align="right">
                                                                            <?=$item['MaxBullet']?></td>
                                                                            <td width="7" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="75">
                                                                            <b>
                                                                            Duration</b></td>
                                                                            <td width="48" align="right">
                                                                            Unlimited</td>
                                                                            <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="67">&nbsp;</td>
                                                                            <td width="62">&nbsp;</td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</td>
                                                                            <td width="75">&nbsp;</td>
                                                                            <td width="51" colspan="2">&nbsp;</td>
                                                                            <td width="88">&nbsp;</td>
                                                                            <td width="54" colspan="2">&nbsp;</td>
                                                                            <td width="67">&nbsp;</td>
                                                                            <td width="68" colspan="2">&nbsp;</td>
                                                                        </tr>
                                                                    </table>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td width="432" valign="top" colspan="2">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="432" valign="top" colspan="2">
                                                        <p align="center">
                                                        <a href="index.php?do=rzitemshop&sub=buyitem&expand=1&itemid=<?=$item['CSID']?>">
                                                        <img border="0" src="images/buyitem.jpg" width="50" height="20"></a>&nbsp;
                                                        <a href="index.php?do=rzitemshop&sub=giftitem&expand=1&itemid=<?=$item['CSID']?>">
                                                        <img border="0" src="images/giftitem.jpg" width="50" height="20"></a></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="432" valign="top" colspan="2">&nbsp;</td>
                                                    </tr>
                                                </table>
                                                </td>
                                            </tr>
    
                                            <tr>
                                                <td width="1"></td>
                                            </tr>
                                            </table>
                                    </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td background="images/cont_top.jpg" height="27">&nbsp;</td>
                                </tr>
                            </table>
                        </div>
        <?
    
    }   }
    
    
    if(!function_exists("ShowBuyItem")){
        function ShowBuyItem(){
           if($_SESSION['AID'] == ""){
                re_dir("index.php?do=login");
           }
           $item2 = clean($_GET['itemid']);
           $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           $item = mssql_fetch_assoc($res);
           $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           $acc = mssql_fetch_assoc($res2);
           if(isset($_POST['submit'])){
                $itemid = clean($_POST['ItemID']);
                $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                $item = mssql_fetch_assoc($res);
                $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                $acc = mssql_fetch_assoc($res2);
                $aid = $_SESSION['AID'];
                $updatecoins = $acc['RZCoins'] - $item['CashPrice'];
                $zitemid = $item['ItemID'];
                if($updatecoins < 0){
                    die("No Bug here :) CoDeD By LaMbDa FrOm SpAiN!!! :)");
                }
                mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$aid', '$zitemid', GETDATE(), 0)");
                mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                msgbox("Item purchased correctly, you can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
           }
           ?>
                               <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="images/cont_up.jpg">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td background="images/cont_bg.jpg">
                                    <div align="center">
                                        <table border="0" style="border-collapse: collapse" width="454" height="100%">
                                            <tr>
                                                <td width="4" rowspan="7">&nbsp;</td>
                                                <td width="429">
                                                <img border="0" src="images/inf/buyitem.png" width="414" height="19"></td>
                                                <td width="8">&nbsp;</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">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Name of
                                                        item</td>
                                                        <td width="8" valign="top">&nbsp;</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">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$_SESSION['UserID']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Price</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$item['CashPrice']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        you have</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$acc['RZCoins']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        To you later</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?
                                                        $result = $acc['RZCoins']-$item['CashPrice'];
                                                        if($result < 0){
                                                            $boton = "<b>RZ Coins insufficient</b>";
                                                        }else{
                                                            $boton = "<input type='submit' value='Buy item' name='submit'>";
                                                        }
    
                                                            echo $acc['RZCoins']-$item['CashPrice'];?> </b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</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">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="430" valign="top" colspan="3">
                                                        <form method="POST" action="index.php?do=rzitemshop&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="images/cont_top.jpg" height="27">&nbsp;</td>
                                </tr>
                            </table>
                        </div>
    
    <?
    
    }   }
    if(!function_exists("ShowGiftItem")){
        function ShowgiftItem(){
           if($_SESSION['AID'] == ""){
                re_dir("index.php?do=login");
           }
           $item2 = clean($_GET['itemid']);
           $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           $item = mssql_fetch_assoc($res);
           $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           $acc = mssql_fetch_assoc($res2);
    
    if (isset($_POST['submit'])){
        $type = clean($_POST['type']);
        $id = clean($_POST['id']);
        $reason = clean($_POST['reason']);
        $custom = clean($_POST['cstom']);
        $itemid = clean($_POST['ItemID']);
        $item2 = clean($_GET['itemid']);
        //--
        if($reason == 1){
            $reason = $custom;
            $custom = str_replace("
            ","</br>",$custom);
        }
        //--
        if ($type == 1){
            $res = mssql_query_logged("SELECT * FROM Account WHERE UserID = '$id'");
            if(mssql_num_rows($res) == 0){
                msgbox("UserID $id doesnt exist","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
    }else{
                $data = mssql_fetch_assoc($res);
                $userID = $data['UserID'];
                $UserAID = $data['AID'];
                $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                $item = mssql_fetch_assoc($res);
                $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                $acc = mssql_fetch_assoc($res2);
                $aid = $_SESSION['AID'];
                $updatecoins = $acc['RZCoins'] - $item['CashPrice'];
                $zitemid = $item['ItemID'];
                if($updatecoins < 0){
                    die("No Bug here :) CoDeD By NoLiFe_X!!! :)");
                }
                mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$UserAID', '$zitemid', GETDATE(), 0)");
                mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                msgbox("Item purchased and gifted correctly, your friend can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }
        }else{
            $res = mssql_query_logged("SELECT * FROM Character WHERE Name = '$id'");
            if(mssql_num_rows($res) == 0){
                msgbox("The character $id doesnt exist","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }else{
                $res = mssql_query_logged("SELECT * FROM Character WHERE Name = '$id'");
                $data = mssql_fetch_assoc($res);
                $UserAID = $data['AID'];
           $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           $item = mssql_fetch_assoc($res);
           $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           $acc = mssql_fetch_assoc($res2);
                $res = mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                $item = mssql_fetch_assoc($res);
                $res2 = mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                $acc = mssql_fetch_assoc($res2);
                $aid = $_SESSION['AID'];
                $updatecoins = $acc['RZCoins'] - $item['CashPrice'];
                $zitemid = $item['ItemID'];
                if($updatecoins < 0){
                    die("No Bug here :) CoDeD By NoLiFe_X!!! :)");
                }
    
                mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$UserAID', '$zitemid', GETDATE(), 0)");
                mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                msgbox("Item purchased and gifted correctly, your friend can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }
        }
    
    }
    
    
    ?>
    <head>
    <meta http-equiv="Content-Language" content="es">
    <link rel="stylesheet" type="text/css" href="images/style.css">
    </head>
    
    
        <body bgcolor="#312F30">
    
                        <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="images/cont_up.jpg">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td background="images/cont_bg.jpg">
                                    <div align="center">
                                        <table border="0" style="border-collapse: collapse" width="454" height="100%">
                                            <tr>
                                                <td width="4" rowspan="7">&nbsp;</td>
                                                <td width="429">
                                                <img border="0" src="images/inf/gift3.png" width="414" height="19"></td>
                                                <td width="8">&nbsp;</td>
                                            </tr>
    
                                            <tr>
                                                <td width="1"></td>
                                            </tr>
    
                                            <tr>
                                                <td width="438">
                                        <form name="gift" method="POST" action="">                                            <table border="0" style="border-collapse: collapse" width="436" height="100%">
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Name of
                                                        item</td>
                                                        <td width="8" valign="top">&nbsp;</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">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$_SESSION['UserID']?></b></td>
                                                    </tr>
                                            <tr>
                                                <td width="149">
                                                <p align="right">
                                                <select size="1" name="type">
                                                <option selected value="1">Gifting User ID
                                                </option>
                                                <option value="2">Gifting Character Name
                                                </option>
                                                </select></td>
                                                <td width="4">
                                                &nbsp;</td>
                                                <td width="279">
                                                <input type="text" name="id" size="26">&nbsp;
                                                </td>
                                            </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Price</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$item['CashPrice']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        you have</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$acc['RZCoins']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        To you later</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?
                                                        $result = $acc['RZCoins']-$item['CashPrice'];
                                                        if($result < 0){
                                                            $boton = "<b>RZ Coins insufficient</b>";
                                                        }else{
                                                            $boton = "<input type='submit' value='Gift Item' name='submit'>";
                                                        }
    
                                                            echo $acc['RZCoins']-$item['CashPrice'];?> </b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="430" valign="top" colspan="3">
                                                        <p align="center">
                                                        <font color="#FF0000"><b>
                                                        NOTE: If you gift an item and then do not want, or is mistaken, we are not responsible</b></font></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="430" valign="top" colspan="3">
                                                        <form method="POST" action="index.php?do=rzitemshop&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="images/cont_top.jpg" height="27">&nbsp;</td>
                                </tr>
                            </table>
                        </div>
    
    
    <?
        }
    }
    
    
    if($_GET['expand'] == 0){
    
    switch($_GET['sub']){
        case "listallitems";
            ListAllItems();
        break;
        case "details";
            ShowItemsDetails();
        break;
        case "buyitem";
            ShowBuyItem();
        break;
        case "giftitem";
            ShowGiftItem();
        break;
    }
    }
    
    
    
    
    
    ?>

  13. #13
    Banned Flavinho153 is offline
    BannedRank
    Dec 2008 Join Date
    182Posts

    Re: Event/Donator Page

    Quote Originally Posted by Linear88 View Post
    Post Here

  14. #14
    Account Upgraded | Title Enabled! alfredao is offline
    MemberRank
    Jan 2008 Join Date
    Coronel FabriciLocation
    705Posts

    Re: Event/Donator Page

    PHP Code:
    <?
    if ($_SESSION['AID'] == ""){
        
    re_dir("index.php?do=login");
    }

    if (
    $_GET['expand'] == 1){

    }

    if(!
    function_exists("ListAllItems")){
    function 
    ListAllItems(){
        if(!isset(
    $_GET['type'])){
            
    $type "";
        }else{
            
    $type "Slot = '".clean($_GET['type'])."' AND";
        }

    $num_por_pagina 8
    $pagina $_GET["pagina"]; 

    if(!
    $pagina)
    {
        
    $pagina 1;
    }

    $primeiro_registro = ($pagina*$num_por_pagina) - $num_por_pagina;
    if (
    $pagina == 1)
    {
        
    $res mssql_query("SELECT TOP $num_por_pagina * FROM RZCashshop WHERE ID > $primeiro_registro-1 AND Opened = '1' ORDER BY ID ASC");
    }
    else
    {
        
    $res mssql_query("SELECT TOP $num_por_pagina * FROM RZCashshop WHERE ID >= $primeiro_registro AND Opened = '1' ORDER BY ID ASC");
    }

    $consulta mssql_query("SELECT COUNT(*) FROM RZCashShop");
    list(
    $total_usuarios) = mssql_fetch_array($consulta);

    $total_paginas $total_usuarios/$num_por_pagina;

    $prev $pagina 1;
    $next $pagina 1;

    if (
    $pagina 1
    {
        
    $prev_link "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$prev\"><b>&laquo; Anterior</b></a></span>";
    }


    if (
    $total_paginas $pagina
    {
        
    $next_link "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$next\"><b>Próxima &raquo;</b></span>";
    }


    $total_paginas ceil($total_paginas);
    $painel "";
    for (
    $x=1$x<=$total_paginas$x++) 
    {
        if (
    $x==$pagina
        { 
            
    $painel .= " <span class=\"pagecurrent\"><b>$x</b></span>";
        }
        else
        {
            
    $painel .= " <span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$x\">$x</a></span>";
        }
    }

        
    ?>
        <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="images/cont_up.jpg">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td background="images/cont_bg.jpg">
                                    <div align="center">
                                        <table border="0" style="border-collapse: collapse" width="454" height="100%">
                                            <tr>
                                                <td width="4" rowspan="11">&nbsp;</td>
                                                <td width="440" colspan="2">
                                                <img border="0" src="images/inf/shop.png"></td>
                                                <td width="30">&nbsp;</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()">
                                                <optgroup label="">
                                                <option>Selecione uma Categoria</option>
                                                <option value="6">Espadas</option>
                                                <option value="1">Armas Curtas</option>
                                                <option value="2">Armas Longas</option>
                                                <option value="3">Equipamento</option>
                                                <option value="4">Roupa Completa</option>
                                                <option value="5">Item Especial</option>
                                                </optgroup></select></form></td>
                                            </tr>

                                            <tr>
                                                <td width="449" colspan="2">
                                                &nbsp;</td>
                                            </tr>
                                            <tr>
                                                <td width="449" colspan="2"><? echo $painel?>/td>
                                            </tr>

                                            <tr>
                                                                                    <?
                                            
    while($item mssql_fetch_assoc($res)) {
                                                if (
    $count == 2) {
                                                    
    $count 1;
                                                    echo 
    "
                                                        </tr><tr>
                                                            <td width='184'>&nbsp;</td>
                                                            <td width='184'>&nbsp;</td>
                                                            <td width='184'>&nbsp;</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="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
                                                        <td width="106" valign="top">
                                                        <font color="#FF00FF"><?=$item['Name']?></font></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" valign="top">
                                                        Type: <?
                                                        
    switch ( $item['Slot'] ){
                                                            case 
    "1";
                                                            
    $slot "Melee";
                                                            break;
                                                            case 
    "2";
                                                            
    $slot "Ranged";
                                                            break;
                                                            case 
    "3";
                                                            
    $slot "Armor";
                                                            break;
                                                            case 
    "4";
                                                            
    $slot "Set";
                                                            break;
                                                            case 
    "5";
                                                            
    $slot "Special";
                                                            break;
                                                        } echo 
    $slot;

                                                            
    ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" 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="106" valign="top">
                                                        Lv. Min: <?=$item['ResLevel']?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" valign="top">
                                                        Price: <?=$item['CashPrice']?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106">
                                                        <p align="center">
                                                        <a href="index.php?do=rzitemshop&sub=details&id=<?=$item['CSID']?>"><img border="0" src="images/buy_btn.jpg" width="50" height="20"></a></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="105">&nbsp;</td>
                                                        <td width="106">&nbsp;</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="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
                                                        <td width="110" valign="top">
                                                        <font color="#FF00FF"><?=$item['Name']?></font></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110" valign="top">
                                                        Type: <?
                                                        
    switch ( $item['Slot'] ){
                                                            case 
    "1";
                                                            
    $slot "Melee";
                                                            break;
                                                            case 
    "2";
                                                            
    $slot "Ranged";
                                                            break;
                                                            case 
    "3";
                                                            
    $slot "Armor";
                                                            break;
                                                            case 
    "4";
                                                            
    $slot "Set";
                                                            break;
                                                            case 
    "5";
                                                            
    $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">
                                                        Price: <?=$item['CashPrice']?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110">
                                                        <p align="center">
                                                        <a href="index.php?do=rzitemshop&sub=details&id=<?=$item['CSID']?>"><img border="0" src="images/buy_btn.jpg" width="50" height="20"></a></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="105">&nbsp;</td>
                                                        <td width="110">&nbsp;</td>
                                                    </tr>
                                                </table>

    </body>

    </html>
    </td>                                                <?
                                                     $count
    ++;
                                                }
                                            }   
    ?>
                                                <td width="30">
                                                &nbsp;<p>&nbsp;</p>
                                                <p>&nbsp;</p>
                                                <p>&nbsp;</td>
                                            </tr>

                                            <tr>
                                                <td width="445" colspan="2">&nbsp;</td>
                                            </tr>

                                            <tr>
                                                <td width="12" colspan="2"></td>
                                            </tr>
                                            </table>
                                    </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td background="images/cont_top.jpg" height="27">&nbsp;</td>
                                </tr>
                            </table>
                        </div>
        <?
        
    }  }



    //Items details




    if(!function_exists("ShowItemsDetails")){
        function 
    ShowItemsDetails(){
        if(
    $_GET['id'] == ""){
            
    re_dir("index.php");
        }
        
    $itemid clean($_GET['id']);
        
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
        
    $item mssql_fetch_assoc($res);
        
    ?>
                            <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="images/cont_up.jpg">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td background="images/cont_bg.jpg">
                                    <div align="center">
                                        <table border="0" style="border-collapse: collapse" width="454" height="100%">
                                            <tr>
                                                <td width="4" rowspan="7">&nbsp;</td>
                                                <td width="429">
                                                <img border="0" src="images/inf/itemdetails.png" width="413" height="18"></td>
                                                <td width="8">&nbsp;</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">&nbsp;</td>
                                                                <td width="91">&nbsp;</td>
                                                                <td width="14">&nbsp;</td>
                                                            </tr>
                                                            <tr>
                                                                <td width="11">&nbsp;</td>
                                                                <td width="91">
                                                                <img border="2" src="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
                                                                <td width="14">&nbsp;</td>
                                                            </tr>
                                                            <tr>
                                                                <td width="11">&nbsp;</td>
                                                                <td width="91">&nbsp;</td>
                                                                <td width="14">&nbsp;</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">
                                                                    <font color="#FF00FF"><?=$item['Name']?></fonts></span></b></div>
                                                                                                                                    <br><font color="#FFFFFF"><?=$item['Description']?></fonts>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td width="55" height="15">
                                                                </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 "Melee";
                                                            break;
                                                            case 
    "2";
                                                            
    $slot "Ranged";
                                                            break;
                                                            case 
    "3";
                                                            
    $slot "Armor";
                                                            break;
                                                            case 
    "4";
                                                            
    $slot "Set";
                                                            break;
                                                            case 
    "5";
                                                            
    $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>Price:</b></td>
                                                                <td width="251"><?=$item['CashPrice']?></td>
                                                            </tr>
                                                            <tr>
                                                                <td width="55">&nbsp;</td>
                                                                <td width="251">&nbsp;</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">&nbsp;</td>
                                                                            <td width="146" height="27" colspan="3">&nbsp;</td>
                                                                            <td width="128" height="27" colspan="3">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>FR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['FR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>PR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['PR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>CR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['CR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</td>
                                                                            <td width="75">
                                                                            <b>Reload
                                                                            Time</b></td>
                                                                            <td width="44" align="right">
                                                                            <?=$item['ReloadTime']?></td>
                                                                            <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="88">
                                                                            <b>
                                                                            Control</b></td>
                                                                            <td width="48" align="right">
                                                                            <?=$item['Control']?></td>
                                                                            <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>LR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['LR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="4">&nbsp;</td>
                                                                            <td width="88">
                                                                            <b>Max
                                                                            Bullet</b></td>
                                                                            <td width="44" align="right">
                                                                            <?=$item['MaxBullet']?></td>
                                                                            <td width="7" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="75">
                                                                            <b>
                                                                            Duration</b></td>
                                                                            <td width="48" align="right">
                                                                            Unlimited</td>
                                                                            <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="67">&nbsp;</td>
                                                                            <td width="62">&nbsp;</td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</td>
                                                                            <td width="75">&nbsp;</td>
                                                                            <td width="51" colspan="2">&nbsp;</td>
                                                                            <td width="88">&nbsp;</td>
                                                                            <td width="54" colspan="2">&nbsp;</td>
                                                                            <td width="67">&nbsp;</td>
                                                                            <td width="68" colspan="2">&nbsp;</td>
                                                                        </tr>
                                                                    </table>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td width="432" valign="top" colspan="2">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="432" valign="top" colspan="2">
                                                        <p align="center">
                                                        <a href="index.php?do=rzitemshop&sub=buyitem&expand=1&itemid=<?=$item['CSID']?>">
                                                        <img border="0" src="images/buyitem.jpg" width="50" height="20"></a>&nbsp;
                                                        <a href="index.php?do=rzitemshop&sub=giftitem&expand=1&itemid=<?=$item['CSID']?>">
                                                        <img border="0" src="images/giftitem.jpg" width="50" height="20"></a></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="432" valign="top" colspan="2">&nbsp;</td>
                                                    </tr>
                                                </table>
                                                </td>
                                            </tr>

                                            <tr>
                                                <td width="1"></td>
                                            </tr>
                                            </table>
                                    </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td background="images/cont_top.jpg" height="27">&nbsp;</td>
                                </tr>
                            </table>
                        </div>
        <?

    }   }


    if(!
    function_exists("ShowBuyItem")){
        function 
    ShowBuyItem(){
           if(
    $_SESSION['AID'] == ""){
                
    re_dir("index.php?do=login");
           }
           
    $item2 clean($_GET['itemid']);
           
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           
    $item mssql_fetch_assoc($res);
           
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           
    $acc mssql_fetch_assoc($res2);
           if(isset(
    $_POST['submit'])){
                
    $itemid clean($_POST['ItemID']);
                
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                
    $item mssql_fetch_assoc($res);
                
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                
    $acc mssql_fetch_assoc($res2);
                
    $aid $_SESSION['AID'];
                
    $updatecoins $acc['RZCoins'] - $item['CashPrice'];
                
    $zitemid $item['ItemID'];
                if(
    $updatecoins 0){
                    die(
    "No Bug here :) CoDeD By LaMbDa FrOm SpAiN!!! :)");
                }
                
    mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$aid', '$zitemid', GETDATE(), 0)");
                
    mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                
    msgbox("Item purchased correctly, you can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
           }
           
    ?>
                               <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="images/cont_up.jpg">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td background="images/cont_bg.jpg">
                                    <div align="center">
                                        <table border="0" style="border-collapse: collapse" width="454" height="100%">
                                            <tr>
                                                <td width="4" rowspan="7">&nbsp;</td>
                                                <td width="429">
                                                <img border="0" src="images/inf/buyitem.png" width="414" height="19"></td>
                                                <td width="8">&nbsp;</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">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Name of
                                                        item</td>
                                                        <td width="8" valign="top">&nbsp;</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">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$_SESSION['UserID']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Price</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$item['CashPrice']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        you have</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$acc['RZCoins']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        To you later</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?
                                                        $result 
    $acc['RZCoins']-$item['CashPrice'];
                                                        if(
    $result 0){
                                                            
    $boton "<b>RZ Coins insufficient</b>";
                                                        }else{
                                                            
    $boton "<input type='submit' value='Buy item' name='submit'>";
                                                        }

                                                            echo 
    $acc['RZCoins']-$item['CashPrice'];?> </b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</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">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="430" valign="top" colspan="3">
                                                        <form method="POST" action="index.php?do=rzitemshop&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="images/cont_top.jpg" height="27">&nbsp;</td>
                                </tr>
                            </table>
                        </div>

    <?

    }   }
    if(!
    function_exists("ShowGiftItem")){
        function 
    ShowgiftItem(){
           if(
    $_SESSION['AID'] == ""){
                
    re_dir("index.php?do=login");
           }
           
    $item2 clean($_GET['itemid']);
           
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           
    $item mssql_fetch_assoc($res);
           
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           
    $acc mssql_fetch_assoc($res2);

    if (isset(
    $_POST['submit'])){
        
    $type clean($_POST['type']);
        
    $id clean($_POST['id']);
        
    $reason clean($_POST['reason']);
        
    $custom clean($_POST['cstom']);
        
    $itemid clean($_POST['ItemID']);
        
    $item2 clean($_GET['itemid']);
        
    //--
        
    if($reason == 1){
            
    $reason $custom;
            
    $custom str_replace("
            "
    ,"</br>",$custom);
        }
        
    //--
        
    if ($type == 1){
            
    $res mssql_query_logged("SELECT * FROM Account WHERE UserID = '$id'");
            if(
    mssql_num_rows($res) == 0){
                
    msgbox("UserID $id doesnt exist","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
    }else{
                
    $data mssql_fetch_assoc($res);
                
    $userID $data['UserID'];
                
    $UserAID $data['AID'];
                
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                
    $item mssql_fetch_assoc($res);
                
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                
    $acc mssql_fetch_assoc($res2);
                
    $aid $_SESSION['AID'];
                
    $updatecoins $acc['RZCoins'] - $item['CashPrice'];
                
    $zitemid $item['ItemID'];
                if(
    $updatecoins 0){
                    die(
    "No Bug here :) CoDeD By NoLiFe_X!!! :)");
                }
                
    mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$UserAID', '$zitemid', GETDATE(), 0)");
                
    mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                
    msgbox("Item purchased and gifted correctly, your friend can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }
        }else{
            
    $res mssql_query_logged("SELECT * FROM Character WHERE Name = '$id'");
            if(
    mssql_num_rows($res) == 0){
                
    msgbox("The character $id doesnt exist","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }else{
                
    $res mssql_query_logged("SELECT * FROM Character WHERE Name = '$id'");
                
    $data mssql_fetch_assoc($res);
                
    $UserAID $data['AID'];
           
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           
    $item mssql_fetch_assoc($res);
           
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           
    $acc mssql_fetch_assoc($res2);
                
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                
    $item mssql_fetch_assoc($res);
                
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                
    $acc mssql_fetch_assoc($res2);
                
    $aid $_SESSION['AID'];
                
    $updatecoins $acc['RZCoins'] - $item['CashPrice'];
                
    $zitemid $item['ItemID'];
                if(
    $updatecoins 0){
                    die(
    "No Bug here :) CoDeD By NoLiFe_X!!! :)");
                }

                
    mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$UserAID', '$zitemid', GETDATE(), 0)");
                
    mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                
    msgbox("Item purchased and gifted correctly, your friend can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }
        }

    }


    ?>
    <head>
    <meta http-equiv="Content-Language" content="es">
    <link rel="stylesheet" type="text/css" href="images/style.css">
    </head>


        <body bgcolor="#312F30">

                        <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="images/cont_up.jpg">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td background="images/cont_bg.jpg">
                                    <div align="center">
                                        <table border="0" style="border-collapse: collapse" width="454" height="100%">
                                            <tr>
                                                <td width="4" rowspan="7">&nbsp;</td>
                                                <td width="429">
                                                <img border="0" src="images/inf/gift3.png" width="414" height="19"></td>
                                                <td width="8">&nbsp;</td>
                                            </tr>

                                            <tr>
                                                <td width="1"></td>
                                            </tr>

                                            <tr>
                                                <td width="438">
                                        <form name="gift" method="POST" action="">                                            <table border="0" style="border-collapse: collapse" width="436" height="100%">
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Name of
                                                        item</td>
                                                        <td width="8" valign="top">&nbsp;</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">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$_SESSION['UserID']?></b></td>
                                                    </tr>
                                            <tr>
                                                <td width="149">
                                                <p align="right">
                                                <select size="1" name="type">
                                                <option selected value="1">Gifting User ID
                                                </option>
                                                <option value="2">Gifting Character Name
                                                </option>
                                                </select></td>
                                                <td width="4">
                                                &nbsp;</td>
                                                <td width="279">
                                                <input type="text" name="id" size="26">&nbsp;
                                                </td>
                                            </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Price</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$item['CashPrice']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        you have</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$acc['RZCoins']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        To you later</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?
                                                        $result 
    $acc['RZCoins']-$item['CashPrice'];
                                                        if(
    $result 0){
                                                            
    $boton "<b>RZ Coins insufficient</b>";
                                                        }else{
                                                            
    $boton "<input type='submit' value='Gift Item' name='submit'>";
                                                        }

                                                            echo 
    $acc['RZCoins']-$item['CashPrice'];?> </b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="430" valign="top" colspan="3">
                                                        <p align="center">
                                                        <font color="#FF0000"><b>
                                                        NOTE: If you gift an item and then do not want, or is mistaken, we are not responsible</b></font></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="430" valign="top" colspan="3">
                                                        <form method="POST" action="index.php?do=rzitemshop&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="images/cont_top.jpg" height="27">&nbsp;</td>
                                </tr>
                            </table>
                        </div>


    <?
        
    }
    }


    if(
    $_GET['expand'] == 0){

    switch(
    $_GET['sub']){
        case 
    "listallitems";
            
    ListAllItems();
        break;
        case 
    "details";
            
    ShowItemsDetails();
        break;
        case 
    "buyitem";
            
    ShowBuyItem();
        break;
        case 
    "giftitem";
            
    ShowGiftItem();
        break;
    }
    }





    ?>


    ---------- Post added at 02:43 PM ---------- Previous post was at 02:43 PM ----------

    PHP Code:
    <?
    if ($_SESSION['AID'] == ""){
        
    re_dir("index.php?do=login");
    }

    if (
    $_GET['expand'] == 1){

    }

    if(!
    function_exists("ListAllItems")){
    function 
    ListAllItems(){
        if(!isset(
    $_GET['type'])){
            
    $type "";
        }else{
            
    $type "Slot = '".clean($_GET['type'])."' AND";
        }

    $num_por_pagina 8
    $pagina $_GET["pagina"]; 

    if(!
    $pagina)
    {
        
    $pagina 1;
    }

    $primeiro_registro = ($pagina*$num_por_pagina) - $num_por_pagina;
    if (
    $pagina == 1)
    {
        
    $res mssql_query("SELECT TOP $num_por_pagina * FROM RZCashshop WHERE ID > $primeiro_registro-1 AND Opened = '1' ORDER BY ID ASC");
    }
    else
    {
        
    $res mssql_query("SELECT TOP $num_por_pagina * FROM RZCashshop WHERE ID >= $primeiro_registro AND Opened = '1' ORDER BY ID ASC");
    }

    $consulta mssql_query("SELECT COUNT(*) FROM RZCashShop");
    list(
    $total_usuarios) = mssql_fetch_array($consulta);

    $total_paginas $total_usuarios/$num_por_pagina;

    $prev $pagina 1;
    $next $pagina 1;

    if (
    $pagina 1
    {
        
    $prev_link "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$prev\"><b>&laquo; Anterior</b></a></span>";
    }


    if (
    $total_paginas $pagina
    {
        
    $next_link "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$next\"><b>Próxima &raquo;</b></span>";
    }


    $total_paginas ceil($total_paginas);
    $painel "";
    for (
    $x=1$x<=$total_paginas$x++) 
    {
        if (
    $x==$pagina
        { 
            
    $painel .= " <span class=\"pagecurrent\"><b>$x</b></span>";
        }
        else
        {
            
    $painel .= " <span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$x\">$x</a></span>";
        }
    }

        
    ?>
        <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="images/cont_up.jpg">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td background="images/cont_bg.jpg">
                                    <div align="center">
                                        <table border="0" style="border-collapse: collapse" width="454" height="100%">
                                            <tr>
                                                <td width="4" rowspan="11">&nbsp;</td>
                                                <td width="440" colspan="2">
                                                <img border="0" src="images/inf/shop.png"></td>
                                                <td width="30">&nbsp;</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()">
                                                <optgroup label="">
                                                <option>Selecione uma Categoria</option>
                                                <option value="6">Espadas</option>
                                                <option value="1">Armas Curtas</option>
                                                <option value="2">Armas Longas</option>
                                                <option value="3">Equipamento</option>
                                                <option value="4">Roupa Completa</option>
                                                <option value="5">Item Especial</option>
                                                </optgroup></select></form></td>
                                            </tr>

                                            <tr>
                                                <td width="449" colspan="2">
                                                &nbsp;</td>
                                            </tr>
                                            <tr>
                                                <td width="449" colspan="2"><? echo $painel?>/td>
                                            </tr>

                                            <tr>
                                                                                    <?
                                            
    while($item mssql_fetch_assoc($res)) {
                                                if (
    $count == 2) {
                                                    
    $count 1;
                                                    echo 
    "
                                                        </tr><tr>
                                                            <td width='184'>&nbsp;</td>
                                                            <td width='184'>&nbsp;</td>
                                                            <td width='184'>&nbsp;</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="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
                                                        <td width="106" valign="top">
                                                        <font color="#FF00FF"><?=$item['Name']?></font></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" valign="top">
                                                        Type: <?
                                                        
    switch ( $item['Slot'] ){
                                                            case 
    "1";
                                                            
    $slot "Melee";
                                                            break;
                                                            case 
    "2";
                                                            
    $slot "Ranged";
                                                            break;
                                                            case 
    "3";
                                                            
    $slot "Armor";
                                                            break;
                                                            case 
    "4";
                                                            
    $slot "Set";
                                                            break;
                                                            case 
    "5";
                                                            
    $slot "Special";
                                                            break;
                                                        } echo 
    $slot;

                                                            
    ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" 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="106" valign="top">
                                                        Lv. Min: <?=$item['ResLevel']?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" valign="top">
                                                        Price: <?=$item['CashPrice']?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106">
                                                        <p align="center">
                                                        <a href="index.php?do=rzitemshop&sub=details&id=<?=$item['CSID']?>"><img border="0" src="images/buy_btn.jpg" width="50" height="20"></a></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="105">&nbsp;</td>
                                                        <td width="106">&nbsp;</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="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
                                                        <td width="110" valign="top">
                                                        <font color="#FF00FF"><?=$item['Name']?></font></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110" valign="top">
                                                        Type: <?
                                                        
    switch ( $item['Slot'] ){
                                                            case 
    "1";
                                                            
    $slot "Melee";
                                                            break;
                                                            case 
    "2";
                                                            
    $slot "Ranged";
                                                            break;
                                                            case 
    "3";
                                                            
    $slot "Armor";
                                                            break;
                                                            case 
    "4";
                                                            
    $slot "Set";
                                                            break;
                                                            case 
    "5";
                                                            
    $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">
                                                        Price: <?=$item['CashPrice']?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110">
                                                        <p align="center">
                                                        <a href="index.php?do=rzitemshop&sub=details&id=<?=$item['CSID']?>"><img border="0" src="images/buy_btn.jpg" width="50" height="20"></a></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="105">&nbsp;</td>
                                                        <td width="110">&nbsp;</td>
                                                    </tr>
                                                </table>

    </body>

    </html>
    </td>                                                <?
                                                     $count
    ++;
                                                }
                                            }   
    ?>
                                                <td width="30">
                                                &nbsp;<p>&nbsp;</p>
                                                <p>&nbsp;</p>
                                                <p>&nbsp;</td>
                                            </tr>

                                            <tr>
                                                <td width="445" colspan="2">&nbsp;</td>
                                            </tr>

                                            <tr>
                                                <td width="12" colspan="2"></td>
                                            </tr>
                                            </table>
                                    </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td background="images/cont_top.jpg" height="27">&nbsp;</td>
                                </tr>
                            </table>
                        </div>
        <?
        
    }  }



    //Items details




    if(!function_exists("ShowItemsDetails")){
        function 
    ShowItemsDetails(){
        if(
    $_GET['id'] == ""){
            
    re_dir("index.php");
        }
        
    $itemid clean($_GET['id']);
        
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
        
    $item mssql_fetch_assoc($res);
        
    ?>
                            <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="images/cont_up.jpg">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td background="images/cont_bg.jpg">
                                    <div align="center">
                                        <table border="0" style="border-collapse: collapse" width="454" height="100%">
                                            <tr>
                                                <td width="4" rowspan="7">&nbsp;</td>
                                                <td width="429">
                                                <img border="0" src="images/inf/itemdetails.png" width="413" height="18"></td>
                                                <td width="8">&nbsp;</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">&nbsp;</td>
                                                                <td width="91">&nbsp;</td>
                                                                <td width="14">&nbsp;</td>
                                                            </tr>
                                                            <tr>
                                                                <td width="11">&nbsp;</td>
                                                                <td width="91">
                                                                <img border="2" src="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
                                                                <td width="14">&nbsp;</td>
                                                            </tr>
                                                            <tr>
                                                                <td width="11">&nbsp;</td>
                                                                <td width="91">&nbsp;</td>
                                                                <td width="14">&nbsp;</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">
                                                                    <font color="#FF00FF"><?=$item['Name']?></fonts></span></b></div>
                                                                                                                                    <br><font color="#FFFFFF"><?=$item['Description']?></fonts>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td width="55" height="15">
                                                                </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 "Melee";
                                                            break;
                                                            case 
    "2";
                                                            
    $slot "Ranged";
                                                            break;
                                                            case 
    "3";
                                                            
    $slot "Armor";
                                                            break;
                                                            case 
    "4";
                                                            
    $slot "Set";
                                                            break;
                                                            case 
    "5";
                                                            
    $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>Price:</b></td>
                                                                <td width="251"><?=$item['CashPrice']?></td>
                                                            </tr>
                                                            <tr>
                                                                <td width="55">&nbsp;</td>
                                                                <td width="251">&nbsp;</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">&nbsp;</td>
                                                                            <td width="146" height="27" colspan="3">&nbsp;</td>
                                                                            <td width="128" height="27" colspan="3">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>FR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['FR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>PR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['PR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>CR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['CR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</td>
                                                                            <td width="75">
                                                                            <b>Reload
                                                                            Time</b></td>
                                                                            <td width="44" align="right">
                                                                            <?=$item['ReloadTime']?></td>
                                                                            <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="88">
                                                                            <b>
                                                                            Control</b></td>
                                                                            <td width="48" align="right">
                                                                            <?=$item['Control']?></td>
                                                                            <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>LR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['LR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="4">&nbsp;</td>
                                                                            <td width="88">
                                                                            <b>Max
                                                                            Bullet</b></td>
                                                                            <td width="44" align="right">
                                                                            <?=$item['MaxBullet']?></td>
                                                                            <td width="7" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="75">
                                                                            <b>
                                                                            Duration</b></td>
                                                                            <td width="48" align="right">
                                                                            Unlimited</td>
                                                                            <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="67">&nbsp;</td>
                                                                            <td width="62">&nbsp;</td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</td>
                                                                            <td width="75">&nbsp;</td>
                                                                            <td width="51" colspan="2">&nbsp;</td>
                                                                            <td width="88">&nbsp;</td>
                                                                            <td width="54" colspan="2">&nbsp;</td>
                                                                            <td width="67">&nbsp;</td>
                                                                            <td width="68" colspan="2">&nbsp;</td>
                                                                        </tr>
                                                                    </table>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td width="432" valign="top" colspan="2">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="432" valign="top" colspan="2">
                                                        <p align="center">
                                                        <a href="index.php?do=rzitemshop&sub=buyitem&expand=1&itemid=<?=$item['CSID']?>">
                                                        <img border="0" src="images/buyitem.jpg" width="50" height="20"></a>&nbsp;
                                                        <a href="index.php?do=rzitemshop&sub=giftitem&expand=1&itemid=<?=$item['CSID']?>">
                                                        <img border="0" src="images/giftitem.jpg" width="50" height="20"></a></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="432" valign="top" colspan="2">&nbsp;</td>
                                                    </tr>
                                                </table>
                                                </td>
                                            </tr>

                                            <tr>
                                                <td width="1"></td>
                                            </tr>
                                            </table>
                                    </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td background="images/cont_top.jpg" height="27">&nbsp;</td>
                                </tr>
                            </table>
                        </div>
        <?

    }   }


    if(!
    function_exists("ShowBuyItem")){
        function 
    ShowBuyItem(){
           if(
    $_SESSION['AID'] == ""){
                
    re_dir("index.php?do=login");
           }
           
    $item2 clean($_GET['itemid']);
           
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           
    $item mssql_fetch_assoc($res);
           
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           
    $acc mssql_fetch_assoc($res2);
           if(isset(
    $_POST['submit'])){
                
    $itemid clean($_POST['ItemID']);
                
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                
    $item mssql_fetch_assoc($res);
                
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                
    $acc mssql_fetch_assoc($res2);
                
    $aid $_SESSION['AID'];
                
    $updatecoins $acc['RZCoins'] - $item['CashPrice'];
                
    $zitemid $item['ItemID'];
                if(
    $updatecoins 0){
                    die(
    "No Bug here :) CoDeD By LaMbDa FrOm SpAiN!!! :)");
                }
                
    mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$aid', '$zitemid', GETDATE(), 0)");
                
    mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                
    msgbox("Item purchased correctly, you can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
           }
           
    ?>
                               <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="images/cont_up.jpg">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td background="images/cont_bg.jpg">
                                    <div align="center">
                                        <table border="0" style="border-collapse: collapse" width="454" height="100%">
                                            <tr>
                                                <td width="4" rowspan="7">&nbsp;</td>
                                                <td width="429">
                                                <img border="0" src="images/inf/buyitem.png" width="414" height="19"></td>
                                                <td width="8">&nbsp;</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">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Name of
                                                        item</td>
                                                        <td width="8" valign="top">&nbsp;</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">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$_SESSION['UserID']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Price</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$item['CashPrice']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        you have</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$acc['RZCoins']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        To you later</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?
                                                        $result 
    $acc['RZCoins']-$item['CashPrice'];
                                                        if(
    $result 0){
                                                            
    $boton "<b>RZ Coins insufficient</b>";
                                                        }else{
                                                            
    $boton "<input type='submit' value='Buy item' name='submit'>";
                                                        }

                                                            echo 
    $acc['RZCoins']-$item['CashPrice'];?> </b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</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">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="430" valign="top" colspan="3">
                                                        <form method="POST" action="index.php?do=rzitemshop&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="images/cont_top.jpg" height="27">&nbsp;</td>
                                </tr>
                            </table>
                        </div>

    <?

    }   }
    if(!
    function_exists("ShowGiftItem")){
        function 
    ShowgiftItem(){
           if(
    $_SESSION['AID'] == ""){
                
    re_dir("index.php?do=login");
           }
           
    $item2 clean($_GET['itemid']);
           
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           
    $item mssql_fetch_assoc($res);
           
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           
    $acc mssql_fetch_assoc($res2);

    if (isset(
    $_POST['submit'])){
        
    $type clean($_POST['type']);
        
    $id clean($_POST['id']);
        
    $reason clean($_POST['reason']);
        
    $custom clean($_POST['cstom']);
        
    $itemid clean($_POST['ItemID']);
        
    $item2 clean($_GET['itemid']);
        
    //--
        
    if($reason == 1){
            
    $reason $custom;
            
    $custom str_replace("
            "
    ,"</br>",$custom);
        }
        
    //--
        
    if ($type == 1){
            
    $res mssql_query_logged("SELECT * FROM Account WHERE UserID = '$id'");
            if(
    mssql_num_rows($res) == 0){
                
    msgbox("UserID $id doesnt exist","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
    }else{
                
    $data mssql_fetch_assoc($res);
                
    $userID $data['UserID'];
                
    $UserAID $data['AID'];
                
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                
    $item mssql_fetch_assoc($res);
                
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                
    $acc mssql_fetch_assoc($res2);
                
    $aid $_SESSION['AID'];
                
    $updatecoins $acc['RZCoins'] - $item['CashPrice'];
                
    $zitemid $item['ItemID'];
                if(
    $updatecoins 0){
                    die(
    "No Bug here :) CoDeD By NoLiFe_X!!! :)");
                }
                
    mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$UserAID', '$zitemid', GETDATE(), 0)");
                
    mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                
    msgbox("Item purchased and gifted correctly, your friend can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }
        }else{
            
    $res mssql_query_logged("SELECT * FROM Character WHERE Name = '$id'");
            if(
    mssql_num_rows($res) == 0){
                
    msgbox("The character $id doesnt exist","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }else{
                
    $res mssql_query_logged("SELECT * FROM Character WHERE Name = '$id'");
                
    $data mssql_fetch_assoc($res);
                
    $UserAID $data['AID'];
           
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           
    $item mssql_fetch_assoc($res);
           
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           
    $acc mssql_fetch_assoc($res2);
                
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                
    $item mssql_fetch_assoc($res);
                
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                
    $acc mssql_fetch_assoc($res2);
                
    $aid $_SESSION['AID'];
                
    $updatecoins $acc['RZCoins'] - $item['CashPrice'];
                
    $zitemid $item['ItemID'];
                if(
    $updatecoins 0){
                    die(
    "No Bug here :) CoDeD By NoLiFe_X!!! :)");
                }

                
    mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$UserAID', '$zitemid', GETDATE(), 0)");
                
    mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                
    msgbox("Item purchased and gifted correctly, your friend can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }
        }

    }


    ?>
    <head>
    <meta http-equiv="Content-Language" content="es">
    <link rel="stylesheet" type="text/css" href="images/style.css">
    </head>


        <body bgcolor="#312F30">

                        <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="images/cont_up.jpg">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td background="images/cont_bg.jpg">
                                    <div align="center">
                                        <table border="0" style="border-collapse: collapse" width="454" height="100%">
                                            <tr>
                                                <td width="4" rowspan="7">&nbsp;</td>
                                                <td width="429">
                                                <img border="0" src="images/inf/gift3.png" width="414" height="19"></td>
                                                <td width="8">&nbsp;</td>
                                            </tr>

                                            <tr>
                                                <td width="1"></td>
                                            </tr>

                                            <tr>
                                                <td width="438">
                                        <form name="gift" method="POST" action="">                                            <table border="0" style="border-collapse: collapse" width="436" height="100%">
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Name of
                                                        item</td>
                                                        <td width="8" valign="top">&nbsp;</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">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$_SESSION['UserID']?></b></td>
                                                    </tr>
                                            <tr>
                                                <td width="149">
                                                <p align="right">
                                                <select size="1" name="type">
                                                <option selected value="1">Gifting User ID
                                                </option>
                                                <option value="2">Gifting Character Name
                                                </option>
                                                </select></td>
                                                <td width="4">
                                                &nbsp;</td>
                                                <td width="279">
                                                <input type="text" name="id" size="26">&nbsp;
                                                </td>
                                            </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Price</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$item['CashPrice']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        you have</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$acc['RZCoins']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        To you later</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?
                                                        $result 
    $acc['RZCoins']-$item['CashPrice'];
                                                        if(
    $result 0){
                                                            
    $boton "<b>RZ Coins insufficient</b>";
                                                        }else{
                                                            
    $boton "<input type='submit' value='Gift Item' name='submit'>";
                                                        }

                                                            echo 
    $acc['RZCoins']-$item['CashPrice'];?> </b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="430" valign="top" colspan="3">
                                                        <p align="center">
                                                        <font color="#FF0000"><b>
                                                        NOTE: If you gift an item and then do not want, or is mistaken, we are not responsible</b></font></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="430" valign="top" colspan="3">
                                                        <form method="POST" action="index.php?do=rzitemshop&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="images/cont_top.jpg" height="27">&nbsp;</td>
                                </tr>
                            </table>
                        </div>


    <?
        
    }
    }


    if(
    $_GET['expand'] == 0){

    switch(
    $_GET['sub']){
        case 
    "listallitems";
            
    ListAllItems();
        break;
        case 
    "details";
            
    ShowItemsDetails();
        break;
        case 
    "buyitem";
            
    ShowBuyItem();
        break;
        case 
    "giftitem";
            
    ShowGiftItem();
        break;
    }
    }





    ?>

  15. #15
    Banned Flavinho153 is offline
    BannedRank
    Dec 2008 Join Date
    182Posts

    Re: Event/Donator Page

    I did everything right as alfredão said, it looks like it was with the adjustments:

    Now you can tell by the clothes it is only six more clothes.



    I am using the following command:

    PHP Code:
       <?
    if ($_SESSION['AID'] == ""){
        
    re_dir("index.php?do=login");
    }

    if (
    $_GET['expand'] == 1){

    }

    if(!
    function_exists("ListAllItems")){
    function 
    ListAllItems(){
        if(!isset(
    $_GET['type'])){
            
    $type "";
        }else{
            
    $type "Slot = '".clean($_GET['type'])."' AND";
        }

    $num_por_pagina 8
    $pagina $_GET["pagina"]; 

    if(!
    $pagina)
    {
        
    $pagina 1;
    }

    $primeiro_registro = ($pagina*$num_por_pagina) - $num_por_pagina;
    if (
    $pagina == 1)
    {
        
    $res mssql_query("SELECT TOP $num_por_pagina * FROM RZCashshop WHERE ID > $primeiro_registro-1 AND Opened = '1' ORDER BY ID ASC");
    }
    else
    {
        
    $res mssql_query("SELECT TOP $num_por_pagina * FROM RZCashshop WHERE ID >= $primeiro_registro AND Opened = '1' ORDER BY ID ASC");
    }

    $consulta mssql_query("SELECT COUNT(*) FROM RZCashShop");
    list(
    $total_usuarios) = mssql_fetch_array($consulta);

    $total_paginas $total_usuarios/$num_por_pagina;

    $prev $pagina 1;
    $next $pagina 1;

    if (
    $pagina 1
    {
        
    $prev_link "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$prev\"><b>&laquo; Anterior</b></a></span>";
    }


    if (
    $total_paginas $pagina
    {
        
    $next_link "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$next\"><b>Próxima &raquo;</b></span>";
    }


    $total_paginas ceil($total_paginas);
    $painel "";
    for (
    $x=1$x<=$total_paginas$x++) 
    {
        if (
    $x==$pagina
        { 
            
    $painel .= " <span class=\"pagecurrent\"><b>$x</b></span>";
        }
        else
        {
            
    $painel .= " <span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$x\">$x</a></span>";
        }
    }

        
    ?>
        <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="images/cont_up.jpg">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td background="images/cont_bg.jpg">
                                    <div align="center">
                                        <table border="0" style="border-collapse: collapse" width="454" height="100%">
                                            <tr>
                                                <td width="4" rowspan="11">&nbsp;</td>
                                                <td width="440" colspan="2">
                                                <img border="0" src="images/inf/shop.png"></td>
                                                <td width="30">&nbsp;</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()">
                                                <optgroup label="">
                                                <option>Selecione uma Categoria</option>
                                                <option value="6">Espadas</option>
                                                <option value="1">Armas Curtas</option>
                                                <option value="2">Armas Longas</option>
                                                <option value="3">Equipamento</option>
                                                <option value="4">Roupa Completa</option>
                                                <option value="5">Item Especial</option>
                                                </optgroup></select></form></td>
                                            </tr>

                                            <tr>
                                                <td width="449" colspan="2">
                                                &nbsp;</td>
                                            </tr>
                                            <tr>
                                                <td width="449" colspan="2"><? echo $painel?>/td>
                                            </tr>

                                            <tr>
                                                                                    <?
                                            
    while($item mssql_fetch_assoc($res)) {
                                                if (
    $count == 2) {
                                                    
    $count 1;
                                                    echo 
    "
                                                        </tr><tr>
                                                            <td width='184'>&nbsp;</td>
                                                            <td width='184'>&nbsp;</td>
                                                            <td width='184'>&nbsp;</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="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
                                                        <td width="106" valign="top">
                                                        <font color="#FF00FF"><?=$item['Name']?></font></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" valign="top">
                                                        Type: <?
                                                        
    switch ( $item['Slot'] ){
                                                            case 
    "1";
                                                            
    $slot "Melee";
                                                            break;
                                                            case 
    "2";
                                                            
    $slot "Ranged";
                                                            break;
                                                            case 
    "3";
                                                            
    $slot "Armor";
                                                            break;
                                                            case 
    "4";
                                                            
    $slot "Set";
                                                            break;
                                                            case 
    "5";
                                                            
    $slot "Special";
                                                            break;
                                                        } echo 
    $slot;

                                                            
    ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" 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="106" valign="top">
                                                        Lv. Min: <?=$item['ResLevel']?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" valign="top">
                                                        Price: <?=$item['CashPrice']?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106">
                                                        <p align="center">
                                                        <a href="index.php?do=rzitemshop&sub=details&id=<?=$item['CSID']?>"><img border="0" src="images/buy_btn.jpg" width="50" height="20"></a></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="105">&nbsp;</td>
                                                        <td width="106">&nbsp;</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="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
                                                        <td width="110" valign="top">
                                                        <font color="#FF00FF"><?=$item['Name']?></font></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110" valign="top">
                                                        Type: <?
                                                        
    switch ( $item['Slot'] ){
                                                            case 
    "1";
                                                            
    $slot "Melee";
                                                            break;
                                                            case 
    "2";
                                                            
    $slot "Ranged";
                                                            break;
                                                            case 
    "3";
                                                            
    $slot "Armor";
                                                            break;
                                                            case 
    "4";
                                                            
    $slot "Set";
                                                            break;
                                                            case 
    "5";
                                                            
    $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">
                                                        Price: <?=$item['CashPrice']?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110">
                                                        <p align="center">
                                                        <a href="index.php?do=rzitemshop&sub=details&id=<?=$item['CSID']?>"><img border="0" src="images/buy_btn.jpg" width="50" height="20"></a></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="105">&nbsp;</td>
                                                        <td width="110">&nbsp;</td>
                                                    </tr>
                                                </table>

    </body>

    </html>
    </td>                                                <?
                                                     $count
    ++;
                                                }
                                            }   
    ?>
                                                <td width="30">
                                                &nbsp;<p>&nbsp;</p>
                                                <p>&nbsp;</p>
                                                <p>&nbsp;</td>
                                            </tr>

                                            <tr>
                                                <td width="445" colspan="2">&nbsp;</td>
                                            </tr>

                                            <tr>
                                                <td width="12" colspan="2"></td>
                                            </tr>
                                            </table>
                                    </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td background="images/cont_top.jpg" height="27">&nbsp;</td>
                                </tr>
                            </table>
                        </div>
        <?
        
    }  }



    //Items details




    if(!function_exists("ShowItemsDetails")){
        function 
    ShowItemsDetails(){
        if(
    $_GET['id'] == ""){
            
    re_dir("index.php");
        }
        
    $itemid clean($_GET['id']);
        
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
        
    $item mssql_fetch_assoc($res);
        
    ?>
                            <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="images/cont_up.jpg">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td background="images/cont_bg.jpg">
                                    <div align="center">
                                        <table border="0" style="border-collapse: collapse" width="454" height="100%">
                                            <tr>
                                                <td width="4" rowspan="7">&nbsp;</td>
                                                <td width="429">
                                                <img border="0" src="images/inf/itemdetails.png" width="413" height="18"></td>
                                                <td width="8">&nbsp;</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">&nbsp;</td>
                                                                <td width="91">&nbsp;</td>
                                                                <td width="14">&nbsp;</td>
                                                            </tr>
                                                            <tr>
                                                                <td width="11">&nbsp;</td>
                                                                <td width="91">
                                                                <img border="2" src="images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
                                                                <td width="14">&nbsp;</td>
                                                            </tr>
                                                            <tr>
                                                                <td width="11">&nbsp;</td>
                                                                <td width="91">&nbsp;</td>
                                                                <td width="14">&nbsp;</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">
                                                                    <font color="#FF00FF"><?=$item['Name']?></fonts></span></b></div>
                                                                                                                                    <br><font color="#FFFFFF"><?=$item['Description']?></fonts>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td width="55" height="15">
                                                                </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 "Melee";
                                                            break;
                                                            case 
    "2";
                                                            
    $slot "Ranged";
                                                            break;
                                                            case 
    "3";
                                                            
    $slot "Armor";
                                                            break;
                                                            case 
    "4";
                                                            
    $slot "Set";
                                                            break;
                                                            case 
    "5";
                                                            
    $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>Price:</b></td>
                                                                <td width="251"><?=$item['CashPrice']?></td>
                                                            </tr>
                                                            <tr>
                                                                <td width="55">&nbsp;</td>
                                                                <td width="251">&nbsp;</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">&nbsp;</td>
                                                                            <td width="146" height="27" colspan="3">&nbsp;</td>
                                                                            <td width="128" height="27" colspan="3">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>FR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['FR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>PR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['PR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>CR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['CR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</td>
                                                                            <td width="75">
                                                                            <b>Reload
                                                                            Time</b></td>
                                                                            <td width="44" align="right">
                                                                            <?=$item['ReloadTime']?></td>
                                                                            <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="88">
                                                                            <b>
                                                                            Control</b></td>
                                                                            <td width="48" align="right">
                                                                            <?=$item['Control']?></td>
                                                                            <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>LR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['LR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="4">&nbsp;</td>
                                                                            <td width="88">
                                                                            <b>Max
                                                                            Bullet</b></td>
                                                                            <td width="44" align="right">
                                                                            <?=$item['MaxBullet']?></td>
                                                                            <td width="7" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="75">
                                                                            <b>
                                                                            Duration</b></td>
                                                                            <td width="48" align="right">
                                                                            Unlimited</td>
                                                                            <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="67">&nbsp;</td>
                                                                            <td width="62">&nbsp;</td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</td>
                                                                            <td width="75">&nbsp;</td>
                                                                            <td width="51" colspan="2">&nbsp;</td>
                                                                            <td width="88">&nbsp;</td>
                                                                            <td width="54" colspan="2">&nbsp;</td>
                                                                            <td width="67">&nbsp;</td>
                                                                            <td width="68" colspan="2">&nbsp;</td>
                                                                        </tr>
                                                                    </table>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td width="432" valign="top" colspan="2">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="432" valign="top" colspan="2">
                                                        <p align="center">
                                                        <a href="index.php?do=rzitemshop&sub=buyitem&expand=1&itemid=<?=$item['CSID']?>">
                                                        <img border="0" src="images/buyitem.jpg" width="50" height="20"></a>&nbsp;
                                                        <a href="index.php?do=rzitemshop&sub=giftitem&expand=1&itemid=<?=$item['CSID']?>">
                                                        <img border="0" src="images/giftitem.jpg" width="50" height="20"></a></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="432" valign="top" colspan="2">&nbsp;</td>
                                                    </tr>
                                                </table>
                                                </td>
                                            </tr>

                                            <tr>
                                                <td width="1"></td>
                                            </tr>
                                            </table>
                                    </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td background="images/cont_top.jpg" height="27">&nbsp;</td>
                                </tr>
                            </table>
                        </div>
        <?

    }   }


    if(!
    function_exists("ShowBuyItem")){
        function 
    ShowBuyItem(){
           if(
    $_SESSION['AID'] == ""){
                
    re_dir("index.php?do=login");
           }
           
    $item2 clean($_GET['itemid']);
           
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           
    $item mssql_fetch_assoc($res);
           
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           
    $acc mssql_fetch_assoc($res2);
           if(isset(
    $_POST['submit'])){
                
    $itemid clean($_POST['ItemID']);
                
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                
    $item mssql_fetch_assoc($res);
                
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                
    $acc mssql_fetch_assoc($res2);
                
    $aid $_SESSION['AID'];
                
    $updatecoins $acc['RZCoins'] - $item['CashPrice'];
                
    $zitemid $item['ItemID'];
                if(
    $updatecoins 0){
                    die(
    "No Bug here :) CoDeD By LaMbDa FrOm SpAiN!!! :)");
                }
                
    mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$aid', '$zitemid', GETDATE(), 0)");
                
    mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                
    msgbox("Item purchased correctly, you can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
           }
           
    ?>
                               <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="images/cont_up.jpg">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td background="images/cont_bg.jpg">
                                    <div align="center">
                                        <table border="0" style="border-collapse: collapse" width="454" height="100%">
                                            <tr>
                                                <td width="4" rowspan="7">&nbsp;</td>
                                                <td width="429">
                                                <img border="0" src="images/inf/buyitem.png" width="414" height="19"></td>
                                                <td width="8">&nbsp;</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">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Name of
                                                        item</td>
                                                        <td width="8" valign="top">&nbsp;</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">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$_SESSION['UserID']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Price</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$item['CashPrice']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        you have</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$acc['RZCoins']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        To you later</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?
                                                        $result 
    $acc['RZCoins']-$item['CashPrice'];
                                                        if(
    $result 0){
                                                            
    $boton "<b>RZ Coins insufficient</b>";
                                                        }else{
                                                            
    $boton "<input type='submit' value='Buy item' name='submit'>";
                                                        }

                                                            echo 
    $acc['RZCoins']-$item['CashPrice'];?> </b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</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">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="430" valign="top" colspan="3">
                                                        <form method="POST" action="index.php?do=rzitemshop&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="images/cont_top.jpg" height="27">&nbsp;</td>
                                </tr>
                            </table>
                        </div>

    <?

    }   }
    if(!
    function_exists("ShowGiftItem")){
        function 
    ShowgiftItem(){
           if(
    $_SESSION['AID'] == ""){
                
    re_dir("index.php?do=login");
           }
           
    $item2 clean($_GET['itemid']);
           
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           
    $item mssql_fetch_assoc($res);
           
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           
    $acc mssql_fetch_assoc($res2);

    if (isset(
    $_POST['submit'])){
        
    $type clean($_POST['type']);
        
    $id clean($_POST['id']);
        
    $reason clean($_POST['reason']);
        
    $custom clean($_POST['cstom']);
        
    $itemid clean($_POST['ItemID']);
        
    $item2 clean($_GET['itemid']);
        
    //--
        
    if($reason == 1){
            
    $reason $custom;
            
    $custom str_replace("
            "
    ,"</br>",$custom);
        }
        
    //--
        
    if ($type == 1){
            
    $res mssql_query_logged("SELECT * FROM Account WHERE UserID = '$id'");
            if(
    mssql_num_rows($res) == 0){
                
    msgbox("UserID $id doesnt exist","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
    }else{
                
    $data mssql_fetch_assoc($res);
                
    $userID $data['UserID'];
                
    $UserAID $data['AID'];
                
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                
    $item mssql_fetch_assoc($res);
                
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                
    $acc mssql_fetch_assoc($res2);
                
    $aid $_SESSION['AID'];
                
    $updatecoins $acc['RZCoins'] - $item['CashPrice'];
                
    $zitemid $item['ItemID'];
                if(
    $updatecoins 0){
                    die(
    "No Bug here :) CoDeD By NoLiFe_X!!! :)");
                }
                
    mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$UserAID', '$zitemid', GETDATE(), 0)");
                
    mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                
    msgbox("Item purchased and gifted correctly, your friend can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }
        }else{
            
    $res mssql_query_logged("SELECT * FROM Character WHERE Name = '$id'");
            if(
    mssql_num_rows($res) == 0){
                
    msgbox("The character $id doesnt exist","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }else{
                
    $res mssql_query_logged("SELECT * FROM Character WHERE Name = '$id'");
                
    $data mssql_fetch_assoc($res);
                
    $UserAID $data['AID'];
           
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           
    $item mssql_fetch_assoc($res);
           
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           
    $acc mssql_fetch_assoc($res2);
                
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                
    $item mssql_fetch_assoc($res);
                
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                
    $acc mssql_fetch_assoc($res2);
                
    $aid $_SESSION['AID'];
                
    $updatecoins $acc['RZCoins'] - $item['CashPrice'];
                
    $zitemid $item['ItemID'];
                if(
    $updatecoins 0){
                    die(
    "No Bug here :) CoDeD By NoLiFe_X!!! :)");
                }

                
    mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$UserAID', '$zitemid', GETDATE(), 0)");
                
    mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                
    msgbox("Item purchased and gifted correctly, your friend can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }
        }

    }


    ?>
    <head>
    <meta http-equiv="Content-Language" content="es">
    <link rel="stylesheet" type="text/css" href="images/style.css">
    </head>


        <body bgcolor="#312F30">

                        <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="images/cont_up.jpg">&nbsp;</td>
                                </tr>
                                <tr>
                                    <td background="images/cont_bg.jpg">
                                    <div align="center">
                                        <table border="0" style="border-collapse: collapse" width="454" height="100%">
                                            <tr>
                                                <td width="4" rowspan="7">&nbsp;</td>
                                                <td width="429">
                                                <img border="0" src="images/inf/gift3.png" width="414" height="19"></td>
                                                <td width="8">&nbsp;</td>
                                            </tr>

                                            <tr>
                                                <td width="1"></td>
                                            </tr>

                                            <tr>
                                                <td width="438">
                                        <form name="gift" method="POST" action="">                                            <table border="0" style="border-collapse: collapse" width="436" height="100%">
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Name of
                                                        item</td>
                                                        <td width="8" valign="top">&nbsp;</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">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$_SESSION['UserID']?></b></td>
                                                    </tr>
                                            <tr>
                                                <td width="149">
                                                <p align="right">
                                                <select size="1" name="type">
                                                <option selected value="1">Gifting User ID
                                                </option>
                                                <option value="2">Gifting Character Name
                                                </option>
                                                </select></td>
                                                <td width="4">
                                                &nbsp;</td>
                                                <td width="279">
                                                <input type="text" name="id" size="26">&nbsp;
                                                </td>
                                            </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Price</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$item['CashPrice']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        you have</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$acc['RZCoins']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        To you later</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?
                                                        $result 
    $acc['RZCoins']-$item['CashPrice'];
                                                        if(
    $result 0){
                                                            
    $boton "<b>RZ Coins insufficient</b>";
                                                        }else{
                                                            
    $boton "<input type='submit' value='Gift Item' name='submit'>";
                                                        }

                                                            echo 
    $acc['RZCoins']-$item['CashPrice'];?> </b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="430" valign="top" colspan="3">
                                                        <p align="center">
                                                        <font color="#FF0000"><b>
                                                        NOTE: If you gift an item and then do not want, or is mistaken, we are not responsible</b></font></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="430" valign="top" colspan="3">
                                                        <form method="POST" action="index.php?do=rzitemshop&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="images/cont_top.jpg" height="27">&nbsp;</td>
                                </tr>
                            </table>
                        </div>


    <?
        
    }
    }


    if(
    $_GET['expand'] == 0){

    switch(
    $_GET['sub']){
        case 
    "listallitems";
            
    ListAllItems();
        break;
        case 
    "details";
            
    ShowItemsDetails();
        break;
        case 
    "buyitem";
            
    ShowBuyItem();
        break;
        case 
    "giftitem";
            
    ShowGiftItem();
        break;
    }
    }





    ?>
    Last edited by Flavinho153; 02-12-09 at 02:49 AM.

  16. #16
    Banned Flavinho153 is offline
    BannedRank
    Dec 2008 Join Date
    182Posts

    Re: Event/Donator Page

    Don't have page in shop :@

  17. #17
    Account Upgraded | Title Enabled! alfredao is offline
    MemberRank
    Jan 2008 Join Date
    Coronel FabriciLocation
    705Posts

    Re: Event/Donator Page

    Quote Originally Posted by Flavinho153 View Post
    Don't have page in shop :@
    http://forum.ragezone.com/f311/event...7/#post5394409

  18. #18
    Banned Flavinho153 is offline
    BannedRank
    Dec 2008 Join Date
    182Posts

    Re: Event/Donator Page

    Yes! I looked and checked, already has the DIY but do not have to choose the pages ...

  19. #19
    Account Upgraded | Title Enabled! alfredao is offline
    MemberRank
    Jan 2008 Join Date
    Coronel FabriciLocation
    705Posts

    Re: Event/Donator Page

    Add a <? echo $painel; ?> where you want to see the links

  20. #20
    Banned Flavinho153 is offline
    BannedRank
    Dec 2008 Join Date
    182Posts

    Re: Event/Donator Page

    Excuse my insistence I put it all right. See the PHP code I'm using:

    PHP Code:
    if ($_SESSION['AID'] == ""){
        re_dir("index.php?do=login");
    }

    if ($_GET['expand'] == 1){

    }

    if(!function_exists("ListAllItems")){
    function ListAllItems(){
        if(!isset($_GET['type'])){
            $type = "";
        }else{
            $type = "Slot = '".clean($_GET['type'])."' AND";
        }

    $num_por_pagina = 8; 
    $pagina = $_GET["pagina"]; 

    if(!$pagina)
    {
        $pagina = 1;
    }

    $primeiro_registro = ($pagina*$num_por_pagina) - $num_por_pagina;
    if ($pagina == 1)
    {
        $res = mssql_query("SELECT TOP $num_por_pagina * FROM RZCashshop WHERE ID > $primeiro_registro-1 AND Opened = '1' ORDER BY ID ASC");
    }
    else
    {
        $res = mssql_query("SELECT TOP $num_por_pagina * FROM RZCashshop WHERE ID >= $primeiro_registro AND Opened = '1' ORDER BY ID ASC");
    }

    $consulta = mssql_query("SELECT COUNT(*) FROM RZCashShop");
    list($total_usuarios) = mssql_fetch_array($consulta);

    $total_paginas = $total_usuarios/$num_por_pagina;

    $prev = $pagina - 1;
    $next = $pagina + 1;

    if ($pagina > 1) 
    {
        $prev_link = "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$prev\"><b>&laquo; Anterior</b></a></span>";
    }


    if ($total_paginas > $pagina) 
    {
        $next_link = "<span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$next\"><b>Próxima &raquo;</b></span>";
    }


    $total_paginas = ceil($total_paginas);
    $painel = "";
    for ($x=1; $x<=$total_paginas; $x++) 
    {
        if ($x==$pagina) 
        { 
            $painel .= " <span class=\"pagecurrent\"><b>$x</b></span>";
        }
        else
        {
            $painel .= " <span class=\"pagelink\"><a href=\"index.php?do=shop&pagina=$x\">$x</a></span>";
        }
    }

        ?>
        <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="http://forum.ragezone.com/images/cont_up.jpg">&nbsp;</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">&nbsp;</td>
                                                <td width="440" colspan="2">
                                                <img border="0" src="http://forum.ragezone.com/images/inf/shop.png"></td>
                                                <td width="30">&nbsp;</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()">
                                                <optgroup label="">
                                                <option>Selecione uma Categoria</option>
                                                <option value="6">Espadas</option>
                                                <option value="1">Armas Curtas</option>
                                                <option value="2">Armas Longas</option>
                                                <option value="3">Equipamento</option>
                                                <option value="4">Roupa Completa</option>
                                                <option value="5">Item Especial</option>
                                                </optgroup></select></form></td>
                                            </tr>

                                            <tr>
                                                <td width="449" colspan="2">
                                                &nbsp;</td>
                                            </tr>
                                            <tr>
                                                <td width="449" colspan="2"><? echo $painel?>/td>
                                            </tr>

                                            <tr>
                                                                                    <?
                                            
    while($item mssql_fetch_assoc($res)) {
                                                if (
    $count == 2) {
                                                    
    $count 1;
                                                    echo 
    "
                                                        </tr><tr>
                                                            <td width='184'>&nbsp;</td>
                                                            <td width='184'>&nbsp;</td>
                                                            <td width='184'>&nbsp;</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/<?=$item['WebImgName']?>" width="100" height="100"></td>
                                                        <td width="106" valign="top">
                                                        <font color="#FF00FF"><?=$item['Name']?></font></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" valign="top">
                                                        Type: <?
                                                        
    switch ( $item['Slot'] ){
                                                            case 
    "1";
                                                            
    $slot "Melee";
                                                            break;
                                                            case 
    "2";
                                                            
    $slot "Ranged";
                                                            break;
                                                            case 
    "3";
                                                            
    $slot "Armor";
                                                            break;
                                                            case 
    "4";
                                                            
    $slot "Set";
                                                            break;
                                                            case 
    "5";
                                                            
    $slot "Special";
                                                            break;
                                                        } echo 
    $slot;

                                                            
    ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" 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="106" valign="top">
                                                        Lv. Min: <?=$item['ResLevel']?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106" valign="top">
                                                        Price: <?=$item['CashPrice']?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106">
                                                        <p align="center">
                                                        <a href="index.php?do=rzitemshop&sub=details&id=<?=$item['CSID']?>"><img border="0" src="http://forum.ragezone.com/images/buy_btn.jpg" width="50" height="20"></a></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="106">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="105">&nbsp;</td>
                                                        <td width="106">&nbsp;</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']?>" width="100" height="100"></td>
                                                        <td width="110" valign="top">
                                                        <font color="#FF00FF"><?=$item['Name']?></font></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110" valign="top">
                                                        Type: <?
                                                        
    switch ( $item['Slot'] ){
                                                            case 
    "1";
                                                            
    $slot "Melee";
                                                            break;
                                                            case 
    "2";
                                                            
    $slot "Ranged";
                                                            break;
                                                            case 
    "3";
                                                            
    $slot "Armor";
                                                            break;
                                                            case 
    "4";
                                                            
    $slot "Set";
                                                            break;
                                                            case 
    "5";
                                                            
    $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">
                                                        Price: <?=$item['CashPrice']?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110">
                                                        <p align="center">
                                                        <a href="index.php?do=rzitemshop&sub=details&id=<?=$item['CSID']?>"><img border="0" src="http://forum.ragezone.com/images/buy_btn.jpg" width="50" height="20"></a></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="110">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="105">&nbsp;</td>
                                                        <td width="110">&nbsp;</td>
                                                    </tr>
                                                </table>

    </body>

    </html>
    </td>                                                <?
                                                     $count
    ++;
                                                }
                                            }   
    ?>
                                                <td width="30">
                                                &nbsp;<p>&nbsp;</p>
                                                <p>&nbsp;</p>
                                                <p>&nbsp;</td>
                                            </tr>

                                            <tr>
                                                <td width="445" colspan="2">&nbsp;</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">&nbsp;</td>
                                </tr>
                            </table>
                        </div>
        <?
        
    }  }



    //Items details




    if(!function_exists("ShowItemsDetails")){
        function 
    ShowItemsDetails(){
        if(
    $_GET['id'] == ""){
            
    re_dir("index.php");
        }
        
    $itemid clean($_GET['id']);
        
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
        
    $item mssql_fetch_assoc($res);
        
    ?>
                            <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="http://forum.ragezone.com/images/cont_up.jpg">&nbsp;</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">&nbsp;</td>
                                                <td width="429">
                                                <img border="0" src="http://forum.ragezone.com/images/inf/itemdetails.png" width="413" height="18"></td>
                                                <td width="8">&nbsp;</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">&nbsp;</td>
                                                                <td width="91">&nbsp;</td>
                                                                <td width="14">&nbsp;</td>
                                                            </tr>
                                                            <tr>
                                                                <td width="11">&nbsp;</td>
                                                                <td width="91">
                                                                <img border="2" src="http://forum.ragezone.com/images/shop/<?=$item['WebImgName']?>" width="100" height="100"></td>
                                                                <td width="14">&nbsp;</td>
                                                            </tr>
                                                            <tr>
                                                                <td width="11">&nbsp;</td>
                                                                <td width="91">&nbsp;</td>
                                                                <td width="14">&nbsp;</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">
                                                                    <font color="#FF00FF"><?=$item['Name']?></fonts></span></b></div>
                                                                                                                                    <br><font color="#FFFFFF"><?=$item['Description']?></fonts>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td width="55" height="15">
                                                                </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 "Melee";
                                                            break;
                                                            case 
    "2";
                                                            
    $slot "Ranged";
                                                            break;
                                                            case 
    "3";
                                                            
    $slot "Armor";
                                                            break;
                                                            case 
    "4";
                                                            
    $slot "Set";
                                                            break;
                                                            case 
    "5";
                                                            
    $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>Price:</b></td>
                                                                <td width="251"><?=$item['CashPrice']?></td>
                                                            </tr>
                                                            <tr>
                                                                <td width="55">&nbsp;</td>
                                                                <td width="251">&nbsp;</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">&nbsp;</td>
                                                                            <td width="146" height="27" colspan="3">&nbsp;</td>
                                                                            <td width="128" height="27" colspan="3">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>FR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['FR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>PR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['PR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</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')">&nbsp;</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')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>CR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['CR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</td>
                                                                            <td width="75">
                                                                            <b>Reload
                                                                            Time</b></td>
                                                                            <td width="44" align="right">
                                                                            <?=$item['ReloadTime']?></td>
                                                                            <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="88">
                                                                            <b>
                                                                            Control</b></td>
                                                                            <td width="48" align="right">
                                                                            <?=$item['Control']?></td>
                                                                            <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="67">
                                                                            <b>LR</b></td>
                                                                            <td width="62" align="right">
                                                                            <?=$item['LR']?></td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="4">&nbsp;</td>
                                                                            <td width="88">
                                                                            <b>Max
                                                                            Bullet</b></td>
                                                                            <td width="44" align="right">
                                                                            <?=$item['MaxBullet']?></td>
                                                                            <td width="7" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="75">
                                                                            <b>
                                                                            Duration</b></td>
                                                                            <td width="48" align="right">
                                                                            Unlimited</td>
                                                                            <td width="4" style="background-image: url('images/table_sep.jpg')">&nbsp;</td>
                                                                            <td width="67">&nbsp;</td>
                                                                            <td width="62">&nbsp;</td>
                                                                            <td width="4">&nbsp;</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="7">&nbsp;</td>
                                                                            <td width="75">&nbsp;</td>
                                                                            <td width="51" colspan="2">&nbsp;</td>
                                                                            <td width="88">&nbsp;</td>
                                                                            <td width="54" colspan="2">&nbsp;</td>
                                                                            <td width="67">&nbsp;</td>
                                                                            <td width="68" colspan="2">&nbsp;</td>
                                                                        </tr>
                                                                    </table>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td width="432" valign="top" colspan="2">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="432" valign="top" colspan="2">
                                                        <p align="center">
                                                        <a href="index.php?do=rzitemshop&sub=buyitem&expand=1&itemid=<?=$item['CSID']?>">
                                                        <img border="0" src="http://forum.ragezone.com/images/buyitem.jpg" width="50" height="20"></a>&nbsp;
                                                        <a href="index.php?do=rzitemshop&sub=giftitem&expand=1&itemid=<?=$item['CSID']?>">
                                                        <img border="0" src="http://forum.ragezone.com/images/giftitem.jpg" width="50" height="20"></a></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="432" valign="top" colspan="2">&nbsp;</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">&nbsp;</td>
                                </tr>
                            </table>
                        </div>
        <?

    }   }


    if(!
    function_exists("ShowBuyItem")){
        function 
    ShowBuyItem(){
           if(
    $_SESSION['AID'] == ""){
                
    re_dir("index.php?do=login");
           }
           
    $item2 clean($_GET['itemid']);
           
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           
    $item mssql_fetch_assoc($res);
           
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           
    $acc mssql_fetch_assoc($res2);
           if(isset(
    $_POST['submit'])){
                
    $itemid clean($_POST['ItemID']);
                
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                
    $item mssql_fetch_assoc($res);
                
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                
    $acc mssql_fetch_assoc($res2);
                
    $aid $_SESSION['AID'];
                
    $updatecoins $acc['RZCoins'] - $item['CashPrice'];
                
    $zitemid $item['ItemID'];
                if(
    $updatecoins 0){
                    die(
    "No Bug here :) CoDeD By LaMbDa FrOm SpAiN!!! :)");
                }
                
    mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$aid', '$zitemid', GETDATE(), 0)");
                
    mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                
    msgbox("Item purchased correctly, you can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
           }
           
    ?>
                               <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="http://forum.ragezone.com/images/cont_up.jpg">&nbsp;</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">&nbsp;</td>
                                                <td width="429">
                                                <img border="0" src="http://forum.ragezone.com/images/inf/buyitem.png" width="414" height="19"></td>
                                                <td width="8">&nbsp;</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">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Name of
                                                        item</td>
                                                        <td width="8" valign="top">&nbsp;</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">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$_SESSION['UserID']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Price</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$item['CashPrice']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        you have</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$acc['RZCoins']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        To you later</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?
                                                        $result 
    $acc['RZCoins']-$item['CashPrice'];
                                                        if(
    $result 0){
                                                            
    $boton "<b>RZ Coins insufficient</b>";
                                                        }else{
                                                            
    $boton "<input type='submit' value='Buy item' name='submit'>";
                                                        }

                                                            echo 
    $acc['RZCoins']-$item['CashPrice'];?> </b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</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">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="430" valign="top" colspan="3">
                                                        <form method="POST" action="index.php?do=rzitemshop&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">&nbsp;</td>
                                </tr>
                            </table>
                        </div>

    <?

    }   }
    if(!
    function_exists("ShowGiftItem")){
        function 
    ShowgiftItem(){
           if(
    $_SESSION['AID'] == ""){
                
    re_dir("index.php?do=login");
           }
           
    $item2 clean($_GET['itemid']);
           
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           
    $item mssql_fetch_assoc($res);
           
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           
    $acc mssql_fetch_assoc($res2);

    if (isset(
    $_POST['submit'])){
        
    $type clean($_POST['type']);
        
    $id clean($_POST['id']);
        
    $reason clean($_POST['reason']);
        
    $custom clean($_POST['cstom']);
        
    $itemid clean($_POST['ItemID']);
        
    $item2 clean($_GET['itemid']);
        
    //--
        
    if($reason == 1){
            
    $reason $custom;
            
    $custom str_replace("
            "
    ,"</br>",$custom);
        }
        
    //--
        
    if ($type == 1){
            
    $res mssql_query_logged("SELECT * FROM Account WHERE UserID = '$id'");
            if(
    mssql_num_rows($res) == 0){
                
    msgbox("UserID $id doesnt exist","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
    }else{
                
    $data mssql_fetch_assoc($res);
                
    $userID $data['UserID'];
                
    $UserAID $data['AID'];
                
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                
    $item mssql_fetch_assoc($res);
                
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                
    $acc mssql_fetch_assoc($res2);
                
    $aid $_SESSION['AID'];
                
    $updatecoins $acc['RZCoins'] - $item['CashPrice'];
                
    $zitemid $item['ItemID'];
                if(
    $updatecoins 0){
                    die(
    "No Bug here :) CoDeD By NoLiFe_X!!! :)");
                }
                
    mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$UserAID', '$zitemid', GETDATE(), 0)");
                
    mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                
    msgbox("Item purchased and gifted correctly, your friend can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }
        }else{
            
    $res mssql_query_logged("SELECT * FROM Character WHERE Name = '$id'");
            if(
    mssql_num_rows($res) == 0){
                
    msgbox("The character $id doesnt exist","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }else{
                
    $res mssql_query_logged("SELECT * FROM Character WHERE Name = '$id'");
                
    $data mssql_fetch_assoc($res);
                
    $UserAID $data['AID'];
           
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$item2'");
           
    $item mssql_fetch_assoc($res);
           
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
           
    $acc mssql_fetch_assoc($res2);
                
    $res mssql_query_logged("SELECT * FROM RZCashShop WHERE CSID = '$itemid'");
                
    $item mssql_fetch_assoc($res);
                
    $res2 mssql_query_logged("SELECT RZCoins FROM Login WHERE AID = '".$_SESSION['AID']."'");
                
    $acc mssql_fetch_assoc($res2);
                
    $aid $_SESSION['AID'];
                
    $updatecoins $acc['RZCoins'] - $item['CashPrice'];
                
    $zitemid $item['ItemID'];
                if(
    $updatecoins 0){
                    die(
    "No Bug here :) CoDeD By NoLiFe_X!!! :)");
                }

                
    mssql_query_logged("INSERT INTO AccountItem ([ShopItemID], [AID], [ItemID], [RentDate], [Cnt])VALUES('$itemid', '$UserAID', '$zitemid', GETDATE(), 0)");
                
    mssql_query_logged("UPDATE Login SET RZCoins = '$updatecoins' WHERE AID = '$aid'");
                
    msgbox("Item purchased and gifted correctly, your friend can get it in Nolife_x GunZ central bank","index.php?do=rzitemshop&sub=listallitems&expand=1&type=1");
            }
        }

    }


    ?>
    <head>
    <meta http-equiv="Content-Language" content="es">
    <link rel="stylesheet" type="text/css" href="http://forum.ragezone.com/images/style.css">
    </head>


        <body bgcolor="#312F30">

                        <div align="center">
                            <table border="0" width="456" style="border-collapse: collapse">
                                <tr>
                                    <td background="http://forum.ragezone.com/images/cont_up.jpg">&nbsp;</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">&nbsp;</td>
                                                <td width="429">
                                                <img border="0" src="http://forum.ragezone.com/images/inf/gift3.png" width="414" height="19"></td>
                                                <td width="8">&nbsp;</td>
                                            </tr>

                                            <tr>
                                                <td width="1"></td>
                                            </tr>

                                            <tr>
                                                <td width="438">
                                        <form name="gift" method="POST" action="">                                            <table border="0" style="border-collapse: collapse" width="436" height="100%">
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Name of
                                                        item</td>
                                                        <td width="8" valign="top">&nbsp;</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">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$_SESSION['UserID']?></b></td>
                                                    </tr>
                                            <tr>
                                                <td width="149">
                                                <p align="right">
                                                <select size="1" name="type">
                                                <option selected value="1">Gifting User ID
                                                </option>
                                                <option value="2">Gifting Character Name
                                                </option>
                                                </select></td>
                                                <td width="4">
                                                &nbsp;</td>
                                                <td width="279">
                                                <input type="text" name="id" size="26">&nbsp;
                                                </td>
                                            </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">Price</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$item['CashPrice']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        you have</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?=$acc['RZCoins']?></b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">
                                                        <p align="right">RZ Coins
                                                        To you later</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">
                                                        <b><?
                                                        $result 
    $acc['RZCoins']-$item['CashPrice'];
                                                        if(
    $result 0){
                                                            
    $boton "<b>RZ Coins insufficient</b>";
                                                        }else{
                                                            
    $boton "<input type='submit' value='Gift Item' name='submit'>";
                                                        }

                                                            echo 
    $acc['RZCoins']-$item['CashPrice'];?> </b></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="430" valign="top" colspan="3">
                                                        <p align="center">
                                                        <font color="#FF0000"><b>
                                                        NOTE: If you gift an item and then do not want, or is mistaken, we are not responsible</b></font></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="200" valign="top">&nbsp;</td>
                                                        <td width="8" valign="top">&nbsp;</td>
                                                        <td width="222" valign="top">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="430" valign="top" colspan="3">
                                                        <form method="POST" action="index.php?do=rzitemshop&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">&nbsp;</td>
                                </tr>
                            </table>
                        </div>


    <?
        
    }
    }


    if(
    $_GET['expand'] == 0){

    switch(
    $_GET['sub']){
        case 
    "listallitems";
            
    ListAllItems();
        break;
        case 
    "details";
            
    ShowItemsDetails();
        break;
        case 
    "buyitem";
            
    ShowBuyItem();
        break;
        case 
    "giftitem";
            
    ShowGiftItem();
        break;
    }
    }





    ?>
    This number refers to a page. More where are the others?
    Last edited by Flavinho153; 04-12-09 at 02:39 AM.

  21. #21
    Be a kicker than cheater. cheaterastic is offline
    MemberRank
    Dec 2009 Join Date
    764Posts

    Re: Event/Donator Page

    I have now solved like that problem, click this link: http://forum.ragezone.com/f311/nolif...solved-694123/

    Click Thanks Button, because that will help you....



Advertisement