Example #1
0
     $str = "<SPAN class=err>{$strErrPw}</span>";
     $nextAccess = 0;
 } elseif ($admin == $admin_master) {
     $str = "<SPAN class=err>{$strNickNameUserName}</span>";
     $nextAccess = 0;
 } else {
     if (substr($blog_url, strlen($blog_url) - 1, 1) != "/") {
         $blog_url = $blog_url . "/";
     }
     //加载数据
     define('IN_F2BLOG', TRUE);
     define('F2BLOG_ROOT', substr(dirname(__FILE__), 0, -7));
     include '../include/config.php';
     include '../include/db.php';
     include '../include/cache.php';
     $DMC = new F2MysqlClass($DBHost, $DBUser, $DBPass, $DBName);
     $DMC->query("TRUNCATE TABLE `" . $DBPrefix . "members`");
     $DMC->query("INSERT INTO `" . $DBPrefix . "members` (username,password,nickname,email,isHiddenEmail,homePage,lastVisitTime,lastVisitIP,regIp,hashKey,role) VALUES ('{$admin}',md5('{$admin_pw}'),'{$admin_master}','{$admin_email}','1','','" . time() . "','','','','admin')");
     include F2BLOG_ROOT . "./admin/setting_default.php";
     foreach ($arr_setting as $key => $value) {
         $update = "insert into " . $DBPrefix . "setting values" . $value;
         $DMC->query($update);
     }
     settings_recache();
     include_once F2BLOG_ROOT . "./cache/cache_setting.php";
     include_once F2BLOG_ROOT . "./include/language/home/{$settingInfo['language']}.php";
     modules_recache();
     include_once F2BLOG_ROOT . "./cache/cache_modules.php";
     reAllCache();
     $str .= "<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n";
     $str .= "  <tr>\n";
Example #2
0
<?php

@error_reporting(0);
include_once "../../include/config.php";
include_once "../../include/db.php";
// 连结数据库
$DMF = new F2MysqlClass($DBHost, $DBUser, $DBPass, $DBName, $DBNewlink);
$thisid = htmlspecialchars(trim($_REQUEST['voteid']), ENT_QUOTES);
if (is_numeric($thisid) or $thisid == "") {
    if ($thisid == "") {
        $sql = "select * from {$DBPrefix}vote where oorc!='False' order by id desc limit 0,1";
    } else {
        $sql = "select * from {$DBPrefix}vote where id='{$thisid}'";
    }
    $result = $DMF->query($sql);
    $my = mysql_fetch_array($result);
    $thisid = $my['id'];
    $DMF->query("update {$DBPrefix}vote set votevi=votevi+1 where id='{$thisid}'");
    $totOption = 5;
    for ($i = 1; $i < 6; $i++) {
        if ($my['cs_' . $i] == "") {
            $totOption = $i - 1;
            break;
        }
    }
    header('Content-Type: text/xml; charset=utf-8');
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n";
    echo "<vote>\n";
    echo "<system>\n";
    echo "<voteid>";
Example #3
0
<?php

include_once "../../include/config.php";
include_once "../../include/db.php";
// 连结数据库
$DMC = new F2MysqlClass($DBHost, $DBUser, $DBPass, $DBName, $DBNewlink);
$DMC->query("DROP TABLE `{$DBPrefix}music`");
$DMC->query("DROP TABLE `{$DBPrefix}musicclass`");
$DMC->query("DROP TABLE `{$DBPrefix}musicsetting`");
Example #4
0
        $check_update = true;
    } else {
        $check_update = false;
    }
} else {
    $check_update = true;
}
//需要更新
if ($check_update) {
    //输入update.php运行
    if (preg_match("/update.php/is", $_SERVER['PHP_SELF'])) {
        include_once "include/config.php";
        include_once "include/db.php";
        include_once "include/cache.php";
        //连接mysql
        $DMC = new F2MysqlClass($DBHost, $DBUser, $DBPass, $DBName, $DBNewlink);
        $SQL = "select `settValue` from `{$DBPrefix}setting` where `settName`='closeReason' limit 0,1";
        list($strCloseReason) = $DMC->fetchArray($DMC->query($SQL), MYSQL_NUM);
        $SQL = "update `{$DBPrefix}setting` set `settValue`='blog is update system now,plesase wait..' where `settName`='closeReason' ";
        $DMC->query($SQL);
        $SQL = "update `{$DBPrefix}setting` set `settValue`='1' where `settName`='status' ";
        $DMC->query($SQL);
        echo "Start update F2Cont, please wait ... <hr>";
        update_data(true, $DMC);
        echo "<hr>\n";
        echo "Update Success. please delete this update.php <br />\n";
        echo "<a href=index.php>Return Homepage</a>";
        $SQL = "update `{$DBPrefix}setting` set `settValue`='" . $strCloseReason . "' where `settName`='closeReason'";
        $DMC->query($SQL);
        $SQL = "update `{$DBPrefix}setting` set `settValue`='0' where `settName`='status'";
        $DMC->query($SQL);
<?php

@error_reporting(E_ERROR | E_WARNING | E_PARSE);
include_once "../../include/config.php";
include_once "../../include/db.php";
$count = $_POST['count'];
// Á¬½áÊý¾Ý¿â
$DMF = new F2MysqlClass($DBHost, $DBUser, $DBPass, $DBName, $DBNewlink);
//$count=7;
$sql = "select visitDate,visits from " . $DBPrefix . "dailystatistics order by visitDate desc limit {$count}";
$result = $DMF->query($sql);
$i = $count;
while ($data = $DMF->fetchArray($result)) {
    echo "&count{$i}=" . $data[visits];
    echo "&date{$i}=" . str_replace("-", "", $data[visitDate]);
    echo $i--;
}
for ($j = $i; $j > 0; $j--) {
    echo "&count{$j}=0";
    echo "&date{$j}=" . date("Ymd", time() - ($i - $j + 1) * 86400);
    echo $j;
}
Example #6
0
<?php

include_once "../../include/config.php";
include_once "../../include/db.php";
// 连结数据库
$DMC = new F2MysqlClass($DBHost, $DBUser, $DBPass, $DBName, $DBNewlink);
$DMC->query("DROP TABLE `{$DBPrefix}rssblog`");
$DMC->query("DROP TABLE `{$DBPrefix}rssBlog`");
Example #7
0
<?php

@error_reporting(0);
include_once "../../include/config.php";
include_once "../../include/db.php";
include_once "../../include/global.inc.php";
// 连结数据库
$DMF = new F2MysqlClass($DBHost, $DBUser, $DBPass, $DBName, $DBNewlink);
$thisid = trim($_REQUEST['voteid']);
if (is_numeric($thisid)) {
    if ($_COOKIE['vote' . $thisid] == "pubvote_" . $thisid) {
        echo "&back=AL";
    } else {
        setcookie('vote' . $thisid, "pubvote_" . $thisid, time() + 86400 * 365, $cookiepath, $cookiedomain);
        $mychoose = trim($_REQUEST['mychoose']);
        $cs = explode(",", $mychoose);
        for ($i = 0; $i < 5; $i++) {
            if ($cs[$i] == "true") {
                $k = $i + 1;
                $DMF->query("update {$DBPrefix}vote set cs_{$k}_num=cs_{$k}_num+1 where id='{$thisid}'");
            }
        }
        echo "&back=AC";
    }
}