@@ -1,9 +1,9 @@ | |||||
#!/usr/bin/env php | #!/usr/bin/env php | ||||
<?php | <?php | ||||
/** | /** | ||||
* 一个开发工具 | |||||
* 命令行工具 | |||||
* | * | ||||
* @version 2019年6月5日 tianya $ | |||||
* @version 2020年12月11日 tianya $ | |||||
* @package DedeBIZ.Command | * @package DedeBIZ.Command | ||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | * @copyright Copyright (c) 2020, DedeBIZ.COM | ||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
@@ -16,8 +16,48 @@ chdir($workDir); | |||||
if (substr(php_sapi_name(), 0, 3) === 'cgi') { | if (substr(php_sapi_name(), 0, 3) === 'cgi') { | ||||
die("DedeCMSV6:needs php-cli to run\n\n"); | die("DedeCMSV6:needs php-cli to run\n\n"); | ||||
} | } | ||||
$helpStr = " | |||||
NAME: | |||||
DedeBIZ Cli Tools | |||||
USAGE: | |||||
php ./dedebiz command [arguments...] | |||||
COMMANDS: | |||||
serv,s Run cli web server for DedeCMSV6 | |||||
make,m Make DedeCMSV6 HTML | |||||
update,u Update to latest system | |||||
help,h Shows a list of commands or help | |||||
WEBSITE: | |||||
https://www.dedebiz.com/help/ | |||||
"; | |||||
if (count($argv) > 1 && $argv[1] == "serv") { | |||||
// 将选项转化为SQL IN参数 | |||||
function Option2SQLin($str = "") | |||||
{ | |||||
$str = preg_replace("#[^0-9-,]#", "", $str); | |||||
$strs = explode(",", $str); | |||||
foreach ($strs as $key => $si) { | |||||
if (preg_match("#-#", $si)) { | |||||
$tstart = 0; | |||||
$tend = 0; | |||||
$tss = explode("-", $si); | |||||
if (intval($tss[0]) > intval($tss[1])) { | |||||
$tstart = intval($tss[1]); | |||||
$tend = intval($tss[0]); | |||||
} else { | |||||
$tstart = intval($tss[0]); | |||||
$tend = intval($tss[1]); | |||||
} | |||||
$tmpArr = array(); | |||||
for ($i = $tstart; $i <= $tend; $i++) { | |||||
$tmpArr[] = $i; | |||||
} | |||||
$strs[$key] = implode(",", $tmpArr); | |||||
} | |||||
} | |||||
return implode(",", $strs); | |||||
} | |||||
if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { | |||||
// PHP5.4以下不支持内建服务器 | // PHP5.4以下不支持内建服务器 | ||||
// 用于开发调试 | // 用于开发调试 | ||||
if (phpversion() < "5.4") { | if (phpversion() < "5.4") { | ||||
@@ -26,4 +66,223 @@ if (count($argv) > 1 && $argv[1] == "serv") { | |||||
echo "Start Dev Server For DedeCMSV6\n\r"; | echo "Start Dev Server For DedeCMSV6\n\r"; | ||||
echo "Open http://localhost:8088\n\r"; | echo "Open http://localhost:8088\n\r"; | ||||
passthru(PHP_BINARY . ' -S localhost:8088 -t' . escapeshellarg('./')); | passthru(PHP_BINARY . ' -S localhost:8088 -t' . escapeshellarg('./')); | ||||
} else if (count($argv) > 1 && $argv[1] == "make") { | |||||
if (!file_exists($workDir . "/include/common.inc.php")) { | |||||
DedeCli::error("Check your root path is right"); | |||||
exit; | |||||
} | |||||
require_once($workDir . "/include/common.inc.php"); | |||||
require_once(DEDEINC . "/cli.class.php"); | |||||
// 一个命令行的生成工具 | |||||
if (count($argv) > 2 && ($argv[2] == "arc" || $argv[2] == "a")) { | |||||
// 生成文档 | |||||
// make arc typeid=1 | |||||
$t1 = ExecTime(); | |||||
$addsql = "1=1"; | |||||
$typeid = Option2SQLin(DedeCli::getOption("typeid")); | |||||
if (!empty($typeid)) { | |||||
$addsql .= " AND typeid IN(" . $typeid . ")"; | |||||
} | |||||
$aid = Option2SQLin(DedeCli::getOption("aid")); | |||||
if (!empty($aid)) { | |||||
$addsql .= " AND id IN(" . $typeid . ")"; | |||||
} | |||||
$tt = $dsql->GetOne("SELECT COUNT(id) as dd FROM `#@__arctiny` WHERE " . $addsql); | |||||
$total = intval($tt['dd']); | |||||
$dsql->Execute('out', "SELECT id FROM `#@__arctiny` WHERE " . $addsql . " ORDER BY typeid ASC"); | |||||
$i = 0; | |||||
while ($row = $dsql->GetObject('out')) { | |||||
$id = $row->id; | |||||
$ac = new Archives($id); | |||||
$rurl = $ac->MakeHtml(0); | |||||
DedeCli::showProgress(ceil(($i / $total) * 100), 100); | |||||
$i++; | |||||
} | |||||
DedeCli::write("Make archive html successfull"); | |||||
$queryTime = ExecTime() - $t1; | |||||
DedeCli::write($queryTime); | |||||
exit; | |||||
} else if (count($argv) > 2 && ($argv[2] == "list" || $argv[2] == "l")) { | |||||
// 生成栏目 | |||||
$addsql = "1=1"; | |||||
$typeid = Option2SQLin(DedeCli::getOption("typeid")); | |||||
if (!empty($typeid)) { | |||||
$addsql .= " AND id IN(" . $typeid . ")"; | |||||
} | |||||
$dsql->Execute('out', "SELECT id,channeltype FROM `#@__arctype` WHERE " . $addsql); | |||||
$i = 0; | |||||
while ($row = $dsql->GetObject('out')) { | |||||
if ($row->channeltype > 0) { | |||||
$lv = new ListView($row->id); | |||||
} else { | |||||
$lv = new SgListView($row->id); | |||||
} | |||||
$lv->CountRecord(); | |||||
DedeCli::write("Start make list html[id:{$row->id}]"); | |||||
$lv->MakeHtml('', '', 0); | |||||
} | |||||
exit; | |||||
} else if (count($argv) > 2 && ($argv[2] == "index" || $argv[2] == "i")) { | |||||
// 生成首页 | |||||
$position = DedeCli::getOption("position"); | |||||
if (empty($position)) { | |||||
$position = "../index.html"; | |||||
} | |||||
if (!preg_match("#\.html$#", $position)) { | |||||
DedeCli::error("position must end with .html"); | |||||
exit; | |||||
} | |||||
$homeFile = DEDEINC . "/" . $position; | |||||
$homeFile = str_replace("\\", "/", $homeFile); | |||||
$homeFile = str_replace("//", "/", $homeFile); | |||||
$row = $dsql->GetOne("SELECT * FROM `#@__homepageset`"); | |||||
$templet = $row['templet']; | |||||
$templet = str_replace("{style}", $cfg_df_style, $templet); | |||||
$pv = new PartView(); | |||||
$GLOBALS['_arclistEnv'] = 'index'; | |||||
$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $templet); | |||||
$pv->SaveToHtml($homeFile); | |||||
DedeCli::write("Make index html successfull"); | |||||
} else if (count($argv) > 2 && ($argv[2] == "auto" || $argv[2] == "o")) { | |||||
// 自动生成 | |||||
function OptimizeData($dsql) | |||||
{ | |||||
global $cfg_dbprefix; | |||||
$tptables = array("{$cfg_dbprefix}archives", "{$cfg_dbprefix}arctiny"); | |||||
$dsql->SetQuery("SELECT maintable,addtable FROM `#@__channeltype` "); | |||||
$dsql->Execute(); | |||||
while ($row = $dsql->GetObject()) { | |||||
$addtable = str_replace('#@__', $cfg_dbprefix, $row->addtable); | |||||
if ($addtable != '' && !in_array($addtable, $tptables)) $tptables[] = $addtable; | |||||
} | |||||
$tptable = ''; | |||||
foreach ($tptables as $t) $tptable .= ($tptable == '' ? "`{$t}`" : ",`{$t}`"); | |||||
$dsql->ExecuteNoneQuery(" OPTIMIZE TABLE $tptable; "); | |||||
} | |||||
$start = empty(DedeCli::getOption("start"))? "-1 day" : DedeCli::getOption("start"); | |||||
$start = strtotime($start); | |||||
if (!$start) { | |||||
DedeCli::error("start is empty"); | |||||
exit; | |||||
} | |||||
// 1.生成首页 | |||||
$pv = new PartView(); | |||||
$row = $pv->dsql->GetOne("SELECT * FROM `#@__homepageset` "); | |||||
$templet = str_replace("{style}", $cfg_df_style, $row['templet']); | |||||
$homeFile = DEDEINC . '/' . $row['position']; | |||||
$homeFile = str_replace("\\", '/', $homeFile); | |||||
$homeFile = preg_replace("#\/{1,}#", '/', $homeFile); | |||||
if ($row['showmod'] == 1) { | |||||
$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . '/' . $templet); | |||||
$pv->SaveToHtml($homeFile); | |||||
$pv->Close(); | |||||
} else { | |||||
if (file_exists($homeFile)) @unlink($homeFile); | |||||
} | |||||
DedeCli::write("Make index html successfull"); | |||||
// 2.生成栏目 | |||||
$query = "SELECT DISTINCT typeid From `#@__arctiny` WHERE senddate >=" . $start . " AND arcrank>-1"; | |||||
$dsql->SetQuery($query); | |||||
$dsql->Execute(); | |||||
$typeids = array(); | |||||
while ($row = $dsql->GetArray()) { | |||||
$typeids[$row['typeid']] = 1; | |||||
} | |||||
if (count($typeids) > 0) { | |||||
foreach ($typeids as $k => $v) { | |||||
$vs = array(); | |||||
$vs = GetParentIds($k); | |||||
if (!isset($typeidsok[$k])) { | |||||
$typeidsok[$k] = 1; | |||||
} | |||||
foreach ($vs as $k => $v) { | |||||
if (!isset($typeidsok[$v])) { | |||||
$typeidsok[$v] = 1; | |||||
} | |||||
} | |||||
} | |||||
foreach ($typeidsok as $tt=> $k) { | |||||
$row = $dsql->GetOne("SELECT id,channeltype FROM `#@__arctype` WHERE id=".$tt); | |||||
if ($row['channeltype'] > 0) { | |||||
$lv = new ListView($tt); | |||||
} else { | |||||
$lv = new SgListView($tt); | |||||
} | |||||
$lv->CountRecord(); | |||||
DedeCli::write("Start make list html[id:{$tt}]"); | |||||
$lv->MakeHtml('', '', 0); | |||||
} | |||||
DedeCli::write("Make list html successfull"); | |||||
} | |||||
// 生成文档 | |||||
$tt = $dsql->GetOne("SELECT COUNT(id) as dd FROM `#@__arctiny` WHERE senddate >=" . $start . " AND arcrank>-1"); | |||||
$total = intval($tt['dd']); | |||||
$dsql->Execute('out', "SELECT id FROM `#@__arctiny` WHERE senddate >=" . $start . " AND arcrank>-1 ORDER BY typeid ASC"); | |||||
$i = 0; | |||||
while ($row = $dsql->GetObject('out')) { | |||||
$id = $row->id; | |||||
$ac = new Archives($id); | |||||
$rurl = $ac->MakeHtml(0); | |||||
DedeCli::showProgress(ceil(($i / $total) * 100), 100); | |||||
$i++; | |||||
} | |||||
DedeCli::write("Make archives html successfull"); | |||||
// 优化数据 | |||||
OptimizeData($dsql); | |||||
DedeCli::write("Optimize data successfull"); | |||||
} else { | |||||
$helpStr = " | |||||
USAGE: | |||||
php ./dedebiz make action [arguments...] | |||||
ACTIONS: | |||||
index,i Make Index html | |||||
--position index html position,default: ../index.html(relative include dir) | |||||
arc,a Make Archive htmls | |||||
--typeid type id | |||||
--aid archive id | |||||
list,l Make List htmls | |||||
--typeid type id | |||||
auto,o Auto Make htmls | |||||
--start start time(format:2012-03-12) | |||||
WEBSITE: | |||||
https://www.dedebiz.com/help/"; | |||||
DedeCli::write($helpStr); | |||||
exit; | |||||
} | |||||
} else if (count($argv) > 1 && ($argv[1] == "update" || $argv[1] == "u")) { | |||||
define("DEDEINC", $workDir."/include"); | |||||
require_once(DEDEINC."/dedehttpdown.class.php"); | |||||
require_once(DEDEINC . "/cli.class.php"); | |||||
// 更新系统 | |||||
$latestURL = "https://cdn.dedebiz.com/release/latest.txt"; | |||||
$del = new DedeHttpDown(); | |||||
$del->OpenUrl($latestURL); | |||||
$remoteVerStr = $del->GetHtml(); | |||||
$commStr = file_get_contents(DEDEINC."/common.inc.php"); | |||||
preg_match("#_version_detail = '([\d\.]+)'#", $commStr, $matchs); | |||||
$cfg_version_detail = $localVerStr = $matchs[1]; | |||||
if (version_compare($localVerStr, $remoteVerStr, '>=')) { | |||||
DedeCli::error("latest version,don't need to update"); | |||||
exit; | |||||
} | |||||
$fileHashURL = "https://cdn.dedebiz.com/release/{$cfg_version_detail}.json"; | |||||
$del = new DedeHttpDown(); | |||||
$del->OpenUrl($fileHashURL); | |||||
$filelist = $del->GetJSON(); | |||||
$offFiles = array(); | |||||
// foreach ($filelist as $key => $ff) { | |||||
// $offFiles[$ff->filename] = $ff->hash; | |||||
// } | |||||
var_dump($filelist); | |||||
} else { | |||||
echo $helpStr; | |||||
} | } |
@@ -1,5 +1,4 @@ | |||||
Admin5 | |||||
ChinaZ | |||||
织梦技术论坛 | |||||
落伍者论坛 | |||||
DedeBIZ | |||||
DedeBIZ | |||||
今日头条 | |||||
微信公众号 | |||||
百家号 |
@@ -5,20 +5,29 @@ CheckPurview('plus_Mail'); | |||||
//邮件发送函数 | //邮件发送函数 | ||||
function sendmail($email, $mailtitle, $mailbody) | function sendmail($email, $mailtitle, $mailbody) | ||||
{ | { | ||||
global $cfg_sendmail_bysmtp, $cfg_smtp_server, $cfg_smtp_port, $cfg_smtp_usermail, $cfg_smtp_user, $cfg_smtp_password, $cfg_adminemail,$cfg_webname; | |||||
if($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) | |||||
{ | |||||
$mailtype = 'HTML'; | |||||
require_once(DEDEINC.'/mail.class.php'); | |||||
$smtp = new smtp($cfg_smtp_server,$cfg_smtp_port,true,$cfg_smtp_usermail,$cfg_smtp_password); | |||||
$smtp->debug = false; | |||||
if(!$smtp->smtp_sockopen($cfg_smtp_server)){ | |||||
ShowMsg('邮件发送失败,请联系管理员','-1'); | |||||
exit(); | |||||
global $cfg_sendmail_bysmtp, $cfg_smtp_server, $cfg_smtp_port, $cfg_smtp_usermail, $cfg_smtp_password, $cfg_webname; | |||||
global $cfg_bizcore_appid,$cfg_bizcore_key,$cfg_bizcore_hostname,$cfg_bizcore_port; | |||||
if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | |||||
$client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); | |||||
$client->appid = $cfg_bizcore_appid; | |||||
$client->key = $cfg_bizcore_key; | |||||
$client->MailSend($email,$mailtitle,$mailtitle,$mailbody); | |||||
$client->Close(); | |||||
} else { | |||||
if($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) | |||||
{ | |||||
$mailtype = 'HTML'; | |||||
require_once(DEDEINC.'/mail.class.php'); | |||||
$smtp = new smtp($cfg_smtp_server,$cfg_smtp_port,true,$cfg_smtp_usermail,$cfg_smtp_password); | |||||
$smtp->debug = false; | |||||
if(!$smtp->smtp_sockopen($cfg_smtp_server)){ | |||||
ShowMsg('邮件发送失败,请联系管理员','-1'); | |||||
exit(); | |||||
} | |||||
$smtp->sendmail($email,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); | |||||
}else{ | |||||
@mail($email, $mailtitle, $mailbody, $headers); | |||||
} | } | ||||
$smtp->sendmail($email,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); | |||||
}else{ | |||||
@mail($email, $mailtitle, $mailbody, $headers); | |||||
} | } | ||||
} | } | ||||
@@ -83,4 +92,3 @@ if($action=="post"){ | |||||
exit(); | exit(); | ||||
} | } | ||||
?> |
@@ -7,20 +7,29 @@ if($dopost=="send"){ | |||||
//邮件发送函数 | //邮件发送函数 | ||||
function sendmail($email, $mailtitle, $mailbody) | function sendmail($email, $mailtitle, $mailbody) | ||||
{ | { | ||||
global $cfg_sendmail_bysmtp, $cfg_smtp_server, $cfg_smtp_port, $cfg_smtp_usermail, $cfg_smtp_user, $cfg_smtp_password, $cfg_adminemail,$cfg_webname; | |||||
if($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) | |||||
{ | |||||
$mailtype = 'HTML'; | |||||
require_once(DEDEINC.'/mail.class.php'); | |||||
$smtp = new smtp($cfg_smtp_server,$cfg_smtp_port,true,$cfg_smtp_usermail,$cfg_smtp_password); | |||||
$smtp->debug = false; | |||||
if(!$smtp->smtp_sockopen($cfg_smtp_server)){ | |||||
ShowMsg('邮件发送失败,请联系管理员','-1'); | |||||
exit(); | |||||
} | |||||
$smtp->sendmail($email,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); | |||||
}else{ | |||||
@mail($email, $mailtitle, $mailbody, $headers); | |||||
global $cfg_sendmail_bysmtp, $cfg_smtp_server, $cfg_smtp_port, $cfg_smtp_usermail, $cfg_smtp_password, $cfg_webname; | |||||
global $cfg_bizcore_appid,$cfg_bizcore_key,$cfg_bizcore_hostname,$cfg_bizcore_port; | |||||
if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | |||||
$client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); | |||||
$client->appid = $cfg_bizcore_appid; | |||||
$client->key = $cfg_bizcore_key; | |||||
$client->MailSend($email,$mailtitle,$mailtitle,$mailbody); | |||||
$client->Close(); | |||||
} else { | |||||
if($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) | |||||
{ | |||||
$mailtype = 'HTML'; | |||||
require_once(DEDEINC.'/mail.class.php'); | |||||
$smtp = new smtp($cfg_smtp_server,$cfg_smtp_port,true,$cfg_smtp_usermail,$cfg_smtp_password); | |||||
$smtp->debug = false; | |||||
if(!$smtp->smtp_sockopen($cfg_smtp_server)){ | |||||
ShowMsg('邮件发送失败,请联系管理员','-1'); | |||||
exit(); | |||||
} | |||||
$smtp->sendmail($email,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); | |||||
}else{ | |||||
@mail($email, $mailtitle, $mailbody, $headers); | |||||
} | |||||
} | } | ||||
} | } | ||||
@@ -44,7 +53,7 @@ if($dopost=="send"){ | |||||
$sendtime = time(); | $sendtime = time(); | ||||
$inquery = "UPDATE `#@__mail_title` SET count=count+1,sendtime='$sendtime',state='1' WHERE id=$id"; | $inquery = "UPDATE `#@__mail_title` SET count=count+1,sendtime='$sendtime',state='1' WHERE id=$id"; | ||||
if($dsql->ExecuteNoneQuery($inquery)){ | |||||
if($dsql->ExecuteNoneQuery($inquery)){ | |||||
ShowMsg('邮件已成功发送','mail_title_send.php'); | ShowMsg('邮件已成功发送','mail_title_send.php'); | ||||
exit(); | exit(); | ||||
} | } | ||||
@@ -72,5 +81,3 @@ if($dopost=="send"){ | |||||
$dlist->SetSource($sql); | $dlist->SetSource($sql); | ||||
$dlist->display(); | $dlist->display(); | ||||
} | } | ||||
?> |
@@ -62,7 +62,7 @@ if (isset($idArray[$pageno])) { | |||||
if ($pageno == 0 && $mkpage == 1) //清空缓存 | if ($pageno == 0 && $mkpage == 1) //清空缓存 | ||||
{ | { | ||||
$dsql->ExecuteNoneQuery("Delete From `#@__arccache` "); | |||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arccache` "); | |||||
} | } | ||||
$reurl = ''; | $reurl = ''; | ||||
@@ -86,48 +86,58 @@ | |||||
</tr> | </tr> | ||||
<?php | <?php | ||||
if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | ||||
$client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); | |||||
$client->appid = $cfg_bizcore_appid; | |||||
$client->key = $cfg_bizcore_key; | |||||
$data = $client->AdminPWDExists(); | |||||
$data = json_decode($data->data); | |||||
$rs = (array)($data->result); | |||||
$client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); | |||||
$client->appid = $cfg_bizcore_appid; | |||||
$client->key = $cfg_bizcore_key; | |||||
$data = $client->AdminPWDExists(); | |||||
$data = json_decode($data->data); | |||||
$rs = (array)($data->result); | |||||
if($rs["admin_pwd_exists"] == "false") {?> | |||||
if($rs["admin_pwd_exists"] == "false") {?> | |||||
<tr> | |||||
<td height="20" valign="top" bgcolor="#FFFFFF">设置DedeBIZ操作密码:</td> | |||||
<td height="20" valign="top" bgcolor="#FFFFFF"> | |||||
<input name="dedebiz_admin" type="password" id="dedebiz_admin" value="" size="30"> | |||||
设定后所有的DedeBIZ涉及安全操作输入当前操作密码 | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="20" valign="top" bgcolor="#FFFFFF">重复DedeBIZ操作密码:</td> | |||||
<td height="20" valign="top" bgcolor="#FFFFFF"> | |||||
<input name="re_dedebiz_admin" type="password" id="re_dedebiz_admin" value="" size="30"> | |||||
</td> | |||||
</tr> | |||||
<?php }else{ ?> | |||||
<tr> | |||||
<td height="20" valign="top" bgcolor="#FFFFFF">DedeBIZ操作密码:</td> | |||||
<td height="20" valign="top" bgcolor="#FFFFFF"> | |||||
<input name="dedebiz_admin" type="password" id="dedebiz_admin" value="" size="30"> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="20" valign="top" bgcolor="#FFFFFF">首页状态:</td> | |||||
<td height="20" valign="top" bgcolor="#FFFFFF"> | |||||
<label><input name="lockindex" type="radio" class="np" value="unlock" | |||||
<?php echo ($rs['index_lock_state']==true)? "checked='checked'" : "";?> /> | |||||
解锁</label> | |||||
<label><input name="lockindex" type="radio" value="lock" class="np" | |||||
<?php echo ($row['index_lock_state']==false)? "checked='checked'" : "";?> /> | |||||
锁定</label> | |||||
</td> | |||||
</tr> | |||||
<?php | |||||
} | |||||
} else { | |||||
?> | |||||
<tr> | <tr> | ||||
<td height="20" valign="top" bgcolor="#FFFFFF">设置DedeBIZ操作密码:</td> | |||||
<td height="20" valign="top" bgcolor="#FFFFFF"> | |||||
<input name="dedebiz_admin" type="password" id="dedebiz_admin" value="" size="30"> | |||||
设定后所有的DedeBIZ涉及安全操作输入当前操作密码 | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="20" valign="top" bgcolor="#FFFFFF">重复DedeBIZ操作密码:</td> | |||||
<td height="20" valign="top" bgcolor="#FFFFFF"> | |||||
<input name="re_dedebiz_admin" type="password" id="re_dedebiz_admin" value="" size="30"> | |||||
</td> | |||||
</tr> | |||||
<?php }else{ ?> | |||||
<tr> | |||||
<td height="20" valign="top" bgcolor="#FFFFFF">DedeBIZ操作密码:</td> | |||||
<td height="20" valign="top" bgcolor="#FFFFFF"> | |||||
<input name="dedebiz_admin" type="password" id="dedebiz_admin" value="" size="30"> | |||||
<td height="20" colspan="2" valign="top" bgcolor="#FFFFFF"> | |||||
尚未开启DedeBIZ商业组件 <a class="btn btn-danger btn-sm" target="_blank" href="https://www.dedebiz.com/start?code=-1008">如何启动组件</a> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<?php | <?php | ||||
} | } | ||||
}?> | |||||
<tr> | |||||
<td height="20" valign="top" bgcolor="#FFFFFF">首页状态:</td> | |||||
<td height="20" valign="top" bgcolor="#FFFFFF"> | |||||
<label><input name="lockindex" type="radio" class="np" value="unlock" | |||||
<?php echo ($rs['index_lock_state']==true)? "checked='checked'" : "";?> /> | |||||
解锁</label> | |||||
<label><input name="lockindex" type="radio" value="lock" class="np" | |||||
<?php echo ($row['index_lock_state']==false)? "checked='checked'" : "";?> /> | |||||
锁定</label> | |||||
</td> | |||||
</tr> | |||||
?> | |||||
<tr> | <tr> | ||||
<td height="31" colspan="2" bgcolor="#ffffff" align="center"> | <td height="31" colspan="2" bgcolor="#ffffff" align="center"> | ||||
<button name="view" class='btn btn-secondary' type="button" id="view" | <button name="view" class='btn btn-secondary' type="button" id="view" | ||||
@@ -298,7 +298,7 @@ class Archives | |||||
*/ | */ | ||||
function MakeHtml($isremote = 0) | function MakeHtml($isremote = 0) | ||||
{ | { | ||||
global $fileFirst, $baidu_seo, $cfg_basehost; | |||||
global $fileFirst, $cfg_basehost; | |||||
if ($this->IsError) { | if ($this->IsError) { | ||||
return ''; | return ''; | ||||
@@ -384,25 +384,6 @@ class Archives | |||||
$this->ParseDMFields($i, 1); | $this->ParseDMFields($i, 1); | ||||
$this->dtp->SaveTo($TRUEfilename); | $this->dtp->SaveTo($TRUEfilename); | ||||
} | } | ||||
if ($baidu_seo == true) { | |||||
$api = 'http://data.zz.baidu.com/urls?site=https://www.zixue.cn&token=vXkBb4Ot0yhOFcmP'; | |||||
$ch = curl_init(); | |||||
$options = array( | |||||
CURLOPT_URL => $api, | |||||
CURLOPT_POST => true, | |||||
CURLOPT_RETURNTRANSFER => true, | |||||
CURLOPT_POSTFIELDS => implode("\n", $seoUrls), | |||||
CURLOPT_HTTPHEADER => array('Content-Type: text/plain'), | |||||
); | |||||
curl_setopt_array($ch, $options); | |||||
$result = curl_exec($ch); | |||||
$rs = json_decode($result, true); | |||||
if ($rs["success"] == 1) { | |||||
echo "百度搜索引擎提交成功,剩余次数:" . $rs["remain"] . "<br/>\r\n"; | |||||
} | |||||
} | |||||
} | } | ||||
$this->dsql->ExecuteNoneQuery("Update `#@__archives` SET ismake=1 WHERE id='" . $this->ArcID . "'"); | $this->dsql->ExecuteNoneQuery("Update `#@__archives` SET ismake=1 WHERE id='" . $this->ArcID . "'"); | ||||
return $this->GetTrueUrl($filename); | return $this->GetTrueUrl($filename); | ||||
@@ -451,7 +432,7 @@ class Archives | |||||
* | * | ||||
* @access public | * @access public | ||||
* @param string $fname 键名称 | * @param string $fname 键名称 | ||||
* @param string $ctag 标记 | |||||
* @param object $ctag 标记 | |||||
* @return string | * @return string | ||||
*/ | */ | ||||
function GetField($fname, $ctag) | function GetField($fname, $ctag) | ||||
@@ -677,8 +658,10 @@ class Archives | |||||
} else if ($ctag2->GetName() == 'tagname') { | } else if ($ctag2->GetName() == 'tagname') { | ||||
$dtp2->Assign($tid, $k); | $dtp2->Assign($tid, $k); | ||||
} else if ($ctag2->GetName() == 'value') { | } else if ($ctag2->GetName() == 'value') { | ||||
$this->Fields[$k] = $this->ChannelUnit->MakeField($k, $this->Fields[$k], $ctag2); | |||||
@$dtp2->Assign($tid, $this->Fields[$k]); | |||||
if (isset($this->Fields[$k])) { | |||||
$this->Fields[$k] = $this->ChannelUnit->MakeField($k, $this->Fields[$k], $ctag2); | |||||
@$dtp2->Assign($tid, $this->Fields[$k]); | |||||
} | |||||
} | } | ||||
} | } | ||||
$res .= $dtp2->GetResult(); | $res .= $dtp2->GetResult(); | ||||
@@ -1,262 +0,0 @@ | |||||
<?php if (!defined('DEDEINC')) exit("Request Error!"); | |||||
/** | |||||
* 踩踩文档类 | |||||
* | |||||
* @version $Id: arc.caicai.class.php 1 8:59 2010年7月7日Z tianya $ | |||||
* @package DedeBIZ.Libraries | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(DEDEINC . "/datalistcp.class.php"); | |||||
require_once(DEDEINC . "/channelunit.func.php"); | |||||
/** | |||||
* 踩踩文档类 | |||||
* | |||||
* @package Caicai | |||||
* @subpackage DedeBIZ.Libraries | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
class Caicai extends DataListCP | |||||
{ | |||||
var $maxPageSize = 100; | |||||
var $arcCacheTime = 3600; | |||||
/** | |||||
* 对config参数及get参数等进行预处理 | |||||
* | |||||
* @access public | |||||
* @return void | |||||
*/ | |||||
function PreLoad() | |||||
{ | |||||
global $totalresult, $pageno; | |||||
if (empty($pageno) || preg_match("#[^0-9]#", $pageno)) $pageno = 1; | |||||
if (empty($totalresult) || preg_match("#[^0-9]#", $totalresult)) $totalresult = 0; | |||||
$this->pageNO = $pageno; | |||||
$this->totalResult = $totalresult; | |||||
if (isset($this->tpl->tpCfgs['pagesize'])) { | |||||
$this->pageSize = $this->tpl->tpCfgs['pagesize']; | |||||
} | |||||
$this->totalPage = ceil($this->totalResult / $this->pageSize); | |||||
if ($this->totalPage > $this->maxPageSize) { | |||||
$this->totalPage = $this->maxPageSize; | |||||
} | |||||
//限制最大页数 | |||||
if ($this->pageNO > $this->totalPage) { | |||||
$this->pageNO = $this->totalPage; | |||||
$this->totalResult = $this->totalPage * $this->pageSize; | |||||
} | |||||
$this->sourceSql = preg_replace("#LIMIT [0-9,]{1,}#i", '', $this->sourceSql); | |||||
if ($this->totalResult == 0) { | |||||
//$this->isQuery = true; | |||||
//$this->dsql->Execute('dlist',$this->sourceSql); | |||||
//$this->totalResult = $this->dsql->GetTotalRow('dlist'); | |||||
$countQuery = preg_replace("#SELECT[ \r\n\t](.*)[ \r\n\t]FROM#is", "SELECT COUNT(*) as dd FROM", $this->sourceSql); | |||||
$row = $this->dsql->GetOne($countQuery); | |||||
$this->totalResult = $row['dd']; | |||||
$this->sourceSql .= " LIMIT 0," . $this->pageSize; | |||||
} else { | |||||
$this->sourceSql .= " LIMIT " . (($this->pageNO - 1) * $this->pageSize) . "," . $this->pageSize; | |||||
} | |||||
} | |||||
/** | |||||
* 获取当前页数据列表 | |||||
* | |||||
* @param array $atts | |||||
* @param object $refObj | |||||
* @param array $fields | |||||
* @return array | |||||
*/ | |||||
function GetArcList($atts, $refObj = '', $fields = array()) | |||||
{ | |||||
$rsArray = array(); | |||||
$t1 = Exectime(); | |||||
if (!$this->isQuery) { | |||||
$this->dsql->Execute('dlist', $this->sourceSql); | |||||
} | |||||
$i = 0; | |||||
while ($arr = $this->dsql->GetArray('dlist')) { | |||||
$i++; | |||||
$arr['filename'] = $arr['arcurl'] = GetFileUrl( | |||||
$arr['id'], | |||||
$arr['typeid'], | |||||
$arr['senddate'], | |||||
$arr['title'], | |||||
$arr['ismake'], | |||||
$arr['arcrank'], | |||||
$arr['namerule'], | |||||
$arr['typedir'], | |||||
$arr['money'], | |||||
$arr['filename'], | |||||
$arr['moresite'], | |||||
$arr['siteurl'], | |||||
$arr['sitepath'] | |||||
); | |||||
$arr['typeurl'] = GetTypeUrl( | |||||
$arr['typeid'], | |||||
MfTypedir($arr['typedir']), | |||||
$arr['isdefault'], | |||||
$arr['defaultname'], | |||||
$arr['ispart'], | |||||
$arr['namerule2'], | |||||
$arr['moresite'], | |||||
$arr['siteurl'], | |||||
$arr['sitepath'] | |||||
); | |||||
if ($arr['litpic'] == '-' || $arr['litpic'] == '') { | |||||
$arr['litpic'] = 'templets/images/dfpic.gif'; | |||||
} | |||||
if (!preg_match("#^http:\/\/#i", $arr['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { | |||||
$arr['litpic'] = $GLOBALS['cfg_mainsite'] . $arr['litpic']; | |||||
} | |||||
$arr['picname'] = $arr['litpic']; | |||||
$arr['alttitle'] = $arr['userid'] . " 的空间"; | |||||
$arr['face'] = ($arr['face'] != '' ? $arr['face'] : 'images/nopic.gif'); | |||||
if ($arr['userid'] != '') { | |||||
$arr['spaceurl'] = $GLOBALS['cfg_basehost'] . '/member/index.php?uid=' . $arr['userid']; | |||||
} else { | |||||
$arr['alttitle'] = $arr['title']; | |||||
$arr['spaceurl'] = $arr['arcurl']; | |||||
$arr['face'] = $arr['litpic']; | |||||
$arr['face'] = str_replace('defaultpic', 'dfcaicai', $arr['face']); | |||||
} | |||||
if (!empty($arr['lastpost'])) { | |||||
$arr['lastpost'] = MyDate('m-d h:i', $arr['lastpost']); | |||||
} else { | |||||
$arr['lastpost'] = "<a href='../plus/feedback.php?aid={$arr['id']}'>说几句>></a>"; | |||||
} | |||||
$rsArray[$i] = $arr; | |||||
if ($i >= $this->pageSize) { | |||||
break; | |||||
} | |||||
} | |||||
$this->dsql->FreeResult('dlist'); | |||||
$this->queryTime = (Exectime() - $t1); | |||||
return $rsArray; | |||||
} | |||||
/** | |||||
* 获得最差或最好的踩踩文章 | |||||
* | |||||
* @param array $atts | |||||
* @param object $refObj | |||||
* @param array $fields | |||||
* @return array | |||||
*/ | |||||
function GetSortArc($atts, $refObj = '', $fields = array()) | |||||
{ | |||||
$arcrow = (empty($atts['row']) ? 12 : $atts['row']); | |||||
$order = (empty($atts['order']) ? 'scores' : $atts['order']); | |||||
$orderway = (empty($atts['orderway']) ? 'desc' : $atts['orderway']); | |||||
if (empty($arcrow)) $arcrow = 12; | |||||
$query = "SELECT arc.*,tp.typedir,tp.typename, | |||||
tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath | |||||
FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON tp.id = arc.typeid | |||||
WHERE arc.arcrank>-1 ORDER BY arc.{$order} $orderway LIMIT 0,$arcrow "; | |||||
$rsArray = array(); | |||||
$cacheFile = DEDEDATA . '/cache/caicai_' . md5($query) . '.inc'; | |||||
$needCache = false; | |||||
if (file_exists($cacheFile) && filemtime($cacheFile) - time() < $this->arcCacheTime) { | |||||
$fp = fopen($cacheFile, 'r'); | |||||
$ids = fread($fp, filesize($cacheFile)); | |||||
fclose($fp); | |||||
$ids = trim($ids); | |||||
if (!empty($ids)) { | |||||
$query = "SELECT arc.*,tp.typedir,tp.typename, | |||||
tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath | |||||
FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid | |||||
WHERE arc.id in($ids) ORDER BY arc.{$order} $orderway "; | |||||
} | |||||
} else { | |||||
$needCache = true; | |||||
} | |||||
$ids = array(); | |||||
$i = 0; | |||||
$this->dsql->Execute('cai', $query); | |||||
while ($arr = $this->dsql->GetArray('cai')) { | |||||
$i++; | |||||
$ids[] = $arr['id']; | |||||
$arr['filename'] = $arr['arcurl'] = GetFileUrl( | |||||
$arr['id'], | |||||
$arr['typeid'], | |||||
$arr['senddate'], | |||||
$arr['title'], | |||||
$arr['ismake'], | |||||
$arr['arcrank'], | |||||
$arr['namerule'], | |||||
$arr['typedir'], | |||||
$arr['money'], | |||||
$arr['filename'], | |||||
$arr['moresite'], | |||||
$arr['siteurl'], | |||||
$arr['sitepath'] | |||||
); | |||||
$arr['typeurl'] = GetTypeUrl( | |||||
$arr['typeid'], | |||||
MfTypedir($arr['typedir']), | |||||
$arr['isdefault'], | |||||
$arr['defaultname'], | |||||
$arr['ispart'], | |||||
$arr['namerule2'], | |||||
$arr['moresite'], | |||||
$arr['siteurl'], | |||||
$arr['sitepath'] | |||||
); | |||||
if ($arr['litpic'] == '') $arr['litpic'] = '/static/defaultpic.gif'; | |||||
if (!preg_match("#^http:\/\/#", $arr['litpic'])) { | |||||
$arr['picname'] = $arr['litpic'] = $GLOBALS['cfg_cmsurl'] . $arr['litpic']; | |||||
} else { | |||||
$arr['picname'] = $arr['litpic'] = $arr['litpic']; | |||||
} | |||||
$rsArray[$i] = $arr; | |||||
} | |||||
$this->dsql->FreeResult('cai'); | |||||
//写入缓存 | |||||
if ($needCache && count($ids) > 0) { | |||||
$idsstr = join(',', $ids); | |||||
file_put_contents($cacheFile, $idsstr); | |||||
// $fp = fopen($cacheFile, 'w'); | |||||
// fwrite($fp, $idsstr); | |||||
// fclose($fp); | |||||
} | |||||
return $rsArray; | |||||
} | |||||
/** | |||||
* 获取顶级栏目列表 | |||||
* | |||||
* @param array $atts | |||||
* @param object $refObj | |||||
* @param array $fields | |||||
* @return array | |||||
*/ | |||||
function GetCatalog($atts, $refObj = '', $fields = array()) | |||||
{ | |||||
$maxrow = (empty($atts['row']) ? 12 : $atts['row']); | |||||
$query = "SELECT id,typename FROM `#@__arctype` WHERE reid=0 AND ispart<2 AND channeltype>0 ORDER BY sortrank ASC LIMIT 0,$maxrow "; | |||||
$rsArray = array(); | |||||
$this->dsql->Execute('co', $query); | |||||
$i = 0; | |||||
while ($arr = $this->dsql->GetArray('co')) { | |||||
$i++; | |||||
$rsArray[$i] = $arr; | |||||
} | |||||
$this->dsql->FreeResult('co'); | |||||
return $rsArray; | |||||
} | |||||
}//End Class |
@@ -287,6 +287,9 @@ class ListView | |||||
$makeFile = preg_replace("/\/{1,}/", "/", $makeFile); | $makeFile = preg_replace("/\/{1,}/", "/", $makeFile); | ||||
$murl = $this->GetTrueUrl($murl); | $murl = $this->GetTrueUrl($murl); | ||||
$this->dtp->SaveTo($makeFile); | $this->dtp->SaveTo($makeFile); | ||||
if (PHP_SAPI === 'cli') { | |||||
DedeCli::showProgress(ceil(($this->PageNo / ($endpage-1)) * 100), 100); | |||||
} | |||||
} | } | ||||
if ($startpage == 1) { | if ($startpage == 1) { | ||||
//如果列表启用封面文件,复制这个文件第一页 | //如果列表启用封面文件,复制这个文件第一页 | ||||
@@ -1,442 +0,0 @@ | |||||
<?php if (!defined('DEDEINC')) exit("Request Error!"); | |||||
/** | |||||
* 会员列表视图类 | |||||
* | |||||
* @version $Id: arc.memberlistview.class.php 1 14:49 2010年7月7日Z tianya $ | |||||
* @package DedeBIZ.Libraries | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(DEDEINC . "/dedetemplate.class.php"); | |||||
$lang_pre_page = '上页'; | |||||
$lang_next_page = '下页'; | |||||
$lang_index_page = '首页'; | |||||
$lang_end_page = '末页'; | |||||
$lang_record_number = '条记录'; | |||||
$lang_page = '页'; | |||||
$lang_total = '共'; | |||||
/** | |||||
* 档案展示类 | |||||
* | |||||
* @package FreeList | |||||
* @subpackage DedeBIZ.Libraries | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
class MemberListview | |||||
{ | |||||
var $dsql = ''; | |||||
var $tpl = ''; | |||||
var $pageNO = 1; | |||||
var $totalPage = 0; | |||||
var $totalResult = 0; | |||||
var $pageSize = 25; | |||||
var $getValues = array(); | |||||
var $sourceSql = ''; | |||||
var $isQuery = false; | |||||
var $randts = 0; | |||||
/** | |||||
* 用指定的文档ID进行初始化 | |||||
* | |||||
* @access public | |||||
* @param string $tplfile 模板文件 | |||||
* @return void | |||||
*/ | |||||
function __construct($tplfile = '') | |||||
{ | |||||
$this->sourceSql = ''; | |||||
$this->pageSize = 25; | |||||
$this->queryTime = 0; | |||||
$this->getValues = array(); | |||||
$this->randts = time(); | |||||
$this->dsql = $GLOBALS['dsql']; | |||||
$this->SetVar('ParseEnv', 'datalist'); | |||||
$this->tpl = new DedeTemplate(); | |||||
if ($GLOBALS['cfg_tplcache'] == 'N') { | |||||
$this->tpl->isCache = false; | |||||
} | |||||
if ($tplfile != '') { | |||||
$this->tpl->LoadTemplate($tplfile); | |||||
} | |||||
} | |||||
//兼容PHP4 | |||||
function MemberListview($tplfile = '') | |||||
{ | |||||
$this->__construct($tplfile); | |||||
} | |||||
/** | |||||
* 设置SQL语句 | |||||
* | |||||
* @access public | |||||
* @param string $sql SQL语句 | |||||
* @return void | |||||
*/ | |||||
function SetSource($sql) | |||||
{ | |||||
$this->sourceSql = $sql; | |||||
} | |||||
/** | |||||
* 设置模板 | |||||
* 如果想要使用模板中指定的pagesize,必须在调用模板后才调用 SetSource($sql) | |||||
* | |||||
* @access public | |||||
* @param string $tplfile 模板文件 | |||||
* @return void | |||||
*/ | |||||
function SetTemplate($tplfile) | |||||
{ | |||||
$this->tpl->LoadTemplate($tplfile); | |||||
} | |||||
/** | |||||
* 设置模板 | |||||
* | |||||
* @access public | |||||
* @param string $tplfile 模板文件 | |||||
* @return void | |||||
*/ | |||||
function SetTemplet($tplfile) | |||||
{ | |||||
$this->tpl->LoadTemplate($tplfile); | |||||
} | |||||
/** | |||||
* 对config参数及get参数等进行预处理 | |||||
* | |||||
* @access private | |||||
* @return void | |||||
*/ | |||||
function PreLoad() | |||||
{ | |||||
global $totalresult, $pageno; | |||||
if (empty($pageno) || preg_match("/[^0-9]/", $pageno)) { | |||||
$pageno = 1; | |||||
} | |||||
if (empty($totalresult) || preg_match("/[^0-9]/", $totalresult)) { | |||||
$totalresult = 0; | |||||
} | |||||
$this->pageNO = $pageno; | |||||
$this->totalResult = $totalresult; | |||||
if (isset($this->tpl->tpCfgs['pagesize'])) { | |||||
$this->pageSize = $this->tpl->tpCfgs['pagesize']; | |||||
} | |||||
$this->totalPage = ceil($this->totalResult / $this->pageSize); | |||||
if ($this->totalResult == 0) { | |||||
//$this->isQuery = true; | |||||
//$this->dsql->Execute('mbdl',$this->sourceSql); | |||||
//$this->totalResult = $this->dsql->GetTotalRow('mbdl'); | |||||
$countQuery = preg_replace("/select[ \r\n\t](.*)[ \r\n\t]from/i", "Select count(*) as dd From", $this->sourceSql); | |||||
$row = $this->dsql->GetOne($countQuery); | |||||
$row['dd'] = empty($row['dd']) ? 0 : $row['dd']; | |||||
$this->totalResult = $row['dd']; | |||||
$this->sourceSql .= " limit 0," . $this->pageSize; | |||||
} else { | |||||
$this->sourceSql .= " limit " . (($this->pageNO - 1) * $this->pageSize) . "," . $this->pageSize; | |||||
} | |||||
} | |||||
/** | |||||
* 设置网址的Get参数键值 | |||||
* | |||||
* @access public | |||||
* @param string $key 键 | |||||
* @param string $value 值 | |||||
* @return void | |||||
*/ | |||||
function SetParameter($key, $value) | |||||
{ | |||||
$this->getValues[$key] = $value; | |||||
} | |||||
/** | |||||
* 设置/获取文档相关的各种变量 | |||||
* | |||||
* @access public | |||||
* @param string $k 键 | |||||
* @param string $v 值 | |||||
* @return void | |||||
*/ | |||||
function SetVar($k, $v) | |||||
{ | |||||
global $_vars; | |||||
if (!isset($_vars[$k])) $_vars[$k] = $v; | |||||
} | |||||
/** | |||||
* 获取值 | |||||
* | |||||
* @param string $k | |||||
* @return string | |||||
*/ | |||||
function GetVar($k) | |||||
{ | |||||
global $_vars; | |||||
if (isset($_vars[$k])) return $_vars[$k]; | |||||
else return ''; | |||||
} | |||||
/** | |||||
* 获取当前页数据列表 | |||||
* | |||||
* @access public | |||||
* @param string $atts 属性 | |||||
* @param string $refObj 实例化对象 | |||||
* @param string $fields 字段 | |||||
* @return array | |||||
*/ | |||||
function GetArcList($atts, $refObj = '', $fields = array()) | |||||
{ | |||||
$attlist = "titlelen=30,infolen=200,imgwidth=120,imgheight=90"; | |||||
FillAtts($atts, $attlist); | |||||
FillFields($atts, $fields, $refObj); | |||||
extract($atts, EXTR_OVERWRITE); | |||||
$rsArray = array(); | |||||
//global $_vars; | |||||
//$t1 = Exectime(); | |||||
if (!$this->isQuery) { | |||||
$this->dsql->Execute('mbdl', $this->sourceSql); | |||||
} | |||||
$i = 0; | |||||
while ($row = $this->dsql->GetArray('mbdl')) { | |||||
$i++; | |||||
if (!isset($row['description'])) $row['description'] = ''; | |||||
if (!isset($row['color'])) $row['color'] = ''; | |||||
if (!isset($row['pubdate'])) $row['pubdate'] = $row['senddate']; | |||||
//处理一些特殊字段 | |||||
$row['infos'] = cn_substr($row['description'], $infolen); | |||||
$row['id'] = $row['id']; | |||||
$row['filename'] = $row['arcurl'] = GetFileUrl( | |||||
$row['id'], | |||||
$row['typeid'], | |||||
$row['senddate'], | |||||
$row['title'], | |||||
$row['ismake'], | |||||
$row['arcrank'], | |||||
$row['namerule'], | |||||
$row['typedir'], | |||||
$row['money'], | |||||
$row['filename'], | |||||
$row['moresite'], | |||||
$row['siteurl'], | |||||
$row['sitepath'] | |||||
); | |||||
$row['typeurl'] = GetTypeUrl( | |||||
$row['typeid'], | |||||
$row['typedir'], | |||||
$row['isdefault'], | |||||
$row['defaultname'], | |||||
$row['ispart'], | |||||
$row['namerule2'], | |||||
$row['moresite'], | |||||
$row['siteurl'], | |||||
$row['sitepath'] | |||||
); | |||||
if ($row['litpic'] == '-' || $row['litpic'] == '') { | |||||
$row['litpic'] = $GLOBALS['cfg_cmspath'] . '/static/defaultpic.gif'; | |||||
} | |||||
if (!preg_match("/^http:\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') { | |||||
$row['litpic'] = $GLOBALS['cfg_mainsite'] . $row['litpic']; | |||||
} | |||||
$row['picname'] = $row['litpic']; | |||||
$row['stime'] = GetDateMK($row['pubdate']); | |||||
$row['typelink'] = "<a href='" . $row['typeurl'] . "'>" . $row['typename'] . "</a>"; | |||||
$row['image'] = "<img src='" . $row['picname'] . "' border='0' width='$imgwidth' height='$imgheight' alt='" . preg_replace("/['><]/", "", $row['title']) . "'>"; | |||||
$row['imglink'] = "<a href='" . $row['filename'] . "'>" . $row['image'] . "</a>"; | |||||
$row['fulltitle'] = $row['title']; | |||||
$row['title'] = cn_substr($row['title'], $titlelen); | |||||
if ($row['color'] != '') { | |||||
$row['title'] = "<font color='" . $row['color'] . "'>" . $row['title'] . "</font>"; | |||||
} | |||||
if (preg_match('/b/', $row['flag'])) { | |||||
$row['title'] = "<strong>" . $row['title'] . "</strong>"; | |||||
} | |||||
//$row['title'] = "<b>".$row['title']."</b>"; | |||||
$row['textlink'] = "<a href='" . $row['filename'] . "'>" . $row['title'] . "</a>"; | |||||
$row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl']; | |||||
$row['memberurl'] = $GLOBALS['cfg_memberurl']; | |||||
$row['templeturl'] = $GLOBALS['cfg_templeturl']; | |||||
$rsArray[$i] = $row; | |||||
if ($i >= $this->pageSize) { | |||||
break; | |||||
} | |||||
} | |||||
$this->dsql->FreeResult(); | |||||
//echo "执行时间:".(Exectime() - $t1); | |||||
return $rsArray; | |||||
} | |||||
/** | |||||
* 获取分页导航列表 | |||||
* | |||||
* @access public | |||||
* @param string $atts 属性 | |||||
* @param string $refObj 实例化对象 | |||||
* @param string $fields 字段 | |||||
* @return string | |||||
*/ | |||||
function GetPageList($atts, $refObj = '', $fields = array()) | |||||
{ | |||||
global $lang_pre_page, $lang_next_page, $lang_index_page, $lang_end_page, $lang_record_number, $lang_page, $lang_total; | |||||
$prepage = $nextpage = $geturl = $hidenform = ''; | |||||
$purl = $this->GetCurUrl(); | |||||
$prepagenum = $this->pageNO - 1; | |||||
$nextpagenum = $this->pageNO + 1; | |||||
if (!isset($atts['listsize']) || preg_match("/[^0-9]/", $atts['listsize'])) { | |||||
$atts['listsize'] = 5; | |||||
} | |||||
if (!isset($atts['listitem'])) { | |||||
$atts['listitem'] = "info,index,end,pre,next,pageno"; | |||||
} | |||||
$totalpage = ceil($this->totalResult / $this->pageSize); | |||||
//echo " {$totalpage}=={$this->totalResult}=={$this->pageSize}"; | |||||
//无结果或只有一页的情况 | |||||
if ($totalpage <= 1 && $this->totalResult > 0) { | |||||
return "{$lang_total} 1 {$lang_page}/" . $this->totalResult . $lang_record_number; | |||||
} | |||||
if ($this->totalResult == 0) { | |||||
return "{$lang_total} 0 {$lang_page}/" . $this->totalResult . $lang_record_number; | |||||
} | |||||
$infos = "<span>{$lang_total} {$totalpage} {$lang_page}/{$this->totalResult}{$lang_record_number}</span> "; | |||||
if ($this->totalResult != 0) { | |||||
$this->getValues['totalresult'] = $this->totalResult; | |||||
} | |||||
if (count($this->getValues) > 0) { | |||||
foreach ($this->getValues as $key => $value) { | |||||
$value = urlencode($value); | |||||
$geturl .= "$key=$value" . "&"; | |||||
$hidenform .= "<input type='hidden' name='$key' value='$value'>\r\n"; | |||||
} | |||||
} | |||||
$purl .= "?" . $geturl; | |||||
//获得上一页和下一页的链接 | |||||
if ($this->pageNO != 1) { | |||||
$prepage .= "<a href='" . $purl . "pageno=$prepagenum'>$lang_pre_page</a> \r\n"; | |||||
$indexpage = "<a href='" . $purl . "pageno=1'>$lang_index_page</a> \r\n"; | |||||
} else { | |||||
$indexpage = "$lang_index_page \r\n"; | |||||
} | |||||
if ($this->pageNO != $totalpage && $totalpage > 1) { | |||||
$nextpage .= "<a href='" . $purl . "pageno=$nextpagenum'>$lang_next_page</a> \r\n"; | |||||
$endpage = "<a href='" . $purl . "pageno=$totalpage'>$lang_end_page</a> \r\n"; | |||||
} else { | |||||
$endpage = " $lang_end_page \r\n"; | |||||
} | |||||
//获得数字链接 | |||||
$listdd = ""; | |||||
$total_list = $atts['listsize'] * 2 + 1; | |||||
if ($this->pageNO >= $total_list) { | |||||
$j = $this->pageNO - $atts['listsize']; | |||||
$total_list = $this->pageNO + $atts['listsize']; | |||||
if ($total_list > $totalpage) { | |||||
$total_list = $totalpage; | |||||
} | |||||
} else { | |||||
$j = 1; | |||||
if ($total_list > $totalpage) $total_list = $totalpage; | |||||
} | |||||
for ($j; $j <= $total_list; $j++) { | |||||
if ($j == $this->pageNO) { | |||||
$listdd .= "<strong>$j</strong> \r\n"; | |||||
} else { | |||||
$listdd .= "<a href='" . $purl . "pageno=$j'>" . $j . "</a> \r\n"; | |||||
} | |||||
} | |||||
$plist = "<div class=\"pagelistbox\">\r\n"; | |||||
//info,index,end,pre,next,pageno,form | |||||
if (preg_match("/info/i", $atts['listitem'])) { | |||||
$plist .= $infos; | |||||
} | |||||
if (preg_match("/index/i", $atts['listitem'])) { | |||||
$plist .= $indexpage; | |||||
} | |||||
if (preg_match("/pre/i", $atts['listitem'])) { | |||||
$plist .= $prepage; | |||||
} | |||||
if (preg_match("/pageno/i", $atts['listitem'])) { | |||||
$plist .= $listdd; | |||||
} | |||||
if (preg_match("/next/i", $atts['listitem'])) { | |||||
$plist .= $nextpage; | |||||
} | |||||
if (preg_match("/end/i", $atts['listitem'])) { | |||||
$plist .= $endpage; | |||||
} | |||||
if (preg_match("/form/i", $atts['listitem'])) { | |||||
$plist .= " <form name='pagelist' action='" . $this->GetCurUrl() . "'>$hidenform"; | |||||
if ($totalpage > $total_list) { | |||||
$plist .= "<input type='text' name='pageno' style='padding:0px;width:30px;height:18px'>\r\n"; | |||||
$plist .= "<input type='submit' name='plistgo' value='GO' style='padding:0px;width:30px;height:18px;font-size:11px'>\r\n"; | |||||
} | |||||
$plist .= "</form>\r\n"; | |||||
} | |||||
$plist .= "</div>\r\n"; | |||||
return $plist; | |||||
} | |||||
/** | |||||
* 获得当前网址 | |||||
* | |||||
* @access public | |||||
* @return string | |||||
*/ | |||||
function GetCurUrl() | |||||
{ | |||||
if (!empty($_SERVER["REQUEST_URI"])) { | |||||
$nowurl = $_SERVER["REQUEST_URI"]; | |||||
$nowurls = explode("?", $nowurl); | |||||
$nowurl = $nowurls[0]; | |||||
} else { | |||||
$nowurl = $_SERVER["PHP_SELF"]; | |||||
} | |||||
return $nowurl; | |||||
} | |||||
//关闭 | |||||
function Close() | |||||
{ | |||||
} | |||||
/** | |||||
* 显示数据 | |||||
* | |||||
* @access public | |||||
* @return void | |||||
*/ | |||||
function Display() | |||||
{ | |||||
if ($this->sourceSql != '') $this->PreLoad(); | |||||
//在PHP4中,对象引用必须放在display之前,放在其它位置中无效 | |||||
$this->tpl->SetObject($this); | |||||
$this->tpl->Display(); | |||||
} | |||||
/** | |||||
* 保存为HTML | |||||
* | |||||
* @access public | |||||
* @param string $filename 文件名称 | |||||
* @return string | |||||
*/ | |||||
function SaveTo($filename) | |||||
{ | |||||
$this->tpl->SaveTo($filename); | |||||
} | |||||
}//End Class |
@@ -99,7 +99,7 @@ class PartView | |||||
* 指定typelink对象给当前类实例 | * 指定typelink对象给当前类实例 | ||||
* | * | ||||
* @access public | * @access public | ||||
* @param string $typelink 栏目链接 | |||||
* @param object $typelink 栏目链接 | |||||
* @return string | * @return string | ||||
*/ | */ | ||||
function SetTypeLink(&$typelink) | function SetTypeLink(&$typelink) | ||||
@@ -284,6 +284,9 @@ class SgListView | |||||
$makeFile = preg_replace("/\/{1,}/", "/", $makeFile); | $makeFile = preg_replace("/\/{1,}/", "/", $makeFile); | ||||
$murl = $this->GetTrueUrl($murl); | $murl = $this->GetTrueUrl($murl); | ||||
$this->dtp->SaveTo($makeFile); | $this->dtp->SaveTo($makeFile); | ||||
if (PHP_SAPI === 'cli') { | |||||
DedeCli::showProgress(ceil(($this->PageNo / $endpage) * 100), 100); | |||||
} | |||||
} | } | ||||
if ($startpage == 1) { | if ($startpage == 1) { | ||||
//如果列表启用封面文件,复制这个文件第一页 | //如果列表启用封面文件,复制这个文件第一页 | ||||
@@ -15,16 +15,11 @@ function __autoload($classname) | |||||
{ | { | ||||
return TRUE; | return TRUE; | ||||
} | } | ||||
$classfile = $classname.'.php'; | |||||
$libclassfile = $classname.'.class.php'; | $libclassfile = $classname.'.class.php'; | ||||
if ( is_file ( DEDEINC.'/'.$libclassfile ) ) | if ( is_file ( DEDEINC.'/'.$libclassfile ) ) | ||||
{ | { | ||||
require DEDEINC.'/'.$libclassfile; | require DEDEINC.'/'.$libclassfile; | ||||
} | } | ||||
else if( is_file ( DEDEMODEL.'/'.$classfile ) ) | |||||
{ | |||||
require DEDEMODEL.'/'.$classfile; | |||||
} | |||||
else | else | ||||
{ | { | ||||
if (DEBUG_LEVEL === TRUE) | if (DEBUG_LEVEL === TRUE) | ||||
@@ -11,20 +11,21 @@ if(!defined('DEDEINC')) exit("Request Error!"); | |||||
function dede_autoloader($classname) | function dede_autoloader($classname) | ||||
{ | { | ||||
$classname = preg_replace("/[^0-9a-z_]/i", '', $classname); | $classname = preg_replace("/[^0-9a-z_]/i", '', $classname); | ||||
$classname = strtolower($classname); | |||||
if( class_exists ( $classname ) ) | if( class_exists ( $classname ) ) | ||||
{ | { | ||||
return TRUE; | return TRUE; | ||||
} | } | ||||
$classfile = $classname.'.php'; | |||||
if (in_array($classname, array("archives","freelist","listview","partview","rssview", | |||||
"searchview","sglistview","sgpage","specview","taglist"))) { | |||||
$classname = "arc.".$classname; | |||||
} | |||||
$libclassfile = $classname.'.class.php'; | $libclassfile = $classname.'.class.php'; | ||||
if ( is_file ( DEDEINC.'/'.$libclassfile ) ) | if ( is_file ( DEDEINC.'/'.$libclassfile ) ) | ||||
{ | { | ||||
require DEDEINC.'/'.$libclassfile; | require DEDEINC.'/'.$libclassfile; | ||||
} | } | ||||
else if( is_file ( DEDEMODEL.'/'.$classfile ) ) | |||||
{ | |||||
require DEDEMODEL.'/'.$classfile; | |||||
} | |||||
else | else | ||||
{ | { | ||||
if (DEBUG_LEVEL === TRUE) | if (DEBUG_LEVEL === TRUE) | ||||
@@ -0,0 +1,398 @@ | |||||
<?php if (!defined('DEDEINC')) exit('Request Error!'); | |||||
// Copyright 2020 The DedeBiz Authors. All rights reserved. | |||||
// license that can be found in the LICENSE file. | |||||
// @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
// @license https://www.dedebiz.com/license | |||||
// @link https://www.dedebiz.com | |||||
/* | |||||
The MIT License (MIT) | |||||
Copyright (c) 2014-2019 British Columbia Institute of Technology | |||||
Copyright (c) 2019-2020 CodeIgniter Foundation | |||||
*/ | |||||
function is_cli() | |||||
{ | |||||
return (PHP_SAPI === 'cli' || defined('STDIN')); | |||||
} | |||||
class DedeCli | |||||
{ | |||||
public static $readline_support = false; | |||||
protected static $initialized = false; | |||||
protected static $wait_msg = "Press any key to continue..."; | |||||
protected static $segments = []; | |||||
protected static $options = []; | |||||
protected static $foreground_colors = [ | |||||
'black' => '0;30', | |||||
'dark_gray' => '1;30', | |||||
'blue' => '0;34', | |||||
'dark_blue' => '1;34', | |||||
'light_blue' => '1;34', | |||||
'green' => '0;32', | |||||
'light_green' => '1;32', | |||||
'cyan' => '0;36', | |||||
'light_cyan' => '1;36', | |||||
'red' => '0;31', | |||||
'light_red' => '1;31', | |||||
'purple' => '0;35', | |||||
'light_purple' => '1;35', | |||||
'light_yellow' => '0;33', | |||||
'yellow' => '1;33', | |||||
'light_gray' => '0;37', | |||||
'white' => '1;37', | |||||
]; | |||||
protected static $background_colors = [ | |||||
'black' => '40', | |||||
'red' => '41', | |||||
'green' => '42', | |||||
'yellow' => '43', | |||||
'blue' => '44', | |||||
'magenta' => '45', | |||||
'cyan' => '46', | |||||
'light_gray' => '47', | |||||
]; | |||||
public static function init() | |||||
{ | |||||
if (is_cli()) | |||||
{ | |||||
static::$readline_support = extension_loaded('readline'); | |||||
static::parseCommandLine(); | |||||
static::$initialized = true; | |||||
} else | |||||
{ | |||||
define('STDOUT', 'php://output'); | |||||
} | |||||
} | |||||
private static function parseCommandLine() | |||||
{ | |||||
$optionsFound = false; | |||||
for ($i=1; $i < $_SERVER['argc']; $i++) | |||||
{ | |||||
if (! $optionsFound && strpos($_SERVER['argv'][$i], '-') === false) | |||||
{ | |||||
static::$segments[] = $_SERVER['argv'][$i]; | |||||
continue; | |||||
} | |||||
$optionsFound = true; | |||||
if (substr($_SERVER['argv'][$i], 0, 1) != '-') | |||||
{ | |||||
continue; | |||||
} | |||||
$arg = str_replace('-', '', $_SERVER['argv'][$i]); | |||||
$value = null; | |||||
if (isset($_SERVER['argv'][$i+1]) && substr($_SERVER['argv'][$i+1], 0, 1) != '-') | |||||
{ | |||||
$value = $_SERVER['argv'][$i+1]; | |||||
$i++; | |||||
} | |||||
static::$options[$arg] = $value; | |||||
$optionsFound = false; | |||||
} | |||||
} | |||||
public static function getOption(string $name) | |||||
{ | |||||
if (! array_key_exists($name, static::$options)) | |||||
{ | |||||
return null; | |||||
} | |||||
$val = static::$options[$name] === null | |||||
? true | |||||
: static::$options[$name]; | |||||
return $val; | |||||
} | |||||
public static function getOptions() | |||||
{ | |||||
return static::$options; | |||||
} | |||||
public static function getOptionString(): string | |||||
{ | |||||
if (! count(static::$options)) | |||||
{ | |||||
return ''; | |||||
} | |||||
$out = ''; | |||||
foreach (static::$options as $name => $value) | |||||
{ | |||||
if (mb_strpos($value, ' ') !== false) | |||||
{ | |||||
$value = '"'.$value.'"'; | |||||
} | |||||
$out .= "-{$name} $value "; | |||||
} | |||||
return $out; | |||||
} | |||||
public static function newLine(int $num = 1) | |||||
{ | |||||
for ($i = 0; $i < $num; $i++) | |||||
{ | |||||
static::write(''); | |||||
} | |||||
} | |||||
public static function isWindows() | |||||
{ | |||||
return 'win' === strtolower(substr(php_uname("s"), 0, 3)); | |||||
} | |||||
public static function color(string $text, string $foreground, string $background = null, string $format = null) | |||||
{ | |||||
if (static::isWindows() && ! isset($_SERVER['ANSICON'])) | |||||
{ | |||||
return $text; | |||||
} | |||||
if ( ! array_key_exists($foreground, static::$foreground_colors)) | |||||
{ | |||||
throw new \RuntimeException('Invalid CLI foreground color: '.$foreground); | |||||
} | |||||
if ($background !== null && ! array_key_exists($background, static::$background_colors)) | |||||
{ | |||||
throw new \RuntimeException('Invalid CLI background color: '.$background); | |||||
} | |||||
$string = "\033[".static::$foreground_colors[$foreground]."m"; | |||||
if ($background !== null) | |||||
{ | |||||
$string .= "\033[".static::$background_colors[$background]."m"; | |||||
} | |||||
if ($format === 'underline') | |||||
{ | |||||
$string .= "\033[4m"; | |||||
} | |||||
$string .= $text."\033[0m"; | |||||
return $string; | |||||
} | |||||
public static function getWidth(int $default = 80): int | |||||
{ | |||||
if (static::isWindows()) | |||||
{ | |||||
return $default; | |||||
} | |||||
return (int)shell_exec('tput cols'); | |||||
} | |||||
public static function getHeight(int $default = 32): int | |||||
{ | |||||
if (static::isWindows()) | |||||
{ | |||||
return $default; | |||||
} | |||||
return (int)shell_exec('tput lines'); | |||||
} | |||||
public static function showProgress($thisStep = 1, int $totalSteps = 10) | |||||
{ | |||||
static $inProgress = false; | |||||
if ($inProgress !== false && $inProgress <= $thisStep) | |||||
{ | |||||
fwrite(STDOUT, "\033[1A"); | |||||
} | |||||
$inProgress = $thisStep; | |||||
if ($thisStep !== false) | |||||
{ | |||||
$thisStep = abs($thisStep); | |||||
$totalSteps = $totalSteps < 1 ? 1 : $totalSteps; | |||||
$percent = intval(($thisStep / $totalSteps) * 100); | |||||
$step = (int)round($percent / 10); | |||||
fwrite(STDOUT, "[\033[32m".str_repeat('#', $step).str_repeat('.', 10 - $step)."\033[0m]"); | |||||
fwrite(STDOUT, sprintf(" %3d%% Complete", $percent).PHP_EOL); | |||||
} | |||||
else | |||||
{ | |||||
fwrite(STDOUT, "\007"); | |||||
} | |||||
} | |||||
public static function wrap(string $string = null, int $max = 0, int $pad_left = 0): string | |||||
{ | |||||
if (empty($string)) | |||||
{ | |||||
return ''; | |||||
} | |||||
if ($max == 0) | |||||
{ | |||||
$max = DedeCli::getWidth(); | |||||
} | |||||
if (DedeCli::getWidth() < $max) | |||||
{ | |||||
$max = DedeCli::getWidth(); | |||||
} | |||||
$max = $max - $pad_left; | |||||
$lines = wordwrap($string, $max); | |||||
if ($pad_left > 0) | |||||
{ | |||||
$lines = explode(PHP_EOL, $lines); | |||||
$first = true; | |||||
array_walk($lines, function (&$line, $index) use ($max, $pad_left, &$first) | |||||
{ | |||||
if ( ! $first) | |||||
{ | |||||
$line = str_repeat(" ", $pad_left).$line; | |||||
} | |||||
else | |||||
{ | |||||
$first = false; | |||||
} | |||||
}); | |||||
$lines = implode(PHP_EOL, $lines); | |||||
} | |||||
return $lines; | |||||
} | |||||
public static function clearScreen() | |||||
{ | |||||
static::isWindows() | |||||
? static::newLine(40) | |||||
: fwrite(STDOUT, chr(27)."[H".chr(27)."[2J"); | |||||
} | |||||
public static function input(string $prefix = null): string | |||||
{ | |||||
if (static::$readline_support) | |||||
{ | |||||
return readline($prefix); | |||||
} | |||||
echo $prefix; | |||||
return fgets(STDIN); | |||||
} | |||||
/** | |||||
* 询问用户输入.这个可以1个或2个参数. | |||||
* | |||||
* 使用: | |||||
* | |||||
* // 等待任何输入 | |||||
* DedeCli::prompt(); | |||||
* | |||||
* $color = DedeCli::prompt('What is your favorite color?'); | |||||
* | |||||
* $color = DedeCli::prompt('What is your favourite color?', 'white'); | |||||
* | |||||
* $ready = DedeCli::prompt('Are you ready?', array('y','n')); | |||||
* | |||||
* @return string the user input | |||||
*/ | |||||
public static function prompt(): string | |||||
{ | |||||
$args = func_get_args(); | |||||
$options = []; | |||||
$output = ''; | |||||
$default = null; | |||||
$arg_count = count($args); | |||||
$required = end($args) === true; | |||||
$required === true && --$arg_count; | |||||
switch ($arg_count) | |||||
{ | |||||
case 2: | |||||
// E.g: $ready = DedeCli::prompt('Are you ready?', array('y','n')); | |||||
if (is_array($args[1])) | |||||
{ | |||||
list($output, $options) = $args; | |||||
} | |||||
// E.g: $color = DedeCli::prompt('What is your favourite color?', 'white'); | |||||
elseif (is_string($args[1])) | |||||
{ | |||||
list($output, $default) = $args; | |||||
} | |||||
break; | |||||
case 1: | |||||
// E.g: $ready = DedeCli::prompt(array('y','n')); | |||||
if (is_array($args[0])) | |||||
{ | |||||
$options = $args[0]; | |||||
} | |||||
// E.g: $ready = DedeCli::prompt('What did you do today?'); | |||||
elseif (is_string($args[0])) | |||||
{ | |||||
$output = $args[0]; | |||||
} | |||||
break; | |||||
} | |||||
if ($output !== '') | |||||
{ | |||||
$extra_output = ''; | |||||
if ($default !== null) | |||||
{ | |||||
$extra_output = ' [ Default: "'.$default.'" ]'; | |||||
} | |||||
elseif ($options !== []) | |||||
{ | |||||
$extra_output = ' [ '.implode(', ', $options).' ]'; | |||||
} | |||||
fwrite(STDOUT, $output.$extra_output.': '); | |||||
} | |||||
$input = trim(static::input()) ? : $default; | |||||
if (empty($input) && $required === true) | |||||
{ | |||||
static::write('This is required.'); | |||||
static::newLine(); | |||||
$input = forward_static_call_array([__CLASS__, 'prompt'], $args); | |||||
} | |||||
if ( ! empty($options) && ! in_array($input, $options)) | |||||
{ | |||||
static::write('This is not a valid option. Please try again.'); | |||||
static::newLine(); | |||||
$input = forward_static_call_array([__CLASS__, 'prompt'], $args); | |||||
} | |||||
return empty($input) ? '' : $input; | |||||
} | |||||
public static function wait(int $seconds, bool $countdown = false) | |||||
{ | |||||
if ($countdown === true) | |||||
{ | |||||
$time = $seconds; | |||||
while ($time > 0) | |||||
{ | |||||
fwrite(STDOUT, $time.'... '); | |||||
sleep(1); | |||||
$time--; | |||||
} | |||||
static::write(); | |||||
} | |||||
else | |||||
{ | |||||
if ($seconds > 0) | |||||
{ | |||||
sleep($seconds); | |||||
} | |||||
else | |||||
{ | |||||
static::write(static::$wait_msg); | |||||
static::input(); | |||||
} | |||||
} | |||||
} | |||||
public static function error(string $text, string $foreground = 'light_red', string $background = null) | |||||
{ | |||||
if ($foreground || $background) | |||||
{ | |||||
$text = static::color($text, $foreground, $background); | |||||
} | |||||
fwrite(STDERR, $text.PHP_EOL); | |||||
} | |||||
public static function write(string $text = '', string $foreground = null, string $background = null) | |||||
{ | |||||
if ($foreground || $background) | |||||
{ | |||||
$text = static::color($text, $foreground, $background); | |||||
} | |||||
fwrite(STDOUT, $text.PHP_EOL); | |||||
} | |||||
} | |||||
DedeCli::init(); |
@@ -283,7 +283,7 @@ function ResetVdValue() | |||||
function IndexSub($idx, $num) | function IndexSub($idx, $num) | ||||
{ | { | ||||
return intval($idx - $num) == 0 ? '0 ' : intval($idx - $num); | |||||
return intval($idx) - intval($num) == 0 ? '0 ' : intval($idx) - intval($num); | |||||
} | } | ||||
// 用来返回index的active | // 用来返回index的active | ||||
@@ -25,11 +25,6 @@ define('DEDEDATA', DEDEROOT . '/data'); | |||||
define('DEDEMEMBER', DEDEROOT . '/member'); | define('DEDEMEMBER', DEDEROOT . '/member'); | ||||
define('DEDETEMPLATE', DEDEROOT . '/templets'); | define('DEDETEMPLATE', DEDEROOT . '/templets'); | ||||
// ------------------------------------------------------------------------ | |||||
define('DEDEMODEL', './model'); | |||||
define('DEDECONTROL', './control'); | |||||
define('DEDEAPPTPL', './templates'); | |||||
// ------------------------------------------------------------------------ | // ------------------------------------------------------------------------ | ||||
define('DEDEBIZURL', "https://www.dedebiz.com"); // Dede商业支持 | define('DEDEBIZURL', "https://www.dedebiz.com"); // Dede商业支持 | ||||
define('DEDEVER', 6); // 当前系统大版本 | define('DEDEVER', 6); // 当前系统大版本 | ||||
@@ -177,7 +172,12 @@ if (PHP_VERSION > '5.1') { | |||||
$cfg_isUrlOpen = @ini_get("allow_url_fopen"); | $cfg_isUrlOpen = @ini_get("allow_url_fopen"); | ||||
//用户访问的网站host | //用户访问的网站host | ||||
$cfg_clihost = 'http://' . $_SERVER['HTTP_HOST']; | |||||
if (PHP_SAPI === 'cli') { | |||||
$cfg_clihost = 'https://www.dedebiz.com'; | |||||
} else { | |||||
$cfg_clihost = 'http://' . $_SERVER['HTTP_HOST']; | |||||
} | |||||
//站点根目录 | //站点根目录 | ||||
$cfg_basedir = preg_replace('#' . $cfg_cmspath . '\/include$#i', '', DEDEINC); | $cfg_basedir = preg_replace('#' . $cfg_cmspath . '\/include$#i', '', DEDEINC); | ||||
@@ -237,7 +237,7 @@ $cfg_other_medias = $cfg_medias_dir . '/media'; | |||||
//软件摘要信息,****请不要删除本项**** 否则系统无法正确接收系统漏洞或升级信息 | //软件摘要信息,****请不要删除本项**** 否则系统无法正确接收系统漏洞或升级信息 | ||||
$cfg_version = 'V6'; | $cfg_version = 'V6'; | ||||
$cfg_version_detail = '6.0.2'; // 详细版本号 | |||||
$cfg_version_detail = '6.0.1'; // 详细版本号 | |||||
$cfg_soft_lang = 'utf-8'; | $cfg_soft_lang = 'utf-8'; | ||||
$cfg_soft_public = 'base'; | $cfg_soft_public = 'base'; | ||||
@@ -296,7 +296,10 @@ if ($cfg_memcache_enable == 'Y') { | |||||
} | } | ||||
if (!isset($cfg_NotPrintHead)) { | if (!isset($cfg_NotPrintHead)) { | ||||
header("Content-Type: text/html; charset={$cfg_soft_lang}"); | |||||
if (PHP_SAPI != 'cli') { | |||||
header("Content-Type: text/html; charset={$cfg_soft_lang}"); | |||||
} | |||||
} | } | ||||
//自动加载类库处理 | //自动加载类库处理 | ||||
@@ -93,6 +93,24 @@ class DedeBizClient | |||||
return $this->request($req); | return $this->request($req); | ||||
} | } | ||||
// 发送邮件 | |||||
function MailSend($to, $subject, $title, $content="", $quote="", $link_url="", $link_title="") | |||||
{ | |||||
$req = array( | |||||
"method" => "main_send", | |||||
"parms" => array( | |||||
"to" => $to, | |||||
"subject" => $subject, | |||||
"title" => $title, | |||||
"content" => $content, | |||||
"quote" => $quote, | |||||
"link_url" => $link_url, | |||||
"link_title" => $link_title, | |||||
) | |||||
); | |||||
return $this->request($req); | |||||
} | |||||
// 获取一个管理员信息 | // 获取一个管理员信息 | ||||
function AdminGetOne() | function AdminGetOne() | ||||
{ | { | ||||
@@ -250,6 +268,14 @@ class DedeBizClient | |||||
// !!!一次页面操作后一定记得要关闭连接,否则会占用系统资源 | // !!!一次页面操作后一定记得要关闭连接,否则会占用系统资源 | ||||
function Close() | function Close() | ||||
{ | { | ||||
socket_close($this->socket); | |||||
// 这里避免重复释放 | |||||
if (strtolower(get_resource_type($this->socket)) === "socket") { | |||||
socket_close($this->socket); | |||||
} | |||||
} | |||||
function __destruct() | |||||
{ | |||||
$this->Close(); | |||||
} | } | ||||
} | } |
@@ -229,7 +229,11 @@ class DedeSqli | |||||
} | } | ||||
if (DEBUG_LEVEL === TRUE) { | if (DEBUG_LEVEL === TRUE) { | ||||
$queryTime = ExecTime() - $t1; | $queryTime = ExecTime() - $t1; | ||||
echo "<div style='width:98%;margin:1rem auto;color: #155724;background-color: #d4edda;border-color: #c3e6cb;position: relative;padding: .75rem 1.25rem;border: 1px solid transparent;border-radius: .25rem;'>执行SQL:" . $this->queryString . ",执行时间:<b>{$queryTime}</b></div>\r\n"; | |||||
if (PHP_SAPI === 'cli') { | |||||
echo "执行SQL:" . $this->queryString . ",执行时间:{$queryTime}\r\n"; | |||||
} else { | |||||
echo "<div style='width:98%;margin:1rem auto;color: #155724;background-color: #d4edda;border-color: #c3e6cb;position: relative;padding: .75rem 1.25rem;border: 1px solid transparent;border-radius: .25rem;'>执行SQL:" . $this->queryString . ",执行时间:<b>{$queryTime}</b></div>\r\n"; | |||||
} | |||||
} | } | ||||
return $rs; | return $rs; | ||||
@@ -267,7 +271,11 @@ class DedeSqli | |||||
} | } | ||||
if (DEBUG_LEVEL === TRUE) { | if (DEBUG_LEVEL === TRUE) { | ||||
$queryTime = ExecTime() - $t1; | $queryTime = ExecTime() - $t1; | ||||
echo "<div style='width:98%;margin:1rem auto;color: #155724;background-color: #d4edda;border-color: #c3e6cb;position: relative;padding: .75rem 1.25rem;border: 1px solid transparent;border-radius: .25rem;'>执行SQL:" . $this->queryString . ",执行时间:<b>{$queryTime}</b></div>\r\n"; | |||||
if (PHP_SAPI === 'cli') { | |||||
echo "执行SQL:" . $this->queryString . ",执行时间:{$queryTime}\r\n"; | |||||
} else { | |||||
echo "<div style='width:98%;margin:1rem auto;color: #155724;background-color: #d4edda;border-color: #c3e6cb;position: relative;padding: .75rem 1.25rem;border: 1px solid transparent;border-radius: .25rem;'>执行SQL:" . $this->queryString . ",执行时间:<b>{$queryTime}</b></div>\r\n"; | |||||
} | |||||
} | } | ||||
return mysqli_affected_rows($this->linkID); | return mysqli_affected_rows($this->linkID); | ||||
@@ -320,7 +328,11 @@ class DedeSqli | |||||
} | } | ||||
if (DEBUG_LEVEL === TRUE) { | if (DEBUG_LEVEL === TRUE) { | ||||
$queryTime = ExecTime() - $t1; | $queryTime = ExecTime() - $t1; | ||||
echo "<div style='width:98%;margin:1rem auto;color: #155724;background-color: #d4edda;border-color: #c3e6cb;position: relative;padding: .75rem 1.25rem;border: 1px solid transparent;border-radius: .25rem;'>执行SQL:" . $this->queryString . ",执行时间:<b>{$queryTime}</b></div>\r\n"; | |||||
if (PHP_SAPI === 'cli') { | |||||
echo "执行SQL:" . $this->queryString . ",执行时间:{$queryTime}\r\n"; | |||||
} else { | |||||
echo "<div style='width:98%;margin:1rem auto;color: #155724;background-color: #d4edda;border-color: #c3e6cb;position: relative;padding: .75rem 1.25rem;border: 1px solid transparent;border-radius: .25rem;'>执行SQL:" . $this->queryString . ",执行时间:<b>{$queryTime}</b></div>\r\n"; | |||||
} | |||||
} | } | ||||
if ($this->result[$id] === FALSE) { | if ($this->result[$id] === FALSE) { | ||||
@@ -500,7 +500,12 @@ function MakeOneTag(&$dtp, &$refObj, $parfield = 'Y') | |||||
$dtp->Assign($tagid, $funcname($ctag, $refObj)); | $dtp->Assign($tagid, $funcname($ctag, $refObj)); | ||||
if (DEBUG_LEVEL == TRUE) { | if (DEBUG_LEVEL == TRUE) { | ||||
$queryTime = ExecTime() - $ttt1; | $queryTime = ExecTime() - $ttt1; | ||||
echo '<div style="color: #856404;background-color: #fff3cd;border-color: #ffeeba;position: relative;padding: .75rem 1.25rem;margin-bottom: 1rem;border: 1px solid transparent;border-radius: .25rem;" class="alert alert-warning" role="alert">标签:' . $tagname . '载入花费时间:' . $queryTime . "</div>\r\n"; | |||||
if (PHP_SAPI === 'cli') { | |||||
echo '标签:' . $tagname . '载入花费时间:' . $queryTime . "\r\n"; | |||||
} else { | |||||
echo '<div style="color: #856404;background-color: #fff3cd;border-color: #ffeeba;position: relative;padding: .75rem 1.25rem;margin-bottom: 1rem;border: 1px solid transparent;border-radius: .25rem;" class="alert alert-warning" role="alert">标签:' . $tagname . '载入花费时间:' . $queryTime . "</div>\r\n"; | |||||
} | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -90,7 +90,7 @@ class TypeUnitSelector | |||||
$this->LogicListAllSunType($id, $channel, $soncat); | $this->LogicListAllSunType($id, $channel, $soncat); | ||||
if ($chackRadio == '' && $soncat == '') continue; | if ($chackRadio == '' && $soncat == '') continue; | ||||
echo "<div class='quickselItem'>\r\n"; | echo "<div class='quickselItem'>\r\n"; | ||||
echo " <div class='topcat'>{$chackRadio}{$typeName}</div>\r\n"; | |||||
echo " <div class='topcat'><label>{$chackRadio} {$typeName}</label></div>\r\n"; | |||||
if ($soncat != '') echo " <div class='soncat'>{$soncat}</div>\r\n"; | if ($soncat != '') echo " <div class='soncat'>{$soncat}</div>\r\n"; | ||||
echo "</div>\r\n"; | echo "</div>\r\n"; | ||||
} | } | ||||
@@ -105,7 +105,7 @@ class TypeUnitSelector | |||||
* @param int $soncat 子级分类 | * @param int $soncat 子级分类 | ||||
* @return string | * @return string | ||||
*/ | */ | ||||
function LogicListAllSunType($id, $channel = 0, &$soncat) | |||||
function LogicListAllSunType($id, $channel = 0, &$soncat=0) | |||||
{ | { | ||||
global $cfg_admin_channel, $admin_catalogs, $targetid, $oldvalue; | global $cfg_admin_channel, $admin_catalogs, $targetid, $oldvalue; | ||||
$fid = $id; | $fid = $id; | ||||
@@ -133,7 +133,7 @@ class TypeUnitSelector | |||||
continue; | continue; | ||||
} | } | ||||
if ($chackRadio != '') { | if ($chackRadio != '') { | ||||
$soncat .= " <div class='item'>" . $chackRadio . $typeName . "</div>\r\n"; | |||||
$soncat .= " <div class='item'><label>" . $chackRadio .' '. $typeName . "</label></div>\r\n"; | |||||
$this->LogicListAllSunType($id, $channel, $soncat); | $this->LogicListAllSunType($id, $channel, $soncat); | ||||
} else { | } else { | ||||
$soncat .= " <br style='clear:both' /><div class='item'><b>" . $typeName . ":</b></div>\r\n"; | $soncat .= " <br style='clear:both' /><div class='item'><b>" . $typeName . ":</b></div>\r\n"; | ||||
@@ -1,111 +0,0 @@ | |||||
<?php | |||||
if(!defined('DEDEINC')) exit('Request Error!'); | |||||
require_once(DEDEINC.'/channelunit.class.php'); | |||||
//--------------------------------------- | |||||
// Html 标记WAP语言 | |||||
//---------------------------------------- | |||||
function html2wml($content) | |||||
{ | |||||
//保留图片 | |||||
preg_match_all("/<img([^>]*)>/isU", $content, $imgarr); | |||||
if(isset($imgarr[0]) && count($imgarr[0])>0 ) | |||||
{ | |||||
foreach($imgarr[0] as $k=>$v) $content = str_replace($v, "WAP-IMG::{$k}", $content); | |||||
} | |||||
// 过滤掉样式表和脚本 | |||||
$content = preg_replace("/<style .*?<\/style>/is", "", $content); | |||||
$content = preg_replace("/<script .*?<\/script>/is", "", $content); | |||||
// 首先将各种可以引起换行的标签(如<br />、<p> 之类)替换成换行符"\n" | |||||
$content = preg_replace("/<br \s*\/?\/>/i", "\n", $content); | |||||
$content = preg_replace("/<\/?p>/i", "\n", $content); | |||||
$content = preg_replace("/<\/?td>/i", "\n", $content); | |||||
$content = preg_replace("/<\/?div>/i", "\n", $content); | |||||
$content = preg_replace("/<\/?blockquote>/i", "\n", $content); | |||||
$content = preg_replace("/<\/?li>/i", "\n", $content); | |||||
// 将" "替换为空格 | |||||
$content = preg_replace("/\ \;/i", " ", $content); | |||||
$content = preg_replace("/\ /i", " ", $content); | |||||
// 过滤掉剩下的 HTML 标签 | |||||
$content = strip_tags($content); | |||||
// 将 HTML 中的实体(entity)转化为它所对应的字符 | |||||
$content = html_entity_decode($content, ENT_QUOTES, "GB2312"); | |||||
// 过滤掉不能转化的实体(entity) | |||||
$content = preg_replace('/\&\#.*?\;/i', '', $content); | |||||
// 上面是将 HTML 网页内容转化为带换行的纯文本,下面是将这些纯文本转化为 WML。 | |||||
$content = str_replace('$', '$$', $content); | |||||
$content = str_replace("\r\n", "\n", dede_htmlspecialchars($content)); | |||||
$content = explode("\n", $content); | |||||
for ($i = 0; $i < count($content); $i++) | |||||
{ | |||||
$content[$i] = trim($content[$i]); | |||||
// 如果去掉全角空格为空行,则设为空行,否则不对全角空格过滤。 | |||||
if (str_replace(' ', '', $content[$i]) == '') $content[$i] = ''; | |||||
} | |||||
$content = str_replace("<p><br /></p>\n", "", '<p>'.implode("<br /></p>\n<p>", $content)."<br /></p>\n"); | |||||
//还原图片 | |||||
if(isset($imgarr[0]) && count($imgarr[0])>0 ) | |||||
{ | |||||
foreach($imgarr[0] as $k=>$v) | |||||
{ | |||||
$attstr = (preg_match('#/$#', $imgarr[1][$k])) ? '<img '.$imgarr[1][$k].'>' : '<img '.$imgarr[1][$k].' />'; | |||||
$content = str_replace("WAP-IMG::{$k}", $attstr, $content); | |||||
} | |||||
} | |||||
$content = preg_replace("/&[a-z]{3,10};/isU", ' ', $content); | |||||
return $content; | |||||
} | |||||
function text2wml($content) | |||||
{ | |||||
$content = str_replace('$', '$$', $content); | |||||
$content = str_replace("\r\n", "\n", dede_htmlspecialchars($content)); | |||||
$content = explode("\n", $content); | |||||
for ($i = 0; $i < count($content); $i++) | |||||
{ | |||||
// 过滤首尾空格 | |||||
$content[$i] = trim($content[$i]); | |||||
// 如果去掉全角空格为空行,则设为空行,否则不对全角空格过滤。 | |||||
if (str_replace(" ", "", $content[$i]) == "") $content[$i] = ""; | |||||
} | |||||
//合并各行,转化为 WML,并过滤掉空行 | |||||
$content = str_replace("<p><br /></p>\n", "", "<p>".implode("<br /></p>\n<p>", $content)."<br /></p>\n"); | |||||
return $content; | |||||
} | |||||
//---------------------- | |||||
//把GBK字符转换成UTF8 | |||||
//---------------------- | |||||
function ConvertCharset($varlist) | |||||
{ | |||||
global $cfg_soft_lang; | |||||
if(preg_match('#utf#i',$cfg_soft_lang)) return 0; | |||||
$varlists = explode(',',$varlist); | |||||
$numargs=count($varlists); | |||||
for($i = 0; $i < $numargs; $i++) | |||||
{ | |||||
if(isset($GLOBALS[$varlists[$i]])) | |||||
{ | |||||
$GLOBALS[$varlists[$i]] = gb2utf8($GLOBALS[$varlists[$i]]); | |||||
} | |||||
} | |||||
return 1; | |||||
} | |||||
//---------------------- | |||||
//处理特殊字符 | |||||
//---------------------- | |||||
function ConvertStr($str) | |||||
{ | |||||
$str = str_replace("&","##amp;",$str); | |||||
$str = str_replace("&","&",$str); | |||||
$str = preg_replace("#[\"><']#","",$str); | |||||
$str = str_replace("##amp;","&",$str); | |||||
return $str; | |||||
} | |||||
?> |
@@ -1,391 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* @version $Id: index.php 1 13:41 2010年7月26日Z tianya $ | |||||
* @package DedeBIZ.Install | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
@set_time_limit(0); | |||||
//error_reporting(E_ALL); | |||||
error_reporting(E_ALL || ~E_NOTICE); | |||||
$verMsg = 'V6'; | |||||
$dfDbname = 'dedecmsv6utf8'; | |||||
$errmsg = ''; | |||||
define('INSLOCKFILE', dirname(__FILE__).'/install_lock.txt'); | |||||
$moduleCacheFile = dirname(__FILE__).'/modules.tmp.inc'; | |||||
define('DEDEINC',dirname(__FILE__).'/../include'); | |||||
define('DEDEDATA',dirname(__FILE__).'/../data'); | |||||
define('DEDEROOT',preg_replace("#[\\\\\/]install#", '', dirname(__FILE__))); | |||||
header("Content-Type: text/html; charset=utf-8"); | |||||
require_once(DEDEROOT.'/install/install.inc.php'); | |||||
require_once(DEDEINC.'/zip.class.php'); | |||||
foreach(Array('_GET','_POST','_COOKIE') as $_request) | |||||
{ | |||||
foreach($$_request as $_k => $_v) ${$_k} = RunMagicQuotes($_v); | |||||
} | |||||
require_once(DEDEINC.'/common.func.php'); | |||||
if(file_exists(INSLOCKFILE)) | |||||
{ | |||||
exit(" 程序已运行安装,如果你确定要重新安装,请先从FTP中删除 install/install_lock.txt!"); | |||||
} | |||||
if(empty($step)) | |||||
{ | |||||
$step = 1; | |||||
} | |||||
/*------------------------ | |||||
使用协议书 | |||||
function _1_Agreement() | |||||
------------------------*/ | |||||
if($step==1) | |||||
{ | |||||
include('./templates/step-1.html'); | |||||
exit(); | |||||
} | |||||
/*------------------------ | |||||
环境测试 | |||||
function _2_TestEnv() | |||||
------------------------*/ | |||||
else if($step==2) | |||||
{ | |||||
$phpv = phpversion(); | |||||
$sp_os = PHP_OS; | |||||
$sp_gd = gdversion(); | |||||
$sp_server = $_SERVER['SERVER_SOFTWARE']; | |||||
$sp_host = (empty($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_HOST'] : $_SERVER['REMOTE_ADDR']); | |||||
$sp_name = $_SERVER['SERVER_NAME']; | |||||
$sp_max_execution_time = ini_get('max_execution_time'); | |||||
$sp_openssl = (extension_loaded("openssl") ? '<font color=green>[√]On</font>' : '<font color=red>[×]Off</font>'); | |||||
$sp_sockets = (extension_loaded("sockets") ? '<font color=green>[√]On</font>' : '<font color=red>[×]Off</font>'); | |||||
$sp_allow_reference = (ini_get('allow_call_time_pass_reference') ? '<font color=green>[√]On</font>' : '<font color=red>[×]Off</font>'); | |||||
$sp_allow_url_fopen = (ini_get('allow_url_fopen') ? '<font color=green>[√]On</font>' : '<font color=red>[×]Off</font>'); | |||||
$sp_safe_mode = (ini_get('safe_mode') ? '<font color=red>[×]On</font>' : '<font color=green>[√]Off</font>'); | |||||
$sp_gd = ($sp_gd>0 ? '<font color=green>[√]On</font>' : '<font color=red>[×]Off</font>'); | |||||
$sp_mysql = (function_exists('mysqli_connect') ? '<font color=green>[√]On</font>' : '<font color=red>[×]Off</font>'); | |||||
if($sp_mysql=='<font color=red>[×]Off</font>') | |||||
$sp_mysql_err = TRUE; | |||||
else | |||||
$sp_mysql_err = FALSE; | |||||
$sp_testdirs = array( | |||||
'/', | |||||
'/plus/*', | |||||
'/dede/*', | |||||
'/data/*', | |||||
'/a/*', | |||||
'/install', | |||||
'/special', | |||||
'/uploads/*' | |||||
); | |||||
include('./templates/step-2.html'); | |||||
exit(); | |||||
} | |||||
/*------------------------ | |||||
设置参数 | |||||
function _3_WriteSeting() | |||||
------------------------*/ | |||||
else if($step==3) | |||||
{ | |||||
if(!empty($_SERVER['REQUEST_URI'])) | |||||
$scriptName = $_SERVER['REQUEST_URI']; | |||||
else | |||||
$scriptName = $_SERVER['PHP_SELF']; | |||||
$basepath = preg_replace("#\/install(.*)$#i", '', $scriptName); | |||||
if(!empty($_SERVER['HTTP_HOST'])) | |||||
$baseurl = 'http://'.$_SERVER['HTTP_HOST']; | |||||
else | |||||
$baseurl = "http://".$_SERVER['SERVER_NAME']; | |||||
$chars='abcdefghigklmnopqrstuvwxwyABCDEFGHIGKLMNOPQRSTUVWXWY0123456789'; | |||||
$rnd_cookieEncode=''; | |||||
$length = rand(28,32); | |||||
$max = strlen($chars) - 1; | |||||
for($i = 0; $i < $length; $i++) { | |||||
$rnd_cookieEncode .= $chars[mt_rand(0, $max)]; | |||||
} | |||||
$module_local = DEDEDATA.'/module/'; | |||||
include('./templates/step-3.html'); | |||||
exit(); | |||||
} | |||||
/*------------------------ | |||||
普通安装 | |||||
function _4_Setup() | |||||
------------------------*/ | |||||
else if($step==4) | |||||
{ | |||||
if ( $dbtype == 'sqlite' ) | |||||
{ | |||||
$db = new SQLite3(DEDEDATA.'/'.$dbname.'.db'); | |||||
} else { | |||||
$dbtype = 'mysql'; | |||||
$conn = mysql_connect($dbhost,$dbuser,$dbpwd) or die("<script>alert('数据库服务器或登录密码无效,\\n\\n无法连接数据库,请重新设定!');history.go(-1);</script>"); | |||||
mysql_query("CREATE DATABASE IF NOT EXISTS `".$dbname."`;",$conn); | |||||
mysql_select_db($dbname, $conn) or die("<script>alert('选择数据库失败,可能是你没权限,请预先创建一个数据库!');history.go(-1);</script>"); | |||||
//获得数据库版本信息 | |||||
$rs = mysql_query("SELECT VERSION();",$conn); | |||||
$row = mysql_fetch_array($rs); | |||||
$mysqlVersions = explode('.',trim($row[0])); | |||||
$mysqlVersion = $mysqlVersions[0].".".$mysqlVersions[1]; | |||||
mysql_query("SET NAMES '$dblang',character_set_client=binary,sql_mode='';",$conn); | |||||
} | |||||
$fp = fopen(dirname(__FILE__)."/common.inc.php","r"); | |||||
$configStr1 = fread($fp,filesize(dirname(__FILE__)."/common.inc.php")); | |||||
fclose($fp); | |||||
$fp = fopen(dirname(__FILE__)."/config.cache.inc.php","r"); | |||||
$configStr2 = fread($fp,filesize(dirname(__FILE__)."/config.cache.inc.php")); | |||||
fclose($fp); | |||||
//common.inc.php | |||||
$configStr1 = str_replace("~dbtype~",$dbtype,$configStr1); | |||||
$configStr1 = str_replace("~dbhost~",$dbhost,$configStr1); | |||||
$configStr1 = str_replace("~dbname~",$dbname,$configStr1); | |||||
$configStr1 = str_replace("~dbuser~",$dbuser,$configStr1); | |||||
$configStr1 = str_replace("~dbpwd~",$dbpwd,$configStr1); | |||||
$configStr1 = str_replace("~dbprefix~",$dbprefix,$configStr1); | |||||
$configStr1 = str_replace("~dblang~",$dblang,$configStr1); | |||||
@chmod(DEDEDATA,0777); | |||||
$fp = fopen(DEDEDATA."/common.inc.php","w") or die("<script>alert('写入配置失败,请检查../data目录是否可写入!');history.go(-1);</script>"); | |||||
fwrite($fp,$configStr1); | |||||
fclose($fp); | |||||
//config.cache.inc.php | |||||
$cmspath = trim(preg_replace("#\/{1,}#", '/', $cmspath)); | |||||
if($cmspath!='' && !preg_match("#^\/#", $cmspath)) $cmspath = '/'.$cmspath; | |||||
if($cmspath=='') $indexUrl = '/'; | |||||
else $indexUrl = $cmspath; | |||||
$configStr2 = str_replace("~baseurl~",$baseurl,$configStr2); | |||||
$configStr2 = str_replace("~basepath~",$cmspath,$configStr2); | |||||
$configStr2 = str_replace("~indexurl~",$indexUrl,$configStr2); | |||||
$configStr2 = str_replace("~cookieEncode~",$cookieencode,$configStr2); | |||||
$configStr2 = str_replace("~webname~",$webname,$configStr2); | |||||
$configStr2 = str_replace("~adminmail~",$adminmail,$configStr2); | |||||
$fp = fopen(DEDEDATA.'/config.cache.inc.php','w'); | |||||
fwrite($fp,$configStr2); | |||||
fclose($fp); | |||||
$fp = fopen(DEDEDATA.'/config.cache.bak.php','w'); | |||||
fwrite($fp,$configStr2); | |||||
fclose($fp); | |||||
if($mysqlVersion >= 4.1) | |||||
{ | |||||
$sql4tmp = "ENGINE=MyISAM DEFAULT CHARSET=".$dblang; | |||||
} | |||||
//创建数据表 | |||||
$query = ''; | |||||
$fp = fopen(dirname(__FILE__).'/sql-dftables.txt','r'); | |||||
while(!feof($fp)) | |||||
{ | |||||
$line = rtrim(fgets($fp,1024)); | |||||
if(preg_match("#;$#", $line)) | |||||
{ | |||||
$query .= $line."\n"; | |||||
$query = str_replace('#@__',$dbprefix,$query); | |||||
if ( $dbtype == 'sqlite' ) | |||||
{ | |||||
$query = preg_replace('/character set (.*?) /i','',$query); | |||||
$query = str_replace('unsigned','',$query); | |||||
$query = str_replace('TYPE=MyISAM','',$query); | |||||
$query = preg_replace ('/TINYINT\(([\d]+)\)/i','INTEGER',$query); | |||||
$query = preg_replace ('/mediumint\(([\d]+)\)/i','INTEGER',$query); | |||||
$query = preg_replace ('/smallint\(([\d]+)\)/i','INTEGER',$query); | |||||
$query = preg_replace('/int\(([\d]+)\)/i','INTEGER',$query); | |||||
$query = preg_replace('/auto_increment/i','PRIMARY KEY AUTOINCREMENT',$query); | |||||
$query = preg_replace('/, KEY(.*?)MyISAM;/','',$query); | |||||
$query = preg_replace('/, KEY(.*?);/',');',$query); | |||||
$query = preg_replace('/, UNIQUE KEY(.*?);/',');',$query); | |||||
$query = preg_replace('/set\(([^\)]*?)\)/','varchar',$query); | |||||
$query = preg_replace('/enum\(([^\)]*?)\)/','varchar',$query); | |||||
if ( preg_match("/PRIMARY KEY AUTOINCREMENT/",$query) ) | |||||
{ | |||||
$query = preg_replace('/,([\t\s ]+)PRIMARY KEY \(`([0-9a-zA-Z]+)`\)/i','',$query); | |||||
$query = str_replace(', PRIMARY KEY (`id`)','',$query); | |||||
} | |||||
$db->exec($query); | |||||
} else { | |||||
if($mysqlVersion < 4.1) | |||||
{ | |||||
$rs = mysql_query($query,$conn); | |||||
} else { | |||||
if(preg_match('#CREATE#i', $query)) | |||||
{ | |||||
$rs = mysql_query(preg_replace("#TYPE=MyISAM#i",$sql4tmp,$query),$conn); | |||||
} | |||||
else | |||||
{ | |||||
$rs = mysql_query($query,$conn); | |||||
} | |||||
} | |||||
} | |||||
$query=''; | |||||
} else if(!preg_match("#^(\/\/|--)#", $line)) | |||||
{ | |||||
$query .= $line; | |||||
} | |||||
} | |||||
fclose($fp); | |||||
//导入默认数据 | |||||
$query = ''; | |||||
$fp = fopen(dirname(__FILE__).'/sql-dfdata.txt','r'); | |||||
while(!feof($fp)) | |||||
{ | |||||
$line = rtrim(fgets($fp, 1024)); | |||||
if(preg_match("#;$#", $line)) | |||||
{ | |||||
if ( $dbtype == 'sqlite' ) | |||||
{ | |||||
$query .= $line; | |||||
$query = str_replace('#@__',$dbprefix,$query); | |||||
$query = str_replace("\'","\"",$query); | |||||
$db->exec($query); | |||||
} else { | |||||
$query .= $line; | |||||
$query = str_replace('#@__',$dbprefix,$query); | |||||
if($mysqlVersion < 4.1) $rs = mysql_query($query,$conn); | |||||
else $rs = mysql_query(str_replace('#~lang~#',$dblang,$query),$conn); | |||||
} | |||||
$query=''; | |||||
} else if(!preg_match("#^(\/\/|--)#", $line)) | |||||
{ | |||||
$query .= $line; | |||||
} | |||||
} | |||||
fclose($fp); | |||||
//更新配置 | |||||
$cquery = "Update `{$dbprefix}sysconfig` set value='{$baseurl}' where varname='cfg_basehost';"; | |||||
$dbtype == 'sqlite'? $db->exec($cquery) : mysql_query($cquery,$conn); | |||||
$cquery = "Update `{$dbprefix}sysconfig` set value='{$cmspath}' where varname='cfg_cmspath';"; | |||||
$dbtype == 'sqlite'? $db->exec($cquery) : mysql_query($cquery,$conn); | |||||
$cquery = "Update `{$dbprefix}sysconfig` set value='{$indexUrl}' where varname='cfg_indexurl';"; | |||||
$dbtype == 'sqlite'? $db->exec($cquery) : mysql_query($cquery,$conn); | |||||
$cquery = "Update `{$dbprefix}sysconfig` set value='{$cookieencode}' where varname='cfg_cookie_encode';"; | |||||
$dbtype == 'sqlite'? $db->exec($cquery) : mysql_query($cquery,$conn); | |||||
$cquery = "Update `{$dbprefix}sysconfig` set value='{$webname}' where varname='cfg_webname';"; | |||||
$dbtype == 'sqlite'? $db->exec($cquery) : mysql_query($cquery,$conn); | |||||
$cquery = "Update `{$dbprefix}sysconfig` set value='{$adminmail}' where varname='cfg_adminemail';"; | |||||
$dbtype == 'sqlite'? $db->exec($cquery) : mysql_query($cquery,$conn); | |||||
//增加管理员帐号 | |||||
$adminquery = "INSERT INTO `{$dbprefix}admin` VALUES (1, 10, '$adminuser', '".substr(md5($adminpwd),5,20)."', 'admin', '', '', 0, '".time()."', '127.0.0.1');"; | |||||
$dbtype == 'sqlite'? $db->exec($adminquery) : mysql_query($adminquery,$conn); | |||||
//关连前台会员帐号 | |||||
$adminquery = "INSERT INTO `{$dbprefix}member` (`mid`,`mtype`,`userid`,`pwd`,`uname`,`sex`,`rank`,`money`,`email`, | |||||
`scores` ,`matt` ,`face`,`safequestion`,`safeanswer` ,`jointime` ,`joinip` ,`logintime` ,`loginip` ) | |||||
VALUES ('1','个人','$adminuser','".md5($adminpwd)."','$adminuser','男','100','0','','10000','10','','0','','".time()."','','0',''); "; | |||||
$dbtype == 'sqlite'? $db->exec($adminquery) : mysql_query($adminquery,$conn); | |||||
$adminquery = "INSERT INTO `{$dbprefix}member_person` (`mid`,`onlynet`,`sex`,`uname`,`qq`,`msn`,`tel`,`mobile`,`place`,`oldplace`,`birthday`,`star`, | |||||
`income` , `education` , `height` , `bodytype` , `blood` , `vocation` , `smoke` , `marital` , `house` ,`drink` , `datingtype` , `language` , `nature` , `lovemsg` , `address`,`uptime`) | |||||
VALUES ('1', '1', '男', '{$adminuser}', '', '', '', '', '0', '0','1980-01-01', '1', '0', '0', '160', '0', '0', '0', '0', '0', '0','0', '0', '', '', '', '','0'); "; | |||||
$dbtype == 'sqlite'? $db->exec($adminquery) : mysql_query($adminquery,$conn); | |||||
$adminquery = "INSERT INTO `{$dbprefix}member_tj` (`mid`,`article`,`album`,`archives`,`homecount`,`pagecount`,`feedback`,`friend`,`stow`) | |||||
VALUES ('1','0','0','0','0','0','0','0','0'); "; | |||||
$dbtype == 'sqlite'? $db->exec($adminquery): mysql_query($adminquery,$conn); | |||||
$adminquery = "Insert Into `{$dbprefix}member_space`(`mid` ,`pagesize` ,`matt` ,`spacename` ,`spacelogo` ,`spacestyle`, `sign` ,`spacenews`) | |||||
Values('1','10','0','{$adminuser}的空间','','person','',''); "; | |||||
$dbtype == 'sqlite'? $db->exec($adminquery) : mysql_query($adminquery,$conn); | |||||
//不安装任何可选模块 | |||||
if(!isset($modules) || !is_array($modules)) | |||||
{ | |||||
//锁定安装程序 | |||||
$fp = fopen($insLockfile,'w'); | |||||
fwrite($fp,'ok'); | |||||
fclose($fp); | |||||
include('./templates/step-5.html'); | |||||
exit(); | |||||
} | |||||
else | |||||
{ | |||||
$module = join(',',$modules); | |||||
$fp = fopen($moduleCacheFile,'w'); | |||||
fwrite($fp,'<'.'?php'."\r\n"); | |||||
fwrite($fp,'$selModule = "'.$module.'"; '."\r\n"); | |||||
fwrite($fp,'?'.'>'); | |||||
//如果不能写入缓存文件,退出模块安装 | |||||
if(!$fp) | |||||
{ | |||||
//锁定安装程序 | |||||
$fp = fopen($insLockfile,'w'); | |||||
fwrite($fp,'ok'); | |||||
fclose($fp); | |||||
$errmsg = "<font color='red'>由于无法写入模块缓存,安装可选模块失败,请登录后在模块管理处安装。</font>"; | |||||
include('./templates/step-5.html'); | |||||
exit(); | |||||
} | |||||
fclose($fp); | |||||
include('./templates/step-4.html'); | |||||
exit(); | |||||
} | |||||
exit(); | |||||
} | |||||
/*------------------------ | |||||
安装可选模块 | |||||
function _5_SetupModule() | |||||
------------------------*/ | |||||
else if($step==5) | |||||
{ | |||||
header("location:module-install.php"); | |||||
exit(); | |||||
} | |||||
/*------------------------ | |||||
检测数据库是否有效 | |||||
function _10_TestDbPwd() | |||||
------------------------*/ | |||||
else if($step==10) | |||||
{ | |||||
header("Pragma:no-cache\r\n"); | |||||
header("Cache-Control:no-cache\r\n"); | |||||
header("Expires:0\r\n"); | |||||
$conn = @mysql_connect($dbhost,$dbuser,$dbpwd); | |||||
if($conn) | |||||
{ | |||||
if(empty($dbname)){ | |||||
echo "<font color='green'>信息正确</font>"; | |||||
}else{ | |||||
$info = mysql_select_db($dbname,$conn)?"<font color='red'>数据库已经存在,系统将覆盖数据库</font>":"<font color='green'>数据库不存在,系统将自动创建</font>"; | |||||
echo $info; | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
echo "<font color='red'>数据库连接失败!</font>"; | |||||
} | |||||
@mysql_close($conn); | |||||
exit(); | |||||
} |
@@ -1,120 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* @version $Id: module-install.php 1 13:41 2010年7月26日Z tianya $ | |||||
* @package DedeBIZ.Install | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(dirname(__FILE__).'/../include/common.inc.php'); | |||||
@set_time_limit(0); | |||||
$verMsg = 'V6'; | |||||
$errmsg = ''; | |||||
$insLockfile = dirname(__FILE__).'/install_lock.txt'; | |||||
$moduleCacheFile = dirname(__FILE__).'/modules.tmp.inc'; | |||||
$moduleDir = DEDEROOT.'/data/module'; | |||||
$AdminBaseDir = DEDEROOT.'/dede/'; | |||||
if(file_exists($insLockfile)) | |||||
{ | |||||
exit(" 程序已运行安装,如果你确定要重新安装,请先从FTP中删除 install/install_lock.txt!"); | |||||
} | |||||
require_once(DEDEINC.'/dedemodule.class.php'); | |||||
require_once(dirname(__FILE__).'/modulescache.php'); | |||||
require_once(dirname(__FILE__).'/install.inc.php'); | |||||
if(empty($step)) $step = 0; | |||||
//完成安装 | |||||
if($step==9999) | |||||
{ | |||||
ReWriteConfigAuto(); | |||||
UpDateCatCache(); | |||||
include('./templates/step-5.html'); | |||||
exit(); | |||||
} | |||||
//用户选择的模块列表缓存文件 | |||||
if(!file_exists($moduleCacheFile)) | |||||
{ | |||||
$msg = "<font color='red'>由于无法找到模块缓存文件,安装可选模块失败,请登录后在模块管理处安装。</font><br /><br />"; | |||||
$msg .= "<a href='module-install.php?step=9999' target='_top'>点击此完成安装 >></a>"; | |||||
ShowMsg($msg,'javascript:;'); | |||||
exit(); | |||||
} | |||||
//模块文件夹权限 | |||||
if(!TestWrite($moduleDir)) | |||||
{ | |||||
$msg = "<font color='red'>目录 {$moduleDir} 不支持写入,不能安装模块,请登录后在模块管理处安装。</font><br /><br />"; | |||||
$msg .= "<a href='module-install.php?step=9999' target='_top'>点击此完成安装 >></a>"; | |||||
ShowMsg($msg,"javascript:;"); | |||||
exit(); | |||||
} | |||||
include($moduleCacheFile); | |||||
$modules = split(',',$selModule); | |||||
$totalMod = count($modules); | |||||
if($step >= $totalMod) | |||||
{ | |||||
$msg = "<font color='red'>完成所有模块的安装!</font><br /><br />"; | |||||
$msg .= "<a href='module-install.php?step=9999' target='_top'>点击此进行下一步操作 >></a>"; | |||||
ShowMsg($msg,'javascript:;'); | |||||
exit(); | |||||
} | |||||
$moduleHash = $modules[$step]; | |||||
$moduleFile = $allmodules[$moduleHash]; | |||||
$dm = new DedeModule($moduleDir); | |||||
$minfos = $dm->GetModuleInfo($moduleHash); | |||||
extract($minfos, EXTR_SKIP); | |||||
$menustring = addslashes($dm->GetSystemFile($moduleHash,'menustring')); | |||||
$query = "INSERT INTO `#@__sys_module`(`hashcode` , `modname` , `indexname` , `indexurl` , `ismember` , `menustring` ) | |||||
VALUES ('$moduleHash' , '$name' , '$indexname' , '$indexurl' , '$ismember' , '$menustring' ) "; | |||||
$rs = $dsql->ExecuteNoneQuery("Delete From `#@__sys_module` where hashcode like '$moduleHash' "); | |||||
$rs = $dsql->ExecuteNoneQuery($query); | |||||
if(!$rs) | |||||
{ | |||||
$msg = "<font color='red'>保存数据库信息失败,无法完成你选择的模块安装!</font><br /><br />"; | |||||
$msg .= "<a href='module-install.php?step=9999' target='_top'>点击此进行下一步操作 >></a>"; | |||||
exit(); | |||||
} | |||||
//写文件 | |||||
$dm->WriteFiles($moduleHash,1); | |||||
$dm->WriteSystemFile($moduleHash,'readme'); | |||||
$setupsql = $dm->GetSystemFile($moduleHash,'setupsql40'); | |||||
//运行SQL | |||||
$mysql_version = $dsql->GetVersion(TRUE); | |||||
$setupsql = preg_replace("#ENGINE=MyISAM#i", 'TYPE=MyISAM', $setupsql); | |||||
$sql41tmp = 'ENGINE=MyISAM DEFAULT CHARSET='.$cfg_db_language; | |||||
if($mysql_version >= 4.1) { | |||||
$setupsql = preg_replace("#TYPE=MyISAM#i", $sql41tmp, $setupsql); | |||||
} | |||||
//_ROOTURL_ | |||||
if($cfg_cmspath=='/') $cfg_cmspath = ''; | |||||
$rooturl = $cfg_basehost.$cfg_cmspath; | |||||
$setupsql = preg_replace("#_ROOTURL_#i", $rooturl, $setupsql); | |||||
$setupsql = preg_replace("#[\r\n]{1,}#", "\n", $setupsql); | |||||
$sqls = preg_split("#;[ \t]{0,}\n#", $setupsql); | |||||
foreach($sqls as $sql) { | |||||
if(trim($sql)!='') $dsql->executenonequery($sql); | |||||
} | |||||
$dm->Clear(); | |||||
$step = $step + 1; | |||||
ShowMsg("模块 {$name} 安装完成,准备下一模块安装...", "module-install.php?step={$step}"); | |||||
exit(); |
@@ -21,7 +21,7 @@ if (empty($cardid)) { | |||||
exit(); | exit(); | ||||
} | } | ||||
$row = $dsql->GetOne("SELECT * FROM #@__moneycard_record WHERE cardid='$cardid' "); | |||||
$row = $dsql->GetOne("SELECT * FROM `#@__moneycard_record` WHERE cardid='$cardid' "); | |||||
if (!is_array($row)) { | if (!is_array($row)) { | ||||
ShowMsg("卡号错误:不存在此卡号!", "-1"); | ShowMsg("卡号错误:不存在此卡号!", "-1"); | ||||
@@ -153,27 +153,31 @@ if ($cfg_ml->IsLogin()) { | |||||
} | } | ||||
/** 有没新短信 **/ | /** 有没新短信 **/ | ||||
$pms = $dsql->GetOne("SELECT COUNT(*) AS nums FROM #@__member_pms WHERE toid='{$cfg_ml->M_ID}' AND `hasview`=0 AND folder = 'inbox'"); | |||||
$pms = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__member_pms` WHERE toid='{$cfg_ml->M_ID}' AND `hasview`=0 AND folder = 'inbox'"); | |||||
/** | /** | ||||
* 检查用户是否有权限进行某个操作 | * 检查用户是否有权限进行某个操作 | ||||
* | * | ||||
* @param int $rank 权限值 | * @param int $rank 权限值 | ||||
* @param int $money 金币 | * @param int $money 金币 | ||||
* @param bool $needinfo 是否需要填写详细信息 | |||||
* @return void | * @return void | ||||
*/ | */ | ||||
function CheckRank($rank = 0, $money = 0, $needinfo = TRUE) | |||||
function CheckRank($rank = 0, $money = 0) | |||||
{ | { | ||||
global $cfg_ml, $cfg_memberurl, $cfg_mb_spacesta; | |||||
global $cfg_ml, $cfg_memberurl, $cfg_mb_spacesta,$dsql; | |||||
if (!$cfg_ml->IsLogin()) { | if (!$cfg_ml->IsLogin()) { | ||||
header("Location:{$cfg_memberurl}/login.php?gourl=" . urlencode(GetCurUrl())); | header("Location:{$cfg_memberurl}/login.php?gourl=" . urlencode(GetCurUrl())); | ||||
exit(); | exit(); | ||||
} else { | } else { | ||||
if ($cfg_mb_spacesta == '-10') { | if ($cfg_mb_spacesta == '-10') { | ||||
// var_dump($cfg_ml->fields); | |||||
//如果启用注册邮件验证 | //如果启用注册邮件验证 | ||||
if ($cfg_ml->fields['spacesta'] == '-10') { | if ($cfg_ml->fields['spacesta'] == '-10') { | ||||
$msg = "您尚未进行邮件验证,请到邮箱查阅...</br>重新发送邮件验证 <a href='/member/index_do.php?fmdo=sendMail'><font color='red'>点击此处</font></a>"; | |||||
if (empty($cfg_ml->fields['email'])) { | |||||
ShowMsg("邮箱地址为空,请设置一个可用的邮箱地址", "edit_email.php", 0, 5000); | |||||
exit; | |||||
} | |||||
$msg = "您尚未进行邮件验证,请到邮箱查阅...</br>重新发送邮件验证 <a href='{$cfg_memberurl}/index_do.php?fmdo=sendMail'><font color='red'>点击此处</font></a>"; | |||||
ShowMsg($msg, "-1", 0, 5000); | ShowMsg($msg, "-1", 0, 5000); | ||||
exit; | exit; | ||||
} | } | ||||
@@ -181,11 +185,11 @@ function CheckRank($rank = 0, $money = 0, $needinfo = TRUE) | |||||
if ($cfg_ml->M_Rank < $rank) { | if ($cfg_ml->M_Rank < $rank) { | ||||
$needname = ""; | $needname = ""; | ||||
if ($cfg_ml->M_Rank == 0) { | if ($cfg_ml->M_Rank == 0) { | ||||
$row = $dsql->GetOne("SELECT membername FROM #@__arcrank WHERE rank='$rank'"); | |||||
$row = $dsql->GetOne("SELECT membername FROM `#@__arcrank` WHERE rank='$rank'"); | |||||
$myname = "普通会员"; | $myname = "普通会员"; | ||||
$needname = $row['membername']; | $needname = $row['membername']; | ||||
} else { | } else { | ||||
$dsql->SetQuery("SELECT membername From #@__arcrank WHERE rank='$rank' OR rank='" . $cfg_ml->M_Rank . "' ORDER BY rank DESC"); | |||||
$dsql->SetQuery("SELECT membername From `#@__arcrank` WHERE rank='$rank' OR rank='" . $cfg_ml->M_Rank . "' ORDER BY rank DESC"); | |||||
$dsql->Execute(); | $dsql->Execute(); | ||||
$row = $dsql->GetObject(); | $row = $dsql->GetObject(); | ||||
$needname = $row->membername; | $needname = $row->membername; | ||||
@@ -1,10 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* @version $Id: control.php 1 8:38 2010年7月9日Z tianya $ | |||||
* @package DedeBIZ.Member | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
header("location:index.php"); |
@@ -0,0 +1,38 @@ | |||||
<?php | |||||
/** | |||||
* @version $Id: edit_email.php 2020/12/18 tianya $ | |||||
* @package DedeBIZ.Member | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
$dopost = isset($dopost) ? $dopost : ""; | |||||
if (!isset($backurl)) { | |||||
$backurl = 'edit_email.php'; | |||||
} | |||||
if ($dopost == 'save') { | |||||
if (!empty($cfg_ml->fields['email']) || $cfg_ml->fields['checkmail'] != -1) { | |||||
ShowMsg('Email已经设置,无需重复提交!', '-1'); | |||||
exit(); | |||||
} | |||||
// 校验CSRF | |||||
CheckCSRF(); | |||||
if (!CheckEmail($email)) { | |||||
ShowMsg('Email格式不正确!', '-1'); | |||||
exit(); | |||||
} | |||||
$email = HtmlReplace($email, -1); | |||||
$query = "UPDATE `#@__member` SET `email` = '$email' WHERE mid='{$cfg_ml->M_ID}' "; | |||||
$dsql->ExecuteNoneQuery($query); | |||||
// 清除缓存 | |||||
$cfg_ml->DelCache($cfg_ml->M_ID); | |||||
ShowMsg('成功更新邮箱信息!', $backurl); | |||||
exit(); | |||||
} | |||||
$email = $cfg_ml->fields['email']; | |||||
include(DEDEMEMBER . "/templets/edit_email.htm"); | |||||
exit(); |
@@ -1,13 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* 用户留言 | |||||
* | |||||
* @version $Id: feedback.php 1 8:38 2010年7月9日Z tianya $ | |||||
* @package DedeBIZ.Member | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
$cfg_formmember = true; | |||||
require_once(dirname(__FILE__) . '/../plus/feedback.php'); |
@@ -1,105 +0,0 @@ | |||||
<?php | |||||
/** | |||||
* @version $Id: flink_main.php 1 8:38 2010年7月9日Z tianya $ | |||||
* @package DedeBIZ.Member | |||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | |||||
* @link https://www.dedebiz.com | |||||
*/ | |||||
require_once(dirname(__FILE__) . "/config.php"); | |||||
CheckRank(0, 0); | |||||
$menutype = 'config'; | |||||
if ($cfg_mb_lit == 'Y') { | |||||
ShowMsg("由于系统开启了精简版会员空间,你访问的功能不可用!", "-1"); | |||||
exit(); | |||||
} | |||||
if (empty($dopost)) $dopost = ''; | |||||
if ($dopost == "addnew") { | |||||
AjaxHead(); | |||||
$row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__member_flink` WHERE mid='" . $cfg_ml->M_ID . "' "); | |||||
if ($row['dd'] >= 50) { | |||||
echo "<font color='red'>增加网址失败,因为已经达到五十个网址的上限!</font>"; | |||||
GetLinkList($dsql); | |||||
exit(); | |||||
} | |||||
if (!preg_match("#^http:\/\/#", $url)) $url = "http://" . HtmlReplace($url, 2); | |||||
$title = HtmlReplace($title); | |||||
$url = HtmlReplace($url); | |||||
$inquery = "INSERT INTO `#@__member_flink`(mid,title,url) VALUES(" . $cfg_ml->M_ID . ",'$title','$url'); "; | |||||
$dsql->ExecuteNoneQuery($inquery); | |||||
echo "<font color='red'>成功增加一链接!</font>"; | |||||
GetLinkList($dsql); | |||||
exit(); | |||||
} else if ($dopost == "del") { | |||||
AjaxHead(); | |||||
$aid = intval($aid); | |||||
if (empty($aid)) exit("<font color='red'>参数错误!</font>"); | |||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE aid='$aid' AND mid='" . $cfg_ml->M_ID . "';"); | |||||
echo "<font color='red'>成功删除链接:{$aid}</font>"; | |||||
GetLinkList($dsql); | |||||
} else if ($dopost == "update") { | |||||
AjaxHead(); | |||||
$aid = intval($aid); | |||||
if (!preg_match("#^http:\/\/#", $url)) $url = "http://" . HtmlReplace($url, 2); | |||||
$title = HtmlReplace($title); | |||||
$url = HtmlReplace($url); | |||||
$upquery = "UPDATE `#@__member_flink` SET title='$title',url='$url' WHERE aid='$aid' AND mid='" . $cfg_ml->M_ID . "'; "; | |||||
$rs = $dsql->ExecuteNoneQuery($upquery); | |||||
if ($rs) { | |||||
echo "<font color='red'>成功更新链接:{$title}</font>"; | |||||
GetLinkList($dsql); | |||||
exit(); | |||||
} else { | |||||
echo "<font color='red'>更新链接:{$title} 失败!</font>"; | |||||
GetLinkList($dsql); | |||||
exit(); | |||||
} | |||||
} else if ($dopost == "reload") { | |||||
AjaxHead(); | |||||
GetLinkList($dsql); | |||||
exit(); | |||||
} | |||||
//默认界面 | |||||
else { | |||||
require_once(dirname(__FILE__) . "/templets/flink_main.htm"); | |||||
exit(); | |||||
} | |||||
/** | |||||
* 获取链接列表 | |||||
* | |||||
* @access public | |||||
* @param object $dsql 数据库操作类 | |||||
* @return string | |||||
*/ | |||||
function GetLinkList(&$dsql) | |||||
{ | |||||
global $cfg_ml; | |||||
$dsql->SetQuery("SELECT * FROM `#@__member_flink` WHERE mid='" . $cfg_ml->M_ID . "' ORDER BY aid DESC"); | |||||
$dsql->Execute(); | |||||
$j = 0; | |||||
while ($row = $dsql->GetArray()) { | |||||
$j++; | |||||
$line = " | |||||
<div class='item flink'> | |||||
<div class='itemHead' > | |||||
<div class='fRight'> | |||||
<span class='itemDigg'><a href='#' onclick='UpdateType({$row['aid']})'>[更新]</a></span> | |||||
<span class='itemManage'><a href='#' onclick='DelType({$row['aid']})'>[删除]</a></span> | |||||
</div> | |||||
<span class='itemTitle'>名称:<input name='title{$row['aid']}' type='text' id='title{$row['aid']}' value='{$row['title']}' class='intxt' /></span> | |||||
<div class='mt5'>网址:<input name='url{$row['aid']}' type='text' id='url{$row['aid']}' value='{$row['url']}' class='intxt' /></div> | |||||
</div> | |||||
</div> | |||||
<hr class='dotted' />"; | |||||
echo $line; | |||||
} | |||||
if ($j == 0) { | |||||
echo "尚无任何链接"; | |||||
} | |||||
} |
@@ -44,14 +44,23 @@ function random($length, $numeric = 0) | |||||
function sendmail($email, $mailtitle, $mailbody, $headers) | function sendmail($email, $mailtitle, $mailbody, $headers) | ||||
{ | { | ||||
global $cfg_sendmail_bysmtp, $cfg_smtp_server, $cfg_smtp_port, $cfg_smtp_usermail, $cfg_smtp_user, $cfg_smtp_password, $cfg_adminemail; | global $cfg_sendmail_bysmtp, $cfg_smtp_server, $cfg_smtp_port, $cfg_smtp_usermail, $cfg_smtp_user, $cfg_smtp_password, $cfg_adminemail; | ||||
if ($cfg_sendmail_bysmtp == 'Y') { | |||||
$mailtype = 'TXT'; | |||||
require_once(DEDEINC . '/mail.class.php'); | |||||
$smtp = new smtp($cfg_smtp_server, $cfg_smtp_port, true, $cfg_smtp_usermail, $cfg_smtp_password); | |||||
$smtp->debug = false; | |||||
$smtp->sendmail($email, $cfg_webname, $cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); | |||||
global $cfg_bizcore_appid,$cfg_bizcore_key,$cfg_bizcore_hostname,$cfg_bizcore_port; | |||||
if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | |||||
$client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); | |||||
$client->appid = $cfg_bizcore_appid; | |||||
$client->key = $cfg_bizcore_key; | |||||
$client->MailSend($email,$mailtitle,$mailtitle,$mailbody); | |||||
$client->Close(); | |||||
} else { | } else { | ||||
@mail($email, $mailtitle, $mailbody, $headers); | |||||
if ($cfg_sendmail_bysmtp == 'Y') { | |||||
$mailtype = 'TXT'; | |||||
require_once(DEDEINC . '/mail.class.php'); | |||||
$smtp = new smtp($cfg_smtp_server, $cfg_smtp_port, true, $cfg_smtp_usermail, $cfg_smtp_password); | |||||
$smtp->debug = false; | |||||
$smtp->sendmail($email, $cfg_webname, $cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); | |||||
} else { | |||||
@mail($email, $mailtitle, $mailbody, $headers); | |||||
} | |||||
} | } | ||||
} | } | ||||
@@ -113,7 +122,7 @@ function newmail($mid, $userid, $mailto, $type, $send) | |||||
function member($mail, $userid) | function member($mail, $userid) | ||||
{ | { | ||||
global $db; | global $db; | ||||
$sql = "SELECT mid,email,safequestion FROM #@__member WHERE email='$mail' AND userid = '$userid'"; | |||||
$sql = "SELECT mid,email,safequestion FROM `#@__member` WHERE email='$mail' AND userid = '$userid'"; | |||||
$row = $db->GetOne($sql); | $row = $db->GetOne($sql); | ||||
if (!is_array($row)) return ShowMsg("对不起,用户ID输入错误!", "-1"); | if (!is_array($row)) return ShowMsg("对不起,用户ID输入错误!", "-1"); | ||||
else return $row; | else return $row; | ||||
@@ -36,15 +36,25 @@ if ($fmdo == 'sendMail') { | |||||
$mailbody .= "Power by https://www.dedebiz.com DedeCMSV6内容管理系统\r\n"; | $mailbody .= "Power by https://www.dedebiz.com DedeCMSV6内容管理系统\r\n"; | ||||
$headers = "From: " . $cfg_adminemail . "\r\nReply-To: " . $cfg_adminemail; | $headers = "From: " . $cfg_adminemail . "\r\nReply-To: " . $cfg_adminemail; | ||||
if ($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) { | |||||
$mailtype = 'TXT'; | |||||
require_once(DEDEINC . '/mail.class.php'); | |||||
$smtp = new smtp($cfg_smtp_server, $cfg_smtp_port, true, $cfg_smtp_usermail, $cfg_smtp_password); | |||||
$smtp->debug = false; | |||||
$smtp->sendmail($cfg_ml->fields['email'], $cfg_webname, $cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); | |||||
if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | |||||
$client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); | |||||
$client->appid = $cfg_bizcore_appid; | |||||
$client->key = $cfg_bizcore_key; | |||||
$client->MailSend($cfg_ml->fields['email'],$mailtitle,$mailtitle,$mailbody); | |||||
$client->Close(); | |||||
} else { | } else { | ||||
@mail($cfg_ml->fields['email'], $mailtitle, $mailbody, $headers); | |||||
if ($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) { | |||||
$mailtype = 'TXT'; | |||||
require_once(DEDEINC . '/mail.class.php'); | |||||
$smtp = new smtp($cfg_smtp_server, $cfg_smtp_port, true, $cfg_smtp_usermail, $cfg_smtp_password); | |||||
$smtp->debug = false; | |||||
$smtp->sendmail($cfg_ml->fields['email'], $cfg_webname, $cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); | |||||
} else { | |||||
@mail($cfg_ml->fields['email'], $mailtitle, $mailbody, $headers); | |||||
} | |||||
} | } | ||||
ShowMsg('成功发送邮件,请稍后登录你的邮箱进行接收!', '/member'); | ShowMsg('成功发送邮件,请稍后登录你的邮箱进行接收!', '/member'); | ||||
exit(); | exit(); | ||||
} else if ($fmdo == 'checkMail') { | } else if ($fmdo == 'checkMail') { | ||||
@@ -1,123 +0,0 @@ | |||||
<?php | |||||
require_once(dirname(__FILE__)."/config.php"); | |||||
CheckRank(0,0); | |||||
$menutype = 'mydede'; | |||||
setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/"); | |||||
$dopost = isset($dopost) ? trim($dopost) : ''; | |||||
$folder = isset($folder) ? trim($folder) : ''; | |||||
$mid = $cfg_ml->M_ID; | |||||
if($dopost == '') | |||||
{ | |||||
if($cfg_mb_spacesta!="-10"){ | |||||
if($cfg_checkemail=='Y'){ | |||||
$row=$dsql->GetOne("SELECT email,checkmail FROM `#@__member` WHERE mid=$mid"); | |||||
if($row['checkmail']=="-1"){ | |||||
$msg="邮件订阅需要您先进行邮箱验证!</br><a href='mail.php?dopost=sendmail'>点击进行验证</a>"; | |||||
ShowMsg($msg,'-1'); | |||||
exit(); | |||||
} | |||||
} | |||||
} | |||||
$db->SetQuery("SELECT typeid FROM `#@__mail_order` WHERE mid=$mid"); | |||||
$db->Execute(); | |||||
$typeid=""; | |||||
while($row = $db->GetArray()) | |||||
{ | |||||
$typeid.=$row['typeid'].","; | |||||
} | |||||
if($folder=="drop"){ | |||||
$dsql->SetQuery("SELECT t.*,o.mid FROM `#@__mail_type` AS t LEFT JOIN `#@__mail_order` AS o ON t.id=o.typeid WHERE mid=$mid ORDER BY t.id asc"); | |||||
$dsql->Execute(); | |||||
while($arr = $dsql->GetArray()) | |||||
{ | |||||
$rows[]=$arr; | |||||
} | |||||
$rows=empty($rows)? "" : $rows; | |||||
$tpl = new DedeTemplate(); | |||||
$tpl->LoadTemplate(DEDEMEMBER.'/templets/mail_drop.htm'); | |||||
$tpl->Display(); | |||||
}else{ | |||||
$typeid=explode(",",$typeid); | |||||
$dsql->SetQuery("SELECT * FROM `#@__mail_type` ORDER BY id asc"); | |||||
$dsql->Execute(); | |||||
$inputbox=""; | |||||
while($row = $dsql->GetObject()) | |||||
{ | |||||
if(in_array($row->id,$typeid)){ | |||||
$inputbox.="<li><input type='checkbox' name='mailtype[]' id='{$row->id}' value='{$row->id}' class='np' checked/> <label>{$row->typename}</label></li>\r\n"; | |||||
}else{ | |||||
$inputbox.="<li><input type='checkbox' name='mailtype[]' id='{$row->id}' value='{$row->id}' class='np' /> <label>{$row->typename}</label></li>\r\n"; | |||||
} | |||||
} | |||||
$tpl = new DedeTemplate(); | |||||
$tpl->LoadTemplate(DEDEMEMBER.'/templets/mail.htm'); | |||||
$tpl->Display(); | |||||
} | |||||
}elseif($dopost == 'save' || $dopost == 'drop'){ | |||||
$mailtype=empty($mailtype)? "" : $mailtype; | |||||
$dsql->ExecuteNoneQuery("DELETE FROM #@__mail_order WHERE mid=$mid"); | |||||
if($dopost == 'save' && $mailtype==""){ | |||||
ShowMsg("请选择订阅类型!",'mail.php'); | |||||
exit(); | |||||
} | |||||
if($dopost=="save") $msg="订阅成功!"; | |||||
elseif($dopost=="drop") $msg="退订成功!"; | |||||
if(is_array($mailtype)){ | |||||
foreach($mailtype as $type){ | |||||
$dsql->ExecuteNoneQuery("INSERT INTO #@__mail_order(`typeid` , `mid`)VALUES ('$type', '$mid')"); | |||||
} | |||||
} | |||||
ShowMsg($msg,'mail.php'); | |||||
exit(); | |||||
}elseif($dopost=='sendmail'){ | |||||
$userhash = md5($cfg_cookie_encode.'--'.$cfg_ml->fields['mid'].'--'.$cfg_ml->fields['email']); | |||||
$url = $cfg_basehost.(empty($cfg_cmspath) ? '/' : $cfg_cmspath)."/member/mail.php?dopost=checkmail&mid={$cfg_ml->fields['mid']}&userhash={$userhash}&do=1"; | |||||
$url = eregi_replace('http://', '', $url); | |||||
$url = 'http://'.eregi_replace('//', '/', $url); | |||||
$mailtitle = "{$cfg_webname}--会员邮件验证通知"; | |||||
$mailbody = ''; | |||||
$mailbody .= "尊敬的用户[{$cfg_ml->fields['uname']}],您好:\r\n"; | |||||
$mailbody .= "欢迎使用邮件订阅功能。\r\n"; | |||||
$mailbody .= "要通过验证,请点击或复制下面链接到地址栏访问这地址:\r\n\r\n"; | |||||
$mailbody .= "{$url}\r\n\r\n"; | |||||
if($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) | |||||
{ | |||||
$mailtype = 'TXT'; | |||||
require_once(DEDEINC.'/mail.class.php'); | |||||
$smtp = new smtp($cfg_smtp_server,$cfg_smtp_port,true,$cfg_smtp_usermail,$cfg_smtp_password); | |||||
$smtp->debug = false; | |||||
if(!$smtp->smtp_sockopen($cfg_smtp_server)){ | |||||
ShowMsg('邮件发送失败,请联系管理员','index.php'); | |||||
exit(); | |||||
} | |||||
$smtp->sendmail($cfg_ml->fields['email'], $cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); | |||||
}else{ | |||||
@mail($cfg_ml->fields['email'], $mailtitle, $mailbody); | |||||
} | |||||
if(empty($cfg_smtp_server)){ | |||||
ShowMsg('邮件发送失败,请联系管理员','index.php'); | |||||
exit(); | |||||
}else{ | |||||
ShowMsg('成功发送邮件,请登录你的邮箱进行接收!', 'index.php'); | |||||
exit(); | |||||
} | |||||
}else if($dopost=='checkmail'){ | |||||
$mid = intval($mid); | |||||
if(empty($mid)) | |||||
{ | |||||
ShowMsg('你的效验串不合法!', '-1'); | |||||
exit(); | |||||
} | |||||
$row = $dsql->GetOne("Select * From `#@__member` where mid='{$mid}' "); | |||||
$needUserhash = md5($cfg_cookie_encode.'--'.$mid.'--'.$row['email']); | |||||
if($needUserhash != $userhash) | |||||
{ | |||||
ShowMsg('你的效验串不合法!', '-1'); | |||||
exit(); | |||||
} | |||||
$dsql->ExecuteNoneQuery("Update `#@__member` set checkmail=0 where mid='{$mid}' "); | |||||
ShowMsg('操作成功,欢迎使用邮件订阅!', 'mail.php'); | |||||
exit(); | |||||
} | |||||
?> |
@@ -18,7 +18,7 @@ setcookie('ENV_GOBACK_URL', GetCurUrl(), time() + 3600, '/'); | |||||
if (!isset($dopost)) $dopost = ''; | if (!isset($dopost)) $dopost = ''; | ||||
if ($dopost == '') { | if ($dopost == '') { | ||||
$query = "Select * From `#@__member_operation` where mid='" . $cfg_ml->M_ID . "' And product='archive' order by aid desc"; | |||||
$query = "SELECT * FROM `#@__member_operation` WHERE mid='" . $cfg_ml->M_ID . "' And product='archive' order by aid desc"; | |||||
$dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
$dlist->pageSize = 20; | $dlist->pageSize = 20; | ||||
$dlist->SetTemplate(DEDEMEMBER . '/templets/mypay.htm'); | $dlist->SetTemplate(DEDEMEMBER . '/templets/mypay.htm'); | ||||
@@ -26,7 +26,7 @@ if ($dopost == '') { | |||||
$dlist->Display(); | $dlist->Display(); | ||||
} elseif ($dopost == 'del') { | } elseif ($dopost == 'del') { | ||||
$ids = preg_replace("#[^0-9,]#", "", $ids); | $ids = preg_replace("#[^0-9,]#", "", $ids); | ||||
$query = "Delete From `#@__member_operation` where aid in($ids) And mid='{$cfg_ml->M_ID}' And product='archive'"; | |||||
$query = "DELETE FROM `#@__member_operation` WHERE aid in($ids) And mid='{$cfg_ml->M_ID}' And product='archive'"; | |||||
$dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
ShowMsg("成功删除指定的交易记录!", "mypay.php"); | ShowMsg("成功删除指定的交易记录!", "mypay.php"); | ||||
exit(); | exit(); | ||||
@@ -24,7 +24,7 @@ if (!isset($dopost)) { | |||||
} | } | ||||
//检查用户是否被禁言 | //检查用户是否被禁言 | ||||
CheckNotAllow(); | CheckNotAllow(); | ||||
$state = (empty($state)) ? 0 : intval($state); | |||||
$state = empty($state) ? 0 : intval($state); | |||||
if ($dopost == 'read') { | if ($dopost == 'read') { | ||||
$sql = "SELECT * FROM `#@__member_friends` WHERE mid='{$cfg_ml->M_ID}' AND ftype!='-1' ORDER BY addtime DESC LIMIT 20"; | $sql = "SELECT * FROM `#@__member_friends` WHERE mid='{$cfg_ml->M_ID}' AND ftype!='-1' ORDER BY addtime DESC LIMIT 20"; | ||||
@@ -60,82 +60,9 @@ if ($dopost == 'read') { | |||||
exit(); | exit(); | ||||
} | } | ||||
/*----------------------- | /*----------------------- | ||||
function __savesend(){ } | |||||
----------------------*/ else if ($dopost == 'savesend') { | |||||
$svali = GetCkVdValue(); | |||||
if (preg_match("/5/", $safe_gdopen)) { | |||||
if (strtolower($vdcode) != $svali || $svali == '') { | |||||
ResetVdValue(); | |||||
ShowMsg('验证码错误!', '-1'); | |||||
exit(); | |||||
} | |||||
} | |||||
$faqkey = isset($faqkey) && is_numeric($faqkey) ? $faqkey : 0; | |||||
if ($safe_faq_msg == 1) { | |||||
if ($safefaqs[$faqkey]['answer'] != $safeanswer || $safeanswer == '') { | |||||
ShowMsg('验证问题答案错误', '-1'); | |||||
exit(); | |||||
} | |||||
} | |||||
if ($subject == '') { | |||||
ShowMsg("请填写信息标题!", "-1"); | |||||
exit(); | |||||
} | |||||
$msg = CheckUserID($msgtoid, "用户名", false); | |||||
if ($msg != 'ok') { | |||||
ShowMsg($msg, "-1"); | |||||
exit(); | |||||
} | |||||
$row = $dsql->GetOne("SELECT * FROM `#@__member` WHERE userid LIKE '$msgtoid' "); | |||||
if (!is_array($row)) { | |||||
ShowMsg("你指定的用户不存在,不能发送信息!", "-1"); | |||||
exit(); | |||||
} | |||||
$subject = cn_substrR(HtmlReplace($subject, 1), 60); | |||||
$message = cn_substrR(HtmlReplace($message, 0), 1024); | |||||
$sendtime = $writetime = time(); | |||||
//发给收件人(收件人可管理) | |||||
$inquery1 = "INSERT INTO `#@__member_pms` (`floginid`,`fromid`,`toid`,`tologinid`,`folder`,`subject`,`sendtime`,`writetime`,`hasview`,`isadmin`,`message`) | |||||
VALUES ('{$cfg_ml->M_LoginID}','{$cfg_ml->M_ID}','{$row['mid']}','{$row['userid']}','inbox','$subject','$sendtime','$writetime','0','0','$message'); "; | |||||
//保留到自己的发件箱(自己可管理) | |||||
$inquery2 = "INSERT INTO `#@__member_pms` (`floginid`,`fromid`,`toid`,`tologinid`,`folder`,`subject`,`sendtime`,`writetime`,`hasview`,`isadmin`,`message`) | |||||
VALUES ('{$cfg_ml->M_LoginID}','{$cfg_ml->M_ID}','{$row['mid']}','{$row['userid']}','outbox','$subject','$sendtime','$writetime','0','0','$message'); "; | |||||
$dsql->ExecuteNoneQuery($inquery1); | |||||
$dsql->ExecuteNoneQuery($inquery2); | |||||
ShowMsg("成功发送一条信息!", "pm.php?dopost=outbox"); | |||||
exit(); | |||||
} | |||||
/*----------------------- | |||||
function __del(){ } | |||||
----------------------*/ else if ($dopost == 'del') { | |||||
$ids = preg_replace("#[^0-9,]#", "", $ids); | |||||
if ($folder == 'inbox') { | |||||
$boxsql = "SELECT * FROM `#@__member_pms` WHERE id IN($ids) AND folder LIKE 'inbox' AND toid='{$cfg_ml->M_ID}'"; | |||||
$dsql->SetQuery($boxsql); | |||||
$dsql->Execute(); | |||||
$query = ''; | |||||
while ($row = $dsql->GetArray()) { | |||||
if ($row && $row['isadmin'] == 1) { | |||||
$query = "Update `#@__member_pms` set writetime='0' WHERE id='{$row['id']}' AND folder='inbox' AND toid='{$cfg_ml->M_ID}' AND isadmin='1';"; | |||||
$dsql->ExecuteNoneQuery($query); | |||||
} else { | |||||
$query = "DELETE FROM `#@__member_pms` WHERE id in($ids) AND toid='{$cfg_ml->M_ID}' AND folder LIKE 'inbox'"; | |||||
} | |||||
} | |||||
} else if ($folder == 'outbox') { | |||||
$query = "Delete From `#@__member_pms` WHERE id in($ids) AND fromid='{$cfg_ml->M_ID}' AND folder LIKE 'outbox' "; | |||||
} else { | |||||
$query = "Delete From `#@__member_pms` WHERE id in($ids) AND fromid='{$cfg_ml->M_ID}' Or toid='{$cfg_ml->M_ID}' AND folder LIKE 'outbox' Or (folder LIKE 'inbox' AND hasview='0')"; | |||||
} | |||||
$dsql->ExecuteNoneQuery($query); | |||||
ShowMsg("成功删除指定的消息!", "pm.php?folder=" . $folder); | |||||
exit(); | |||||
} | |||||
/*----------------------- | |||||
function __man(){ } | function __man(){ } | ||||
----------------------*/ else { | |||||
----------------------*/ | |||||
else { | |||||
if (!isset($folder)) { | if (!isset($folder)) { | ||||
$folder = 'inbox'; | $folder = 'inbox'; | ||||
} | } | ||||
@@ -64,31 +64,7 @@ if ($step == 1) { | |||||
} | } | ||||
$uname = HtmlReplace($uname, 1); | $uname = HtmlReplace($uname, 1); | ||||
// //用户笔名重复检测 | |||||
// if($cfg_mb_wnameone=='N') | |||||
// { | |||||
// $row = $dsql->GetOne("SELECT * FROM `#@__member` WHERE uname LIKE '$uname' "); | |||||
// if(is_array($row)) | |||||
// { | |||||
// ShowMsg('用户笔名或公司名称不能重复!', '-1'); | |||||
// exit(); | |||||
// } | |||||
// } | |||||
// if(!CheckEmail($email)) | |||||
// { | |||||
// ShowMsg('Email格式不正确!', '-1'); | |||||
// exit(); | |||||
// } | |||||
// if($cfg_md_mailtest=='Y') | |||||
// { | |||||
// $row = $dsql->GetOne("SELECT mid FROM `#@__member` WHERE email LIKE '$email' "); | |||||
// if(is_array($row)) | |||||
// { | |||||
// ShowMsg('你使用的Email已经被另一帐号注册,请使其它帐号!', '-1'); | |||||
// exit(); | |||||
// } | |||||
// } | |||||
$userid = HtmlReplace($userid, 1); | |||||
//检测用户名是否存在 | //检测用户名是否存在 | ||||
$row = $dsql->GetOne("SELECT mid FROM `#@__member` WHERE userid LIKE '$userid' "); | $row = $dsql->GetOne("SELECT mid FROM `#@__member` WHERE userid LIKE '$userid' "); | ||||
@@ -96,18 +72,6 @@ if ($step == 1) { | |||||
ShowMsg("你指定的用户名 {$userid} 已存在,请使用别的用户名!", "-1"); | ShowMsg("你指定的用户名 {$userid} 已存在,请使用别的用户名!", "-1"); | ||||
exit(); | exit(); | ||||
} | } | ||||
// if($safequestion==0) | |||||
// { | |||||
// $safeanswer = ''; | |||||
// } | |||||
// else | |||||
// { | |||||
// if(strlen($safeanswer)>30) | |||||
// { | |||||
// ShowMsg('你的新安全问题的答案太长了,请控制在30字节以内!', '-1'); | |||||
// exit(); | |||||
// } | |||||
// } | |||||
//会员的默认金币 | //会员的默认金币 | ||||
$dfscores = 0; | $dfscores = 0; | ||||
@@ -153,7 +117,7 @@ if ($step == 1) { | |||||
$dsql->ExecuteNoneQuery($spacequery); | $dsql->ExecuteNoneQuery($spacequery); | ||||
//写入其它默认数据 | //写入其它默认数据 | ||||
$dsql->ExecuteNoneQuery("INSERT INTO `#@__member_flink`(mid,title,url) VALUES('$mid','织梦内容管理系统','https://www.dedebiz.com'); "); | |||||
$dsql->ExecuteNoneQuery("INSERT INTO `#@__member_flink`(mid,title,url) VALUES('$mid','DedeBIZ','https://www.dedebiz.com'); "); | |||||
//---------------------------------------------- | //---------------------------------------------- | ||||
//模拟登录 | //模拟登录 | ||||
@@ -26,7 +26,7 @@ if (!isset($dopost)) $dopost = ''; | |||||
function GetSta($sta, $oid) | function GetSta($sta, $oid) | ||||
{ | { | ||||
global $dsql; | global $dsql; | ||||
$row = $dsql->GetOne("SELECT p.name FROM #@__shops_orders AS s LEFT JOIN #@__payment AS p ON s.paytype=p.id WHERE s.oid='$oid'"); | |||||
$row = $dsql->GetOne("SELECT p.name FROM `#@__shops_orders` AS s LEFT JOIN `#@__payment` AS p ON s.paytype=p.id WHERE s.oid='$oid'"); | |||||
if ($sta == 0) { | if ($sta == 0) { | ||||
return '未付款(' . $row['name'] . ') < <a href="../plus/carbuyaction.php?dopost=memclickout&oid=' . $oid . '" target="_blank">去付款</a>'; | return '未付款(' . $row['name'] . ') < <a href="../plus/carbuyaction.php?dopost=memclickout&oid=' . $oid . '" target="_blank">去付款</a>'; | ||||
} else if ($sta == 1) { | } else if ($sta == 1) { | ||||
@@ -38,7 +38,7 @@ function GetSta($sta, $oid) | |||||
} | } | ||||
} | } | ||||
if ($dopost == '') { | if ($dopost == '') { | ||||
$sql = "SELECT * FROM #@__shops_orders WHERE userid='" . $cfg_ml->M_ID . "' ORDER BY stime DESC"; | |||||
$sql = "SELECT * FROM `#@__shops_orders` WHERE userid='" . $cfg_ml->M_ID . "' ORDER BY stime DESC"; | |||||
$dl = new DataListCP(); | $dl = new DataListCP(); | ||||
$dl->pageSize = 20; | $dl->pageSize = 20; | ||||
//这两句的顺序不能更换 | //这两句的顺序不能更换 | ||||
@@ -12,21 +12,21 @@ | |||||
require_once(dirname(__FILE__) . "/config.php"); | require_once(dirname(__FILE__) . "/config.php"); | ||||
if (isset($oid)) { | if (isset($oid)) { | ||||
$oid = preg_replace("#[^-0-9A-Z]#i", "", $oid); | $oid = preg_replace("#[^-0-9A-Z]#i", "", $oid); | ||||
$rs = $dsql->GetOne("SELECT paytype,priceCount FROM #@__shops_orders WHERE userid='" . $cfg_ml->M_ID . "' AND oid='$oid'"); | |||||
$rs = $dsql->GetOne("SELECT paytype,priceCount FROM `#@__shops_orders` WHERE userid='" . $cfg_ml->M_ID . "' AND oid='$oid'"); | |||||
if ($rs['paytype'] != 5) { | if ($rs['paytype'] != 5) { | ||||
ShowMsg("订单不支持该支付方式!", "javascript:;"); | ShowMsg("订单不支持该支付方式!", "javascript:;"); | ||||
exit(); | exit(); | ||||
} | } | ||||
$priceCount = $row['priceCount']; | $priceCount = $row['priceCount']; | ||||
$members = $dsql->GetOne("SELECT `money` FROM #@__member WHERE mid='" . $cfg_ml->M_ID . "'"); | |||||
$members = $dsql->GetOne("SELECT `money` FROM `#@__member` WHERE mid='" . $cfg_ml->M_ID . "'"); | |||||
if ($members['money'] < $priceCount) { | if ($members['money'] < $priceCount) { | ||||
ShowMsg("支付失败点数不够!", "-1"); | ShowMsg("支付失败点数不够!", "-1"); | ||||
exit(); | exit(); | ||||
} | } | ||||
if ($dsql->ExecuteNoneQuery("UPDATE `#@__shops_orders` SET `state`='1' WHERE `oid`='$oid' AND `userid`='" . $cfg_ml->M_ID . "' AND `state`<1")) { | if ($dsql->ExecuteNoneQuery("UPDATE `#@__shops_orders` SET `state`='1' WHERE `oid`='$oid' AND `userid`='" . $cfg_ml->M_ID . "' AND `state`<1")) { | ||||
$res = $dsql->ExecuteNoneQuery("UPDATE #@__member SET money=money-$priceCount WHERE mid='{$cfg_ml->M_ID}'"); | |||||
$res = $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET money=money-$priceCount WHERE mid='{$cfg_ml->M_ID}'"); | |||||
ShowMsg("下单,支付成功,等待商家发货!", "../member/shops_products.php?oid=" . $oid); | ShowMsg("下单,支付成功,等待商家发货!", "../member/shops_products.php?oid=" . $oid); | ||||
exit(); | exit(); | ||||
} else { | } else { | ||||
@@ -21,18 +21,18 @@ if ($dopost == '') { | |||||
$addsql = ''; | $addsql = ''; | ||||
if (!empty($oid)) { | if (!empty($oid)) { | ||||
if ($do == 'ok') { | if ($do == 'ok') { | ||||
$dsql->ExecuteNoneQuery("UPDATE #@__shops_orders SET `state`='4' WHERE oid='$oid'"); | |||||
$dsql->ExecuteNoneQuery("UPDATE `#@__shops_orders` SET `state`='4' WHERE oid='$oid'"); | |||||
ShowMsg("已确认订单!", 'shops_products.php?oid=' . $oid); | ShowMsg("已确认订单!", 'shops_products.php?oid=' . $oid); | ||||
exit(); | exit(); | ||||
} | } | ||||
$row = $dsql->GetOne("SELECT * FROM #@__shops_userinfo WHERE userid='" . $cfg_ml->M_ID . "' AND oid='$oid'"); | |||||
$row = $dsql->GetOne("SELECT * FROM `#@__shops_userinfo` WHERE userid='" . $cfg_ml->M_ID . "' AND oid='$oid'"); | |||||
if (!isset($row['oid'])) { | if (!isset($row['oid'])) { | ||||
ShowMsg("订单不存在!", -1); | ShowMsg("订单不存在!", -1); | ||||
exit(); | exit(); | ||||
} | } | ||||
$row['des'] = stripslashes($row['des']); | $row['des'] = stripslashes($row['des']); | ||||
$rs = $dsql->GetOne("SELECT * FROM #@__shops_orders WHERE userid='" . $cfg_ml->M_ID . "' AND oid='$oid'"); | |||||
$rs = $dsql->GetOne("SELECT * FROM `#@__shops_orders` WHERE userid='" . $cfg_ml->M_ID . "' AND oid='$oid'"); | |||||
$row['state'] = $rs['state']; | $row['state'] = $rs['state']; | ||||
$row['stime'] = $rs['stime']; | $row['stime'] = $rs['stime']; | ||||
$row['cartcount'] = $rs['cartcount']; | $row['cartcount'] = $rs['cartcount']; | ||||
@@ -40,13 +40,13 @@ if ($dopost == '') { | |||||
$row['uprice'] = $rs['price'] / $rs['cartcount']; | $row['uprice'] = $rs['price'] / $rs['cartcount']; | ||||
$row['dprice'] = $rs['dprice']; | $row['dprice'] = $rs['dprice']; | ||||
$row['priceCount'] = $rs['priceCount']; | $row['priceCount'] = $rs['priceCount']; | ||||
$rs = $dsql->GetOne("SELECT `dname` FROM #@__shops_delivery WHERE pid='$rs[pid]' LIMIT 0,1"); | |||||
$rs = $dsql->GetOne("SELECT `dname` FROM `#@__shops_delivery` WHERE pid='$rs[pid]' LIMIT 0,1"); | |||||
$row['dname'] = $rs['dname']; | $row['dname'] = $rs['dname']; | ||||
unset($rs); | unset($rs); | ||||
$addsql = " AND oid='" . $oid . "'"; | $addsql = " AND oid='" . $oid . "'"; | ||||
} | } | ||||
$sql = "SELECT * FROM #@__shops_products WHERE userid='" . $cfg_ml->M_ID . "' $addsql ORDER BY aid ASC"; | |||||
$sql = "SELECT * FROM `#@__shops_products` WHERE userid='" . $cfg_ml->M_ID . "' $addsql ORDER BY aid ASC"; | |||||
$dl = new DataListCP(); | $dl = new DataListCP(); | ||||
$dl->pageSize = 20; | $dl->pageSize = 20; | ||||
if (!empty($oid)) $dl->SetParameter('oid', $oid); | if (!empty($oid)) $dl->SetParameter('oid', $oid); | ||||
@@ -81,8 +81,8 @@ if ($dopost == '') { | |||||
function GetSta($sta, $oid) | function GetSta($sta, $oid) | ||||
{ | { | ||||
global $dsql; | global $dsql; | ||||
$row = $dsql->GetOne("SELECT paytype FROM #@__shops_orders WHERE oid='$oid'"); | |||||
$payname = $dsql->GetOne("SELECT name,fee FROM #@__payment WHERE id='{$row['paytype']}'"); | |||||
$row = $dsql->GetOne("SELECT paytype FROM `#@__shops_orders` WHERE oid='$oid'"); | |||||
$payname = $dsql->GetOne("SELECT name,fee FROM `#@__payment` WHERE id='{$row['paytype']}'"); | |||||
if ($sta == 0) { | if ($sta == 0) { | ||||
return $payname['name'] . " 手续费:" . $payname['fee'] . "元"; | return $payname['name'] . " 手续费:" . $payname['fee'] . "元"; | ||||
} elseif ($sta == 1) { | } elseif ($sta == 1) { | ||||
@@ -103,6 +103,6 @@ function GetSta($sta, $oid) | |||||
function carTime($oid) | function carTime($oid) | ||||
{ | { | ||||
global $dsql; | global $dsql; | ||||
$row = $dsql->GetOne("SELECT stime FROM #@__shops_orders WHERE oid='$oid'"); | |||||
$row = $dsql->GetOne("SELECT stime FROM `#@__shops_orders` WHERE oid='$oid'"); | |||||
return Mydate('Y-m-d h:i:s', $row['stime']); | return Mydate('Y-m-d h:i:s', $row['stime']); | ||||
} | } |
@@ -139,6 +139,7 @@ VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank' | |||||
for ($i = 2; $i <= 12; $i++) { | for ($i = 2; $i <= 12; $i++) { | ||||
if (!empty(${'softurl' . $i})) { | if (!empty(${'softurl' . $i})) { | ||||
$servermsg = str_replace("'", "", stripslashes(${'servermsg' . $i})); | $servermsg = str_replace("'", "", stripslashes(${'servermsg' . $i})); | ||||
$servermsg = str_replace(array("{dede:", "{/dede:", "}"), "#", $servermsg); | |||||
$softurl = stripslashes(${'softurl' . $i}); | $softurl = stripslashes(${'softurl' . $i}); | ||||
$softurl = str_replace(array("{dede:", "{/dede:", "}"), "#", $softurl); | $softurl = str_replace(array("{dede:", "{/dede:", "}"), "#", $softurl); | ||||
if ($servermsg == '') { | if ($servermsg == '') { | ||||
@@ -165,6 +165,7 @@ function _SaveArticle(){ } | |||||
for ($i = 1; $i <= 9; $i++) { | for ($i = 1; $i <= 9; $i++) { | ||||
if (!empty(${'softurl' . $i})) { | if (!empty(${'softurl' . $i})) { | ||||
$servermsg = str_replace("'", '', stripslashes(${'servermsg' . $i})); | $servermsg = str_replace("'", '', stripslashes(${'servermsg' . $i})); | ||||
$servermsg = str_replace(array("{dede:", "{/dede:", "}"), "#", $servermsg); | |||||
$softurl = stripslashes(${'softurl' . $i}); | $softurl = stripslashes(${'softurl' . $i}); | ||||
$softurl = str_replace(array("{dede:", "{/dede:", "}"), "#", $softurl); | $softurl = str_replace(array("{dede:", "{/dede:", "}"), "#", $softurl); | ||||
if ($servermsg == '') { | if ($servermsg == '') { | ||||
@@ -33,6 +33,9 @@ | |||||
<li class="nav-item"> | <li class="nav-item"> | ||||
<a class="nav-link" href="edit_face.php">头像设置</a> | <a class="nav-link" href="edit_face.php">头像设置</a> | ||||
</li> | </li> | ||||
<li class="nav-item"> | |||||
<a class="nav-link" href="edit_email.php">验证邮箱</a> | |||||
</li> | |||||
</ul> | </ul> | ||||
<form action="edit_baseinfo.php" method="post" enctype="multipart/form-data" name="form2" | <form action="edit_baseinfo.php" method="post" enctype="multipart/form-data" name="form2" | ||||
onsubmit="return checkSubmit();" class="mt-3"> | onsubmit="return checkSubmit();" class="mt-3"> | ||||
@@ -0,0 +1,68 @@ | |||||
<!doctype html> | |||||
<html lang="zh-CN"> | |||||
<head> | |||||
<meta charset="<?php echo $cfg_soft_lang; ?>"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |||||
<script src="<?php echo $cfg_cmsurl;?>/static/js/jquery.min.js"></script> | |||||
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/bootstrap.min.css"> | |||||
<link href="<?php echo $cfg_cmsurl;?>/static/font-awesome/css/font-awesome.min.css" rel="stylesheet"> | |||||
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/dede.css"> | |||||
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/member.css"> | |||||
<title>验证邮箱 - 会员中心 - <?php echo $cfg_webname; ?></title> | |||||
</head> | |||||
<body> | |||||
<?php include(DEDEMEMBER."/templets/top_login.htm"); ?> | |||||
<main class="member"> | |||||
<div class="container-fluid pannel"> | |||||
<div class="container"> | |||||
<div class="row"> | |||||
<?php | |||||
$_menu_edtex = true; // 展开编辑信息 | |||||
$_menu_edtitem = 'email'; // 当前标签页 | |||||
?> | |||||
<?php include(DEDEMEMBER."/templets/menu.htm"); ?> | |||||
<div class="pannel-main col-md-9 mt-3 mb-3"> | |||||
<div class="pannel-main-container"> | |||||
<ul class="nav nav-tabs"> | |||||
<li class="nav-item"> | |||||
<a class="nav-link" href="edit_baseinfo.php">账号安全</a> | |||||
</li> | |||||
<li class="nav-item"> | |||||
<a class="nav-link" href="edit_face.php">头像设置</a> | |||||
</li> | |||||
<li class="nav-item"> | |||||
<a class="nav-link active" href="edit_email.php">验证邮箱</a> | |||||
</li> | |||||
</ul> | |||||
<form action="edit_email.php" method="post" enctype="multipart/form-data" name="form1" class="mt-3"> | |||||
<input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>" /> | |||||
<input type="hidden" name="dopost" value="save" /> | |||||
<div class="form-group row"> | |||||
<label for="iptUname" class="col-sm-2 col-form-label">邮箱地址</label> | |||||
<div class="col-sm-10"> | |||||
<input name='email' type='text' id='email' size='35' class='form-control' | |||||
value='<?php echo $email; ?>' /> | |||||
</div> | |||||
</div> | |||||
<div class="form-group row"> | |||||
<div class="col-sm-10"> | |||||
<button type="submit" class="btn btn-success">设置</button> | |||||
</div> | |||||
</div> | |||||
</form> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</main> | |||||
<?php include(DEDEMEMBER."/templets/footer.htm"); ?> | |||||
</body> | |||||
</html> | |||||
@@ -34,6 +34,9 @@ | |||||
<li class="nav-item"> | <li class="nav-item"> | ||||
<a class="nav-link active" href="edit_face.php">头像设置</a> | <a class="nav-link active" href="edit_face.php">头像设置</a> | ||||
</li> | </li> | ||||
<li class="nav-item"> | |||||
<a class="nav-link" href="edit_email.php">验证邮箱</a> | |||||
</li> | |||||
</ul> | </ul> | ||||
<form action="edit_face.php" method="post" enctype="multipart/form-data" name="form1" class="mt-3"> | <form action="edit_face.php" method="post" enctype="multipart/form-data" name="form1" class="mt-3"> | ||||
<input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>" /> | <input type="hidden" name="_csrf_token" value="<?php echo $GLOBALS['csrf_token'];?>" /> | ||||
@@ -46,6 +46,7 @@ | |||||
<button type="submit" class="btn btn-success btnLogin">登 录</button> | <button type="submit" class="btn btn-success btnLogin">登 录</button> | ||||
<a href="<?php echo $cfg_memberurl;?>/index_do.php?fmdo=user&dopost=regnew" | <a href="<?php echo $cfg_memberurl;?>/index_do.php?fmdo=user&dopost=regnew" | ||||
class="btn btn-outline-success btnLogin mt-2">注 册</a> | class="btn btn-outline-success btnLogin mt-2">注 册</a> | ||||
<a href="resetpassword.php" style="color:#008E38;">忘记密码?</a> | |||||
</form> | </form> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -48,6 +48,7 @@ | |||||
<button type="submit" class="btn btn-success btnLogin">登 录</button> | <button type="submit" class="btn btn-success btnLogin">登 录</button> | ||||
<a href="<?php echo $cfg_memberurl;?>/index_do.php?fmdo=user&dopost=regnew" | <a href="<?php echo $cfg_memberurl;?>/index_do.php?fmdo=user&dopost=regnew" | ||||
class="btn btn-outline-success btnLogin mt-2">注 册</a> | class="btn btn-outline-success btnLogin mt-2">注 册</a> | ||||
<a href="resetpassword.php" style="color:#008E38;">忘记密码?</a> | |||||
</form> | </form> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -1,60 +0,0 @@ | |||||
<!doctype html> | |||||
<html lang="zh-CN"> | |||||
<head> | |||||
<meta charset="<?php echo $cfg_soft_lang; ?>"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |||||
<script src="<?php echo $cfg_cmsurl;?>/static/js/jquery.min.js"></script> | |||||
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/bootstrap.min.css"> | |||||
<link href="<?php echo $cfg_cmsurl;?>/static/font-awesome/css/font-awesome.min.css" rel="stylesheet"> | |||||
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/dede.css"> | |||||
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/member.css"> | |||||
<title>邮件订阅 - 会员中心 - <?php echo $cfg_webname; ?></title> | |||||
</head> | |||||
<body> | |||||
<?php include(DEDEMEMBER."/templets/top_login.htm"); ?> | |||||
<div id="main"> | |||||
<div id="content" class="container"> | |||||
<?php include(DEDEMEMBER."/templets/menu.php"); ?> | |||||
<div id="mcpmain"> | |||||
<nav class="navbar navbar-expand-lg"> | |||||
<ol class="breadcrumb mb-0 mr-auto"> | |||||
<li class="breadcrumb-item"><a href="<?php echo $cfg_memberurl;?>/">会员中心</a></li> | |||||
<li class="breadcrumb-item">邮件订阅</li> | |||||
</li> | |||||
</ol> | |||||
<span class="navbar-text"> | |||||
<a href="javascript:history.back(-1);" class="btn btn-sm">返回</a> | |||||
</span> | |||||
</nav> | |||||
<ul class="nav nav-tabs"> | |||||
<li class="nav-item"> | |||||
<a class="nav-link active" href="mail.php">我的订阅</a> | |||||
</li> | |||||
<li class="nav-item"> | |||||
<a class="nav-link" href="mail.php?folder=drop">我要退订</a> | |||||
</li> | |||||
</ul> | |||||
<form name="form2" action="mail.php" method="post" onsubmit="return checkSubmit();"> | |||||
<input type="hidden" name="dopost" value="save" /> | |||||
<div id="mainCp"> | |||||
<div class="postForm"> | |||||
<p class="cellBg"> | |||||
<label>订阅类型:</label> </p> | |||||
<ul class="picList"> | |||||
<?php if($inputbox=="") echo "暂无订阅内容"; else echo $inputbox ;?> | |||||
</ul> | |||||
<p> | |||||
<button class="btn btn-success" type="submit">订阅</button> | |||||
</p> | |||||
</div> | |||||
</div> | |||||
</form> | |||||
</div> | |||||
</div> | |||||
<?php include(DEDEMEMBER."/templets/foot.htm"); ?> | |||||
</div> | |||||
</body> | |||||
</html> |
@@ -1,67 +0,0 @@ | |||||
<!doctype html> | |||||
<html lang="zh-CN"> | |||||
<head> | |||||
<meta charset="<?php echo $cfg_soft_lang; ?>"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |||||
<script src="<?php echo $cfg_cmsurl;?>/static/js/jquery.min.js"></script> | |||||
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/bootstrap.min.css"> | |||||
<link href="<?php echo $cfg_cmsurl;?>/static/font-awesome/css/font-awesome.min.css" rel="stylesheet"> | |||||
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/dede.css"> | |||||
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/member.css"> | |||||
<title>邮件订阅 - 会员中心 - <?php echo $cfg_webname; ?></title> | |||||
</head> | |||||
<body> | |||||
<?php include(DEDEMEMBER."/templets/top_login.htm"); ?> | |||||
<div id="main"> | |||||
<div id="content" class="container"> | |||||
<?php include(DEDEMEMBER."/templets/menu.php"); ?> | |||||
<div id="mcpmain"> | |||||
<nav class="navbar navbar-expand-lg"> | |||||
<ol class="breadcrumb mb-0 mr-auto"> | |||||
<li class="breadcrumb-item"><a href="<?php echo $cfg_memberurl;?>/">会员中心</a></li> | |||||
<li class="breadcrumb-item">邮件订阅</li> | |||||
</li> | |||||
</ol> | |||||
<span class="navbar-text"> | |||||
<a href="javascript:history.back(-1);" class="btn btn-sm">返回</a> | |||||
</span> | |||||
</nav> | |||||
<ul class="nav nav-tabs"> | |||||
<li class="nav-item"> | |||||
<a class="nav-link" href="mail.php">我的订阅</a> | |||||
</li> | |||||
<li class="nav-item"> | |||||
<a class="nav-link active" href="mail.php?folder=drop">我要退订</a> | |||||
</li> | |||||
</ul> | |||||
<form name="form2" action="mail.php" method="post" onsubmit="return checkSubmit();"> | |||||
<input type="hidden" name="dopost" value="drop" /> | |||||
<div id="mainCp"> | |||||
<div class="postForm"> | |||||
<p class="cellBg"> | |||||
<label>订阅类型:</label> </p> | |||||
<ul class="picList"> | |||||
<?php | |||||
if(is_array($rows)){ | |||||
foreach($rows as $row){ | |||||
echo "<li><input type='checkbox' name='mailtype[]' id='".$row['id']."' value='".$row['id']."' class='np' checked/> <label>".$row['typename']."</label></li>\r\n"; | |||||
} | |||||
} | |||||
?> | |||||
</ul> | |||||
<p> | |||||
<button class="btn btn-success" type="submit">退订</button> | |||||
</p> | |||||
</div> | |||||
</div> | |||||
</form> | |||||
</div> | |||||
</div> | |||||
<?php include(DEDEMEMBER."/templets/foot.htm"); ?> | |||||
</div> | |||||
</body> | |||||
</html> |
@@ -78,6 +78,9 @@ while ($channel = $dsql->GetArray('addmod')) { | |||||
<li class="list-group-item justify-content-between align-items-center<?php if(isset($_menu_edtitem) && $_menu_edtitem === 'face') echo ' active';?>"> | <li class="list-group-item justify-content-between align-items-center<?php if(isset($_menu_edtitem) && $_menu_edtitem === 'face') echo ' active';?>"> | ||||
<a href="edit_face.php">头像设置</a> | <a href="edit_face.php">头像设置</a> | ||||
</li> | </li> | ||||
<li class="list-group-item justify-content-between align-items-center<?php if(isset($_menu_edtitem) && $_menu_edtitem === 'email') echo ' active';?>"> | |||||
<a href="edit_email.php">验证邮箱</a> | |||||
</li> | |||||
</ul> | </ul> | ||||
</div> | </div> | ||||
</li> | </li> | ||||
@@ -36,7 +36,7 @@ | |||||
<?php if(empty($key)){ ?> | <?php if(empty($key)){ ?> | ||||
<div class="form-group"> | <div class="form-group"> | ||||
<div class="input-group"> | <div class="input-group"> | ||||
<input placeholder="临时验证码:" name="pwdtmp" type="password" class="form-control"> | |||||
<input placeholder="临时登录密码:" name="pwdtmp" type="password" class="form-control"> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<?php }else{ ?> | <?php }else{ ?> | ||||
@@ -47,15 +47,22 @@ else if ($action == 'send') { | |||||
$mailbody .= "Powered by https://www.dedebiz.com DedeCMSV6内容管理系统!"; | $mailbody .= "Powered by https://www.dedebiz.com DedeCMSV6内容管理系统!"; | ||||
$headers = "From: " . $cfg_adminemail . "\r\nReply-To: " . $cfg_adminemail; | $headers = "From: " . $cfg_adminemail . "\r\nReply-To: " . $cfg_adminemail; | ||||
if ($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) { | |||||
$mailtype = 'TXT'; | |||||
require_once(DEDEINC . '/mail.class.php'); | |||||
$smtp = new smtp($cfg_smtp_server, $cfg_smtp_port, true, $cfg_smtp_usermail, $cfg_smtp_password); | |||||
$smtp->debug = false; | |||||
$smtp->sendmail($email, $cfg_webname, $cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); | |||||
if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | |||||
$client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); | |||||
$client->appid = $cfg_bizcore_appid; | |||||
$client->key = $cfg_bizcore_key; | |||||
$client->MailSend($email,$mailtitle,$mailtitle,$mailbody); | |||||
$client->Close(); | |||||
} else { | } else { | ||||
@mail($email, $mailtitle, $mailbody, $headers); | |||||
if ($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) { | |||||
$mailtype = 'TXT'; | |||||
require_once(DEDEINC . '/mail.class.php'); | |||||
$smtp = new smtp($cfg_smtp_server, $cfg_smtp_port, true, $cfg_smtp_usermail, $cfg_smtp_password); | |||||
$smtp->debug = false; | |||||
$smtp->sendmail($email, $cfg_webname, $cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); | |||||
} else { | |||||
@mail($email, $mailtitle, $mailbody, $headers); | |||||
} | |||||
} | } | ||||
ShowMsg("成功推荐一篇文章!", $arcurl); | ShowMsg("成功推荐一篇文章!", $arcurl); | ||||
@@ -1 +1 @@ | |||||
CKEDITOR.plugins.add("dedepagebreak",{icons:"dedepagebreak",init:function(a){a.addCommand("insertDedePageBreak",{exec:function(a){a.insertHtml("#p#分页标题#e#")}});a.ui.addButton("DedePageBreak",{label:"Insert PageBreak",command:"insertDedePageBreak",toolbar:"insert"})}}); | |||||
CKEDITOR.plugins.add("dedepagebreak",{icons:"dedepagebreak",init:function(a){a.addCommand("insertDedePageBreak",{exec:function(a){a.insertHtml("#p#分页标题#e#")}});a.ui.addButton("DedePageBreak",{label:"插入分页符",command:"insertDedePageBreak",toolbar:"insert"})}}); |
@@ -1,157 +0,0 @@ | |||||
* { | |||||
font-size: 12px; | |||||
} | |||||
body { | |||||
font-size: 12px; | |||||
line-height: 1.5; | |||||
margin: auto; | |||||
margin-top: 8px; | |||||
background:#F7F7F7; | |||||
} | |||||
form,h1,h2,h3,ul,ol,div { | |||||
margin: 0; | |||||
padding: 0; | |||||
} | |||||
td,th,div { | |||||
word-break:break-all; | |||||
word-wrap:break-word; | |||||
line-height: 1.5; | |||||
} | |||||
li,dd { | |||||
list-style-type:none; | |||||
margin:0px; | |||||
padding:0px; | |||||
} | |||||
input { | |||||
border: 1px solid #ababab; | |||||
zoom: expression(function(ele){ (ele.type=='button'||ele.type=='submit'||ele.type=='reset') ? ele.className='iebutton' : (ele.type=='text' ? ele.className='ietext' : ''); (ele.type=='radio'||ele.type=='checkbox') ? ele.className='np' : ''; ele.style.zoom = '1';}(this)); | |||||
} | |||||
input[type="button"], input[type="submit"], input[type="reset"] { | |||||
border:none; | |||||
border-right: 1px solid #ACACAC; | |||||
border-bottom: 1px solid #ACACAC; | |||||
background-color: #F1F8B4; | |||||
padding:2px; | |||||
padding-right:5px; | |||||
padding-left:5px; | |||||
background: url(allbtbg2.gif) #EFF7D0; | |||||
cursor:pointer; | |||||
} | |||||
input[type="text"] { | |||||
padding:3px 3px 2px 3px; | |||||
border-width:1px; | |||||
border-style:solid; | |||||
border-color:#999999 #dddddd #dddddd #999999; | |||||
} | |||||
.iebutton { | |||||
border:none; | |||||
border-right: 1px solid #ACACAC; | |||||
border-bottom: 1px solid #ACACAC; | |||||
background-color: #F1F8B4; | |||||
padding:2px; | |||||
padding-right:5px; | |||||
padding-left:5px; | |||||
background: #EFF7D0; | |||||
cursor:pointer; | |||||
} | |||||
.ietext { | |||||
height:18px; | |||||
padding:3px 3px 2px 3px; | |||||
border-width:1px; | |||||
border-style:solid; | |||||
border-color:#999999 #dddddd #dddddd #999999; | |||||
} | |||||
.np { | |||||
border: none; | |||||
} | |||||
h1 { color:#171B16; font-size:130%; font-weight:bold; } | |||||
h2 { color:#171B16; font-size:115%; font-weight:bold; } | |||||
h3 { color:#171B16; font-size:100%; font-weight:bold;} | |||||
a:link { font-size: 9pt; color: #000000; text-decoration: none; } | |||||
a:visited { font-size: 9pt; color: #000000; text-decoration: none; } | |||||
a:hover {color: red; } | |||||
a img { border-style:none; } | |||||
a b { color:#666600 } | |||||
a strong { color:#666600; } | |||||
b,strong { color:#666600; } | |||||
.bline { | |||||
border-bottom: 1px dotted #BCBCBC; | |||||
height:28px; | |||||
background-color: #FFFFFF; | |||||
} | |||||
.pagelistbox span { | |||||
padding: 2px 3px 0 3px; | |||||
border: 1px solid #A7CA88; | |||||
margin-right: 8px; | |||||
background: #EBF5BA; | |||||
color: #536B43; | |||||
} | |||||
.pagelistbox a { | |||||
padding: 2px 4px 0 4px; | |||||
border: 1px solid #A7CA88; | |||||
background:#EBF5BA; | |||||
} | |||||
.pagelistbox a:hover { | |||||
background:#FFFFFF; | |||||
} | |||||
/* 表单的CSS */ | |||||
.txtnumber { | |||||
width:100px; | |||||
height:22px; | |||||
padding:3px 3px 2px 3px; | |||||
border-width:1px; | |||||
border-style:solid; | |||||
border-color:#999999 #dddddd #dddddd #999999; | |||||
} | |||||
.txt { | |||||
width:300px; | |||||
height:22px; | |||||
padding:3px 3px 2px 3px; | |||||
border-width:1px; | |||||
border-style:solid; | |||||
border-color:#999999 #dddddd #dddddd #999999; | |||||
} | |||||
.txtdate { | |||||
width:150px; | |||||
height:22px; | |||||
padding:3px 3px 2px 3px; | |||||
border-width:1px; | |||||
border-style:solid; | |||||
border-color:#999999 #dddddd #dddddd #999999; | |||||
} | |||||
.txtarea { | |||||
width:60%; | |||||
height:120px; | |||||
padding:3px 3px 2px 3px; | |||||
border-width:1px; | |||||
border-style:solid; | |||||
border-color:#999999 #dddddd #dddddd #999999; | |||||
} | |||||
@@ -1,83 +1,78 @@ | |||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||||
<!DOCTYPE html | |||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||||
<html xmlns="http://www.w3.org/1999/xhtml"> | <html xmlns="http://www.w3.org/1999/xhtml"> | ||||
<head> | <head> | ||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>" /> | |||||
<title><?php echo $msgtitle; ?></title> | |||||
<link href="<?php echo $cfg_templets_skin; ?>/style/dedecms.css" rel="stylesheet" type="text/css" media="screen" /> | |||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>" /> | |||||
<title> | |||||
<?php echo $msgtitle; ?> | |||||
</title> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |||||
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/bootstrap.min.css"> | |||||
<link href="<?php echo $cfg_cmsurl;?>/static/font-awesome/css/font-awesome.min.css" rel="stylesheet"> | |||||
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/dede.css"> | |||||
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/index.css"> | |||||
<script src="<?php echo $cfg_cmsurl;?>/static/js/jquery.min.js"></script> | |||||
</head> | </head> | ||||
<body class="flinkpage"> | |||||
<div class="header"> | |||||
<div class="top w960 center"> | |||||
<div class="title"> | |||||
<h1> | |||||
<h1><a href="<?php echo $cfg_basehost; ?>/"><?php echo $cfg_webname; ?></a></h1> | |||||
</h1> | |||||
</div><!-- /title --> | |||||
<body class="flinkpage"> | |||||
</div><!-- /top --> | |||||
</div><!-- /header --> | |||||
<?php include("plus_header.htm") ;?> | |||||
<div class="w960 clear center mt1 cmt-box"> | |||||
<div class="sp-title"> | |||||
<h2>提示信息</h2> | |||||
<span class="more"> | |||||
<a href="stow.php?aid=<?php echo $aid; ?>">[收藏此文档]</a> | |||||
  | |||||
<a href="../member">[会员中心]</a> | |||||
  | |||||
<a href="../">[返回首页]</a> | |||||
</span> | |||||
</div> | |||||
<div class="formbox" style="width:960px;"> | |||||
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DDEAC8"> | |||||
<tr bgcolor="#EFF4EA"> | |||||
<td height="28" colspan="2"> <strong>错误具体提示信息:</strong></td> | |||||
</tr> | |||||
<tr bgcolor="#FFFFFF"> | |||||
<td height="60" colspan="2" align="center"> | |||||
<?php echo $moremsg; ?> | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#EFF4EA"> | |||||
<td width="17%" height="26" align="center"> | |||||
<strong>文档标题:</strong> | |||||
</td> | |||||
<td width="83%" height="26"> | |||||
 <?php echo $arcLinktitle; ?> | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#FFFFFF"> | |||||
<td height="26" align="center"> | |||||
<strong>发布时间:</strong> | |||||
</td> | |||||
<td height="26"> | |||||
 <?php echo $pubdate; ?> | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#FFFFFF"> | |||||
<td height="70" align="center"> | |||||
<strong>文档简介:</strong> | |||||
</td> | |||||
<td> | |||||
 <?php echo $description; ?> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<br /> | |||||
</div> | |||||
</div> | |||||
<div class="container"> | |||||
<div class="sp-title"> | |||||
<span class="more"> | |||||
<a href="stow.php?aid=<?php echo $aid; ?>">[收藏此文档]</a> | |||||
  | |||||
<a href="../member">[会员中心]</a> | |||||
  | |||||
<a href="../">[返回首页]</a> | |||||
</span> | |||||
</div> | |||||
<div class="formbox"> | |||||
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#DDEAC8" class='table'> | |||||
<tr bgcolor="#EFF4EA"> | |||||
<td height="28" colspan="2"> <strong>错误具体提示信息:</strong></td> | |||||
</tr> | |||||
<tr bgcolor="#FFFFFF"> | |||||
<td height="60" colspan="2" align="center"> | |||||
<?php echo $moremsg; ?> | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#EFF4EA"> | |||||
<td width="17%" height="26" align="center"> | |||||
<strong>文档标题:</strong> | |||||
</td> | |||||
<td width="83%" height="26"> | |||||
  | |||||
<?php echo $arcLinktitle; ?> | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#FFFFFF"> | |||||
<td height="26" align="center"> | |||||
<strong>发布时间:</strong> | |||||
</td> | |||||
<td height="26"> | |||||
  | |||||
<?php echo $pubdate; ?> | |||||
</td> | |||||
</tr> | |||||
<tr bgcolor="#FFFFFF"> | |||||
<td height="70" align="center"> | |||||
<strong>文档简介:</strong> | |||||
</td> | |||||
<td> | |||||
  | |||||
<?php echo $description; ?> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<br /> | |||||
</div> | |||||
</div> | |||||
<!-- //底部模板 --> | |||||
<div class="footer w960 center mt1 clear"> | |||||
<div class="footer_left"></div> | |||||
<div class="footer_body"> | |||||
<span class="gotop"><a href="javascript:scroll(0,0)"><img src="<?php echo $cfg_templets_skin; ?>/images/top.gif" height="11" width="61" alt="返回顶部"/></a></span> | |||||
<p class="powered"> | |||||
Powered by <a href="https://www.dedebiz.com" title="DedeCMSV6内容管理系统-国内流行的内容管理系统(CMS)多端全媒体解决方案。" target="_blank"><strong>DedeCMS{dede:global name='cfg_version'/}</strong></a> © 2020 <a href="https://www.dedebiz.com/" target="_blank">DedeBIZ</a> Inc.<br /><div class="copyright">{dede:global name='cfg_powerby'/} {dede:global name='cfg_beian'/}</div></p> | |||||
</div> | |||||
<div class="footer_right"></div> | |||||
</div> | |||||
<?php include("plus_footer.htm") ;?> | |||||
</body> | </body> | ||||
</html> | |||||
</html> |