Browse Source

小调整

tags/6.1.0^2
xushubieli 3 years ago
parent
commit
776f65b64b
34 changed files with 78 additions and 266 deletions
  1. +1
    -1
      src/admin/dialog/select_mimages.php
  2. +1
    -3
      src/admin/file_manage_view.php
  3. +1
    -4
      src/admin/inc/inc_admin_channel.php
  4. +3
    -3
      src/admin/mail_file_manage.php
  5. +2
    -2
      src/admin/mail_send.php
  6. +3
    -3
      src/admin/mail_title.php
  7. +2
    -2
      src/admin/mail_title_send.php
  8. +3
    -3
      src/admin/mail_type.php
  9. +2
    -2
      src/admin/templets/index_top2.htm
  10. +1
    -1
      src/admin/templets/makehtml_homepage.htm
  11. +1
    -1
      src/admin/templets/member_toadmin.htm
  12. +3
    -3
      src/admin/templets/public_guide.htm
  13. +1
    -1
      src/admin/templets/sys_data.htm
  14. +1
    -1
      src/admin/templets/sys_data_revert.htm
  15. +1
    -1
      src/admin/templets/vote_main.htm
  16. +1
    -3
      src/include/arc.freelist.class.php
  17. +2
    -2
      src/include/arc.searchview.class.php
  18. +2
    -6
      src/include/autoload.inc.php
  19. +2
    -6
      src/include/autoload7.inc.php
  20. +2
    -6
      src/include/cli.class.php
  21. +2
    -31
      src/include/dedemodule.class.php
  22. +1
    -3
      src/include/dedetemplate.class.php
  23. +1
    -1
      src/include/qrcode/phpqrcode.php
  24. +1
    -14
      src/include/qrcode/qrimage.php
  25. +5
    -13
      src/include/splitword.class.php
  26. +1
    -1
      src/member/inc/config_pay_tenpay.php
  27. +5
    -32
      src/member/reg_new.php
  28. +1
    -3
      src/member/templets/content_list.htm
  29. +1
    -12
      src/member/templets/resetpassword2.htm
  30. +2
    -37
      src/plus/vdimgck.php
  31. +22
    -61
      src/static/enums.js
  32. +1
    -2
      src/templets/plus/list_diyform.htm
  33. +0
    -1
      src/templets/plus/showphoto.htm
  34. +0
    -1
      src/templets/plus/view_diyform.htm

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

@@ -58,7 +58,7 @@ button+button{margin-left:10px}
if (document.querySelector('#isWater').checked) {
formData.append('needwatermark', 1);
} else {
// formData.append('needwatermark', 0);
//formData.append('needwatermark', 0);
}
let res = await fetch('select_images_post.php', {
method: 'POST',


+ 1
- 3
src/admin/file_manage_view.php View File

@@ -136,9 +136,7 @@ else if($fmdo=="editview")
if((eregi("<html",$content) && eregi("<body",$content)) || $ishead == "yes")
{
$contentView = GetEditor("str",$content,"500","Default","string","true");
}
else
{
} else {
$contentView = GetEditor("str",$content,"500","Default","string","false");
}
$GLOBALS['filename'] = $filename;


+ 1
- 4
src/admin/inc/inc_admin_channel.php View File

@@ -86,9 +86,7 @@ function GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen)
$dfvalue = "'".$dfvalue."'";
$fields[0] = " `$fieldname` enum($dfvalue) NULL;";
$fields[1] = "enum($dfvalue)";
}
else
{
} else {
if(empty($dfvalue))
{
$dfvalue = '';
@@ -106,7 +104,6 @@ function GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen)
}
return $fields;
}

/**
* 获取模型列表字段
*


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

@@ -9,7 +9,7 @@ if($fmdo=="del")
@unlink($filename);
$t="文件";
ShowMsg("成功删除一个".$t."","mail_file_manage.php");
}else{
} else {
if(!isset($activepath)){
$activepath=$cfg_cmspath;
}
@@ -21,13 +21,13 @@ if($fmdo=="del")
}
if($activepath == ""){
$inpath = $cfg_basedir."/data/mail";
}else{
} else {
$inpath = $cfg_basedir.$activepath."/data/mail";
}
$activeurl = $activepath;
if(preg_match("#".$cfg_templets_dir."#i", $activepath)){
$istemplets = true;
}else{
} else {
$istemplets = false;
}
include DedeInclude('templets/mail_file_manage.htm');


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

@@ -25,7 +25,7 @@ function sendmail($email, $mailtitle, $mailbody)
exit();
}
$smtp->sendmail($email,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype);
}else{
} else {
@mail($email, $mailtitle, $mailbody, $headers);
}
}
@@ -62,7 +62,7 @@ if($action=="post"){
if(file_exists(DEDEDATA.'/mail/'.$mailfile)){
$address = file(DEDEDATA.'/mail/'.$mailfile);
$address=implode(",", $address);
}else{
} else {
ShowMsg($mailfile."不存在","-1");
exit();
}


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

@@ -50,7 +50,7 @@ if($dopost=="add"){
if(!$dsql->ExecuteNoneQuery($query)){
ShowMsg("更新数据库#@__mail_title表时出错,请检查","javascript:;");
exit();
}else{
} else {
ShowMsg("发表期刊成功","mail_title.php");
exit();
}
@@ -78,7 +78,7 @@ if($dopost=="add"){
if(!$dsql->ExecuteNoneQuery($query)){
ShowMsg("更新数据库#@__mail_title表时出错,请检查","javascript:;");
exit();
}else{
} else {
ShowMsg("编辑期刊成功","mail_title.php");
exit();
}
@@ -86,7 +86,7 @@ if($dopost=="add"){
$dsql->ExecuteNoneQuery("Delete From `#@__mail_title` where id='$id'");
ShowMsg("删除期刊成功","mail_title.php");
exit();
}else{
} else {
function GetSendTimeMk($mktime){
if($mktime=="0") return "未发送";


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

@@ -27,7 +27,7 @@ if($dopost=="send"){
exit();
}
$smtp->sendmail($email,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype);
}else{
} else {
@mail($email, $mailtitle, $mailbody, $headers);
}
}
@@ -57,7 +57,7 @@ if($dopost=="send"){
ShowMsg('邮件已成功发送','mail_title_send.php');
exit();
}
}else{
} else {
function GetState($state){
if($state=="0") return "<span style='color:#dc3545'>未发送</span>";


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

@@ -21,7 +21,7 @@ if($dopost=="add"){
if(!$dsql->ExecuteNoneQuery($query)){
ShowMsg("更新数据库#@__mail_type表时出错,请检查","javascript:;");
exit();
}else{
} else {
ShowMsg("添加分类成功","mail_type.php");
exit();
}
@@ -37,7 +37,7 @@ if($dopost=="add"){
if(!$dsql->ExecuteNoneQuery($query)){
ShowMsg("更新数据库#@__mail_type表时出错,请检查","javascript:;");
exit();
}else{
} else {
ShowMsg("修改分类成功","mail_type.php");
exit();
}
@@ -45,7 +45,7 @@ if($dopost=="add"){
$dsql->ExecuteNoneQuery("Delete From `#@__mail_type` where id='$id'");
ShowMsg("删除分类成功","mail_type.php");
exit();
}else{
} else {
$sql = "SELECT * FROM `#@__mail_type` ORDER BY id ";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEADMIN."/templets/mail_type_main.htm");


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

@@ -21,7 +21,7 @@ function ChangeMenu(way)
top.document.all.btFrame.cols = '0,*';
FrameHide = 1;
return;
}else{
} else {
top.document.all.btFrame.cols = preFrameW;
FrameHide = 0;
return;
@@ -45,7 +45,7 @@ function ChangeMenuFF(way)
window.parent.document.getElementsByTagName('btFrame').cols = '0,*';
FrameHide = 1;
return;
}else{
} else {
window.parent.document.getElementsByTagName('btFrame').cols = preFrameW;
FrameHide = 0;
return;


+ 1
- 1
src/admin/templets/makehtml_homepage.htm View File

@@ -89,7 +89,7 @@
<input name="re_dedebiz_admin" type="password" id="re_dedebiz_admin" value="" size="30">
</td>
</tr>
<?php }else{ ?>
<?php } else { ?>
<tr>
<td height="26" valign="top" bgcolor="#FFFFFF">操作密码:</td>
<td height="26" valign="top" bgcolor="#FFFFFF">


+ 1
- 1
src/admin/templets/member_toadmin.htm View File

@@ -36,7 +36,7 @@
if($row['matt']==10)
{
echo "<span style='color:#e74d58'>已经是管理员了,不要再提升了</span>";
}else{
} else {
?>
<table width="98%" border="0" cellspacing="0" cellpadding="6" class="table table-borderless">
<tr>


+ 3
- 3
src/admin/templets/public_guide.htm View File

@@ -22,7 +22,7 @@
if(selobj.checked){
if(preobj!=null && selid != selCheckbox) preobj.checked = false;
selCheckbox = selid;
}else{
} else {
if(selCheckbox == selid) selCheckbox = '';
}
}
@@ -30,7 +30,7 @@
{
if(selCheckbox==''){
ShowMsg("您没有选中需要设置为默认的栏目");
}else{
} else {
var selobj = document.getElementById(selCheckbox);
location="public_guide.php?action=setdefault&cid="+selobj.value;
}
@@ -89,7 +89,7 @@
?>
<a href="<?php echo $row['mancon']; ?>" class="btn btn-success btn-sm">管理内容</a>
<a href="catalog_do.php?channelid=<?php echo $row['id'];?>&cid=0&dopost=addArchives" class="btn btn-success btn-sm">发布内容</a>
<?php }else{ ?>
<?php } else { ?>
|
<span>管理内容</span>
|


+ 1
- 1
src/admin/templets/sys_data.htm View File

@@ -227,7 +227,7 @@
class="btn btn-success btn-sm">结构</a>
</td>
<?php
}else{
} else {
echo "<td></td><td></td><td></td><td></td>\r\n";
}
echo "</tr>\r\n";


+ 1
- 1
src/admin/templets/sys_data_revert.htm View File

@@ -94,7 +94,7 @@
</td>
<td width='40%'>{$filelists[$i]}</td>\r\n";
echo $mtd;
}else{
} else {
echo "<td></td><td></td>\r\n";
}
echo "</tr>\r\n";


+ 1
- 1
src/admin/templets/vote_main.htm View File

@@ -37,7 +37,7 @@
<td>{dede:field.endtime function="GetDateMk(@me)" /}</td>
<td>{dede:field.totalcount /}</td>
<td>
<?php if($fields['isenable'] == 1){echo "<span style='color:#e74d58'>未启用</span>";}else{echo "<span style='color:#28a745'>启用</span>";} ?>
<?php if($fields['isenable'] == 1){echo "<span style='color:#e74d58'>未启用</span>";} else {echo "<span style='color:#28a745'>启用</span>";} ?>
</td>
<td>
<a title="获取代码" href='vote_getcode.php?aid={dede:field.aid /}' class="btn btn-success btn-sm">代码</a>


+ 1
- 3
src/include/arc.freelist.class.php View File

@@ -65,9 +65,7 @@ class FreeList
if(empty($channelid))
{
showmsg('必须指定频道','-1');exit();
}
else
{
} else {
$channelid = intval($channelid);
$channelinfo = $this->dsql->getone("select maintable from #@__channeltype where id='$channelid'");
$this->maintable = $channelinfo['maintable'];


+ 2
- 2
src/include/arc.searchview.class.php View File

@@ -751,8 +751,8 @@ class SearchView
$plist .= $endpage;
//if($totalpage>$total_list)
//{
// $plist.="<td width='38'><input type='text' name='PageNo' style='width:28px;height:14px' value='".$this->PageNo."' /></td>\r\n";
// $plist.="<td width='30'><input type='submit' name='plistgo' value='GO' style='width:30px;height:22px;font-size:9pt' /></td>\r\n";
// $plist.="<td width='38'><input type='text' name='PageNo' style='width:28px;height:14px' value='".$this->PageNo."' /></td>\r\n";
// $plist.="<td width='30'><input type='submit' name='plistgo' value='GO' style='width:30px;height:22px;font-size:9pt' /></td>\r\n";
//}
$plist .= "</ul></form>\r\n";
return $plist;


+ 2
- 6
src/include/autoload.inc.php View File

@@ -23,18 +23,14 @@ function __autoload($classname)
if ( is_file ( DEDEINC.'/'.$libclassfile ) )
{
require DEDEINC.'/'.$libclassfile;
}
else
{
} else {
if (DEBUG_LEVEL === TRUE)
{
echo '<pre>';
echo $classname.'类找不到';
echo '</pre>';
exit ();
}
else
{
} else {
header ( "location:/404.html" );
die ();
}


+ 2
- 6
src/include/autoload7.inc.php View File

@@ -23,18 +23,14 @@ function dede_autoloader($classname)
if ( is_file ( DEDEINC.'/'.$libclassfile ) )
{
require DEDEINC.'/'.$libclassfile;
}
else
{
} else {
if (DEBUG_LEVEL === TRUE)
{
echo '<pre>';
echo $classname.'类找不到';
echo '</pre>';
exit ();
}
else
{
} else {
header ( "location:/404.html" );
die ();
}


+ 2
- 6
src/include/cli.class.php View File

@@ -206,9 +206,7 @@ class DedeCli
$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
{
} else {
fwrite(STDOUT, "\007");
}
}
@@ -362,9 +360,7 @@ class DedeCli
$time--;
}
static::write();
}
else
{
} else {
if ($seconds > 0)
{
sleep($seconds);


+ 2
- 31
src/include/dedemodule.class.php View File

@@ -12,17 +12,14 @@ if (!defined('DEDEINC')) exit('dedebiz');
require_once(DEDEINC.'/charset.func.php');
require_once(DEDEINC.'/dedeatt.class.php');
require_once(DEDEINC.'/dedehttpdown.class.php');
function base64url_encode($data)
{
return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
}
function base64url_decode($data)
{
return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT));
}
class DedeModule
{
var $modulesPath;
@@ -43,7 +40,6 @@ class DedeModule
{
$this->__construct($modulespath);
}
/**
* 枚举系统里已经存在的模块(缓存功能实际上只作hash与文件名的解析,在此不特别处理)
*
@@ -54,11 +50,8 @@ class DedeModule
function GetModuleList($moduletype = '')
{
if (is_array($this->modules)) return $this->modules;
$dh = dir($this->modulesPath) or die("没找到模块目录:({$this->modulesPath})");
$fp = @fopen($this->modulesPath.'/modulescache.php', 'w') or die('读取文件权限出错,目录文件'.$this->modulesPath.'/modulescache.php不可写!');
$fp = @fopen($this->modulesPath.'/modulescache.php', 'w') or die('读取文件权限出错,目录文件'.$this->modulesPath.'/modulescache.php不可写');
fwrite($fp, "<"."?php\r\n");
fwrite($fp, "global \$allmodules;\r\n");
while ($filename = $dh->read()) {
@@ -81,7 +74,6 @@ class DedeModule
$dh->Close();
return $this->modules;
}
/**
* 从远程获取模块信息
*
@@ -119,7 +111,6 @@ class DedeModule
}
}
}
/**
* 获得指定hash的模块文件
*
@@ -133,7 +124,6 @@ class DedeModule
if (isset($GLOBALS['allmodules'][$hash])) return $GLOBALS['allmodules'][$hash];
else return $hash.'.xml';
}
/**
* 获得某模块的基本信息
*
@@ -176,20 +166,16 @@ class DedeModule
}
}
fclose($fp);
if (empty($minfos['lang'])) {
$minfos['lang'] = "utf-8";
}
if (isset($minfos['lang'])) $this->moduleLang = trim($minfos['lang']);
else $this->moduleLang = 'gbk';
if ($this->sysLang == 'gb2312') $this->sysLang = 'gbk';
if ($this->moduleLang == 'gb2312') $this->moduleLang = 'gbk';
if ($this->sysLang != $this->moduleLang) {
foreach ($minfos as $k => $v) $minfos[$k] = $this->AppCode($v);
}
if (isset($minfos['pubkey'])) {
//验证模块信息
$pubKey = @base64url_decode($minfos['pubkey']);
@@ -202,7 +188,6 @@ class DedeModule
return null;
}
}
return $minfos;
}
@@ -236,7 +221,6 @@ class DedeModule
fclose($fp);
return $filexml;
}
/**
* 获得系统文件的内容
* 指安装、删除、协议文件
@@ -257,7 +241,7 @@ class DedeModule
while (!feof($fp)) {
$line = fgets($fp, 1024);
if (!$start) {
// 2011-6-7 修复模块打包程序中上传安装程序生成为空白文件(by:华强)
//2011-6-7 修复模块打包程序中上传安装程序生成为空白文件
if (preg_match("#<{$ntype}>#i", $line)) $start = TRUE;
} else {
if (preg_match("#<\/{$ntype}#i", $line)) break;
@@ -271,7 +255,6 @@ class DedeModule
$okdata = $this->AppCode($okdata);
return $okdata;
}
/**
* 把某系统文件转换为文件
*
@@ -290,7 +273,6 @@ class DedeModule
fclose($fp);
return $filename;
}
/**
* 删除系统文件
*
@@ -304,7 +286,6 @@ class DedeModule
$filename = $this->modulesPath.'/'.$hashcode."-{$ntype}.php";
unlink($filename);
}
/**
* 检查是否已经存在指定的模块
*
@@ -318,7 +299,6 @@ class DedeModule
if (file_exists($modulefile) && !is_dir($modulefile)) return TRUE;
else return FALSE;
}
/**
* 读取文件,返回编码后的文件内容
*
@@ -336,7 +316,6 @@ class DedeModule
if (!empty($str)) return base64_encode($str);
else return '';
}
/**
* 获取模块包里的文件名列表
*
@@ -364,7 +343,6 @@ class DedeModule
fclose($fp);
return $filelists;
}
/**
* 删除已安装模块附带的文件
*
@@ -409,7 +387,6 @@ class DedeModule
}
return TRUE;
}
/**
* 把模块包里的文件写入服务器
*
@@ -482,7 +459,6 @@ class DedeModule
fclose($fp);
return TRUE;
}
/**
* 测试某文件的文件夹是否创建
*
@@ -506,7 +482,6 @@ class DedeModule
}
return TRUE;
}
/**
* 获取某个目录或文件的打包数据
*
@@ -522,7 +497,6 @@ class DedeModule
$this->MakeEncodeFileRun($basedir, $f, $fp);
return TRUE;
}
/**
* 测试目标文件
*
@@ -537,7 +511,6 @@ class DedeModule
$this->MakeEncodeFileRunTest($basedir, $f);
return TRUE;
}
/**
* 检测某个目录或文件的打包数据,递归
*
@@ -566,7 +539,6 @@ class DedeModule
}
}
}
/**
* 获取个目录或文件的打包数据,递归
*
@@ -600,7 +572,6 @@ class DedeModule
fwrite($fp, $fileList);
}
}
/**
* 清理
*


+ 1
- 3
src/include/dedetemplate.class.php View File

@@ -529,9 +529,7 @@ class DedeTemplate
fclose($fp);
}
}
}
else
{
} else {
if($ctype=='config' && count($this->tpCfgs) > 0 )
{
$fp = fopen($this->configFile,'w') or dir("Write Config File Error! ");


+ 1
- 1
src/include/qrcode/phpqrcode.php View File

@@ -950,7 +950,7 @@
ImagePng($image, $filename);
header("Content-type: image/png");
ImagePng($image);
}else{
} else {
ImagePng($image, $filename);
}
}


+ 1
- 14
src/include/qrcode/qrimage.php View File

@@ -21,14 +21,10 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
define('QR_IMAGE', true);
class QRimage {
public static $black = array(255,255,255);
public static $white = array(0,0,0);
//----------------------------------------------------------------------
public static function png($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE)
{
@@ -42,14 +38,12 @@
ImagePng($image, $filename);
header("Content-type: image/png");
ImagePng($image);
}else{
} else {
ImagePng($image, $filename);
}
}
ImageDestroy($image);
}
//----------------------------------------------------------------------
public static function jpg($frame, $filename = false, $pixelPerPoint = 8, $outerFrame = 4, $q = 85)
{
@@ -64,23 +58,17 @@
ImageDestroy($image);
}
//----------------------------------------------------------------------
private static function image($frame, $pixelPerPoint = 4, $outerFrame = 4)
{
$h = count($frame);
$w = strlen($frame[0]);
$imgW = $w + 2*$outerFrame;
$imgH = $h + 2*$outerFrame;
$base_image =ImageCreate($imgW, $imgH);
$col[0] = ImageColorAllocate($base_image,QRImage::$black[0],QRImage::$black[1],QRImage::$black[2]);
$col[1] = ImageColorAllocate($base_image,QRImage::$white[0],QRImage::$white[1],QRImage::$white[2]);
imagefill($base_image, 0, 0, $col[0]);
for($y=0; $y<$h; $y++) {
for($x=0; $x<$w; $x++) {
if ($frame[$y][$x] == '1') {
@@ -88,7 +76,6 @@
}
}
}
$target_image =ImageCreate($imgW * $pixelPerPoint, $imgH * $pixelPerPoint);
ImageCopyResized($target_image, $base_image, 0, 0, 0, 0, $imgW * $pixelPerPoint, $imgH * $pixelPerPoint, $imgW, $imgH);
ImageDestroy($base_image);


+ 5
- 13
src/include/splitword.class.php View File

@@ -148,9 +148,7 @@ class SplitWord
if( isset($this->mainDicInfos[ $keynum ]) )
{
$data = $this->mainDicInfos[ $keynum ];
}
else
{
} else {
//rewind( $this->mainDicHand );
$move_pos = $keynum * 8;
fseek($this->mainDicHand, $move_pos, SEEK_SET);
@@ -201,9 +199,7 @@ class SplitWord
else {
$rs = FALSE;
}
}
else
{
} else {
$rs = FALSE;
}
return $rs;
@@ -236,9 +232,7 @@ class SplitWord
if($maindic=='' || !file_exists($maindic) )
{
$dicWords = $this->mainDicFile ;
}
else
{
} else {
$dicWords = $maindic;
$this->mainDicFile = $maindic;
}
@@ -246,7 +240,7 @@ class SplitWord
//加载主词典(只打开)
if($this->isUnpacked){
$this->mainDicHand = fopen($dicWords, 'r');
}else{
} else {
$this->InportDict($this->mainDicFileZip);
}
@@ -318,9 +312,7 @@ class SplitWord
{
$this->newWords[$word]++;
$this->mainDicInfos[$word]['c']++;
}
else
{
} else {
$this->newWords[$word] = 1;
$this->mainDicInfos[$word] = $infos;
}


+ 1
- 1
src/member/inc/config_pay_tenpay.php View File

@@ -76,7 +76,7 @@ if($cfg_soft_lang == 'utf-8')
</form>
</body>
</html>';
}else{
} else {
echo '<html>
<head>
<title>转到财付通支付页面</title>


+ 5
- 32
src/member/reg_new.php View File

@@ -7,15 +7,12 @@
* @link https://www.dedebiz.com
*/
require_once(dirname(__FILE__)."/config.php");
if ($cfg_mb_allowreg == 'N') {
ShowMsg('系统关闭了新用户注册', 'index.php');
exit();
}
if (!isset($dopost)) $dopost = '';
$step = empty($step) ? 1 : intval($step);
if ($step == 1) {
if ($cfg_ml->IsLogin()) {
ShowMsg('您已经登录系统,无需重新注册', 'index.php');
@@ -30,17 +27,6 @@ if ($step == 1) {
exit();
}
}
//$faqkey = isset($faqkey) && is_numeric($faqkey) ? $faqkey : 0;
//if($safe_faq_reg == '1')
//{
// if($safefaqs[$faqkey]['answer'] != $rsafeanswer || $rsafeanswer=='')
// {
// ShowMsg('验证问题答案错误', '-1');
// exit();
// }
//}
$userid = $uname = trim($userid);
$pwd = trim($userpwd);
$pwdc = trim($userpwdok);
@@ -61,17 +47,14 @@ if ($step == 1) {
ShowMsg('您两次输入的密码不一致', '-1');
exit();
}
$uname = HtmlReplace($uname, 1);
$userid = HtmlReplace($userid, 1);
//检测用户名是否存在
$row = $dsql->GetOne("SELECT mid FROM `#@__member` WHERE userid LIKE '$userid' ");
if (is_array($row)) {
ShowMsg("您指定的用户名 {$userid} 已存在,请使用别的用户名", "-1");
exit();
}
//会员的默认金币
$dfscores = 0;
$dfmoney = 0;
@@ -86,16 +69,11 @@ if ($step == 1) {
$loginip = GetIP();
$pwd = md5($userpwd);
$mtype = '个人';
$spaceSta = ($cfg_mb_spacesta < 0 ? $cfg_mb_spacesta : 0);
$inQuery = "INSERT INTO `#@__member` (`mtype` ,`userid` ,`pwd` ,`uname` ,`sex` ,`rank` ,`money` ,`email` ,`scores` ,
`matt`, `spacesta` ,`face`,`safequestion`,`safeanswer` ,`jointime` ,`joinip` ,`logintime` ,`loginip` )
VALUES ('$mtype','$userid','$pwd','$uname','','10','$dfmoney','','$dfscores',
'0','$spaceSta','','','','$jointime','$joinip','$logintime','$loginip'); ";
$inQuery = "INSERT INTO `#@__member` (`mtype` ,`userid` ,`pwd` ,`uname` ,`sex` ,`rank` ,`money` ,`email` ,`scores` ,`matt`, `spacesta` ,`face`,`safequestion`,`safeanswer` ,`jointime` ,`joinip` ,`logintime` ,`loginip` )
VALUES ('$mtype','$userid','$pwd','$uname','','10','$dfmoney','','$dfscores','0','$spaceSta','','','','$jointime','$joinip','$logintime','$loginip'); ";
if ($dsql->ExecuteNoneQuery($inQuery)) {
$mid = $dsql->GetLastID();
//写入默认会员详细资料
if ($mtype == '个人') {
$space = 'person';
@@ -104,26 +82,21 @@ if ($step == 1) {
} else {
$space = 'person';
}
//写入默认统计数据
$membertjquery = "INSERT INTO `#@__member_tj` (`mid`,`article`,`album`,`archives`,`homecount`,`pagecount`,`feedback`,`friend`,`stow`)
VALUES ('$mid','0','0','0','0','0','0','0','0'); ";
VALUES ('$mid','0','0','0','0','0','0','0','0'); ";
$dsql->ExecuteNoneQuery($membertjquery);
//写入默认空间配置数据
$spacequery = "INSERT INTO `#@__member_space`(`mid` ,`pagesize` ,`matt` ,`spacename` ,`spacelogo` ,`spacestyle`, `sign` ,`spacenews`)
VALUES('{$mid}','10','0','{$uname}的空间','','$space','',''); ";
VALUES('{$mid}','10','0','{$uname}的空间','','$space','',''); ";
$dsql->ExecuteNoneQuery($spacequery);
//写入其它默认数据
$dsql->ExecuteNoneQuery("INSERT INTO `#@__member_flink`(mid,title,url) VALUES('$mid','DedeBIZ','https://www.dedebiz.com'); ");
//----------------------------------------------
//模拟登录
//---------------------------
$cfg_ml = new MemberLogin(7 * 3600);
$rs = $cfg_ml->CheckUser($userid, $userpwd);
ShowMsg('您已经登录系统,无需重新注册', 'index.php');
exit;
} else {
@@ -140,4 +113,4 @@ if ($step == 1) {
ShowMsg('您已经登录系统,无需重新注册', 'index.php');
exit;
}
}
}

+ 1
- 3
src/member/templets/content_list.htm View File

@@ -91,9 +91,7 @@
<a href="javascript:editArc(<?php echo $fields['id']?>,<?php echo $fields['channel']?>);">修改</a>
| <a href="javascript:delArc(<?php echo $fields['id']?>);">删除</a> |
<?php
}
else
{
} else {
echo "<span class='gray'>改 | 删 | </span>";
}
?> <a href="javascript:viewArc(<?php echo $fields['id']; ?>);">预览</a></td>


+ 1
- 12
src/member/templets/resetpassword2.htm View File

@@ -11,11 +11,8 @@
<title>密码帮手——找回密码第二步</title>
</head>
<body>
<?php include(DEDEMEMBER."/templets/top.htm"); ?>
<?php include(DEDEMEMBER."/templets/header.htm"); ?>
<main class="">
<div class="container">
<div class="main mb-3">
@@ -29,23 +26,20 @@
<input placeholder="用户名" name="userid" type="text" readonly="readonly" value="<?php echo $row['membername']?>" class="form-control" id="txtUsername">
</div>
</div>
<?php if(empty($key)){ ?>
<div class="form-group">
<div class="input-group">
<input placeholder="临时登录密码:" name="pwdtmp" type="password" class="form-control">
</div>
</div>
<?php }else{ ?>
<?php } else { ?>
<input name="key" type="hidden" value="<?php echo $key;?>" />
<?php }?>
<div class="form-group">
<div class="input-group">
<input placeholder="新密码" name="pwd" type="password" class="form-control">
</div>
</div>
<div class="form-group">
<div class="input-group">
<input placeholder="确认新密码" name="pwdok" type="password" class="form-control">
@@ -55,13 +49,8 @@
</form>
</div>
</div>
</main>
<?php include(DEDEMEMBER."/templets/footer.htm"); ?>
</body>
</html>
</html>

+ 2
- 37
src/plus/vdimgck.php View File

@@ -14,25 +14,21 @@ require_once(DEDEDATA.'/config.cache.inc.php');
$config = array(
'font_size' => 20,
'img_height' => $safe_wheight,
'word_type' => (int)$safe_codetype, //1:数字 2:英文 3:单词
'word_type' => (int)$safe_codetype,
'img_width' => $safe_wwidth,
'use_boder' => TRUE,
'font_file' => DEDEINC.'/data/fonts/'.mt_rand(1, 6).'.ttf',
'wordlist_file' => DEDEINC.'/data/words/words.txt',
'filter_type' => 5
);
$enkey = substr(md5(substr($cfg_cookie_encode, 0, 5)), 0, 10);
$sessSavePath = DEDEDATA."/sessions_{$enkey}";
if (!is_dir($sessSavePath)) mkdir($sessSavePath);
//Session保存路径
if (is_writeable($sessSavePath) && is_readable($sessSavePath)) {
session_save_path($sessSavePath);
}
if (!empty($cfg_domain_cookie)) session_set_cookie_params(0, '/', $cfg_domain_cookie);
if (!echo_validate_image($config)) {
//如果不成功则初始化一个默认验证码
@session_start();
@@ -55,15 +51,12 @@ if (!echo_validate_image($config)) {
echo $c;
}
}
function echo_validate_image($config = array())
{
@session_start();
if (!function_exists('imagettftext')) {
return false;
}
//主要参数
$font_size = isset($config['font_size']) ? $config['font_size'] : 14;
$img_height = isset($config['img_height']) ? $config['img_height'] : 38;
@@ -71,19 +64,15 @@ function echo_validate_image($config = array())
$font_file = isset($config['font_file']) ? $config['font_file'] : DEDEINC.'/data/font/'.mt_rand(1, 6).'.ttf';
$use_boder = isset($config['use_boder']) ? $config['use_boder'] : TRUE;
$filter_type = isset($config['filter_type']) ? $config['filter_type'] : 0;
//创建图片,并设置背景色
$im = @imagecreate($img_width, $img_height);
imagecolorallocate($im, mt_rand(200, 255), mt_rand(200, 255), mt_rand(200, 255));
//文字随机颜色
$fontColor[] = imagecolorallocate($im, 0x15, 0x15, 0x15);
$fontColor[] = imagecolorallocate($im, 0x95, 0x1e, 0x04);
$fontColor[] = imagecolorallocate($im, 0x93, 0x14, 0xa9);
$fontColor[] = imagecolorallocate($im, 0x12, 0x81, 0x0a);
$fontColor[] = imagecolorallocate($im, 0x06, 0x3a, 0xd5);
//获取随机字符
$rndstring = '';
if ($config['word_type'] != 3) {
@@ -106,23 +95,8 @@ function echo_validate_image($config = array())
$rndstring .= $chars[mt_rand(0, $max)];
}
}
$_SESSION['securimage_code_value'] = strtolower($rndstring);
$rndcodelen = strlen($rndstring);
////背景横线
//$lineColor1 = imagecolorallocate($im, 0xda, 0xd9, 0xd1);
//for ($j = 3; $j <= $img_height - 3; $j = $j + 3) {
// imageline($im, 2, $j, $img_width - 2, $j, $lineColor1);
//}
////背景竖线
//$lineColor2 = imagecolorallocate($im, 0xda, 0xd9, 0xd1);
//for ($j = 2; $j < 100; $j = $j + 6) {
// imageline($im, $j, 0, $j + 8, $img_height, $lineColor2);
//}
//增加一些噪线
for ($i = 0; $i < 5; $i++) {
$red = mt_rand(50, 255);
@@ -143,14 +117,11 @@ function echo_validate_image($config = array())
imagesetthickness($im, mt_rand(1, 3));
imageline($im, $Xa, $Ya, $Xb, $Yb, $tcol);
}
//画边框
if ($use_boder && $filter_type == 0) {
$bordercolor = imagecolorallocate($im, 0x9d, 0x9e, 0x96);
imagerectangle($im, 0, 0, $img_width - 1, $img_height - 1, $bordercolor);
}
//输出文字
$lastc = '';
for ($i = 0; $i < $rndcodelen; $i++) {
@@ -161,7 +132,6 @@ function echo_validate_image($config = array())
@imagettftext($im, $font_size, $c, $y_pos, 28, $c_fontColor, $font_file, $rndstring[$i]);
$lastc = $rndstring[$i];
}
//图象效果
switch ($filter_type) {
case 1:
@@ -176,14 +146,9 @@ function echo_validate_image($config = array())
default:
break;
}
header("Pragma:no-cache\r\n");
header("Cache-Control:no-cache\r\n");
header("Expires:0\r\n");
//输出特定类型的图片格式,优先级为 gif -> jpg ->png
//dump(function_exists("imagejpeg"));
if (function_exists("imagejpeg")) {
header("content-type:image/jpeg\r\n");
imagejpeg($im);
@@ -193,4 +158,4 @@ function echo_validate_image($config = array())
}
imagedestroy($im);
exit();
}
}

+ 22
- 61
src/static/enums.js View File

@@ -33,30 +33,16 @@ function selNext(oj, v)
oj.options.add(aOption);
}
}
//子类改变事件
function ChangeSon()
{
/*
//由于支持3级联动,所以这里需要对自己改变进行重构
var emname = this.name.replace('_son', '');
var topSelObj = document.getElementById(emname+'_top');
if(this.options[this.selectedIndex].value==0) {
document.getElementById('hidden_'+emname).value = topSelObj.options[topSelObj.selectedIndex].value;
}
else {
document.getElementById('hidden_'+emname).value = this.options[this.selectedIndex].value;
}
*/
// 由于支持3级联动,所以这里需要对自己改变进行重构
var emname = this.name.replace('_son', '');
// alert(emname);
//alert(emname);
if( document.getElementById(emname+'_sec') )
{
var oj = document.getElementById(emname + '_sec');
}
else
{
} else {
var oj = document.createElement('select');
oj.name = emname + '_sec';
oj.id = emname + '_sec';
@@ -67,10 +53,9 @@ function ChangeSon()
document.getElementById('hidden_'+emname).value = v;
var newobj = oj.options;
var selarr = eval('em_'+emname+'s');
var selv = parseInt(v);
var maxv = parseInt(v) + 0.5;
// alert(maxv);
//alert(maxv);
i = 0;
while(newobj && newobj.length > 0) oj.remove(0);
clear(oj);
@@ -81,9 +66,7 @@ function ChangeSon()
aOption.value = '0';
oj.options.add(aOption);
return;
}
else
{
} else {
aOption = document.createElement('OPTION');
aOption.text = '请选择..';
aOption.value = '0';
@@ -103,20 +86,17 @@ function ChangeSon()
if(j > 0) document.getElementById('span_'+emname+'_sec').appendChild(oj);
else document.getElementById('span_'+emname+'_sec').innerHTML = "";
}
// 改变第三级的事件
//改变第三级的事件
function ChangeSec()
{
var emname = this.name.replace('_sec', '');
var topSelObj = document.getElementById(emname+'_top');
if(this.options[this.selectedIndex].value==0) {
document.getElementById('hidden_'+emname).value = topSelObj.options[topSelObj.selectedIndex].value;
}
else {
} else {
document.getElementById('hidden_'+emname).value = this.options[this.selectedIndex].value;
}
}
//顶级类改变事件
function selNextSon()
{
@@ -124,9 +104,7 @@ function selNextSon()
if( document.getElementById(emname+'_son') )
{
var oj = document.getElementById(emname + '_son');
}
else
{
} else {
var oj = document.createElement('select');
oj.name = emname + '_son';
oj.id = emname + '_son';
@@ -148,9 +126,7 @@ function selNextSon()
aOption.value = '0';
oj.options.add(aOption);
return;
}
else
{
} else {
aOption = document.createElement('OPTION');
aOption.text = '请选择..';
aOption.value = '0';
@@ -167,9 +143,7 @@ function selNextSon()
}
document.getElementById('span_'+emname+'_son').appendChild(oj);
}
// 根据数组生成多级联动菜单
//根据数组生成多级联动菜单
function MakeTopSelect(emname, selvalue)
{
var selectFormHtml = '';
@@ -180,34 +154,30 @@ function MakeTopSelect(emname, selvalue)
selObj.className = "form-control";
selObj.onchange = selNextSon;
var selarr = eval('em_'+emname+'s');
// alert(selarr[1002.2]);
//alert(selarr[1002.2]);
var topvalue = 0;
var sonvalue = 0;
var secvalue = 0;
aOption = document.createElement('OPTION');
aOption.text = '请选择..';
aOption.value = 0;
selObj.options.add(aOption);
// alert(selvalue);
//alert(selvalue);
if(selvalue % 500 == 0 )
{
topvalue = selvalue;
}
// 如果是小数,则依次取出顶级数值,二级数值以及三级数值
//如果是小数,则依次取出顶级数值,二级数值以及三级数值
else if(!!(selvalue % 1))
{
secvalue = selvalue;
sonvalue = Math.floor(selvalue);
topvalue = sonvalue - (sonvalue % 500);
// alert(secvalue);
}
else {
//alert(secvalue);
} else {
sonvalue = selvalue;
topvalue = selvalue - (selvalue % 500);
}
for(i = 500; i <= selarr.length; i += 500)
{
if(!selarr[i]) continue;
@@ -218,8 +188,7 @@ function MakeTopSelect(emname, selvalue)
aOption.value = i;
selObj.options.add(aOption);
aOption.selected = true;
}
else {
} else {
aOption = document.createElement('OPTION');
aOption.text = selarr[i];
aOption.value = i;
@@ -227,7 +196,6 @@ function MakeTopSelect(emname, selvalue)
}
}
document.getElementById('span_'+emname).appendChild(selObj);
//如果子类存在值,创建子类
//if(sonvalue > 0 || topvalue > 0) {
selObj = document.createElement("select");
@@ -239,7 +207,6 @@ function MakeTopSelect(emname, selvalue)
aOption.text = '请选择..';
aOption.value = 0;
selObj.options.add(aOption);
//当大类有值输出子类
if(topvalue > 0)
{
@@ -255,8 +222,7 @@ function MakeTopSelect(emname, selvalue)
aOption.value = i;
selObj.options.add(aOption);
aOption.selected = true;
}
else {
} else {
aOption = document.createElement('OPTION');
aOption.text = selarr[i];
aOption.value = i;
@@ -265,8 +231,7 @@ function MakeTopSelect(emname, selvalue)
}
}
document.getElementById('span_'+emname+'_son').appendChild(selObj);
// 若存在第三级则创建
//若存在第三级则创建
if(secvalue > 0)
{
selObj = document.createElement("select");
@@ -278,10 +243,9 @@ function MakeTopSelect(emname, selvalue)
selObj.className = "form-control";
aOption.value = 0;
selObj.options.add(aOption);
var selv = sonvalue;
var maxv = parseInt(sonvalue) + 0.5;
// alert(maxv);
//alert(maxv);
i = 0;
for(i = selv + 0.001; i < maxv; i = FloatAdd(i, 0.001))
{
@@ -293,8 +257,7 @@ function MakeTopSelect(emname, selvalue)
aOption.value = i;
selObj.options.add(aOption);
aOption.selected = true;
}
else {
} else {
aOption = document.createElement('OPTION');
aOption.text = selarr[i];
aOption.value = i;
@@ -304,8 +267,7 @@ function MakeTopSelect(emname, selvalue)
}
document.getElementById('span_'+emname+'_sec').appendChild(selObj);
}
// 两个小数相加进度计算
//两个小数相加进度计算
function FloatAdd(arg1, arg2)
{
var r1,r2,m;
@@ -314,7 +276,6 @@ function FloatAdd(arg1, arg2)
m=Math.pow(10,Math.max(r1,r2))
return (arg1*m+arg2*m)/m
}
//清除旧对象
function clear(o)
{
@@ -322,4 +283,4 @@ function clear(o)
for (i = 0; i< l; i++){
o.options[1]=null;
}
}
}

+ 1
- 2
src/templets/plus/list_diyform.htm View File

@@ -11,7 +11,6 @@
<script src="<?php echo $cfg_cmsurl;?>/static/js/jquery.min.js"></script>
</head>
<body>
<div class="main mceneter">
<?php include(DEDETEMPLATE."/plus/plus_header.htm") ;?>
<div class="container">
@@ -61,7 +60,7 @@
echo "<tr><td bgcolor='#ffffff'>{$fielddata[0]}</td><td bgcolor='#ffffff'>{$fields[$field]}</td></tr>\r\n";
}
echo '</tbody>';
}else{
} else {
echo "<tr><td bgcolor='#ffffff'>暂无记录</td></tr>";
}
?>


+ 0
- 1
src/templets/plus/showphoto.htm View File

@@ -6,7 +6,6 @@
<link href="<?php echo $cfg_templets_skin; ?>/style/search.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div class="header">
<div class="top">
<h1><a href="<?php echo $cfg_basehost;?>" title="<?php echo $cfg_webname;?>"><img src="<?php echo $cfg_templets_skin; ?>/images/logo.gif" alt=""/></a> </h1>


+ 0
- 1
src/templets/plus/view_diyform.htm View File

@@ -11,7 +11,6 @@
<script src="<?php echo $cfg_cmsurl;?>/static/js/jquery.min.js"></script>
</head>
<body>
<div class="main mceneter">
<?php include(DEDETEMPLATE."/plus/plus_header.htm") ;?>
<div class="container">


Loading…
Cancel
Save