'; } function PageScroll_End() { return'
'; } function databaseopen() { global $CONFIG; $link = mysql_connect($CONFIG["database"]["host"], $CONFIG["database"]["username"], $CONFIG["database"]["password"]) or die ("Could not connect"); mysql_select_db ($CONFIG["database"]["name"]) // LOCALE or die ("Could not select database"); mysql_query("SET NAMES 'utf8'"); return $link; } function databaseclose($link) { mysql_close($link); } function IngrassaLeParole ($String,$Parole) { $Punteggiatura=array(",",":","'"); $ret=""; $temp=explode(" ",$Parole); $String=strip_tags($String); for ($i=0;$i "; $Ctrl=1; } } if ($Ctrl==0) $ret.=$temp2[$i]." "; } return trim($ret); } function CheSianoParoleMaggioriNum ($Arr,&$Arr2,&$ParoleIgnorate,$Num) { $ret=true; $Arr3=NULL; $cont=0; $ParoleIgnorate=""; for ($i=0;$i'; if ($CANBENULL==1) echo ''; $query="select * from ".$tabella." order by ".$ord; $result=mysql_query($query) or die(mysql_error()." die tabella=".$tabella); while ($row=mysql_fetch_array($result)) { echo ''; } echo ''; } /* */ function PaginaLingua($Pagina) { $temp1=explode("/",$Pagina); $A=$temp1[sizeof($temp1)-1]; $temp2=explode("?",$A); if ($temp1[sizeof($temp1)-1]!="") return "LINGUA_".$temp2[0]; else return "LINGUA_index.php"; ///return "LINGUA_".$temp2[0]; } function creainsert ($tabella,$arr,$val) { //controllo apici $query="insert into $tabella ("; for ($i=0;$i".mysql_error()); $i=0; while ($row=mysql_fetch_array($result)) { $Arr[$i]=$row; $i++; } } function DataMysql2Lingua($s,$Lingua) { $temp=explode("-",$s); $tem=explode(" ",$temp[2]); $temp[2]=$tem[0]; if ($Lingua!="En") return $temp[2]."/".($temp[1])."/".$temp[0]; else return $temp[1]."/".($temp[2])."/".$temp[0]; } function Mysql2Data ($data,$tipo,$Lingua) { $temp=explode("-",$data); $temp1=explode(" ",$temp[2]); $temp2=explode(":",$temp1[1]); switch ($tipo) { case 0: return $temp1[0]."-".$temp[1]."-".$temp[0]; break; case 1: return $temp1[0]." ".MeseLingua($temp[1],$Lingua)." ".$temp[0]; break; case 2: return $temp1[0]." ".MeseLingua($temp[1],$Lingua)." ".$temp[0]." ".$temp2[0].":".$temp2[1]; break; case 3: return $temp1[0]."/".$temp[1]."/".$temp[0]; break; } } function DbLock($table,$mode,$link) { "
".$query="LOCK TABLES ".$table." ".$mode; mysql_query($query,$link) or die(mysql_error($link)); } function DbUnLock($link) { mysql_query("UNLOCK TABLES",$link) or die(mysql_error($link)); } function MeseLingua($s,$Lingua) { switch($Lingua) { case "It": if ($s==1) $val="Gennaio"; if ($s==2) $val="Febbraio"; if ($s==3) $val="Marzo"; if ($s==4) $val="Aprile"; if ($s==5) $val="Maggio"; if ($s==6) $val="Giugno"; if ($s==7) $val="Luglio"; if ($s==8) $val="Agosto"; if ($s==9) $val="Settembre"; if ($s==10) $val="Ottobre"; if ($s==11) $val="Novembre"; if ($s==12) $val="Dicembre"; break; case "Ru": case "En": if ($s==1) $val="January"; if ($s==2) $val="February"; if ($s==3) $val="March"; if ($s==4) $val="April"; if ($s==5) $val="May"; if ($s==6) $val="June"; if ($s==7) $val="July"; if ($s==8) $val="August"; if ($s==9) $val="September"; if ($s==10) $val="October"; if ($s==11) $val="November"; if ($s==12) $val="December"; break; case "Fr": if ($s==1) $val="Janvier"; if ($s==2) $val="Février"; if ($s==3) $val="Mars"; if ($s==4) $val="Avril"; if ($s==5) $val="Mai"; if ($s==6) $val="Juin"; if ($s==7) $val="Juillet"; if ($s==8) $val="Août"; if ($s==9) $val="Septembre"; if ($s==10) $val="Octobre"; if ($s==11) $val="Novembre"; if ($s==12) $val="Décembre"; break; case "De": if ($s==1) $val="Januar"; if ($s==2) $val="Februar"; if ($s==3) $val="März"; if ($s==4) $val="April"; if ($s==5) $val="Mai"; if ($s==6) $val="Juni"; if ($s==7) $val="Juli"; if ($s==8) $val="August"; if ($s==9) $val="September"; if ($s==10) $val="Oktober"; if ($s==11) $val="November"; if ($s==12) $val="Dezember"; break; } return $val; } function DataLingua ($s,$Lingua,$a) { $temp=explode("-",$s); $tem=explode(" ",$temp[2]); $temp[2]=$tem[0]; if ($a==0) return $temp[2]." ".MeseLingua($temp[1],$Lingua)." ".$temp[0]; else return $temp[2]." ".substr(MeseLingua($temp[1],$Lingua),0,3)." ".$temp[0]; } function DataOraMysql2Norm($s,$lingua) { $temp=explode("-",$s); $temp1=explode(" ",$temp[2]); $ret=$temp1[0]."/".$temp[1]."/".$temp[0]." "; $temp2=explode(":",$temp1[1]); $ora=""; if ($temp2[0]<10) $ora="0".($temp2[0]*1).":"; else $ora=($temp2[0]*1).":"; if ($temp2[1]<10) $ora.="0".($temp2[1]*1).":"; else $ora.=($temp2[1]*1).":"; if ($temp2[2]<10) $ora.="0".($temp2[2]*1); else $ora.=($temp2[2]*1); return $ret.$ora; } function ControlloLog($cod,$a=0) { global $ERR; if ($cod=="") { if ($a==0) header ("Location: ../affiliato/index.php?err=2"); // else header ("Location: ../areariservata/login.php"); exit(); } } function FormatoValuta($testo,$lingua) { if ($lingua=="En") return number_format($testo, 2, '.', ','); if ($lingua=="It") return number_format($testo, 2, ',', '.'); if ($lingua=="Es") return number_format($testo, 2, ',', '.'); } function debug_r($var) { echo '
';	
	print_r($var);
	echo '
'; } function SqlApici ($s) { if (!get_magic_quotes_gpc()) { return addslashes($s); } else return $s; } if (!function_exists("formato_valuta")) { function formato_valuta($i,$DecSep='.') { return number_format($i, 2, $DecSep, ''); } } /******************/ function activeIf($s,$s2) { if ($s==$s2) echo ' active '; else echo ''; } function __autoload($className) { require_once "./MODELS/{$className}.php"; } function html_sample_mp3 ($mp3) { $s = ""; if ($mp3!="") { $s = ''; //$s .= ''; $s .= ''; } return $s; } function Social ($Url,$Description="") { global $Lingua; $Description = ""; $s = '
'; return $s; }