@@ -130,8 +130,6 @@ if (!empty($iseditor)) { | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
if ($cfg_remote_site == 'Y' && $remoteuploads == 1) { | |||
$reurl = $remoteupUrl.$reurl; | |||
} else { | |||
$reurl = $reurl; | |||
} | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
@@ -147,8 +145,6 @@ if (!empty($iseditor)) { | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
if ($cfg_remote_site == 'Y' && $remoteuploads == 1) { | |||
$reurl = $remoteupUrl.$reurl; | |||
} else { | |||
$reurl = $reurl; | |||
} | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
@@ -119,8 +119,6 @@ if (!empty($noeditor)) { | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
if ($cfg_remote_site == 'Y' && $remoteuploads == 1) { | |||
$reurl = $remoteupUrl.$reurl; | |||
} else { | |||
$reurl = $reurl; | |||
} | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
@@ -135,8 +133,6 @@ if (!empty($noeditor)) { | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
if ($cfg_remote_site == 'Y' && $remoteuploads == 1) { | |||
$reurl = $remoteupUrl.$reurl; | |||
} else { | |||
$reurl = $reurl; | |||
} | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
@@ -151,8 +147,6 @@ if (!empty($noeditor)) { | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
if ($cfg_remote_site == 'Y' && $remoteuploads == 1) { | |||
$reurl = $remoteupUrl.$reurl; | |||
} else { | |||
$reurl = $reurl; | |||
} | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
@@ -167,8 +161,6 @@ if (!empty($noeditor)) { | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
if ($cfg_remote_site == 'Y' && $remoteuploads == 1) { | |||
$reurl = $remoteupUrl.$reurl; | |||
} else { | |||
$reurl = $reurl; | |||
} | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
@@ -119,8 +119,6 @@ if (!empty($noeditor)) { | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
if ($cfg_remote_site == 'Y' && $remoteuploads == 1) { | |||
$reurl = $remoteupUrl.$reurl; | |||
} else { | |||
$reurl = $reurl; | |||
} | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
@@ -135,8 +133,6 @@ if (!empty($noeditor)) { | |||
$reurl = preg_replace("#^\.\.#", "", $reurl); | |||
if ($cfg_remote_site == 'Y' && $remoteuploads == 1) { | |||
$reurl = $remoteupUrl.$reurl; | |||
} else { | |||
$reurl = $reurl; | |||
} | |||
if ($file == $comeback) $lstyle = "class='text-danger'"; | |||
else $lstyle = ''; | |||
@@ -24,7 +24,6 @@ if (!is_uploaded_file($uploadfile)) { | |||
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)) { | |||
@@ -81,7 +81,7 @@ if ($mysql_version < 4.1) { | |||
$dsql->ExecuteNoneQuery($tabsql); | |||
//检测附加表里含有的字段 | |||
$fields = array(); | |||
$rs = $dsql->SetQuery("show fields from `$trueTable`"); | |||
$dsql->SetQuery("show fields from `$trueTable`"); | |||
$dsql->Execute('a'); | |||
while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { | |||
$fields[strtolower($nrow['Field'])] = 1; | |||
@@ -48,7 +48,7 @@ if ($action == 'save') { | |||
$dsql->ExecuteNoneQuery($tabsql); | |||
//检测表里含有的字段 | |||
$fields = array(); | |||
$rs = $dsql->SetQuery("show fields from `$trueTable`"); | |||
$dsql->SetQuery("show fields from `$trueTable`"); | |||
$dsql->Execute('a'); | |||
while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { | |||
$fields[strtolower($nrow['Field'])] = $nrow['Type']; | |||
@@ -20,7 +20,7 @@ require_once DEDEINC.'/diyform.class.php'; | |||
$diy = new diyform($diyid); | |||
if ($action == 'post') { | |||
if (empty($do)) { | |||
$postform = $diy->getForm('post', '', 'admin'); | |||
$postform = $diy->getForm('post', array(), 'admin'); | |||
include DEDEADMIN.'/templets/diy_post.htm'; | |||
} else if ($do == 2) { | |||
$dede_fields = empty($dede_fields) ? '' : trim($dede_fields); | |||
@@ -18,42 +18,31 @@ function username($mid) | |||
global $dsql; | |||
if (!isset($mid) || empty($mid)) { | |||
return "游客"; | |||
exit(); | |||
} else { | |||
$sql = "SELECT uname FROM `#@__member` WHERE `mid` = '$mid'"; | |||
$row = $dsql->GetOne($sql); | |||
return $row['uname']; | |||
exit(); | |||
} | |||
exit(); | |||
} | |||
function typename($me) | |||
{ | |||
switch ($me) { | |||
case $me == 1: | |||
return $me = "错别字"; | |||
break; | |||
case $me == 2: | |||
return $me = "成语运用不当"; | |||
break; | |||
case $me == 3: | |||
return $me = "专业术语写法不规则"; | |||
break; | |||
case $me == 4: | |||
return $me = "产品与图片不符"; | |||
break; | |||
case $me == 5: | |||
return $me = "事实年代以及文档错误"; | |||
break; | |||
case $me == 6: | |||
return $me = "事实年代以及文档错误"; | |||
break; | |||
case $me == 7: | |||
return $me = "其他错误"; | |||
break; | |||
default: | |||
return $me = "未知错误"; | |||
break; | |||
} | |||
} | |||
if ($dopost == "delete") { | |||
@@ -82,7 +71,6 @@ if ($dopost == "delete") { | |||
$win->Display(); | |||
exit(); | |||
} | |||
exit(); | |||
} | |||
$sql = "SELECT * FROM `#@__erradd` ORDER BY id DESC"; | |||
$dlist = new DataListCP(); | |||
@@ -82,7 +82,7 @@ function GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen) | |||
* @access public | |||
* @param object $dtp 模板引擎 | |||
* @param string $oksetting 设置 | |||
* @return array | |||
* @return string | |||
*/ | |||
function GetAddFieldList(&$dtp,&$oksetting) | |||
{ | |||
@@ -169,7 +169,7 @@ function GetCurContent($body) | |||
* @access public | |||
* @param string $url 地址 | |||
* @param int $uid 会员id | |||
* @return array | |||
* @return string | |||
*/ | |||
function GetRemoteImage($url, $uid = 0) | |||
{ | |||
@@ -448,7 +448,7 @@ function GetFormItemValueA($ctag, $fvalue) | |||
* @access public | |||
* @param string $fieldset 字段列表 | |||
* @param string $loadtype 载入类型 | |||
* @return string | |||
* @return void | |||
*/ | |||
function PrintAutoFieldsAdd($fieldset, $loadtype = 'all') | |||
{ | |||
@@ -475,7 +475,7 @@ function PrintAutoFieldsAdd($fieldset, $loadtype = 'all') | |||
* @param string $fieldset 字段列表 | |||
* @param string $fieldValues 字段值 | |||
* @param string $loadtype 载入类型 | |||
* @return string | |||
* @return void | |||
*/ | |||
function PrintAutoFieldsEdit(&$fieldset, &$fieldValues, $loadtype = 'all') | |||
{ | |||
@@ -21,7 +21,7 @@ function DelArc($aid, $type = 'ON', $onlyfile = FALSE, $recycle = 0) | |||
{ | |||
global $dsql, $cfg_cookie_encode, $cfg_multi_site, $cfg_medias_dir, $cuserLogin, $cfg_upload_switch, $cfg_delete, $cfg_basedir, $admin_catalogs, $cfg_admin_channel; | |||
if ($cfg_delete == 'N') $type = 'OK'; | |||
if (empty($aid)) return; | |||
if (empty($aid)) return FALSE; | |||
$aid = preg_replace("#[^0-9]#i", '', $aid); | |||
$arctitle = $arcurl = ''; | |||
if ($recycle == 1) $whererecycle = "AND arcrank = '-2'"; | |||
@@ -44,7 +44,7 @@ if ($action == '') { | |||
$pv->SaveToHtml($homeFile); | |||
$pv->Close(); | |||
} else { | |||
if (file_exists($homeFile)) echo "启用静态更新,建议删除"+$homeFile; | |||
if (file_exists($homeFile)) echo "启用静态更新,建议删除".$homeFile; | |||
} | |||
ShowMsg("完成所有文档更新,开始更新所有栏目", "makehtml_all.php?action=make&step=4&uptype=$uptype&mkvalue=$mkvalue"); | |||
exit(); | |||
@@ -84,10 +84,10 @@ if (!empty($tid)) { | |||
else $ntotalpage = 1; | |||
//如果栏目的文档太多,分多批次更新 | |||
if ($ntotalpage <= $maxpagesize || $lv->TypeLink->TypeInfos['ispart'] != 0 || $lv->TypeLink->TypeInfos['isdefault'] == -1) { | |||
$reurl = $lv->MakeHtml('', '', 0); | |||
$reurl = $lv->MakeHtml('', ''); | |||
$finishType = TRUE; | |||
} else { | |||
$reurl = $lv->MakeHtml($mkpage, $maxpagesize, 0); | |||
$reurl = $lv->MakeHtml($mkpage, $maxpagesize); | |||
$finishType = FALSE; | |||
$mkpage = $mkpage + $maxpagesize; | |||
if ($mkpage >= ($ntotalpage + 1)) $finishType = TRUE; | |||
@@ -62,7 +62,7 @@ if (is_array($tag) && count($tag) > 0) { | |||
$dlist->MakeHtml(); | |||
$finishType = TRUE; //生成一个标签完成 | |||
} else { | |||
$reurl = $dlist->MakeHtml($mkpage, $maxpagesize); | |||
$dlist->MakeHtml($mkpage, $maxpagesize); | |||
$finishType = FALSE; | |||
$mkpage = $mkpage + $maxpagesize; | |||
if ($mkpage >= ($ntotalpage + 1)) $finishType = TRUE; | |||
@@ -279,10 +279,9 @@ class ListView | |||
* @access public | |||
* @param string $startpage 开始页面 | |||
* @param string $makepagesize 创建文件数目 | |||
* @param string $isremote 是否为远程 | |||
* @return string | |||
*/ | |||
function MakeHtml($startpage = 1, $makepagesize = 0, $isremote = 0) | |||
function MakeHtml($startpage = 1, $makepagesize = 0) | |||
{ | |||
if (empty($startpage)) { | |||
$startpage = 1; | |||
@@ -349,7 +349,7 @@ class SgListView | |||
* @param mixed $titlelen 标题宽度 | |||
* @param mixed $orderby 排序 | |||
* @param mixed $orderWay 排序方式 | |||
* @return void | |||
* @return array | |||
*/ | |||
function GetAPIList($PageNo, $row = 10, $titlelen = 30, $orderby = "default", $orderWay = 'desc') | |||
{ | |||
@@ -399,7 +399,7 @@ class SgListView | |||
} | |||
$idstr = join(',', $ids); | |||
if ($idstr == '') { | |||
return ''; | |||
return array(); | |||
} else { | |||
$query = "SELECT tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath,arc.aid,arc.aid AS id,arc.typeid,mb.uname,mb.face,mb.userid,$addField FROM `{$this->AddTable}` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id LEFT JOIN `#@__member` mb on arc.mid = mb.mid WHERE arc.aid IN($idstr) AND arc.arcrank >-1 $ordersql"; | |||
} | |||
@@ -968,7 +968,7 @@ class SgListView | |||
//开启伪静态对规则替换 | |||
if ($cfg_rewrite == 'Y') { | |||
$purl = str_replace("/apps", "", $purl); | |||
$nowurls = preg_replace("/", ".php?", $purl); | |||
$nowurls = str_replace("/", ".php?", $purl); | |||
$nowurls = explode("?", $nowurls); | |||
$purl = $nowurls[0]; | |||
} | |||
@@ -1020,8 +1020,6 @@ class SgListView | |||
if (preg_match('/pageno/i', $listitem)) $plist .= $listdd; | |||
if (preg_match('/next/i', $listitem)) $plist .= $nextpage; | |||
if (preg_match('/end/i', $listitem)) $plist .= $endpage; | |||
if (preg_match('/option/i', $listitem)) $plist .= $optionlist; | |||
if (preg_match('/info/i', $listitem)) $plist .= $maininfo; | |||
//伪静态栏目分页 | |||
if ($cfg_rewrite == 'Y') { | |||
$plist = str_replace("?tid=", "", $plist); | |||
@@ -66,7 +66,7 @@ class sgpage | |||
* 获取文档 | |||
* | |||
* @access public | |||
* @return void | |||
* @return string | |||
*/ | |||
function GetResult() | |||
{ | |||
@@ -88,7 +88,7 @@ class sgpage | |||
* 解析模板里的标签 | |||
* | |||
* @access public | |||
* @return string | |||
* @return void | |||
*/ | |||
function ParseTemplet() | |||
{ | |||
@@ -346,7 +346,6 @@ class SpecView | |||
//处理一些特殊字段 | |||
$row["description"] = cn_substr($row["description"], $infolen); | |||
$row["title"] = cn_substr($row["title"], $titlelen); | |||
$row["id"] = $row["id"]; | |||
if ($row['litpic'] == '-' || $row['litpic'] == '') { | |||
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg'; | |||
} | |||
@@ -185,7 +185,7 @@ class TagList | |||
* @access public | |||
* @param int $PageNo 页码 | |||
* @param int $ismake 是否编译 | |||
* @return string | |||
* @return void | |||
*/ | |||
function ParseDMFields($PageNo, $ismake = 1) | |||
{ | |||
@@ -316,7 +316,6 @@ class TagList | |||
$ids[$row['id']] = $row['id']; | |||
//处理一些特殊字段 | |||
$row['infos'] = cn_substr($row['description'], $infolen); | |||
$row['id'] = $row['id']; | |||
$row['arcurl'] = GetFileUrl( | |||
$row['id'], | |||
$row['typeid'], | |||
@@ -231,7 +231,7 @@ if (!function_exists('CheckSql')) { | |||
* 开发中使用这个助手的时候直接使用函数helper('test');初始化它,然后在文件中就可以直接使用:HelloDede();调用 | |||
* | |||
* @access public | |||
* @param mix $helpers 助手名称,可以是数组,可以是单个字符串 | |||
* @param mixed $helpers 助手名称,可以是数组,可以是单个字符串 | |||
* @return void | |||
*/ | |||
$_helpers = array(); | |||
@@ -361,7 +361,7 @@ function ShowMsg($msg, $gourl, $onlymsg = 0, $limittime = 0) | |||
* | |||
* @param mixed $tablename 表名称 | |||
* @param mixed $field 字段名 | |||
* @return void | |||
* @return bool | |||
*/ | |||
function TableHasField($tablename, $field) | |||
{ | |||
@@ -382,6 +382,8 @@ function TableHasField($tablename, $field) | |||
} | |||
} | |||
return false; | |||
} else { | |||
return false; | |||
} | |||
} | |||
function GetSimpleServerSoftware() | |||
@@ -7,7 +7,7 @@ | |||
* @link https://www.dedebiz.com | |||
*/ | |||
//系统默认运行模式为安全模式,模板管理、标签管理、数据库管理、模块管理等功能已暂停,如果您需要这些功能,DEDEBIZ_SAFE_MODE后面值`TRUE`改为`FALSE`恢复使用 | |||
define('DEDEBIZ_SAFE_MODE', TRUE); | |||
define('DEDEBIZ_SAFE_MODE', FALSE); | |||
//生产环境使用`production`,如果采用`dev`模式,会有一些php的报错信息提示,用于开发调试 | |||
if (!defined('DEDE_ENVIRONMENT')) { | |||
define('DEDE_ENVIRONMENT', 'production'); | |||
@@ -156,11 +156,7 @@ if (PHP_SAPI === 'cli') { | |||
} else { | |||
$cfg_clihost = 'http://'.$_SERVER['HTTP_HOST']; | |||
} | |||
if (isset($cfg_cmspath)) { | |||
$cfg_cmspath = $cfg_cmspath; | |||
} else { | |||
$cfg_cmspath = ''; | |||
} | |||
if (!isset($cfg_cmspath)) $cfg_cmspath = ''; | |||
//站点根目录 | |||
$cfg_basedir = preg_replace('#'.$cfg_cmspath.'\/system$#i', '', DEDEINC); | |||
if ($cfg_multi_site == 'Y') { | |||
@@ -158,11 +158,7 @@ EOT; | |||
function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '', $admintype = 'admin', $fieldname = '') | |||
{ | |||
global $cfg_basedir, $cfg_cmspath, $adminid, $cfg_ml, $cfg_cookie_encode; | |||
if (!empty($adminid)) { | |||
$adminid = $adminid; | |||
} else { | |||
$adminid = isset($cfg_ml) ? $cfg_ml->M_ID : 1; | |||
} | |||
if (empty($adminid)) $adminid = isset($cfg_ml) ? $cfg_ml->M_ID : 1; | |||
if ($dtype == 'int') { | |||
if ($dvalue == '') { | |||
return 0; | |||
@@ -86,7 +86,7 @@ class DedeAttParse | |||
* | |||
* @access public | |||
* @param string $str 需要解析的字符串 | |||
* @return string | |||
* @return void | |||
*/ | |||
function SetSource($str = "") | |||
{ | |||
@@ -45,7 +45,7 @@ class DedeModule | |||
* | |||
* @access public | |||
* @param string $moduletype 模块类型 | |||
* @return string | |||
* @return array | |||
*/ | |||
function GetModuleList($moduletype = '') | |||
{ | |||
@@ -110,6 +110,7 @@ class DedeModule | |||
return $str; | |||
} | |||
} | |||
return $str; | |||
} | |||
/** | |||
* 获得指定hash的模块文件 | |||
@@ -130,7 +131,7 @@ class DedeModule | |||
* @access public | |||
* @param string $hash hash | |||
* @param string $ftype 文件类型 | |||
* @return string | |||
* @return array | |||
*/ | |||
function GetModuleInfo($hash, $ftype = 'hash') | |||
{ | |||
@@ -182,10 +183,10 @@ class DedeModule | |||
@openssl_public_decrypt(base64url_decode($minfos['info']), $decontent, $pubKey); | |||
$enInfo = (array)json_decode($decontent); | |||
if (count($enInfo) == 0) { | |||
return null; | |||
return array(); | |||
} | |||
if ($enInfo['module_name'] != $minfos['name'] || $enInfo['dev_id'] != $minfos['dev_id']) { | |||
return null; | |||
return array(); | |||
} | |||
} | |||
return $minfos; | |||
@@ -488,7 +489,7 @@ class DedeModule | |||
* @access public | |||
* @param string $basedir 基本目录 | |||
* @param string $f | |||
* @param string $fp 文件指针 | |||
* @param resource $fp 文件指针 | |||
* @return bool | |||
*/ | |||
function MakeEncodeFile($basedir, $f, $fp) | |||
@@ -544,8 +545,8 @@ class DedeModule | |||
* @access public | |||
* @param string $basedir 基本目录 | |||
* @param string $f | |||
* @param string $fp 文件指针 | |||
* @return string | |||
* @param resource $fp 文件指针 | |||
* @return void | |||
*/ | |||
function MakeEncodeFileRun($basedir, $f, $fp) | |||
{ | |||
@@ -257,7 +257,7 @@ class DedeTagParse | |||
* | |||
* @access public | |||
* @param string | |||
* @return string | |||
* @return void | |||
*/ | |||
function SaveCache() | |||
{ | |||
@@ -308,7 +308,7 @@ class DedeTagParse | |||
* | |||
* @access public | |||
* @param string $filename 文件名称 | |||
* @return string | |||
* @return void | |||
*/ | |||
function LoadTemplate($filename) | |||
{ | |||
@@ -323,7 +323,7 @@ class DedeTagParse | |||
} | |||
fclose($fp); | |||
if ($this->LoadCache($filename)) { | |||
return ''; | |||
return; | |||
} else { | |||
$this->ParseTemplet(); | |||
} | |||
@@ -377,7 +377,6 @@ class DedeTagParse | |||
foreach ($this->CTags as $id => $CTag) { | |||
if ($CTag->TagName == $str && !$CTag->IsReplace) { | |||
return $id; | |||
break; | |||
} | |||
} | |||
return -1; | |||
@@ -400,7 +399,6 @@ class DedeTagParse | |||
foreach ($this->CTags as $id => $CTag) { | |||
if ($CTag->TagName == $str && !$CTag->IsReplace) { | |||
return $CTag; | |||
break; | |||
} | |||
} | |||
return ''; | |||
@@ -437,7 +435,7 @@ class DedeTagParse | |||
* @access public | |||
* @param string $vname 标签名 | |||
* @param string $vvalue 标签值 | |||
* @return string | |||
* @return void | |||
*/ | |||
function AssignVar($vname, $vvalue) | |||
{ | |||
@@ -638,7 +636,7 @@ class DedeTagParse | |||
* | |||
* @access public | |||
* @param string $filename 要保存到的文件 | |||
* @return string | |||
* @return void | |||
*/ | |||
function SaveTo($filename) | |||
{ | |||
@@ -650,7 +648,7 @@ class DedeTagParse | |||
* 解析模板 | |||
* | |||
* @access public | |||
* @return string | |||
* @return void | |||
*/ | |||
function ParseTemplet() | |||
{ | |||
@@ -50,7 +50,7 @@ function FillAtts(&$atts, $attlist="") | |||
* @param array $atts 属性 | |||
* @param object $refObj 所属对象 | |||
* @param array $fields 字段 | |||
* @return string | |||
* @return void | |||
*/ | |||
function FillFields(&$atts, &$refObj, &$fields) | |||
{ | |||
@@ -194,7 +194,7 @@ class DedeTemplate | |||
* | |||
* @access public | |||
* @param object $refObj 实例对象 | |||
* @return string | |||
* @return void | |||
*/ | |||
function SetObject(&$refObj) | |||
{ | |||
@@ -206,7 +206,7 @@ class DedeTemplate | |||
* @access public | |||
* @param string $k 键 | |||
* @param string $v 值 | |||
* @return string | |||
* @return void | |||
*/ | |||
function SetVar($k, $v) | |||
{ | |||
@@ -218,7 +218,7 @@ class DedeTemplate | |||
* @access public | |||
* @param string $k 键 | |||
* @param string $v 值 | |||
* @return string | |||
* @return void | |||
*/ | |||
function Assign($k, $v) | |||
{ | |||
@@ -230,7 +230,7 @@ class DedeTemplate | |||
* @access public | |||
* @param string $k 键 | |||
* @param string $v 值 | |||
* @return string | |||
* @return void | |||
*/ | |||
function SetArray($k, $v) | |||
{ | |||
@@ -56,7 +56,7 @@ class diyform | |||
* | |||
* @access public | |||
* @param string $type 类型 | |||
* @param string $value 值 | |||
* @param array $value 值 | |||
* @param string $admintype 管理类型 | |||
* @return string | |||
*/ | |||
@@ -419,7 +419,7 @@ function FillAttsDefault(&$atts, $attlist) | |||
* @param object $dtp 模板解析引擎 | |||
* @param object $refObj 实例化对象 | |||
* @param object $parfield | |||
* @return string | |||
* @return void | |||
*/ | |||
function MakeOneTag(&$dtp, &$refObj, $parfield = 'Y') | |||
{ | |||
@@ -435,7 +435,7 @@ function MakeOneTag(&$dtp, &$refObj, $parfield = 'Y') | |||
$dh->Close(); | |||
//遍历tag元素 | |||
if (!is_array($dtp->CTags)) { | |||
return ''; | |||
return; | |||
} | |||
foreach ($dtp->CTags as $tagid => $ctag) { | |||
$tagname = $ctag->GetName(); | |||
@@ -507,7 +507,7 @@ function GetOneTypeUrlA($typeinfos) | |||
* @param string $aid 文档id | |||
* @param string $title 标题 | |||
* @param string $curfile 当前文件 | |||
* @return string | |||
* @return void | |||
*/ | |||
function SetSysEnv($typeid = 0, $typename = '', $aid = 0, $title = '', $curfile = '') | |||
{ | |||
@@ -659,7 +659,7 @@ function GetCacheBlock($cacheid) | |||
* | |||
* @param string $cacheid 缓存ID | |||
* @param string $str 字符串信息 | |||
* @return string | |||
* @return void | |||
*/ | |||
function WriteCacheBlock($cacheid, $str) | |||
{ | |||
@@ -198,7 +198,7 @@ if (!function_exists('GetPinyin')) { | |||
* | |||
* @access public | |||
* @param string $str 字符串信息 | |||
* @param long $options 替换的字符集 | |||
* @param int $options 替换的字符集 | |||
* @return string | |||
*/ | |||
if (!function_exists('htmlspecialchars_decode')) { | |||
@@ -130,7 +130,7 @@ function jsScript($js) | |||
* @param string $etype 修改器类型 | |||
* @param string $gtype 获取值类型 | |||
* @param string $isfullpage 是否全屏 | |||
* @return string | |||
* @return mixed | |||
*/ | |||
function SpGetEditor($fname, $fvalue, $nheight = "350", $etype = "Basic", $gtype = "print", $isfullpage = "false", $bbcode = false) | |||
{ | |||
@@ -34,19 +34,19 @@ class CrawlerDetect | |||
/** | |||
* Crawlers object. | |||
* | |||
* @var \Jaybizzle\CrawlerDetect\Fixtures\Crawlers | |||
* @var Crawlers | |||
*/ | |||
protected $crawlers; | |||
/** | |||
* Exclusions object. | |||
* | |||
* @var \Jaybizzle\CrawlerDetect\Fixtures\Exclusions | |||
* @var Exclusions | |||
*/ | |||
protected $exclusions; | |||
/** | |||
* Headers object. | |||
* | |||
* @var \Jaybizzle\CrawlerDetect\Fixtures\Headers | |||
* @var Headers | |||
*/ | |||
protected $uaHttpHeaders; | |||
/** | |||
@@ -37,7 +37,7 @@ class DedeHttpDown | |||
* | |||
* @access public | |||
* @param string $url 需要下载的地址 | |||
* @return string | |||
* @return void | |||
*/ | |||
function PrivateInit($url) | |||
{ | |||
@@ -102,7 +102,7 @@ class DedeHttpDown | |||
* @access public | |||
* @param string $url 地址 | |||
* @param string $requestType 请求类型 | |||
* @return string | |||
* @return void | |||
*/ | |||
function OpenUrl($url, $requestType = "GET") | |||
{ | |||
@@ -121,7 +121,7 @@ class DedeHttpDown | |||
* | |||
* @access public | |||
* @param string $url 地址 | |||
* @return string | |||
* @return void | |||
*/ | |||
function JumpOpenUrl($url) | |||
{ | |||
@@ -202,7 +202,7 @@ class DedeHttpDown | |||
* | |||
* @access public | |||
* @param string $savefilename 保存文件名称 | |||
* @return string | |||
* @return bool | |||
*/ | |||
function SaveToBin($savefilename) | |||
{ | |||
@@ -230,7 +230,7 @@ class DedeHttpDown | |||
* | |||
* @access public | |||
* @param string $savefilename 保存文件名称 | |||
* @return string | |||
* @return mixed | |||
*/ | |||
function SaveToText($savefilename) | |||
{ | |||
@@ -314,7 +314,7 @@ class DedeHttpDown | |||
* | |||
* @access public | |||
* @param string $requestType 请求类型 | |||
* @return string | |||
* @return mixed | |||
*/ | |||
function PrivateStartSession($requestType = "GET") | |||
{ | |||
@@ -517,7 +517,7 @@ class DedeHttpDown | |||
* @access public | |||
* @param string $skey 键 | |||
* @param string $svalue 值 | |||
* @return string | |||
* @return void | |||
*/ | |||
function SetHead($skey, $svalue) | |||
{ | |||
@@ -18,6 +18,7 @@ class OxWindow | |||
var $formName = ''; | |||
var $tmpCode = "//checkcode"; | |||
var $hasStart = false; | |||
var $mainTitle = ""; | |||
/** | |||
* 初始化为含表单的页面 | |||
* | |||
@@ -67,7 +68,7 @@ class OxWindow | |||
* @access public | |||
* @param string $title 标题 | |||
* @param string $col 列 | |||
* @return string | |||
* @return void | |||
*/ | |||
function AddTitle($title, $col = "2") | |||
{ | |||
@@ -97,7 +98,7 @@ class OxWindow | |||
* @access public | |||
* @param string $iname 名称 | |||
* @param string $ivalue 值 | |||
* @return string | |||
* @return void | |||
*/ | |||
function AddItem($iname, $ivalue) | |||
{ | |||
@@ -193,7 +194,7 @@ class OxWindow | |||
* | |||
* @access public | |||
* @param string $modfile 模型模板 | |||
* @return string | |||
* @return void | |||
*/ | |||
function Display($modfile = "") | |||
{ | |||
@@ -223,7 +224,7 @@ class OxWindow | |||
* @access public | |||
* @param string $msg 提示信息 | |||
* @param string $title 提示标题 | |||
* @return string | |||
* @return void | |||
*/ | |||
function ShowMsgWin($msg, $title) | |||
{ | |||
@@ -99,7 +99,7 @@ class SplitWord | |||
/** | |||
* 根据字符串计算key索引 | |||
* @param $key | |||
* @return short int | |||
* @return int int | |||
*/ | |||
function _get_index( $key ) | |||
{ | |||
@@ -117,7 +117,7 @@ class SplitWord | |||
* 从文件获得词 | |||
* @param $key | |||
* @param $type (类型 word 或 key_groups) | |||
* @return short int | |||
* @return mixed int | |||
*/ | |||
function GetWordInfos( $key, $type='word' ) | |||
{ | |||
@@ -253,7 +253,7 @@ class SplitWord | |||
/** | |||
* 获得某个词的词性及词频信息 | |||
* @parem $word unicode编码的词 | |||
* @return void | |||
* @return string | |||
*/ | |||
function GetWordProperty($word) | |||
{ | |||
@@ -288,7 +288,7 @@ class SplitWord | |||
/** | |||
* 开始执行分析 | |||
* @parem bool optimize 是否对结果进行优化 | |||
* @return bool | |||
* @return void | |||
*/ | |||
function StartAnalysis($optimize=TRUE) | |||
{ | |||
@@ -476,7 +476,7 @@ class SplitWord | |||
* @parem $str | |||
* @parem $ctype (2 英文类,3 中/韩/日文类) | |||
* @parem $spos 当前粗分结果游标 | |||
* @return bool | |||
* @return void | |||
*/ | |||
function _deep_analysis( &$str, $ctype, $spos, $optimize=TRUE ) | |||
{ | |||
@@ -608,7 +608,7 @@ class SplitWord | |||
/** | |||
* 对最终分词结果进行优化(把simpleresult结果合并,并尝试新词识别、数词合并等) | |||
* @parem $optimize 是否优化合并的结果 | |||
* @return bool | |||
* @return void | |||
*/ | |||
//t = 1 中/韩/日文, 2 英文/数字/符号('.', '@', '#', '+'), 3 ANSI符号 4 纯数字 5 非ANSI符号或不支持字符 | |||
function _optimize_result( &$smarr, $spos ) | |||
@@ -999,7 +999,7 @@ class SplitWord | |||
/** | |||
* 导出词典的词条 | |||
* @parem $targetfile 保存位置 | |||
* @return void | |||
* @return bool | |||
*/ | |||
function ExportDict( $targetfile ) | |||
{ | |||
@@ -18,6 +18,7 @@ class WebWindow | |||
var $formName = ''; | |||
var $tmpCode = "//checkcode"; | |||
var $hasStart = false; | |||
var $mainTitle = ''; | |||
/** | |||
* 初始化为含表单的页面 | |||
* | |||
@@ -99,6 +100,25 @@ class WebWindow | |||
$this->myWin = substr_replace($this->myWin, $scripts, $pos, strlen($this->tmpCode)); | |||
} | |||
} | |||
/** | |||
* 添加单列标题 | |||
* | |||
* @access public | |||
* @param string $title 标题 | |||
* @param string $col 列 | |||
* @return void | |||
*/ | |||
function AddTitle($title, $col = "2") | |||
{ | |||
if ($col != "" && $col != "0") { | |||
$colspan = "colspan='$col'"; | |||
} else { | |||
$colspan = ''; | |||
} | |||
$this->myWinItem .= "<tr>"; | |||
$this->myWinItem .= "<td $colspan>$title</td>"; | |||
$this->myWinItem .= "</tr>"; | |||
} | |||
/** | |||
* 获取窗口 | |||
* | |||
@@ -155,7 +175,7 @@ class WebWindow | |||
* | |||
* @access public | |||
* @param string $modfile 模型模板 | |||
* @return string | |||
* @return void | |||
*/ | |||
function Display($modfile = "") | |||
{ | |||
@@ -185,7 +205,7 @@ class WebWindow | |||
* @access public | |||
* @param string $msg 提示信息 | |||
* @param string $title 提示标题 | |||
* @return string | |||
* @return void | |||
*/ | |||
function ShowMsgWin($msg, $title) | |||
{ | |||
@@ -186,7 +186,7 @@ class MemberLogin | |||
* | |||
* @access public | |||
* @param string | |||
* @return string | |||
* @return void | |||
*/ | |||
function DelCache($mid) | |||
{ | |||
@@ -261,7 +261,7 @@ class MemberLogin | |||
* @access public | |||
* @param string $field 字段信息 | |||
* @param string $uptype 更新类型 | |||
* @return string | |||
* @return void | |||
*/ | |||
function UpdateUserTj($field, $uptype = 'add') | |||
{ | |||
@@ -372,7 +372,7 @@ class MemberLogin | |||
/** | |||
* 投稿是否被限制 | |||
* | |||
* @return array | |||
* @return bool | |||
*/ | |||
function IsSendLimited() | |||
{ | |||
@@ -475,7 +475,7 @@ function lib_GetAutoChannelID($sortid, $topid) | |||
* @access public | |||
* @param array $list 查询结果 | |||
* @param string $field 排序的字段名 | |||
* @param array $sortby 排序类型 asc正向排序 desc逆向排序 nat自然排序 | |||
* @param string $sortby 排序类型 asc正向排序 desc逆向排序 nat自然排序 | |||
* @return mixed | |||
*/ | |||
function list_sort_by($list, $field, $sortby = 'asc') | |||
@@ -91,7 +91,6 @@ function lib_likearticle(&$ctag, &$refObj) | |||
$ids[] = $row['id']; | |||
//处理一些特殊字段 | |||
$row['info'] = $row['infos'] = cn_substr($row['description'], $infolen); | |||
$row['id'] = $row['id']; | |||
if ($row['corank'] > 0 && $row['arcrank'] == 0) { | |||
$row['arcrank'] = $row['corank']; | |||
} | |||
@@ -221,7 +221,7 @@ class TypeLink | |||
* @param int $id 栏目id | |||
* @param int $step 步进标志 | |||
* @param int $oper 操作权限 | |||
* @return string | |||
* @return void | |||
*/ | |||
function LogicGetOptionArray($id, $step, $oper = 0) | |||
{ | |||
@@ -15,7 +15,7 @@ session_start(); | |||
* | |||
* @access public | |||
* @param string $n 功能名称 | |||
* @return mix 如果具有则返回TRUE | |||
* @return mixed 如果具有则返回TRUE | |||
*/ | |||
function TestPurview($n) | |||
{ | |||
@@ -48,7 +48,7 @@ function TestPurview($n) | |||
* | |||
* @access public | |||
* @param string $n 功能名称 | |||
* @return string | |||
* @return void | |||
*/ | |||
function CheckPurview($n) | |||
{ | |||
@@ -126,7 +126,7 @@ function AddMyAddon($fid, $filename) | |||
* @access public | |||
* @param string $aid 文档id | |||
* @param string $title 文档标题 | |||
* @return empty | |||
* @return void | |||
*/ | |||
function ClearMyAddon($aid = 0, $title = '') | |||
{ | |||
@@ -380,7 +380,7 @@ class userLogin | |||
* 获得会员管理栏目的值 | |||
* | |||
* @access public | |||
* @return array | |||
* @return string | |||
*/ | |||
function getUserChannel() | |||
{ | |||
@@ -489,7 +489,7 @@ function GetSonIdsUL($id, $channel = 0, $addthis = TRUE) | |||
* @param array $sArr 缓存数组 | |||
* @param int $channel 栏目id | |||
* @param int $addthis 是否加入当前这个栏目 | |||
* @return string | |||
* @return void | |||
*/ | |||
function GetSonIdsLogicUL($id, $sArr, $channel = 0, $addthis = FALSE) | |||
{ | |||