exit; } ?> <br> <script type="text/javascript"> function redirect(url_location) { window.location=url_location } </script> <form action="commitchange.php" method="post" enctype="multipart/form-data"> <table name="header" align="center" border="1"> <tr><td align="center" bgcolor="teal"><b>User Information</b></td></tr> </table> <table name="list" align="center" border="1"> <tr><td align="left">ID</td><td align="left"><?php echo $user_obj->getDeptId(); ?> </td></tr> <tr><td align="left">Username</td><td align="left"><input type="text" name="username" value="<?php echo $user_obj->getName(); ?> "></td></tr> <tr><td align="left">Department</td><td align="left"><?php echo $user_obj->getDeptName(); ?> </td></tr> </table> <br> <input type="hidden" name="submit" value="change_personal_info"> <input type="Submit" name="change_personal_info" value="Submit"> <input type="Button" name="cancel" value="Cancel" onclick="redirect('profile.php?last_message=Personal Info alteration canceled')">
if (!isset($_SESSION['uid'])) { redirect_visitor(); } include 'udf_functions.php'; require_once "AccessLog_class.php"; require_once "File_class.php"; require_once 'Reviewer_class.php'; require_once 'Email_class.php'; $user_obj = new User($_SESSION['uid'], $pdo); if (!$user_obj->canAdd()) { redirect_visitor('out.php'); } if (!isset($_POST['submit'])) { $last_message = isset($_REQUEST['last_message']) ? $_REQUEST['last_message'] : ''; draw_header(msg('area_add_new_file'), $last_message); $current_user_dept = $user_obj->getDeptId(); $index = 0; //CHM - Pull in the sub-select values $query = "SELECT table_name FROM {$GLOBALS['CONFIG']['db_prefix']}udf WHERE field_type = '4'"; $stmt = $pdo->prepare($query); $stmt->execute(); $result = $stmt->fetchAll(); $num_rows = $stmt->rowCount(); $i = 0; $t_name = array(); // Set the values for the hidden sub-select fields foreach ($result as $data) { $explode_v = explode('_', $data['table_name']); $t_name[] = $explode_v[2]; $i++; }
/** * return the owner's dept ID. Often, this is also the department of the file. * if the owner changes his/her department after he/she changes department, then * the file's department will not be the same as it's owner's. * @return string */ public function getOwnerDeptId() { $user_obj = new User($this->getOwner(), $this->connection); return $user_obj->getDeptId(); }
function getOwnerDeptId() { $user_obj = new User($this->getOwner(), $this->connection, $this->database); return $user_obj->getDeptId(); }