* http://www.gnu.org/copyleft/gpl.html * */ require_once('includes/common.php'); checkLogin('admin'); require_once('includes/SI_Account.php'); $title = ''; $account = new SI_Account(); if($_REQUEST['mode'] == 'add'){ $title = "Add Account"; if($_POST['save']){ $account->updateFromAssocArray($_POST); $account->id = $account->add(); if($account->id !== false){ goBack(); }else{ $error_msg .= "Error adding Account!\n"; debug_message($account->getLastError()); } } }else if($_REQUEST['mode'] == 'edit'){ $title = "Edit Account"; if(empty($_REQUEST['id'])){ $error_msg .= "Error: No ID specified!\n"; }else{ if(!$account->get($_REQUEST['id'])){ $error_msg .= "Error retrieving account information!\n";