webmain/public/publicAction.php
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class publicClassAction extends ActionNot{
private $officedocx;
public function initAction()
{
$this->mweblogin(0, false);
$this->officedocx = ',doc,docx,xls,xlsx,ppt,pptx,';
}
//文档预览的
public function fileviewerAction()
{
$id = (int)$this->get('id','0');
$fobj = m('file');
$frs= $fobj->getone($id);
if(!$frs)exit('文件的记录不存在了1');
$type = $frs['fileext'];
$filepath = $frs['filepath'];
$filepathout= arrvalue($frs, 'filepathout');
if(substr($filepath, 0,4)!='http' && isempt($filepathout) && !file_exists($filepath))exit('文件不存在了2');
$types = ','.$type.',';
if(contain($this->officedocx, $types)){
$filepath = $frs['pdfpath'];
if(isempt($filepath)){
$this->topdfshow($frs, 1);
return;
}
if(!file_exists($filepath)){
$this->topdfshow($frs, 1);
return;
}else{
$exta = substr($filepath, -4);
if($exta=='html')$this->rock->location($filepath);
}
}else if($type=='mp4' || $type=='mp3'){
$this->displayfile = ''.P.'/public/fileopen_mp4.html';
}else if($fobj->isyulan($type)){
$content = '';
if(file_exists($filepath)){
$content = file_get_contents($filepath);
if(substr($filepath,-6)=='uptemp')$content = base64_decode($content);
$bm = c('check')->getencode($content);
if(!contain($bm, 'utf')){
$content = @iconv($bm,'utf-8', $content);
}
}else{
if(!isempt($filepathout)){
return $this->getdstr($frs);
}
}
$this->smartydata['content'] = $content;
$this->smartydata['fileext'] = $type;
$this->smartydata['filesizecn'] = $frs['filesizecn'];
$this->displayfile = ''.P.'/public/fileopen.html';//直接打开文件
}else if($type=='pdf'){
后面还有 119 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
