echo $r["firstname"]; ?> </a></td> <td><nobr><?php echo $r["positionOnBoard"]; ?> </nobr></td> <?php echo deleteColumn("Are you sure you want to delete this board member?", $r["id"]); ?> </tr> <?php } ?> </table> <a name="bottom"></a><br> <?php if ($isAdmin) { $form = new intranet_form(); $form->addRow("itext", "First Name", "firstname", "", "", true, 255); $form->addRow("itext", "Last Name", "lastname", "", "", true, 255); $form->addRow("select", "Organization", "corporationID", "SELECT id, description FROM organizations ORDER BY description", "", true); $form->addRow("itext", "Position on Board", "positionOnBoard", "", "", false, 255); $form->addRow("itext", "Employment", "employment", "", "", false, 255); $form->addRow("textarea", "Bio", "bio", "", "", false); $form->addRow("submit", "add board member"); $form->draw("Add a Board Member"); } drawBottom();
if ($posting) { if (isset($_FILES["content"]["name"]) && !empty($_FILES["content"]["name"])) { list($_POST["content"], $_POST["fileTypeID"]) = file_get_uploaded("content", "docs_types"); } if (isset($_FILES["image"]["name"]) && !empty($_FILES["image"]["name"])) { list($_POST["image"], $_POST["imageTypeID"]) = file_get_uploaded("image", "docs_types"); //die($_POST["image"]); } $id = db_save("news_stories"); db_checkboxes("corporationID", "news_stories_to_organizations", "newsID", "organizationID", $id); url_change("./?id=" . $id); } echo drawTop(); $r = db_grab("SELECT \n\t\tn.headline,\n\t\tn.outlet,\n\t\tn.pubdate,\n\t\tn.url,\n\t\tn.description\n\t\tFROM news_stories n\n\t\tWHERE id = " . $_GET["id"]); } $form = new intranet_form(); $form->addCheckboxes("corporationID", "Organization", "organizations", "news_stories_to_organizations", "newsID", "organizationID", @$_GET["id"]); $form->addRow("itext", "Headline", "headline", @$r["headline"], "", true, 255); $form->addRow("itext", "News Outlet", "outlet", @$r["outlet"], "", true, 255); $form->addRow("date", "Date", "pubdate", @$r["pubdate"], "", true); $form->addRow("file", "Image<br>(optional)", "image", "", "", false); $form->addRow("file", "File<br>(optional)", "content", "", "", true); $form->addRow("itext", "URL<br>(optional)", "url", @$r["url"], "", false, 255); $form->addRow("textarea-plain", "Description<br>(optional)", "description", @$r["description"]); $form->addRow("submit", "Save Changes"); if (url_id()) { $form->draw("<a href='/news/'>In the News</a> > Edit Story"); echo drawBottom(); } else { $form->draw("Add New Story"); }
<?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><nobr><?php echo $r["board_position"]; ?> </nobr></td> <?php echo drawdrawColumnDelete("Are you sure you want to delete this board member?", $r["id"]); ?> </tr> <?php } } else { echo drawEmptyResult("No board members added yet", $colspan); } echo drawTableEnd(); ?> <a name="bottom"></a> <?php if ($page['is_admin']) { $form = new intranet_form(); $form->addRow("itext", "First Name", "firstname", "", "", true, 255); $form->addRow("itext", "Last Name", "lastname", "", "", true, 255); $form->addRow("select", "Organization", "organization_id", "SELECT id, title from organizations ORDER BY title", "", true); $form->addRow("itext", "Position on Board", "board_position", "", "", false, 255); $form->addRow("itext", "Employment", "employment", "", "", false, 255); $form->addRow("textarea", "Bio", "bio", "", "", false); $form->addRow("submit", "add board member"); $form->draw("Add a Board Member"); } 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) { $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 ($posting) { format_post_bits("isInstancePage, isSecure, isAdmin"); db_query("UPDATE pages SET \n\t\tname = '{$_POST["title"]}',\n\t\tisAdmin = {$_POST["isAdmin"]},\n\t\tprecedence = {$_POST["precedence"]},\n\t\tisInstancePage = {$_POST["isInstancePage"]},\n\t\tisSecure = {$_POST["isSecure"]},\n\t\tmoduleID = '{$_POST["moduleID"]}',\n\t\thelpText = '{$_POST["helpText"]}'\n\t\tWHERE id = " . $_GET["id"]); url_change($_POST["returnTo"]); } drawTop(); $r = db_grab("SELECT\n\tp.id,\n\tp.name title,\n\tp.helpText,\n\tm.id moduleID,\n\tm.name module,\n\tp.isAdmin,\n\tp.isSecure,\n\tp.precedence,\n\tp.isInstancePage,\n\tp2.url\n\tFROM pages p\n\tJOIN modules m ON p.moduleID = m.id\n\tJOIN pages p2 ON m.homePageID = p2.id\n\tWHERE p.id = " . $_GET["id"]); $form = new intranet_form(); $form->addRow("hidden", "", "returnTo", $_GET["returnTo"]); $form->addRow("itext", "Title", "title", $r["title"], "", true, 50); $form->addRow("itext", "Precedence", "precedence", $r["precedence"], "", true, 50); $form->addRow("checkbox", "Is Admin", "isAdmin", $r["isAdmin"], "", true, 50); $form->addRow("checkbox", "Is Instance Page", "isInstancePage", $r["isInstancePage"], "", true, 50); $form->addRow("checkbox", "Is Secure", "isSecure", $r["isSecure"], "", true, 50); $form->addRow("select", "Module", "moduleID", "SELECT id, name FROM modules WHERE isActive = 1 ORDER BY name", $r["moduleID"], $r["moduleID"]); //$form->addRow("text", "Module", "", "<span class='" . str_replace("/", "", $r["url"]) . " block'>" . $r["module"] . "</span>"); $form->addRow("textarea", "Help Text", "helpText", $r["helpText"]); $form->addRow("submit", "Save Changes"); $form->draw("Edit Page Info"); drawBottom();
<?php include "include.php"; if ($posting) { $id = db_save("helpdesk_tickets_types"); url_change("type.php?id=" . $id); } echo drawTop(); if (isset($_GET["id"])) { $result = db_query("SELECT description FROM helpdesk_tickets_types WHERE id = " . $_GET["id"]); $r = db_fetch($result); } $form = new intranet_form(); $form->addRow("itext", "Type Name", "description", @$r["description"]); if (isset($_GET["id"])) { $form->addRow("submit", "Save Changes"); $form->draw("Edit Ticket Type"); } else { $form->addRow("submit", "Add Type"); $form->draw("Add New Ticket Type"); } echo drawBottom();
?> <html> <head> <title>Reset Your Password</title> <link rel="stylesheet" type="text/css" href="<?php echo $locale; ?> style.css" /> <script language="javascript" src="/javascript.js"></script> </head> <body> <br> <table width="600" align="center"> <tr> <td> <?php if (@$_GET["msg"] == "email-not-found") { echo drawServerMessage("<h1>Email Not Found</h1>That email address wasn't found in the system. If the address below is correct and you've never logged in, you may need to <a href='account_request.php'>request an account</a>."); } else { echo drawServerMessage("<h1>Starting Over, Password-Wise</h1>Your old password can't be recovered, since it was encrypted. However, it can be reset so you can pick a new one. What is the email address on the account?"); } $form = new intranet_form(); $form->addRow("itext", "Email", "email", @$_GET["email"], "", true, 50); $form->addRow("submit", "Send Request"); $form->draw("Reset Password"); ?> </td> </tr> </table> </body> </html>
echo $_josh["months"][$prevmonth - 1]; ?> </a></td> <td colspan="5"></td> <td align="right"><a href="/cal/?month=<?php echo $nextmonth; ?> &year=<?php echo $nextyear; ?> "><?php echo $_josh["months"][$nextmonth - 1]; ?> </a> ></td> </tr> </table> <a name="bottom"></a> <?php if (!$printing) { $form = new intranet_form(); if ($isAdmin) { $form->addUser("createdBy", "Posted By", $user["id"], false); } $form->addRow("itext", "Title", "title", "", "", true); $form->addRow("select", "Type", "typeID", "SELECT id, description FROM calendar_events_types ORDER BY description", 1, true); $form->addRow("datetime", "Date", "startDate"); $form->addRow("textarea", "Notes", "description", "", "", true); $form->addRow("submit", "add new event"); $form->draw("Add a New Event"); } drawBottom();
<?php include 'include.php'; if ($posting) { $id = db_enter('skills', 'title group'); if ($editing) { url_change('skill.php?id=' . url_id()); } else { url_change('skills.php'); } } echo drawTop(); if ($editing) { $r = db_grab('SELECT title, `group` FROM skills WHERE id = ' . $_GET['id']); } $form = new intranet_form(); $form->addRow('itext', 'Title', 'title', @$r['title'], '', true, 50); $form->addRow('itext', 'Group', 'group', @$r['group'], '', true, 50); $form->addRow('submit', $editing ? 'Save Changes' : 'Add Skill'); echo $form->draw('<a href="./">Staff</a> > <a href="skills.php">Skills</a> > ' . ($editing ? 'Edit Skill' : 'Add Skill')); echo drawBottom();
echo $_GET["year"]; } ?> "><i>No Type</i></a></td> <td align="right"><?php echo number_format($t["tickets"]); ?> </td> <td align="right"><?php echo @round($t["minutes"] / $total["minutes"] * 100); ?> </td> </tr> <?php } if (!$counter) { if ($filtered) { echo drawEmptyResult("No tickets for this month and year.", 3); } else { echo drawEmptyResult("No tickets.", 3); } } ?> </table> <a name="bottom"></a> <?php $form = new intranet_form(); $form->addRow("itext", "Name", "description", @$r["description"]); $form->addRow("submit", "Add Type"); $form->draw("Add New Type"); echo drawBottom();
initTinyMCE("<?php echo $locale; ?> style-textarea.css"); //--> </script> </head> <body> <br> <table width="600" align="center"> <tr> <td> <?php echo drawServerMessage("<h1>Welcome!</h1> To request an account, please fill out the fields below. Your login information will be emailed to you once your request is approved."); $form = new intranet_form(); $form->addRow("itext", "First Name", "firstname", '', "", true, 20); $form->addRow("itext", "Nickname (optional)", "nickname", '', "", false, 20); $form->addRow("itext", "Last Name", "lastname", '', "", true, 20); $form->addRow("itext", "Email", "email", '', "", true, 50); $form->addRow("itext", "Title", "title", '', "", true, 100); $form->addRow("select", "Organization", "corporationID", "SELECT id, description FROM organizations ORDER BY description", "", true); $form->addRow("department", "Department", "departmentID"); $form->addRow("select", "Office", "officeID", "SELECT id, name FROM intranet_offices ORDER BY precedence", "", true); $form->addRow("phone", "Phone", "phone", '', "", true, 14); $form->addRow("textarea", "Additional Info", "bio", "", "mceEditor"); $form->addRow("submit", "Send Request"); $form->draw("Request Intranet Account"); ?> </td> </tr> </table>
} echo $t["description"]; if ($t["topics"]) { ?> </a><?php } ?> </td> <td align="right"><?php echo $t["topics"]; ?> </td> </tr> <?php } } else { echo drawEmptyResult("No types have been entered yet.", 2); } ?> </table> <?php if ($page['is_admin']) { $form = new intranet_form(); if ($page['is_admin']) { $form->addUser("created_user", "Posted By", $_SESSION["user_id"], false, true); } $form->addRow("itext", "Tag", "description", "", "", true, 255); $form->addRow("submit", "add tag"); $form->draw("Add a New Type"); } echo drawBottom();
$r = db_grab("SELECT p.url homepage FROM intranet_users u JOIN pages p ON u.homePageID = p.id WHERE u.userID = " . $user["id"]); url_change($r); } ?> <html> <head> <title>Update Your Password</title> <link rel="stylesheet" type="text/css" href="<?php echo $locale; ?> style.css" /> <script language="javascript" src="/javascript.js"></script> </head> <body> <br> <table width="600" align="center"> <tr> <td> <?php $form = new intranet_form(); $form->addRow("password", "Password", "password1", "", "", true); $form->addRow("password", "Confirm", "password2", "", "", true); $form->addRow("submit", "Save"); $form->addJavascript("(form.password1.value != form.password2.value)", "Passwords don't match!"); $form->draw("Update Your Password"); ?> </td> </tr> </table> </body> </html>
<td class="reorder"><i class="glyphicon glyphicon-menu-hamburger"></i></td> <td><?php echo $l["text"]; ?> </td> <td><?php echo $l["url"]; ?> </td> <?php echo deleteColumn('Are you sure?', $l['id']); ?> </tr> <?php } } else { echo drawEmptyResult("No links entered in the system yet!", 4); } ?> </tbody> </table> <a name="bottom"></a> <?php $form = new intranet_form(); $form->addRow("hidden", "", "precedence", $max + 1); $form->addRow("itext", "Link", "text", "", "", true, 255); $form->addRow("itext", "Address", "url", "http://", "", true, 255); $form->addRow("submit", "add new link"); $form->draw("Add a New Link"); drawBottom();
<td><?php echo $r["office"]; ?> </td> <td class="r"><?php echo format_date($r["updated_date"]); ?> </td> <?php echo drawdrawColumnDelete("Delete this position?", $r["id"]); ?> </tr> <?php } ?> </table> <a name="bottom"></a> <?php if ($page['is_admin']) { $form = new intranet_form(); $form->addRow("itext", "Title", "title", "", "", true); $form->addRow("select", "Organization", "corporationID", "SELECT id, title from organizations ORDER BY title", "", true); $form->addRow("select", "Location", "officeID", "SELECT id, name FROM offices ORDER BY precedence", "", true); $form->addRow("checkbox", "Internship?", "is_internship", $r["is_internship"]); $form->addRow("textarea", "Description", "description", "", "", true); $form->addRow("submit", "post open position"); $form->draw("Add an Open Position"); } echo 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();
<th width="120">Starter</th> <th class="c">Replies</th> <th class="r">Last Post</th> </tr> </thead> <tbody> <?php echo drawBBPosts(15, drawEmptyResult("No topics have been added yet. Why not <a href='#bottom'>be the first</a>?", 4)); ?> </tbody> <tfoot class="more"> <tr> <td colspan="4"> <input type="button" id="more" value="Load More"> </td> </tr> </tfoot> </table> <a name="bottom"></a> <?php $form = new intranet_form(); if ($isAdmin) { $form->addUser("createdBy", "Posted By", $user["id"], false, true); $form->addCheckbox("isAdmin", "Admin Post?", 0, "(check if yes)", true); } $form->addCheckbox("temporary", "Lifespan", true, "Check Box to Delete Post After 30 Days"); $form->addRow("itext", "Subject", "title", "", "", true); $form->addRow("textarea", "Message", "description", "", "", true); $form->addRow("submit", "add new topic"); $form->draw("Contribute a New Topic"); drawBottom();
} elseif (empty($user["updatedOn"])) { echo drawServerMessage("Welcome to the Intranet! Since this is your first time logging in, please make certain that the staff information here is correct, then click 'save changes' at the bottom. (The emergency and home info is private and optional.)"); } } elseif (isset($_GET["requestID"])) { $r = db_grab("SELECT \n\t\tu.firstname,\n\t\tu.nickname,\n\t\tu.lastname,\n\t\tu.title, \n\t\tu.email, \n\t\tu.bio, \n\t\tu.phone, \n\t\tu.officeID, \n\t\tu.corporationID,\n\t\tu.departmentID,\n\t\tu.createdOn,\n\t\tGETDATE() startDate\n\t\tFROM users_requests u WHERE id = " . $_GET["requestID"]); } else { $r["startDate"] = db_grab("SELECT GETDATE()"); } //set default rank if (!isset($r["rankID"])) { $r["rankID"] = db_grab("SELECT id FROM intranet_ranks WHERE isDefault = 1"); } $isRequired = isset($_GET["id"]) && $_GET["id"] == $user["id"] && $locale == "/_seedco/"; $form = new intranet_form(); $form->addGroup("Public Information"); $form->addRow("itext", "First Name", "firstname", @$r["firstname"], "", true, 50); $form->addRow("itext", "Nickname", "nickname", @$r["nickname"], "", false, 50); $form->addRow("itext", "Last Name", "lastname", @$r["lastname"], "", true, 50); $form->addRow("itext", "Email", "email", @$r["email"], "", true, 50); $form->addRow("itext", "Title", "title", @$r["title"], "", false, 100); $form->addRow("select", "Organization", "corporationID", "SELECT id, description FROM organizations ORDER BY description", @$r["corporationID"], false); $form->addRow("department", "Department", "departmentID", "", @$r["departmentID"]); $form->addRow("select", "Location", "officeID", "SELECT id, name from intranet_offices order by name", @$r["officeID"], true); $form->addRow("phone", "Phone", "phone", @format_phone($r["phone"]), "", true, 14); $form->addRow("textarea-plain", "Bio", "bio", @$r["bio"]); $form->addCheckboxes('skills', 'Skills', 'skills', 'users_to_skills', 'user_id', 'skill_id', $_GET['id']); $form->addRow("file", "Image", "userfile"); if ($isAdmin) { //some fields are admin-only (we don't want people editing the staff page on the website) $form->addGroup("Administrative Information [public, but not editable by staff]"); $form->addRow("select", "Rank", "rankID", "SELECT id, description from intranet_ranks", @$r["rankID"], true);
"><?php echo $l['name']; ?> </a></td> <td><?php echo nl2br($l['address']); ?> </td> <?php echo deleteColumn('Are you sure?', $l['id']); ?> </tr> <?php } } else { echo drawEmptyResult('No intranet_offices entered in the system yet!', 4); } ?> </tbody> </table> <a name='bottom'></a> <?php $form = new intranet_form(); $form->addRow('hidden', '', 'precedence', $max + 1); $form->addRow('itext', 'Name', 'name', '', '', true, 255); $form->addRow('textarea-plain', 'Address', 'address', '', '', true, 255); $form->addRow('submit', 'add new link'); $form->draw('Add a New Location'); } drawBottom();
<td><?php echo $s['title']; ?> </td> <td><?php echo $s['url']; ?> </td> <?php echo deleteColumn('Are you sure?', $s['id']); ?> </tr> <?php } } else { echo drawEmptyResult('No spotlight stories entered in the system yet!', 5); } ?> </tbody> </table> <a name="bottom"></a> <?php $form = new intranet_form(); $form->addRow('hidden', '', 'precedence', ++$max); $form->addRow('itext', 'Title', 'title', '', '', true, 255); $form->addRow('itext', 'Link', 'url', 'http://', '', true, 255); $form->addRow("file", "Image", "userfile"); $form->addRow('submit', 'add new link'); $form->draw('Add a New Link'); drawBottom();
<?php include "../../include.php"; if ($posting) { $id = db_save("queries"); url_change("./"); } echo drawTop(); if (isset($_GET["id"])) { $r = db_grab("SELECT \n\t\t\tq.databaseID,\n\t\t\td.dbname,\n\t\t\tq.name,\n\t\t\tq.description,\n\t\t\tq.query,\n\t\t\tq.is_active\n\t\tFROM queries q \n\t\tJOIN queries_databases d ON d.id = q.databaseID\n\t\tWHERE q.id = " . $_GET["id"]); /*db_switch($r["dbname"]); db_query($r["query"], false, true); db_switch($_josh["db"]["database"]);*/ } else { $r["is_active"] = 1; } $form = new intranet_form(); $form->addRow("hidden", "", "is_active", $r["is_active"]); $form->addRow("select", "Database", "databaseID", "SELECT id, dbname from queries_databases order by dbname", @$r["databaseID"], true); $form->addRow("itext", "Name", "name", @$r["name"], "", false, 50); $form->addRow("textarea", "Description", "description", @$r["description"]); $form->addRow("textarea-plain", "Query", "query", @$r["query"]); $form->addRow("submit", "Save Changes"); if (isset($_GET["id"])) { $form->draw("<a href='/queries/'>Database Queries</a> > Edit Query"); } else { $form->draw("Add New Query"); } echo 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) { $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();
include "../../include.php"; if ($posting) { if ($uploading) { list($_POST["type_id"], $_POST["content"]) = file_get_uploaded("userfile", "docs_types"); } $id = db_save("policy_docs"); url_change("../?category=" . $_POST["categoryID"]); } echo drawTop(); $types = db_query("SELECT description, extension FROM docs_types ORDER BY description"); $extensions = $doctypes = $array = array(); while ($t = db_fetch($types)) { $extensions[] = '(extension != "' . $t["extension"] . '")'; $doctypes[] = " - " . $t["description"] . " (." . $t["extension"] . ")"; $array[] = "'" . $t["extension"] . "'"; } $array = implode(",", $array); echo draw_javascript("\n\tfunction suggestName(which) {\n\t\t//var types = new Array(" . $array . ");\n\t\tvar fileParts = which.value.split('.');\n\t\tvar extension\t= fileParts.pop();\n\t\tvar filename\t= fileParts.join(' ');\n\n\t\tif (!url_id()) which.form.name.value = format_title(filename);\n\t}\n\t\n\tfunction validate() {\n\t\treturn true;\n\t}\n"); $form = new intranet_form(); //function addRow($type, $title, $name="", $value="", $default="", $required=false, $maxlength=50, $onchange=false) { $form->addRow("file", "Document", "userfile", "", "", true, false, "suggestName(this);"); $form->addRow("itext", "Name", "name", @$r["name"], "", true, 50); $form->addRow("select", "Category", "categoryID", "SELECT id, description FROM policy_categories ORDER BY description", @$r["categoryID"], true); $form->addRow("submit", "Save Changes"); if (isset($_GET["id"])) { $form->draw("<a href='/policy/?category=1'>Policy</a> > Edit Policy Document"); } else { $form->draw("<a href='/policy/?category=1'>Policy</a> > Add New Policy Document"); } echo drawBottom();