Index  •   DF Generator  •   MQ Generator  •    

It is currently Sun Oct 22, 2017 12:54 pm
LOG IN TO SEE THE REST OF THE FORUMS






Post new topic Reply to topic  [ 1 post ] 
 Fantasy Of Lore Files error 
Author Message
 Post subject: Fantasy Of Lore Files error
PostPosted: Fri Jun 03, 2016 12:51 pm 
User avatar

Joined: Fri Mar 06, 2015 18:20 pm
Posts: 92
Reply with quote
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);
    }
}
?>


Offline
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 




 Who is online 

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: