Portions created by the Initial Developer are Copyright (C) 2008-2012 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ include "root.php"; require_once "includes/require.php"; require_once "includes/checkauth.php"; if (permission_exists('group_add')) { //access allowed } else { echo "access denied"; return; } //get the http values and set them as variables $path = check_str($_GET["path"]); $msg = check_str($_GET["msg"]); $group_name = check_str($_POST["group_name"]); $group_description = check_str($_POST["group_description"]); if (strlen($group_name) > 0) { $sql_insert = "insert into v_groups "; $sql_insert .= "("; $sql_insert .= "domain_uuid, "; $sql_insert .= "group_uuid, "; $sql_insert .= "group_name, "; $sql_insert .= "group_description "; $sql_insert .= ")"; $sql_insert .= "values "; $sql_insert .= "("; $sql_insert .= "'$domain_uuid', "; $sql_insert .= "'".uuid()."', "; $sql_insert .= "'$group_name', "; $sql_insert .= "'$group_description' "; $sql_insert .= ")"; if (!$db->exec($sql_insert)) { //echo $db->errorCode() . "
"; $info = $db->errorInfo(); print_r($info); // $info[0] == $db->errorCode() unified error code // $info[1] is the driver specific error code // $info[2] is the driver specific error string } //redirect the user require_once "includes/header.php"; echo "\n"; echo "
\n"; echo "Group Added\n"; echo "
\n"; require_once "includes/footer.php"; return; } //include the header include "includes/header.php"; //show the content echo "

"; echo "
"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo " Please choose a group name. "; echo " \n"; echo " "; echo "
\n"; echo "
"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "Group Name:\n"; echo "\n"; echo " \n"; echo "
\n"; echo "Description:\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo " \n"; echo " \n"; echo "
\n"; echo "
"; echo "
"; echo "

"; echo "

"; //include the footer include "includes/footer.php"; ?>