webmain/system/option/optionAction.php
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class optionClassAction extends Action
{
private $pid;
public function getlistAjax()
{
$num = $this->request('num');
$name = $this->request('name');
$key = $this->post('key');
$id = $this->option->getnumtoid($num, $name, false);
$this->option->update("`pid`=1,`name`='行政选项'","`num`='goods'"); //行政选项移动到数据选项下
if(isempt($key)){
$where = "a.`pid`='$id'";
}else{
$where = "1=1 and a.`name` is not null and (a.`name` like '%$key%' or a.`num`='$key') ";
}
$rows = $this->db->getall("select *,(select count(1) from `[Q]option` where pid=a.id)as stotal from `[Q]option` a where $where order by a.`sort`, a.`id`");
echo json_encode(array(
'totalCount'=> $this->db->count,
'rows' => $rows,
'pid' => $id
));
}
public function getfileAjax()
{
$mtype = $this->request('mtype');
$mid = $this->request('mid');
$rows = m('file')->getfile($mtype, $mid);
echo json_encode($rows);
}
public function gettreedataAjax()
{
$num = $this->get('num');
if($num=='')exit('error;');
if(!contain($num, 'gerenvcard_') && ISMORECOM && $cnum=m('admin')->getcompanynum())$num.='_'.$cnum.'';//多单位时个人通讯不用加单位编号
$pid = $this->option->getnumtoid($num,''.$num.'选项', false);
$rows = $this->option->gettreedata($pid);
$rows = array(
'rows' => $rows,
'pid' => $pid
);
$this->returnjson($rows);
}
public function deloptionAjax()
{
$id = (int)$this->post('id','0');
$stable = $this->post('stable');
$delbo = true;
if($delbo)if($this->option->rows("`pid`='$id'")>0)$delbo=false;
if(!$delbo)$this->showreturn('','有下级分类不允许删除',201);
$this->option->delete($id);
if($stable!='')m($stable)->update('`typeid`=0', "`typeid`='$id'");
$this->showreturn();
}
后面还有 53 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
