No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

kop.htm 29KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. <style>
  2. .result-box{
  3. /*display: none !important;*/
  4. }
  5. </style>
  6. <?php
  7. $result_map = "";
  8. $show_class = [];
  9. $xl = ['不限制','中专','高技','大专','本科','硕士','博士'];
  10. //先列出全国 再其他省 再到市
  11. $sql = 'select * from ey_zcwd_position where type='.$detail['sbzy'].' and catid='.$detail['sbzyson'].' and sbdj='.$detail['sbdj'].' and is_del=0 and status=1'.$sql_end.' order by sf asc';
  12. $is_list_empty = '';
  13. //echo $sql;
  14. $list_data = [];
  15. //测试Db操作
  16. //$row_t = Db::table('ey_zcwd_position')->find();
  17. //var_dump($row_t);
  18. $str_no_err = [];
  19. ?>
  20. {eyou:sql sql="$sql" cachetime='3600' empty='' id="field"}
  21. <?php
  22. $is_list_empty = $field['id'];
  23. $list_data[] = $field;
  24. ?>
  25. {/eyou:sql}
  26. {eyou:if condition='(!empty($is_list_empty))'}
  27. <?php
  28. /**
  29. * 多种循环体
  30. * 每一次循环都是一种匹配情况
  31. */
  32. $tyu_num = 1;
  33. ?>
  34. {eyou:volist name='$list_data' id='field'}
  35. <div class="ta-list-li-box result-box-{$tyu_num} result-box">
  36. <div class="tllb-t">
  37. <!--<div class="panel panel-primary" style="display:block;">
  38. <div class="panel-body">-->
  39. <?php
  40. if($tyu_num == 1){
  41. $t = '收起';
  42. $t_class = 'zklp-2';
  43. }else{
  44. $t = '展开';
  45. $t_class = 'zklp-3';
  46. }
  47. ?>
  48. {eyou:if condition='((int)$field.sf === 0)'}
  49. <!--({$t}匹配结果)全国通用申报要求对比结果如下:-->
  50. <span class="zklp-l">({$tyu_num})根据你的条件符合申报全国地区,结果如下:</span>
  51. <span class="zklp zklp{$tyu_num} {$t_class}" data="{$tyu_num}">{$t}</span>
  52. {eyou:else /}
  53. <?php
  54. if((int)$field['sf'] > 0){
  55. $sql22 = "select id,name from ey_citysite where id=".$field['sf'];
  56. $sql222 = '';
  57. if((int)$field['cs'] > 0){
  58. $sql222 = "select id,name from ey_citysite where id=".$field['cs'];
  59. }
  60. }
  61. ?>
  62. {eyou:sql sql='$sql22' cachetime='3600' empty='' id="kop"}
  63. <?php
  64. $aname = $kop['name'];
  65. ?>
  66. {/eyou:sql}
  67. {eyou:if condition='((int)$field.cs > 0)'}
  68. {eyou:sql sql='$sql222' cachetime='3600' empty='' id="kop"}
  69. <?php
  70. $bname = $kop['name'];
  71. ?>
  72. {/eyou:sql}
  73. {/eyou:if}
  74. <!--({$t}匹配结果){$aname}{$bname}地区申报要求对比结果如下:-->
  75. <span class="zklp-l">(<font class="sort-num">{$tyu_num}</font>)根据你的条件符合申报{$aname}{$bname}地区,结果如下:</span>
  76. <span class="zklp zklp{$tyu_num} {$t_class}" data="{$tyu_num}">{$t}</span>
  77. {/eyou:if}
  78. </div>
  79. <div class="clear"></div>
  80. <div class="tllb-b p-con68 klp{$tyu_num}">
  81. <!--</div>
  82. <div class="panel-footer" style="padding:3px 5px;">-->
  83. <!--查询专业-->
  84. <?php
  85. $num = 0;
  86. $sql2 = "select * from ey_zcwe_position where type=".$field['id']." and is_del=0 and status=1";
  87. $son_details = [];
  88. ?>
  89. {eyou:sql sql="$sql2" cachetime='3600' empty='暂无相关数据' id="field2"}
  90. <?php
  91. $son_details[] = $field2;
  92. ?>
  93. {/eyou:sql}
  94. <ul class="nav nav-tabs" id="myTab{$tyu_num}" role="tablist">
  95. <?php
  96. $io_num = 1;
  97. ?>
  98. {eyou:volist name='$son_details' id='field2'}
  99. <!--active-->
  100. <li class="nav-item {eyou:if condition='($io_num == 1)'} active {/eyou:if} result-box-{$tyu_num}-son-{$io_num}">
  101. <!--active-->
  102. <a class="nav-link {eyou:if condition='($io_num == 1)'}active{/eyou:if} result-box-{$tyu_num}-son-{$io_num} result-box" id="home-tab{$io_num}" data-toggle="tab" style="color: #000 !important;" href="#home{$io_num}" role="tab" aria-controls="home" aria-selected="true">
  103. 情况<font class="sort-num-i">{$i}</font>
  104. </a>
  105. </li>
  106. <?php
  107. $io_num++;
  108. ?>
  109. {/eyou:volist}
  110. </ul>
  111. <div class="tab-content" id="myTabContent">
  112. <?php
  113. $io_d_num = 1;
  114. ?>
  115. {eyou:volist name='$son_details' id='field2'}
  116. <!--active in-->
  117. <div class="tab-pane fade {eyou:if condition='($io_d_num == 1)'} active in {/eyou:if} result-box-{$tyu_num}-son-{$io_d_num} result-box" id="home{$io_d_num}" role="tabpanel" aria-labelledby="home-tab{$io_d_num}">
  118. <table class="" style="">
  119. <!--<caption>第{$i}种情况</caption>-->
  120. <colgroup>
  121. <col class="t-wid1 batman">
  122. <col class="t-wid2 flash">
  123. <col class="t-wid3 flash">
  124. <col class="t-wid4 flash">
  125. </colgroup>
  126. <thead>
  127. <tr>
  128. <th>字段信息</th>
  129. <th>实际要求</th>
  130. <th>填写资料</th>
  131. <th>匹配结果</th>
  132. </tr>
  133. </thead>
  134. <tbody>
  135. <?php
  136. //先判断学历是否符合
  137. ?>
  138. <tr>
  139. <td>学历</td>
  140. <td><?php echo $xl[$field2['xlyq']];?></td>
  141. <td><?php echo $xl[$detail['xl']];?></td>
  142. <td>
  143. <?php
  144. if($field2['xlyq'] <= $detail['xl']){
  145. //echo "<font style='color: blue;'>符合</font>";
  146. echo '<font class="td-r"><img src="/template/pc/js/botstrap-step/img_6.png" /></font>';
  147. $num++;
  148. }else{
  149. echo '<font class="td-b"><img src="/template/pc/js/botstrap-step/img_7.png" /></font>';
  150. //echo "<font style='color: red;'>不符合</font>";
  151. $str_no_err[$field['id']][$field2['id']]['xlyq'] = '学历不符';
  152. }
  153. ?>
  154. </td>
  155. </tr>
  156. <tr>
  157. <td>年龄</td>
  158. <td>
  159. <?php
  160. if((int)$field2['is_ega'] === 0){
  161. echo "不限制";
  162. }else{
  163. echo $field2['ega_0'].'-'.$field2['ega_1'].'岁';
  164. }
  165. ?>
  166. </td>
  167. <td>
  168. {$detail.nl}岁
  169. </td>
  170. <td>
  171. <?php
  172. if((int)$field2['is_ega'] === 0){
  173. echo '<font class="td-r"><img src="/template/pc/js/botstrap-step/img_6.png" /></font>';
  174. $num++;
  175. }else{
  176. if((int)$detail['nl'] <= (int)$field2['ega_1'] && (int)$detail['nl'] >= (int)$field2['ega_0']){
  177. //echo "<font style='color: blue;'>符合</font>";
  178. echo '<font class="td-r"><img src="/template/pc/js/botstrap-step/img_6.png" /></font>';
  179. $num++;
  180. }else{
  181. echo '<font class="td-b"><img src="/template/pc/js/botstrap-step/img_7.png" /></font>';
  182. //echo "<font style='color: red;'>不符合</font>";
  183. $str_no_err[$field['id']][$field2['id']]['nl'] = '年龄不符';
  184. }
  185. }
  186. ?>
  187. </td>
  188. </tr>
  189. <tr>
  190. <td>毕业专业</td>
  191. <td>
  192. {eyou:if condition='((int)$field2.byzy === 0)'}
  193. 不限制
  194. {eyou:else /}
  195. <?php
  196. //查询出毕业专业 $deta
  197. /*$zhengshu2 = json_decode($field2['zhengshu2'],true);
  198. $zhengshu2_str = '0';
  199. foreach ($zhengshu2 as $k => $v){
  200. if((int)$v > 0) {
  201. $zhengshu2_str .= ',' . $v;
  202. }
  203. }
  204. $sql3 = "select id,title from ey_zczy_position where id IN(".$zhengshu2_str.") and is_del=0 and status=1";*/
  205. /*
  206. *
  207. * {eyou:if condition='($zhengshu2_str != "0")'}
  208. {eyou:sql sql="$sql3" cachetime='3600' empty='' id="field3"}
  209. {$field3.title}<br/>
  210. {/eyou:sql}
  211. {eyou:else /}
  212. 不限制
  213. {/eyou:if}
  214. */
  215. ?>
  216. 与申报类目一致
  217. {/eyou:if}
  218. </td>
  219. <td>
  220. <?php
  221. //查询出毕业专业 $deta
  222. /*$zhengshu = json_decode($detail['zy'],true);
  223. $zhengshu_str = '0';
  224. foreach ($zhengshu as $k => $v){
  225. if ((int)$v > 0) {
  226. $zhengshu_str .= ',' . $v;
  227. }
  228. }
  229. $sql3 = "select id,title from ey_zczy_position where id IN(".$zhengshu_str.") and is_del=0 and status=1";*/
  230. /*
  231. * {eyou:if condition='($zhengshu_str != "0")'}
  232. {eyou:sql sql="$sql3" cachetime='3600' empty='' id="field3"}
  233. {$field3.title}<br/>
  234. {/eyou:sql}
  235. {eyou:else /}
  236. {/eyou:if}
  237. */
  238. ?>
  239. {eyou:if condition='((int)$detail.byzy_is !== 0)'}
  240. 与申报类目一致
  241. {eyou:else /}
  242. {eyou:if condition='($detail.byzy_name != "")'}
  243. {$detail.byzy_name}
  244. {eyou:else /}
  245. 未填写
  246. {/eyou:if}
  247. {/eyou:if}
  248. </td>
  249. <td>
  250. <?php
  251. /*if((int)$field2.byzy === 0 || empty($zhengshu2)){
  252. //echo "<font style='color: blue;'>符合</font>";
  253. echo '<font class="td-r"><img src="/template/pc/js/botstrap-step/img_6.png" /></font>';
  254. $num++;
  255. }else{
  256. if(empty($zhengshu)){
  257. echo '<font class="td-b"><img src="/template/pc/js/botstrap-step/img_7.png" /></font>';
  258. //echo "<font style='color: red;'>不符合</font>";
  259. $str_no_err[$field['id']][$field2['id']]['byzy'] = '专业不符';
  260. }else{
  261. //$run = "<font style='color: red;'>不符合</font>";
  262. $run = '<font class="td-b"><img src="/template/pc/js/botstrap-step/img_7.png" /></font>';
  263. $str_no_err[$field['id']][$field2['id']]['byzy'] = '专业不符';
  264. $ik = 1;
  265. foreach ($zhengshu as $k => $v){
  266. if(in_array($v,$zhengshu2)){
  267. //$run = '<font style="color: blue;">符合</font><br/>'.$ik.'项';
  268. //$run = '<font style="color: blue;">符合</font><br/>';
  269. $run = '<font class="td-r"><img src="/template/pc/js/botstrap-step/img_6.png" /></font>';
  270. $str_no_err[$field['id']][$field2['id']]['byzy'] = '';
  271. $ik++;
  272. }
  273. }
  274. echo $run;
  275. if($ik>1){
  276. $num++; //符合+1
  277. }
  278. }
  279. }*/
  280. if((int)$detail['byzy_is'] === 1){
  281. //一致
  282. echo '<font class="td-r"><img src="/template/pc/js/botstrap-step/img_6.png" /></font>';
  283. $num++;
  284. }else{
  285. echo '<font class="td-b"><img src="/template/pc/js/botstrap-step/img_7.png" /></font>';
  286. //echo "<font style='color: red;'>不符合</font>";
  287. $str_no_err[$field['id']][$field2['id']]['byzy'] = '专业不符';
  288. }
  289. ?>
  290. </td>
  291. </tr>
  292. <tr>
  293. <td>学校类型</td>
  294. <td>
  295. {eyou:if condition='((int)$field2.xxlx === 0)'}
  296. 不限制
  297. {eyou:else /}
  298. <?php
  299. if((int)$field2['xxlx'] === 1) echo "全日制";
  300. if((int)$field2['xxlx'] === 2) echo "非全日制";
  301. ?>
  302. {/eyou:if}
  303. </td>
  304. <td>
  305. {eyou:if condition='((int)$detail.xxlx === 1)'}
  306. 全日制
  307. {eyou:else /}
  308. 非全日制
  309. {/eyou:if}
  310. </td>
  311. <td>
  312. {eyou:if condition='((int)$field2.xxlx === 0)'}
  313. <!--<font style='color: blue;'>符合</font>-->
  314. <?php
  315. echo '<font class="td-r"><img src="/template/pc/js/botstrap-step/img_6.png" /></font>';
  316. $num++;
  317. ?>
  318. {eyou:else /}
  319. <?php
  320. if((int)$field2['xxlx'] === (int)$detail['xxlx']){
  321. //echo "<font style='color: blue;'>符合</font>";
  322. echo '<font class="td-r"><img src="/template/pc/js/botstrap-step/img_6.png" /></font>';
  323. $num++;
  324. }else{
  325. //echo "<font style='color: red;'>不符合</font>";
  326. echo '<font class="td-b"><img src="/template/pc/js/botstrap-step/img_7.png" /></font>';
  327. $str_no_err[$field['id']][$field2['id']]['xxlx'] = '学校类型不符';
  328. }
  329. ?>
  330. {/eyou:if}
  331. </td>
  332. </tr>
  333. <tr>
  334. <td>毕业时间</td>
  335. <td>
  336. {eyou:if condition='((int)$field2.bysj === 0)'}
  337. 不要求
  338. {eyou:else /}
  339. 要求>={$field2.bysj_time}年
  340. {/eyou:if}
  341. </td>
  342. <td>
  343. <?php
  344. //$detail['bysj']
  345. //假设我们要计算的时间是2000年1月1日
  346. $startDate = new DateTime($detail['bysj']);
  347. // 获取现在的日期
  348. $now = new DateTime('now');
  349. // 计算差值
  350. $interval = date_diff($startDate, $now);
  351. // 输出年份
  352. ////echo $interval->y . ' years';
  353. if($interval->y > 0){
  354. echo '已毕业'.$interval->y . '年';
  355. }else{
  356. echo '刚毕业不足1年';
  357. }
  358. ?>
  359. </td>
  360. <td>
  361. <?php
  362. if((int)$field2['bysj'] === 0){
  363. //echo "<font style='color: blue;'>符合</font>";
  364. echo '<font class="td-r"><img src="/template/pc/js/botstrap-step/img_6.png" /></font>';
  365. $num++;
  366. }else{
  367. if((int)$field2['bysj_time'] <= $interval->y){
  368. //echo "<font style='color: blue;'>符合</font>";
  369. echo '<font class="td-r"><img src="/template/pc/js/botstrap-step/img_6.png" /></font>';
  370. $num++;
  371. }else{
  372. //echo "<font style='color: red;'>不符合</font>";
  373. echo '<font class="td-b"><img src="/template/pc/js/botstrap-step/img_7.png" /></font>';
  374. $str_no_err[$field['id']][$field2['id']]['bysj'] = '毕业时间不符';
  375. }
  376. }
  377. ?>
  378. </td>
  379. </tr>
  380. <tr>
  381. <td>前置证书</td>
  382. <td>
  383. <?php
  384. $zhengshu3 = '';
  385. $zs_all = [];
  386. //(且或) 列出证书要求
  387. //调用需要的记录 is_zs
  388. $sql5 = "select * from ey_zcwf_position where type_son=".$field2['id']." and is_del=0 and status=1 and is_zs=1";
  389. ?>
  390. {eyou:sql sql="$sql5" cachetime='3600' empty='不限制' id="field3"}
  391. <?php
  392. if($i > 1){
  393. echo "或<br/>";
  394. }
  395. ?>
  396. <?php
  397. //查询出证书 $deta
  398. $zhengshu3 = json_decode($field3['zhengshu'],true);
  399. $sjnx = json_decode($field3['sjnx'],true);
  400. //var_dump($field3);
  401. //var_dump($field3['zhengshu']);
  402. //var_dump($field3['sjnx']);
  403. $zs_all[] = [
  404. 'a' => $zhengshu3,
  405. 'b' => $sjnx
  406. ];
  407. //var_dump($sjnx);
  408. $zhengshu3_str = '0';
  409. foreach ($zhengshu3 as $k => $v){
  410. if((int)$v > 0) {
  411. $zhengshu3_str .= ',' . $v;
  412. }
  413. }
  414. $sql3 = "select id,title from ey_zczs_position where id IN(".$zhengshu3_str.") and is_del=0 and status=1";
  415. ?>
  416. {eyou:if condition='($zhengshu3_str != "0")'}
  417. {eyou:sql sql="$sql3" cachetime='3600' empty='' id="field4"}
  418. <?php
  419. $key_s = array_search($field4['id'], $zhengshu3);
  420. $year_s = $sjnx[$key_s];
  421. ?>
  422. {$field4.title}<br/>(需要{$year_s}年)<br/>
  423. {/eyou:sql}
  424. {eyou:else /}
  425. <!--忽略-->
  426. {/eyou:if}
  427. {/eyou:sql}
  428. </td>
  429. <td>
  430. <?php
  431. //查询出拥有的证书 $deta
  432. $zhengshu = json_decode($detail['zs'],true);
  433. $zsnx = json_decode($detail['zsnx'],true);
  434. $zhengshu_str = '0';
  435. foreach ($zhengshu as $k => $v){
  436. if((int)$v > 0){
  437. $zhengshu_str .= ','.$v;
  438. }
  439. }
  440. $sql3 = "select id,title from ey_zczs_position where id IN(".$zhengshu_str.") and is_del=0 and status=1";
  441. ?>
  442. {eyou:if condition='($zhengshu_str != "0")'}
  443. {eyou:sql sql="$sql3" cachetime='3600' empty='' id="field3"}
  444. <?php
  445. $key_s = array_search($field3['id'], $zhengshu);
  446. $year_s = $zsnx[$key_s];
  447. ?>
  448. {$field3.title}<br/>(拥有{$year_s}年)<br/>
  449. {/eyou:sql}
  450. {eyou:else /}
  451. {/eyou:if}
  452. </td>
  453. <td>
  454. <?php
  455. //var_dump($field['id']);
  456. //var_dump($zs_all);
  457. //表示没查出限制要求
  458. if(empty($zhengshu3)){
  459. //echo "<font style='color: blue;'>符合</font>";
  460. echo '<font class="td-r"><img src="/template/pc/js/botstrap-step/img_6.png" /></font>';
  461. $num++;
  462. }else{
  463. if(empty($zhengshu)){
  464. //用户没有证书
  465. //echo "<font style='color: red;'>不符合</font>";
  466. echo '<font class="td-b"><img src="/template/pc/js/botstrap-step/img_7.png" /></font>';
  467. $str_no_err[$field['id']][$field2['id']]['xxlx'] = '未拥有证书';
  468. }else{
  469. //判断是否包含
  470. //第一轮 循环 或
  471. $ik = 1;
  472. $ik2 = 1;
  473. $ik3 = 1;
  474. foreach ($zs_all as $k => $v){
  475. if($k > 0){
  476. //echo "或<br/>";
  477. }
  478. //第二轮 循环 且
  479. //var_dump($v['a']);
  480. $ik4 = 0; //真实有效数量
  481. foreach ($v['a'] as $k2 => $v2){
  482. //var_dump($v2);
  483. //var_dump($zhengshu);
  484. //第三轮 循环 每一项要求是否在 用户拥有的证书 里面
  485. //必须完全满足
  486. $run_1 = '';
  487. $run_2 = '';
  488. $run_3 = '';
  489. if((int)$v2 > 0) {
  490. if (in_array($v2, $zhengshu)) {
  491. //判断年限是否符合要求
  492. $key_i = array_search($v2, $zhengshu);
  493. //var_dump($zsnx[$key_i]);
  494. if ((int)$zsnx[$key_i] >= (int)$v['b'][$k2]) {
  495. $run_1 = '<font style="color: blue;">符合</font><br/>' . $ik . '项';
  496. $ik++;
  497. } else {
  498. $run_2 = '<font style="color: blue;">年限不符合</font><br/>' . $ik2 . '项';
  499. $ik2++;
  500. }
  501. } else {
  502. $run_3 = '<font style="color: blue;">未拥有</font><br/>' . $ik3 . '项';
  503. $ik3++;
  504. }
  505. $ik4++;
  506. }
  507. //具体情况 循环且
  508. //if(!empty($run_1)) echo $run_1.'<br/>';
  509. //if(!empty($run_2)) echo $run_2.'<br/>';
  510. //if(!empty($run_3)) echo $run_3.'<br/>';
  511. }
  512. ////echo count($v['a']);
  513. //var_dump($ik);
  514. //var_dump(count($v['a']));
  515. if(($ik-1) === $ik4){
  516. ////echo "<font style='color: blue;'>符合1</font>";
  517. //$res = "<font style='color: blue;'>符合</font>";
  518. $res = '<font class="td-r"><img src="/template/pc/js/botstrap-step/img_6.png" /></font>';
  519. $num++;
  520. //跳出循环 已经符合其中 一个 且了
  521. break;
  522. }else{
  523. ////echo "<font style='color: red;'>不符合2</font>";
  524. //$res = "<font style='color: red;'>不符合</font>";
  525. $res = '<font class="td-b"><img src="/template/pc/js/botstrap-step/img_7.png" /></font>';
  526. $str_no_err[$field['id']][$field2['id']]['xxlx'] = '证书要求不符';
  527. }
  528. }
  529. echo $res;
  530. }
  531. }
  532. ?>
  533. </td>
  534. </tr>
  535. <tr>
  536. <td>综合评估</td>
  537. <td colspan="3" style="vertical-align:middle;">
  538. <?php
  539. ////echo $num;
  540. if($num >= 6){
  541. //拼接需要显示的class
  542. $show_class['a'][] = 'result-box-'.$tyu_num;
  543. $show_class['b'][] = 'result-box-'.$tyu_num.'-son-'.$io_d_num;
  544. //多次循环可能大于6
  545. echo "<font style='color: blue;'>完全符合要求!</font>";
  546. $bname_str = '';
  547. if(!empty($bname)){
  548. $bname_str = '/'.$bname;
  549. }
  550. $area_name_str_0 = $aname.$bname_str;
  551. if (strpos($result_map,$area_name_str_0) !== false) {
  552. //包含
  553. }else{
  554. $result_map .= $area_name_str_0.'地区<br/>';
  555. }
  556. $str_no_err[$field['id']][$field2['id']]['zhpg'] = 2;
  557. $str_no_err[$field['id']][$field2['id']]['diqu'] = $aname.'/'.$bname_str;
  558. }else if($num === 0){
  559. $show_class['c'][] = 'result-box-'.$tyu_num;
  560. $show_class['d'][] = 'result-box-'.$tyu_num.'-son-'.$io_d_num;
  561. echo "<font style='color: red;'>完全不符合要求!</font>";
  562. $str_no_err[$field['id']][$field2['id']]['zhpg'] = 0;
  563. }else{
  564. $show_class['c'][] = 'result-box-'.$tyu_num;
  565. $show_class['d'][] = 'result-box-'.$tyu_num.'-son-'.$io_d_num;
  566. echo "<font style='color: #ff4c08;'>未完全符合要求!</font>";
  567. $str_no_err[$field['id']][$field2['id']]['zhpg'] = 1;
  568. }
  569. $num = 0;
  570. ?>
  571. </td>
  572. </tr>
  573. </tbody>
  574. </table>
  575. </div>
  576. <?php
  577. $io_d_num++;
  578. ?>
  579. {/eyou:volist}
  580. </div>
  581. <!-- </div>
  582. </div>-->
  583. </div>
  584. </div>
  585. <?php
  586. $tyu_num++;
  587. ?>
  588. {/eyou:volist}
  589. {/eyou:if}
  590. <!--以下输出结果-->
  591. <?php
  592. //var_dump($is_list_empty);
  593. ?>
  594. {eyou:if condition='(empty($is_list_empty))'}
  595. <?php
  596. $is_tg = 0;
  597. ?>
  598. <div class="alert alert-danger" role="alert" style="margin-top:10px;margin-bottom:8px;">
  599. <!--<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
  600. <span class="sr-only">Error:</span>-->
  601. <font class='result-div'>{$scen}</font>
  602. </div>
  603. {eyou:else /}
  604. <!--输出结论 后台有规则 但是可能匹配不成功或者成功-->
  605. <?php
  606. if(empty($result_map)){
  607. $info = '';
  608. $result_map = "<font class='result-div'>抱歉!未找到完全符合条件的地区!</font>";
  609. $class = 'alert-danger';
  610. $is_tg = 0;
  611. }else{
  612. //$result_map;
  613. $info = "<font class='result-div'>找到以下条件完全符合申请的地区:</font>";
  614. $class = 'alert-success';
  615. $is_tg = 1;
  616. }
  617. ?>
  618. <div class="alert {$class}" role="alert" style="margin-top:10px;display: block;margin-bottom:8px;">
  619. <?php
  620. echo $info;
  621. echo "<font class='result-div'>".$result_map."</font>";
  622. ?>
  623. </div>
  624. <?php
  625. if($is_tg === 1) {
  626. echo "<p><font style='margin-bottom: 10px; margin-right: 10px;'>下载文件:</font>";
  627. if (!empty($map_area)) {
  628. foreach ($map_area as $k => $v) {
  629. if (strpos($result_map, $v) !== false) {
  630. //存在该地区
  631. echo "<a href='" . $base_url . $map_file[$v] . ".pdf' target='_blank' download='".$map_file[$v]."' style='color:#000 !important;margin-right:10px;'>" . $map_file[$v] . "</a>";
  632. }
  633. }
  634. }
  635. echo "</p>";
  636. }
  637. ?>
  638. {/eyou:if}
  639. <?php
  640. //重新处理 $show_class
  641. foreach ($show_class[c] as $k => $v){
  642. foreach ($show_class[a] as $k2 => $v2) {
  643. if($v == $v2){
  644. unset($show_class[c][$k]);
  645. }
  646. }
  647. }
  648. ?>