コード例 #1
0
            $apps[$i]['created_at'] = strftime(DATE_FORMAT, strtotime($job->created_at));
            $apps[$i]['job_url'] = "job/" . $job->var_name . "/";
        }
        $apps[$i]['date_apply'] = strftime(DATE_FORMAT, strtotime($app->date_apply));
        $apps[$i]['cover_letter'] = $app->cover_letter;
        $apps[$i]['cv_name'] = $app->cv_name;
        $apps[$i]['id'] = $app->id;
        $i++;
    }
    $smarty->assign('application', $apps);
} else {
    //$message = "<div class='error'>No application(s) found</div>";
}
if (isset($_GET['delete'])) {
    if (isset($_GET['delete']) && isset($_GET['job_id']) && $_GET['delete'] == true) {
        $jobhistory = new JobHistory();
        $jobhistory->fk_employee_id = $user_id;
        $jobhistory->fk_job_id = (int) $_GET['job_id'];
        $jobhistory->id = (int) $_GET['id'];
        if ($jobhistory->delete_job()) {
            $session->message("<div class='success'>" . format_lang('success', 'app_delete_success') . "</div>");
            redirect_to(BASE_URL . "applications/");
        } else {
            $message = "<div class='error'>" . format_lang('errormsg', 06) . "</div>";
        }
    }
}
$html_title = SITE_NAME . " - " . format_lang('page_title', 'my_app') . " " . strip_html($employee->full_name());
$smarty->assign('lang', $lang);
$smarty->assign('message', $message);
$smarty->assign('rendered_page', $smarty->fetch('application.tpl'));