0byt3m1n1
Path:
C:
/
wamp64
/
www
/
cpms_new
/
model
/
[
Home
]
File: employee_mdl.php
<?php require_once "../lib/config.php"; require_once BASE_DIR."/lib/db/connection.php"; require_once "defaultValues_mdl.php"; require_once BASE_DIR."/Proposels/imagePath.php"; class Employee { public function staffNameCheck($staffname) { try { $u_id = @$_SESSION['user_id']; $p_id = @$_SESSION['project_id']; $sql = "select `emp_name` from employe where user_id='$u_id' and emp_name='$staffname'"; // ... } catch (Exception $ex) { echo $ex->getMessage(); return null; } } public function addStaff($empName, $empAddress, $empPhone, $empMobile, $designation, $JD, $ED, $empEmail, $empSalary, $temp_fn) { try { $u_id = @$_SESSION['user_id']; $p_id = @$_SESSION['project_id']; $table_id = Common::getTableID("employe", "emp_id"); // ... } catch (Exception $ex) { echo $ex->getMessage(); return null; } } public function userNameCheck($username) { try { $con= new mysqli("localhost", "root", "", "cpms"); // ... } catch (Exception $ex) { echo $ex->getMessage(); return null; } finally { if ($con) { $con->close(); } } } public static function addUser($username, $password, $name, $designation, $salutation, $coinvestigator, $photo, $division) { try { $con = new mysqli("localhost", "root", "", "cpms"); // ... } catch (Exception $ex) { echo $ex->getMessage(); return null; } finally { if ($con) { $con->close(); } } } public function updateuser($edituserid, $editsalutation, $editname, $editusername, $editpasswd, $editemail, $editdesignation, $photo) { try { // ... } catch (Exception $ex) { echo $ex->getMessage(); return null; } } // More methods... } class SomeOtherClass { // Define methods for this class... } // Other classes and code... ?>