示例#1
0
<?php

require dirname(__FILE__) . "/global.php";
$DB->connect($mysql_host, $mysql_user, $mysql_pass, $mysql_dbname);
$where = "";
if (isset($_GET['te'], $_GET['wd']) && !empty($_GET['wd'])) {
    $keyword = strAddslashes(strtolower(trim($_GET['wd'])));
    if ($_GET['te'] == "uid" && is_numeric($keyword) && $keyword >= 1) {
        $where = "WHERE `uid` = " . $keyword;
    }
    if ($_GET['te'] == "name") {
        $where = "WHERE lower(`name`) LIKE '" . $keyword . "%'";
    }
    if ($_GET['te'] == "email" && emailcheck($keyword)) {
        $where = "WHERE `email` = '" . $keyword . "'";
    }
}
$MemberArr = $QA->getMember($where, $page, 30);
$DB->close();
unset($DB, $QA);
$tmp =& myTpl("user_list.html");
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('MemberArr', $MemberArr);
$tmp->output();
示例#2
0
require dirname(__FILE__) . "/global.php";
$DB->connect($mysql_host, $mysql_user, $mysql_pass, $mysql_dbname);
if (isset($_POST['deleteId']) && !empty($_POST['deleteId'])) {
    $deleteId = $_POST['deleteId'];
    if (count(explode(",", $deleteId)) > 1) {
        $D = "IN (" . $deleteId . ")";
    } else {
        $D = "= " . $deleteId;
    }
    $DB->query("DELETE FROM `" . $table_topic . "` WHERE `tid` " . $D);
    $DB->query("DELETE FROM `" . $table_post . "` WHERE `tid` " . $D);
    $DB->query("DELETE FROM `" . $table_post2 . "` WHERE `tid` " . $D);
    $DB->close();
    echo "1";
    exit;
}
$where = "";
if (isset($_GET['wd']) && !empty($_GET['wd'])) {
    $where = "WHERE `subject` LIKE '" . trim(filterCode($_GET['wd'])) . "%'";
}
$topicArr = $QA->getTopic($where, $page, "30");
$DB->close();
unset($DB, $QA);
$tmp =& myTpl("topic_list.html");
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('topicArr', $topicArr);
$tmp->output();
示例#3
0
        $config_str .= '$smtp_password			= "******";';
        $config_str .= "\n";
        $config_str .= '?>';
        $configFile = dirname(__FILE__) . "/../database/config_mail.php";
        if (@is_writable($configFile)) {
            $handle = @fopen($configFile, 'w');
            if (@flock($handle, LOCK_EX)) {
                @fwrite($handle, $config_str);
                @flock($handle, LOCK_UN);
            }
            @fclose($handle);
            die("<script>alert('修改成功');</script>");
        } else {
            die("<script>alert('config_mail.php 文件不可写');</script>");
        }
    }
}
$tmp =& myTpl("set_mail.html");
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('mailType', $mail_send_type);
$tmp->assign('sendEmail', $send_email_address);
$tmp->assign('smtpServer', $smtp_server);
$tmp->assign('smtpPort', $smtp_port);
$tmp->assign('smtpAuth', $smtp_auth);
$tmp->assign('smtpUser', $smtp_user);
$tmp->assign('smtpPassword', $smtp_password);
$tmp->output();
示例#4
0
    }
    $Tables = substr($Tables, 0, -1);
    if ($_POST['ActionType'] == 1) {
        $ActionSql = "OPTIMIZE TABLE " . $Tables;
    }
    if ($_POST['ActionType'] == 2) {
        $ActionSql = "REPAIR TABLE " . $Tables;
    }
    $DB->connect($mysql_host, $mysql_user, $mysql_pass, $mysql_dbname, '');
    $DB->query($ActionSql);
    $DB->close();
    die("<script>alert('操作成功');</script>");
}
$DB->connect($mysql_host, $mysql_user, $mysql_pass, $mysql_dbname, '');
$dbTable = $DB->fetch_all("SHOW TABLE STATUS");
$DB->close();
$mysqlTable = array();
foreach ($dbTable as $table) {
    if (substr($table['Name'], 0, strlen($mysql_prefix)) == $mysql_prefix) {
        $mysqlTable[] = array("Name" => $table['Name'], "Comment" => $table['Comment'], "Rows" => $table['Rows'], "Index_length" => filesize_format($table['Index_length']), "Data_length" => filesize_format($table['Data_length']));
    }
}
$tmp =& myTpl("db_manage.html");
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('dbBakPath', $dbBakPath);
$tmp->assign('dbTable', $mysqlTable);
$tmp->output();
<?php

require dirname(__FILE__) . "/global.php";
$DB->connect($mysql_host, $mysql_user, $mysql_pass, $mysql_dbname);
if (isset($_POST['fid'], $_POST['aid']) && is_numeric($_POST['fid'])) {
    if ($_POST['aid'] == "1") {
        $updateArr['cid'] = $DB->fetch_one("SELECT `cid` FROM `" . $table_class . "` WHERE `fid`=" . $_POST['fid']);
        if ($DB->query($DB->update_sql("`" . $table_forum . "`", $updateArr, "`fid`=" . $_POST['fid']))) {
            $DB->query("DELETE FROM `" . $table_class . "` WHERE `fid`=" . $_POST['fid']);
        }
    }
    if ($_POST['aid'] == "0") {
        $DB->query("DELETE FROM `" . $table_class . "` WHERE `fid`=" . $_POST['fid']);
    }
    $DB->close();
    echo "1";
    exit;
}
$forumArr = $QA->getForumCategory($page, "30");
$DB->close();
unset($DB, $QA);
$tmp =& myTpl("forum_category.html");
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('forumArr', $forumArr);
$tmp->output();
示例#6
0
        $filterWords = array();
        $IdNum = count($_POST['ID']) - 1;
        for ($i = 0; $i <= $IdNum; $i++) {
            $OldWord = strAddslashes(trim($_POST['OLD'][$i]));
            $NewWord = strAddslashes(trim($_POST['NEW'][$i]));
            if (!empty($OldWord) && !empty($NewWord)) {
                $filterWords[] = array($OldWord, $NewWord);
            }
        }
        if (@is_writable($dbFile)) {
            $handle = @fopen($dbFile, 'w');
            if (@flock($handle, LOCK_EX)) {
                @fwrite($handle, '<?php exit;?>' . serialize($filterWords));
                @flock($handle, LOCK_UN);
            }
            @fclose($handle);
            die("<script>alert('更新成功');</script>");
        } else {
            die("<script>alert('数据文件不可写');</script>");
        }
    }
}
$filterWords = unserialize(substr(file_get_contents($dbFile), 13));
$tmp =& myTpl("set_filter.html");
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('filterWords', $filterWords);
$tmp->output();
示例#7
0
            if ($i == $IdNum) {
                $config_str .= "\n";
            } else {
                $config_str .= ",\n\n";
            }
        }
        $config_str .= ");";
        $config_str .= "\n";
        $config_str .= "?>";
        $configFile = dirname(__FILE__) . "/../database/config_group.php";
        if (@is_writable($configFile)) {
            $handle = @fopen($configFile, 'w');
            if (@flock($handle, LOCK_EX)) {
                @fwrite($handle, $config_str);
                @flock($handle, LOCK_UN);
            }
            @fclose($handle);
            die("<script>alert('修改成功');top.location.reload();</script>");
        } else {
            die("<script>alert('config_group.php 文件不可写');</script>");
        }
    }
}
$tmp =& myTpl("user_group.html");
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('userGroup', $userGroup);
$tmp->output();
示例#8
0
                $master = $applyArr['uid'] . "," . $applyArr['uname'];
            } else {
                $master .= $applyArr['uid'] . "," . $applyArr['uname'];
            }
            if ($DB->query("UPDATE `" . $table_forum . "` SET `moderator`='" . $master . "' WHERE `fid`=" . $applyArr['fid'])) {
                if ($DB->fetch_one("SELECT `groupid` FROM `" . $table_member . "` WHERE `uid`=" . $applyArr['uid']) < 4) {
                    $DB->query("UPDATE `" . $table_member . "` SET `groupid`=4 WHERE `uid`=" . $applyArr['uid']);
                }
                $DB->query("UPDATE `" . $table_apply . "` SET `dispose`=1 WHERE `aid`=" . $_POST['Id']);
                echo "1";
            }
        }
    }
    $DB->close();
    exit;
}
$where = "WHERE `type`=1 AND `dispose`=0";
if (isset($_GET['list']) && $_GET['list'] == "resign") {
    $where = "WHERE `type`=0 AND `dispose`=0";
}
$applyArr = $QA->getApply($where, $page, "30");
$DB->close();
unset($DB, $QA);
$tmp =& myTpl("bm_apply.html");
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('applyArr', $applyArr);
$tmp->output();
示例#9
0
                $DB->query($sql);
                $sql = "";
            } else {
                if (!ereg("^(//|--)", $line)) {
                    $sql .= $line;
                }
            }
        }
        $DB->close();
        fclose($fp);
        die("<script>alert('还原成功');</script>");
    }
}
$sqlFileArr = array();
if ($handle = @opendir($dbBakPath)) {
    while (($file = readdir($handle)) !== false) {
        $fileType = strtolower(strrchr($dbBakPath . $file, "."));
        if ($fileType == ".sql") {
            $sqlFileArr[] = array("file" => $file, "size" => filesize_format(filesize($dbBakPath . $file)), "time" => date('Y-m-d H:i:s', filectime($dbBakPath . $file)));
        }
    }
    closedir($handle);
}
$tmp =& myTpl("db_import.html");
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('sqlFile', $sqlFileArr);
$tmp->output();
示例#10
0
    $config_str .= '$cookie_domain		= "' . $cookie_domain . '";';
    $config_str .= "\n\n";
    $config_str .= '$cookie_key_login	= "******";';
    $config_str .= "\n\n";
    $config_str .= '$cookie_key_admin	= "' . $cookie_key_admin . '";';
    $config_str .= "\n";
    $config_str .= '?>';
    $configFile = dirname(__FILE__) . "/../database/config_secure.php";
    if (@is_writable($configFile)) {
        $handle = @fopen($configFile, 'w');
        if (@flock($handle, LOCK_EX)) {
            @fwrite($handle, $config_str);
            @flock($handle, LOCK_UN);
        }
        @fclose($handle);
        die("<script>alert('更新成功');top.location.href='../login.php?do=logout';</script>");
    } else {
        die("<script>alert('config_secure.php 文件不可写');</script>");
    }
}
$tmp =& myTpl("set_secure.html");
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('cookie_path', $cookie_path);
$tmp->assign('cookie_domain', $cookie_domain);
$tmp->assign('cookie_key_login', $cookie_key_login);
$tmp->assign('cookie_key_admin', $cookie_key_admin);
$tmp->output();
示例#11
0
    echo "1";
    exit;
}
if (isset($_POST['uid'], $_POST['uname']) && is_numeric($_POST['uid']) && !empty($_POST['uname'])) {
    if ($_POST['uid'] > 0) {
        $DB->query("DELETE FROM `" . $table_black . "` WHERE `uid`=" . $_POST['uid']);
    } else {
        $DB->query("DELETE FROM `" . $table_black . "` WHERE `uname`='" . $_POST['uname'] . "'");
    }
    $blackInfo['fid'] = 0;
    $blackInfo['uid'] = $_POST['uid'];
    $blackInfo['uname'] = $_POST['uname'];
    $blackInfo['dateline'] = time();
    $blackInfo['adminid'] = $_COOKIE['userId'];
    $blackInfo['adminname'] = $_COOKIE['userName'];
    $DB->query($DB->insert_sql("`" . $table_black . "`", $blackInfo));
    $DB->close();
    echo "1";
    exit;
}
$blackListArr = $QA->getBlackList("", "", $page, 30);
$DB->close();
unset($DB, $QA);
$tmp =& myTpl("user_black.html");
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('blackListArr', $blackListArr);
$tmp->output();
示例#12
0
        $forumArr = $DB->fetch_one_array("SELECT `name`,`synopsis` FROM `" . $table_temp . "` WHERE `fid`=" . $_POST['forumId']);
        if (!empty($forumArr['name'])) {
            $infoArr['cid'] = "0";
            $infoArr['name'] = $forumArr['name'];
            $infoArr['synopsis'] = $forumArr['synopsis'];
            $infoArr['moderator'] = "";
            $infoArr['friend'] = "";
            if ($DB->fetch_one("SELECT COUNT(`fid`) FROM `" . $table_forum . "` WHERE `name`='" . $forumArr['name'] . "'") == 0) {
                $DB->query($DB->insert_sql("`" . $table_forum . "`", $infoArr));
            }
        }
    }
    $DB->query("DELETE FROM `" . $table_temp . "` WHERE `fid`=" . $_POST['forumId']);
    $DB->close();
    die("1");
}
$where = "";
if (isset($_GET['name']) && !empty($_GET['name'])) {
    $where = "WHERE lower(`name`) LIKE '" . trim(strtolower(strAddslashes($_GET['name']))) . "%'";
}
$forumArr = $QA->getForumTemp($where, $page, "30");
$DB->close();
unset($DB, $QA);
$tmp =& myTpl("forum_temp.html");
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('forumArr', $forumArr);
$tmp->output();
示例#13
0
    $config_str .= '?>';
    $configFile = dirname(__FILE__) . "/../database/config_site.php";
    if (@is_writable($configFile)) {
        $handle = @fopen($configFile, 'w');
        if (@flock($handle, LOCK_EX)) {
            @fwrite($handle, $config_str);
            @flock($handle, LOCK_UN);
        }
        @fclose($handle);
        die("<script>alert('修改成功');</script>");
    } else {
        die("<script>alert('config_site.php 文件不可写');</script>");
    }
}
$timeZoneArr = unserialize(substr(file_get_contents("./include/db.zone.php"), 13));
$tmp =& myTpl("set_site.html");
$tmp->assign('timeZone', $timeZoneArr);
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('siteRewrite', $site_rewrite);
$tmp->assign('siteIcp', $site_icp);
$tmp->assign('siteTimezone', $site_timezone);
$tmp->assign('createAllow', $create_allow);
$tmp->assign('cacheLifetime', $cache_lifetime);
$tmp->assign('perTopic', $per_topic_num);
$tmp->assign('perPost', $per_post_num);
$tmp->assign('postAnonymous', $post_anonymous);
$tmp->assign('integralTopic', $integral_topic);
示例#14
0
                            }
                            if ($push == 2) {
                                $forumInfo['commend'] = time();
                            }
                        }
                        if ($DB->query($DB->update_sql("`" . $table_forum . "`", $forumInfo, "`fid`=" . $forumArr['fid']))) {
                            echo "<script>alert('修改成功!');top.location.reload();</script>";
                        } else {
                            echo "<script>alert('数据库繁忙,请重新提交!');</script>";
                        }
                    }
                }
            }
        } else {
            $category = $QA->getCategory();
            $tmp =& myTpl("forum_edit.html");
            $tmp->assign('codeName', $code_name);
            $tmp->assign('codeVersion', $code_version);
            $tmp->assign('siteName', $site_name);
            $tmp->assign('siteDomain', $site_domain);
            $tmp->assign('siteCatalog', $site_catalog);
            $tmp->assign('forumArr', $forumArr);
            $tmp->assign('category', $category);
            $tmp->output();
        }
    } else {
        echo "<script>top.location.href='./forum_list.php';</script>";
    }
    $DB->close();
    unset($DB, $QA);
} else {
示例#15
0
<?php

require dirname(__FILE__) . "/global.php";
$DB->connect($mysql_host, $mysql_user, $mysql_pass, $mysql_dbname);
if (isset($_POST['id'], $_POST['do']) && is_numeric($_POST['id']) && $_POST['do'] == "delete") {
    $DB->query("DELETE FROM `" . $table_report . "` WHERE `rid`=" . $_POST['id']);
    echo "1";
} else {
    $reportArr = $QA->getReport($page, "30");
    $tmp =& myTpl("report_list.html");
    $tmp->assign('codeName', $code_name);
    $tmp->assign('codeVersion', $code_version);
    $tmp->assign('siteName', $site_name);
    $tmp->assign('siteDomain', $site_domain);
    $tmp->assign('siteCatalog', $site_catalog);
    $tmp->assign('reportArr', $reportArr);
    $tmp->output();
}
$DB->close();
unset($DB, $QA);
示例#16
0
            $siteName = stripslashes(trim($_POST['NAME'][$i]));
            $siteUrl = stripslashes(trim($_POST['URL'][$i]));
            if (!empty($siteName) && !empty($siteUrl)) {
                if (!wordCheck($siteName)) {
                    die("<script>alert('网站名称不合法');</script>");
                }
                $friendLink[] = array("name" => $siteName, "url" => $siteUrl);
            }
        }
        if (@is_writable($dbFile)) {
            $handle = @fopen($dbFile, 'w');
            if (@flock($handle, LOCK_EX)) {
                @fwrite($handle, '<?php exit;?>' . serialize($friendLink));
                @flock($handle, LOCK_UN);
            }
            @fclose($handle);
            die("<script>alert('更新成功');</script>");
        } else {
            die("<script>alert('数据文件不可写');</script>");
        }
    }
}
$friendLink = unserialize(substr(file_get_contents($dbFile), 13));
$tmp =& myTpl("set_links.html");
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('friendLink', $friendLink);
$tmp->output();
示例#17
0
<?php

require dirname(__FILE__) . "/global.php";
if (isset($_GET['do']) && $_GET['do'] == "logout") {
    setcookie("adminSecure", "", time() - 36000, $cookie_path, $cookie_domain);
    header("location:../");
    exit;
}
$DB->connect($mysql_host, $mysql_user, $mysql_pass, $mysql_dbname, '');
$mysql_version = $DB->version();
$dbsize = 0;
$tables = $DB->fetch_all("SHOW TABLE STATUS");
foreach ($tables as $table) {
    if (substr($table['Name'], 0, strlen($mysql_prefix)) == $mysql_prefix) {
        $dbsize += $table['Data_length'] + $table['Index_length'];
    }
}
$DB->close();
$systemInfo = array("root" => isset($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : '', "os" => PHP_OS, "web" => explode("/", $_SERVER['SERVER_SOFTWARE']), "php" => PHP_VERSION, "mysql" => $mysql_version, "dbsize" => filesize_format($dbsize));
$tmp =& myTpl("index.html");
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('systemInfo', $systemInfo);
$tmp->output();
示例#18
0
<?php

require dirname(__FILE__) . "/global.php";
$DB->connect($mysql_host, $mysql_user, $mysql_pass, $mysql_dbname);
$where1 = "";
$where2 = "";
if (isset($_GET['name']) && !empty($_GET['name'])) {
    $name = trim(strtolower(strAddslashes($_GET['name'])));
    $where1 = "WHERE lower(`name`) LIKE '" . $name . "%'";
    $where2 = "WHERE lower(I.`name`) LIKE '" . $name . "%'";
}
$forumArr = $QA->getForumList($where1, $where2, $page, "30");
$DB->close();
unset($DB, $QA);
$tmp =& myTpl("forum_list.html");
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('forumArr', $forumArr);
$tmp->output();
示例#19
0
        if ($fatherId > 0 && $DB->fetch_one("SELECT COUNT(`cid`) FROM `" . $table_catalog . "` WHERE `cid`=" . $fatherId) < 1) {
            echo "<script>alert('上级目录不存在');</script>";
        } else {
            $infoArr['fatherid'] = $fatherId;
            $infoArr['name'] = $name;
            if (empty($cid)) {
                $Sql = $DB->insert_sql("`" . $table_catalog . "`", $infoArr);
            } else {
                $Sql = $DB->update_sql("`" . $table_catalog . "`", $infoArr, "`cid`=" . $cid);
            }
            if ($DB->query($Sql)) {
                echo "<script>alert('操作成功');top.location.reload();</script>";
            } else {
                echo "<script>alert('数据库繁忙');</script>";
            }
        }
    }
    $DB->close();
    exit;
}
$category = $QA->getCategory();
$DB->close();
unset($DB, $QA);
$tmp =& myTpl("category.html");
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('category', $category);
$tmp->output();
示例#20
0
                }
            }
            if ($_POST['usergroup'] == 4) {
                if ($DB->fetch_one($checkSql) < 1) {
                    $DB->close();
                    die("该用户没有管理任何吧,不能成为吧主!");
                }
            }
            $userInfo['groupid'] = $_POST['usergroup'];
            $userInfo['integral'] = intval($_POST['userintegral']);
            if ($DB->query($DB->update_sql("`" . $table_member . "`", $userInfo, "`uid`=" . $userArr['uid']))) {
                echo "修改成功!";
            } else {
                echo "数据库繁忙,请重新提交!";
            }
        } else {
            $tmp =& myTpl("user_edit.html");
            $tmp->assign('codeName', $code_name);
            $tmp->assign('codeVersion', $code_version);
            $tmp->assign('siteName', $site_name);
            $tmp->assign('siteDomain', $site_domain);
            $tmp->assign('siteCatalog', $site_catalog);
            $tmp->assign('userGroup', $userGroup);
            $tmp->assign('userArr', $userArr);
            $tmp->output();
        }
    }
    $DB->close();
} else {
    echo "<script>top.location.href='./user_list.php';</script>";
}
示例#21
0
            if (@flock($handle, LOCK_EX)) {
                @fwrite($handle, $config_str);
                @flock($handle, LOCK_UN);
            }
            @fclose($handle);
            die("<script>alert('设置成功');</script>");
        } else {
            die("<script>alert('配置文件不可写');</script>");
        }
    } else {
        die("<script>alert('目录操作失败');</script>");
    }
}
$DB->connect($mysql_host, $mysql_user, $mysql_pass, $mysql_dbname, '');
$dbTable = $DB->fetch_all("SHOW TABLE STATUS");
$DB->close();
$mysqlTable = array();
foreach ($dbTable as $table) {
    if (substr($table['Name'], 0, strlen($mysql_prefix)) == $mysql_prefix) {
        $mysqlTable[] = array("Name" => $table['Name'], "Comment" => $table['Comment'], "Rows" => $table['Rows'], "Data_length" => filesize_format($table['Data_length']));
    }
}
$tmp =& myTpl("db_export.html");
$tmp->assign('codeName', $code_name);
$tmp->assign('codeVersion', $code_version);
$tmp->assign('siteName', $site_name);
$tmp->assign('siteDomain', $site_domain);
$tmp->assign('siteCatalog', $site_catalog);
$tmp->assign('dbBakDir', $dbBakDir);
$tmp->assign('dbTable', $mysqlTable);
$tmp->output();