コード例 #1
0
ファイル: job.php プロジェクト: reboxhost/phpb2b
$page = new Pages();
$member = new Members();
$company = new Companies();
$typeoption = new Typeoption();
$conditions = null;
$table = array();
$job_status = explode(",", L('product_status', 'tpl'));
setvar("CheckStatus", $job_status);
$tpl_file = "job";
if (isset($_GET['do'])) {
    $do = trim($_GET['do']);
    if (!empty($_GET['id'])) {
        $id = intval($_GET['id']);
    }
    if ($do == "del" && !empty($id)) {
        $job->del($_GET['id']);
    }
    if ($do == "view" && !empty($id)) {
        $tpl_file = "job.view";
        $sql = "SELECT j.name,j.work_station,j.content,j.require_gender_id,j.peoples,j.require_education_id,j.require_age,j.salary_id,j.worktype_id,j.clicked,j.created,j.expire_time,c.name as cache_companyname,m.username as cache_username from {$tb_prefix}jobs as j LEFT JOIN {$tb_prefix}companies c ON j.company_id=c.id LEFT JOIN {$tb_prefix}members m ON j.member_id=m.id where j.id=" . $id;
        $result = $pdb->GetRow($sql);
        setvar("item", $result);
        setvar("Genders", $typeoption->get_cache_type("gender"));
        setvar("Educations", $typeoption->get_cache_type('education'));
        setvar("Worktypes", $typeoption->get_cache_type('work_type'));
        setvar("SalaryLevels", $typeoption->get_cache_type('salary'));
        template($tpl_file);
        exit;
    }
}
if (isset($_POST['pb_action'])) {
コード例 #2
0
ファイル: job.php プロジェクト: renduples/alibtob
check_permission("job");
$job = new Jobs();
$area = new Areas();
$industry = new Industries();
$typeoption = new Typeoption();
$tpl_file = "job";
if (!$company->Validate($companyinfo)) {
    flash("pls_complete_company_info", "company.php", 0);
}
if (isset($_GET['do'])) {
    $do = trim($_GET['do']);
    if (isset($_GET['id'])) {
        $id = intval($_GET['id']);
    }
    if ($do == "del" && !empty($id)) {
        $job->del($id, "member_id=" . $the_memberid);
    }
    if ($do == "edit") {
        setvar("Genders", $typeoption->get_cache_type('gender'));
        setvar("Educations", $typeoption->get_cache_type('education'));
        setvar("Salary", $typeoption->get_cache_type('salary'));
        setvar("Worktype", $typeoption->get_cache_type('work_type'));
        if (!empty($id)) {
            $res = $job->read("*", $id, null, "Job.member_id=" . $the_memberid);
            if (empty($res)) {
                flash("action_failed");
            }
            $res['expire_date'] = df($res['expire_time']);
            $r1 = $industry->disSubOptions($res['industry_id'], "industry_");
            $r2 = $area->disSubOptions($res['area_id'], "area_");
            $res = am($res, $r1, $r2);
コード例 #3
0
ファイル: job.php プロジェクト: vuong93st/w-game
require LIB_PATH . 'time.class.php';
uses("job", "typeoption");
check_permission("job");
$job = new Jobs();
$typeoption = new Typeoption();
$tpl_file = "job";
if (empty($companyinfo)) {
    flash("pls_complete_company_info", "company.php", 0);
}
if (isset($_GET['do'])) {
    $do = trim($_GET['do']);
    if (isset($_GET['id'])) {
        $id = intval($_GET['id']);
    }
    if ($do == "del" && !empty($id)) {
        $job->del($id, "member_id=" . $_SESSION['MemberID']);
    }
    if ($do == "edit") {
        setvar("Genders", $typeoption->get_cache_type('gender'));
        setvar("Educations", $typeoption->get_cache_type('education'));
        setvar("Salary", $typeoption->get_cache_type('salary'));
        setvar("Worktype", $typeoption->get_cache_type('work_type'));
        if (!empty($id)) {
            $res = $job->read("*", $id, null, "Job.member_id=" . $_SESSION['MemberID']);
            if (empty($res)) {
                flash("action_failed");
            }
            $res['expire_date'] = date("Y-m-d", $res['expire_time']);
            setvar("item", $res);
        }
        $tpl_file = "job_edit";