本文整理汇总了PHP中Jobs::saveField方法的典型用法代码示例。如果您正苦于以下问题:PHP Jobs::saveField方法的具体用法?PHP Jobs::saveField怎么用?PHP Jobs::saveField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Jobs
的用法示例。
在下文中一共展示了Jobs::saveField方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setvar
$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'])) {
if (!empty($_POST['id'])) {
if ($_POST['pb_action'] == "none" || array_key_exists($_POST['pb_action'], $job_status)) {
$result = $job->saveField("status", intval($_POST['pb_action']), $_POST['id']);
} elseif ($_POST['pb_action'] == "del") {
$result = $job->del($_POST['id']);
}
}
}
if (isset($_POST['del'])) {
if (!empty($_POST['id'])) {
$job->del($_POST['id']);
}
}
$fields = "Job.id,Job.name as jobname,Job.created,Job.status as jobstatus, c.name as companyname,m.username";
$sql = "SELECT count(id) AS Amount FROM {$tb_prefix}jobs";
$amount = $pdb->GetOne($sql);
$joins = "LEFT JOIN {$tb_prefix}companies c ON Job.company_id=c.id LEFT JOIN {$tb_prefix}members m ON Job.member_id=m.id";
$page->setPagenav($amount);