You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // check for valid session and $id session_start(); include 'odm-load.php'; if (!isset($_SESSION['uid'])) { redirect_visitor(); } require_once "AccessLog_class.php"; require_once "File_class.php"; require_once 'Email_class.php'; require_once 'Reviewer_class.php'; $user_obj = new User($_SESSION['uid'], $GLOBALS['connection'], DB_NAME); if (!$user_obj->canCheckIn()) { redirect_visitor('out.php'); } $last_message = isset($_REQUEST['last_message']) ? $_REQUEST['last_message'] : ''; if (!isset($_REQUEST['id']) || $_REQUEST['id'] == '') { $last_message = 'Failed'; header('Location:error.php?ec=2&last_message=' . urlencode($last_message)); exit; } // includes // open connection if (!isset($_POST['submit'])) { // form not yet submitted, display initial form // pre-fill the form with some information so that user knows which file is being updated $query = "SELECT description, realname FROM {$GLOBALS['CONFIG']['db_prefix']}data WHERE id = '{$_REQUEST['id']}' AND status = '{$_SESSION['uid']}'"; $result = mysql_query($query, $GLOBALS['connection']) or die("Error in query: {$query}. " . mysql_error());