信呼OA版本v2.3.8

This commit is contained in:
雨中磐石
2022-08-14 16:47:40 +08:00
parent 4640677d27
commit e3fcd913e3
1405 changed files with 133635 additions and 73 deletions

View File

@@ -0,0 +1,32 @@
<?php
class menuClassAction extends Action
{
public function dataAjax()
{
$this->rows = array();
$where = $this->rock->covexec($this->post('where'));
$this->getmenu(0, 1, $where);
echo json_encode(array(
'totalCount'=> 0,
'rows' => $this->rows
));
}
private function getmenu($pid, $oi, $wh='')
{
$db = m('menu');
$menu = $db->getall("`pid`='$pid' $wh order by `sort`",'*');
foreach($menu as $k=>$rs){
$sid = $rs['id'];
$rs['level'] = $oi;
$rs['stotal'] = $db->rows("`pid`='$sid' $wh ");
$this->rows[] = $rs;
$this->getmenu($sid, $oi+1, $wh);
}
}
}