信呼v2.5.3版本

This commit is contained in:
雨中磐石
2023-02-16 16:04:13 +08:00
parent 6bd0ce491e
commit 117f629dcc
26 changed files with 217 additions and 23 deletions

View File

@@ -72,6 +72,13 @@ class optionClassAction extends Action
}
}
public function downshubefore()
{
$pid = (int)$this->post('pid','0');
$this->pid = $pid;
return 'and `pid`='.$pid.'';
}
public function downshuafter($table, $rows)
{
$db = m($table);
@@ -79,8 +86,26 @@ class optionClassAction extends Action
$dcount = $db->rows('pid='.$rs['id'].'');
if($dcount>0)$rows[$k]['dcount'] = $dcount;
}
$darr = array();
if($this->pid>0){
$this->getdonwds($db,$this->pid);
$darr = $this->downarr;
}
return array(
'rows' => $rows
'rows' => $rows,
'darr' => $darr
);
}
private $downarr = array();
private function getdonwds($db,$id)
{
if($id>1){
$rs = $db->getone('`id`='.$id.'','id,pid,name,num');
if($rs){
$this->getdonwds($db, $rs['pid']);
$this->downarr[] = $rs;
}
}
}
}