diff --git a/admin/ajax_link.php b/admin/ajax_link.php index 863ee85..52994ac 100644 --- a/admin/ajax_link.php +++ b/admin/ajax_link.php @@ -19,6 +19,13 @@ switch($submit) { $DB->query($sql); } break; + case 'pwd_link': + //链接加密 + foreach($_POST['links'] as $lk=> $lv) { + $sql = "UPDATE `lylme_links` SET `link_pwd` = '".$_POST['pwd_id']."' WHERE `lylme_links`.`id` = ".$lv.";"; + $DB->query($sql); + } + break; case 'on': //链接启用 foreach($_POST['links'] as $lk=> $lv) { diff --git a/include/go.php b/include/go.php index ed2aad6..ebd9fdb 100644 --- a/include/go.php +++ b/include/go.php @@ -11,7 +11,7 @@ if($_POST['exit']=='exit'){ if($_SESSION['pass'] != 1){ //未登录 $pass = daddslashes($_POST['pass']); - if(!empty()){ + if(!empty($pass)){ //用户提交登录 $show = array(); $pwds = $DB->query("SELECT `pwd_id`, `pwd_key` FROM `lylme_pwd` WHERE `pwd_key` LIKE '".$pass."';");