[ Index ] |
|
Code source de e107 0.7.8 |
1 <?php 2 /* 3 + ----------------------------------------------------------------------------+ 4 | e107 website system 5 | 6 | ©Steve Dunstan 2001-2002 7 | http://e107.org 8 | jalist@e107.org 9 | 10 | Released under the terms and conditions of the 11 | GNU General Public License (http://gnu.org). 12 | 13 | $Source: /cvsroot/e107/e107_0.7/e107_admin/message.php,v $ 14 | $Revision: 1.7 $ 15 | $Date: 2006/10/24 13:34:38 $ 16 | $Author: mrpete $ 17 +----------------------------------------------------------------------------+ 18 */ 19 require_once ("../class2.php"); 20 21 $e_sub_cat = 'message'; 22 require_once ("auth.php"); 23 $gen = new convert; 24 25 $messageTypes = array("Broken Download", "Dev Team Message"); 26 $queryString = ""; 27 foreach($messageTypes as $types) { 28 $queryString .= " gen_type='$types' OR"; 29 } 30 $queryString = substr($queryString, 0, -3); 31 32 if(isset($_POST['delete_message'])) 33 { 34 if(preg_match("/\s[0-9]+/si", $_POST['delete_message'], $match)) 35 { 36 $id = $match[0]; 37 $sql->db_Delete("generic", "gen_id=$id"); 38 $message = MESSLAN_3; 39 } 40 } 41 42 if(isset($_POST['delete_all']) && isset($_POST['deleteconfirm'])) 43 { 44 $sql->db_Delete("generic", $queryString); 45 $message = MESSLAN_6; 46 } 47 48 49 if (isset($message)) { 50 $ns->tablerender("", "<div style='text-align:center'><b>".$message."</b></div>"); 51 } 52 53 54 if($amount = $sql -> db_Select("generic", "*", $queryString)) 55 { 56 57 58 $text = "<table style='width: 98%;' class='fborder'>\n<form method='post' action='".e_SELF."'>\n"; 59 $messages = $sql -> db_getList(); 60 61 foreach($messages as $message) 62 { 63 extract($message); 64 65 $sql -> db_Select("user", "user_name", "user_id=$gen_user_id"); 66 $user = $sql -> db_Fetch(); 67 $user = "<a href='".e_BASE."user.php?id.$gen_user_id'>".$user['user_name']."</a>"; 68 69 switch($gen_type) 70 { 71 case "Broken Download": 72 $link = "<a href='".e_BASE."download.php?view.$gen_intdata' rel='external' title='".MESSLAN_11."'>$gen_ip</a>"; 73 $link .= " [<a href='".e_ADMIN."download.php?create.edit.".$gen_intdata."'>".LAN_EDIT."</a>]"; 74 break; 75 case "Dev Team Message": 76 $link = ""; 77 break; 78 } 79 80 81 $text .= "<tr> 82 <td style='width: 100%;' class='forumheader3'><b>".MESSLAN_8."</b>: $gen_type<br /> 83 <b>".MESSLAN_9."</b>: ".$gen->convert_date($gen_datestamp, 'long')."<br /> 84 <b>".MESSLAN_10."</b>: $user<br /> 85 <b>".MESSLAN_13."</b>: $link "; 86 ($gen_chardata ? "<br /><b>".MESSLAN_12."</b>: $gen_chardata" : "")."<br /><input class='button' type='submit' name='delete_message' value='".MESSLAN_2." $gen_id' /> 87 </td>\n</tr>\n"; 88 } 89 90 $text .= " 91 <tr> 92 <td><br /><input class='button' type='submit' name='delete_all' value='".MESSLAN_4."' /> 93 <input type='checkbox' name='deleteconfirm' value='1' /> ".MESSLAN_5." 94 </td> 95 </tr> 96 97 98 </form></table>"; 99 } 100 else 101 { 102 $text = MESSLAN_7; 103 } 104 $ns->tablerender(MESSLAN_1, $text); 105 106 require_once ("footer.php"); 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 /* 126 if ($action != "edit") { 127 $text = $rs->form_open("post", e_SELF, "ban_form")."<div style='text-align:center'>".$rs->form_hidden("ban_secure", "1")."<div style='padding : 1px; ".ADMIN_WIDTH."; height : 170px; overflow : auto; margin-left: auto; margin-right: auto;'>\n"; 128 if (!$ban_total = $sql->db_Select("banlist")) { 129 $text .= "<div style='text-align:center'>".BANLAN_2."</div>"; 130 } else { 131 $text .= "<table class='fborder' style='width:99%;'> 132 <tr> 133 <td style='width:70%' class='fcaption'>".BANLAN_10."</td> 134 <td style='width:30%' class='fcaption'>".BANLAN_11."</td> 135 </tr>"; 136 $count = 0; 137 while ($row = $sql->db_Fetch()) { 138 extract($row); 139 $text .= "<tr><td style='width:70%' class='forumheader3'>$banlist_ip<br />".BANLAN_7.": $banlist_reason</td> 140 <td style='width:30%; text-align:center' class='forumheader3'>".$rs->form_button("submit", "main_edit_$count", BANLAN_12, "onclick=\"document.getElementById('ban_form').action='".e_SELF."?edit-$banlist_ip'\"").$rs->form_button("submit", "main_delete_$count", BANLAN_4, "onclick=\"document.getElementById('ban_form').action='".e_SELF."?remove-$banlist_ip'\"")."</td>\n</tr>"; 141 $count++; 142 } 143 $text .= "</table>\n"; 144 } 145 $text .= "</div></div>".$rs->form_close(); 146 $ns->tablerender(BANLAN_3, $text); 147 } 148 149 if ($action == "edit") { 150 $sql2->db_Select("banlist", "*", "banlist_ip='$sub_action'"); 151 $row = $sql2->db_Fetch(); 152 extract($row); 153 } else { 154 unset($banlist_ip, $banlist_reason); 155 if (e_QUERY && strpos($_SERVER["HTTP_REFERER"], "userinfo")) { 156 $banlist_ip = $action; 157 } 158 } 159 $text = "<div style='text-align:center'> 160 <form method='post' action='".e_SELF."'> 161 <table style='".ADMIN_WIDTH."' class='fborder'> 162 163 <tr> 164 <td style='width:30%' class='forumheader3'>".BANLAN_5.": </td> 165 <td style='width:70%' class='forumheader3'> 166 <input class='tbox' type='text' name='ban_ip' size='40' value='".$banlist_ip."' maxlength='200' /> 167 </td> 168 </tr> 169 170 <tr> 171 <td style='width:20%' class='forumheader3'>".BANLAN_7.": </td> 172 <td style='width:80%' class='forumheader3'> 173 <textarea class='tbox' name='ban_reason' cols='50' rows='4'>$banlist_reason</textarea> 174 </td> 175 </tr> 176 177 <tr style='vertical-align:top'> 178 <td colspan='2' style='text-align:center' class='forumheader'>". 179 ($action == "edit" ? "<input type='hidden' name='old_ip' value='$banlist_ip' /><input class='button' type='submit' name='update_ban' value='".BANLAN_13."' />" : "<input class='button' type='submit' name='add_ban' value='".BANLAN_8."' />")." 180 181 </td> 182 </tr> 183 </table> 184 </form> 185 </div>"; 186 187 $ns->tablerender(BANLAN_9, $text); 188 189 require_once("footer.php"); 190 */ 191 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 01:23:32 2007 | par Balluche grâce à PHPXref 0.7 |