Ver Mensaje Individual
Antiguo 13/10/2010, 00:35   #13
komas
Moderador
 
Avatar de komas
 
Fecha de ingreso: 09/mar/2006
Mensajes: 6.579
komas Leyenda viva del forokomas Leyenda viva del forokomas Leyenda viva del forokomas Leyenda viva del forokomas Leyenda viva del forokomas Leyenda viva del forokomas Leyenda viva del forokomas Leyenda viva del forokomas Leyenda viva del forokomas Leyenda viva del forokomas Leyenda viva del foro
Include

[php]
if (phpversion() <= "4.0.6"){
$_ENV = $HTTP_ENV_VARS;
$_GET = $HTTP_GET_VARS;
$_POST = $HTTP_POST_VARS;
$_SERVER = $HTTP_SERVER_VARS;
};

if (!isset($_SERVER["REQUEST_URI"])) $_SERVER["REQUEST_URI"] = (isset($_SERVER["QUERY_STRING"]))? "{$_SERVER["SCRIPT_NAME"]}?{$_SERVER["QUERY_STRING"]}" : $_SERVER["SCRIPT_NAME"];

function getsession($key){
if (phpversion() > "4.0.6") RETURN $_SESSION[$key];
else{
global $HTTP_SESSION_VARS;
return $HTTP_SESSION_VARS[$key];
};
};
function setsession($key,$value){
if (phpversion() > "4.0.6") $_SESSION[$key] = $value;
else{
global $HTTP_SESSION_VARS;
$HTTP_SESSION_VARS[$key] = $value;
};
};

function array_stripslashes($string){
if (is_array($string)){
foreach ($string as $key=>$value) $string[$key] = array_stripslashes($value);
}else{
$string = stripslashes($string);
};
return $string;
};
if (get_magic_quotes_gpc()){
$_GET = array_stripslashes($_GET);
$_POST = array_stripslashes($_POST);
if (phpversion() > "4.0.6") $_COOKIE = array_stripslashes($_COOKIE);
else $_HTTP_COOKIE_VARS = array_stripslashes($_HTTP_COOKIE_VARS);
};
if (@count($_GET)) extract($_GET);
if (@count($_POST)) extract($_POST);

ini_set("register_globals", "Off");
$dir = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$dir = substr($dir,0,strrpos($dir, "/"))."/";
if (is_array($_GET) || is_array($_POST)){
if ($_SERVER["REQUEST_METHOD"] == "POST"){
extract($_POST);
}else{
extract($_GET);
};
};
function handler($data_type, $data_string, $data_file, $data_line, $data_varible){
global $err;
$err = $err + 1;
};
function check_error(&$error){
global $err;
if($err>0){
$error = true;
$err = 0;
};
};
set_error_handler("handler");
$rare_characters = "áéíóú.-";
$usual_characters = "aeiou ";
function convert($text){
global $rare_characters;
global $usual_characters;
$text = strtolower($text);
for ($x = 0; $x < strlen($rare_characters); $x++){
$text = str_replace(substr($rare_characters,$x,1),substr($usual_characters,$x,1),$text);
};
for ($x = 0; $x < strlen($text); $x++){
if (urlencode(substr($text,$x,1)) != substr($text,$x,1) & substr($text,$x,1) != "ñ"){
$text = str_replace(substr($text,$x,1)," ",$text);
};
};
while(strpos($text," ")){
$text = str_replace(" "," ",$text);
};
$text = trim($text);
return $text;
};
function match($text,$term,$max){
$array_texts = split(" ",$text);
$array_terms = split(" ",$term);
for ($x = 0; $x < count($array_terms); $x++){
for ($y = 0; $y < count($array_texts); $y++){
if ($array_terms[$x] == $array_texts[$y]){
$matchs += 1;
break;
};
};
};
$score = $matchs * 2 * $max / (count($array_terms) + count ($array_texts));
$score = (int) $score;
return $score;
};
function sort_results($array1, $array2){
if ($array1["score"] == $array2["score"]){ return 0; };
return ($array1["score"] > $array2["score"] ? -1 : 1);
};
function convert_url($url){
//$url = strtolower($url);
if(strpos($url,"http") === false){
$url = "http://" . $url;
};
return $url;
};
function convert_keywords($keywords){
$keywords = strtolower($keywords);
$keywords = str_replace(","," ",$keywords);
$keywords = str_replace(" "," ",$keywords);
return $keywords;
};
function parse_input($text){
if (get_magic_quotes_gpc()) $text = stripslashes($text);
if (function_exists("mysql_escape_string")) $text = mysql_escape_string($text);
else $text = addslashes($text);
return $text;
};
function parse_output($text){
if (get_magic_quotes_gpc()) $text = stripslashes($text);
$text = htmlspecialchars($text,ENT_QUOTES,"UTF-8");
return $text;
}
$month_names = array ("","January","February","March","April","May","June","July","August","September","October","November","December");

FUNCTION get_sponsor(){
global $c;
$sponsors = array(
array("Web Hosting","http://www.web-hosting-top.com/"),
array("Webhosting","http://www.web-hosting-top.com/"),
array("Best Web Hosting","http://www.web-hosting-top.com/"),
array("Best Hosting","http://www.web-hosting-top.com/"),
array("Web Hosting Reviews","http://www.web-hosting-top.com/"),
array("Top Web Hosting","http://www.web-hosting-top.com/"),
array("Top 10 Web Hosting","http://www.web-hosting-top.com/")
);
IF ($c != 1){
$sponsors += array(
array("Web Hosting Review","http://www.web-hosting-review.biz/"),
array("Web Hosting Top","http://www.webhosting-top.com/"),
array("Hosting Companies","http://www.webhosting-companies.org/"),
array("Web Hosting Coupons","http://web-hosting-top.com/coupons"),
array("Best ASP Web Hosting","http://web-hosting-top.com/best-asp"),
array("Best JSP Web Hosting","http://web-hosting-top.com/best-jsp"),
array("Best PHP Web Hosting","http://web-hosting-top.com/best-php"),
array("Best Coldfusion Hosting","http://web-hosting-top.com/best-coldfusion"),
array("Best ASP.net Web Hosting","http://web-hosting-top.com/best-asp.net"),
array("Best Ruby on Rails Hosting","http://web-hosting-top.com/best-rubyrails"),
array("Best Java Web Hosting","http://web-hosting-top.com/best-java"),
array("Best MySQL Web Hosting","http://web-hosting-top.com/best-mysql"),
array("Best Frontpage Web Hosting","http://web-hosting-top.com/best-frontpage"),
array("Best Drupal Web Hosting","http://web-hosting-top.com/best-drupal"),
array("Best VPS Web Hosting","http://web-hosting-top.com/best-vps"),
array("Best Dedicated Servers","http://web-hosting-top.com/best-dedicated"),
array("Best Shared Web Hosting","http://web-hosting-top.com/best-shared"),
array("Best Reseller Web Hosting","http://web-hosting-top.com/best-reseller"),
array("Best File Hosting","http://web-hosting-top.com/best-file"),
array("Best Green Web Hosting","http://web-hosting-top.com/best-green"),
array("Best Free Web Hosting","http://web-hosting-top.com/best-free"),
array("Best Adult Web Hosting","http://web-hosting-top.com/best-adult"),
);
};
$sponsor = substr(crc32($_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]),-5)%count($sponsors);
$return = array();
$return["link"] = $sponsors[$sponsor][1];
$return["text"] = $sponsors[$sponsor][0];
return $return;
};
?>
[/php]
__________________
Un saludo





Última edición por komas; 13/10/2010 a las 01:06.
komas está desconectado
Respuesta rápida a este mensaje
Responder Citando Subir