コード例 #1
0
 public function __construct()
 {
     parent::__construct();
     if (Session::user_exist() && Session::get_Account_type() == "Admin") {
         $this->template = new Template();
         $this->signatorialList_model = new SignatorialList_Model();
         $this->department_model = new Department_Model();
         $this->template->setPageName('Signatorial List for Graduate');
         $this->template->set_username(Session::get_user());
         $this->template->set_surname(Session::get_Surname());
         $this->template->set_firstname(Session::get_Firstname());
         $this->template->set_middlename(Session::get_Middlename());
         $this->template->set_account_type(Session::get_Account_type());
         $this->template->assign('Dept_name', Session::get_DepartmentName());
         $this->template->assign('Dept_desc', $this->department_model->getDescription(Session::get_DepartmentName()));
         $this->template->set_photo(Session::get_photo());
         $this->template->setContent('signatorialList.tpl');
         $this->template->setCalendar('Calendar.tpl');
         $this->template->assign('assign_sign', '');
         $filename = "../Excel_File/student_current_enroll.xls";
         if (file_exists($filename)) {
             $this->template->assign('excel_file', 'true');
         }
         $this->displayTable('', 1, "default");
     } else {
         header('Location: ' . HOST);
     }
 }
コード例 #2
0
 public function __construct()
 {
     parent::__construct();
     if (Session::user_exist() && Session::get_Account_type() == "Admin") {
         $this->administrator_model = new User_Model();
         $this->registered_student_model = new Registered_Student();
         $this->signatoriallist_model = new SignatorialList_Model();
         $this->signatory_model = new Signatory_Model();
         $this->template = new Template();
         $this->template->setPageName('User Accounts Page');
         $this->template->set_username(Session::get_user());
         $this->template->set_surname(Session::get_Surname());
         $this->template->set_firstname(Session::get_Firstname());
         $this->template->set_middlename(Session::get_Middlename());
         $this->template->set_account_type(Session::get_Account_type());
         $this->template->set_photo(Session::get_photo());
         $this->template->setContent('dashboard.tpl');
         $this->template->setCalendar('Calendar.tpl');
         $this->template->assign('assign_sign', '');
         $filename = "../Excel_File/student_current_enroll.xls";
         if (file_exists($filename)) {
             $this->template->assign('excel_file', 'true');
         }
         //var_dump($_GET['account_types']);
         if (isset($_GET['user_type'])) {
             $this->displayTable('', 1, trim($_GET['user_type']), "default");
         } else {
             // echo "wwwwwwwwww";
             $this->displayTable('', 1, 'Student', "default");
         }
     } else {
         header('Location: ' . HOST);
     }
 }
 public function __construct()
 {
     parent::__construct();
     if (Session::user_exist() && Session::get_Account_type() == "Admin") {
         $this->signatory_model = new Signatory_Model();
         $this->template = new Template();
         $this->template->setPageName('Signatories Page');
         $this->template->set_username(Session::get_user());
         $this->template->set_surname(Session::get_Surname());
         $this->template->set_firstname(Session::get_Firstname());
         $this->template->set_middlename(Session::get_Middlename());
         $this->template->set_account_type(Session::get_Account_type());
         $this->template->set_photo(Session::get_photo());
         $this->template->setContent('signatory_list_manager.tpl');
         $this->template->setCalendar('Calendar.tpl');
         $this->template->assign('assign_sign', '');
         $this->displayTable('', 1, "default");
         $filename = "../Excel_File/student_current_enroll.xls";
         if (file_exists($filename)) {
             $this->template->assign('excel_file', 'true');
         }
         if (isset($_GET['successEdit'])) {
             if ($_GET['successEdit'] == 'true') {
                 $this->template->setAlert("Updating Signatory was Successful", Template::ALERT_SUCCESS, 'alert');
             }
         }
         if (isset($_GET['successAdd'])) {
             if ($_GET['successAdd'] == 'true') {
                 $this->template->setAlert("Adding Signatory was Successful", Template::ALERT_SUCCESS, 'alert');
             }
         }
     } else {
         header('Location: ' . HOST);
     }
 }
コード例 #4
0
 public function __construct()
 {
     parent::__construct();
     $this->template = new Template();
     $this->schoolYearSem_model = new SchoolYearSem_Model();
     $this->requirement_model = new Requirements_Model();
     $this->signatorialList_model = new SignatorialList_Model();
     $this->signatory_model = new Signatory_Model();
     $this->course_model = new Course_Model();
     $listOfSchoolYear = $this->schoolYearSem_model->getSchool_Year();
     $currentSemester = $this->schoolYearSem_model->getCurSemester();
     $currentSchool_Year = $this->schoolYearSem_model->getCurSchool_Year();
     $this->template->setPageName('Requirements Page');
     $this->template->set_username(Session::get_user());
     $this->template->set_surname(Session::get_Surname());
     $this->template->set_firstname(Session::get_Firstname());
     $this->template->set_middlename(Session::get_Middlename());
     $this->template->set_account_type(Session::get_Account_type() . " in Charge -");
     $this->template->setContent('RequirementsPage.tpl');
     $this->template->setCalendar('Calendar.tpl');
     $this->template->setSchool_YearSemContent('SchoolYear_Sem.tpl');
     $this->template->assign('assign_sign', ", " . Session::get_AssignSignatory());
     $this->template->assign('mySchool_Year', $listOfSchoolYear);
     $this->template->assign('currentSemester', $currentSemester);
     $this->template->assign('currentSchool_Year', $currentSchool_Year);
     $this->template->set_photo(Session::get_photo());
     $this->displayTable('', 1, "default");
 }
コード例 #5
0
 public function __construct()
 {
     parent::__construct();
     $this->user_model = new User_Model();
     if (Session::user_exist() && Session::get_Account_type() == "Signatory") {
         $this->schoolYearSem_model = new SchoolYearSem_Model();
         $this->student_model = new Student_Model();
         $this->clearanceStatus_model = new ClearanceStatus();
         $this->requirementbyStudent_model = new Requirementbystudent_Model();
         $this->signatorialList_model = new SignatorialList_Model();
         $this->bulletin_model = new Bulletin_Model();
         $this->department_model = new Department_Model();
         $this->template = new Template();
         $listOfSchoolYear = $this->schoolYearSem_model->getSchool_Year();
         $currentSemester = $this->schoolYearSem_model->getCurSemester();
         $currentSchool_Year = $this->schoolYearSem_model->getCurSchool_Year();
         $this->template->setPageName('Signatory Page');
         $this->template->set_username(Session::get_user());
         $this->template->set_surname(Session::get_Surname());
         $this->template->set_firstname(Session::get_Firstname());
         $this->template->set_middlename(Session::get_Middlename());
         $this->template->set_account_type(Session::get_Account_type() . " in Charge -");
         $this->template->setContent('Signatorydashboard.tpl');
         $this->template->setCalendar('Calendar.tpl');
         $this->template->setSchool_YearSemContent('SchoolYear_Sem.tpl');
         $this->template->assign('assign_sign', ", " . Session::get_AssignSignatory());
         $this->template->assign('mySchool_Year', $listOfSchoolYear);
         $this->template->assign('currentSemester', $currentSemester);
         $this->template->assign('currentSchool_Year', $currentSchool_Year);
         $this->template->set_photo(Session::get_photo());
         $this->displayTable('', 1, "default", "");
     } else {
         header('Location: /SOCS/');
     }
 }
コード例 #6
0
 public function set_account_type($account_type)
 {
     if (Session::get_Account_type() == "Admin") {
         $this->assign('account_type', 'System Administrator');
     } else {
         $this->assign('account_type', $account_type);
     }
 }
コード例 #7
0
 public function __construct()
 {
     parent::__construct();
     if (Session::user_exist() && Session::get_Account_type() == "Signatory") {
         $this->template = new Template();
         $this->user_model = new User_Model();
         $this->schoolYearSem_model = new SchoolYearSem_Model();
         $this->signatorialList_model = new SignatorialList_Model();
         $this->signatory_model = new Signatory_Model();
         $this->bulletin_model = new Bulletin_Model();
         $listOfSchoolYear = $this->schoolYearSem_model->getSchool_Year();
         $currentSemester = $this->schoolYearSem_model->getCurSemester();
         $currentSchool_Year = $this->schoolYearSem_model->getCurSchool_Year();
         $this->template->setPageName('Bulletin Page');
         $this->template->set_username(Session::get_user());
         $this->template->set_surname(Session::get_Surname());
         $this->template->set_firstname(Session::get_Firstname());
         $this->template->set_middlename(Session::get_Middlename());
         $this->template->set_account_type(Session::get_Account_type() . " in Charge -");
         $this->template->set_photo(Session::get_photo());
         $this->template->setContent('UploadSignaturePage.tpl');
         $this->template->setCalendar('Calendar.tpl');
         $this->template->setSchool_YearSemContent('SchoolYear_Sem.tpl');
         $this->template->assign('assign_sign', ", " . Session::get_AssignSignatory());
         $this->template->assign('mySchool_Year', $listOfSchoolYear);
         $this->template->assign('currentSemester', $currentSemester);
         $this->template->assign('currentSchool_Year', $currentSchool_Year);
         $this->signatoryID = $this->user_model->getAssignSignatory_SigIDOnly(Session::get_user());
         $sigIm = $this->signatory_model->getSignature($this->signatoryID);
         if (is_null($sigIm)) {
             $this->template->assign('signatureImage', HOST . "/photos/default_signature.jpg");
             $this->template->assign('hasImageSet', '0');
         } else {
             $this->template->assign('signatureImage', $sigIm);
             $this->template->assign('hasImageSet', '1');
         }
     } else {
         header('Location: /SOCS/');
     }
 }
コード例 #8
0
 public function __construct()
 {
     parent::__construct();
     if (Session::user_exist() && Session::get_Account_type() == "Signatory") {
         $this->template = new Template();
         $this->user_model = new User_Model();
         $this->schoolYearSem_model = new SchoolYearSem_Model();
         $this->signatorialList_model = new SignatorialList_Model();
         $this->bulletin_model = new Bulletin_Model();
         $listOfSchoolYear = $this->schoolYearSem_model->getSchool_Year();
         $currentSemester = $this->schoolYearSem_model->getCurSemester();
         $currentSchool_Year = $this->schoolYearSem_model->getCurSchool_Year();
         $this->template->setPageName('Bulletin Page');
         $this->template->set_username(Session::get_user());
         $this->template->set_surname(Session::get_Surname());
         $this->template->set_firstname(Session::get_Firstname());
         $this->template->set_middlename(Session::get_Middlename());
         $this->template->set_account_type(Session::get_Account_type() . " in Charge -");
         $this->template->set_photo(Session::get_photo());
         $this->template->setContent('BulletinPage.tpl');
         $this->template->setCalendar('Calendar.tpl');
         $this->template->setSchool_YearSemContent('SchoolYear_Sem.tpl');
         $this->template->assign('assign_sign', ", " . Session::get_AssignSignatory());
         $this->template->assign('mySchool_Year', $listOfSchoolYear);
         $this->template->assign('currentSemester', $currentSemester);
         $this->template->assign('currentSchool_Year', $currentSchool_Year);
         $this->displayTable('', 1, "default");
         if (isset($_GET['successAdd'])) {
             if ($_GET['successAdd'] == 'true') {
                 $this->template->setAlert("An announcement has been posted in the bulletin.", Template::ALERT_SUCCESS, 'alert');
             }
         }
     } else {
         header('Location: /SOCS/');
     }
 }
 public function __construct()
 {
     parent::__construct();
     if (Session::user_exist() && Session::get_Account_type() == "Admin") {
         $this->user_model = new User_Model();
         $this->template = new Template();
         $this->template->setPageName('User Accounts Page');
         $this->template->set_username(Session::get_user());
         $this->template->set_surname(Session::get_Surname());
         $this->template->set_firstname(Session::get_Firstname());
         $this->template->set_middlename(Session::get_Middlename());
         $this->template->set_account_type(Session::get_Account_type());
         $this->template->set_photo(Session::get_photo());
         $this->template->setContent('unconfirmed_signatory.tpl');
         $this->template->assign('assign_sign', '');
         $this->displayTable('', 1, "default");
         $filename = "../Excel_File/student_current_enroll.xls";
         if (file_exists($filename)) {
             $this->template->assign('excel_file', 'true');
         }
     } else {
         header('Location: ' . HOST);
     }
 }
コード例 #10
0
<?php

require_once '../config/config.php';
//require_once( '../libs/fpdf/fpdf.php' );
// Initialize session
Session::init();
// Determine if a session doesn't exists and if the current user is not a student
if (!(Session::user_exist() && Session::get_Account_type() == "Student")) {
    // if it is, force the browser to redirect to the home page
    header('Location: /SOCS/index.php');
}
$sy_model = new SchoolYearSem_Model();
$signatory_model = new Signatory_Model();
$current_sy = $sy_model->getCurSchool_Year();
$current_sem = $sy_model->getCurSemester();
if ($current_sem != "Summer") {
    $current_sem .= " Semester";
}
$current_sysemID = $_GET["sy_sem_id"];
$stud_status = $_GET['status'] == "Grad" ? "Graduate" : "Under Graduate";
$student_model = new Student_Model();
$stud_id = Session::get_user();
$student_model->queryStudent_Info($stud_id);
$stud_name = $student_model->getStud_Name();
$stud_gender = $student_model->getStud_Gender();
$stud_year = $student_model->getStud_Yearlevel();
$stud_course = $student_model->getStud_Course();
$stud_dept = $student_model->getStud_DeptName();
$stud_deptID = $student_model->getStud_DeptID();
$signatorial_model = new SignatorialList_Model();
$signatorial_model->getListofSignatoryByDept($stud_deptID, $stud_status);
コード例 #11
0
 public function update()
 {
     if (Session::get_Account_type() == "Signatory") {
         $sql = "UPDATE users SET Picture='" . $this->Picture . "', Surname='" . $this->Surname . "', First_Name='" . $this->First_Name . "', Middle_Name='" . $this->Middle_Name . "', email_address='" . $this->email_add . "', Password='******',Assigned_Signatory = '{$this->Assigned_Signatory}' Where Username='******'";
     } else {
         $sql = "UPDATE users SET Picture='" . $this->Picture . "', Surname='" . $this->Surname . "', First_Name='" . $this->First_Name . "', Middle_Name='" . $this->Middle_Name . "', email_address='" . $this->email_add . "', Password='******' Where Username='******'";
     }
     if (mysql_query($sql)) {
         Session::set_password($this->Password);
         Session::set_firstname($this->First_Name);
         Session::set_middlename($this->Middle_Name);
         Session::set_surname($this->Surname);
         Session::set_photo($this->Picture);
         Session::set_emailAdd($this->email_add);
         return true;
     } else {
         return false;
     }
 }
コード例 #12
0
 public function display()
 {
     if (Session::user_exist()) {
         if (Session::get_Account_type() == 'Admin') {
             header('Location: ' . HOST . '/administrator/');
         } elseif (Session::get_Account_type() == 'Signatory') {
             header('Location: ' . HOST . '/signatory/');
         } elseif (Session::get_Account_type() == 'Student') {
             header('Location: ' . HOST . '/student/');
         }
     } else {
         $this->template->display('bootstrap.tpl');
     }
     $this->administrator_model->db_close();
 }
コード例 #13
0
 public function __construct()
 {
     parent::__construct();
     if (Session::user_exist() && Session::get_Account_type() == "Student") {
         $this->template = new Template();
         $this->schoolYearSem_model = new SchoolYearSem_Model();
         $this->student_model = new Student_Model();
         $this->signatoialList = new SignatorialList_Model();
         $this->signatory_model = new Signatory_Model();
         $this->bulletin_model = new Bulletin_Model();
         $this->clearanceStatus_model = new ClearanceStatus();
         $this->department_model = new Department_Model();
         $this->courses_model = new Course_Model();
         $this->student_model->queryStudent_Info(Session::get_user());
         $stud_sy_sem = $this->student_model->get_last_attended_sy_sem();
         $currentSchool_Year = $this->schoolYearSem_model->getSchool_Year_by_id($stud_sy_sem);
         $currentSemester = $this->schoolYearSem_model->getSem_by_id($stud_sy_sem);
         $listOfSchoolYear = $this->schoolYearSem_model->getSchool_Year();
         //            $currentSemester = $this->schoolYearSem_model->getCurSemester();
         //            $currentSchool_Year = $this->schoolYearSem_model->getCurSchool_Year();
         $currentSemester2 = $this->schoolYearSem_model->getCurSemester();
         $currentSchool_Year2 = $this->schoolYearSem_model->getCurSchool_Year();
         $this->template->assign('most_current_sem', $currentSemester2);
         $this->template->assign('most_current_sy', $currentSchool_Year2);
         $sy_attended = $this->schoolYearSem_model->getSchool_Year_by_id($stud_sy_sem);
         $sem_attended = $this->schoolYearSem_model->getSem_by_id($stud_sy_sem);
         //
         $this->template->assign('sy_attended', $sy_attended);
         $this->template->assign('sem_attended', $sem_attended);
         $sy_id2 = $this->schoolYearSem_model->getSy_ID($currentSchool_Year2, $currentSemester2);
         Session::setSY_SEM_ID($sy_id2);
         Session::setSchoolYear($currentSchool_Year);
         Session::setSemester($currentSemester);
         if (isset($_POST['GO'])) {
             $arr_sem = array("First", "Second", "Summer");
             if (array_search($_POST['semester'], $arr_sem) <= array_search($sem_attended, $arr_sem)) {
                 $sy_id = $this->schoolYearSem_model->getSy_ID(trim($_POST['school_year']), trim($_POST['semester']));
                 $this->template->assign('currentSemester', trim($_POST['semester']));
             } else {
                 $sy_id = $this->schoolYearSem_model->getSy_ID(trim($_POST['school_year']), $sem_attended);
                 $this->template->assign('currentSemester', $sem_attended);
             }
             $this->template->assign('currentSchool_Year', trim($_POST['school_year']));
         } else {
             $sy_id = $this->schoolYearSem_model->getSy_ID($currentSchool_Year, $currentSemester);
             $this->template->assign('currentSemester', $currentSemester);
             $this->template->assign('currentSchool_Year', $currentSchool_Year);
         }
         //            $this->student_model->queryStudent_Info(Session::get_user());
         $stud_course = $this->student_model->getStud_Course();
         $stud_deptName = $this->student_model->getStud_DeptName();
         $stud_deptID = $this->student_model->getStud_DeptID();
         $stud_status = $this->student_model->getStud_Status();
         //            $stud_sy_sem = $this->student_model->get_last_attended_sy_sem();
         $this->signatoialList->getListofSignatoryByDept($stud_deptID, $stud_status);
         $listOfSign_underDeptName = $this->signatoialList->getSign_Name();
         $listOfSignID_underDeptName = $this->signatoialList->getSign_ID();
         $listOfClearanceStatus = $this->getListofClearanceStatus($listOfSignID_underDeptName, $sy_id, Session::get_user());
         $this->template->setPageName('Student Clearance Page');
         $this->template->setContent('StudentDashboard.tpl');
         $this->template->setSchool_YearSemContent('SchoolYear_Sem.tpl');
         $this->template->set_username(Session::get_user());
         $this->template->set_surname(Session::get_Surname());
         $this->template->set_firstname(Session::get_Firstname());
         $this->template->set_middlename(Session::get_Middlename());
         $this->template->set_account_type($stud_course);
         $this->template->assign('mySchool_Year', $listOfSchoolYear);
         $this->template->assign('assign_sign', ", " . $stud_deptName);
         $this->template->assign('myListOfSign_underDeptName', $listOfSign_underDeptName);
         $this->template->assign('myKey_signID', $listOfSignID_underDeptName);
         $this->template->assign('myStudent_ClearanceStatus', $listOfClearanceStatus);
         $this->template->assign('sy_sem_id', $sy_id);
         $stud_status = $stud_status == "Graduate" ? "Grad" : "U_Grad";
         $this->template->assign('status', $stud_status);
         $this->template->set_photo(Session::get_photo());
         if (isset($_GET['editSuccess'])) {
             $this->template->setAlert("Account has successfully updated!!... ", Template::ALERT_SUCCESS);
         }
     } else {
         header('Location: /SOCS/index.php');
     }
 }
コード例 #14
0
 public function verify()
 {
     $oldpass = trim($_POST['oldpass']);
     $newpass = trim($_POST['newpass']);
     $confirmpass = trim($_POST['confirmpass']);
     $actualPass = Session::getUserPass();
     $surname = $_POST['surname'];
     $firstname = $_POST['firstname'];
     $middleName = $_POST['middleName'];
     $email_add = $_POST['emailAdd'];
     $imagefile = $_FILES["photo"];
     //$this->admin->Signatory_Usability = $_POST['sign_usability'];
     $this->admin->Assigned_Signatory = $this->signatoriallist_model->getSignId(trim($_POST['sign_name']));
     if ($newpass == "") {
         $newpass = md5($oldpass);
         $confirmpass = md5($oldpass);
     } else {
         $newpass = md5($newpass);
         $confirmpass = md5($confirmpass);
     }
     $test = 0;
     //Check if fields are empty in firstname surname and middlename
     if ($surname != "" && $firstname != "" && $middleName != "" && $email_add != "") {
         $this->admin->Surname = $surname;
         $this->admin->First_Name = $firstname;
         $this->admin->Middle_Name = $middleName;
         $this->admin->email_add = $email_add;
         $test++;
     } else {
         $this->template->setAlert('Surname, first name, middle name and email address are required!', Template::ALERT_ERROR, 'alert');
         return;
     }
     //checks the surname if valid
     if (Validator::is_valid_name($surname) && $test == 1) {
         $test++;
     } else {
         $this->template->setAlert('Surname must not have a numerical values and characters / \\ ? < > : ; " and *', Template::ALERT_ERROR, 'alert');
         return;
     }
     //checks the firstname if valid
     if (Validator::is_valid_name($firstname) && $test == 2) {
         $test++;
     } else {
         $this->template->setAlert('Surname must not have a numerical values and characters / \\ ? < > : ; " and *', Template::ALERT_ERROR, 'alert');
         return;
     }
     //checks the middlename if valid
     if (Validator::is_valid_name($middleName) && $test == 3) {
         $test++;
     } else {
         $this->template->setAlert('Surname must not have a numerical values and characters / \\ ? < > : ; " and *', Template::ALERT_ERROR, 'alert');
         return;
     }
     //checks the email if valid
     if (Validator::is_email_valid($email_add) && $test == 4) {
         $test++;
     } else {
         $this->template->setAlert('Not valid Email', Template::ALERT_ERROR, 'alert');
         return;
     }
     //var_dump(Session::getUserPass());
     //    var_dump($newpass);
     // check if actual pass and old pass are equal
     if ($actualPass == md5($oldpass) && $test == 5) {
         $test++;
     } else {
         $this->template->setAlert('Incorrect Password!', Template::ALERT_ERROR, 'alert');
         return;
     }
     //check if new pass and confirm pass are equal
     if ($newpass == $confirmpass && $test == 6) {
         $test++;
     } else {
         $this->template->setAlert('Passwords does not matched!', Template::ALERT_ERROR, 'alert');
         return;
     }
     //check if password is valid
     if (Validator::is_valid_password($newpass) && $test == 7) {
         $this->admin->Password = $newpass;
         $test++;
     } else {
         $this->template->setAlert('Password\'s length must have a minimum of 7 characters!', Template::ALERT_ERROR, 'alert');
         return;
     }
     //check if photo is valid
     if ($imagefile['name'] != "") {
         if (Validator::is_valid_photo($imagefile)) {
             //                $ext = explode(".", $imagefile["name"]);
             $actor = "";
             if (Session::get_Account_type() == "Admin") {
                 $actor = "administrator";
             } else {
                 if (Session::get_Account_type() == "Signatory") {
                     $actor = "signatory";
                 } else {
                     if (Session::get_Account_type() == "Student") {
                         $actor = "student";
                     }
                 }
             }
             //                $this->admin->Picture = HOST . "/photos/$actor/" . Session::get_user() . "." . end($ext);
             //                $this->local_dir = PATH . "photos/$actor/" . Session::get_user() . "." . end($ext);
             $this->admin->Picture = HOST . "/photos/{$actor}/" . Session::get_user() . "." . "jpg";
             $this->local_dir = PATH . "photos/{$actor}/";
         } else {
             $this->template->setAlert('Invalid Photo!', Template::ALERT_ERROR, 'alert');
             return;
         }
     } else {
         $this->admin->Picture = Session::get_photo();
     }
     //var_dump($actualPass);
     //var_dump($this->admin->email_add);
     if ($this->admin->update() && $test == 8) {
         $this->template->set_surname($surname);
         $this->template->set_firstname($firstname);
         $this->template->set_middlename($middleName);
         $this->template->assign('email_add', $email_add);
         $this->template->set_photo($this->admin->Picture);
         $this->template->assign('current_assignSign', trim($_POST['sign_name']));
         $this->template->assign('sign_status', $this->admin->Signatory_Usability);
         if (Session::get_Account_type() == "Signatory") {
             Session::set_signatory_usability($_POST['sign_usability']);
             Session::set_assignSignatory(trim($_POST['sign_name']));
         }
         if (isset($this->admin->Picture)) {
             $image_upload = new upload($imagefile);
             if ($image_upload->uploaded) {
                 $image_upload->image_resize = "true";
                 $image_upload->image_y = 256;
                 $image_upload->image_ratio_x = "true";
                 $image_upload->image_convert = "jpg";
                 $image_upload->file_overwrite = true;
                 $image_upload->file_new_name_body = Session::get_user();
                 $image_upload->process($this->local_dir);
                 if ($image_upload->processed) {
                     $this->template->setAlert('Account has been updated!', Template::ALERT_SUCCESS);
                 } else {
                     $this->template->setAlert('Account has been updated! But there\'s problem in uploading a photo.' . $image_upload->error, Template::ALERT_INFO);
                 }
             } else {
                 $this->template->setAlert('Account has been updated! But there\'s problem in uploading a photo.', Template::ALERT_INFO);
             }
             //                if (move_uploaded_file($imagefile["tmp_name"], $this->local_dir)) {
             //                    $this->template->setAlert('Account has been updated!', Template::ALERT_SUCCESS);
             //                }else{
             //                    $this->template->setAlert('Account has been updated! But there\'s problem in uploading a photo.', Template::ALERT_INFO);
             //                }
         } else {
             $this->template->setAlert('Account has been updated!', Template::ALERT_SUCCESS);
         }
     } else {
         $this->template->setAlert('Database Error!', Template::ALERT_ERROR);
     }
 }