include "conf/config.inc.php";
include "inc/function.php";
if (function_exists('mb_internal_encoding')){
mb_internal_encoding(__charset_PT_BRA__);
mb_http_output(__charset_PT_BRA__);
mb_http_input(__charset_PT_BRA__);
}
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: Fri, 18 Apr 2008 02:22:06 GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0");
header("Pragma: no-cache");
header("Content-Type: text/html; charset=" . __charset_PT_BRA__ ."",true);
@ini_set('magic_quotes_runtime',false);
if (get_magic_quotes_gpc()) {
function stripslashes_array($array) {
return is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array);
}
$_COOKIE = stripslashes_array($_COOKIE);
$_FILES = stripslashes_array($_FILES);
$_GET = stripslashes_array($_GET);
$_POST = stripslashes_array($_POST);
$_REQUEST = stripslashes_array($_REQUEST);
}
$templine = '';
$tempfile = fopen("tmp/top.php", "r");
while(!feof($tempfile))
{
$templine.=fgets($tempfile, 255);
}
include ($tempinclude);
$top = $templine;
fclose($tempfile);
$templine = '';
//-----------------------------------------------------------
$templine = '';
$tempfile = fopen("tmp/topmenu.php", "r");
while(!feof($tempfile))
{
$templine.=fgets($tempfile, 255);
}
include ($tempinclude);
$topmenu = $templine;
fclose($tempfile);
$templine = '';
//-----------------------------------------------------------
$templine = '';
$tempfile = fopen("tmp/folder.php", "r");
while(!feof($tempfile))
{
$templine.=fgets($tempfile, 255);
}
include ($tempinclude);
$folder = $templine;
fclose($tempfile);
$templine = '';
//-----------------------------------------------------------
$templine = '';
$tempfile = fopen("tmp/menu.php", "r");
while(!feof($tempfile))
{
$templine.=fgets($tempfile, 255);
}
include ($tempinclude);
$menu = $templine;
fclose($tempfile);
$templine = '';
//-----------------------------------------------------------
$id_connect = mysql_connect ("$hostname","$username","$password");
mysql_query('SET NAMES "utf8"', $id_connect);
function purifica($txt)
{
$txt = strtolower($txt);
$txt = eregi_replace('[+]', " ",$txt);
$txt = eregi_replace('[\]', " ",$txt);
$txt = eregi_replace('["]', " ",$txt);
$txt = eregi_replace('[@]', " ",$txt);
$txt = eregi_replace('[!]', " ",$txt);
$txt = eregi_replace('[#]', " ",$txt);
$txt = eregi_replace('[$]', " ",$txt);
$txt = eregi_replace('[%]', " ",$txt);
$txt = eregi_replace('[&]', " ",$txt);
$txt = eregi_replace('[*]', " ",$txt);
$txt = eregi_replace('[(]', " ",$txt);
$txt = eregi_replace('[)]', " ",$txt);
$txt = eregi_replace('[_]', " ",$txt);
$txt = eregi_replace('[/]', " ",$txt);
$txt = eregi_replace('[?]', " ",$txt);
$txt = eregi_replace('[{]', " ",$txt);
$txt = eregi_replace('[}]', " ",$txt);
$txt = eregi_replace('[<]', " ",$txt);
$txt = eregi_replace('[>]', " ",$txt);
$txt = eregi_replace('[:]', " ",$txt);
$txt = eregi_replace('[;]', " ",$txt);
$txt = eregi_replace('^', " ",$txt);
$txt = eregi_replace("[']", " ",$txt);
$txt = eregi_replace('[|]', " ",$txt);
$txt = eregi_replace("[.]", " ",$txt);
$txt = eregi_replace('[,]', " ",$txt);
$txt = trim($txt);
$txt = chop($txt);
$txt = strtr($txt,"ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ,.][","AAAAAAaaaaaaOOOOOOooooooEEEEeeeeCcIIIIiiiiUUUUuuuuyNn " );
$txt = strtolower($txt);
return $txt;
}
function glitter($txt,$gli,$url){
$n = strlen($txt);
for($i=0;$i<$n;$i++){
if($txt[$i] == " "){
//$txt2 .= "";
$txt2 .= "
";
}else{
if($txt[$i] == "m"){
$txt2 .= "";
}else{
$txt2 .= "";
}
}
}
return $txt2;
}
if($_POST["txt"] AND $_POST["gli"]){
$txt = purifica($_POST["txt"]);
$txt = glitter($txt,$_POST["gli"],$root_url);
$tags = "