webmain/model/wordModel.php
(开头部分) 14KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class wordClassModel extends Model
{
private $optionobj,$pathss;
public function initModel()
{
$this->optionobj = m('option');
}
//获取路径
public function getpath($id)
{
$this->pathss = array();
$this->getpaths($id);
return $this->pathss;
}
private function getpaths($id)
{
$rs = $this->getone($id);
if($rs){
$this->getpaths($rs['typeid']);
$this->pathss[] = $rs;
}
}
/**
* 删除文件
*/
public function delword($id)
{
if($this->rows('`typeid`='.$id.'')>0)return returnerror('有子目录不能删除');
$rs = $this->getone($id);
$fid = arrvalue($rs,'fileid','0');
$this->delete($id);
m('file')->delfile($fid); //同时删除文件
return returnsuccess();
}
/**
* 创建文件夹,$cqid 分区ID, $typeid上级文件夹
*/
public function createfolder($name, $cqid, $typeid=0)
{
$arr['optid'] = $this->adminid;
$arr['optname'] = $this->adminname;
$arr['optdt'] = $this->rock->now;
$arr['name'] = $name;
$arr['cid'] = $cqid;
$arr['typeid'] = $typeid;
$arr['comid'] = m('admin')->getcompanyid();
$arr['type'] = 1; //说明是文件夹
$arr['id'] = $this->insert($arr);
return $arr;
}
/**
* 获取文档数据
后面还有 473 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
