1、企业会员发布职位添加字段“ 驾照要求”,在表“phpyun_company_job”添加字段“driverLicense ” int(5);
2、在“/data/plus/dbstruct.cache.php”,在$phpyun_company_job数组中添加字段: 'driverLicense'=>'int(5)'
$phpyun_company_job=array('id'=>'int(11)','uid'=>'int(11)','name'=>'varchar(50)','com_name'=>'varchar(50)','hy'=>'int(5)','job1'=>'int(5)','job1_son'=>'int(5)','job_post'=>'int(5)','provinceid'=>'int(5)','cityid'=>'int(5)','three_cityid'=>'int(5)','cert'=>'varchar(50)','type'=>'int(5)','number'=>'int(2)','exp'=>'int(5)','report'=>'int(5)','sex'=>'int(5)','edu'=>'int(5)','marriage'=>'int(5)','description'=>'text','xuanshang'=>'int(11)','xsdate'=>'int(11)','sdate'=>'int(11)','edate'=>'int(11)','jobhits'=>'int(10)','lastupdate'=>'varchar(10)','rec'=>'int(2)','cloudtype'=>'int(2)','state'=>'int(2)','statusbody'=>'varchar(200)','age'=>'int(11)','lang'=>'text','welfare'=>'text','pr'=>'int(5)','mun'=>'int(5)','com_provinceid'=>'int(5)','rating'=>'int(5)','status'=>'int(1)','urgent'=>'int(1)','r_status'=>'int(1)','end_email'=>'int(1)','urgent_time'=>'int(11)','com_logo'=>'varchar(100)','autotype'=>'int(11)','autotime'=>'int(11)','is_link'=>'int(1)','link_type'=>'int(1)','source'=>'int(1)','rec_time'=>'int(11)','snum'=>'int(11)','operatime'=>'int(11)','did'=>'int(11)','is_email'=>'int(1)','minsalary'=>'int(11)','maxsalary'=>'int(11)','sharepack'=>'int(11)','rewardpack'=>'int(11)','is_graduate'=>'int(11)','x'=>'varchar(50)','y'=>'varchar(50)','zuid'=>'int(11)','driverLicense'=>'int(5)')
下面是后台添加模板
然后在/app/template/admin/admin_company_job_show.htm 添加对应字段即可
还有会员部分添加需要修改下面模板
路径/app/template/member/com/jobadd.htm
<li>
<div class="com_release_name">驾照要求:</div>
<div class="com_release_cont">
<div class="layui-input-inline" style="width:500px;">
<select name="driverLicense" lay-filter="driverLicense">
<option value="">请选择</option>
{yun:}foreach from=$comdata.job_driverLicense key=j item=v{/yun}
<option value="{yun:}$v{/yun}" {yun:}if $row.driverLicense == $v{/yun} selected{yun:}/if{/yun}>{yun:}if $j == 0{/yun}{yun:}/if{/yun}{yun:}$comclass_name[$v]{/yun}</option>
{yun:}/foreach{/yun}
</select>
</div>
</div>
</li>
表单处理函数save_action(),在文件中,“/member/commodel/jobadd.class.php”中,获取表单值
$post = array(
'name' => $_POST['name'],'job1' => intval($_POST['job1']),
'job1_son' => intval($_POST['job1_son']),'job_post' => intval($_POST['job_post']),'provinceid' => intval($_POST['provinceid']),'cityid' => intval($_POST['cityid']),'three_cityid' => intval($_POST['three_cityid']),'minsalary' => intval($_POST['salary_type']) == 1 ? 0 : intval($_POST['minsalary']),'maxsalary' => intval($_POST['salary_type']) == 1 ? 0 : intval($_POST['maxsalary']),'description' => $description,'is_link' => $_POST['islink'],'is_email' => $_POST['isemail'],'r_status' => $rstaus,'hy' => intval($_POST['hy']),'number' => intval($_POST['number']),'exp' => intval($_POST['exp']),'report' => intval($_POST['report']),'age' => intval($_POST['age']),'sex' => intval($_POST['sex']),'edu' => intval($_POST['edu']),'is_graduate' => intval($_POST['is_graduate']),'marriage' => intval($_POST['marriage']),'welfare' => @implode(',', $_POST['welfare']),'lang' => trim(pylode(',', $_POST['lang'])),'lastupdate' => time(),'zuid' => $this->spid,//获取表单字段值//'driverLicense' => 180,'driverLicense' => intval($_POST['driverLicense']),);