NothingiLLEGAL
http://forum.nothingillegal.com/forum/

Fantasy Of Lore Files error
http://forum.nothingillegal.com/forum/viewtopic.php?f=26&t=542
Page 1 of 1

Author:  Secret Arts [ Fri Jun 03, 2016 12:51 pm ]
Post subject:  Fantasy Of Lore Files error

HELP !





register error


Image




It looks like


Image






global.php


Code:
<?php
require_once("config.php");
require_once("core.php");

//Template
$Core = new Core();
$Core->connectDB();
$Core->Output = $Core->Template('default');

//Onlines
$Data["Server_Status"] = $Core->DBase("Query", array(0=> "SELECT sum(Count) as Count FROM servers"));
while($Get["Server_Status"] = $Data["Server_Status"]->fetch_object()){
   $Core->Variables["{getOnlines}"] = $Get["Server_Status"]->Count;
}
?>


core.php

Code:
<?php
class Core extends mysqli implements Configurations {
    public $MySQL, $Output, $Variables, $License;
   
    public function Core() {
        $this->MySQL = new stdClass();
        $this->MySQL->Connection = null;
        $this->MySQL->TotalQuery = 0;
        $this->MySQL->Configurations = null;
   }
   
    public function protect($sql) {
        $sql = preg_replace(sql_regcase("/(from|union|select|order by|or|insert|delete|where|drop table|show tables|#|'|`|\"|\*|--|\\\\)/"), "", $sql);
        $sql = trim($sql);
        $sql = strip_tags($sql);
        $sql = addslashes($sql);
        return $sql;
    }
   
    public function Template($temp) {
        $template = "templates/{$temp}.html";

        if (!file_exists($template))
        $this->SystemExit('Template not found: ' . $template, __LINE__, __FILE__);

        $data[0][0] = fopen($template, "r");
        $data[0][1] = fread($data[0][0], filesize($template));
        fclose($data[0][0]);

        return $data[0][1];
    }
   
    public function Content() { 
        $this->Output = empty($this->Variables) ? $this->Output : str_replace(array_keys($this->Variables), array_values($this->Variables), $this->Output);
        print $this->Output;
        exit(0);
    }
   
    public function connectDB() {
        parent::__construct(Configurations::MySQLHost, Configurations::MySQLUser, Configurations::MySQLPass, Configurations::MySQLData);
        if (mysqli_connect_error())
        $this->SystemExit(mysqli_connect_errno() . mysqli_connect_error(), __LINE__, __FILE__);
        else
        $this->MySQL->Connection = true;
    }
   
    public function DBase($type, $params = array()) {
        if (!$this->MySQL->Connection)
        $this->SystemExit('No available MySQLi connection', __LINE__, __FILE__);
       
        switch (strtoupper($type)) {
        case 'QUERY':
            if ($Query = parent::query($params[0])) {
                $this->MySQL->TotalQuery++;
                return $Query;
            } else
            $this->SystemExit('MySQLi failed to query: ' . $params[0], __LINE__, __FILE__);
            break;
        case 'PREPARE':
            if ($Query = parent::prepare($params[0])) {
                $this->MySQL->TotalQuery++;
                return $Query;
            } else
            $this->SystemExit('MySQLi failed to prepare: ' . $params[0], __LINE__, __FILE__);
            break;
        case 'ESCAPESTRING':               
            if ($Escape = parent::real_escape_string($params[0]))
            return $Escape;
            else
            $this->SystemExit('MySQLi failed to escape: ' . $params[0], __LINE__, __FILE__);               
            break;
        }
    }
   
    public function SystemExit($text, $line, $file = null) {
        if (ob_get_level()) ob_end_clean();
        header('Content-Type: text/plain');
        print ("$text - " . date("F j, Y, g:i a"));
        print ("\nLocation: $file ($line)");
      print ("calma calma não criemos panico");
        exit(1);
    }
}
?>

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/