File: //home/awaldron/www/archive/demo/admin/groups_org.php
<?php
session_start();
include("../_functions.php");
dbconnect();
if (!is_logged()) auto_login();
echo "<html>\n";
echo "<head>\n";
echo "<title>".COMPANY_NAME." : Organization Groups</title>\n";
echo "<script language=\"JavaScript\" type=\"text/javascript\">\n";
echo "<!--\n";
echo "function openWindow(theURL,winName,features) { //v2.0\n";
echo " window.open(theURL,winName,features);\n";
echo "}\n";
echo "-->\n";
echo "</script>\n";
echo "</head>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../default.css\">\n";
echo "<body style=\"margin:15px;\">\n";
if (!admin_panel($_SESSION["auth_user"])) {
echo "<br><br><br><br>".error("You must be logged in to access the administration panel!");
} else {
if (isset($_POST["newtlgo"])) {
quickUPDATE("INSERT INTO tbl_groups (group_parent,group_name,group_short) VALUES (0,'".$_POST["newtlgrp"]."','".$_POST["newtlabbr"]."')");
}
echo "<P><img src=\"/gui/icons/cog.gif\" align=\"left\">\n";
echo "<div class=\"headline\">Organization Groups</div>\n";
echo "<P>From this control panel, you have the ability to add/remove company organization groups.\n";
echo "<br><br><br><br><div class=\"headline\">Add a New Top-Level Organization Group</div>\n";
echo "<form action=\"groups_org.php\" method=\"POST\">\n";
echo "<P><table class=\"textdn\" border=0>\n";
echo "<tr><td><b>New Top-Level Group Name:</b></td><td><input type=\"text\" name=\"newtlgrp\" size=55></td></tr>\n";
echo "<tr><td><b>Group Name Abbreviation:</b></td><td><input type=\"text\" name=\"newtlabbr\" size=30> <input type=\"submit\" value=\"Go\" name=\"newtlgo\"></td></tr>\n";
echo "</table>\n";
echo "</form>\n";
echo "<br><br><br><div class=\"headline\">Manage Existing Groups</div>\n";
echo "<p><center><table class=\"textdn\" border=0 cellspacing=1 cellpadding=3 bgcolor=\"#".COLOR_TBAR."\">\n";
echo "<tr class=\"header\"><td><b>Organization Group</b></td><td align=\"center\"><b> #Emps </b></td><td align=\"center\"><b>Actions</b></td></tr>\n";
$group = DEF_GROUP;
group_manage(0,0,$group);
echo "</table></center>\n";
echo "<br><br><br><br>\n";
echo "<center>Powered by <a href=\"http://www.intrabreeze.com\">IntraBreeze</a> © 2005 IntraBreeze, LLC</center>\n";
}
echo "</body>\n</html>\n";
?>