function importCustomFleetday() { $conf = $_POST["conf"]; $fleetdayobj = new fleetDayHandler(); $fleetscore = $fleetdayobj->pullFleetDay($conf["dayselect"]); $fleetdayobj->saveFleetDay($fleetscore); print "DONE."; goHere("index.php?mode=maxine/index&action=selectcustomfleetday"); }
function commitStatusTypes() { $conf = $_POST["conf"]; foreach ($conf as $confkey => $confval) { if ($confval["id"]) { updateStatusType($confval); } else { createStatusType($confval); } } goHere("index.php?mode=maxine/index&action=statustypelist"); }
function commitM3Depts() { if ($_POST["conf"]) { $conf = $_POST["conf"]; } foreach ($conf["depts"] as $deptkey => $deptval) { if ($deptval["display"] == "on") { $deptval["display"] = 1; } else { $deptval["display"] = 0; } if ($deptval["id"]) { updateM3Dept($deptval); } else { createM3Dept($deptval); } } goHere("index.php?mode=maxine/index&action=m3sys"); }
function deleteLearner() { $learners = new Learners(); $learners->delete($_GET["learnerid"]); goHere("index.php?mode=maxine/index&action=learnerlist"); }
function updatePageRights() { $conf = $_POST["conf"]; sqlDelete(array("table" => "rights_pages", "where" => "pagecode LIKE '" . $conf["pagecode"] . "'")); foreach ($conf["groups"] as $grpkey => $grpval) { if (!$grpval["access"]) { $grpval["access"] = 0; } commitPageRights($conf["pagecode"], $grpval); } goHere("index.php?mode=maxine/index&action=pagerights&code=" . $conf["pagecode"]); }
/** convertToDriver() * @todo Email functionality to email hr group members | hr@manlinegroup.com */ function convertToDriver() { //: Preparation $id = isset($_POST['conf']['id']) ? $_POST['conf']['id'] : null; $type = isset($_POST['conf']['type']) ? $_POST['conf']['type'] : 'candidates'; if (!$id) { throw new man_exception('Insufficient parameters for drivers::convert'); } # set up the class variables $class = ucwords(strtolower($type)); $drivers = new Drivers(); $convert = new $class(); $convertme = $convert->getRow(array('where' => strtolower(substr($class, 0, 1)) . '.id=' . $id)); $data = (array) array(); foreach ($drivers->getCols() as $key => $val) { if ($val == 'id') { continue; } if (in_array($val, array_keys($convertme))) { $data[$val] = $convertme[$val]; } } $driverid = $drivers->create($data); //: Logging $data = (array) array(); $data['driverid'] = $driverid; $data['convertedby'] = $_SESSION['userid']; $data['convertdate'] = time(); $convert->update('id=' . $id, $data); goHere("index.php?mode=maxine/index&action=driverslist"); }