View file system/inc/system.php

File size: 1.36Kb
<?php
/**********************************
*	@package: PerfCMS			  *
*	@year: 2012					  *
*	@author: Artas				  *
*	@link: http://perfcms.org.ua  *
**********************************/
require_once(SYS .'/inc/db.php');
if (get_magic_quotes_gpc()) {
    $input_data_array = array(& $_GET, & $_POST, & $_COOKIE);
    while (list($k, $v) = each($input_data_array)) {
        foreach ($v as $key => $val) {
            if (!is_array($val)) {
                $input_data_array[$k][$key] = stripslashes($val);
                continue;
            }
            $input_data_array[] = & $input_data_array[$k][$key];
        }
    }
    unset ($input_data_array);
    if (!empty ($_FILES)) {
        foreach ($_FILES as $k => $v) {
            $_FILES[$k]['name'] = stripslashes((string)$v['name']);
        }
    }
}

require_once(SYS .'/inc/functions.php');
require_once(SYS .'/inc/core.php');
require_once(SYS.'/classes/lang.php');
$lang = new Lang();
require_once(SYS .'/inc/const.php');
require_once(SYS.'/classes/template.php');
$tpl = new Template();
require_once(SYS.'/classes/stat.php');
$stat = new Stat();
require_once(SYS.'/classes/paginator.php');
require_once(SYS.'/classes/comments.php');

// автоочистка гостей
$getGuestsNum = $db->query("SELECT * FROM `guests`")->rowCount();
if($getGuestsNum >=50)
{
	$db->query("TRUNCATE TABLE `guests`");
}