コード例 #1
0
ファイル: edit.php プロジェクト: joshreisner/hcfa-cc
<?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();
コード例 #2
0
ファイル: index.php プロジェクト: Rhenan/intranet-1
            ?>
</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();
コード例 #3
0
ファイル: tags.php プロジェクト: Rhenan/intranet-1
        }
        echo $t["description"];
        if ($t["topics"]) {
            ?>
</a><?php 
        }
        ?>
</td>
		<td align="right"><?php 
        echo $t["topics"];
        ?>
</td>
	</tr>
	<?php 
    }
} else {
    echo drawEmptyResult("No tags 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 Tag");
}
echo drawBottom();
コード例 #4
0
ファイル: index.php プロジェクト: joshreisner/hcfa-cc
    ?>
</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();
コード例 #5
0
ファイル: topic_edit.php プロジェクト: Rhenan/intranet-1
<?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();
コード例 #6
0
    $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>
コード例 #7
0
ファイル: index.php プロジェクト: Rhenan/intranet-1
	        <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();
コード例 #8
0
ファイル: type_add_edit.php プロジェクト: Rhenan/intranet-1
<?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();
コード例 #9
0
?>
<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>
コード例 #10
0
ファイル: index.php プロジェクト: joshreisner/hcfa-cc
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> &gt;</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();
コード例 #11
0
ファイル: index.php プロジェクト: Rhenan/intranet-1
        echo format_date($r["releaseDate"], "n/a", "M d, Y", false);
        ?>
</nobr></td>
				<?php 
        echo drawdrawColumnDelete("Delete this press release?", $r["id"]);
        ?>
		    </tr>
		<?php 
    }
    ?>
	</table>
	
	<a name="bottom"></a>
	
	<?php 
    if ($page['is_admin']) {
        $form = new intranet_form();
        if ($page['is_admin']) {
            $form->addUser("created_user", "Posted By", $_SESSION["user_id"], false, "EEDDCC");
        }
        $form->addRow("itext", "Headline", "headline", "", "", true, 255);
        $form->addRow("itext", "Detail", "detail", "", "", false, 255);
        $form->addRow("itext", "Location", "location", "", "", true, 255);
        $form->addRow("select", "Organization", "corporationID", "SELECT id, title from organizations ORDER BY title", "1", true);
        $form->addRow("date", "Date", "releaseDate", false, false, true);
        $form->addRow("textarea", "Text", "text", "", "", true);
        $form->addRow("submit", "post press release");
        $form->draw("Add a Press Release");
    }
}
echo drawBottom();
コード例 #12
0
ファイル: position_edit.php プロジェクト: joshreisner/hcfa-cc
<?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> &gt; Update Position");
drawBottom();
コード例 #13
0
<?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> &gt; <a href="skills.php">Skills</a> &gt; ' . ($editing ? 'Edit Skill' : 'Add Skill'));
echo drawBottom();
コード例 #14
0
ファイル: member_edit.php プロジェクト: joshreisner/hcfa-cc
<?php

include "../include.php";
if (!empty($_POST)) {
    db_query("UPDATE board_members SET\n\t\t\tfirstname\t\t= '{$_POST["firstname"]}',\t\n\t\t\tlastname\t\t= '{$_POST["lastname"]}',\t\n\t\t\tbio\t\t\t\t= '{$_POST["bio"]}',\t\n\t\t\tcorporationID\t= {$_POST["corporationID"]},\n\t\t\tpositionOnBoard\t= '{$_POST["positionOnBoard"]}',\t\n\t\t\temployment\t\t= '{$_POST["employment"]}',\t\n\t\t\tupdatedOn\t\t= GETDATE(),\n\t\t\tupdatedBy\t\t= {$user["id"]}\n\t\t\tWHERE id\t\t= " . $_GET["id"]);
    url_change("member.php?id=" . $_GET["id"]);
}
drawTop();
$r = db_grab("SELECT \n\t\t\t\tfirstname,\n\t\t\t\tlastname,\n\t\t\t\tbio,\n\t\t\t\tpositionOnBoard,\n\t\t\t\temployment,\n\t\t\t\tcorporationID\n\t\t\tFROM board_members\n\t\t\tWHERE id = " . $_GET["id"]);
$form = new intranet_form();
$form->addRow("itext", "First Name", "firstname", $r["firstname"], "", true, 255);
$form->addRow("itext", "Last Name", "lastname", $r["lastname"], "", false, 255);
$form->addRow("select", "Organization", "corporationID", "SELECT id, description FROM organizations ORDER BY description", $r["corporationID"]);
$form->addRow("itext", "Position on Board", "positionOnBoard", $r["positionOnBoard"], "", false, 255);
$form->addRow("itext", "Employment", "employment", $r["employment"], "", false, 255);
$form->addRow("textarea", "Bio", "bio", $r["bio"], "", false);
$form->addRow("submit", "update board member");
$form->draw("<a href='index.php' class='white'>Board Members</a> &gt; Update Member");
drawBottom();
コード例 #15
0
ファイル: edit.php プロジェクト: Rhenan/intranet-1
    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> &gt; Edit Story");
    echo drawBottom();
} else {
    $form->draw("Add New Story");
}
コード例 #16
0
ファイル: event_edit.php プロジェクト: joshreisner/hcfa-cc
<?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();
コード例 #17
0
?>
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>
	</body>
</html>
コード例 #18
0
ファイル: types.php プロジェクト: Rhenan/intranet-1
        }
        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();
コード例 #19
0
ファイル: edit-help.php プロジェクト: joshreisner/hcfa-cc
<?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();
コード例 #20
0
ファイル: links.php プロジェクト: joshreisner/hcfa-cc
				<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();
コード例 #21
0
ファイル: index.php プロジェクト: joshreisner/hcfa-cc
		<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();
コード例 #22
0
ファイル: ticket-edit.php プロジェクト: Rhenan/intranet-1
<?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();
コード例 #23
0
ファイル: locations.php プロジェクト: joshreisner/hcfa-cc
"><?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();
コード例 #24
0
ファイル: add_edit.php プロジェクト: joshreisner/hcfa-cc
    $form->addRow("date", "End Date", "endDate", @$r["endDate"], "", false);
    $form->addCheckboxes("permissions", "Permissions", "modules", "administrators", "userID", "moduleID", @$_GET["id"]);
}
$form->addGroup("Home Contact Information [private]");
$form->addRow("itext", "Address 1", "homeAddress1", @$r["homeAddress1"], "", false);
$form->addRow("itext", "Address 2", "homeAddress2", @$r["homeAddress2"], "", false);
$form->addRow("itext", "City", "homeCity", @$r["homeCity"], "", false);
$form->addRow("select", "State", "homeStateID", "SELECT stateID, stateName from intranet_us_states order by stateName", @$r["homeStateID"], false);
$form->addRow("itext", "ZIP", "homeZIP", @$r["homeZIP"], "", false, 5);
$form->addRow("itext", "Home Phone", "homePhone", @format_phone($r["homePhone"]), "", false, 14);
$form->addRow("itext", "Cell Phone", "homeCell", @format_phone($r["homeCell"]), "", false, 14);
$form->addRow("itext", "Personal Email", "homeEmail", @$r["homeEmail"], "", false);
$form->addGroup("First Emergency Contact [private]");
$form->addRow("itext", "Name", "emerCont1Name", @$r["emerCont1Name"], "", false);
$form->addRow("itext", "Relationship", "emerCont1Relationship", @$r["emerCont1Relationship"], "", false);
$form->addRow("itext", "Phone", "emerCont1Phone", @format_phone($r["emerCont1Phone"]), "", false, 14);
$form->addRow("itext", "Cell", "emerCont1Cell", @format_phone($r["emerCont1Cell"]), "", false, 14);
$form->addRow("itext", "Email", "emerCont1Email", @$r["emerCont1Email"], "", false);
$form->addGroup("Second Emergency Contact [private]");
$form->addRow("itext", "Name", "emerCont2Name", @$r["emerCont2Name"], "", false);
$form->addRow("itext", "Relationship", "emerCont2Relationship", @$r["emerCont2Relationship"], "", false);
$form->addRow("itext", "Phone", "emerCont2Phone", @format_phone($r["emerCont2Phone"]), "", false, 14);
$form->addRow("itext", "Cell", "emerCont2Cell", @format_phone($r["emerCont2Cell"]), "", false, 14);
$form->addRow("itext", "Email", "emerCont2Email", @$r["emerCont2Email"], "", false);
$form->addRow("submit", "Save Changes");
if (isset($_GET["id"])) {
    $form->draw("Edit Staff Info");
} else {
    $form->draw("Add New Staff Member");
}
drawBottom();
コード例 #25
0
ファイル: query_edit.php プロジェクト: Rhenan/intranet-1
<?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> &gt; Edit Query");
} else {
    $form->draw("Add New Query");
}
echo drawBottom();
コード例 #26
0
ファイル: spotlight.php プロジェクト: joshreisner/hcfa-cc
				<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();
コード例 #27
0
ファイル: edit.php プロジェクト: Rhenan/intranet-1
<?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();
コード例 #28
0
ファイル: edit.php プロジェクト: Rhenan/intranet-1
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();