Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: WB Klausimai

Parašė sniuff· 2009 Sau. 15 23:01:42
#99

<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";

include INFUSIONS."players/includes/functions.php";



// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS."players/locale/".LOCALESET."/show_all.php")) {
// Load the locale file matching the current site locale setting.
include INFUSIONS."players/locale/".LOCALESET."/show_all.php";
} else {
// Load the infusion's default locale file.
include INFUSIONS."players/locale/English/show_all.php";
}

if ($lookup == $userdata['user_id']) {
$access = "2";
} else {
$access = "1";
}

if (!isset($status)) $status = "";




$gift_images = true;


$user2 = dbarray(dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='$lookup'"));

if (($lookup == $userdata['user_id']) && (isset($lookup)) && (isNum($lookup)) && (isset($step)) && ($step=="delete") && (isset($gift_id)) && (isNum($gift_id))) {
$result = dbquery("SELECT * FROM ".$db_prefix."players_given WHERE gift_given_to='$lookup' AND gift_given_id='$gift_id'");
if (dbrows($result)) {
$data = dbarray($result);
$gift = dbarray(dbquery("SELECT * FROM ".$db_prefix."players WHERE gift_id='".$data['gift_given_gift_id']."'"));

$result = dbquery("DELETE FROM ".$db_prefix."players_given WHERE gift_given_id='".$gift_id."'"); // Delete the Gift
$result = dbquery("UPDATE ".$db_prefix."players SET gift_bought=gift_bought-1 WHERE gift_id='".$gift['gift_id']."'"); //Update Gifts Bought
redirect(FUSION_SELF."?lookup=".$lookup."&status=deleted");
} else {
redirect(FUSION_SELF."?lookup=".$lookup."&status=error1");
}

}


if ((isset($lookup)) && (isNum($lookup))) {

opentable("Komandos:");
if(isset($status) && $status == "deleted") echo "<table width='100%' align='center'><tr><td align='center'><b>".$locale['sfgift510']."</b><br /><br /></td></tr></table>";
if(isset($status) && $status == "error1") echo "<table width='100%' align='center'><tr><td align='center'><b>".$locale['sfgift511']."</b><br /><br /></td></tr></table>";
echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>
<tr>
<td colspan='3' class='tbl1'>\n";

$result = dbquery("SELECT * FROM ".$db_prefix."players_given WHERE gift_given_to='$lookup' AND gift_given_visibillity<='$access' ORDER BY gift_given_id");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 3;
$align = $gift_images ? "center" : "left";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
while ($data = dbarray($result)) {



$gift = dbarray(dbquery("SELECT * FROM ".$db_prefix."players WHERE gift_id='".$data['gift_given_gift_id']."'"));
$dovana = $gift['gift_image'];
$user = dbarray(dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='".$data['gift_given_from']."'"));

if ($counter != 0 && ($counter % $columns == 0)) echo "</tr>\n<tr>\n";
echo "<td align='$align' width='25%' class='tbl'>";
echo "<span class='small'><img src='".INFUSIONS."players/images/".$gift['gift_image']."' alt='".$gift['gift_image']."' style='border:0px;'></span>$rest $playername<br>";
if (($data['gift_given_visibillity'] == '1') && ($lookup != $userdata['user_id'])) {
echo "Anonymous";
} else {
echo "




";
}

if ($lookup == $userdata['user_id']) {
echo "
<a href='".FUSION_SELF."?lookup=".$lookup."&step=delete&gift_id=".$data['gift_given_id']."'>I&#353;trinti</a>
";
}

echo "</td>\n";
$counter++;
}
echo "</tr>\n</table>\n";
} else {
echo "<center><br>\n".$locale['sfgift501']."<br><br>\n</center>\n";
}
echo "</td>\n</tr>\n
<tr>
<td colspan='3' align='right' class='tbl1'><a href='".BASEDIR."profile.php?lookup=".$lookup."'>".$locale['sfgift502']."</td>
</tr>\n</table>\n";
closetable();
} else {
redirect(BASEDIR."index.php");
}

include("footer.php");

require_once BASEDIR."side_right.php";
?>