query("SELECT * FROM ".BDD_PREFIXE."slides_group WHERE id = '$group_id' LIMIT 1"); $group_choose = mysql_fetch_array($select_group); $select_slides = $database->query("SELECT * FROM ".BDD_PREFIXE."slides WHERE slide_group = '$group_id' AND slide_visible='1' ORDER BY slide_order ASC, id ASC"); if(mysql_num_rows($select_slides)!=0) { while( $slides = mysql_fetch_array($select_slides) ) { $slides["slide_params"] = unserialize(stripslashes($slides["slide_params"])); // ANIMATION BACKGROUND SECTION if($slides["slide_params"]["data-speed"]!="") $anim = ' data-speed="'.$slides["slide_params"]["data-speed"].'" data-move="background" '; else $anim = ''; // SECTION $sections .= '
'; $sections .= '
'; $sections .= '
'; // REFERENCEMENT SLIDES $sections .= '

'.stripslashes($slides["slide_title"]).'

'; $sections .= ''; $sections .= '

'.stripslashes($slides["slide_description"]).'

'; $sections .= ''; // LES OBJETS $select_objects = $database->query("SELECT * FROM ".BDD_PREFIXE."objects WHERE object_visible = '1' AND slide_id = '{$slides["id"]}'"); if(mysql_num_rows($select_objects)!=0) { while( $object = mysql_fetch_array($select_objects) ) { $object["object_params"] = unserialize(stripslashes($object["object_params"])); $class = stripslashes($object["object_class"]); // STYLE OBJET $styles .= '#'.url_rewrite($object["object_name"]).'_'.$object["id"].' { '; $styles .= 'position:absolute; '; if(is_numeric($object["object_params"]["y"])) $posy = $object["object_params"]["y"]."px"; else $posy = $object["object_params"]["y"]; if(is_numeric($object["object_params"]["x"])) $posx = $object["object_params"]["x"]."px"; else $posx = $object["object_params"]["x"]; $styles .= 'z-index:'.$object["object_params"]["z"].'; '; if($object["object_params"]["move"]["data-move"]=="object") $styles .= 'background: url(/medias/object/'.$object["object_file"].') transparent 0px 0px no-repeat; '; else $styles .= 'background: url(/medias/object/'.$object["object_file"].') transparent '.$posx.' '.$posy.' no-repeat fixed; '; if($object["object_params"]["move"]["data-move"]=="object") $styles .= 'width:'.$object["object_params"]["width"].'; '; $styles .= 'height:'.$object["object_params"]["height"].'; '; //if($object["object_params"]["move"]["data-move"]=="object") $styles .= 'height:'.$object["object_params"]["height"].'; '; //else $styles .= 'height:'.$slides["slide_params"]["min-height"].'; '; if($object["object_params"]["move"]["data-move"]=="object") $styles .= 'margin:'.$posy.' '.$posx.'; '; if(@$object["object_params"]["linkto"]!="") { $styles .= 'cursor:pointer; '; switch ($object["object_params"]["linkto_method"]) { case "blank" : $linkto = ' onclick="window.open(\''.$object["object_params"]["linkto"].'\');" '; break; case "this" : $linkto = ' onclick="document.location=\''.$object["object_params"]["linkto"].'\';" '; break; default: $linkto = ' onclick="o_overlay(\''.$object["object_params"]["linkto"].'\');" '; break; } } else $linkto = ""; $styles .= '} '; // EFFET CARTOON if(@$object["object_params"]["cartoon_effect"]==1) { $cartoon = ' data-when="'.$object["object_params"]["cartoon"]["data-when"].'" data-fps="'.$object["object_params"]["cartoon"]["data-fps"].'" data-frames="'.$object["object_params"]["cartoon"]["data-frames"].'" '; $class .= ' anim'; } else $cartoon = ''; // EFFET PARALLAX if(@$object["object_params"]["move_effect"]==1) { $parallax = ' data-move="'.$object["object_params"]["move"]["data-move"].'" data-offsetY="'.$object["object_params"]["move"]["data-offsetY"].'" data-Yposition="'.$object["object_params"]["y"].'" data-Xposition="'.$object["object_params"]["x"].'" data-move-direction="'.$object["object_params"]["move"]["data-move-direction"].'" data-speed="'.$object["object_params"]["move"]["data-speed"].'" '; if($object["object_params"]["move"]["data-move"]=="sprite") $class .= ' sprite'; } else $parallax = ''; // EFFET ANIMATION if(@$object["object_params"]["animate_effect"]==1) { $animate = ' data-animated="{\'when\':\''.$object["object_params"]["animate"]["animate-when"].'\',\'effects\':\''.$object["object_params"]["animate"]["animate-effects"].'\',\'wait\':'.$object["object_params"]["animate"]["animate-wait"].'}" '; $class .= ' animated'; } else $animate = ''; // STYLE OF OBJECT $select_styles = $database->query("SELECT * FROM ".BDD_PREFIXE."styles WHERE id = '".(int)$object["object_text_style"]."' LIMIT 1"); $style = mysql_fetch_array($select_styles); $object_text = ""; if($object["object_text"]!="") { $object_text = nl2br(stripslashes($object["object_text"])); $object_text = url2link($object_text); $object_text = email2link($object_text); } $sections .= '
'.$object_text.'
'; } } // LES CONTENUS $select_contents = $database->query("SELECT * FROM ".BDD_PREFIXE."contents WHERE content_visible = '1' AND slide_id = '{$slides["id"]}' LIMIT 1"); if(mysql_num_rows($select_contents)!=0) { $content = mysql_fetch_array($select_contents); $infos = unserialize( stripslashes($content["content_infos"]) ); $styles .= '#content_'.url_rewrite($content["id"]).' { '; if($infos["width"]!="") $styles .= ' width:'.$infos["width"].'; '; if($infos["height"]!="") $styles .= ' height:'.$infos["height"].'; overflow:auto; '; if($infos["x"]!="" && $infos["y"]!="") { if($infos["x"] != 0 || $infos["y"] != 0) { $styles .= ' position:absolute; '; if(is_numeric($infos["y"])) $posy = $infos["y"]."px"; else $posy = $infos["y"]; if(is_numeric($infos["x"])) $posx = $infos["x"]."px"; else $posx = $infos["x"]; $styles .= ' margin:'.$posy.' '.$posx.'; '; if($infos["z"]!="") $styles .= ' z-index:'.$infos["z"].'; '; } else { $styles .= ' position:relative; '; if($infos["z"]!="") $styles .= ' z-index:'.$infos["z"].'; '; } } $styles .= '} '; $content["content_html"] = scanne_for_modules($content["content_html"]); if(isset($infos["scroll"])) $scroll = ' class="scroll-pane" '; else $scroll = ''; $sections .= '
'.stripslashes($content["content_html"]).'
'; } $sections .= '
'; $sections .= '
'; // STYLES SLIDES if($slides["slide_params"]["background-file"]!="") $slides["slide_params"]["background-image"] = '/medias/background/'.$slides["slide_params"]["background-file"]; $styles .= '#'.url_rewrite($slides["slide_title"]).'_'.$slides["id"].' { '; $styles .= 'background: url('.$slides["slide_params"]["background-image"].') '.$slides["slide_params"]["background-color"].' '.$slides["slide_params"]["background-position"].' '.$slides["slide_params"]["background-repeat"].' '.$slides["slide_params"]["background-attachement"].'; '; $styles .= 'min-height: '.$slides["slide_params"]["min-height"].';'; $styles .= '-moz-background-size: cover;-webkit-background-size: cover;-o-background-size: cover;background-size: cover;'; $styles .= '} '; $styles .= '#slide_'.$slides["id"].' { '; $styles .= 'position: absolute;'; $styles .= 'min-height: '.$slides["slide_params"]["min-height"].';'; $styles .= '} '; } // NAVIGATION function list_slide_group($parent=0, $first=0, $level=0) { global $database, $nav; $select_groups = $database->query("SELECT * FROM ".BDD_PREFIXE."slides_group WHERE parent='$parent' AND show_menu = '1' ORDER BY ordre ASC, name ASC"); if($first==0) $id='id="nav"'; else $id=""; if(mysql_num_rows($select_groups)!=0 && $level==0) $nav .= ''; } list_slide_group(); // STYLE PREDEFINIS $g_webfont = array(); $select_styles = $database->query("SELECT * FROM ".BDD_PREFIXE."styles ORDER BY style_name"); if(mysql_num_rows($select_styles)!=0) { while($style = mysql_fetch_array($select_styles)) { $styles .= $style["style_balise"].".".url_rewrite($style["style_name"])." { "; $style["style_params"] = unserialize(stripslashes($style["style_params"])); foreach ($style["style_params"] as $key=>$value) { if($value!="") $styles .= $key.": ".$value."; "; } $styles .= " } "; if($style["google_webfont"]!="") $g_webfont[$style["google_webfont"]] = 1; } } } // REFERENCEMENT $toheader = ""; $header = array(); $tofoot = ""; $foot = array(); $select_global_vars = $database->query("SELECT * FROM ".BDD_PREFIXE."global_params WHERE name = 'website'"); if(mysql_num_rows($select_global_vars)!=0) { $params_global_vars = mysql_fetch_array($select_global_vars); $params = @unserialize($params_global_vars["params"]); if(is_array($params)) { $header["title"][0] = @html_entity_decode(stripslashes($params["intitule"])); $params["description"] = str_replace(array("\n","\r"),"",stripslashes($params["description"])); $header["other"]["canonical"] = ''; $header["other"]["rss"] = ''; $header["other"]["sitemap"] = ''; $header["meta"]["description"] = array( "name" => "description" , "content" => @htmlentities(stripslashes($params["description"])) ); $header["meta"]["keywords"] = array( "name" => "keywords" , "content" => @htmlentities(stripslashes($params["keywords"])) ); $header["og"]["og:latitude"] = array( "name" => "og:latitude" , "content" => @htmlentities($params["og_latitude"]) ); $header["og"]["og:longitude"] = array( "name" => "og:longitude" , "content" => @htmlentities($params["og_longitude"]) ); $header["og"]["og:street-address"] = array( "name" => "og:street-address" , "content" => @htmlentities($params["og_street-address"]) ); $header["og"]["og:locality"] = array( "name" => "og:locality" , "content" => @htmlentities($params["og_locality"]) ); $header["og"]["og:region"] = array( "name" => "og:region" , "content" => @htmlentities($params["og_region"]) ); $header["og"]["og:postal-code"] = array( "name" => "og:postal-code" , "content" => @htmlentities($params["og_postal-code"]) ); $header["og"]["og:country-name"] = array( "name" => "og:country-name" , "content" => @htmlentities($params["og_country-name"]) ); $header["og"]["og:email"] = array( "name" => "og:email" , "content" => @htmlentities($params["og_email"]) ); $header["og"]["og:phone_number"] = array( "name" => "og:phone_number" , "content" => @htmlentities($params["og_phone_number"]) ); $header["og"]["og:fax_number"] = array( "name" => "og:fax_number" , "content" => @htmlentities($params["og_fax_number"]) ); $header["og"]["og:type"] = array( "name" => "og:type" , "content" => "website" ); $header["og"]["og:site_name"] = array( "name" => "og:site_name" , "content" => @htmlentities(stripslashes($params["sitename"])) ); $header["og"]["og:url"] = array( "name" => "og:url" , "content" => 'http://'.$_SERVER['HTTP_HOST'].'/'.$_SERVER['QUERY_STRING'] ); $header["og"]["og:locale"] = array( "name" => "og:locale" , "content" => @htmlentities($params["og_locale"]) ); $header["og"]["og:title"] = array( "name" => "og:title" , "content" => @htmlentities($params["intitule"]) ); $header["og"]["og:description"] = array( "name" => "og:description" , "content" => @htmlentities(stripslashes($params["description"])) ); $header["og"]["og:image"] = array( "name" => "og:image" , "content" => @htmlentities($params["og_image"]) ); $header["og"]["og:image:width"] = array( "name" => "og:image:width" , "content" => @htmlentities($params["og_image_width"]) ); $header["og"]["og:image:height"] = array( "name" => "og:image:height" , "content" => @htmlentities($params["og_image_height"]) ); $header["og"]["og:image:type"] = array( "name" => "og:image:type" , "content" => @htmlentities($params["og_image_type"]) ); if($params["fb_admins"]!="") $header["og"]["fb:admins"] = array( "name" => "fb:admins" , "content" => @htmlentities($params["fb_admins"]) ); if($params["fb_app_id"]!="") $header["og"]["fb:app_id"] = array( "name" => "fb:app_id" , "content" => @htmlentities($params["fb_app_id"]) ); if($params["fb_page_id"]!="") $header["og"]["fb:page_id"] = array( "name" => "fb:page_id" , "content" => @htmlentities($params["fb_page_id"]) ); } // INCLUDE MODULES HEADERS $select = $database->query("SELECT * FROM ".BDD_PREFIXE."plugins WHERE actif = 1 AND ( version = 'Module' OR version = 'Application' ) ORDER BY ordre"); while($plugins = mysql_fetch_array($select)) { if(class_exists($plugins["name"])) { eval('$mod = new '.$plugins["name"].'();'); eval('$add_header = (array)$mod->header();'); eval('$add_foot = (array)$mod->foot();'); $header = array_merge_recursive($header, $add_header); $foot = array_merge_recursive($add_foot, $foot); } } foreach ($header as $type=>$valeur) { if(is_array($valeur)) { foreach ($valeur as $value) { if($value!="") { switch($type) { case "title" : $toheader .= ''.$value.''."\n\t"; break; case "meta" : $toheader .= ''."\n\t"; break; case "og" : $toheader .= ''."\n\t"; break; case "other" : $toheader .= $value."\n\t"; break; case "js" : $toheader .= ''."\n\t"; break; case "css" : $toheader .= ''."\n\t"; break; } } } } } foreach ($foot as $type=>$valeur) { if(is_array($valeur)) { foreach ($valeur as $value) { if($value!="") { switch($type) { case "other" : $tofoot .= $value."\n\t"; break; case "js" : $tofoot .= ''."\n\t"; break; case "css" : $tofoot .= ''."\n\t"; break; } } } } } } // FIN REFERENCEMENT ?> $v) echo ''; ?>