Exemple #1
0
 if ($open_file) {
     while (!feof($open_file)) {
         $data = fgets($open_file, 50);
         @($file .= $data);
     }
     require '_config.php';
     require 'system/query.php';
     $db = new FQuery();
     $db->connect();
     $mod = explode("--", $file);
     $go = null;
     foreach ($mod as $val) {
         $val = str_replace("db_prefix_", FDBPrefix, $val);
         $val = str_replace("_site_title", "{$_POST['site']}", $val);
         $val = str_replace("_site_desc", "{$_POST['desc']}", $val);
         $go = $db->query("{$val}");
     }
     fclose($open_file);
 }
 if ($go) {
     notice('success', "SQL Query successfully!", 3);
     refresh();
 }
 if (preg_match('/^.+@.+\\..+$/', $_POST['email'])) {
     $qr = $db->insert(FDBPrefix . 'user', array("", "{$_POST['username']}", "Administrator", MD5("{$_POST['userpass']}"), "{$_POST['email']}", "1", "1", date('Y-m-d H:i:s'), date('Y-m-d H:i:s'), ""));
     if ($qr) {
         $_SESSION['user'] = "******";
         $_SESSION['host'] = "";
         $_SESSION['success'] = 1;
     }
 } else {
Exemple #2
0
    if (empty($unique)) {
        $uniqueVisitor .= 0;
    } else {
        if ($x != $d14) {
            $uniqueVisitor .= $unique;
        }
    }
    if ($x != 0 and $x != $d14) {
        $uniqueVisitor .= ",";
    }
}
for ($x = $d13; $x >= 0; $x--) {
    $dtz = date('Y-m-d 00:00:00', strtotime("-{$x} days"));
    $t = $x - 1;
    $dtf = date('Y-m-d 00:00:00', strtotime("-{$t} days"));
    $sql = $db->query("select COUNT( DISTINCT ip )  AS q FROM " . FDBPrefix . "statistic WHERE time BETWEEN '{$dtz}' AND '{$dtf}'");
    $row = mysql_fetch_array($sql);
    if (empty($row['q'])) {
        $newVisitor .= 0;
    } else {
        $newVisitor .= $row['q'];
    }
    if ($x != 0) {
        $newVisitor .= ",";
    }
}
$date = date("d-m-Y", strtotime("-{$d13} days"));
$D = substr($date, 0, 2);
$M = substr($date, 3, 2) - 1;
$Y = substr($date, 6, 4);
?>