<?php require_once "_inc/header.php"; $hr_db = new hr(); ?> <!-- start: BREADCRUMB --> <div class="row"> <div class="col-md-12"> <ol class="breadcrumb"> <li> <a href="#"> Dashboard </a> </li> <li class="active"> Create Task </li> </ol> </div> </div> <!-- end: BREADCRUMB --> <!-- start: PAGE CONTENT --> <div class="row"> <div class="col-md-12"> <!-- start: FORM VALIDATION 2 PANEL --> <div class="panel panel-white"> <div class="panel-heading"> <h4 class="panel-title">Create <span class="text-bold">Task</span></h4> <div class="panel-tools"> <div class="dropdown"> <a data-toggle="dropdown" class="btn btn-xs dropdown-toggle btn-transparent-grey">
function __construct() { parent::__construct(); $this->load->model('users_model'); }
function __construct() { parent::__construct(); }
<?php session_start(); require_once "classes/tasksConnection.php"; require_once "classes/hrConnection.php"; require_once "_inc/mFunctions.php"; $hr_db = new hr(); $db = new db(); if (!empty($_REQUEST['action']) && $_REQUEST['action'] == "getEmployees") { $jobId = $_REQUEST['jobId']; $data = ''; //get employees under this job $q = "SELECT users.emp_id, users.name FROM `users` \n\t\t JOIN `employees` on employees.emp_id = users.emp_id\n\t\t WHERE employees.job_id = :jobId ORDER BY emp_id"; $sq = $hr_db->query($q); $hr_db->bind(":jobId", $jobId); $sq = $hr_db->execute(); $getEmployees = $hr_db->fetchAll(); if (!empty($getEmployees)) { $data .= "<option value=''>Select...</option>"; foreach ($getEmployees as $Employees) { $data .= "<option value='" . $Employees['emp_id'] . "'>" . $Employees['name'] . "</option>"; } } echo $data; } if (!empty($_REQUEST['action']) && $_REQUEST['action'] == "addTask") { $creatorId = $_REQUEST['creatorId']; $assigneeId = $_REQUEST['assigneeId']; $locId = $_REQUEST['locId']; $date = $_REQUEST['date']; $repeat = $_REQUEST['repeat'];