Parašė viva· 2009 Kov. 5 18:03:55
#1
Sveiki , turiu cheats modifikacija kai irasau per adminke tkesta ir spaudziu perziuyra viskas normlaiai bet kai ieinu ne per adminke tai tas tekstas buna suspaustas be tarpu man riekia kad buu kaip irasau.
Va kodas :
<?php
require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";
if (file_exists(INFUSIONS."cheats/locale/".$settings['locale'].".php")) {
include INFUSIONS."cheats/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."cheats/locale/Lithuanian.php";
}
if (!isset($cat_id)) {
opentable($locale['400']);
$result = dbquery("SELECT * FROM ".$db_prefix."cheats_cat WHERE ".groupaccess('cheats_cat_access')." ORDER BY cheats_cat_name");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 2;
echo "<table cellpadding='0' cellspacing='0' width='100%' class='tbl'>\n<tr>\n";
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $columns == 0)) echo "</tr>\n<tr>\n";
$num = dbcount("(cheats_cat)", "cheats", "cheats_cat='".$data['cheats_cat_id']."'");
echo "<td valign='top' width='50%'><a href='".FUSION_SELF."?cat_id=".$data['cheats_cat_id']."'>".$data['cheats_cat_name']."</a> <span class='small2'>($num)</span>";
if ($data['cheats_cat_description'] != "") echo "<br>\n<span class='small'>".$data['cheats_cat_description']."</span>";
echo "</td>\n";
$counter++;
}
echo "</tr>\n</table>\n";
} else {
echo "<center><br>\n".$locale['401']."<br><br>\n</center>\n";
}
closetable();
} else {
$res = 0;
if (!isNum($cat_id)) fallback(FUSION_SELF);
$result = dbquery("SELECT * FROM ".$db_prefix."cheats_cat WHERE cheats_cat_id='$cat_id'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['cheats_cat_access'])) {
$res = 1;
opentable($locale['400'].": ".$cdata['cheats_cat_name']);
$rows = dbcount("(cheats_id)", "cheats", "cheats_cat='$cat_id'");
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
$result = dbquery("SELECT * FROM ".$db_prefix."cheats WHERE cheats_cat='$cat_id' ORDER BY ".$cdata['cheats_cat_sorting']." LIMIT $rowstart,32");
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
if ($data['cheats_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " <span class='small'>[".$locale['402']."]</span>";
} else {
$new = "";
}
echo "<a href='readcheats.php?cheats_id=".$data['cheats_id']."'>".$data['cheats_subject']."</a>$new<br>\n".stripslashes($data['cheats_snippet']);
echo ($i != $numrows ? "<br><br>\n" : "\n"); $i++;
}
closetable();
if ($rows > 15) echo "<div style='margin-top:5px;'>\n".makePageNav($rowstart,15,$rows,3,FUSION_SELF."?cat_id=$cat_id&")."\n</div>\n";
} else {
echo "<center>".$locale['403']."</center>\n";
closetable();
}
}
}
if ($res == 0) redirect(FUSION_SELF);
}
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?>