Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
load->view('includes/header');
$this->load->view('pages/home');
$this->load->view('includes/footer');
}
function registerCompany() {
if (isset($_FILES["file"])) {
//if there was an error uploading the file
if ($_FILES["file"]["error"] > 0) {
echo "Return Code: " . $_FILES["file"]["error"] . "
";
} else {
$filename = basename($_FILES['file']['name']);
$new = time() . rand();
$ext = pathinfo($filename, PATHINFO_EXTENSION);
$target = $new . '_' . $filename;
$target = str_replace(" ", "_", $target);
$storagename = "./assets/files/logo/" . $target;
move_uploaded_file($_FILES["file"]["tmp_name"], $storagename);
function formatBytes($bytes, $precision) {
$units = array('B', 'KB', 'MB', 'GB', 'TB');
$bytes = max($bytes, 0);
$pow = floor(($bytes ? log($bytes) : 0) / log(1024));
$pow = min($pow, count($units) - 1);
// Uncomment one of the following alternatives
$bytes /= pow(1024, $pow);
// $bytes /= (1 << (10 * $pow));
return round($bytes, $precision) . ' ' . $units[$pow];
}
$data_ary = array(
'name' => $this->input->post('name'),
'email' => $this->input->post('email'),
'registered_by' => $this->session->userdata('id'),
'date' => date("Y-m-d"),
'logo' => $target
);
$data_ary = $this->security->xss_clean($data_ary);
$this->load->database();
$this->db->insert('tbl_company', $data_ary);
redirect('hrm/registerCompany?ok');
}
} else {
echo 'not sent';
}
}
public function add_category() {
$company_id=$this->session->userdata('id');
$data_ary = array(
'company_id' => $company_id,
'main_category' => $this->input->post('main_category'),
'company_category' => $this->input->post('company_category'),
'fee' => $this->input->post('fee'),
'price_desc' => $this->input->post('price_desc'),
'category_desc' => $this->input->post('category_desc')
);
//clean posted data
$data_ary = $this->security->xss_clean($data_ary);
$this->db->insert('company_categories', $data_ary);
redirect('bima/category?yes');
}
public function registerDepartment() {
$data_ary = array(
'code' => $this->input->post('code'),
'name' => $this->input->post('name'),
'registered_by' => $this->session->userdata('id'),
'date' => date("Y-m-d")
);
//clean posted data
$data_ary = $this->security->xss_clean($data_ary);
$this->db->insert('tbl_department', $data_ary);
}
public function theme() {
$data_ary = array(
'date' => time()
);
//clean posted data
$data_ary = $this->security->xss_clean($data_ary);
$this->db->where('id', $this->input->post('theme'));
$this->db->update('tbl_theme', $data_ary);
}
public function registerTitle() {
$data_ary = array(
'name' => $this->input->post('name'),
'desc' => $this->input->post('desc'),
'registered_by' => $this->session->userdata('id'),
'date' => date("Y-m-d")
);
//clean posted data
$data_ary = $this->security->xss_clean($data_ary);
$this->db->insert('tbl_title', $data_ary);
}
public function registerSalutation() {
$data_ary = array(
'name' => $this->input->post('name'),
'registered_by' => $this->session->userdata('id'),
'date' => date("Y-m-d")
);
//clean posted data
$data_ary = $this->security->xss_clean($data_ary);
$this->db->insert('tbl_salutation', $data_ary);
}
public function registerLeave() {
$data_ary = array(
'leaveName' => $this->input->post('name'),
'leaveDays' => $this->input->post('days'),
'leaveDesc' => $this->input->post('desc'),
'registered_by' => $this->session->userdata('id'),
'org_id' => $this->session->userdata('org_id'),
'date' => date("Y-m-d")
);
//clean posted data
$data_ary = $this->security->xss_clean($data_ary);
$this->db->insert('tbl_leave', $data_ary);
}
public function addEmployeeLeave() {
$date = $this->input->post('fromdate');
$this->db->where('id', $this->input->post('leaveType'));
$query = $this->db->get('tbl_leave');
foreach ($query->result() as $rows) {
$newdate = date('Y-m-d', strtotime($date . ' + ' . $rows->leaveDays . ' days'));
}
$data_ary = array(
'leave_id' => $this->input->post('leaveType'),
'fromdate' => $this->input->post('fromdate'),
'todate' => $newdate,
'notes' => $this->input->post('notes'),
'registered_by' => $this->session->userdata('id'),
'org_id' => $this->session->userdata('org_id'),
'date' => date("Y-m-d")
);
//clean posted data
$data_ary = $this->security->xss_clean($data_ary);
$this->db->insert('tbl_employee_leave', $data_ary);
}
public function testcodes() {
$data = array(
'username' => $this->input->post('name'),
'pass' => $this->input->post('pwd')
);
//insert goes here...
echo 'yes data';
//echo json_encode($data);
}
public function checkLeave() {
$id = $this->input->post('val');
$from = $this->input->post('fromdate');
$notes = $this->input->post('notes');
$this->db->where('id', $id);
$query = $this->db->get('tbl_leave');
foreach ($query->result() as $rows) {
$date = $from;
if ($date != '') {
$newdate = date('Y-m-d', strtotime($date . ' + ' . $rows->leaveDays . ' days'));
} else {
$newdate = '';
}
?>
leaveName . ''; ?>
leaveDays . ' days'; ?>
' . $newdate . ' '; ?>
' . $notes . ' '; ?>