} die(gb2utf8('error <font color=#1F80EF>验证码不正确</font>')); } die(gb2utf8('error <font color=#1F80EF>请不要输入空信息</font>')); } if ($option == 'index') { $smarty->assign('config', array('title' => $config['title'] . "管理员入口", 'keywords' => $config['keywords'] . "管理员入口", 'description' => $config['description'] . "管理员入口")); $smarty->assign('regname', $_COOKIE['regname']); $smarty->assign('rentime', fmicrotime()); $smarty->display("login.htm"); } if ($option == 'sendpwd') { if ($_POST['username'] != '' && $_POST['usermail'] != '') { $sql_login = $GETSQL->fSql("uid,userpwd,mail", "`{$ODBC['tablepre']}members`", "`username`='{$_POST['username']}' AND `mail`='{$_POST['usermail']}'", "", "", "", "U_B"); if ($sql_login['uid'] != '') { $newpwd = md5(fHtmlcode()); $GETSQL->fUpdate("`{$ODBC['tablepre']}members`", "`password`='{$newpwd}'", "`uid`='{$sql_login['uid']}'"); } include_once Getincludefun("mail"); //邮件发送 $mail = new mail(); $mail->setTo("*****@*****.**"); //收件人 //$mail->setCC("b@b.com,c@c.com"); //抄送 //$mail->setCC("d@b.com,e@c.com"); //秘密抄送 $mail->setFrom("*****@*****.**"); //发件人 $mail->setSubject("主题"); //主题 $mail->setText("文本格式"); //发送文本格式也可以是变量
} if ($option == 'sqlbck') { if ($type == 'del') { P_unlink(R_P . "data/{$id}"); die(gb2utf8("删除备份文件成功")); } if ($type == 'into') { Cookie("sql_file", $id); Showmsg("beingto_page", 1, "sqlbck.php"); } $handle = opendir("data"); $i = 0; while ($file = readdir($handle)) { if ($file != "" && $file != '.' && $file != "..") { $filers[$i] = $file; $code = fHtmlcode(); //$ODBC['HTMLcode'] $mu = fencrypt("data", $config['HTMLcode']); $md = md5($code . $config['HTMLcode'] . $file . $mu); $filetime[$i] = date("Y-m-d h:i:s", filemtime(R_P . "data/{$file}")); $down[$i] = "code={$code}&mu={$mu}&file={$file}&md={$md}"; $i++; } } $smarty->assign('sql_rs', $sql_rs); $smarty->assign('filers', $filers); $smarty->assign('down', $down); $smarty->display("sqlbck.htm"); } function fbakouttable($tablename, &$bakupdata) {
die(gb2utf8("error 对不起您没有输入密码")); } } else { die(gb2utf8("error 对不起您没有输入用户名")); } } else { die(gb2utf8("error 对不起您输入的验证码有错误")); } } if ($option == 'sendpwd') { if ($_POST['update'] == 'update') { include_once Getincludefun("mail"); //常用函数 $sql_members = $GETSQL->fSql("uid,username,useremail", "`{$ODBC['tablepre']}members`", "`username`='{$_POST['username']}'", "", "", "", "U_B"); if ($sql_members['useremail'] == $_POST['usermail']) { $newpwd = fHtmlcode(); $GETSQL->fUpdate("`{$ODBC['tablepre']}members`", "`userpwd`='{$newpwd}'", "`uid`='{$sql_members['uid']}'"); $mail = new mail(); $mail->mailTo = $sql_members['useremail']; $mail->mailFrom = $config['mail']; $mail->mailSubject = $config['webname']; $mail->mailText = "您在" . $config['webname'] . "的用户密码更新为:{$newpwd}"; $mail->setTo($sql_members['useremail']); //收件人 $mail->setFrom($config['mail']); //发件人 $mail->setSubject($config['webname']); //主题 $mail->setText("您在" . $config['webname'] . "的用户密码更新为:{$newpwd}"); //发送文本格式也可以是变量 $mail->send();