| @@ -58,16 +58,16 @@ | |||||
| <div id="smclass" class="mt-2" style="<?php echo ($channelid<0 ? '' : 'display:none');?>"> | <div id="smclass" class="mt-2" style="<?php echo ($channelid<0 ? '' : 'display:none');?>"> | ||||
| <select name="smalltype[]" multiple="yes" class="admin-input-lg"> | <select name="smalltype[]" multiple="yes" class="admin-input-lg"> | ||||
| <?php | <?php | ||||
| $sql = "SELECT * FROM `#@__sys_enum` WHERE egroup LIKE 'infotype' ORDER BY disorder ASC, id DESC "; | |||||
| $sql = "SELECT * FROM `#@__sys_enum` WHERE egroup LIKE 'infotype' ORDER BY disorder ASC,evalue ASC "; | |||||
| $dsql->Execute('s',$sql); | $dsql->Execute('s',$sql); | ||||
| while($arr = $dsql->GetArray('s')) | while($arr = $dsql->GetArray('s')) | ||||
| { | { | ||||
| if ($arr['evalue']%500==0) { | if ($arr['evalue']%500==0) { | ||||
| echo "<option value='{$arr['evalue']}'>{$arr['ename']}</option>"; | echo "<option value='{$arr['evalue']}'>{$arr['ename']}</option>"; | ||||
| } else if (preg_match("#\.#", $arr['evalue'])) { | } else if (preg_match("#\.#", $arr['evalue'])) { | ||||
| echo "<option value='{$arr['evalue']}'>└─ {$arr['ename']}</option>"; | |||||
| echo "<option value='{$arr['evalue']}'>└── {$arr['ename']}</option>"; | |||||
| } else { | } else { | ||||
| echo "<option value='{$arr['evalue']}'>{$arr['ename']}</option>"; | |||||
| echo "<option value='{$arr['evalue']}'>└─{$arr['ename']}</option>"; | |||||
| } | } | ||||
| } | } | ||||
| ?> | ?> | ||||
| @@ -49,7 +49,7 @@ | |||||
| <select name="smalltype[]" multiple="yes" class="admin-input-lg"> | <select name="smalltype[]" multiple="yes" class="admin-input-lg"> | ||||
| <?php | <?php | ||||
| $smtypes = explode(',',trim($myrow['smalltypes'])); | $smtypes = explode(',',trim($myrow['smalltypes'])); | ||||
| $sql = "SELECT * FROM `#@__sys_enum` WHERE egroup LIKE 'infotype' ORDER BY disorder ASC, id DESC "; | |||||
| $sql = "SELECT * FROM `#@__sys_enum` WHERE egroup LIKE 'infotype' ORDER BY disorder ASC,evalue ASC "; | |||||
| $dsql->Execute('s',$sql); | $dsql->Execute('s',$sql); | ||||
| while($arr = $dsql->GetArray('s')) | while($arr = $dsql->GetArray('s')) | ||||
| { | { | ||||
| @@ -61,9 +61,9 @@ | |||||
| if ($arr['evalue']%500==0) { | if ($arr['evalue']%500==0) { | ||||
| echo "<option value='{$arr['evalue']}'{$selstr}>{$arr['ename']}</option>"; | echo "<option value='{$arr['evalue']}'{$selstr}>{$arr['ename']}</option>"; | ||||
| } else if (preg_match("#\.#", $arr['evalue'])) { | } else if (preg_match("#\.#", $arr['evalue'])) { | ||||
| echo "<option value='{$arr['evalue']}'{$selstr}>└─ {$arr['ename']}</option>"; | |||||
| echo "<option value='{$arr['evalue']}'{$selstr}>└── {$arr['ename']}</option>"; | |||||
| } else { | } else { | ||||
| echo "<option value='{$arr['evalue']}'{$selstr}>{$arr['ename']}</option>"; | |||||
| echo "<option value='{$arr['evalue']}'{$selstr}>└─{$arr['ename']}</option>"; | |||||
| } | } | ||||
| } | } | ||||
| ?> | ?> | ||||
| @@ -114,9 +114,9 @@ function lib_infolink(&$ctag, &$refObj) | |||||
| } | } | ||||
| } | } | ||||
| //小分类链接 | //小分类链接 | ||||
| if (empty($infotype) || is_array($smalltypes)) { | |||||
| if (empty($infotype) || !is_array($smalltypes)) { | |||||
| foreach ($em_infotypes as $eid => $em) { | foreach ($em_infotypes as $eid => $em) { | ||||
| if (!is_array($smalltypes) && $eid % 500 != 0) continue; | |||||
| if (!is_array($smalltypes) || $eid % 500 != 0) continue; | |||||
| if (is_array($smalltypes) && !in_array($eid, $smalltypes)) continue; | if (is_array($smalltypes) && !in_array($eid, $smalltypes)) continue; | ||||
| if ($eid == $infotype) { | if ($eid == $infotype) { | ||||
| $fields['infotype'] .= " {$em}\r\n"; | $fields['infotype'] .= " {$em}\r\n"; | ||||
| @@ -128,7 +128,6 @@ function lib_infolink(&$ctag, &$refObj) | |||||
| $sontype = (($infotype % 500 != 0) ? $infotype : 0); | $sontype = (($infotype % 500 != 0) ? $infotype : 0); | ||||
| $toptype = (($infotype % 500 == 0) ? (int)$infotype : (int)($infotype - ($infotype % 500))); | $toptype = (($infotype % 500 == 0) ? (int)$infotype : (int)($infotype - ($infotype % 500))); | ||||
| $fields['infotype'] = "<a href='{$baseurl}apps/list.php?channelid={$channelid}&tid={$typeid}&infotype={$toptype}&nativeplace={$nativeplace}'>{$em_infotypes[$toptype]}</a> - "; | $fields['infotype'] = "<a href='{$baseurl}apps/list.php?channelid={$channelid}&tid={$typeid}&infotype={$toptype}&nativeplace={$nativeplace}'>{$em_infotypes[$toptype]}</a> - "; | ||||
| if ($infotype % 500 == 0) { | if ($infotype % 500 == 0) { | ||||
| //1级分类 | //1级分类 | ||||
| foreach ($em_infotypes as $eid => $em) { | foreach ($em_infotypes as $eid => $em) { | ||||