include/dialog/select_soft_post.php
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* 软件发送
*
* @version $Id: select_soft_post.php 1 9:43 2010年7月8日Z tianya $
* @package DedeCMS.Dialog
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc.
* @license http://help.dedecms.com/usersguide/license.html
* @link http://www.dedecms.com
*/
if(!isset($cfg_basedir))
{
include_once(dirname(__FILE__).'/config.php');
}
if(empty($uploadfile)) $uploadfile = '';
if(empty($uploadmbtype)) $uploadmbtype = '软件类型';
if(empty($bkurl)) $bkurl = 'select_soft.php';
$CKEditorFuncNum = (isset($CKEditorFuncNum))? $CKEditorFuncNum : 1;
$newname = ( empty($newname) ? '' : preg_replace("#[\\ \"\*\?\t\r\n<>':\/|]#", "", $newname) );
if(!is_uploaded_file($uploadfile))
{
ShowMsg("你没有选择上传的文件或选择的文件大小超出限制!", "-1");
exit();
}
//软件类型所有支持的附件
$cfg_softtype = $cfg_softtype;
$cfg_softtype = str_replace('||', '|', $cfg_softtype);
$uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name));
if(!preg_match("#\.(".$cfg_softtype.")#i", $uploadfile_name))
{
ShowMsg("你所上传的{$uploadmbtype}不在许可列表,请更改系统对扩展名限定的配置!","");
exit();
}
$nowtme = time();
if($activepath==$cfg_soft_dir)
{
$newdir = MyDate($cfg_addon_savetype, $nowtme);
$activepath = $activepath.'/'.$newdir;
if(!is_dir($cfg_basedir.$activepath))
{
MkdirAll($cfg_basedir.$activepath,$cfg_dir_purview);
CloseFtp();
}
}
//文件名(前为手工指定, 后者自动处理)
if(!empty($newname))
{
$filename = $newname;
if(!preg_match("#\.#", $filename)) $fs = explode('.', $uploadfile_name);
else $fs = explode('.', $filename);
if(preg_match("#".$cfg_not_allowall."#", $fs[count($fs)-1]))
{
ShowMsg("你指定的文件名被系统禁止!",'javascript:;');
exit();
}
if(!preg_match("#\.#", $filename)) $filename = $filename.'.'.$fs[count($fs)-1];
后面还有 52 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
