• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Request script

kito2

www.masteria.net
Joined
Mar 9, 2009
Messages
3,764
Solutions
1
Reaction score
227
Location
Chile, Santiago
Hi there I have this script
PHP:
<?php
echo "<h2>Shop</h2>";
echo "Welcome to the " . $serverName . " Shop. " . $extraDescription;
if ($logged){
echo '<br /><br /><font color="green">Available Points:</font> '.$premiumPoints.' (<a href="'.$buyPointsURL.'">Buy More</a>)';
echo '<br />';
}
// Used for numbering and such.
$iPremium = 0;
$iItem = 0;
$iContainer = 0;
$iOther = 0;
$iSpecial = 0;
///////////////////////////////////////
// Special Account Services Offers
///////////////////////////////////////
if ($showSpecialServices){
foreach($SQL->query('SELECT * FROM z_shop_offer WHERE offer_type="special"') as $data)
    {
        // Create the table if iSpecial == 0, only once!
        if ($iSpecial == 0){
            echo '<table border="0" cellpadding="1" cellspacing="1" width="100%"><tr width="100%" bgcolor="'.$offerTypeBackgroundColor.'"><td colspan="3"><font size="4"><font color="'.$offerTypeTextColor.'"><b>&nbsp;Special Account Services</b></font></td></tr><tr bgcolor="'.$offerTableTitlesBackgroundColor.'"><td width="70%" align="left"><b><font color="'.$offerTableTitlesTextColor.'">Description</font></b></td><td width="30%" align="center"><center><font color="'.$offerTableTitlesTextColor.'"><b>Select product</b></font></center></td></tr>';
        }
        // Populate the table with data
        {
            echo '<tr bgcolor="'.$offerMainBackgroundColor.'"><td><font color="'.$offerMainTextColor.'"><b>'.$data['offer_name'].'</b> ('.$data['points'].' points)<br />'.$data['offer_description'].'</font></td><td align="center">';
            if(!$logged)
            {
                echo '<center><font color="'.$offerMainTextColor.'"><b>Login to buy</b></font></center>';
            }
            else
            {
                echo '<center><font color="'.$offerMainTextColor.'"><form action="/index.php/p/v/shop/character_select" method=POST><input type="hidden" name="buy_id" value="'.$data['id'].'"><input type="submit" value="Buy Offer"><br><b>for '.$data['points'].' points</b></form></font></center>';
            }
            echo '</td></tr>';
        }
        $iSpecial++;
    }
// Close the table if iSpecial != 0. (or, there was data added in other words).
if ($iSpecial != 0){
    echo '</table>';
    echo "*Special account services will performed by the administrator as soon as possible.<br /><br />";
}
}
///////////////////////////////////////
// Premium Account Offers
///////////////////////////////////////
foreach($SQL->query('SELECT * FROM z_shop_offer WHERE offer_type="pacc"') as $data)
    {
        // Create the table if iPremium == 0, only once!
        if ($iPremium == 0){
            echo '<table border="0" cellpadding="1" cellspacing="1" width="100%"><tr width="100%" bgcolor="'.$offerTypeBackgroundColor.'"><td colspan="3"><font color="'.$offerTypeTextColor.'" size="4"><b>&nbsp;Premium Account</b></font></td></tr><tr bgcolor="'.$offerTableTitlesBackgroundColor.'"><td width="10%" align="center"><center><b><font color="'.$offerTableTitlesTextColor.'">Days</font></b></center></td><td width="60%" align="left"><b><font color="'.$offerTableTitlesTextColor.'">Description</font></b></td><td width="30%" align="center"><center><font color="'.$offerTableTitlesTextColor.'"><b>Select Product</b></font></center></td></tr>';
        }
        // Populate the table with data
        {
            echo '<tr bgcolor="'.$offerMainBackgroundColor.'"><td><font color="'.$offerMainTextColor.'"><center>'.$data['count1'].'</center></font></td><td><font color="'.$offerMainTextColor.'"><b>'.$data['offer_name'].'</b> ('.$data['points'].' points)<br />'.$data['offer_description'].'</font></td><td align="center">';
            if(!$logged)
            {
                echo '<center><font color="'.$offerMainTextColor.'"><b>Login to buy</b></font></center>';
            }
            else
            {
                echo '<center><font color="'.$offerMainTextColor.'"><form action="/index.php/p/v/shop/character_select" method=POST><input type="hidden" name="buy_id" value="'.$data['id'].'"><input type="submit" value="Buy Offer"><br><b>for '.$data['points'].' points</b></form></font></center>';
            }
            echo '</td></tr>';
        }
        $iPremium++;
    }
// Close the table if iPremium != 0. (or, there was data added in other words).
if ($iPremium != 0){
    echo '</table><br />';
}
///////////////////////////////////////
// Item Offers
///////////////////////////////////////
foreach($SQL->query('SELECT * FROM z_shop_offer WHERE offer_type="item"') as $data)
    {
        // Create the table if iItem == 0, only once!
        if ($iItem == 0){
            echo '<table border="0" cellpadding="1" cellspacing="1" width="100%"><tr width="100%" bgcolor="'.$offerTypeBackgroundColor.'"><td colspan="3"><font color="'.$offerTypeTextColor.'" size="4"><b>&nbsp;Items</b></font></td></tr><tr bgcolor="'.$offerTableTitlesBackgroundColor.'"><td width="10%" align="center"><center><b><font color="'.$offerTableTitlesTextColor.'">Pic</font></b></center></td><td width="60%" align="left"><font color="'.$offerTableTitlesTextColor.'"><b>Description</b></font></td><td width="30%" align="center"><center><font color="'.$offerTableTitlesTextColor.'"><b>Select Product</b></font></center></td></tr>';
        }
        // Populate the table with data
        {
            echo '<tr bgcolor="'.$offerMainBackgroundColor.'"><td align="center"><center><img src="http://www.mtibia.cl/shop/item_images/'.$data['id'].'.gif"></center></td><td><font color="'.$offerMainTextColor.'"><b>'.$data['offer_name'].'</b> ('.$data['points'].' points)<br />'.$data['offer_description'].'</font></td><td align="center">';
            if(!$logged)
            {
                echo '<center><font color="'.$offerMainTextColor.'"><b>Login to buy</b></font></center>';
            }
            else
            {
                echo '<center><font color="'.$offerMainTextColor.'"><form action="/index.php/p/v/shop/character_select" method=POST><input type="hidden" name="buy_id" value="'.$data['id'].'"><input type="submit" value="Buy Offer"><br><b>for '.$data['points'].' points</b></form></font></center>';
            }
            echo '</td></tr>';
        }
        $iItem++;
}
// Close the table if iItem != 0. (or, there was data added in other words).
if ($iItem!= 0){
    echo '</table><br />';
}
///////////////////////////////////////
// Container Offers
///////////////////////////////////////
foreach($SQL->query('SELECT * FROM z_shop_offer WHERE offer_type="container"') as $data)
    {
        // Create the table if iContainer == 0, only once!
        if ($iContainer == 0){
            echo '<table border="0" cellpadding="1" cellspacing="1" width="100%"><tr width="100%" bgcolor="'.$offerTypeBackgroundColor.'"><td colspan="3"><font color="'.$offerTypeTextColor.'" size="4"><b>&nbsp;Items</b></font></td></tr><tr bgcolor="'.$offerTableTitlesBackgroundColor.'"><td width="10%" align="center"><center><b><font color="'.$offerTableTitlesTextColor.'">Pic</font></b></center></td><td width="60%" align="left"><b><font color="'.$offerTableTitlesTextColor.'">Description</font></b></td><td width="30%" align="center"><center><b><font color="'.$offerTableTitlesTextColor.'">Select Product</font></b></center></td></tr>';
        }
        // Populate the table with data
        {
            echo '<tr bgcolor="'.$offerMainBackgroundColor.'"><td align="center"><center><img src="http://www.mtibia.cl/shop/item_images/'.$data['id'].'.gif"></center></td><td><font color="'.$offerMainTextColor.'"><b>'.$data['offer_name'].'</b> ('.$data['points'].' points)<br />'.$data['offer_description'].'</font></td><td align="center">';
            if(!$logged)
            {
                echo '<center><font color="'.$offerMainTextColor.'"><b>Login to buy</b></font></center>';
            }
            else
            {
                echo '<center><font color="'.$offerMainTextColor.'"><form action="/index.php/p/v/shop/character_select" method=POST><input type="hidden" name="buy_id" value="'.$data['id'].'"><input type="submit" value="Buy Offer"><br><b>for '.$data['points'].' points</b></form></font></center>';
            }
            echo '</td></tr>';
        }
        $iContainer++;
        
    }
// Close the table if iContainer != 0. (or, there was data added in other words).
if ($iContainer != 0){
    echo '</table><br />';
}
///////////////////////////////////////
// OTHER Offers
///////////////////////////////////////
foreach($SQL->query('SELECT * FROM z_shop_offer WHERE offer_type="other"') as $data)
    {
        // Create the table if $iOther == 0, only once!
        if ($iOther == 0){
            echo '<table border="0" cellpadding="1" cellspacing="1" width="100%"><tr width="100%" bgcolor="'.$offerTypeBackgroundColor.'"><td colspan="3"><font color="'.$offerTypeTextColor.'" size="4"><b>&nbsp;Other</b></font></td></tr><tr bgcolor="'.$offerTableTitlesBackgroundColor.'"><td width="10%" align="center"><center><b><font color="'.$offerTableTitlesTextColor.'">Pic</font></b></center></td><td width="60%" align="left"><b><font color="'.$offerTableTitlesTextColor.'">Description</font></b></td><td width="30%" align="center"><center><b><font color="'.$offerTableTitlesTextColor.'">Select Product</font></b></center></td></tr>';
        }
        // Populate the table with data
        {
            echo '<tr bgcolor="'.$offerMainBackgroundColor.'"><td align="center"><center><img src="http://www.mtibia.cl/shop/item_images/'.$data['id'].'.gif"></center></td><td><font color="'.$offerMainTextColor.'"><b>'.$data['offer_name'].'</b> ('.$data['points'].' points)<br />'.$data['offer_description'].'</font></td><td align="center">';
            if(!$logged)
            {
                echo '<center><font color="'.$offerMainTextColor.'"><b>Login to buy</b></font></center>';
            }
            else
            {
                echo '<center><font color="'.$offerMainTextColor.'"><form action="/index.php/p/v/shop/character_select" method=POST><input type="hidden" name="buy_id" value="'.$data['id'].'"><input type="submit" value="Buy Offer"><br><b>for '.$data['points'].' points</b></form></font></center>';
            }
            echo '</td></tr>';
        }
        $iOther++;
        
    }
// Close the table if iContainer != 0. (or, there was data added in other words).
if ($iOther != 0){
    echo '</table><br />';
}
///////////////////////////////////////
// END OFFERS (that was fun... right?)
///////////////////////////////////////
?>

I would like to remove all description box and make that if you put the mouse over the item image, it will show you the description in a box.
 
Back
Top