<?php include "../../include.php"; if ($posting) { $theuser_id = $page['is_admin'] ? $_POST["created_user"] : $_SESSION["user_id"]; db_query("UPDATE press_releases SET\n\t\t\theadline = '{$_POST["headline"]}',\t\n\t\t\tdetail = '{$_POST["detail"]}',\t\n\t\t\tlocation = '{$_POST["location"]}',\t\n\t\t\ttext = '" . format_html($_POST["text"]) . "',\t\n\t\t\tcorporationID = {$_POST["corporationID"]},\n\t\t\tupdated_date = GETDATE(),\n\t\t\tupdated_user = {$theuser_id}\n\t\t\tWHERE id = " . $_GET["id"]); url_change("../?id=" . $_GET["id"]); } echo drawTop(); $r = db_grab("SELECT id, headline, detail, location, releaseDate, corporationID, text FROM press_releases WHERE id = " . $_GET["id"]); $form = new intranet_form(); if ($page['is_admin']) { $form->addUser("created_user", "Posted By", $_SESSION["user_id"], false, "EEDDCC"); } $form->addRow("itext", "Headline", "headline", $r["headline"], "", true, 255); $form->addRow("itext", "Detail", "detail", $r["detail"], "", false, 255); $form->addRow("itext", "Location", "location", $r["location"], "", true, 255); $form->addRow("select", "Organization", "corporationID", "SELECT id, title from organizations ORDER BY title", $r["corporationID"]); $form->addRow("date", "Date", "releaseDate", $r["releaseDate"]); $form->addRow("textarea", "Text", "text", $r["text"], "", true); $form->addRow("submit", "update press release"); $form->draw("Update Release"); echo drawBottom();
<?php include "../../include.php"; url_query_require(); if ($posting) { $id = db_save("wiki_topics"); db_checkboxes("tags", "wiki_topics_to_tags", "topicID", "tagID", $id); url_change("topic.php?id=" . $id); } echo drawTop(); $r = db_grab("SELECT id, title, description, type_id FROM wiki_topics WHERE id = " . $_GET["id"]); $form = new intranet_form(); if ($page['is_admin']) { $form->addUser("created_user", "Posted By", $_SESSION["user_id"], false, true); } $form->addRow("itext", "Title", "title", $r["title"], "", true, 255); $form->addRow("select", "Type", "type_id", "SELECT id, description FROM wiki_topics_types", $r["type_id"], true); $form->addCheckboxes("tags", "Tags", "wiki_tags", "wiki_topics_to_tags", "topicID", "tagID", $_GET["id"]); $form->addRow("textarea", "Description", "description", $r["description"], "", true); $form->addRow("submit", "post wiki topic"); $form->draw("Add a Wiki Topic"); echo drawBottom();
?> </td> </tr> <?php } } } else { echo drawHeaderRow("No Tickets", 1, "new", "#bottom"); echo drawEmptyResult("There are no open {$deptName} tickets right now!", 4); } ?> </table> <a name="bottom"></a> <?php $form = new intranet_form(); if ($page['is_admin']) { $form->addUser("user_id", "Posted By", $_SESSION["user_id"], false); } $form->addRow("itext", "Problem", "title", "", "", true); if ($page['is_admin']) { $form->addRow("select", "Priority", "priorityID", "SELECT id, description FROM helpdesk_tickets_priorities", 3); } else { $form->addRow("select", "Priority", "priorityID", "SELECT id, description FROM helpdesk_tickets_priorities WHERE is_admin <> 1", 3); } $form->addRow("select", "Department", "departmentID", "SELECT departmentID, shortName FROM departments WHERE isHelpdesk = 1 ORDER BY shortName", $departmentID, true, 50, "updateTypes(this.value)"); $form->addRow("select", "Type", "type_id", "SELECT id, description FROM helpdesk_tickets_types WHERE departmentID = {$departmentID} ORDER BY description"); $form->addRow("textarea", "Description", "description", "", "", true); $form->addRow("submit", "report problem"); $form->draw("Add a New Ticket"); echo drawBottom();
?> </td> <td align="right"><?php echo format_date($r["updatedOn"]); ?> </td> <?php echo deleteColumn("Delete this position?", $r["id"]); ?> </tr> <?php } ?> </table> <a name="bottom"></a> <?php if ($isAdmin && !$printing) { $form = new intranet_form(); if ($isAdmin) { $form->addUser("createdBy", "Posted By", $user["id"], false, true); } $form->addRow("itext", "Title", "title", "", "", true); $form->addRow("select", "Organization", "corporationID", "SELECT id, description FROM organizations ORDER BY description", "", true); $form->addRow("select", "Location", "officeID", "SELECT id, name FROM intranet_offices ORDER BY precedence", "", true); $form->addRow("textarea", "Description", "description", "", "", true); $form->addRow("submit", "post open position"); $form->draw("Add an Open Position"); } drawBottom();
<?php include "../include.php"; if ($posting) { format_post_bits("isAdmin,temporary"); $_POST["description"] = format_html($_POST["description"]); db_enter("bulletin_board_topics", "title description isAdmin temporary"); //db_query("UPDATE bulletin_board_topics SET threadDate = GETDATE() WHERE id = " . $_GET["id"]); don't do this syndicateBulletinBoard(); url_change("topic.php?id=" . $_GET["id"]); } drawTop(); $t = db_grab("SELECT title, description, isAdmin, temporary, createdBy FROM bulletin_board_topics WHERE id = " . $_GET["id"]); $form = new intranet_form(); if ($isAdmin) { $form->addUser("createdBy", "Posted By", $t["createdBy"], false, true); $form->addCheckbox("isAdmin", "Admin Post?", $t["isAdmin"], "(check if yes)", true); } $form->addCheckbox("temporary", "Lifespan", $t['temporary'], "Check Box to Delete Post After 30 Days"); $form->addRow("itext", "Subject", "title", $t["title"], "", true); $form->addRow("textarea", "Message", "description", $t["description"], "", true); $form->addRow("submit", "edit topic"); $form->draw("Edit Bulletin Board Topic"); drawBottom();
<?php include "include.php"; if ($posting) { if (!$page['is_admin']) { $_POST["user_id"] = $_SESSION["user_id"]; } format_post_nulls("type_id, priorityID"); db_query("UPDATE helpdesk_tickets SET \n\t\tcreated_user = {$_POST["user_id"]},\n\t\ttitle = '{$_POST["title"]}',\n\t\tdescription = '{$_POST["description"]}',\n\t\ttype_id = {$_POST["type_id"]},\n\t\tdepartmentID = {$_POST["departmentID"]},\n\t\tpriorityID = {$_POST["priorityID"]}\n\t\tWHERE id = " . $_GET["id"]); url_change("ticket.php?id=" . $_GET["id"]); } echo drawTop(); $t = db_grab("SELECT created_user, title, description, type_id, departmentID, priorityID FROM helpdesk_tickets t WHERE t.id = " . $_GET["id"]); $form = new intranet_form(); if ($page['is_admin']) { $form->addUser("user_id", "Posted By", $t["created_user"], false); } $form->addRow("itext", "Problem", "title", $t["title"], "", true); if ($page['is_admin']) { $form->addRow("select", "Priority", "priorityID", "SELECT id, description FROM helpdesk_tickets_priorities", $t["priorityID"]); } else { $form->addRow("select", "Priority", "priorityID", "SELECT id, description FROM helpdesk_tickets_priorities WHERE is_admin = 0", $t["priorityID"]); } $form->addRow("select", "Department", "departmentID", "SELECT departmentID, shortName FROM departments WHERE isHelpdesk = 1", $t["departmentID"], true, 50, "updateTypes(this.value)"); $form->addRow("select", "Type", "type_id", "SELECT id, description FROM helpdesk_tickets_types WHERE departmentID = " . $t["departmentID"] . " ORDER BY description", $t["type_id"]); $form->addRow("textarea", "Description", "description", $t["description"], "", true); $form->addRow("submit", "save changes"); $form->draw("Edit Ticket"); echo drawBottom();
<?php include "include.php"; if ($posting) { $id = db_enter("calendar_events", "title description *startDate typeID"); url_change("./event.php?id=" . $_GET["id"]); } $e = db_grab("SELECT \n\t\te.title, \n\t\te.description, \n\t\te.startDate, \n\t\te.typeID,\n\t\tISNULL(u.nickname, u.firstname) first,\n\t\tu.lastname last,\n\t\te.createdBy,\n\t\te.createdOn,\n\t\tMONTH(e.startDate) month, \n\t\tYEAR(e.startDate) year\n\tFROM calendar_events e\n\tJOIN intranet_users u ON e.createdBy = u.userID\n\tWHERE e.id = " . $_GET["id"]); drawTop(); echo drawNavigationCal($e["month"], $e["year"], true); $form = new intranet_form(); if ($isAdmin) { $form->addUser("createdBy", "Posted By", $user["id"], $e["createdBy"], true); } $form->addRow("itext", "Title", "title", $e["title"], "", true); $form->addRow("select", "Type", "typeID", "SELECT id, description FROM calendar_events_types ORDER BY description", $e["typeID"], true); $form->addRow("datetime", "Date", "startDate", $e["startDate"]); $form->addRow("textarea", "Notes", "description", $e["description"], "", true); $form->addRow("submit", "save changes"); $form->draw("Edit Event"); drawBottom();
<?php include "../include.php"; if ($_POST) { $theUserID = $isAdmin ? $_POST["createdBy"] : $user["id"]; $_POST["description"] = format_html($_POST["description"]); db_query("UPDATE intranet_jobs SET\n\t\t\ttitle\t\t\t= '{$_POST["title"]}',\t\n\t\t\tdescription\t\t= '{$_POST["description"]}',\t\n\t\t\tcorporationID\t= {$_POST["corporationID"]},\n\t\t\tofficeID\t\t= {$_POST["officeID"]},\n\t\t\tupdatedOn\t\t= GETDATE(),\n\t\t\tupdatedBy\t\t= {$theUserID}\n\t\t\tWHERE id = " . $_GET["id"]); url_change("position.php?id=" . $_GET["id"]); } drawTop(); $r = db_grab("SELECT \n\t\t\t\tj.id,\n\t\t\t\tj.title,\n\t\t\t\tj.description,\n\t\t\t\tj.corporationID,\n\t\t\t\tj.officeID\n\t\t\tFROM intranet_jobs j\n\t\t\tWHERE j.id = " . $_GET["id"]); $form = new intranet_form(); if ($isAdmin) { $form->addUser("createdBy", "Posted By", $user["id"], false, "EEDDCC"); } $form->addRow("itext", "Title", "title", $r["title"], "", true); $form->addRow("select", "Organization", "corporationID", "SELECT id, description FROM organizations ORDER BY description", $r["corporationID"], true); $form->addRow("select", "Location", "officeID", "SELECT id, name FROM intranet_offices ORDER BY precedence", $r["officeID"], true); $form->addRow("textarea", "Description", "description", $r["description"], "", true); $form->addRow("submit", "update position"); $form->draw("<a href='positions.php' class='white'>Open Positions</a> > Update Position"); drawBottom();