<?php require_once './public/config.inc.php'; require_once './public/mysql_class.php'; require_once './public/page.php'; date_default_timezone_set("PRC"); $DB_site = new DB_Sql_vb(); $DB_site->database = $dbname; $DB_site->server = $dbhost; $DB_site->user = $dbuser; $DB_site->password = $dbpass; $DB_site->reporterror = 0; $DB_site->connect(); $error = $DB_site->errno;
echo "<b class=\"succuss\">连接成功! 数据库存在</b>"; echo "<a class=\"btn1\" href=\"install.php?step=3\">开始导入数据 --></a>"; echo "<a class=\"btn2\" href=\"install.php?step=3&reset=1\">点击这里清空数据库并导入数据 --></a>"; } } else { echo "<p>点击这里继续. 请返回上一步确认您输入的所有资料都正确.</p>"; exit; } } ?> </div> <?php // end step 2 if ($_GET['step'] >= 3) { $DB_site = new DB_Sql_vb(); $DB_site->database = $dbname; $DB_site->server = $dbhost; $DB_site->user = $dbuser; $DB_site->password = $dbpass; $DB_site->connect(); } if ($_GET['step'] == 3) { echo "<div class=\"step3\">"; /** * // ------------------------------ -------- ------------------------------ // * STEP 3 * // ------------------------------ -------- ------------------------------ // */ echo "<div class=\"creat\">"; if ($_GET['reset'] == 1) {
<?php session_start(); require_once 'base.php'; require_once 'vemplator.php'; $t = new vemplator(); $DB_site = new DB_Sql_vb(); $DB_site->database = $dbname; $DB_site->server = $dbhost; $DB_site->user = $dbuser; $DB_site->password = $dbpass; $DB_site->reporterror = 0; $DB_site->connect(); $error = $DB_site->errno; $t = new vemplator(); if (isset($_POST['submit']) && ctype_alnum($_POST['username'])) { $username = empty($_POST['username']) ? '' : trim($_POST['username']); $password = empty($_POST['password']) ? '' : trim($_POST['password']); $sql = "select username,password from {$table1} where username='******'and password='******'"; $DB_site->query($sql); if ($DB_site->num_rows()) { $sid = session_id(); $_SESSION['username'] = $sid; header('Location: index.php'); } else { $message = "登录失败,密码或用户名错!"; $t->assign('message', $message); } } echo $t->output('html/login.html'); include "footer.php";