function drawdrawColumnDelete($prompt = false, $id = false, $action = "delete", $adminOnly = true) { //if we're going to backend all the table stuff, then this should be incorporated somehow. perhaps we will need to extend the class global $page, $_josh; if ($adminOnly && !$page['is_admin']) { return false; } if (!$id) { return '<td width="16"> </td>'; } return draw_tag("td", array("width" => "16"), draw_img("/images/icons/delete.png", drawDeleteLink($prompt, $id, $action))); }
<?php include '../include.php'; url_query_require(); if (url_action('delete')) { db_delete('press_clips', $_GET['delete_id']); url_change('/press-clips/'); } echo drawTop(); echo drawTableStart(); echo drawHeaderRow($page['breadcrumbs'] . $page['title'], 2, getString('edit'), 'edit/?id=' . $_GET['id'], getString('delete'), drawDeleteLink()); $r = db_grab('SELECT c.title' . langExt() . ' title, c.url, c.pub_date, c.publication' . langExtT() . ' publication, c.type_id, c.description' . langExt() . ' description, t.title' . langExt() . ' type FROM press_clips c JOIN press_clips_types t ON c.type_id = t.id WHERE c.id = ' . $_GET['id']); ?> <tr> <td class="left"><?php echo getString('title'); ?> </td> <td class='title'><?php echo $r['title']; ?> </td> </tr> <tr> <td class="left"><?php echo getString('category'); ?> </td> <td><?php echo draw_link('categories.php?id=' . $r['type_id'], $r['type']); ?>
function drawTicketRow($r, $mode = "status") { //mode can be status or type global $priorityOptions, $statusOptions, $ownerOptions, $typeOptions, $_josh; $return = ' <tr> <td rowspan="2">' . drawName($r["created_user"], $r["first"] . ' ' . $r["last"], $r["created_date"], true, $r['updated']) . '</td> <td colspan="3"><a href="ticket.php?id=' . $r["id"] . '"><b>' . $r["title"] . '</b></a></td> <td rowspan="2">' . draw_img("/images/icons/delete.png", drawDeleteLink("Delete this ticket?", $r["id"], "delete", "ticketID")) . '</td> </tr> <tr>'; $t = array("ticketID" => $r["id"]); if ($mode == "status") { $return .= '<td>' . draw_form_select("", $priorityOptions, $r["priorityID"], false, "field", "location.href='" . url_query_add($t, false) . "&newPriority=' + this.value") . '</td> <td>' . draw_form_select("", $statusOptions, $r["statusID"], true, "field", "location.href='" . url_query_add($t, false) . "&newStatus=' + this.value") . '</td> <td>' . draw_form_select("", $ownerOptions, $r["ownerID"], false, "field", "location.href='" . url_query_add($t, false) . "&newOwner=' + this.value") . '</td>'; } elseif ($mode == "type") { $return .= '<td colspan="3">' . draw_form_select("", $typeOptions, $r["type_id"], false, "field", "location.href='" . url_query_add($t, false) . "&newType=' + this.value") . '</td>'; } $return .= '</tr>'; return $return; }
?> </td> </tr> <?php } ?> <?php if ($page['is_admin']) { ?> <tr> <td class="left"><?php echo getString('invite'); ?> </td> <td colspan="2"><a href="<?php echo drawDeleteLink("Send email invite?", $_GET['id'], "invite"); ?> " class="button" style="line-height:13px;"><?php echo getString('invite_again'); ?> </a></td> </tr> <?php if (getOption("staff_showrank")) { ?> <tr> <td class="left">Rank</td> <td colspan="2"><?php echo $r['rank']; ?> </td>
$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 echo $o['id']; ?> " class="button-light right"><?php echo getString('edit'); ?> </a> <?php } ?>
JOIN users u ON e.created_user = u.id JOIN cal_events_types t ON e.type_id = t.id WHERE e.id = ' . $_GET["id"]); if (url_action("delete")) { db_delete("cal_events"); url_change("/cal/?month=" . $e["month"] . "&year=" . $e["year"]); } echo drawTop(); echo drawNavigationCal($e["month"], $e["year"], true); ?> <table class="left" cellspacing="1"> <?php if ($page['is_admin']) { echo drawHeaderRow($page['title'], 2, getString('edit'), "edit.php?id=" . $_GET["id"], getString('delete'), drawDeleteLink()); } elseif ($_SESSION["user_id"] == $e["created_user"]) { echo drawHeaderRow($page['title'], 2, getString('edit'), "edit.php?id=" . $_GET["id"], getString('delete'), drawDeleteLink()); } else { echo drawHeaderRow($page['title'], 2); } ?> <tr> <td class="left"><?php echo getString('title'); ?> </td> <td class="right" bgcolor="#ffffff"><b><?php echo $e["title"]; ?> </b></td> </tr> <tr>
$d = db_grab('SELECT d.title' . langExt() . ' title, d.description' . langExt() . ' description, d.content, i.extension, i.description fileType FROM docs d JOIN docs_types i ON d.type_id = i.id WHERE d.id = ' . $_GET['id']); echo drawTop(); ?> <table class="left" cellspacing='1'> <?php if ($page['is_admin']) { echo drawHeaderRow($page['breadcrumbs'] . $page['title'], 2, getString('edit'), 'edit.php?id=' . $_GET['id'], getString('delete'), drawDeleteLink('Delete document?')); } else { echo drawHeaderRow($page['breadcrumbs'] . $page['title'], 2); } ?> <tr> <td class="left"><?php echo getString('title'); ?> </td> <td><h1><a href="download.php?id=<?php echo $_GET['id']; ?> "><?php echo $d['title']; ?>