コード例 #1
0
ファイル: index.php プロジェクト: jmphelps/Acme_Careers
     include './view_job.php';
 } else {
     if ($action == 'update_job') {
         // Get job data
         // TO DO
         $job_category = $_POST['catID'];
         $job_title = $_POST['jobTitle'];
         $job_type = $_POST['jobType'];
         $job_city = $_POST['city'];
         $job_state = $_POST['state'];
         $job_summary = $_POST['summary'];
         $job_description = $_POST['description'];
         //
         if (isset($_POST['jobID'])) {
             $job_id = $_POST['jobID'];
             $query = update_job($job_category, $job_title, $job_type, $job_city, $job_state, $job_summary, $job_description, $job_id);
             $message = "Item has been updated.";
         } else {
             add_job($job_category, $job_title, $job_type, $job_city, $job_state, $job_summary, $job_description);
             $job_id = $db->lastInsertId();
             $message = "The new item has been added.";
         }
         include './view_job.php';
     } else {
         if ($action == 'list_applicants') {
             $applicants = get_applicants();
             include './list_applicants.php';
         } else {
             if ($action == 'view_resume') {
                 $resume_id = $_GET['resume_id'];
                 $resume = get_resume_by_id($resume_id);
コード例 #2
0
ファイル: controllers.php プロジェクト: xmar/laclef-webapp
function list_jobs_action($uid)
{
    // needed to set the tab active
    $extras_active = true;
    $jobs_active = true;
    if (user_is_admin($uid)) {
        if (isset($_POST['price'])) {
            $job_added = get_job_by_id($_POST['id']);
            // job exists
            if ($job_added) {
                update_job($_POST['id'], $_POST['delivery'], $_POST['price']);
            } else {
                add_job($_POST['uid'], $_POST['timestamp'], $_POST['file'], $_POST['duration'], $_POST['filament'], $_POST['delivery'], $_POST['price']);
            }
        }
        // get all the uids
        $uids = get_all_uids();
        // get all the printig jobs
        $jobs = get_all_jobs();
        require 'templates/jobs.php';
    } else {
        require 'templates/login.php';
    }
}
コード例 #3
0
<?php

include_once '../functions/database.php';
$data = $_POST['data'];
foreach ($data as $d) {
    if (update_job($d)) {
        echo true;
    } else {
        false;
    }
}
コード例 #4
0
<?php

include_once '../functions/database.php';
$array = $_POST['data'];
//    print_r($_POST);
$result = update_job($array);
echo $result;