@@ -18,7 +18,7 @@ $row = array(); | |||||
if ($dopost == "toadmin") { | if ($dopost == "toadmin") { | ||||
$pwd = trim($pwd); | $pwd = trim($pwd); | ||||
if ($pwd != '' && preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd)) { | if ($pwd != '' && preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd)) { | ||||
ShowMsg('密码不合法,仅限使用[0-9a-zA-Z_@!.-]', '-1'); | |||||
ShowMsg('密码不合法,请使用数字0-9小写a-z大写A-Z符号_@!.-', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); | $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); | ||||
@@ -15,7 +15,7 @@ if (empty($dopost)) $dopost = ''; | |||||
if ($dopost == 'add') { | if ($dopost == 'add') { | ||||
CheckCSRF(); | CheckCSRF(); | ||||
if (preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd) || preg_match("#[^0-9a-zA-Z_@!\.-]#", $userid)) { | if (preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd) || preg_match("#[^0-9a-zA-Z_@!\.-]#", $userid)) { | ||||
ShowMsg('密码或账号不合法,仅限使用[0-9a-zA-Z_@!.-]', '-1'); | |||||
ShowMsg('密码或账号不合法,请使用数字0-9小写a-z大写A-Z符号_@!.-', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); | $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); | ||||
@@ -17,11 +17,11 @@ if ($dopost == 'saveedit') { | |||||
CheckCSRF(); | CheckCSRF(); | ||||
$pwd = trim($pwd); | $pwd = trim($pwd); | ||||
if ($pwd != '' && preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd)) { | if ($pwd != '' && preg_match("#[^0-9a-zA-Z_@!\.-]#", $pwd)) { | ||||
ShowMsg('密码不合法,仅限使用[0-9a-zA-Z_@!.-]', '-1'); | |||||
ShowMsg('密码不合法,请使用数字0-9小写a-z大写A-Z符号_@!.-', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (preg_match("#[^0-9a-zA-Z_@!\.-]#", $userid)) { | if (preg_match("#[^0-9a-zA-Z_@!\.-]#", $userid)) { | ||||
ShowMsg('账号不合法,仅限使用[0-9a-zA-Z_@!.-]', '-1'); | |||||
ShowMsg('账号不合法,请使用数字0-9小写a-z大写A-Z符号_@!.-', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); | $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); | ||||
@@ -37,7 +37,7 @@ | |||||
<td>密码:</td> | <td>密码:</td> | ||||
<td> | <td> | ||||
<input type="text" name="pwd" id="pwd" class="admin-input-sm"> | <input type="text" name="pwd" id="pwd" class="admin-input-sm"> | ||||
<span>(留空则不修改,仅限使用[0-9a-zA-Z_@!.-])</span> | |||||
<span>(留空则不修改,请使用数字0-9小写a-z大写A-Z符号_@!.-)</span> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -31,7 +31,7 @@ | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>密码:</td> | <td>密码:</td> | ||||
<td><input type="text" name="pwd" id="pwd" class="admin-input-sm">(留空则不修改,仅限使用[0-9a-zA-Z_@!.-])</td> | |||||
<td><input type="text" name="pwd" id="pwd" class="admin-input-sm">(留空则不修改,请使用数字0-9小写a-z大写A-Z符号_@!.-)</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>类型:</td> | <td>类型:</td> | ||||
@@ -23,7 +23,7 @@ | |||||
<td width="260">账号:</td> | <td width="260">账号:</td> | ||||
<td> | <td> | ||||
<input type="text" name="userid" id="userid" class="admin-input-sm"> | <input type="text" name="userid" id="userid" class="admin-input-sm"> | ||||
<span>(仅限使用[0-9a-zA-Z_@!.-])</span> | |||||
<span>(请使用数字0-9小写a-z大写A-Z符号_@!.-)</span> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -37,7 +37,7 @@ | |||||
<td>密码:</td> | <td>密码:</td> | ||||
<td> | <td> | ||||
<input type="text" name="pwd" id="pwd" class="admin-input-sm"> | <input type="text" name="pwd" id="pwd" class="admin-input-sm"> | ||||
<span>(仅限使用[0-9a-zA-Z_@!.-])</span> | |||||
<span>(请使用数字0-9小写a-z大写A-Z符号_@!.-)</span> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -33,7 +33,7 @@ | |||||
<td>密码:</td> | <td>密码:</td> | ||||
<td> | <td> | ||||
<input type="text" name="pwd" id="pwd" class="admin-input-sm"> | <input type="text" name="pwd" id="pwd" class="admin-input-sm"> | ||||
<span>(留空则不修改,仅限使用[0-9a-zA-Z_@!.-])</span> | |||||
<span>(留空则不修改,请使用数字0-9小写a-z大写A-Z符号_@!.-)</span> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -41,8 +41,6 @@ | |||||
<input type="hidden" name="step" value="2"> | <input type="hidden" name="step" value="2"> | ||||
<input type="hidden" name="cookieencode" value="<?php echo $rnd_cookieEncode;?>"> | <input type="hidden" name="cookieencode" value="<?php echo $rnd_cookieEncode;?>"> | ||||
<input type="hidden" name="adminmail" value="admin@dedebiz.com"> | <input type="hidden" name="adminmail" value="admin@dedebiz.com"> | ||||
<legend class="text-success">数据库设置</legend> | |||||
<hr> | |||||
<div class="form-group"> | <div class="form-group"> | ||||
<label for="dbtype" class="form-label">数据库类型</label> | <label for="dbtype" class="form-label">数据库类型</label> | ||||
<select id="dbtype" name="dbtype" class="form-control form-select"> | <select id="dbtype" name="dbtype" class="form-control form-select"> | ||||
@@ -56,7 +54,7 @@ | |||||
<input type="text" name="dbhost" id="dbhost" class="form-control" placeholder="localhost"> | <input type="text" name="dbhost" id="dbhost" class="form-control" placeholder="localhost"> | ||||
</div> | </div> | ||||
<div class="form-group server"> | <div class="form-group server"> | ||||
<label for="dbuser" class="form-label">数据库用户名</label> | |||||
<label for="dbuser" class="form-label">数据库账号</label> | |||||
<input type="text" name="dbuser" id="dbuser" class="form-control" placeholder="root"> | <input type="text" name="dbuser" id="dbuser" class="form-control" placeholder="root"> | ||||
</div> | </div> | ||||
<div class="form-group server"> | <div class="form-group server"> | ||||
@@ -76,10 +74,8 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div id="alertConnect"></div> | <div id="alertConnect"></div> | ||||
<legend class="text-success">站点设置</legend> | |||||
<hr> | |||||
<div class="form-group"> | <div class="form-group"> | ||||
<label for="baseurl" class="form-label">网站网址</label> | |||||
<label for="baseurl" class="form-label">网站地址</label> | |||||
<input type="text" name="baseurl" id="baseurl" class="form-control" placeholder="<?php echo $baseurl;?>"> | <input type="text" name="baseurl" id="baseurl" class="form-control" placeholder="<?php echo $baseurl;?>"> | ||||
</div> | </div> | ||||
<div class="form-group"> | <div class="form-group"> | ||||
@@ -89,12 +85,12 @@ | |||||
<div class="form-group"> | <div class="form-group"> | ||||
<label for="adminuser" class="form-label">管理员账号</label> | <label for="adminuser" class="form-label">管理员账号</label> | ||||
<input type="text" name="adminuser" id="adminuser" class="form-control" placeholder="admin"> | <input type="text" name="adminuser" id="adminuser" class="form-control" placeholder="admin"> | ||||
<div class="form-text">仅限使用[0-9a-zA-Z_@!.-]</div> | |||||
<div class="form-text">请使用数字0-9小写a-z大写A-Z符号_@!.-</div> | |||||
</div> | </div> | ||||
<div class="form-group"> | <div class="form-group"> | ||||
<label for="adminpwd" class="form-label">管理员密码</label> | <label for="adminpwd" class="form-label">管理员密码</label> | ||||
<input type="text" name="adminpwd" id="adminpwd" class="form-control" placeholder="admin"> | <input type="text" name="adminpwd" id="adminpwd" class="form-control" placeholder="admin"> | ||||
<div class="form-text">仅限使用[0-9a-zA-Z_@!.-]</div> | |||||
<div class="form-text">请使用数字0-9小写a-z大写A-Z符号_@!.-</div> | |||||
</div> | </div> | ||||
<div class="text-right"><button type="submit" class="btn btn-success">安装</button></div> | <div class="text-right"><button type="submit" class="btn btn-success">安装</button></div> | ||||
</form> | </form> | ||||
@@ -25,8 +25,8 @@ textarea{padding:0.375rem 0.75rem;color:var(--gray);background:var(--white);bord | |||||
input:focus,select:focus,textarea:focus{color:var(--gray);background:var(--white);border-color:var(--blue-300);box-shadow:0 0 0 0.2rem rgba(0,123,255,0.25);outline:0} | input:focus,select:focus,textarea:focus{color:var(--gray);background:var(--white);border-color:var(--blue-300);box-shadow:0 0 0 0.2rem rgba(0,123,255,0.25);outline:0} | ||||
.install-box{margin:0 auto;width:800px} | .install-box{margin:0 auto;width:800px} | ||||
.install-box .card-header,.install-box .card-body{padding:1.25rem} | .install-box .card-header,.install-box .card-body{padding:1.25rem} | ||||
.install-box h1,.install-box legend{margin:0;line-height:1.2;font-size:18px;font-weight:600;color:var(--gray-dark)} | |||||
.install-box label,.login-box label{margin-bottom:5px} | |||||
.install-box h1{margin:0;line-height:1.2;font-size:18px;font-weight:600;color:var(--gray-dark)} | |||||
.install-box label,.login-box label{margin-bottom:0.25rem} | |||||
.install-box .form-control,.login-box .form-control{height:36px} | .install-box .form-control,.login-box .form-control{height:36px} | ||||
.login-head{padding:1rem 0;background:var(--white)} | .login-head{padding:1rem 0;background:var(--white)} | ||||
.login-head .logo{font-size:18px;font-weight:600;color:var(--gray-dark)} | .login-head .logo{font-size:18px;font-weight:600;color:var(--gray-dark)} | ||||
@@ -45,7 +45,7 @@ function CheckUserID($uid, $msgtitle = '账号', $ckhas = TRUE) | |||||
} | } | ||||
} else { | } else { | ||||
if (preg_match("/[^0-9a-z@\.-]/i", $ck_uid[$i])) { | if (preg_match("/[^0-9a-z@\.-]/i", $ck_uid[$i])) { | ||||
return $msgtitle.'仅限使用[0-9a-zA-Z_@!.-]'; | |||||
return $msgtitle.'请使用数字0-9小写a-z大写A-Z符号_@!.-'; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -48,7 +48,7 @@ if ($step == 1) { | |||||
exit(); | exit(); | ||||
} | } | ||||
if (preg_match("#[^0-9a-zA-Z_@!\.-]#", $userid)) { | if (preg_match("#[^0-9a-zA-Z_@!\.-]#", $userid)) { | ||||
ShowMsg('账号不合法,仅限使用[0-9a-zA-Z_@!.-]', '-1'); | |||||
ShowMsg('账号不合法,请使用数字0-9小写a-z大写A-Z符号_@!.-', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
if ($pwdc != $pwd) { | if ($pwdc != $pwd) { | ||||