Browse Source

调整符号一切从简

tags/6.1.0^2
xushubieli 3 years ago
parent
commit
488775a8ad
9 changed files with 38 additions and 38 deletions
  1. +2
    -2
      src/admin/ad_edit.php
  2. +21
    -21
      src/admin/config.php
  3. +1
    -1
      src/admin/dialog/select_templets_post.php
  4. +3
    -3
      src/admin/sys_repair.php
  5. +2
    -2
      src/admin/templets/stepselect_showajax.htm
  6. +3
    -3
      src/system/database/dedesqli.class.php
  7. +2
    -2
      src/system/database/dedesqlite.class.php
  8. +2
    -2
      src/theme/templets/article_default.htm
  9. +2
    -2
      src/theme/templets/article_default_sg.htm

+ 2
- 2
src/admin/ad_edit.php View File

@@ -25,8 +25,8 @@ if ($dopost == 'delete') {
$showhtml .= "预览:<iframe name='testfrm' frameborder='0' src='ad_edit.php?aid={$aid}&dopost=testjs' id='testfrm' width='100%' height='200'></iframe>";
$row = $dsql->GetOne("SELECT tagname from `#@__myad` WHERE aid='$aid' ");
$showtag = '{'."dede:myad name='{$row['tagname']}'/".'}';
$info = "<b>说明:</b>如果嵌入的是织梦CMS广告标签,那么将会解析成标签中的内容到页面,广告修改后需要重新生成<br>
如果不希望重新生成所有页面,则直接调用JS代码即可
$info = "<b>说明:</b>如果嵌入的是织梦CMS广告标签,那么将会解析成标签中的内容到页面,广告修改后需要重新生成<br>
如果不希望重新生成所有页面,则直接调用JS代码即可
";
$wintitle = "广告管理-获取广告标签";
$wecome_info = "<a href='ad_main.php'>广告管理</a>::获取JS";


+ 21
- 21
src/admin/config.php View File

@@ -9,14 +9,14 @@
* @link https://www.dedebiz.com
*/
define('DEDEADMIN', str_replace("\\", '/', dirname(__FILE__)));
require_once(DEDEADMIN . '/../system/common.inc.php');
require_once(DEDEINC . '/userlogin.class.php');
require_once(DEDEADMIN.'/../system/common.inc.php');
require_once(DEDEINC.'/userlogin.class.php');
header('Cache-Control:private');
$dsql->safeCheck = FALSE;
$dsql->SetLongLink();
$cfg_admin_skin = 1;//后台管理风格
if (file_exists(DEDEDATA . '/admin/skin.txt')) {
$skin = file_get_contents(DEDEDATA . '/admin/skin.txt');
if (file_exists(DEDEDATA.'/admin/skin.txt')) {
$skin = file_get_contents(DEDEDATA.'/admin/skin.txt');
$cfg_admin_skin = !in_array($skin, array(1, 2, 3, 4)) ? 1 : $skin;
}
//检查CSRF
@@ -51,9 +51,9 @@ $cuserLogin = new userLogin();
if ($cuserLogin->getUserID() == -1) {
if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) {
$dirname = dirname($_SERVER['SCRIPT_NAME']);
header("location:{$dirname}/login.php?gotopage=" . urlencode($dedeNowurl));
header("location:{$dirname}/login.php?gotopage=".urlencode($dedeNowurl));
} else {
header("location:login.php?gotopage=" . urlencode($dedeNowurl));
header("location:login.php?gotopage=".urlencode($dedeNowurl));
}
exit();
}
@@ -76,9 +76,9 @@ if ($cfg_dede_log == 'Y') {
$s_scriptNames = explode('/', $s_scriptName);
$s_scriptNames = $s_scriptNames[count($s_scriptNames) - 1];
$s_userip = GetIP();
if ($s_method == 'POST' || (!preg_match("#" . $s_nologfile . "#i", $s_scriptNames) && $s_query != '') || preg_match("#" . $s_needlogfile . "#i", $s_scriptNames)) {
if ($s_method == 'POST' || (!preg_match("#".$s_nologfile."#i", $s_scriptNames) && $s_query != '') || preg_match("#".$s_needlogfile."#i", $s_scriptNames)) {
$inquery = "INSERT INTO `#@__log`(adminid,filename,method,query,cip,dtime)
VALUES ('" . $cuserLogin->getUserID() . "','{$s_scriptNames}','{$s_method}','" . addslashes($s_query) . "','{$s_userip}','" . time() . "');";
VALUES ('".$cuserLogin->getUserID()."','{$s_scriptNames}','{$s_method}','".addslashes($s_query)."','{$s_userip}','".time()."');";
$dsql->ExecuteNoneQuery($inquery);
}
}
@@ -86,12 +86,12 @@ if (file_exists(DEDEDATA."/downmix.data.php")) {
rename(DEDEDATA."/downmix.data.php",DEDEDATA."/downmix.data.inc");
}
//管理缓存管理员频道缓存
$cache1 = DEDEDATA . '/cache/inc_catalog_base.inc';
$cache1 = DEDEDATA.'/cache/inc_catalog_base.inc';
if (!file_exists($cache1)) UpDateCatCache();
$cacheFile = DEDEDATA . '/cache/admincat_' . $cuserLogin->userID . '.inc';
$cacheFile = DEDEDATA.'/cache/admincat_'.$cuserLogin->userID.'.inc';
if (file_exists($cacheFile)) require_once($cacheFile);
//更新服务器
require_once(DEDEDATA . '/admin/config_update.php');
require_once(DEDEDATA.'/admin/config_update.php');
if (strlen($cfg_cookie_encode) <= 10) {
$chars = 'abcdefghigklmnopqrstuvwxwyABCDEFGHIGKLMNOPQRSTUVWXWY0123456789';
$hash = '';
@@ -101,25 +101,25 @@ if (strlen($cfg_cookie_encode) <= 10) {
$hash .= $chars[mt_rand(0, $max)];
}
$dsql->ExecuteNoneQuery("UPDATE `#@__sysconfig` SET `value`='{$hash}' WHERE varname='cfg_cookie_encode' ");
$configfile = DEDEDATA . '/config.cache.inc.php';
$configfile = DEDEDATA.'/config.cache.inc.php';
if (!is_writeable($configfile)) {
echo "配置文件'{$configfile}'不支持写入,无法修改系统配置参数";
exit();
}
$fp = fopen($configfile, 'w');
flock($fp, 3);
fwrite($fp, "<" . "?php\r\n");
fwrite($fp, "<"."?php\r\n");
$dsql->SetQuery("SELECT `varname`,`type`,`value`,`groupid` FROM `#@__sysconfig` ORDER BY aid ASC ");
$dsql->Execute();
while ($row = $dsql->GetArray()) {
if ($row['type'] == 'number') {
if ($row['value'] == '') $row['value'] = 0;
fwrite($fp, "\${$row['varname']} = " . $row['value'] . ";\r\n");
fwrite($fp, "\${$row['varname']} = ".$row['value'].";\r\n");
} else {
fwrite($fp, "\${$row['varname']} = '" . str_replace("'", '', $row['value']) . "';\r\n");
fwrite($fp, "\${$row['varname']} = '".str_replace("'", '', $row['value'])."';\r\n");
}
}
fwrite($fp, "?" . ">");
fwrite($fp, "?".">");
fclose($fp);
}
/**
@@ -131,8 +131,8 @@ if (strlen($cfg_cookie_encode) <= 10) {
function UpDateCatCache()
{
global $dsql, $cache1, $cuserLogin;
$cache2 = DEDEDATA . '/cache/channelsonlist.inc';
$cache3 = DEDEDATA . '/cache/channeltoplist.inc';
$cache2 = DEDEDATA.'/cache/channelsonlist.inc';
$cache3 = DEDEDATA.'/cache/channeltoplist.inc';
$dsql->SetQuery("SELECT id,reid,channeltype,issend,typename FROM `#@__arctype`");
$dsql->Execute();
$fp1 = fopen($cache1, 'w');
@@ -153,8 +153,8 @@ function UpDateCatCache()
//清空选项缓存
function ClearOptCache()
{
$tplCache = DEDEDATA . '/tplcache/';
$fileArray = glob($tplCache . "inc_option_*.inc");
$tplCache = DEDEDATA.'/tplcache/';
$fileArray = glob($tplCache."inc_option_*.inc");
if (count($fileArray) > 1) {
foreach ($fileArray as $key => $value) {
if (file_exists($value)) unlink($value);
@@ -174,7 +174,7 @@ function ClearOptCache()
*/
function DedeInclude($filename, $isabs = FALSE)
{
return $isabs ? $filename : DEDEADMIN . '/' . $filename;
return $isabs ? $filename : DEDEADMIN.'/'.$filename;
}
/**
* 根据用户mid获取用户名称


+ 1
- 1
src/admin/dialog/select_templets_post.php View File

@@ -29,7 +29,7 @@ if ($filename =='') {
$filename = $uploadfile_name;
}
$filename = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $filename));
if ($filename == '' || !preg_match("#\.(" . $cfg_txttype . ")#i", $filename)) {
if ($filename == '' || !preg_match("#\.(".$cfg_txttype.")#i", $filename)) {
ShowMsg("您所上传的文件存在问题,请检查文件类型是否适合", "-1");
}
$fullfilename = $cfg_basedir.$activepath."/".$filename;


+ 3
- 3
src/admin/sys_repair.php View File

@@ -24,12 +24,12 @@ if (empty($dopost)) {
<tr>
<td height='250' valign='top'>
<br>
由于手动升级时用户没运行指定的SQL语句,或自动升级的遗漏处理或处理出错,可能会导致一些错误,使用本工具会自动检测并处理<br><br>
由于手动升级时用户没运行指定的SQL语句,或自动升级的遗漏处理或处理出错,可能会导致一些错误,使用本工具会自动检测并处理<br><br>
<b>本工具目前主要执行下面动作:</b><br>
1、修复/优化数据表;<br>
2、更新系统缓存;<br>
3、检测系统变量一致性<br>
4、检测微表与主表数据一致性<br>
3、检测系统变量一致性<br>
4、检测微表与主表数据一致性<br>
<br>
<br>
<a href='sys_repair.php?dopost=1' class='btn btn-danger'><b>点击此开始进行常规检测&gt;&gt;</b></a>


+ 2
- 2
src/admin/templets/stepselect_showajax.htm View File

@@ -56,7 +56,7 @@ if($arr['issign']==0)
</div>
<div> 枚举名:<INPUT TYPE="text" NAME="ename" class="iptxt" style='width:180px' /></div>
<div> 排序值:<INPUT TYPE="text" NAME="disorder" class="iptxt" style='width:180px' /></div>
<div>如果不指定,默认以枚举添加先后来排序</div>
<div>如果不指定,默认以枚举添加先后来排序</div>
<div><INPUT TYPE="submit" value="确定增加" class="np coolbg"/></div>
</form>
<?php
@@ -89,7 +89,7 @@ if($arr['issign']==0)
</select>
<br>
<br>
这里仅显示数据关系,实际应用中,二级联动生成的表单是支持级连的,并非全部列出
这里仅显示数据关系,实际应用中,二级联动生成的表单是支持级连的,并非全部列出
</div>
<br style='clear:both' />
<?php


+ 3
- 3
src/system/database/dedesqli.class.php View File

@@ -20,7 +20,7 @@ if (!defined('DEDEINC')) exit('dedebiz');
//在工程所有文件中均不需要单独初始化这个类,可直接用 $dsql 或 $db 进行操作
//为了防止错误,操作完后不必关闭数据库
if (!function_exists("mysqli_init")) {
echo "DedeBIZ提示:尚未发现开启mysqli模块,请在php.ini中启用`extension=mysqli`";
echo "DedeBIZ提示:尚未发现开启mysqli模块,请在php.ini中启用`extension=mysqli`";
exit;
}
$dsql = $dsqli = $db = new DedeSqli(FALSE);
@@ -436,8 +436,8 @@ class DedeSqli
//获取上一步INSERT操作产生的ID
function GetLastID()
{
//如果 AUTO_INCREMENT 的列的类型是 BIGINT,则 mysqli_insert_id() 返回的值将不正确
//可以在 SQL 查询中用 MySQL 内部的 SQL 函数 LAST_INSERT_ID() 来替代
//如果 AUTO_INCREMENT 的列的类型是 BIGINT,则 mysqli_insert_id() 返回的值将不正确
//可以在 SQL 查询中用 MySQL 内部的 SQL 函数 LAST_INSERT_ID() 来替代
//$rs = mysqli_query($this->linkID, "Select LAST_INSERT_ID() as lid");
//$row = mysqli_fetch_array($rs);
//return $row["lid"];


+ 2
- 2
src/system/database/dedesqlite.class.php View File

@@ -407,8 +407,8 @@ class DedeSqlite
//获取上一步INSERT操作产生的ID
function GetLastID()
{
//如果 AUTO_INCREMENT 的列的类型是 BIGINT,则 mysqli_insert_id() 返回的值将不正确
//可以在 SQL 查询中用 MySQL 内部的 SQL 函数 LAST_INSERT_ID() 来替代
//如果 AUTO_INCREMENT 的列的类型是 BIGINT,则 mysqli_insert_id() 返回的值将不正确
//可以在 SQL 查询中用 MySQL 内部的 SQL 函数 LAST_INSERT_ID() 来替代
//$rs = mysqli_query($this->linkID, "Select LAST_INSERT_ID() as lid");
//$row = mysqli_fetch_array($rs);
//return $row["lid"];


+ 2
- 2
src/theme/templets/article_default.htm View File

@@ -48,8 +48,8 @@

<div>
<div class="alert alert-warning mt-2" role="alert">
您会看到这个提示,那是因为您的系统无法识别某栏目的模型信息,或者您新建模型后,没为这个模型设计单独的模板不同模型的文档浏览页的模板为:article_模型名字标识.htm
如“article_article.htm”,更多的信息您可以在频道模型管理的地方查看
您会看到这个提示,那是因为您的系统无法识别某栏目的模型信息,或者您新建模型后,没为这个模型设计单独的模板不同模型的文档浏览页的模板为:article_模型名字标识.htm
如“article_article.htm”,更多的信息您可以在频道模型管理的地方查看
</div>




+ 2
- 2
src/theme/templets/article_default_sg.htm View File

@@ -48,8 +48,8 @@

<div>
<div class="alert alert-warning mt-2" role="alert">
您会看到这个提示,那是因为您的系统无法识别某栏目的模型信息,或者您新建模型后,没为这个模型设计单独的模板不同模型的文档浏览页的模板为:article_模型名字标识.htm
如“article_article.htm”,更多的信息您可以在频道模型管理的地方查看
您会看到这个提示,那是因为您的系统无法识别某栏目的模型信息,或者您新建模型后,没为这个模型设计单独的模板不同模型的文档浏览页的模板为:article_模型名字标识.htm
如“article_article.htm”,更多的信息您可以在频道模型管理的地方查看
</div>




Loading…
Cancel
Save