function phphoto_echo_galleries($db) { $gallery_sql = "\n SELECT\n id,\n title,\n description,\n (SELECT COUNT(*) FROM image_to_gallery WHERE gallery_id = g.id) AS images,\n \n (SELECT MAX(changed) FROM\n (\n (SELECT temp1.changed, temp1.id AS gallery_id FROM galleries temp1)\n UNION\n (SELECT temp2.changed, temp2.gallery_id FROM image_to_gallery temp2)\n UNION\n (SELECT (SELECT changed FROM images WHERE id = temp3.image_id) AS changed, temp3.gallery_id FROM image_to_gallery temp3)\n ) temp\n WHERE\n gallery_id = g.id\n ) AS changed\n FROM\n galleries g\n WHERE\n active = TRUE\n AND\n (\n SELECT COUNT(*) FROM image_to_gallery itg WHERE itg.gallery_id = g.id\n AND\n (\n SELECT COUNT(*) FROM images i WHERE i.id = itg.image_id AND active = TRUE\n ) > 0\n ) > 0\n ORDER BY\n " . GALLERY_SORT_COLUMN . "\n "; $tag_sql = "\n SELECT\n id,\n name,\n description\n FROM\n tags t\n WHERE\n active = TRUE\n AND\n (\n SELECT COUNT(*) FROM image_to_tag itt WHERE itt.tag_id = t.id\n AND\n (\n SELECT COUNT(*) FROM images i WHERE i.id = itt.image_id AND active = TRUE\n ) > 0\n ) > 0\n ORDER BY\n name\n "; echo "\n<div class='header'>"; echo "\n <p><a href='" . GALLERY_INDEX_PAGE . "'>" . GALLERY_TITLE . "</a></p>"; echo "\n</div>"; echo "\n<div class='container'>"; echo "\n <h1>" . GALLERY_WELCOME . "</h1>"; echo "\n <div class='wrapper'>"; foreach (phphoto_db_query($db, $gallery_sql) as $gallery) { echo "\n <div class='gallery'>"; echo "\n <a href='" . CURRENT_PAGE . "?" . GET_KEY_GALLERY_ID . "={$gallery['id']}'>"; echo "\n <img class='thumbnail' src='image.php?" . GET_KEY_GALLERY_ID . "={$gallery['id']}' title='{$gallery['description']}' alt='{$gallery['title']}' />"; echo "\n <h1>" . format_string($gallery['title'], 30) . "</h1>"; echo "\n <h2>updated " . format_date_time($gallery['changed']) . "</h2>"; echo "\n <p>" . format_string($gallery['description']) . "</p>"; echo "\n </a>"; echo "\n </div>"; } echo "\n </div>"; // echo links for the different tags $tags = array(); foreach (phphoto_db_query($db, $tag_sql) as $tag) { array_push($tags, "<a href='" . CURRENT_PAGE . "?" . GET_KEY_TAG_ID . "={$tag['id']}' title='{$tag['description']}'>{$tag['name']}</a>"); } if (count($tags) > 0) { echo "\n <p>" . phphoto_text($db, 'section', 'tags') . ": " . implode(', ', $tags) . '</p>'; } echo "\n</div>"; phphoto_echo_gallery_footer("<a href='http://github.com/RiJo/phphoto'>" . GALLERY_NAME . ' v.' . GALLERY_VERSION . "</a>"); }
} else { if ($sort_dir == 'ASC') { echo " <a href=\"admin_viewlog.php?webtag={$webtag}&sort_by=COUNT&sort_dir=ASC&group_by={$group_by}&page={$page}\">", gettext("Count"), "</a>\n"; } else { echo " <a href=\"admin_viewlog.php?webtag={$webtag}&sort_by=COUNT&sort_dir=DESC&group_by={$group_by}&page={$page}\">", gettext("Count"), "</a>\n"; } } } echo " </td>\n"; } echo " </tr>\n"; if (sizeof($admin_log_array['admin_log_array']) > 0) { foreach ($admin_log_array['admin_log_array'] as $admin_log_entry) { $auto_update = false; echo " <tr>\n"; echo " <td align=\"left\" valign=\"top\" style=\"white-space: nowrap\"><span title=\"", format_date_time($admin_log_entry['CREATED']), "\">", format_date_time($admin_log_entry['CREATED']), "</td>\n"; $entry_array = htmlentities_array($admin_log_entry['ENTRY']); switch ($admin_log_entry['ACTION']) { case CHANGE_USER_STATUS: $action_text = sprintf(gettext("Changed user status for '%s'"), $entry_array[0]); break; case CHANGE_FORUM_ACCESS: $action_text = sprintf(gettext("Changed forum access permissions for '%s'"), $entry_array[1]); break; case DELETE_ALL_USER_POSTS: $action_text = sprintf(gettext("Deleted all posts for '%s'"), $entry_array[0]); break; case CHANGE_USER_PASSWD: $action_text = sprintf(gettext("Changed password for '%s'"), $entry_array[0]); break; case ADD_BANNED_IP:
echo " <table class=\"posthead\" width=\"95%\">\n"; echo " <tr>\n"; echo " <td align=\"left\" style=\"white-space: nowrap\" valign=\"top\" width=\"120\">", gettext("Address"), ":</td>\n"; echo " <td align=\"left\"><a href=\"links.php?webtag={$webtag}&lid={$lid}&action=go\" target=\"_blank\">", mb_strlen($link['URI']) > 35 ? htmlentities_array(mb_substr($link['URI'], 0, 35)) . '…' : htmlentities_array($link['URI']), "</a></td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td align=\"left\" style=\"white-space: nowrap\" valign=\"top\">", gettext("Submitted by"), ":</td>\n"; echo " <td align=\"left\">", isset($link['LOGON']) ? word_filter_add_ob_tags(format_user_name($link['LOGON'], $link['NICKNAME']), true) : gettext("Unknown user"), "</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td align=\"left\" style=\"white-space: nowrap\" valign=\"top\">", gettext("Description"), ":</td>\n"; echo " <td align=\"left\">", word_filter_add_ob_tags($link['DESCRIPTION'], true), "</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td align=\"left\" style=\"white-space: nowrap\" valign=\"top\">", gettext("Date"), ":</td>\n"; echo " <td align=\"left\">", format_date_time($link['CREATED']), "</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td align=\"left\" style=\"white-space: nowrap\" valign=\"top\">", gettext("Clicks"), ":</td>\n"; echo " <td align=\"left\">{$link['CLICKS']}</td>\n"; echo " </tr>\n"; if (isset($link['RATING']) && is_numeric($link['RATING'])) { if ($link['VOTES'] == 1) { echo " <tr>\n"; echo " <td align=\"left\" style=\"white-space: nowrap\" valign=\"top\">", gettext("Rating"), ":</td>\n"; echo " <td align=\"left\">", format_number($link['RATING'], 1), " (1 ", gettext("Vote"), ")</td>\n"; echo " </tr>\n"; } else { echo " <tr>\n"; echo " <td align=\"left\" style=\"white-space: nowrap\" valign=\"top\">", gettext("Rating"), ":</td>\n"; echo " <td align=\"left\">", format_number($link['RATING'], 1), " ({$link['VOTES']} ", gettext("Votes"), ")</td>\n";
</td> <td><a href="mailto:<?php echo $r['email']; ?> "><?php echo $r['email']; ?> </a></td> </tr> <tr> <td class="left"><?php echo getString('last_login'); ?> </td> <td><?php echo format_date_time($r['lastlogin'], " "); ?> </td> </tr> <tr> <td class="left"><?php echo getString('bio'); ?> </td> <td colspan="2" height="167" class="text"><?php echo nl2br($r['bio']); ?> </td> </tr> <?php if ($page['is_admin'] || $_GET['id'] == $_SESSION['user_id']) {
{ return ereg_replace("[^0-9]", "", $in_str); } //$cid_str = (empty($_GET))? "0000000000": $_GET['phone']; // bad $cid_str = empty($_GET) ? "2125867000" : $_GET['phone']; // Hilton //$cid_str = (empty($_GET))? "4102242850": $_GET['phone']; // Giant pharmacy //$cid_str = (empty($_GET))? "4103533986": $_GET['phone']; // cell //$cid_str = (empty($_GET))? "4108498240": $_GET['phone']; //$cid_str = (empty($_GET))? "4108498721": $_GET['phone']; $lookup_str = cid_lookup(extr_digits($cid_str)); // given a phone no., returns data string $query = "INSERT INTO `{$GLOBALS['mysql_prefix']}caller_id` (`call_str`, `lookup_vals`, `status`) \n\tVALUES ( " . quote_smart(trim($cid_str)) . ", " . quote_smart(addslashes(trim($lookup_str))) . ", 0);"; $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__); $retval = explode(";", $lookup_str); $received = format_date_time(mysql_format_date(now())); $sources = array("NA", "prior incidents", "Constituents data", "White pages"); $extra = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); $url = "http://{$_SERVER['HTTP_HOST']}:{$_SERVER['SERVER_PORT']}{$extra}/"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <HEAD><TITLE>Tickets - Caller ID Module</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> <META HTTP-EQUIV="Expires" CONTENT="0"> <META HTTP-EQUIV="Cache-Control" CONTENT="NO-CACHE"> <META HTTP-EQUIV="Pragma" CONTENT="NO-CACHE"> <META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript"> <META HTTP-EQUIV="Script-date" CONTENT="<?php print date("n/j/y G:i", filemtime(basename(__FILE__)));
<th></th> </tr> <?php while ($r = db_fetch($result)) { ?> <tr> <td><a href="view.php?id=<?php echo $r["userid"]; ?> "><?php echo $r["lastname"]; ?> , <?php echo $r["firstname"]; ?> </a></td> <td class="r"><?php echo format_date_time($r["createdOn"]); ?> </td> <?php echo deleteColumn("Delete user?", $r["userid"]); ?> </tr> <?php } } else { echo drawEmptyResult("No pending requests!"); } echo drawTableEnd(); drawBottom();
function GetSolutionTime($solution) { $contest = WT_contest_by_id($solution['contest_id']); if ($contest['settings']['duration'] == 0) { return format_date_time($solution['timestamp']); } else { return Timer($solution['timestamp'] - $contest['settings']['timestamp']); } }
if (in_array($current_folder, array(PM_FOLDER_SENT, PM_FOLDER_OUTBOX, PM_FOLDER_SAVED, PM_FOLDER_DRAFTS, PM_SEARCH_RESULTS))) { if (isset($message['RECIPIENTS']) && sizeof($message['RECIPIENTS']) > 0) { $recipients_display = array_slice($message['RECIPIENTS'], 0, 2); echo " <td align=\"left\" class=\"postbody\" valign=\"top\">"; foreach ($recipients_display as $recipient) { echo " <a href=\"user_profile.php?webtag={$webtag}&uid={$recipient['UID']}\" target=\"_blank\" class=\"popup 650x500\">", word_filter_add_ob_tags(format_user_name($recipient['LOGON'], $recipient['NICKNAME']), true), "</a>\n"; } if (sizeof($message['RECIPIENTS']) - 2 > 0) { echo " ", sprintf(gettext("and %d others"), sizeof($message['RECIPIENTS']) - 2); } echo " </td>\n"; } else { echo " <td align=\"left\" class=\"postbody\" valign=\"top\">", gettext('Unknown User'), "</td>\n"; } } echo " <td align=\"left\" class=\"postbody\" valign=\"top\">", format_date_time($message['CREATED']), "</td>\n"; echo " </tr>\n"; } } echo " <tr>\n"; echo " <td class=\"postbody\"> </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " </td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td align=\"left\"> </td>\n"; echo " </tr>\n";
function mail_it($to_str, $text, $ticket_id, $text_sel = 1, $txt_only = FALSE) { // 10/6/08, 10/15/08, 2/18/09, 3/7/09 global $istest; /* Subject A Inciden B Title Priorit C Priorit Nature D Nature Written E Written Updated F As of Reporte G By Phone: H Phone: Status: I Status: Address J Location Descrip K Descrip Disposi L Disposi Start/end M Map: " N Map: " Actions O Patients P Host Q 911 contact R // 6/26/10 */ switch ($text_sel) { // 7/7/09 case 1: $match_str = strtoupper(get_variable("msg_text_1")); // note case break; case 2: $match_str = strtoupper(get_variable("msg_text_2")); break; case 3: $match_str = strtoupper(get_variable("msg_text_3")); break; } if (empty($match_str)) { $match_str = " " . implode("", range("A", "R")); } // empty get all - force non-zero hit // require_once("cell_addrs.inc.php"); // 10/22/08 // snap (__LINE__, count($cell_addrs)); // $cell_addrs = array( "vtext.com", "messaging.sprintpcs.com", "txt.att.net", "vmobl.com", "myboostmobile.com"); // 10/5/08 // if ($istest) {array_push($cell_addrs, "gmail.com");}; $query = "SELECT * FROM `{$GLOBALS['mysql_prefix']}ticket` WHERE `id`='{$ticket_id}' LIMIT 1"; $ticket_result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__); $t_row = stripslashes_deep(mysql_fetch_array($ticket_result)); // dump($t_row); $eol = "\n"; $locale = get_variable('locale'); $message = ""; $_end = good_date_time($t_row['problemend']) ? " End:" . $t_row['problemend'] : ""; // for ($i = 0; $i < strlen($match_str); $i++) { if (!($match_str[$i] == " ")) { switch ($match_str[$i]) { case "A": break; case "B": $message .= "Incident: " . $t_row['scope'] . $eol; break; case "C": $message .= "Priority: " . get_severity($t_row['severity']) . $eol; break; case "D": $message .= "Nature: " . get_type($t_row['in_types_id']) . $eol; break; case "J": $str = ""; $str .= empty($t_row['street']) ? "" : $t_row['street'] . " "; $str .= empty($t_row['city']) ? "" : $t_row['city'] . " "; $str .= empty($t_row['state']) ? "" : $t_row['state']; $message .= empty($str) ? "" : "Addr: " . $str . $eol; break; case "K": $message .= empty($t_row['description']) ? "" : "Descr: " . wordwrap($t_row['description']) . $eol; break; case "G": $message .= "Reported by: " . $t_row['contact'] . $eol; break; case "H": $message .= empty($t_row['phone']) ? "" : "Phone: " . format_phone($t_row['phone']) . $eol; break; case "E": $message .= empty($t_row['date']) ? "" : "Written: " . format_date_time($t_row['date']) . $eol; break; case "F": $message .= "Updated: " . format_date_time($t_row['updated']) . $eol; break; case "I": $message .= "Status: " . get_status($t_row['status']) . $eol; break; case "L": $message .= empty($t_row['comments']) ? "" : "Disp: " . wordwrap($t_row['comments']) . $eol; break; case "M": $message .= get_text("Run Start") . ": " . format_date_time($t_row['problemstart']) . $_end . $eol; break; case "N": if ($locale == 0) { $usng = LLtoUSNG($t_row['lat'], $t_row['lng']); $message .= "Map: " . $t_row['lat'] . " " . $t_row['lng'] . ", " . $usng . "\n"; } if ($locale == 1) { $osgb = LLtoOSGB($t_row['lat'], $t_row['lng']); $message .= "Map: " . $t_row['lat'] . " " . $t_row['lng'] . ", " . $osgb . "\n"; } if ($locale == 2) { $utm = LLtoUTM($t_row['lat'], $t_row['lng']); $message .= "Map: " . $t_row['lat'] . " " . $t_row['lng'] . ", " . $utm . "\n"; } break; case "P": $query = "SELECT * FROM `{$GLOBALS['mysql_prefix']}patient` WHERE ticket_id='{$ticket_id}'"; $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__); if (mysql_affected_rows() > 0) { $message .= "\nPatient:\n"; while ($pat_row = stripslashes_deep(mysql_fetch_array($result))) { $message .= $pat_row['name'] . ", " . $pat_row['updated'] . "- " . wordwrap($pat_row['description'], 70) . "\n"; } } unset($result); break; case "O": $query = "SELECT * FROM `{$GLOBALS['mysql_prefix']}action` WHERE `ticket_id`='{$ticket_id}'"; // 10/16/08 $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__); // 3/22/09 if (mysql_affected_rows() > 0) { $message .= "\nActions:\n"; $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__); while ($act_row = stripslashes_deep(mysql_fetch_array($result))) { $message .= $act_row['updated'] . " - " . wordwrap($act_row['description'], 70) . "\n"; } } unset($result); break; case "Q": $message .= "Tickets host: " . get_variable('host') . $eol; break; case "R": // 6/26/10 $message .= empty($t_row['nine_one_one']) ? "" : get_text('911 Contacted') . ": " . wordwrap($t_row['nine_one_one']) . $eol; // 11/10/11 break; default: $message = "Match string error:" . $match_str[$i] . " " . $match_str . $eol; } // end switch () } // end if(!($match_...)) } // end for ($i...) $message = str_replace("\n.", "\n..", $message); // see manual re mail win platform peculiarities $subject = strpos($match_str, "A") ? $text . $t_row['scope'] . " (#" . $t_row['id'] . ")" : ""; if ($txt_only) { return $subject . "\n" . $message; // 2/16/09 } else { do_send($to_str, $subject, $message); } }
$number = "<a href=\"messages.php?webtag={$webtag}&msg={$thread['TID']}.1\" target=\"" . html_get_frame_name('right') . "\" title=\"" . gettext("Go to first post in thread") . "\">[</a>"; $number .= "{$thread['LENGTH']}<a href=\"messages.php?webtag={$webtag}&msg={$thread['TID']}." . thread_get_last_page_pid($thread['LENGTH'], $posts_per_page) . "\" target=\"" . html_get_frame_name('right') . "\" title=\"" . gettext("Go to last post in thread") . "\">]</a>"; } else { $number = "<a href=\"messages.php?webtag={$webtag}&msg={$thread['TID']}.1\" target=\"" . html_get_frame_name('right') . "\" title=\"" . gettext("Go to first post in thread") . "\">[</a>"; $number .= "1<a href=\"messages.php?webtag={$webtag}&msg={$thread['TID']}.1\" target=\"" . html_get_frame_name('right') . "\" title=\"" . gettext("Go to last post in thread") . "\">]</a>"; } $latest_post = 1; if (!is_numeric($first_thread) && isset($selected_tid) && $selected_tid == $thread['TID']) { $first_thread = $thread['TID']; echo html_style_image('bullet current_thread', gettext("Thread Options"), "t{$thread['TID']}"); } else { echo html_style_image('bullet bullet', gettext("Thread Options"), "t{$thread['TID']}"); } } echo "</a>"; $thread_time = format_date_time($thread['MODIFIED'], true); echo "</td>\n"; echo " <td align=\"left\" valign=\"top\">"; echo "<a href=\"messages.php?webtag={$webtag}&msg={$thread['TID']}.{$latest_post}\" target=\"", html_get_frame_name('right'), "\" class=\"threadname\" data-tid=\"t{$thread['TID']}\""; echo "title=\"", sprintf(gettext("Thread #%s Started by %s. Viewed %s"), $thread['TID'], word_filter_add_ob_tags(format_user_name($thread['LOGON'], $thread['NICKNAME']), true), $thread['VIEWCOUNT'] == 1 ? gettext("1 time") : sprintf(gettext("%d times"), $thread['VIEWCOUNT'])), "\">"; echo word_filter_add_ob_tags($thread['TITLE'], true), "</a> "; if (session::logged_in()) { if (isset($thread['INTEREST']) && $thread['INTEREST'] == THREAD_INTERESTED) { echo "", html_style_image('high_interest', gettext("High Interest")), " "; } if (isset($thread['INTEREST']) && $thread['INTEREST'] == THREAD_SUBSCRIBED) { echo "", html_style_image('subscribe', gettext("Subscribed")), " "; } if (isset($thread['RELATIONSHIP']) && $thread['RELATIONSHIP'] & USER_FRIEND) { echo "", html_style_image('friend', gettext("Friend")), " "; }
$message['TITLE'] = word_filter_add_ob_tags(mb_substr($message['TITLE'], 0, 20), true) . "…"; } else { $message['TITLE'] = word_filter_add_ob_tags($message['TITLE'], true); } // Limit displayed post content to 35 characters if (mb_strlen($message['CONTENT']) > 70) { $message['CONTENT'] = word_filter_add_ob_tags(fix_html(mb_substr($message['CONTENT'], 0, 70)), true) . "…"; } else { $message['CONTENT'] = word_filter_add_ob_tags($message['CONTENT'], true); } if (thread_is_poll($search_result['TID']) && $search_result['PID'] == 1 || strlen($message['CONTENT']) < 1) { echo " <li><p><a href=\"messages.php?webtag={$webtag}&msg={$search_result['TID']}.{$search_result['PID']}&hightlight=yes\" target=\"", html_get_frame_name('right'), "\"><b>{$message['TITLE']}</b></a><br />"; echo "<span><b>", gettext("From"), ":</b> ", word_filter_add_ob_tags(format_user_name($search_result['FROM_LOGON'], $search_result['FROM_NICKNAME']), true), ", ", format_date_time($search_result['CREATED']), "</span></p></li>\n"; } else { echo " <li><p><a href=\"messages.php?webtag={$webtag}&msg={$search_result['TID']}.{$search_result['PID']}&highlight=yes\" target=\"", html_get_frame_name('right'), "\"><b>{$message['TITLE']}</b></a><br />"; echo "{$message['CONTENT']}<br /><span><b>", gettext("From"), ":</b> ", word_filter_add_ob_tags(format_user_name($search_result['FROM_LOGON'], $search_result['FROM_NICKNAME']), true), ", ", format_date_time($search_result['CREATED']), "</span></p></li>\n"; } } } } echo "</ol>\n"; if (ceil($search_results_array['result_count'] / 20) > $page) { echo "", html_style_image('current_thread'), " <a href=\"search.php?webtag={$webtag}&page=", $page + 1, "&sort_by={$sort_by}&sort_dir={$sort_dir}\">", gettext("Find more"), "</a><br />\n"; } echo "<br />\n"; echo "<form accept-charset=\"utf-8\" name=\"f_nav\" method=\"get\" action=\"search.php\" target=\"_self\">\n"; echo " ", form_input_hidden("webtag", htmlentities_array($webtag)), "\n"; echo " ", form_input_hidden("page", isset($page) ? htmlentities_array($page) : 1), "\n"; echo " <table cellpadding=\"2\" cellspacing=\"0\">\n"; echo " <tr>\n"; echo " <td align=\"left\" colspan=\"2\">", gettext("Sort Results"), ":</td>\n";
function visitor_log_browse_items($user_search, $profile_items_array, $page, $sort_by, $sort_dir, $hide_empty, $hide_guests) { if (!($db = db::get())) { return false; } if (!is_numeric($page) || $page < 1) { return false; } $offset = calculate_page_offset($page, 10); if (!is_array($profile_items_array)) { return false; } // Fetch the table prefix. if (!($table_prefix = get_table_prefix())) { return false; } // Forum FID which we'll need later. if (!($forum_fid = get_forum_fid())) { return false; } // Permitted columns to sort the results by $sort_by_array = array_keys($profile_items_array); // Permitted sort directions. $sort_dir_array = array('ASC', 'DESC'); // Check the specified sort by and sort directions. If they're // invalid default to LAST_VISIT DESC. if (!in_array($sort_by, $sort_by_array)) { $sort_by = 'UID'; } if (!in_array($sort_dir, $sort_dir_array)) { $sort_dir = 'DESC'; } // Get the current session's UID. if (!isset($_SESSION['UID']) || !is_numeric($_SESSION['UID'])) { return false; } // Constant for the relationship $user_friend = USER_FRIEND; // Named column NULL filtering $column_null_filter_having_array = array('POST_COUNT' => '(POST_COUNT IS NOT NULL)', 'LAST_VISIT' => '(LAST_VISIT IS NOT NULL)', 'REGISTERED' => '(REGISTERED IS NOT NULL)', 'DOB' => '(DOB IS NOT NULL)', 'AGE' => '(AGE IS NOT NULL AND AGE > 0)', 'TIMEZONE' => '(TIMEZONE IS NOT NULL)', 'LOCAL_TIME' => '(LOCAL_TIME IS NOT NULL)', 'USER_RATING' => '(USER_RATING > 0)', 'POST_SCORES' => '(POST_VOTE_TOTAL > 0)'); // Column alias to perform sorting against for textual results. $column_sort_alias = array('POST_SCORES' => 'POST_VOTE_TOTAL'); // Year, Month and Day for Age calculation list($year, $month, $day) = explode('-', date(MYSQL_DATE, time())); // Current Date for User's local time $current_datetime = date(MYSQL_DATE_HOUR_MIN, time()); // Main Query $select_sql = "SELECT SQL_CALC_FOUND_ROWS USER.UID, USER.LOGON, USER.NICKNAME, USER_PEER.RELATIONSHIP, "; $select_sql .= "USER_PEER.PEER_NICKNAME, CAST(USER_TRACK.USER_VALUE AS UNSIGNED) AS POST_COUNT, "; $select_sql .= "IF (USER_PREFS_GLOBAL.DOB_DISPLAY > 1, DATE_FORMAT(USER_PREFS_GLOBAL.DOB, '0000-%m-%d'), NULL) AS DOB, "; $select_sql .= "IF (USER_PREFS_GLOBAL.DOB_DISPLAY IN (1, 3), {$year} - DATE_FORMAT(USER_PREFS_GLOBAL.DOB, '%Y') - "; $select_sql .= "('00-{$month}-{$day}' < DATE_FORMAT(USER_PREFS_GLOBAL.DOB, '00-%m-%d')), "; $select_sql .= "NULL) AS AGE, TIMEZONES.TZID AS TIMEZONE, UNIX_TIMESTAMP('{$current_datetime}') AS LOCAL_TIME, "; $select_sql .= "UNIX_TIMESTAMP(USER.REGISTERED) AS REGISTERED, COALESCE(USER_PREFS_FORUM.AVATAR_URL, "; $select_sql .= "USER_PREFS_GLOBAL.AVATAR_URL) AS AVATAR_URL, COALESCE(USER_PREFS_FORUM.AVATAR_AID, "; $select_sql .= "USER_PREFS_GLOBAL.AVATAR_AID) AS AVATAR_AID, SEARCH_ENGINE_BOTS.SID, SEARCH_ENGINE_BOTS.NAME, "; $select_sql .= "SEARCH_ENGINE_BOTS.URL, IF (USER_PREFS_GLOBAL.ANON_LOGON = 1, NULL, "; $select_sql .= "UNIX_TIMESTAMP(VISITOR_LOG.LAST_LOGON)) AS LAST_VISIT, "; $select_sql .= "COALESCE(USER_RATING.USER_RATING, 0) AS USER_RATING, "; $select_sql .= "COALESCE(POST_RATING.POST_VOTE_TOTAL, 0) AS POST_VOTE_TOTAL, "; $select_sql .= "COALESCE(POST_RATING.POST_VOTE_UP, 0) AS POST_VOTE_UP, "; $select_sql .= "COALESCE(POST_RATING.POST_VOTE_DOWN, 0) AS POST_VOTE_DOWN "; // Include the selected numeric (PIID) profile items $profile_entry_array = array(); // Include the profile item types and options. $profile_item_type_array = array(); $profile_item_options_array = array(); // Iterate through them. foreach ($sort_by_array as $column) { if (is_numeric($column)) { $profile_entry_array[$column] = "USER_PROFILE_{$column}.ENTRY AS ENTRY_{$column} "; $profile_item_type_array[] = "PROFILE_ITEM_{$column}.TYPE AS PROFILE_ITEM_TYPE_{$column} "; $profile_item_options_array[] = "PROFILE_ITEM_{$column}.OPTIONS AS PROFILE_ITEM_OPTIONS_{$column} "; } } // From portion which selects users and guests from the VISITOR_LOG table. $from_sql = "FROM VISITOR_LOG LEFT JOIN USER ON (USER.UID = VISITOR_LOG.UID) "; // Various joins we need for User's Age, DOB, etc. $join_sql = "LEFT JOIN USER_PREFS USER_PREFS_GLOBAL ON (USER_PREFS_GLOBAL.UID = USER.UID) "; $join_sql .= "LEFT JOIN `{$table_prefix}USER_PREFS` USER_PREFS_FORUM ON (USER_PREFS_FORUM.UID = USER.UID) "; $join_sql .= "LEFT JOIN `{$table_prefix}USER_TRACK` USER_TRACK ON (USER_TRACK.UID = USER.UID AND USER_TRACK.USER_KEY = 'POST_COUNT') "; $join_sql .= "LEFT JOIN `{$table_prefix}USER_PEER` USER_PEER ON (USER_PEER.PEER_UID = USER.UID AND USER_PEER.UID = '{$_SESSION['UID']}') "; $join_sql .= "LEFT JOIN SEARCH_ENGINE_BOTS ON (SEARCH_ENGINE_BOTS.SID = VISITOR_LOG.SID) "; $join_sql .= "LEFT JOIN TIMEZONES ON (TIMEZONES.TZID = USER_PREFS_GLOBAL.TIMEZONE) "; $join_sql .= "LEFT JOIN (SELECT POST_RATING.UID, COUNT(POST_RATING.RATING) AS POST_VOTE_TOTAL, "; $join_sql .= "SUM(IF(POST_RATING.RATING > 0, 1, 0)) AS POST_VOTE_UP, "; $join_sql .= "SUM(IF(POST_RATING.RATING < 0, 1, 0)) AS POST_VOTE_DOWN "; $join_sql .= "FROM `{$table_prefix}POST_RATING` POST_RATING GROUP BY POST_RATING.UID) AS POST_RATING "; $join_sql .= "ON (POST_RATING.UID = VISITOR_LOG.UID) LEFT JOIN (SELECT POST.FROM_UID AS UID, "; $join_sql .= "SUM(POST_RATING.RATING) AS USER_RATING FROM `{$table_prefix}POST` POST "; $join_sql .= "INNER JOIN `{$table_prefix}POST_RATING` POST_RATING ON (POST_RATING.TID = POST.TID "; $join_sql .= "AND POST_RATING.PID = POST.PID) GROUP BY POST.FROM_UID) AS USER_RATING "; $join_sql .= "ON (USER_RATING.UID = VISITOR_LOG.UID) "; // Joins on the selected numeric (PIID) profile items. foreach ($sort_by_array as $column) { if (is_numeric($column)) { $join_sql .= "LEFT JOIN `{$table_prefix}PROFILE_ITEM` PROFILE_ITEM_{$column} "; $join_sql .= "ON (PROFILE_ITEM_{$column}.PIID = '{$column}') "; $join_sql .= "LEFT JOIN `{$table_prefix}USER_PROFILE` USER_PROFILE_{$column} "; $join_sql .= "ON (USER_PROFILE_{$column}.PIID = PROFILE_ITEM_{$column}.PIID "; $join_sql .= "AND USER_PROFILE_{$column}.UID = USER.UID "; $join_sql .= "AND (USER_PROFILE_{$column}.PRIVACY = 0 "; $join_sql .= "OR (USER_PROFILE_{$column}.PRIVACY = 1 "; $join_sql .= "AND (USER_PEER.RELATIONSHIP & {$user_friend} > 0)))) "; } } // The Where clause $where_query_array = array("VISITOR_LOG.FORUM = '{$forum_fid}'"); // Having clause for filtering NULL columns. $having_query_array = array(); // Filter by user name / search engine bot name if ($user_search !== false && strlen(trim($user_search)) > 0) { $user_search = $db->escape(str_replace('%', '', $user_search)); $user_search_sql = "(USER.LOGON LIKE '{$user_search}%' OR "; $user_search_sql .= "USER.NICKNAME LIKE '{$user_search}%')"; $where_query_array[] = $user_search_sql; } // Hide Guests if ($hide_guests === true) { $where_query_array[] = "(USER.UID IS NOT NULL) "; } // Hide empty or NULL values if ($hide_empty === true) { foreach ($sort_by_array as $column) { if (is_numeric($column)) { $having_query_array[] = "(LENGTH(ENTRY_{$column}) > 0) "; } else { $having_query_array[] = $column_null_filter_having_array[$column]; } } } // Main query NULL column filtering if (sizeof($having_query_array) > 0) { $having_sql = sprintf("HAVING %s", implode(" OR ", $having_query_array)); } else { $having_sql = ""; } if (sizeof($where_query_array) > 0) { $where_sql = sprintf("WHERE %s", implode(" AND ", $where_query_array)); } else { $where_sql = ""; } // Sort direction specified? if (is_numeric($sort_by)) { $order_sql = "ORDER BY ENTRY_{$sort_by} {$sort_dir} "; } else { if (isset($column_sort_alias[$sort_by])) { $order_sql = "ORDER BY {$column_sort_alias[$sort_by]} {$sort_dir} "; } else { $order_sql = "ORDER BY {$sort_by} {$sort_dir}"; } } // Limit the display to 10 per page. $limit_sql = "LIMIT {$offset}, 10"; // Array to store our results in. $user_array = array(); // Combine the profile columns with the main select SQL. $query_array_merge = array_merge(array($select_sql), $profile_entry_array, $profile_item_type_array, $profile_item_options_array); // Construct final SQL query. $sql = implode(",", $query_array_merge) . "{$from_sql} {$join_sql} "; $sql .= "{$where_sql} {$having_sql} {$order_sql} {$limit_sql}"; if (!($result = $db->query($sql))) { return false; } // Fetch the number of total results $sql = "SELECT FOUND_ROWS() AS ROW_COUNT"; if (!($result_count = $db->query($sql))) { return false; } list($user_count) = $result_count->fetch_row(); // Check if we have any results. if ($result->num_rows == 0 && $user_count > 0 && $page > 1) { return visitor_log_browse_items($user_search, $profile_items_array, $page - 1, $sort_by, $sort_dir, $hide_empty, $hide_guests); } while (($user_data = $result->fetch_assoc()) !== null) { if (isset($user_data['LOGON']) && isset($user_data['PEER_NICKNAME'])) { if (!is_null($user_data['PEER_NICKNAME']) && strlen($user_data['PEER_NICKNAME']) > 0) { $user_data['NICKNAME'] = $user_data['PEER_NICKNAME']; } } if ($user_data['UID'] == 0) { $user_data['LOGON'] = gettext("Guest"); $user_data['NICKNAME'] = gettext("Guest"); } else { if (!isset($user_data['LOGON']) || is_null($user_data['LOGON'])) { $user_data['LOGON'] = gettext("Unknown user"); $user_data['NICKNAME'] = ""; } } if (isset($user_data['LAST_VISIT']) && is_numeric($user_data['LAST_VISIT'])) { $user_data['LAST_VISIT'] = format_date_time($user_data['LAST_VISIT']); } else { $user_data['LAST_VISIT'] = gettext("Unknown"); } if (isset($user_data['REGISTERED']) && is_numeric($user_data['REGISTERED'])) { $user_data['REGISTERED'] = format_date_time($user_data['REGISTERED']); } else { $user_data['REGISTERED'] = gettext("Unknown"); } if (!isset($user_data['AGE']) || !is_numeric($user_data['AGE'])) { $user_data['AGE'] = gettext("Unknown"); } if (!($user_data['DOB'] = format_birthday($user_data['DOB']))) { $user_data['DOB'] = gettext("Unknown"); } $user_data['TIMEZONE'] = timezone_id_to_string($user_data['TIMEZONE']); if (isset($user_data['LOCAL_TIME']) && is_numeric($user_data['LOCAL_TIME'])) { $user_data['LOCAL_TIME'] = format_date_time($user_data['LOCAL_TIME']); } else { $user_data['LOCAL_TIME'] = gettext("Unknown"); } if (!isset($user_data['POST_COUNT']) || !is_numeric($user_data['POST_COUNT'])) { $user_data['POST_COUNT'] = 0; } if (!isset($user_data['POST_VOTE_TOTAL']) || !is_numeric($user_data['POST_VOTE_TOTAL'])) { $user_data['POST_VOTE_TOTAL'] = 0; } if (!isset($user_data['POST_VOTE_DOWN']) || !is_numeric($user_data['POST_VOTE_DOWN'])) { $user_data['POST_VOTE_DOWN'] = 0; } if (!isset($user_data['POST_VOTE_UP']) || !is_numeric($user_data['POST_VOTE_UP'])) { $user_data['POST_VOTE_UP'] = 0; } $user_data['POST_SCORES'] = sprintf(gettext("%d total, %d down - %d up"), $user_data['POST_VOTE_TOTAL'], $user_data['POST_VOTE_DOWN'], $user_data['POST_VOTE_UP']); $user_array[] = $user_data; } return array('user_count' => $user_count, 'user_array' => $user_array); }
</option> <?php } } ?> </select></td> </tr><tr class="oddRow"> <td class="bldTxt" align="right" width="25%">Added Date :</td> <td align="left" width="75%" class="txt"> <input name="added_date" type="text" class="txtfld datepicker" id="added_date" value="<?php echo user_date($added_date); ?> " size="20"></td> </tr><tr class="evenRow"> <td class="bldTxt" align="right" width="25%">Datetime :</td> <td align="left" width="75%" class="txt"> <input name="datetime" type="text" class="txtfld datetimepicker" id="datetime" value="<?php echo format_date_time($datetime, 1); ?> " size="30"></td> </tr><tr class="oddRow"> <td class="bldTxt" align="right" width="25%">Status :</td> <td align="left" width="75%" class="txt"> <select name="status" class="txtfld" id="status"> <option value="1" <?php if ($status == 1) { echo "selected='selected'"; } ?> >Activate</option> <option value="0" <?php if ($status == 0) { echo "selected='selected'"; }
function pm_display($message_data, $preview = false, $export_html = false) { $webtag = get_webtag(); forum_check_webtag_available($webtag); echo "<div align=\"center\">\n"; echo " <table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"; echo " <tr>\n"; echo " <td align=\"left\">\n"; echo " <table class=\"box\" width=\"100%\" cellpadding=\"0\">\n"; echo " <tr>\n"; echo " <td align=\"left\">\n"; echo " <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n"; echo " <tr>\n"; echo " <td align=\"left\">\n"; echo " <table width=\"100%\" class=\"posthead\" cellspacing=\"1\" cellpadding=\"0\">\n"; echo " <tr>\n"; if ($export_html === true) { echo " <td width=\"1%\" align=\"right\" style=\"white-space: nowrap\"><span class=\"posttofromlabel\"> ", gettext("From"), ": </span></td>\n"; echo " <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofrom\">", word_filter_add_ob_tags(format_user_name($message_data['FROM_LOGON'], $message_data['FROM_NICKNAME']), true), "</span></td>\n"; } else { echo " <td width=\"1%\" align=\"right\" style=\"white-space: nowrap\"><span class=\"posttofromlabel\"> ", gettext("From"), ": </span></td>\n"; echo " <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofrom\"><a href=\"user_profile.php?webtag={$webtag}&uid={$message_data['FROM_UID']}\" target=\"_blank\" class=\"popup 650x500\">", word_filter_add_ob_tags(format_user_name($message_data['FROM_LOGON'], $message_data['FROM_NICKNAME']), true), "</a></span></td>\n"; } if (isset($message_data['TYPE']) && $message_data['TYPE'] & PM_SAVED_DRAFT) { echo " <td align=\"right\" style=\"white-space: nowrap\"><span class=\"postinfo\"><i>", gettext("Not Sent"), "</i> </span></td>\n"; } else { echo " <td align=\"right\" style=\"white-space: nowrap\"><span class=\"postinfo\">", format_date_time($message_data['CREATED']), " </span></td>\n"; } echo " </tr>\n"; echo " <tr>\n"; echo " <td width=\"1%\" align=\"right\" style=\"white-space: nowrap\"><span class=\"posttofromlabel\"> ", gettext("Subject"), ": </span></td>\n"; if (strlen(trim($message_data['SUBJECT'])) > 0) { echo " <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofrom\">", word_filter_add_ob_tags($message_data['SUBJECT'], true), "</span></td>\n"; } else { echo " <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofrom\"><i>", gettext("No Subject"), "</i></span></td>\n"; } echo " </tr>\n"; echo " <tr>\n"; echo " <td width=\"1%\" align=\"right\" style=\"white-space: nowrap\"><span class=\"posttofromlabel\"> ", gettext("To"), ": </span></td>\n"; if (isset($message_data['RECIPIENTS']) && sizeof($message_data['RECIPIENTS']) > 0) { echo " <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofrom\">"; foreach ($message_data['RECIPIENTS'] as $recipient) { echo " <a href=\"user_profile.php?webtag={$webtag}&uid={$recipient['UID']}\" target=\"_blank\" class=\"popup 650x500\">", word_filter_add_ob_tags(format_user_name($recipient['LOGON'], $recipient['NICKNAME']), true), "</a>"; } echo " </td>\n"; } else { echo " <td style=\"white-space: nowrap\" width=\"98%\" align=\"left\"><span class=\"posttofrom\">", gettext('Unknown User'), "</td>\n"; } $message_data['CONTENT'] = message_apply_formatting($message_data['CONTENT']); $message_data['CONTENT'] = word_filter_add_ob_tags($message_data['CONTENT']); echo " </tr>\n"; echo " </table>\n"; echo " </td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td align=\"left\">\n"; echo " <table width=\"100%\">\n"; echo " <tr>\n"; echo " <td colspan=\"3\" align=\"left\"> </td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td class=\"postbody overflow_content\" align=\"left\">{$message_data['CONTENT']}</td>\n"; echo " </tr>\n"; if (isset($message_data['ATTACHMENTS']) && sizeof($message_data['ATTACHMENTS']) > 0) { if (($attachments_array = attachments_get($message_data['FROM_UID'], $message_data['ATTACHMENTS'])) !== false) { echo " <tr>\n"; echo " <td class=\"postbody\" align=\"left\">\n"; echo " <p><b>", gettext("Attachments"), ":</b><br />\n"; foreach ($attachments_array as $attachment) { echo attachments_make_link($attachment), $attachment['thumbnail'] == 'N' ? "<br />\n" : "\n"; } echo " </p>\n"; echo " </td>\n"; echo " </tr>\n"; } } echo " </table>\n"; echo " <table width=\"100%\" class=\"postresponse\" cellspacing=\"1\" cellpadding=\"0\">\n"; echo " <tr>\n"; echo " <td align=\"center\">\n"; if ($preview === false) { if ($message_data['TYPE'] & PM_INBOX_ITEMS) { echo "", html_style_image('post', "Reply"), " <a href=\"pm_write.php?webtag={$webtag}&reply_to={$message_data['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Reply"), "</a> \n"; if (isset($message_data['RECIPIENTS']) && sizeof($message_data['RECIPIENTS']) > 1) { echo "", html_style_image('reply_all', "Reply All"), " <a href=\"pm_write.php?webtag={$webtag}&replyall={$message_data['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Reply All"), "</a> \n"; } echo "", html_style_image('forward', "Forward"), " <a href=\"pm_write.php?webtag={$webtag}&fwdmsg={$message_data['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Forward"), "</a> \n"; } else { if ($message_data['TYPE'] & PM_DRAFT_ITEMS) { echo "", html_style_image('edit', "Edit"), " <a href=\"pm_write.php?webtag={$webtag}&editmsg={$message_data['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Edit"), "</a> \n"; } else { if ($message_data['EDITABLE'] == 1) { echo "", html_style_image('post', "Edit"), " <a href=\"pm_edit.php?webtag={$webtag}&mid={$message_data['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Edit"), "</a> \n"; } echo "", html_style_image('forward', "Forward"), " <a href=\"pm_write.php?webtag={$webtag}&fwdmsg={$message_data['MID']}\" target=\"", html_get_frame_name('main'), "\">", gettext("Forward"), "</a> \n"; } } } echo " </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo "</div>\n"; }
function drawName($userID, $name, $date = false, $withtime = false, $separator = "<br>") { global $_josh, $locale; $date = $date ? format_date_time($date, "", $separator) : false; return ' <div class="user"> <a href="http://' . $_josh["request"]["host"] . '/staff/view.php?id=' . $userID . '">' . drawImg($userID) . format_string($name, 20) . '</a>' . $date . ' </div>'; }
if (($active_registered_user_count = stats_get_active_registered_user_count()) !== false) { echo " <tr>\n"; echo " <td align=\"left\" style=\"white-space: nowrap\" width=\"40%\">", gettext("Number of active registered users"), ": </td>\n"; echo " <td align=\"left\">", format_number($active_registered_user_count), "</td>\n"; echo " </tr>\n"; } if (($active_guest_count = stats_get_active_guest_count()) !== false) { echo " <tr>\n"; echo " <td align=\"left\" style=\"white-space: nowrap\" width=\"40%\">", gettext("Number of active guests"), ": </td>\n"; echo " <td align=\"left\">", format_number($active_guest_count), "</td>\n"; echo " </tr>\n"; } if (($most_users = stats_get_most_users()) !== false) { echo " <tr>\n"; echo " <td align=\"left\" style=\"white-space: nowrap\" width=\"40%\">", gettext("Most users ever online"), ": </td>\n"; echo " <td align=\"left\">", sprintf(gettext("%s on %s"), format_number($most_users['MOST_USERS_COUNT']), format_date_time($most_users['MOST_USERS_DATE'])), "</td>\n"; echo " </tr>\n"; } echo " <tr>\n"; echo " <td align=\"left\" colspan=\"3\"> </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " <br />\n"; echo " <table cellpadding=\"0\" cellspacing=\"0\" width=\"86%\">\n"; echo " <tr>\n";
echo "\t<TD> {$the_disp_stat}</TD>\n"; // column 3- disp status $the_ticket = shorten("{$assigns_stack[$i]['scope']}", 24); echo "\t<TD CLASS='{$severityclass}' > {$blinkst}{$the_ticket}{$blinkend}</TD>\n"; // column 5 - ticket $the_addr = shorten("{$assigns_stack[$i]['tick_street']}, {$assigns_stack[$i]['tick_city']}", 24); echo "\t<TD CLASS='{$severityclass}' > {$the_addr}</TD>\n"; // column 6 - address if ($assigns_stack[$i]['tick_status'] == $GLOBALS['STATUS_SCHEDULED']) { $the_date = $assigns_stack[$i]['booked_date']; $booked_symb = "<IMG SRC = 'markers/clock.png'/> "; } else { $the_date = $assigns_stack[$i]['problemstart']; $booked_symb = ""; } echo "<TD CLASS='{$severityclass}' >" . format_date_time($the_date) . "</TD>\n"; // column 4 - date echo "\t<TD> {$booked_symb}</TD>\n"; // column 7 - booked symb // -- echo "</TR>\n"; } // end for ($i ...) echo "</TABLE>\n"; ?> </TD></TR></TABLE> </TD> <TD ROWSPAN=2 ID = 'right col'> <?php print "<BR CLEAR = 'left' /><P ALIGN='left'>";
function user_get_profile($uid) { if (!($db = db::get())) { return false; } if (!is_numeric($uid)) { return false; } if (!isset($_SESSION['UID']) || !is_numeric($_SESSION['UID'])) { return false; } if (!($table_prefix = get_table_prefix())) { return false; } if (!($forum_fid = get_forum_fid())) { return false; } $user_prefs = user_get_prefs($uid); $session_gc_maxlifetime = ini_get('session.gc_maxlifetime'); $session_cutoff_datetime = date(MYSQL_DATETIME, time() - $session_gc_maxlifetime); $sql = "SELECT USER.UID, USER.LOGON, USER.NICKNAME, USER_PEER.PEER_NICKNAME, USER_PEER.RELATIONSHIP, "; $sql .= "SESSIONS.ID, UNIX_TIMESTAMP(USER_FORUM.LAST_VISIT) AS LAST_VISIT, UNIX_TIMESTAMP(USER.REGISTERED) AS REGISTERED, "; $sql .= "COALESCE(USER_POST_RATING.RATING, 0) AS POST_RATING, COUNT(POST_USER_RATING.RATING) AS POST_VOTE_TOTAL, "; $sql .= "COALESCE(SUM(IF(POST_USER_RATING.RATING > 0, 1, 0)), 0) AS POST_VOTE_UP, "; $sql .= "COALESCE(SUM(IF(POST_USER_RATING.RATING < 0, 1, 0)), 0) AS POST_VOTE_DOWN FROM USER USER "; $sql .= "LEFT JOIN USER_PREFS USER_PREFS_GLOBAL ON (USER_PREFS_GLOBAL.UID = USER.UID) "; $sql .= "LEFT JOIN `{$table_prefix}USER_PREFS` USER_PREFS_FORUM ON (USER_PREFS_FORUM.UID = USER.UID) "; $sql .= "LEFT JOIN `{$table_prefix}USER_PEER` USER_PEER ON (USER_PEER.PEER_UID = USER.UID AND USER_PEER.UID = '{$_SESSION['UID']}') "; $sql .= "LEFT JOIN USER_FORUM USER_FORUM ON (USER_FORUM.UID = USER.UID AND USER_FORUM.FID = '{$forum_fid}') "; $sql .= "LEFT JOIN SESSIONS ON (SESSIONS.UID = USER.UID AND SESSIONS.TIME >= CAST('{$session_cutoff_datetime}' AS DATETIME)) "; $sql .= "LEFT JOIN `{$table_prefix}POST_RATING` POST_USER_RATING ON (POST_USER_RATING.UID = USER.UID AND POST_USER_RATING.RATING IN (-1, 1)) "; $sql .= "LEFT JOIN (SELECT POST.FROM_UID AS UID, SUM(POST_RATING.RATING) AS RATING FROM `{$table_prefix}POST` POST "; $sql .= "INNER JOIN `{$table_prefix}POST_RATING` POST_RATING ON (POST_RATING.TID = POST.TID AND POST_RATING.PID = POST.PID) "; $sql .= "WHERE POST.FROM_UID = '{$uid}' GROUP BY POST.FROM_UID) AS USER_POST_RATING ON (USER_POST_RATING.UID = USER.UID) "; $sql .= "WHERE USER.UID = '{$uid}' GROUP BY USER.UID"; if (!($result = $db->query($sql))) { return false; } if ($result->num_rows == 0) { return false; } $user_profile = $result->fetch_assoc(); if (isset($user_prefs['ANON_LOGON']) && $user_prefs['ANON_LOGON'] > USER_ANON_DISABLED) { $anon_logon = $user_prefs['ANON_LOGON']; } else { $anon_logon = USER_ANON_DISABLED; } if ($anon_logon == USER_ANON_DISABLED && isset($user_profile['LAST_VISIT']) && $user_profile['LAST_VISIT'] > 0) { $user_profile['LAST_LOGON'] = format_date_time($user_profile['LAST_VISIT']); } else { $user_profile['LAST_LOGON'] = gettext("Unknown"); } if (isset($user_profile['REGISTERED']) && $user_profile['REGISTERED'] > 0) { $user_profile['REGISTERED'] = format_date_time($user_profile['REGISTERED']); } else { $user_profile['REGISTERED'] = gettext("Unknown"); } if (isset($user_prefs['DOB_DISPLAY']) && !empty($user_prefs['DOB']) && $user_prefs['DOB'] != "0000-00-00") { if ($user_prefs['DOB_DISPLAY'] == USER_DOB_DISPLAY_BOTH) { $user_profile['DOB'] = format_birthday($user_prefs['DOB']); $user_profile['AGE'] = format_age($user_prefs['DOB']); } else { if ($user_prefs['DOB_DISPLAY'] == USER_DOB_DISPLAY_DATE) { $user_profile['DOB'] = format_birthday($user_prefs['DOB']); } else { if ($user_prefs['DOB_DISPLAY'] == USER_DOB_DISPLAY_AGE) { $user_profile['AGE'] = format_age($user_prefs['DOB']); } } } } if (isset($user_prefs['PIC_URL']) && filter_var($user_prefs['PIC_URL'], FILTER_VALIDATE_URL)) { $user_profile['PIC_URL'] = $user_prefs['PIC_URL']; } if (isset($user_prefs['PIC_AID']) && is_numeric($user_prefs['PIC_AID'])) { $user_profile['PIC_AID'] = $user_prefs['PIC_AID']; } if (isset($user_prefs['AVATAR_URL']) && filter_var($user_prefs['AVATAR_URL'], FILTER_VALIDATE_URL)) { $user_profile['AVATAR_URL'] = $user_prefs['AVATAR_URL']; } if (isset($user_prefs['AVATAR_AID']) && is_numeric($user_prefs['AVATAR_AID'])) { $user_profile['AVATAR_AID'] = $user_prefs['AVATAR_AID']; } if (isset($user_prefs['HOMEPAGE_URL']) && filter_var($user_prefs['HOMEPAGE_URL'], FILTER_VALIDATE_URL)) { $user_profile['HOMEPAGE_URL'] = $user_prefs['HOMEPAGE_URL']; } if (!isset($user_profile['RELATIONSHIP'])) { $user_profile['RELATIONSHIP'] = 0; } if (isset($user_profile['PEER_NICKNAME'])) { if (!is_null($user_profile['PEER_NICKNAME']) && strlen($user_profile['PEER_NICKNAME']) > 0) { $user_profile['NICKNAME'] = $user_profile['PEER_NICKNAME']; } } if ($anon_logon == USER_ANON_DISABLED) { if (isset($user_profile['ID'])) { $user_profile['STATUS'] = gettext("Online"); } else { $user_profile['STATUS'] = gettext("Inactive / Offline"); } } else { $user_profile['STATUS'] = gettext("Unknown"); } if (($user_post_count = user_get_post_count($uid)) !== false) { $user_profile['POST_COUNT'] = $user_post_count; } else { $user_profile['POST_COUNT'] = 0; } if (($user_local_time = user_format_local_time($user_prefs)) !== false) { $user_profile['LOCAL_TIME'] = $user_local_time; } if (user_is_banned($uid)) { $user_profile['GROUPS'] = gettext("Banned"); } else { if ($user_groups_array = perm_user_get_group_names($uid)) { $user_profile['GROUPS'] = implode(', ', $user_groups_array); } else { $user_profile['GROUPS'] = gettext("Registered"); } } return $user_profile; }
function poll_display_user_votes($user_poll_votes_array) { array_walk($user_poll_votes_array['VOTES'], 'poll_user_poll_votes_callback'); $poll_votes_display = "<tr>\n"; $poll_votes_display .= " <td align=\"left\" colspan=\"2\" class=\"postbody\">"; $poll_votes_display .= " " . sprintf(gettext("You voted for: '%s' on %s"), implode("' & '", $user_poll_votes_array['VOTES']), format_date_time($user_poll_votes_array['VOTED'])); $poll_votes_display .= " </td>\n"; $poll_votes_display .= "</tr>\n"; return $poll_votes_display; }
</b></td> </tr> <tr> <td class="left">Type</td> <td><span class="block" style="background-color:<?php echo $e["color"]; ?> ;"><?php echo $e["type"]; ?> </span></td> </tr> <tr> <td class="left">Start Date</td> <td><?php echo format_date_time($e["startDate"]); ?> </td> </tr> <tr valign="top"> <td class="left" height="200">Description</td> <td class="text"><?php echo $e["description"]; ?> </td> </tr> <tr valign="top"> <td class="left">Created</td> <td><?php echo drawName($e["createdBy"], $e["first"] . " " . $e["last"], $e["createdOn"], true); ?>
echo $line["price"]; ?> </td> <td align="center" class="txt" ><?php echo $line["added_by"]; ?> </td> <td align="center" class="txt" ><?php echo user_date($line["added_date"]); ?> </td> <td align="center" class="txt" ><?php echo format_date_time($line["datetime"]); ?> </td> <td align="center" class="txt" ><?php echo $line["status"]; ?> </td> <td valign="middle" class="txt" align="center"><a href="products_addf.php?id=<?php echo $line["id"]; ?> " class="orangetxt">Edit</a> </td> <td valign="middle" align="center"><input type="checkbox" name="ids[]" value="<?php print $line["id"]; ?>
if ($sort_dir == 'ASC') { echo " <a href=\"admin_banned.php?webtag={$webtag}&sort_by=EXPIRES&sort_dir=ASC&page={$page}\">", gettext("Ban Expires"), "</a>\n"; } else { echo " <a href=\"admin_banned.php?webtag={$webtag}&sort_by=EXPIRES&sort_dir=DESC&page={$page}\">", gettext("Ban Expires"), "</a>\n"; } } } echo " </td>\n"; echo " </tr>\n"; if (sizeof($ban_list_array['ban_array']) > 0) { foreach ($ban_list_array['ban_array'] as $ban_list_id => $ban_list_entry) { echo " <tr>\n"; echo " <td align=\"center\">", form_checkbox("delete_ban[{$ban_list_id}]", "Y"), "</td>\n"; echo " <td align=\"left\"><a href=\"admin_banned.php?webtag={$webtag}&ban_id={$ban_list_id}&page={$page}\">{$ban_list_entry['BANDATA']}</a></td>\n"; echo " <td align=\"left\"><a href=\"admin_banned.php?webtag={$webtag}&ban_id={$ban_list_id}&page={$page}\">", in_array($ban_list_entry['BANTYPE'], array_keys($ban_types_list_array)) ? $ban_types_list_array[$ban_list_entry['BANTYPE']] : gettext("Unknown"), "</a></td>\n"; echo " <td align=\"left\"><a href=\"admin_banned.php?webtag={$webtag}&ban_id={$ban_list_id}&page={$page}\">", $ban_list_entry['EXPIRES'] > 0 && $ban_list_entry['EXPIRES'] > time() ? format_date_time($ban_list_entry['EXPIRES']) : gettext("Never"), "</a></td>\n"; echo " </tr>\n"; } } echo " <tr>\n"; echo " <td align=\"left\" colspan=\"5\"> </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " </td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td align=\"left\"> </td>\n"; echo " </tr>\n";
function light_pm_display($message_data, $preview = false) { $webtag = get_webtag(); forum_check_webtag_available($webtag); if (!$preview) { if (strlen(trim($message_data['SUBJECT'])) > 0) { echo "<h3 class=\"message_subject\">", word_filter_add_ob_tags($message_data['SUBJECT'], true), "</h3>\n"; } else { echo "<h3 class=\"message_subject\">", gettext("No Subject"), "</h3>\n"; } } echo "<div class=\"message\">\n"; echo "<div class=\"message_header\">\n"; echo "<div class=\"message_from\">\n"; echo gettext("From"), ": ", word_filter_add_ob_tags(format_user_name($message_data['FROM_LOGON'], $message_data['FROM_NICKNAME']), true), "\n"; echo "<span class=\"message_time\">", format_date_time($message_data['CREATED']), "</span>\n"; echo "<div class=\"clearer\"></div>\n"; echo "</div>\n"; echo "<div class=\"message_to\">", gettext("To"), ": "; if (isset($message_data['RECIPIENTS']) && sizeof($message_data['RECIPIENTS']) > 0) { foreach ($message_data['RECIPIENTS'] as $recipient) { echo "<span>", word_filter_add_ob_tags(format_user_name($recipient['LOGON'], $recipient['NICKNAME']), true), "</span>\n"; } } else { echo gettext('Unknown User'); } echo "<div class=\"clearer\"></div>\n"; echo "</div>\n"; echo "</div>\n"; $message_data['CONTENT'] = message_apply_formatting($message_data['CONTENT']); $message_data['CONTENT'] = word_filter_add_ob_tags($message_data['CONTENT']); echo "<div class=\"message_links\"> </div>\n"; echo "<div class=\"message_body\">", $message_data['CONTENT'], "</div>\n"; if (isset($message_data['ATTACHMENTS']) && sizeof($message_data['ATTACHMENTS']) > 0) { if (($attachments_array = attachments_get($message_data['FROM_UID'], $message_data['ATTACHMENTS'])) !== false) { echo "<div class=\"message_attachments\">\n"; echo " <span>", gettext("Attachments"), ":</span>\n"; echo " <ul>\n"; foreach ($attachments_array as $attachment) { if (($attachment_link = light_attachments_make_link($attachment)) !== false) { echo "<li>", html_style_image('attach'), $attachment_link, "</li>\n"; } } echo " </ul>\n"; echo "</div>\n"; } } if ($preview === false) { $links_array = array(); if (($message_data['TYPE'] & PM_INBOX_ITEMS) > 0) { $links_array[] = "<a href=\"lpm_write.php?webtag={$webtag}&reply_to={$message_data['MID']}\" class=\"reply\">" . html_style_image('post') . gettext("Reply") . "</a>"; if (isset($message_data['RECIPIENTS']) && sizeof($message_data['RECIPIENTS']) > 1) { $links_array[] = "<a href=\"lpm_write.php?webtag={$webtag}&replyall={$message_data['MID']}\" class=\"replyall\">" . html_style_image('reply_all') . gettext("Reply All") . "</a>"; } $links_array[] = "<a href=\"lpm_write.php?webtag={$webtag}&fwdmsg={$message_data['MID']}\" class=\"forward\">" . html_style_image('forward') . gettext("Forward") . "</a>"; $links_array[] = "<a href=\"lpm.php?webtag={$webtag}&delete_msg={$message_data['MID']}\" class=\"delete\">" . html_style_image('delete') . gettext("Delete") . "</a>"; } else { if (($message_data['TYPE'] & PM_OUTBOX_ITEMS) > 0) { $links_array[] = "<a href=\"lpm_edit.php?webtag={$webtag}&mid={$message_data['MID']}\" class=\"edit\">" . html_style_image('edit') . gettext("Edit") . "</a>"; $links_array[] = "<a href=\"lpm_write.php?webtag={$webtag}&fwdmsg={$message_data['MID']}\" class=\"forward\">" . html_style_image('forward') . gettext("Forward") . "</a>"; $links_array[] = "<a href=\"lpm.php?webtag={$webtag}&delete_msg={$message_data['MID']}\" class=\"delete\">" . html_style_image('delete') . gettext("Delete") . "</a>"; } else { if (($message_data['TYPE'] & PM_DRAFT_ITEMS) > 0) { $links_array[] = "<a href=\"lpm_write.php?webtag={$webtag}&editmsg={$message_data['MID']}\" class=\"edit\">" . html_style_image('edit') . gettext("Edit") . "</a>"; $links_array[] = "<a href=\"lpm.php?webtag={$webtag}&delete_msg={$message_data['MID']}\" class=\"delete\">" . html_style_image('delete') . gettext("Delete") . "</a>"; } else { $links_array[] = "<a href=\"lpm_write.php?webtag={$webtag}&fwdmsg={$message_data['MID']}\" class=\"forward\">" . html_style_image('forward') . gettext("Forward") . "</a>"; $links_array[] = "<a href=\"lpm.php?webtag={$webtag}&delete_msg={$message_data['MID']}\" class=\"delete\">" . html_style_image('delete') . gettext("Delete") . "</a>"; } } } if (sizeof($links_array) > 0) { echo "<div class=\"message_footer_links\">", implode(' ', $links_array), "</div>\n"; } } echo "</div>"; }
function list_users() { /* list users */ global $colors; // 9/3/10 // $result = mysql_query("SELECT * FROM `$GLOBALS[mysql_prefix]user`") or do_error('list_users()::mysql_query()', 'mysql query failed', mysql_error(), __FILE__, __LINE__); $query = "SELECT *,\n\t\t`u`.`id` AS `userid`,\n\t\t`r`.`name` AS `unitname`,\n\t\t`r`.`id` AS `unitid`\n\t\tFROM `{$GLOBALS['mysql_prefix']}user` `u`\n\t\tLEFT JOIN `{$GLOBALS['mysql_prefix']}responder`\t `r` ON (`u`.`responder_id` = `r`.`id`)\n\t\tWHERE `passwd` <> '55606758fdb765ed015f0612112a6ca7'\t\n\t\tORDER BY `u`.`user` ASC "; // 5/25/09, 1/16/08 $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__); if (mysql_affected_rows() == 0) { print '<B>[no users found]</B><BR />'; return; } // if (!check_for_rows("SELECT id FROM `$GLOBALS[mysql_prefix]user`")==0) { print '<B>[no users found]</B><BR />'; return; } $now = mysql_format_date(time() - get_variable('delta_mins') * 60); // 1/23/10 print "<TABLE BORDER='0' CELLPADDING=2>"; $caption = has_admin() ? " - click to edit" : ""; // print "<TR CLASS='even'><TD COLSPAN='99' ALIGN='center'><B>Users" . $caption . " </B></TD></TR>"; print "<TR CLASS='odd'><TD><B>ID</B></TD>\n\t\t<TD><B> User</B></TD>\n\t\t<TD><B> Online</B></TD>\n\t\t<TD><B> Level</B></TD>\n\t\t<TD><B> Unit</B></TD>\n\t\t<TD><B> Call</B></TD>\n\t\t<TD><B> Description</B></TD>\n\t\t<TD><B> Log in</B></TD>\n\t\t<TD><B> From</B></TD>\n\t\t<TD><B> Browser</B></TD>\n\t\t</TR>"; $i = 1; while ($row = stripslashes_deep(mysql_fetch_array($result))) { // 10/8/08 $onclick = has_admin() ? " onClick = \"self.location.href = 'config.php?func=user&id={$row['userid']}' \"" : ""; $level = get_level_text($row['level']); $login = format_date_time($row['login']); $online = $row['expires'] > $now ? "<IMG SRC = './markers/checked.png' BORDER=0>" : ""; print "<TR CLASS='{$colors[$i % 2]}' {$onclick}>\n\t\t\t\t<TD>{$row['userid']}</TD>\n\t\t\t\t<TD> {$row['user']}</TD>\n\t\t\t\t<TD ALIGN = 'center'>{$online}</TD>\n\t\t\t\t<TD>{$level}</TD>\n\t\t\t\t<TD>{$row['unitname']}</TD> \n\t\t\t\t<TD>{$row['callsign']}</TD>\n\t\t\t\t<TD>{$row['info']}</TD>\n\t\t\t\t<TD>{$login}</TD>\n\t\t\t\t<TD>{$row['_from']}</TD>\n\t\t\t\t<TD>{$row['browser']}</TD>\n\t\t\t\t</TR>\n"; $i++; } print '</TABLE><BR />'; }
<?php while ($r = db_fetch($result)) { ?> <tr> <td><a href="add_edit.php?requestID=<?php echo $r["id"]; ?> "><?php echo $r["lastname"]; ?> , <?php echo $r["firstname"]; ?> </a></td> <td class="r"><?php echo format_date_time($r["created_date"]); ?> </td> <td width="16"><?php echo draw_img("/images/icons/delete.png", url_query_add(array("action" => "deletereq", "id" => $r["id"]), false)); ?> </td> </tr> <?php } } else { echo drawEmptyResult(getString('staff_requests_empty')); } echo drawTableEnd(); //never logged in echo drawTableStart();
if ($sort_by == "RATING" && $sort_dir == "DESC") { echo " <td align=\"center\" class=\"subhead\" width=\"100\"><a href=\"links.php?webtag={$webtag}&fid={$fid}&viewmode={$viewmode}&page={$page}&sort_by=RATING&sort_dir=ASC\">", gettext("Rating"), "</a> </td>"; } else { echo " <td align=\"center\" class=\"subhead\" width=\"100\"><a href=\"links.php?webtag={$webtag}&fid={$fid}&viewmode={$viewmode}&page={$page}&sort_by=RATING&sort_dir=DESC\">", gettext("Rating"), "</a> </td>"; } echo " </tr>\n"; if (sizeof($links['links_array']) > 0) { foreach ($links['links_array'] as $key => $link) { if ($link['VISIBLE'] == "N") { echo " <tr class=\"link_hidden\">\n"; echo " <td align=\"left\" class=\"postbody\" valign=\"top\"> <a href=\"links_detail.php?webtag={$webtag}&lid={$key}&fid={$fid}\" class=\"link_hidden\">", word_filter_add_ob_tags($link['TITLE'], true), "</a></td>\n"; } else { echo " <tr>\n"; echo " <td align=\"left\" class=\"postbody\" valign=\"top\"> <a href=\"links_detail.php?webtag={$webtag}&lid={$key}&fid={$fid}\">", word_filter_add_ob_tags($link['TITLE'], true), "</a></td>\n"; } echo " <td align=\"center\" class=\"postbody\" valign=\"top\">", format_date_time($link['CREATED']), "</td>\n"; if (isset($link['RATING']) && strlen($link['RATING']) > 0) { echo " <td align=\"center\" class=\"postbody\" valign=\"top\">", format_number($link['RATING'], 1), "</td>\n"; } else { echo " <td align=\"center\" class=\"postbody\" valign=\"top\"> </td>\n"; } echo " </tr>\n"; } } echo " <tr>\n"; echo " <td align=\"left\" class=\"postbody\"> </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " </td>\n"; echo " </tr>\n"; echo " </table>\n";
function drawName($user_id, $name, $date = false, $withtime = false, $separator = '<br/>', $updated = false) { return draw_div_class('name', draw_img(file_dynamic('users', 'image_small', $user_id, 'jpg', $updated), '/staff/view.php?id=' . $user_id) . draw_link('/staff/view.php?id=' . $user_id, format_string($name, 20)) . BR . ($date ? format_date_time($date, '', ' ' . $separator) : '')); }
echo " <td align=\"left\">\n"; echo " <table class=\"box\" width=\"100%\">\n"; echo " <tr>\n"; echo " <td align=\"left\">\n"; echo " <table class=\"posthead\" width=\"100%\">\n"; echo " <tr>\n"; echo " <td align=\"left\" class=\"subhead\" width=\"100\">", gettext("Date"), "</td>\n"; echo " <td align=\"left\" class=\"subhead\">", gettext("Changes"), "</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td align=\"left\" colspan=\"2\">\n"; echo " <div class=\"admin_folder_perms\">\n"; foreach ($user_history_array as $history_index => $user_history) { echo " <table class=\"posthead\" width=\"100%\">\n"; echo " <tr>\n"; echo " <td align=\"left\" valign=\"top\" width=\"100\">", format_date_time($user_history['MODIFIED']), "</td>\n"; echo " <td align=\"left\">{$user_history['DATA']}</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td align=\"left\" colspan=\"2\"><hr /></td>\n"; echo " </tr>\n"; echo " </table>\n"; } echo " </div>\n"; echo " </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " </td>\n"; echo " </tr>\n"; echo " </table>\n"; echo " </td>\n";
dump($_POST); } } // $remotes = get_current(); // set auto-refresh if any mobile units // $interval = intval(get_variable('auto_poll')); // $refresh = ((($remotes['aprs']) || ($remotes['instam']) || ($remotes['locatea']) || ($remotes['gtrack']) || ($remotes['glat'])) && ($interval>0))? "\t<META HTTP-EQUIV='REFRESH' CONTENT='" . intval($interval*60) . "'>\n": ""; $temp = get_variable('auto_poll'); $poll_val = $temp == 0 ? "none" : $temp; $id = array_key_exists('id', $_GET) ? $_GET['id'] : NULL; $result = mysql_query("SELECT * FROM `{$GLOBALS['mysql_prefix']}ticket` WHERE id='{$id}'"); $row = mysql_fetch_assoc($result); $title = $row['scope']; $ticket_severity = get_severity($row['severity']); $ticket_type = get_type($row['in_types_id']); $ticket_status = get_status($row['status']); $ticket_updated = format_date_time($row['updated']); $ticket_addr = "{$row['street']}, {$row['city']} {$row['state']} "; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <HEAD><TITLE>Incident Popup - Incident <?php print $title; ?> <?php print $ticket_updated; ?> </TITLE> <LINK REL=StyleSheet HREF="stylesheet.php?version=<?php print time(); ?> " TYPE="text/css"> <!-- 3/15/11 -->
} } echo " </td>\n"; echo " </tr>\n"; if (sizeof($admin_user_array['user_array']) > 0) { foreach ($admin_user_array['user_array'] as $user) { echo " <tr>\n"; echo " <td align=\"center\">", form_checkbox("user_update[{$user['UID']}]", "Y"), "</td>\n"; echo " <td class=\"posthead\" align=\"left\" width=\"35%\" style=\"white-space: nowrap\"> <a href=\"admin_user.php?webtag={$webtag}&uid=", $user['UID'], "\">", word_filter_add_ob_tags(format_user_name($user['LOGON'], $user['NICKNAME']), true), "</a></td>\n"; if (isset($user['LAST_VISIT']) && $user['LAST_VISIT'] > 0) { echo " <td class=\"posthead\" align=\"left\"> ", format_date_time($user['LAST_VISIT']), "</td>\n"; } else { echo " <td class=\"posthead\" align=\"left\"> ", gettext("Unknown"), "</td>\n"; } if (isset($user['REGISTERED']) && $user['REGISTERED'] > 0) { echo " <td class=\"posthead\" align=\"left\"> ", format_date_time($user['REGISTERED']), "</td>\n"; } else { echo " <td class=\"posthead\" align=\"left\"> ", gettext("Unknown"), "</td>\n"; } if (isset($user['ID'])) { echo " <td class=\"posthead\" align=\"left\"> <b>", gettext("Yes"), "</b></td>\n"; } else { echo " <td class=\"posthead\" align=\"left\"> ", gettext("No"), "</td>\n"; } echo " </tr>\n"; } } echo " <tr>\n"; echo " <td align=\"left\" colspan=\"5\"> </td>\n"; echo " </tr>\n"; echo " </table>\n";