destroy(); Header("Location: $PHP_SELF?"); } if($_GET["rs"]){ $rs=$_GET["rs"]; $site_length=time()+(3600*365); setcookie("region",$rs,$site_length); Header("Location: index.php"); $REGION=$rs; }else{ $REGION=1; } if($_COOKIE["region"]==1){ $REGION=1; } if($_COOKIE["region"]==2){ $REGION=2; } // La oss fjerne inne cookien og key etter 30 min uten aktivitet hvis ikke forbli innlogget er satt if($_COOKIE["stay"]!='1'){ if (isset($session_data->aktivitet) && (time() - $session_data->aktivitet > 1800)) { $session_data->destroy(); setcookie("inne","",time()-3600); } } $session_data->aktivitet = time(); $config=array(); $header=array(); $subdir=""; if($REGION==1){ // Header info $header["author"] = "Sørvest Bandyregion"; $header["keywords"] = "Innebandy, Norges Bandyforbund, Rogaland, Agder, El-innebandy, barneidrett "; $header["description"] = "Norges Bandyforbund - Sørvest Bandyregion. Siste nytt om innebandy i regionen, se resultater og statistikker. Få statistikk og trend på kurve på hver enkelt spiller"; // open graph info $opengraph["title"] = "Norges Bandyforbund - Sørvest Bandyregion"; $opengraph["description"] = "Norges Bandyforbund Sørvest Bandyregion. Siste nytt om innebandy i regionen, se resultater og statistikker. Få statistikk og trend på kurve på hver enkelt spiller"; $opengraph["url"] = "http://sorvestbandy.no/$subdir"; $opengraph["type"] = "Website"; $opengraph["site_name"] = "Norges Bandyforbund - Sørvest Bandyregion"; $opengraph["fbid"] = "142549302457525"; $opengraph["img_w"] = "1200"; $opengraph["img_h"] = "630"; $opengraph["img_t"] = "image/png"; $opengraph["img_url"] = $opengraph["url"] . "opengraph/sorvest_1200.png"; $config["map_api"] = "AIzaSyC-ryNI5q5baQmjc6PqzFJDwodiavLfdsk"; $config["url_api"] = "api/"; $config["selvmal_id"] = 2147483647; $config["sveve_username"] = "srvestba"; $config["sveve_password"] = "raiki"; $config["flickr_api_key"] = "385aa0d544297a17f6e309c33152bca8"; $config["flickr_api_secret"] = "39d9bc36220a676f"; $config["flickr_username"] = "rogalandbandykrets1"; $config["flickr_id"] = "144786374@N04"; $config["mysql_host"] = "localhost"; $config["mysql_user"] = "sorvestbandy"; $config["mysql_pw"] = "dh8Hn$75"; $config["mysql_db"] = "sorvestbandy_"; $config["url"] = "http://sorvestbandy.no/"; $config["mail"] = "web@sorvestbandy.no"; $config["post"] = "sorvestbandy@gmail.com"; $config["url_no_http"] = "sorvestbandy.no/"; $config["domene"] = "sorvestbandy.no"; $config["domene_url"] = "http://sorvestbandy.no/"; $config["site_title"] = "Sørvest Bandyregion"; $config["site_title_email"] = "Sørvest Bandyregion"; $config["domain_description"] = "Norges Bandyforbund Sørvest Bandyregion"; $config["document_root"] = "/var/www/vhosts/rogaland-bandykrets.no/sorvestbandy/$subdir"; $config["maler"] = "assets/html_maler/"; $config["maler_admin"] = "../assets/html_maler/"; $config["short_image_path"] = "assets/uploads/images/orig/"; $config["short_image_path_static"] = "assets/uploads/images/static/"; $config["short_image_path_semi"] = "assets/uploads/images/semi/"; $config["short_image_path_thumb"] = "assets/uploads/images/thumbs/"; $config["short_image_path_slider"] = "assets/uploads/images/sliders/"; $config["image_path_sponsor"] = "assets/uploads/images/sponsorer/"; $config["big_image_path_semi"] = $config["domene_url"] . $config["short_image_path_semi"]; $config["upload_orig"] = $config["document_root"] . "assets/uploads/images/orig/"; $config["upload_semi"] = $config["document_root"] . "assets/uploads/images/semi/"; $config["upload_thumb"] = $config["document_root"] . "assets/uploads/images/thumbs/"; $config["upload_sliders"] = $config["document_root"] . "assets/uploads/images/sliders/"; $config["upload_semi_sponsor"] = $config["document_root"] . "assets/uploads/images/sponsorer/"; //mail $config["mail_smtp"]="localhost"; $config["mail_auth"]=true; $config["mail_username"]="ketil@sorvestbandy.no"; $config["mail_password"]="Telefon1"; $config["mail_port"]=25; $config["kampskjema_utelat"]=array(401,402); $variabler["minirunde"]="Minirunde"; $variabler["minirunde_id"]=111; $variabler["dommerkurs"]="Dommerkurs"; $variabler["dommerkurs_id"]=115; $variabler["trenerkurs"]="Trenerkurs"; $variabler["trenerkurs_id"]=114; $variabler["kameratinnebandy"]="Kam 20+ HAU"; $variabler["kameratinnebandy_id"]=113; $variabler["venninnebandy"]="Venninnebandy"; $variabler["venninnebandy_id"]=119; $variabler["kamerat1319"]="Kamerat 13-19"; $variabler["kamerat1319_id"]=121; $variabler["landhockey"]="Landhockey"; $variabler["landhockey_id"]=134; $variabler["venneligaen"]="VenneLigaen"; $variabler["venneligaen_id"]=151; } if($REGION==2){ // Header info $header["author"] = "Hordaland Bandykrets"; $header["keywords"] = "Innebandy, Norges Bandyforbund, Rogaland, Agder, El-innebandy, barneidrett "; $header["description"] = "Norges Bandyforbund - Hordaland Bandykrets. Siste nytt om innebandy i regionen, se resultater og statistikker. Få statistikk og trend på kurve på hver enkelt spiller"; // open graph info $opengraph["title"] = "Norges Bandyforbund - Hordaland Bandykrets"; $opengraph["description"] = "Norges Bandyforbund Hordaland Bandykrets. Siste nytt om innebandy i regionen, se resultater og statistikker. Få statistikk og trend på kurve på hver enkelt spiller"; $opengraph["url"] = "http://hordaland-bandykrets.no/$subdir"; $opengraph["type"] = "Website"; $opengraph["site_name"] = "Norges Bandyforbund Hordaland Bandykrets"; $opengraph["fbid"] = "142549302457525"; $opengraph["img_w"] = "1200"; $opengraph["img_h"] = "630"; $opengraph["img_t"] = "image/png"; $opengraph["img_url"] = $opengraph["url"] . "opengraph/nbf_logo_1200.png"; $config["selvmal_id"] = 2147483647; $config["sveve_username"] = "srvestba"; $config["sveve_password"] = "raiki"; $config["flickr_api_key"] = "385aa0d544297a17f6e309c33152bca8"; $config["flickr_api_secret"] = "39d9bc36220a676f"; $config["flickr_username"] = "rogalandbandykrets1"; $config["mysql_host"] = "195.128.174.33"; $config["mysql_user"] = "wno27584"; $config["mysql_pw"] = "leder"; $config["mysql_db"] = "wno27584"; $config["url"] = "http://sorvestbandy.no/$subdir"; $config["mail"] = "web@hordaland-bandykrets.no"; $config["url_no_http"] = "hordaland-bandykrets.no/$subdir"; $config["domene"] = "hordaland-bandykrets.no"; $config["domene_url"] = "http://hordaland-bandykrets.no/$subdir"; $config["site_title"] = "Hordaland Bandykrets"; $config["site_title_email"] = "Hordaland Bandykrets"; $config["domain_description"] = "Norges Bandyforbund Hordaland Bandykrets"; $config["document_root"] = "/var/www/web/wno27584/$subdir"; $config["maler"] = "assets/html_maler/"; $config["maler_admin"] = "../assets/html_maler/"; $config["test_mail"] = "ketil@gunstead.no"; $config["short_image_path"] = "http://hordaland-bandykrets.no/$subdir/assets/uploads/images/orig/"; $config["short_image_path_semi"] = "http://hordaland-bandykrets.no/$subdir/assets/uploads/images/semi/"; $config["short_image_path_thumb"] = "http://hordaland-bandykrets.no/$subdir/assets/uploads/images/thumbs/"; $config["short_image_path_slider"] = "http://hordaland-bandykrets.no/$subdir/assets/uploads/images/sliders/"; $config["image_path_sponsor"] = "http://hordaland-bandykrets.no/$subdir/assets/uploads/images/sponsorer/"; $config["big_image_path_semi"] = $config["domene_url"] . $config["short_image_path_semi"]; $config["upload_orig"] = $config["document_root"] . "assets/uploads/images/orig/"; $config["upload_semi"] = $config["document_root"] . "assets/uploads/images/semi/"; $config["upload_thumb"] = $config["document_root"] . "assets/uploads/images/thumbs/"; $config["short_image_path_static"] = "assets/uploads/images/static/"; $config["upload_sliders"] = $config["document_root"] . "assets/uploads/images/sliders/"; $config["upload_semi_sponsor"] = $config["document_root"] . "assets/uploads/images/sponsorer/"; $config["kampskjema_utelat"]=array(401,402); $config["mail_host"] = "mail.talkactive.net"; $config["mail_port"] = 587; $config["mail_user"] = "webmaster@hordaland-bandykrets.no"; $config["mail_pw"] = "leder"; $config["mail_server"] = "mail.web10.net"; $variabler["minirunde"]="Minirunde"; $variabler["minirunde_id"]=111; $variabler["dommerkurs"]="Dommerkurs"; $variabler["dommerkurs_id"]=115; $variabler["trenerkurs"]="Trenerkurs"; $variabler["trenerkurs_id"]=114; $variabler["kameratinnebandy"]="Kam 20+ HAU"; $variabler["kameratinnebandy_id"]=113; $variabler["venninnebandy"]="Venninnebandy"; $variabler["venninnebandy_id"]=119; $variabler["kamerat1319"]="Kamerat 13-19"; $variabler["kamerat1319_id"]=121; $variabler["landhockey"]="Landhockey"; $variabler["landhockey_id"]=134; } class Session { const SESSION_STARTED = TRUE; const SESSION_NOT_STARTED = FALSE; // The state of the session private $sessionState = self::SESSION_NOT_STARTED; // THE only instance of the class private static $instance; private function __construct() {} /** * Returns THE instance of 'Session'. * The session is automatically initialized if it wasn't. * * @return object **/ public static function getInstance() { if ( !isset(self::$instance)) { self::$instance = new self; } self::$instance->startSession(); return self::$instance; } /** * (Re)starts the session. * * @return bool TRUE if the session has been initialized, else FALSE. **/ public function startSession() { if ( $this->sessionState == self::SESSION_NOT_STARTED ) { $this->sessionState = session_start(); } return $this->sessionState; } /** * Stores datas in the session. * Example: $instance->foo = 'bar'; * * @param name Name of the datas. * @param value Your datas. * @return void **/ public function __set( $name , $value ) { $_SESSION[$name] = $value; } /** * Gets datas from the session. * Example: echo $instance->foo; * * @param name Name of the datas to get. * @return mixed Datas stored in session. **/ public function __get( $name ) { if ( isset($_SESSION[$name])) { return $_SESSION[$name]; } } public function __isset( $name ) { return isset($_SESSION[$name]); } public function __unset( $name ) { unset( $_SESSION[$name] ); } /** * Destroys the current session. * * @return bool TRUE is session has been deleted, else FALSE. **/ public function destroy() { if ( $this->sessionState == self::SESSION_STARTED ) { $this->sessionState = !session_destroy(); unset( $_SESSION ); return !$this->sessionState; } return FALSE; } } ?>
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /var/www/vhosts/rogaland-bandykrets.no/sorvestbandy/assets/classes/mysql.php:6 Stack trace: #0 /var/www/vhosts/rogaland-bandykrets.no/sorvestbandy/nyhet.php(7): require() #1 {main} thrown in /var/www/vhosts/rogaland-bandykrets.no/sorvestbandy/assets/classes/mysql.php on line 6