Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Bandom pakeist is v6 i v7

Parašė lilas· 2009 Vas. 10 18:02:46
#1

Nesurpantu kas blogai.. Koda bandau perdaryt is v6 i v7. Meginu ir ismeta:
Notice: Undefined index: warn in /home/.a/x/z/profile.php on line 196

Notice: Undefined index: unwarn in /home/.a/x/z/profile.php on line 206

Notice: Undefined index: ban in /home/.a/x/z/profile.php on line 211

Notice: Undefined index: unban in /home/.a/x/z/profile.php on line 217

Notice: Use of undefined constant ban - assumed 'ban' in /home/.a/x/z/profile.php on line 224



$result2=dbquery("SELECT tw.*, tu.user_id,user_name FROM v7_warnings tw
LEFT JOIN v7_users tu ON tw.give_user=tu.user_id WHERE tw.user_id='".$user_data['user_id']."' ORDER BY warning_number ASC");
if (dbrows($result2)) {
$warns=dbrows($result2);
} else { $warns='0'; }



echo "<table align='center' cellpadding='0' cellspacing='1' width='400' class='tbl-border'>";

if (!isset($warn)) {
if (dbrows($result2)) {
echo "<tr>\n
<td class='tbl1'>";
while ($wdata=dbarray($result2)) {
echo "<img src='".IMAGES."warns/".$wdata['warning_number'].".gif' alt='' border='0'> | Nuo <a href='narys.php?id=".$wdata['user_id']."' class='side'><b>".$wdata['user_name']."</b></a>: ".($wdata['couse'] ? ": ".$wdata['couse'] : "Nenustatyta")."<br>";
}
echo "</td>\n</tr>";
}
} else {
if (checkrights("M")) {
echo "<tr>\n
<td colspan='3' class='tbl1' align='center'>
<form name='submitform' method='post' action='".FUSION_SELF."?id=".$userdata['user_id']."'>
Prie&#254;astis: <input type='textbox' class='textbox' name='priezastis'>&nbsp;
<input type='submit' class='button' name='warn' value='&#193;sp&#235;ti'>
/form>
</td>";
}
}
echo "</table>\n";


   if (checkrights("M")) {
   
   if ($_POST['warn']) {
   $warnnumb=$warns+1;
   $priezastis=stripinput($_POST['priezastis']);
   $result = dbquery("INSERT INTO v7_warnings (user_id, warning_number, give_user, couse) VALUES ('".$user_data['user_id']."','$warnnumb','".$userdata['user_id']."','$priezastis')");
   if ($warns == "4") {
      $result = dbquery("UPDATE v7_users SET user_status='1' WHERE user_id='".$user_data['user_id']."'");
   }
   redirect(FUSION_SELF."?id=".$user_data['user_id']."");
   }
   
   if ($_POST['unwarn']) {
   $result = dbquery("DELETE FROM v7_warnings WHERE warning_number='$warns' AND user_id='".$user_data['user_id']."'");
   redirect(FUSION_SELF."?id=".$user_data['user_id']."");
   }
   
   if ($_POST['ban']) {
   $result = dbquery("UPDATE v7_users SET user_status=1 WHERE user_id='".$user_data['user_id']."'");
//   $result = dbquery("INSERT INTO v7_blacklist (blacklist_ip, blacklist_email, blacklist_reason) VALUES ('".$user_data['user_ip']."', '".$user_data['user_email']."', 'id=".$user_data['user_id']." nick=".$user_data['user_name']." .... Ispejimu sistema. BANAS.')");
   redirect(FUSION_SELF."?id=".$user_data['user_id']."");
   }
   
   if ($_POST['unban']) {
   $result = dbquery("UPDATE v7_users SET user_status=0 WHERE user_id='".$user_data['user_id']."'");
//   $result = dbquery("DELETE FROM v7_blacklist WHERE blacklist_ip='".$user_data['user_ip']."'");
   redirect(FUSION_SELF."?id=".$user_data['user_id']."");
   }
   
   //form
   if ($user_data['user_status'] == 1) { $act = unban; $title = "Atbaninti"; } else { $act = ban; $title = "U&#254;baninti"; }
   
   echo "<table cellpadding='0' cellspadding='0' align='center' width='400' style='border: 1px solid #ccc;'><tr>";


   echo "<td class='tbl1' align='center'>
   <form method='post' action='".FUSION_SELF."?id=".$userdata['user_id']."'>
   <input class='button' value='$title' type='submit' name='$act' title='$title nar&#225;'  OnClick=\"if (confirm('J&#251;s tuo tikras?')) return true; else return false;\">
   </form></td>"; // baninti / atbaninti




      if ($userdata['user_level'] == 101 && $userdata['user_status'] != 1) {
echo "<td class='tbl1' align='center'><form method='post' action='".FUSION_SELF."?id=".$userdata['user_id']."&warn'>";
echo "<input type='submit' name='warning' value='&#193;sp&#235;ti' class='button'>";
echo "</form></td>"; // duoti ispejima
}
   if ($warns) {
echo "<td class='tbl1' align='center'><form method='post' action='".FUSION_SELF."?id=".$userdata['user_id']."'>";
echo "<input type='submit' name='unwarn' value='Nuimti' class='button' OnClick=\"if (confirm('Ar tikrai nori NUIMTI viena ispejima?')) return true; else return false;\">";
echo "</form></td>"; // nuimti ispejimus
}
   
   
   echo "</tr></table>";
   }



Redagavo lilas· 2009 Vas. 10 18:02:10

Parašė lilas· 2009 Vas. 10 19:02:26
#2

bump

Parašė lilas· 2009 Vas. 10 21:02:04
#3

B u m p