query("INSERT INTO iworks_news (date,user,comments,username,strlower,subject,message) VALUES ('".time()."','$user_info[userid]','0','$user_info[username]','$user_info[strlower]','".addslashes($_REQUEST[title])."','".addslashes($_REQUEST[message])."')"); header("LOCATION: $_REQUEST[returnlink]"); exit(); } //Deletion of announcements if($_REQUEST['action'] == "deleteannouncement") { $rowid = $sql->query_first("SELECT rowid FROM iworks_news WHERE date='$_REQUEST[a]'"); $sql->query("DELETE FROM iworks_news WHERE rowid='$rowid[rowid]'"); $sql->query("DELETE FROM iworks_news_comments WHERE article='$rowid[rowid]'"); header("LOCATION: index.fpd"); exit(); } //This will lock out the system entirely... if($_REQUEST['action'] == "setlock") { $modestatus = setread($mode); header("LOCATION: $_REQUEST[returnlink]"); exit(); } //For putting the system into a read-only status... if($_REQUEST['action'] == "setmode") { $modestatus = setmode($mode); header("LOCATION: $_REQUEST[returnlink]"); exit(); } else { echo "Please select an option:
Put system into read-only mode
Take system out of read-only mode"; exit(); } } else { echo "Authorization failed!"; exit(); } ?>