14 if (!defined(
'IN_PEEL')) {
29 if (!empty($items_html_array) && count($items_html_array) == 1) {
30 $output .= current($items_html_array);
31 }
elseif (!empty($items_html_array)) {
33 foreach ($items_html_array as $this_item_html) {
34 $fcontent[] =
'scrollercontent[\'' . $div_id .
'\'][
' . ($i++) . ']=\
'' . str_replace(array(
' ',
' ',
"\t"),
' ',
filtre_javascript($this_item_html,
true,
true,
false)) .
'\';
' . "\r\n";
38 ' . (empty($GLOBALS['scroller_1_already_initialized
']) ? '
39 var index =
new Array();
40 var scrollercontent=
new Array();
42 index[\
'' . $div_id .
'\']=0;
43 scrollercontent[\
'' . $div_id .
'\']=
new Array();
44 ' . implode('', $fcontent) . '
47 $GLOBALS['js_ready_content_array
'][] = '
48 changecontent(\
'' . $div_id .
'\');
50 if (empty($GLOBALS['scroller_1_already_initialized
'])) {
51 $GLOBALS['js_files_pageonly
'][] = get_url('/modules/menus/scroller.js
');
52 $GLOBALS['scroller_1_already_initialized
'] = true;
55 <div
id=
"' . $div_id . '"></div>
68 function affiche_menu_deroulant_2($div_id, $items_html_array)
71 $pausecontent = array();
73 $items_html_array = (isset($items_html_array)) ? $items_html_array : get_on_rollover_products_html();
74 if (!empty($items_html_array) && count($items_html_array) == 1) {
75 $output .= current($items_html_array);
76 } elseif (!empty($items_html_array)) {
78 foreach ($items_html_array as $this_item_html) {
79 $pausecontent[] = $div_id . '_content[
' . ($i++) . ']=\
'' . str_replace(array(
' ',
' ',
"\t"),
' ',
filtre_javascript($this_item_html,
true,
true,
false)) .
'\';
' . "\r\n";
81 if (empty($GLOBALS['scroller_2_already_initialized
'])) {
82 $GLOBALS['js_files_pageonly
'][] = get_url('/modules/menus/pausescroller.js
');
83 $GLOBALS['scroller_2_already_initialized
'] = true;
85 $GLOBALS['js_content_array
'][] = '
86 var
' . $div_id . '_content=
new Array();
87 ' . implode('', $pausecontent) . '
89 $GLOBALS['js_ready_content_array
'][] = '
90 new pausescroller(
' . $div_id . '_content,
"' . $div_id . '", 3000);
93 <div
id=
"' . $div_id . '" class=
"' . $div_id . '_class pausescroller_container"></div>
103 function get_on_rollover_products_html()
106 $sql = "SELECT p.*, c.id AS categorie_id, c.nom_" . $_SESSION['session_langue
'] . " AS categorie
108 INNER JOIN peel_produits_categories pc ON p.id = pc.produit_id
109 INNER JOIN peel_categories c ON c.id = pc.categorie_id AND " . get_filter_site_cond('categories
', 'c
') . "
110 WHERE p.on_rollover = '1
' AND " . get_filter_site_cond('produits
', 'p
') . " AND p.nom_" . (!empty($GLOBALS['site_parameters
']['product_name_forced_lang
'])?$GLOBALS['site_parameters
']['product_name_forced_lang
']:$_SESSION['session_langue
']) . " != '' AND c.nom_" . $_SESSION['session_langue
'] . " != '' AND p.etat='1
' ".(empty($GLOBALS['site_parameters
']['allow_command_product_ongift
'])?" AND p.on_gift != '1
'":'')."
112 ORDER BY p.date_insere DESC
114 $query = query($sql);
116 while ($prod = fetch_assoc($query)) {
117 $product_object = new Product($prod['id'], $prod, true, null, true, !is_user_tva_intracom_for_no_vat() && !check_if_module_active('micro_entreprise
'));
118 $product_html = get_product_in_container_html($product_object, $GLOBALS['site_parameters
']['only_show_products_with_picture_in_containers
']);
119 unset($product_object);
120 if (!empty($product_html)) {
121 $items[] = $product_html;
130 function get_on_rollover_articles_html()
133 $sql = "SELECT a.on_reseller, a.titre_" . $_SESSION['session_langue
'] . " as name, a.image1 as image, a.date_insere, a.etat, a.id, a.on_special, r.id AS rubrique_id, r.nom_" . $_SESSION['session_langue
'] . " AS rubrique
135 INNER JOIN peel_articles_rubriques ar ON a.id = ar.article_id
136 INNER JOIN peel_rubriques r ON r.id = ar.rubrique_id AND " . get_filter_site_cond('rubriques
', 'r
') . "
137 WHERE a.on_rollover = '1
' AND a.titre_" . $_SESSION['session_langue
'] . " != '' AND r.nom_" . $_SESSION['session_langue
'] . " != '' AND a.etat='1
' AND " . get_filter_site_cond('articles
', 'a
') . "
139 ORDER BY a.date_insere DESC
141 $query = query($sql);
143 while ($article = fetch_assoc($query)) {
144 if ((!a_priv("admin_product") && !a_priv("reve")) && $article['on_reseller
'] == 1) {
147 $article_html = get_articles_in_container_html($article, $GLOBALS['site_parameters
']['only_show_articles_with_picture_in_containers
']);
148 if (!empty($article_html)) {
149 $items[] = $article_html;
if(strlen($date2)== '10') if($type== 'users-by-age'&&a_priv('admin_users', true)) elseif($type== 'forums-count'&&a_priv('admin_content', true)) elseif($type== 'forums-categories'&&a_priv('admin_content', true)) elseif($type== 'users-count'&&a_priv('admin_users', true)) elseif($type== 'product-categories'&&a_priv('admin_products', true)) elseif($type== 'users-by-sex'&&a_priv('admin_users', true)) elseif($type== 'users-by-country'&&a_priv('admin_users', true)) elseif($type== 'sales'&&a_priv('admin_sales', true))