user_is_admin) { header("Location: login.php"); exit; } include "top.php"; $where = "1=1"; if (isset($_GET['user_id'])) $where .= " and note_user_id='{$_GET['user_id']}'"; if (isset($_GET['login'])) $where .= " and ticket_account_login='{$_GET['login']}'"; if (isset($_GET['like'])) $where .= " and concat(ticket_account_login,ticket_account_domain,ticket_author_name,ticket_author_email,note_author_email,note_longtext) like '%{$_GET['like']}%'"; $q = mysql_query_wrapper("select *, date_format(note_date_created, '%b %e %k:%i') nice_note_date_created from notes left join tickets on ticket_id=note_ticket_id left join states on state_id=ticket_state_id left outer join users on user_id=note_user_id where $where order by note_date_created desc limit 100 "); ?>

Notes

note_user_id) $user_name_or_email = $row->user_name; else if ($row->note_author_email) $user_name_or_email = $row->note_author_email; else $user_name_or_email = $row->ticket_author_email; ?>
Date
Email
Ticket
Note
nice_note_date_created?>

ticket_id.$row->ticket_auth?>
note_longtext,72,"\n",1))?>