function drawStaffList($where, $searchterms = false) { global $isAdmin, $_josh; $return = drawJumpToStaff() . '<table class="left" cellspacing="1">'; if ($isAdmin) { $colspan = 5; $return .= drawHeaderRow(false, $colspan, "new", "add_edit.php"); } else { $colspan = 4; $return .= drawHeaderRow(false, $colspan); } $return .= '<tr> <th class="image"></th> <th>Name / Office</th> <th>Title / Department</th> <th class="r">Phone</th>'; if ($isAdmin) { $return .= '<th></th>'; } $return .= '</tr>'; $result = db_query("SELECT \n\t\t\tu.userID, \n\t\t\tu.lastname,\n\t\t\tISNULL(u.nickname, u.firstname) firstname, \n\t\t\tu.bio, \n\t\t\tu.phone,\n\t\t\tc.description corporationName,\n\t\t\tu.corporationID,\n\t\t\to.name office, \n\t\t\tu.title, \n\t\t\td.departmentName\n\t\tFROM intranet_users u\n\t\tLEFT JOIN intranet_departments d\tON d.departmentID = u.departmentID \n\t\tLEFT JOIN organizations c\t\t\tON u.corporationID = c.id\n\t\tLEFT JOIN intranet_offices o\t\tON o.id = u.officeID\n\t\tWHERE " . $where . "\n\t\tORDER BY u.lastname, ISNULL(u.nickname, u.firstname)"); $count = db_found($result); if ($count) { if ($count == 1 && $searchterms) { $r = db_fetch($result); $_josh["slow"] = true; url_change("view.php?id=" . $r["userID"]); } else { while ($r = db_fetch($result)) { $return .= drawStaffRow($r, $searchterms); } } } else { $return .= drawEmptyResult("No staff match those criteria.", $colspan); } return $return . '</table>'; }
<?php include 'include.php'; if (!url_id()) { url_query_add(array('id' => 1)); } drawTop(); $locations = db_query("SELECT \n\t\to.id, \n\t\to.name\n\tFROM intranet_offices o \n\tORDER BY (SELECT COUNT(*) FROM intranet_users u WHERE u.officeID = o.id) DESC"); if (db_found($locations)) { $pages = array(); while ($l = db_fetch($locations)) { $pages["/staff/locations.php?id=" . $l["id"]] = $l["name"]; } echo drawNavigationRow($pages, $location, true); } if ($_GET["id"] == "other") { echo drawStaffList("u.isactive = 1 AND u.officeID <> 1 AND u.officeID <> 6 AND u.officeID <> 11 AND u.officeID <> 9"); } else { $l = db_grab('SELECT name, address FROM intranet_offices WHERE id = ' . $_GET['id']); if (!empty($l['address'])) { echo drawServerMessage('<center><strong>' . $l['name'] . ' Office</strong><br>' . nl2br($l['address']) . '</center>'); } echo drawStaffList("u.isactive = 1 and u.officeID = " . $_GET["id"]); } drawBottom();
<?php include "../../include.php"; url_query_require("types.php"); echo drawTop(); $r = db_grab("SELECT description FROM wiki_topics_types WHERE id = " . $_GET["id"]); ?> <table class="left" cellspacing="1"> <?php echo drawHeaderRow("<a href='types.php' class='white'>Types</a> > " . $r["description"], 4); $topics = db_query("SELECT \n\t\tw.id,\n\t\tw.title,\n\t\tw.description,\n\t\tISNULL(u.nickname, u.firstname) first,\n\t\tu.lastname last,\n\t\tw.created_date\n\tFROM wiki_topics w\n\tJOIN wiki_topics_types t ON w.type_id = t.id\n\tJOIN users u ON w.created_user = u.id\n\tWHERE w.is_active = 1 AND w.type_id = " . $_GET["id"]); if (db_found($topics)) { ?> <tr> <th width="16"></th> <th align="left">Title</th> <th align="left" width="100">Created By</th> <th align="right" width="80">Created On</th> </tr> <?php while ($t = db_fetch($topics)) { ?> <tr height="36"> <td></td> <td><a href="topic.php?id=<?php echo $t["id"]; ?> "><?php echo $t["title"]; ?> </a></td>
<?php include "../include.php"; drawTop(); $users = db_query("select \n\t\tISNULL(u.nickname, u.firstname) first,\n\t\tu.lastname last,\n\t\tu.userID,\n\t\tu.title,\n\t\td.departmentName,\n\t\tu.officeid,\n\t\tr.isPayroll,\n\t\tu.lastlogin, \n\t\tu.updatedOn, \n\t\t" . db_datediff("u.updatedOn", "GETDATE()") . " recent \n\tFROM intranet_users u\n\tJOIN intranet_departments d on u.departmentID = d.departmentID\n\tJOIN intranet_ranks r on u.rankID = r.id\n\tWHERE u.isactive = 1 and (u.homeaddress1 = '' OR u.homeaddress1 IS NULL)\n\tORDER BY lastname"); ?> <table class="left" cellspacing="1"> <?php echo drawHeaderRow("Staff Profiles Needing Update (" . db_found($users) . ")", 4); ?> <tr> <th width="25%" align="left">email</th> <th width="30%" align="left">department</th> <th width="30%" align="left">title</th> <th width="15%" align="right">last login</th> </tr> <?php while ($u = db_fetch($users)) { ?> <tr> <td><a href="/staff/view.php?id=<?php echo $u["userID"]; ?> "><?php echo $u["first"]; ?> <?php echo $u["last"]; ?> </a></td> <td><?php
function addCheckboxes($name, $desc, $table, $linking_table = false, $table_col = false, $link_col = false, $id = false, $admin = false) { global $rows; $rows .= '<tr'; if ($admin) { $rows .= ' class="admin"'; } //special exceptions (this is terrible) if ($table == "modules") { $description = "name"; } elseif ($table == 'skills') { $description = 'title'; } else { $description = "description"; } $rows .= '> <td class="left">' . $desc . '</td> <td>'; if ($id) { $result = db_query("SELECT \n\t\t\t\t\t\t\tt.id, \n\t\t\t\t\t\t\tt.{$description} description, \n\t\t\t\t\t\t\t(SELECT COUNT(*) FROM {$linking_table} l WHERE l.{$table_col} = {$id} AND l.{$link_col} = t.id) checked\n\t\t\t\t\t\tFROM {$table} t\n\t\t\t\t\t\tWHERE t.isActive = 1\n\t\t\t\t\t\tORDER BY t.{$description}"); } else { $result = db_query("SELECT id, {$description} description, 0 checked FROM {$table} WHERE isActive = 1 ORDER BY {$description}"); } if ($total = db_found($result)) { $counter = 0; $max = ceil($total / 3); $rows .= '<table class="nospacing" width="100%"><tr>'; while ($r = db_fetch($result)) { if ($counter == 0) { $rows .= '<td width="33%" style="vertical-align:top;"><table class="nospacing">'; } $chkname = "chk_" . $name . "_" . $r["id"]; $rows .= ' <tr> <td>' . draw_form_checkbox($chkname, $r["checked"]) . '</td> <td>' . drawCheckboxText($chkname, $r["description"]) . '</td> </tr>'; if ($counter == $max - 1) { $rows .= '</table></td>'; $counter = 0; } else { $counter++; } } if ($counter != 0) { $rows .= '</table></td>'; } $rows .= '</tr></table>'; } $rows .= ' </td> </tr>'; }
url_query_add(array("category" => $c["id"])); } $options[str_replace(url_base(), "", url_query_add(array("category" => $c["id"]), false))] = $c["description"]; } echo drawTop(); echo drawNavigationRow($options, "areas", true); ?> <table class="left"> <?php if ($page['is_admin']) { echo drawheaderRow("", 4, "add", "edit/"); } else { echo drawheaderRow("", 3); } $docs = db_query("SELECT d.id, d.name, t.icon, ISNULL(d.updated_date, d.created_date) updated_date FROM policy_docs d JOIN docs_types t ON d.type_id = t.id WHERE d.is_active = 1 AND d.categoryID = " . $_GET["category"] . " ORDER BY d.name"); if (db_found($docs)) { ?> <tr> <th width="16"></th> <th>Name</th> <th class="r">Updated</th> <?php if ($page['is_admin']) { ?> <th width="16"></th><?php } ?> </tr> <?php while ($d = db_fetch($docs)) { $link = "./?id=" . $d["id"];
//--> </script> <?php echo drawTableStart(); if (url_id("dept")) { $department = " AND t.departmentID = " . $_GET["dept"]; $deptName = db_grab("SELECT shortName FROM departments WHERE departmentID = " . $_GET["dept"]); } else { $department = ""; $deptName = ""; } $result = db_query("SELECT\r\n\t\t\t\t\t\tt.title,\r\n\t\t\t\t\t\ts.description,\r\n\t\t\t\t\t\tt.departmentID,\r\n\t\t\t\t\t\td.shortName department,\r\n\t\t\t\t\t\tt.created_date,\r\n\t\t\t\t\t\tt.created_user,\r\n\t\t\t\t\t\tt.id,\r\n\t\t\t\t\t\tISNULL(u2.nickname, u2.firstname) owner,\r\n\t\t\t\t\t\tISNULL(u.nickname, u.firstname) firstname,\r\n\t\t\t\t\t\tu.lastname lastname\r\n\t\t\t\t\tFROM helpdesk_tickets t\r\n\t\t\t\t\tJOIN helpdesk_tickets_statuses\ts ON t.statusID = s.id\r\n\t\t\t\t\tJOIN users\t\t\t\tu ON t.created_user = u.id\r\n\t\t\t\t\tJOIN departments\t\td ON t.departmentID = d.departmentID\r\n\t\t\t\t\tLEFT JOIN users\t\tu2 ON t.ownerID = u2.id\r\n\t\t\t\t\tWHERE (t.statusID <> 9 OR t.statusID IS NULL) {$department}\r\n\t\t\t\t\tORDER BY d.shortName, t.created_date DESC"); $lastDept = ""; $count = db_found($result); if ($count) { echo drawHeaderRow($deptName . " Open Tickets", 4, "new", "#bottom"); ?> <tr> <th width="50%" align="left">Short Description</th> <th width="15%" align="left"><nobr>Submitted By</nobr></th> <th width="20%" align="left">Status</th> <th width="15%"><nobr>Assigned To</nobr></th> </tr> <?php while ($r = db_fetch($result)) { if ($r["department"] != $lastDept) { $lastDept = $r["department"]; $count = db_grab("SELECT COUNT(*) tickets FROM helpdesk_tickets WHERE departmentID = " . $r["departmentID"] . " AND statusID <> 9"); ?>
function db_query($query, $limit = false, $suppress_error = false, $offset = false) { global $_josh; db_open(); $query = trim($query); if (isset($_josh["basedblanguage"]) && $_josh["basedblanguage"] != $_josh["db"]["language"]) { $query = db_translate($query, $_josh["basedblanguage"], $_josh["db"]["language"]); } $_josh["queries"][] = $query; if ($_josh["db"]["language"] == "mysql") { if ($limit) { $query .= " LIMIT " . $limit; } if ($offset) { $query .= " OFFSET " . $offset; } if ($result = @mysql_query($query, $_josh["db"]["pointer"])) { error_debug("<b>db_query</b> <i>" . $query . "</i>, " . db_found($result) . " results returned"); if (format_text_starts("insert", $query)) { return db_id(); } return $result; } else { error_debug("<b>db_query</b> failed <i>" . $query . "</i>"); if ($suppress_error) { return false; } error_handle("mysql error", format_code($query) . "<br>" . mysql_error()); } } elseif ($_josh["db"]["language"] == "mssql") { //echo $_josh["db"]["location"]. " db"; if ($limit) { $query = "SELECT TOP " . $limit . substr($query, 6); } if ($result = @mssql_query($query, $_josh["db"]["pointer"])) { error_debug("<b>db_query</b> <i>" . $query . "</i>, " . db_found($result) . " results returned"); if (format_text_starts("insert", $query)) { return db_id(); } return $result; } else { if ($suppress_error) { return false; } error_handle("mssql error", format_code($query) . "<br>" . mssql_get_last_message()); } } }
} echo drawTop(); //main table echo drawTableStart(); if ($page['is_admin']) { echo drawHeaderRow($page['breadcrumbs'] . format_string(db_grab('SELECT title' . langExt() . ' title FROM external_orgs_types WHERE id = ' . $_GET['id'])), 1, getString('add_new'), '#bottom'); } else { echo drawHeaderRow($page['breadcrumbs'] . format_string(db_grab('SELECT title' . langExt() . ' title FROM external_orgs_types WHERE id = ' . $_GET['id']))); } $orgs = db_query('SELECT o.id, o.url, o.title' . langExt() . ' title, o.description' . langExt() . ' description FROM external_orgs o ' . getChannelsWhere('external_orgs', 'o', 'org_id') . ' AND (SELECT COUNT(*) FROM external_orgs_to_types t WHERE t.org_id = o.id AND t.type_id = ' . $_GET['id'] . ' > 0) ORDER BY o.title'); if (db_found($orgs)) { while ($o = db_fetch($orgs)) { ?> <tr> <td class='text'> <?php if ($page['is_admin']) { ?> <a href="<?php echo drawDeleteLink('delete this org?', $o['id'], 'delete', 'org_id'); ?> " class="button-light right"><?php echo getString('delete'); ?> </a> <a href="edit.php?id=<?php
<tr> <td class="left">Award Contact</td> <td><?php echo $r["staffname"]; ?> </td> </tr> </table> <table class="left" cellspacing="1"> <tr> <td class="head" colspan="4">Activity</td> </tr> <?php $activity = db_query("SELECT\n\t\t\ta.activityID,\n\t\t\ta.activityTitle,\n\t\t\ta.activityDate,\n\t\t\tCONCAT(ISNULL(u.nickname, u.firstname), ' ', u.lastname) staffname,\n\t\t\ta.activityText,\n\t\t\ta.isComplete,\n\t\t\ta.isReport,\n\t\t\ta.isActionItem,\n\t\t\ta.isInternalDeadline\n\t\tFROM funders_activity a\n\t\tINNER JOIN users u ON a.activityAssignedTo = u.id\n\t\tWHERE a.awardID = {$_GET["id"]}\n\t\tORDER BY a.activityDate DESC"); if (db_found($activity)) { ?> <tr bgcolor="#F6F6F6"> <td>Assigned To, Date</td> <td>Title, Description</td> <td>Status</td> <td></td> </tr> <?php while ($a = db_fetch($activity)) { $date = $a["activityDate"] ? format_date($a["activityDate"]) : "N/A"; $bgcolor = !$a["isInternalDeadline"] && !$a["isComplete"] ? "FFEEEE" : "FFFFFF"; if (!$a["isActionItem"]) { $status = "Activity Note"; } else { $status = $a["isInternalDeadline"] ? "Internal" : "External";
<thead> <?php echo drawHeaderRow(false, 5, "new", "#bottom"); ?> <tr> <th class="reorder"></th> <th>Image</th> <th>Link</th> <th>Address</th> <th class="delete"></th> </tr> </thead> <tbody> <?php $spotlight = db_query("SELECT id, title, url FROM spotlight ORDER BY precedence"); if ($max = db_found($spotlight)) { while ($s = db_fetch($spotlight)) { ?> <tr id="<?php echo $s['id']; ?> "> <td class="reorder"><i class="glyphicon glyphicon-menu-hamburger"></i></td> <td class="image"> <?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/uploads/spotlight/' . $s['id'] . '.jpg')) { ?> <img src="/uploads/spotlight/<?php echo $s['id']; ?> .jpg" width="320" height="320">
<table cellspacing="1" class="left draggable links"> <thead> <?php echo drawHeaderRow(false, 4, "new", "#bottom"); ?> <tr> <th class="reorder"></th> <th>Link</th> <th>Address</th> <th class="delete"></th> </tr> </thead> <tbody> <?php $links = db_query("SELECT id, text, url FROM links ORDER BY precedence"); if ($max = db_found($links)) { while ($l = db_fetch($links)) { ?> <tr id="<?php echo $l['id']; ?> "> <td class="reorder"><i class="glyphicon glyphicon-menu-hamburger"></i></td> <td><?php echo $l["text"]; ?> </td> <td><?php echo $l["url"]; ?> </td>
<?php include "../../include.php"; if ($posting) { $id = db_save("wiki_topics_types"); url_change(); } echo drawTop(); ?> <table class="left" cellspacing="1"> <?php echo drawHeaderRow("Types", 2); $tags = db_query("SELECT \n\t\tt.id, \n\t\tt.description,\n\t\t(SELECT COUNT(*) FROM wiki_topics w WHERE w.type_id = t.id) topics\n\t\tFROM wiki_topics_types t \n\t\tWHERE t.is_active = 1\n\t\tORDER BY t.description"); if (db_found($tags)) { ?> <tr> <th align="left">Type</th> <th align="right">#</th> </tr> <?php while ($t = db_fetch($tags)) { ?> <tr> <td><?php if ($t["topics"]) { ?> <a href="type.php?id=<?php echo $t["id"]; ?> "><?php }
<?php $clips = db_query('SELECT c.id, c.title' . langExt() . ' title FROM press_clips c ' . getChannelsWhere('press_clips', 'c', 'clip_id') . ' ORDER BY c.pub_date DESC', 4); if (db_found($clips)) { while ($c = db_fetch($clips)) { $return .= '<tr><td colspan="2"><a href="/' . $m['folder'] . '/clip.php?id=' . $c['id'] . '">' . format_string($c['title'], 40) . '</a></td></tr>'; } } else { $return .= '<tr><td colspan="2" class="empty">No clips have been added.</td></tr>'; }
<Style ss:ID="s34"> <Font x:Family="Swiss" ss:Size="8"/> <NumberFormat/> </Style> <Style ss:ID="s35"> <Font x:Family="Swiss" ss:Size="8" ss:Bold="1"/> <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/> <Interior ss:Color="#FFFFCC" ss:Pattern="Solid"/> </Style> <Style ss:ID="s36"> <Font x:Family="Swiss" ss:Size="8"/> <Alignment ss:Horizontal="Center"/> </Style> </Styles> <Worksheet ss:Name="Sheet1"> <Table ss:ExpandedColumnCount="32" ss:ExpandedRowCount="' . (db_found($result) + 1) . '" x:FullColumns="1" x:FullRows="1"> <Column ss:Width="23.25"/> <Column ss:Width="67.5"/> <Column ss:Width="81"/> <Column ss:Width="98.25"/> <Column ss:Width="49.5"/> <Column ss:AutoFitWidth="0" ss:Width="191.25"/> <Column ss:AutoFitWidth="0" ss:Width="189.75"/> <Column ss:AutoFitWidth="0" ss:Width="270"/> <Column ss:AutoFitWidth="0" ss:Width="103.5"/> <Column ss:Width="73.5"/> <Column ss:Width="26.25"/> <Column ss:StyleID="s23" ss:Width="27.75"/> <Column ss:AutoFitWidth="0" ss:Width="104.25"/> <Column ss:Width="122.25"/> <Column ss:Width="63.75"/>
<table cellspacing='1' class='left draggable locations'> <thead> <?php echo drawHeaderRow(false, 4, 'new', '#bottom'); ?> <tr> <th class='reorder'></th> <th>Link</th> <th>Address</th> <th class='delete'></th> </tr> </thead> <tbody> <?php $intranet_offices = db_query('SELECT id, name, address FROM intranet_offices ORDER BY precedence'); if ($max = db_found($intranet_offices)) { while ($l = db_fetch($intranet_offices)) { ?> <tr id='<?php echo $l['id']; ?> '> <td class='reorder'><i class='glyphicon glyphicon-menu-hamburger'></i></td> <td><a href="<?php echo url_query_add(array('id' => $l['id']), false); ?> "><?php echo $l['name']; ?> </a></td> <td><?php
function addCheckboxes($name, $desc, $table, $linking_table = false, $table_col = false, $link_col = false, $id = false, $admin = false) { global $rows; $rows .= '<tr'; if ($admin) { $rows .= ' class="admin"'; } $title = "title"; $checked = 0; //special addition for permissions $where = $name == "permissions" ? " AND l.is_admin = 1" : ""; //special exception for channels table if ($table == "channels") { $title = "title" . langExt(); $checked = 1; } $rows .= '> <td class="left">' . $desc . '</td> <td>'; if ($id) { $result = db_query("SELECT \n\t\t\t\t\t\tt.id, \n\t\t\t\t\t\tt.{$title},\n\t\t\t\t\t\t(SELECT COUNT(*) FROM {$linking_table} l WHERE l.{$table_col} = {$id} AND l.{$link_col} = t.id {$where}) checked\n\t\t\t\t\tFROM {$table} t\n\t\t\t\t\tWHERE t.is_active = 1\n\t\t\t\t\tORDER BY t.{$title}"); } else { $result = db_query("SELECT id, {$title}, {$checked} checked FROM {$table} WHERE is_active = 1 ORDER BY {$title}"); } if ($total = db_found($result)) { $counter = 0; $max = ceil($total / 3); $rows .= '<table class="nospacing" width="100%"><tr>'; while ($r = db_fetch($result)) { if ($counter == 0) { $rows .= '<td width="33%" style="vertical-align:top;"><table class="nospacing">'; } $chkname = "chk-" . $name . "-" . $r["id"]; $rows .= ' <tr> <td>' . draw_form_checkbox($chkname, $r["checked"]) . '</td> <td>' . drawCheckboxText($chkname, $r[$title]) . '</td> </tr>'; if ($counter == $max - 1) { $rows .= '</table></td>'; $counter = 0; } else { $counter++; } } if ($counter != 0) { $rows .= '</table></td>'; } $rows .= '</tr></table>'; } $rows .= ' </td> </tr>'; }
<?php include "include.php"; url_query_require("admins.php"); echo drawTop(); echo drawTicketFilter(); ?> <table class="left" cellspacing="1"> <?php $result = db_query("SELECT\r\n\t\t\t\t\t\tt.title,\r\n\t\t\t\t\t\tt.statusID,\r\n\t\t\t\t\t\t(SELECT COUNT(*) FROM helpdesk_tickets_followups f WHERE f.ticketID = t.id) as ticketfollowups,\r\n\t\t\t\t\t\tt.created_user,\r\n\t\t\t\t\t\tt.updated_date,\r\n\t\t\t\t\t\tt.id,\r\n\t\t\t\t\t\tt.ownerID,\r\n\t\t\t\t\t\tt.priorityID,\r\n\t\t\t\t\t\tt.created_date,\r\n\t\t\t\t\t\tISNULL(u.nickname, u.firstname) first,\r\n\t\t\t\t\t\tu.lastname last\r\n\t\t\t\t\tFROM helpdesk_tickets t\r\n\t\t\t\t\tJOIN users u ON u.id = t.created_user\r\n\t\t\t\t\tWHERE t.ownerID = {$_GET["id"]} {$where}\r\n\t\t\t\t\tORDER BY t.created_date DESC"); $admin = db_grab("SELECT ISNULL(u.nickname, u.firstname) first FROM users u WHERE u.id = " . $_GET["id"]); echo drawHeaderRow("<a href='admins.php' class='white'>Admins</a> > " . $admin["first"] . " (" . db_found($result) . ")", 5); if (db_found($result)) { echo drawTicketHeader(); while ($r = db_fetch($result)) { echo drawTicketRow($r); } } else { if ($filtered) { echo drawEmptyResult("No tickets were assigned to this admin in this month / year", 5); } else { echo drawEmptyResult("No tickets were assigned to this admin.", 5); } } ?> </table> <?php echo drawBottom();
echo drawTicketHeader(); while ($r = db_fetch($tickets)) { echo drawTicketRow($r, "type"); } } else { if ($filtered) { echo drawHeaderRow("<a class='white' href='types.php'>Types</a> > " . $type . " (" . db_found($tickets) . ")", 5); echo drawEmptyResult("No tickets have this type / month / year.", 5); } else { echo drawHeaderRow("<a class='white' href='types.php'>Types</a> > " . $type . " (" . db_found($tickets) . ")", 5, "edit name", "type_add_edit.php?id=" . $_GET["id"], "delete", $request["path_query"] . "&deleteType=true"); echo drawEmptyResult("No tickets are tagged as this type. You can delete the type above.", 5); } } } else { echo drawHeaderRow("<a class='white' href='types.php'>Types</a> > No Type Set" . " (" . db_found($tickets) . ")", 5); if (db_found($tickets)) { echo drawTicketHeader(); while ($r = db_fetch($tickets)) { echo drawTicketRow($r, "type"); } } else { if ($filtered) { echo drawEmptyResult("No tickets are untyped in this month / year.", 5); } else { echo drawEmptyResult("No tickets are untyped! Excellent!", 5); } } } ?> </table> <?php
<?php $events = db_query('SELECT e.id, e.title' . langExt() . ' title, e.start_date, t.color FROM cal_events e LEFT JOIN cal_events_types t ON e.type_id = t.id ' . getChannelsWhere('cal_events', 'e', 'event_id') . ' AND e.start_date > ' . db_date() . ' ORDER BY e.start_date ASC', 4); if (db_found($events)) { while ($e = db_fetch($events)) { $return .= ' <tr> <td width="80%"><a href="/' . $m['folder'] . '/event.php?id=' . $e['id'] . '" class="block" style="background-color:' . $e['color'] . ';">' . $e['title'] . '</a></td> <td width="20%" align="right">' . format_date($e['start_date'], "", "%b %d") . '</td> </tr>'; } } else { $return .= '<tr><td colspan="2" class="empty">' . getString('events_empty') . '</td></tr>'; }
echo $d['description']; ?> </td> </tr> </table> <?php $views = db_query('SELECT ISNULL(u.nickname, u.firstname) first, u.lastname last, u.id, v.viewedOn FROM docs_views v JOIN users u ON v.userID = u.id WHERE v.documentID = ' . $_GET['id'] . ' ORDER BY v.viewedOn DESC', 5); if (db_found($views)) { ?> <table class="left" cellspacing='1'> <tr> <td class='head docs' colspan='2'><?php echo getString('docs_recent_views'); ?> </td> </tr> <tr class="left"> <th align='left'><?php echo getString('name'); ?> </th> <th align='right'><?php echo getString('date');