Browse Source

分类信息联动错误修复

tags/6.2.8
tianya 10 months ago
parent
commit
e7ebcabc81
3 changed files with 8 additions and 9 deletions
  1. +3
    -3
      src/admin/templets/catalog_add.htm
  2. +3
    -3
      src/admin/templets/catalog_edit.htm
  3. +2
    -3
      src/system/taglib/infolink.lib.php

+ 3
- 3
src/admin/templets/catalog_add.htm View File

@@ -58,16 +58,16 @@
<div id="smclass" class="mt-2" style="<?php echo ($channelid<0 ? '' : 'display:none');?>">
<select name="smalltype[]" multiple="yes" class="admin-input-lg">
<?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);
while($arr = $dsql->GetArray('s'))
{
if ($arr['evalue']%500==0) {
echo "<option value='{$arr['evalue']}'>{$arr['ename']}</option>";
} else if (preg_match("#\.#", $arr['evalue'])) {
echo "<option value='{$arr['evalue']}'>└─ {$arr['ename']}</option>";
echo "<option value='{$arr['evalue']}'>└─ {$arr['ename']}</option>";
} else {
echo "<option value='{$arr['evalue']}'>{$arr['ename']}</option>";
echo "<option value='{$arr['evalue']}'>└─{$arr['ename']}</option>";
}
}
?>


+ 3
- 3
src/admin/templets/catalog_edit.htm View File

@@ -49,7 +49,7 @@
<select name="smalltype[]" multiple="yes" class="admin-input-lg">
<?php
$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);
while($arr = $dsql->GetArray('s'))
{
@@ -61,9 +61,9 @@
if ($arr['evalue']%500==0) {
echo "<option value='{$arr['evalue']}'{$selstr}>{$arr['ename']}</option>";
} 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 {
echo "<option value='{$arr['evalue']}'{$selstr}>{$arr['ename']}</option>";
echo "<option value='{$arr['evalue']}'{$selstr}>└─{$arr['ename']}</option>";
}
}
?>


+ 2
- 3
src/system/taglib/infolink.lib.php View File

@@ -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) {
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 ($eid == $infotype) {
$fields['infotype'] .= " {$em}\r\n";
@@ -128,7 +128,6 @@ function lib_infolink(&$ctag, &$refObj)
$sontype = (($infotype % 500 != 0) ? $infotype : 0);
$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> - ";
if ($infotype % 500 == 0) {
//1级分类
foreach ($em_infotypes as $eid => $em) {


Loading…
Cancel
Save