Changeset 374 for minimanager/ticket.php
- Timestamp:
- Sep 11, 2008, 9:10:27 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/ticket.php
r307 r374 10 10 11 11 require_once("header.php"); 12 valid_login(1); 13 14 $ticket_type = Array( 15 0 => array(0,$lang_ticket['other']), 16 1 => array(1,$lang_ticket['stuck']), 17 2 => array(2,$lang_ticket['behavior']), 18 3 => array(3,$lang_ticket['guild']), 19 4 => array(4,$lang_ticket['item']), 20 5 => array(5,$lang_ticket['environmental']), 21 6 => array(6,$lang_ticket['creep']), 22 7 => array(7,$lang_ticket['quest']), 23 8 => array(8,$lang_ticket['technical']), 24 9 => array(9,$lang_ticket['account']), 25 10 => array(10,$lang_ticket['character']) 26 ); 12 valid_login($action_permission['read']); 27 13 28 14 //######################################################################################################################## … … 47 33 48 34 $query = $sql->query("SELECT character_ticket.ticket_id, character_ticket.guid,SUBSTRING_INDEX(character_ticket.ticket_text,' ',6), 49 character_ticket.ticket_category,`characters`.name35 `characters`.name 50 36 FROM character_ticket,`characters` 51 37 LEFT JOIN character_ticket k1 ON k1.`guid`=`characters`.`guid` … … 65 51 <table class=\"lined\"> 66 52 <tr> 67 <th width=\"5%\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form);\" /></th> 68 <th width=\"5%\">{$lang_global['edit']}</th> 69 <th width=\"8%\"><a href=\"ticket.php?order_by=ticket_id&start=$start&dir=$dir\">".($order_by=='ticket_id' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_ticket['id']}</a></th> 70 <th width=\"15%\"><a href=\"ticket.php?order_by=guid&start=$start&dir=$dir\">".($order_by=='guid' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_ticket['sender']}</a></th> 71 <th width=\"55%\">{$lang_ticket['ticket_text']}</th> 72 <th width=\"13%\"><a href=\"ticket.php?order_by=ticket_category&start=$start&dir=$dir\">".($order_by=='ticket_category' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_ticket['category']}</a></tthd> 53 <th width=\"7%\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form);\" /></th> 54 <th width=\"7%\">{$lang_global['edit']}</th> 55 <th width=\"10%\"><a href=\"ticket.php?order_by=ticket_id&start=$start&dir=$dir\">".($order_by=='ticket_id' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_ticket['id']}</a></th> 56 <th width=\"16%\"><a href=\"ticket.php?order_by=guid&start=$start&dir=$dir\">".($order_by=='guid' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_ticket['sender']}</a></th> 57 <th width=\"60%\">{$lang_ticket['ticket_text']}</th> 73 58 </tr>"; 74 59 … … 78 63 <td><a href=\"ticket.php?action=edit_ticket&error=4&id=$ticket[0]\">{$lang_global['edit']}</a></td> 79 64 <td>$ticket[0]</td> 80 <td><a href=\"char.php?id=$ticket[1]\">$ticket[ 4]</a></td>65 <td><a href=\"char.php?id=$ticket[1]\">$ticket[3]</a></td> 81 66 <td>$ticket[2] ...</td> 82 <td>{$ticket_type[$ticket[3]][1]}</td>83 67 </tr>"; 84 68 } … … 86 70 $output .= "<tr><td colspan=\"12\" class=\"hidden\"><br /></td></tr> 87 71 <tr> 88 <td colspan=\" 4\" align=\"left\" class=\"hidden\">";72 <td colspan=\"3\" align=\"left\" class=\"hidden\">"; 89 73 makebutton($lang_ticket['del_selected_tickets'], "javascript:do_submit()",200); 90 74 $output .= "</td> … … 139 123 140 124 $query = $sql->query("SELECT character_ticket.guid, character_ticket.ticket_text, 141 character_ticket.ticket_category,`characters`.name125 `characters`.name 142 126 FROM character_ticket,`characters` 143 127 LEFT JOIN character_ticket k1 ON k1.`guid`=`characters`.`guid` … … 157 141 <tr> 158 142 <td>{$lang_ticket['submitted_by']}:</td> 159 <td><a href=\"char.php?id=$ticket[0]\">$ticket[ 3]</a></td>143 <td><a href=\"char.php?id=$ticket[0]\">$ticket[2]</a></td> 160 144 </tr> 161 145 <tr> 162 146 <td valign=\"top\">{$lang_ticket['ticket_text']}</td> 163 147 <td><textarea name=\"new_text\" rows=\"5\" cols=\"40\">$ticket[1]</textarea></td> 164 </tr>165 <tr>166 <td>{$lang_ticket['category']}</td>167 <td><select name=\"new_category\">";168 foreach ($ticket_type as $type){169 $output .= "<option value=\"{$type[0]}\" ";170 if ($ticket[2]==$type[0]) $output .= "selected=\"selected\" ";171 $output .= ">{$type[1]}</option>";172 }173 $output .= "</select></td>174 148 </tr> 175 149 <tr> … … 199 173 global $characters_db, $realm_id; 200 174 201 if( (!isset($_POST['new_category'])) ||($_POST['new_category'] === '')||empty($_POST['new_text']) || empty($_POST['id']) ) {175 if(empty($_POST['new_text']) || empty($_POST['id']) ) { 202 176 redirect("ticket.php?error=1"); 203 177 } … … 206 180 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 207 181 208 $new_category = $sql->quote_smart($_POST['new_category']);209 182 $new_text = $sql->quote_smart($_POST['new_text']); 210 183 $id = $sql->quote_smart($_POST['id']); 211 184 212 $query = $sql->query("UPDATE character_ticket SET ticket_text='$new_text' , ticket_category ='$new_category'WHERE ticket_id = '$id'");185 $query = $sql->query("UPDATE character_ticket SET ticket_text='$new_text' WHERE ticket_id = '$id'"); 213 186 214 187 if ($sql->affected_rows()) {
Note:
See TracChangeset
for help on using the changeset viewer.