Parašė JaWa· 2010 Bir. 21 18:06:11
#1
Sveiki, kaip padaryti kad kai narys gaves ispejima, gauti pm su uzrasu pvz: "gavai ispejima" ?
//warns\\
if (file_exists(LOCALE.LOCALESET."warns.php")) {
include LOCALE.LOCALESET."warns.php";
} else {
include LOCALE."English/warns.php";
}
$result2=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='$lookup' ORDER BY warning_number ASC");
if (dbrows($result2)) {
$warns=dbrows($result2);
} else {$warns='0'; }
//------\\
//warns start
if (checkrights("M")) {
//give warn
if ($_POST['warn']) {
$warnnumb=$warns+1;
$priezastis=stripinput($_POST['priezastis']);
$result = dbquery("INSERT INTO ".$db_prefix."warnings (user_id, warning_number, give_user, couse) VALUES ('$lookup','$warnnumb','".$userdata['user_id']."','$priezastis')");
if ($warns == "4") { $result=dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='$lookup'"); }
redirect(FUSION_SELF."?lookup=$lookup");
}
//unwarn
if ($_POST['unwarn']) {
$result = dbquery("DELETE FROM ".$db_prefix."warnings WHERE warning_number='$warns' AND user_id='$lookup'");
redirect(FUSION_SELF."?lookup=$lookup");
}
kazka bandziau daryti su situo skrituku, bet neiseina...
$message= "gavai ispejima";
$result2("INSERT INTO ".$db_prefix."messages VALUES ('', 'as', 's', 'geras', '$message', '', '0', '".time()."' , '0')");