Parašė Narysx· 2009 Kov. 26 13:03:28
#5
Savo viewthread.php faile po eilutės:
include LOCALE.LOCALESET."forum/main.php";
kiši:
if (file_exists(LOCALE.LOCALESET."warns.php")) {
include LOCALE.LOCALESET."warns.php";
} else {
include LOCALE."English/warns.php";
}
virš:
echo "<span class='alt'>".$locale['502']."</span> ".$data['user_posts']."<br></td>\n";
kiši:
//show warnings\\
if (file_exists(LOCALE.LOCALESET."warns.php")) {
include LOCALE.LOCALESET."warns.php";
} else {
include LOCALE."English/warns.php";
}
$warnings=dbquery("SELECT tw.*, tu.user_id,user_name FROM ".$db_prefix."warnings tw
LEFT JOIN ".$db_prefix."users tu ON tw.give_user=tu.user_id WHERE tw.user_id='".$data['user_id']."' ORDER BY warning_number ASC");
if (dbrows($warnings)) {
$warns=dbrows($warnings);
} else {$warns='0'; }
if ($data['user_level'] == 101) {
echo "Įspėjimai: <img src='".IMAGES."warns/$warns.gif' alt='".$locale['warns_04']." $warns ".$locale['warns_05']."' title='".$locale['warns_04']." $warns ".$locale['warns_05']."' border='0'><br>";
}
//--------\\
gale, po
<td align='center' class='tbl1'><input type='submit' name='postquickreply' value='".$locale['514']."' class='button'></td>
</tr>
</table>
</form>\n";
closetable();
kiši:
//do warnings
if ($_GET['veiksmas'] == "warn") {
if (iADMIN && checkrights("F")) {
$result = dbquery("UPDATE ".$db_prefix."users SET warnings=warnings+1 WHERE user_id='$id'");
redirect(FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id");
} else { fallback(BASEDIR."index.php"); }
}
if ($_GET['veiksmas'] == "ban") {
if (iADMIN && checkrights("F")) {
$result = dbquery("UPDATE ".$db_prefix."users SET warnings=warnings+1 WHERE user_id='$id'");
$result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='$id'");
redirect(FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id");
} else { fallback(BASEDIR."index.php"); }
}
if ($_GET['veiksmas'] == "unwarn") {
if (iADMIN && checkrights("F")) {
$result = dbquery("UPDATE ".$db_prefix."users SET warnings=warnings-1 WHERE user_id='$id'");
redirect(FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id");
} else { fallback(BASEDIR."index.php"); }
}
//warnings ends
Redagavo Narysx· 2009 Kov. 26 13:03:28