if (!isset($_SESSION['l_sy'])) { $_SESSION['l_sy']="it"; } ?> /* set_error_handler('error_handler', E_ALL); function error_handler($errNo, $errStr, $errFile, $errLine) { if (ob_get_length()) ob_clean(); $error_message = 'ERRNO: ' . $errNo . chr(10) . 'TEXT: ' . $errStr . chr(10) . 'LOCATION: ' . $errFile . ', line ' . $errLine; echo $error_message; exit; } */ ini_set('display_errors', 1); ini_set('log_errors', 1); //ini_set('error_log', dirname(__FILE__) . '/error_log.txt'); error_reporting(E_ALL); ?> $db_host = "62.149.150.153";$db_user = "Sql542825";$db_password = "04063b3e";$db_database = "Sql542825_1"; $link_db= mysql_connect($db_host,$db_user,$db_password) or die('No connection to database 1 error: ' . mysql_error()); $db_selected = mysql_select_db($db_database,$link_db) or die('No connection to database: 2 error ' . mysql_error()); $domain="https://www.marcorossiphoto.com/"; $dirXU=$_SERVER['DOCUMENT_ROOT']."/"; ?> class urlx { public $link_db; public $url; public $l_k; public $table_to_select; function g_i($u) { $res = mysql_query(" SELECT l_k,table_to_select FROM hw_urls WHERE url = '".$u."' ",$this->link_db) or die (mysql_error()); if (mysql_num_rows($res)>=1) { $vars = mysql_fetch_assoc($res); $this->l_k = $vars['l_k']; $this->table_to_select = $vars['table_to_select']; } else { //$this->l_k = "106a6c241b8797f52e1e77317b96a201"; //$this->table_to_select = "hw_st_pa__it"; header("Location: index.html"); } } } ?> class page { public $domain = "https://www.marcorossiphoto.com/"; public $link_db; public $l_k; public $title; public $subtitle; public $text; public $master_page; public $start; public $step; public $array_s_l_k; public $mid; public $l_i; public $r_c_b; public $con_but_lab=""; public $con_but_target=false; public $con_but_ext=false; function g_i($ixp) { $res = mysql_query(" SELECT * FROM ".$ixp->table_to_select." WHERE l_k = '".$ixp->l_k."' ",$this->link_db) or die("". mysql_error()); $vars = mysql_fetch_assoc($res); $this->id = $vars['id']; $this->title = $vars['title']; if (isset($vars['subtitle'])) { $this->subtitle = $vars['subtitle']; } $this->text = $vars['text']; $this->master_page = $vars['master_page']; $this->css = $vars['css']; $this->l_k = $vars['l_k']; $this->mid = $vars['mid']; //$this->r_c_b = $vars['r_c_b']; } function g_st_pa_mid() { $res = mysql_query(" SELECT mid FROM hw_st_pa__it WHERE l_k = '".$this->l_k."' ",$this->link_db) or die("". mysql_error()); $vars = mysql_fetch_assoc($res); return $vars['mid']; } function d_l_sy($ixp) { $a = explode("__",$ixp->table_to_select); $_SESSION['l_sy']=$a['1']; } function s_l_br() { $lang = $_SERVER['HTTP_ACCEPT_LANGUAGE']; $lang_sy = substr($lang, 0, 2); $_SESSION['l_sy']=$lang_sy; } function inst_lang_db() { $res = mysql_query(" SELECT l_sy FROM hw_l_sys ORDER BY l_sy DESC ",$this->link_db) or die("
SELECT l_sy FROM hw_l_sys ORDER BY l_sy DESC
". mysql_error()); return $res; } function table_to_select_from_l_k() { $res = mysql_query(" SELECT table_to_select FROM hw_urls WHERE l_k='".$this->l_k."' ORDER BY table_to_select DESC ",$this->link_db) or die(" err table to select". mysql_error()); return $res; } function table_to_select_exploded($table_to_select) { $ar = explode("__",$table_to_select); return $ar; } function table_delete_elements($res) { while($vars = mysql_fetch_assoc($res)) { $ar = $this->table_to_select_exploded($vars['table_to_select']); if(mysql_query(" DELETE FROM hw_".$this->class_name."__".$ar['1']." WHERE l_k='".$this->l_k."' ",$this->link_db)) { //echo " DELETE FROM hw_".$this->class_name."__".$ar['1'].""; if(mysql_query(" DELETE FROM hw_urls WHERE l_k='".$this->l_k."' ",$this->link_db)) { //echo ""; } } else { echo "errore aggiornamento". mysql_error(); } } } function print_day_list($did,$e_day) { echo ""; } function print_month_list($mid,$e_month) { echo ""; } function print_year_list_asc($yid,$e_year) { echo ""; } function print_r_c_b() { } function g_lkd_img($table,$l_k) { $res= mysql_query("SELECT l_i FROM ".$table." WHERE l_k = '".$l_k."'", $this->link_db) or die(" ".mysql_error()); $vars = mysql_fetch_assoc($res); $this->l_i = $vars['l_i']; } function get_page_title_by_mid_x_be($mid) { $title = ""; $res = mysql_query(" SELECT title FROM hw_st_pa__it WHERE l_k = '".$this->l_k."' AND mid = '".$mid."' ",$this->link_db) or die("". mysql_error()); $vars = mysql_fetch_assoc($res); return $vars['title']; } } ?>