PEEL Shopping
Open source ecommerce : PEEL Shopping
index.php
Go to the documentation of this file.
1 <?php
2 // This file should be in UTF8 without BOM - Accents examples: éèê
3 // +----------------------------------------------------------------------+
4 // | Copyright (c) 2004-2015 Advisto SAS, service PEEL - contact@peel.fr |
5 // +----------------------------------------------------------------------+
6 // | This file is part of PEEL Shopping 8.0.0, which is subject to an |
7 // | opensource GPL license: you are allowed to customize the code |
8 // | for your own needs, but must keep your changes under GPL |
9 // | More information: https://www.peel.fr/lire/licence-gpl-70.html |
10 // +----------------------------------------------------------------------+
11 // | Author: Advisto SAS, RCS 479 205 452, France, https://www.peel.fr/ |
12 // +----------------------------------------------------------------------+
13 // $Id: index.php 47158 2015-10-05 08:56:35Z gboussin $
14 define('IN_PEEL_ADMIN', true);
15 include("../configuration.inc.php");
17 necessite_priv("admin*");
18 
19 if (file_exists($GLOBALS['dirroot'] . '/' . $GLOBALS['site_parameters']['backoffice_directory_name'] . '/install.php')) {
20  redirect_and_die($GLOBALS['administrer_url'] . '/install.php');
21 }
22 
23 if (check_if_module_active('chart', 'open-flash-chart.php')) {
24  if(vb($GLOBALS['site_parameters']['chart_product']) == 'flot') {
25  include($GLOBALS['dirroot'] . '/modules/chart/flot.php');
26  } else {
27  include($GLOBALS['dirroot'] . '/modules/chart/open_flash_chart_object.php');
28  }
29 }
30 
31 $GLOBALS['DOC_TITLE'] = $GLOBALS['STR_ADMIN_INDEX_TITLE'] . ' ' . $GLOBALS['site'];
32 $output = '';
33 
34 if (isset($_POST['admin_multisite'])){
35  // Détermine le site à administrer. Cette valeur en session est utilisée dans la fonction get_filter_site_cond. $_POST['admin_multisite'] est éventuellement égal à 0.
36  if($_SESSION['session_utilisateur']['site_id'] == 0 || $_POST['admin_multisite'] == $_SESSION['session_utilisateur']['site_id']) {
37  $_SESSION['session_admin_multisite'] = intval($_POST['admin_multisite']);
38  }
39 }
40 $q = query("SELECT COUNT(*) AS this_count
41  FROM peel_produits p
42  WHERE " . get_filter_site_cond('produits', 'p') . "");
44 
45 $q = query("SELECT COUNT(*) AS this_count
46  FROM peel_utilisateurs u
47  WHERE " . get_filter_site_cond('utilisateurs', 'u') . "");
49 
50 $q = query("SELECT COUNT(*) AS this_count
51  FROM peel_commandes
52  WHERE " . get_filter_site_cond('commandes', null, true) . "");
54 
55 $q = query("SELECT COUNT(*) AS this_count
56  FROM peel_commandes c
57  LEFT JOIN peel_statut_paiement sp ON sp.id=c.id_statut_paiement AND " . get_filter_site_cond('statut_paiement', 'sp') . "
58  LEFT JOIN peel_statut_livraison sl ON sl.id=c.id_statut_livraison AND " . get_filter_site_cond('statut_livraison', 'sl') . "
59  WHERE sp.technical_code IN ('being_checked','completed') AND sl.technical_code <> 'dispatched' AND " . get_filter_site_cond('commandes', 'c', true) . "");
61 
62 $q = query("SELECT COUNT(*) AS this_count
63  FROM peel_commandes c
64  LEFT JOIN peel_statut_paiement sp ON sp.id=c.id_statut_paiement AND " . get_filter_site_cond('statut_paiement', 'sp') . "
65  LEFT JOIN peel_statut_livraison sl ON sl.id=c.id_statut_livraison AND " . get_filter_site_cond('statut_livraison', 'sl') . "
66  WHERE sp.technical_code IN ('being_checked','completed') AND sl.technical_code = 'dispatched' AND " . get_filter_site_cond('commandes', 'c', true) . "");
68 
69 $tpl = $GLOBALS['tplEngine']->createTemplate('admin_index.tpl');
70 
71 $tpl->assign('site_id_select_options', get_site_id_select_options(vb($_SESSION['session_admin_multisite'])));
72 $tpl->assign('site_id_select_multiple', !empty($GLOBALS['site_parameters']['multisite_using_array_for_site_id']));
73 
74 if (check_if_module_active('phone_cti') && check_if_module_active('multisite')) {
75  $block_content = array();
76  $block_content['title'] = 'Liste des Appels';
77  $block_content['logo'] = '';
78  $block_content['link'] = $GLOBALS['wwwroot_in_admin'] . '/modules/phone_cti/administrer/list_calls.php';
79  $block_content['description1'] = getKeyyoCalls(true);
80  $block_content['description2'] = '';
81  $tpl->assign('KeyyoCalls', backoffice_home_block($block_content, 'red', true));
82 }
83 $delivery = '';
84 if(a_priv('admin_sales', true)) {
85  if(!empty($GLOBALS['site_parameters']['mode_transport'])) {
86  $delivery .= backoffice_home_block('delivery', 'purple', true);
87  } else {
88  $home_modules = call_module_hook('get_admin_home_block', array(), 'array');
89  if(!empty($home_modules)) {
90  $delivery .= current($home_modules);
91  }
92  }
93 }
94 if(vb($GLOBALS['site_parameters']['peel_database_version']) != PEEL_VERSION) {
95  $tpl->assign('version_update_link', $GLOBALS['administrer_url'] . '/update.php');
96  $tpl->assign('STR_ADMIN_UPDATE_VERSION_INVITE', $GLOBALS['STR_ADMIN_UPDATE_VERSION_INVITE']);
97 }
98 $tpl->assign('all_sites_name_array', get_all_sites_name_array(true));
99 $tpl->assign('orders', (a_priv('admin_sales', true) ? backoffice_home_block('orders', 'green', true) : ''));
100 $tpl->assign('sales', (a_priv('admin_sales', true) ? backoffice_home_block('sales', 'blue', true) : ''));
101 $tpl->assign('products', (a_priv('admin_products', true) ? backoffice_home_block('products', 'orange', true) : ''));
102 $tpl->assign('delivery', $delivery);
103 $tpl->assign('users', (a_priv('admin_users', true) ? backoffice_home_block('users', 'red', true) : ''));
104 $tpl->assign('link', $GLOBALS['administrer_url'] . '/sites.php');
105 $tpl->assign('peel', backoffice_home_block('peel', 'black', true));
106 $tpl->assign('data_lang', get_data_lang());
107 $tpl->assign('current_url', get_current_url());
108 $tpl->assign('sortie_href', $GLOBALS['wwwroot_in_admin'] . '/sortie.php');
109 $tpl->assign('example_href', $GLOBALS['wwwroot_in_admin'] . '/import/exemple_prod.csv');
110 $tpl->assign('STR_ADMIN_INDEX_SECURITY_WARNING', $GLOBALS['STR_ADMIN_INDEX_SECURITY_WARNING']);
111 $tpl->assign('STR_BEFORE_TWO_POINTS', $GLOBALS['STR_BEFORE_TWO_POINTS']);
112 $tpl->assign('STR_ADMIN_CHOOSE_SITE_TO_MODIFY', $GLOBALS['STR_ADMIN_CHOOSE_SITE_TO_MODIFY']);
113 $output .= $tpl->fetch();
114 
115 include($GLOBALS['repertoire_modele'] . "/admin_haut.php");
116 if (vb($_GET['error']) == 'admin_rights') {
117  echo $GLOBALS['tplEngine']->createTemplate('global_error.tpl', array('message' => $GLOBALS['STR_NO_RIGHTS_TO_ACCESS_ADMIN']))->fetch();
118 }
119 echo $output;
120 include($GLOBALS['repertoire_modele'] . "/admin_bas.php");
121 
130 function backoffice_home_block($block_content, $title_bg_color, $return_mode = false)
131 {
132  if(!is_array($block_content)) {
133  $block_content = get_home_block_content($block_content);
134  }
135  $tpl = $GLOBALS['tplEngine']->createTemplate('admin_backoffice_home_block.tpl');
136  $tpl->assign('bg_src', $GLOBALS['repertoire_images'] .'/'. get_block_header_image(String::strtolower($title_bg_color)));
137  $tpl->assign('title_bg_color', $title_bg_color);
138  $tpl->assign('link', $block_content['link']);
139  $tpl->assign('title', $block_content['title']);
140  $tpl->assign('logo', $block_content['logo']);
141  $tpl->assign('description1', vb($block_content['description1']));
142  $tpl->assign('description2', vb($block_content['description2']));
143 
144  if ($return_mode) {
145  return $tpl->fetch();
146  } else {
147  echo $tpl->fetch();
148  }
149 }
150 
157 function get_block_header_image($title_bg_color)
158 {
159  if (!in_array($title_bg_color, array('green', 'blue', 'orange', 'purple', 'red'))) {
160  $title_bg_color = 'gray';
161  }
162  return 'block_header_' . $title_bg_color . '.jpg';
163 }
164 
171 function get_home_block_content($content_code)
172 {
173  $block_content = array();
174  switch ($content_code) {
175  case 'orders':
176  $block_content['title'] = $GLOBALS['STR_ADMIN_INDEX_ORDERS_LIST'];
177  $block_content['logo'] = $GLOBALS['repertoire_images'] . '/orders.jpg';
178  $block_content['link'] = $GLOBALS['administrer_url'] . '/commander.php';
179 
180  $tpl1 = $GLOBALS['tplEngine']->createTemplate('admin_home_orders_desc1.tpl');
181  $tpl1->assign('src', $GLOBALS['repertoire_images'] . '/arrow_right.jpg');
182  $tpl1->assign('link', $block_content['link']);
183  $tpl1->assign('STR_ADMIN_INDEX_ORDERS_DESC1', $GLOBALS['STR_ADMIN_INDEX_ORDERS_DESC1']);
184  $tpl1->assign('STR_ADMIN_INDEX_SHOW_ORDERS', $GLOBALS['STR_ADMIN_INDEX_SHOW_ORDERS']);
185  $block_content['description1'] = $tpl1->fetch();
186 
187  $tpl2 = $GLOBALS['tplEngine']->createTemplate('admin_home_orders_desc2.tpl');
188  $tpl_results = array();
189  $qid = query("SELECT *
190  FROM peel_commandes
191  WHERE " . get_filter_site_cond('commandes', null, true) . "
192  ORDER BY id DESC
193  LIMIT 0,5");
194  $i = 0;
195 
196  while ($r = fetch_object($qid)) {
197  if (check_if_module_active('fianet')) {
198  // Même si la fonction get_sac_status permet de passer un tableau d'id de commande en paramètre, l'appel de la fonction ce fait ici pour des raisons
199  // de simplicité pour le moment. Une amélioration possible est d'appeler la fonction avant le while.
200  $get_sac_status = get_sac_status($r->id, false);
201  $this_sac_status = $get_sac_status[$order['order_id']];
202  }
204  $montant_displayed = $r->montant;
205  } else {
206  $montant_displayed = $r->montant_ht;
207  }
208  $tpl_results[] = array('tr_rollover' => tr_rollover($i, true, 'cursor:pointer', 'document.location=\'' . $GLOBALS['administrer_url'] . '/commander.php?mode=modif&amp;commandeid=' . $r->id . '\''),
209  'id' => $r->order_id,
210  'nom_bill' => $r->nom_bill,
211  'date' => get_formatted_date($r->o_timestamp, 'short', true),
212  'prix' => str_replace(' ', '&nbsp;', fprix($montant_displayed, true, $r->devise, true, $r->currency_rate)) . '<br />' . String::str_shorten(get_payment_name($r->paiement), 30, '', '...'),
213  'statut_paiement' => get_payment_status_name($r->id_statut_paiement),
214  'this_sac_status' => vb($this_sac_status)
215  );
216  $i++;
217  }
218  $tpl2->assign('results', $tpl_results);
219  $tpl2->assign('ttc_ht', (display_prices_with_taxes_in_admin() ? $GLOBALS['STR_TTC'] : $GLOBALS['STR_HT']));
220  $tpl2->assign('is_fianet_sac_module_active', check_if_module_active('fianet_sac'));
221  $tpl2->assign('STR_BEFORE_TWO_POINTS', $GLOBALS['STR_BEFORE_TWO_POINTS']);
222  $tpl2->assign('STR_ADMIN_INDEX_ORDERS_DESC2', $GLOBALS['STR_ADMIN_INDEX_ORDERS_DESC2']);
223  $tpl2->assign('STR_ADMIN_ID', $GLOBALS['STR_ADMIN_ID']);
224  $tpl2->assign('STR_DATE', $GLOBALS['STR_DATE']);
225  $tpl2->assign('STR_TOTAL', $GLOBALS['STR_TOTAL']);
226  $tpl2->assign('STR_PAYMENT', $GLOBALS['STR_PAYMENT']);
227  $tpl2->assign('STR_ADMIN_INDEX_FIANET_VALIDATION', $GLOBALS['STR_ADMIN_INDEX_FIANET_VALIDATION']);
228  $tpl2->assign('STR_ADMIN_NAME', $GLOBALS['STR_ADMIN_NAME']);
229  $block_content['description2'] = $tpl2->fetch();
230  break;
231 
232  case 'sales':
233  $block_content['title'] = $GLOBALS['STR_ADMIN_INDEX_SALES_REPORT'];
234  $block_content['logo'] = $GLOBALS['repertoire_images'] . '/sales.jpg';
235  $block_content['link'] = $GLOBALS['administrer_url'] . '/ventes.php';
236 
237  $tpl1 = $GLOBALS['tplEngine']->createTemplate('admin_home_sales_desc1.tpl');
238  $tpl1->assign('src', $GLOBALS['repertoire_images'] . '/arrow_right.jpg');
239  $tpl1->assign('link', $block_content['link']);
240  $tpl1->assign('STR_ADMIN_INDEX_SALES_DESC1', $GLOBALS["STR_ADMIN_INDEX_SALES_DESC1"]);
241  $tpl1->assign('STR_ADMIN_INDEX_SALES_LINK', $GLOBALS["STR_ADMIN_INDEX_SALES_LINK"]);
242  $block_content['description1'] = $tpl1->fetch();
243 
244  if (check_if_module_active('chart', 'open-flash-chart.php')) {
245  $tpl2 = $GLOBALS['tplEngine']->createTemplate('admin_home_sales_desc2.tpl');
246  if(vb($GLOBALS['site_parameters']['chart_product']) == 'flot') {
247  $tpl2->assign('flash_chart', get_flot_chart('100%', 190, $GLOBALS['administrer_url'] . '/chart-data.php?type=sales&date1=' . date('Y-m-d', time() - 3600 * 24 * 30) . '&date2=' . date('Y-m-d', time()) . '&width=288', 'bar', $GLOBALS['wwwroot_in_admin'] . '/modules/chart/', 'date_format_veryshort'));
248  } else {
249  $tpl2->assign('flash_chart', open_flash_chart_object_str('100%', 190, $GLOBALS['administrer_url'] . '/chart-data.php?type=sales&date1=' . date('Y-m-d', time() - 3600 * 24 * 30) . '&date2=' . date('Y-m-d', time()) . '&width=288', true, $GLOBALS['wwwroot_in_admin'] . '/modules/chart/'));
250  }
251  $tpl2->assign('STR_ADMIN_INDEX_LAST_SALES', $GLOBALS['STR_ADMIN_INDEX_LAST_SALES']);
252  $tpl2->assign('STR_BEFORE_TWO_POINTS', $GLOBALS['STR_BEFORE_TWO_POINTS']);
253  $block_content['description2'] = $tpl2->fetch();
254  }
255  break;
256 
257  case 'products':
258  $block_content['title'] = $GLOBALS['STR_ADMIN_INDEX_PRODUCTS_REPORT'];
259  $block_content['logo'] = $GLOBALS['repertoire_images'] . '/products.jpg';
260  $block_content['link'] = $GLOBALS['administrer_url'] . '/produits.php';
261 
262  $tpl1 = $GLOBALS['tplEngine']->createTemplate('admin_home_products_desc1.tpl');
263  $tpl1->assign('src', $GLOBALS['repertoire_images'] . '/arrow_right.jpg');
264  $tpl1->assign('link', $block_content['link']);
265  $tpl1->assign('STR_ADMIN_INDEX_PRODUCTS_REPORT', $GLOBALS["STR_ADMIN_INDEX_PRODUCTS_REPORT"]);
266  $tpl1->assign('STR_ADMIN_INDEX_PRODUCTS_DESC1', $GLOBALS["STR_ADMIN_INDEX_PRODUCTS_DESC1"]);
267  $block_content['description1'] = $tpl1->fetch();
268  if (check_if_module_active('chart', 'open-flash-chart.php')) {
269  $tpl2 = $GLOBALS['tplEngine']->createTemplate('admin_home_products_desc2.tpl');
270  if(vb($GLOBALS['site_parameters']['chart_product']) == 'flot') {
271  $tpl2->assign('flash_chart', get_flot_chart('100%', 190, $GLOBALS['administrer_url'] . '/chart-data.php?type=product-categories&date1=' . date('Y-m-d', time() - 3600 * 24 * 7) . '&date2=' . date('Y-m-d', time()) . '&width=288', 'pie', $GLOBALS['wwwroot_in_admin'] . '/modules/chart/'));
272  } else {
273  $tpl2->assign('flash_chart', open_flash_chart_object_str('100%', 190, $GLOBALS['administrer_url'] . '/chart-data.php?type=product-categories&date1=' . date('Y-m-d', time() - 3600 * 24 * 7) . '&date2=' . date('Y-m-d', time()) . '&width=288', true, $GLOBALS['wwwroot_in_admin'] . '/modules/chart/'));
274  }
275  $tpl2->assign('STR_ADMIN_PRODUCTS_CATEGORY', $GLOBALS['STR_ADMIN_PRODUCTS_CATEGORY']);
276  $tpl2->assign('STR_BEFORE_TWO_POINTS', $GLOBALS['STR_BEFORE_TWO_POINTS']);
277  $block_content['description2'] = $tpl2->fetch();
278  }
279  break;
280 
281  case 'delivery':
282  $block_content['title'] = $GLOBALS['STR_ADMIN_INDEX_DELIVERY_REPORT'];
283  $block_content['logo'] = $GLOBALS['repertoire_images'] . '/delivery.jpg';
284  $block_content['link'] = $GLOBALS['administrer_url'] . '/livraisons.php';
285 
286  $tpl1 = $GLOBALS['tplEngine']->createTemplate('admin_home_delivery_desc1.tpl');
287  $tpl1->assign('src', $GLOBALS['repertoire_images'] . '/arrow_right.jpg');
288  $tpl1->assign('link', $block_content['link']);
289  $tpl1->assign('STR_ADMIN_INDEX_DELIVERY_DESC1', $GLOBALS['STR_ADMIN_INDEX_DELIVERY_DESC1']);
290  $tpl1->assign('STR_ADMIN_INDEX_GENERATE_REPORT', $GLOBALS['STR_ADMIN_INDEX_GENERATE_REPORT']);
291  $block_content['description1'] = $tpl1->fetch();
292 
293  $tpl2 = $GLOBALS['tplEngine']->createTemplate('admin_home_delivery_desc2.tpl');
294  $tpl_results = array();
295  $qid = query("SELECT c.*
296  FROM peel_commandes c
297  LEFT JOIN peel_statut_paiement sp ON sp.id=c.id_statut_paiement AND " . get_filter_site_cond('statut_paiement', 'sp') . "
298  LEFT JOIN peel_statut_livraison sl ON sl.id=c.id_statut_livraison AND " . get_filter_site_cond('statut_livraison', 'sl') . "
299  WHERE " . get_filter_site_cond('commandes', 'c', true) . " AND sp.technical_code IN ('being_checked','completed') AND sl.technical_code!='dispatched'
300  ORDER BY c.id DESC
301  LIMIT 0,5");
302  $i = 0;
303  while ($r = fetch_object($qid)) {
304  $tpl_results[] = array('tr_rollover' => tr_rollover($i, true, 'cursor:pointer', 'document.location=\'' . $GLOBALS['administrer_url'] . '/commander.php?mode=modif&amp;commandeid=' . $r->id . '\''),
305  'id' => $r->id,
306  'nom_bill' => $r->nom_bill,
307  'date' => get_formatted_date($r->o_timestamp, 'short', true),
308  'prix' => str_replace(' ', '&nbsp;', fprix($r->montant, true, $r->devise, true, $r->currency_rate)) . '<br />' . String::str_shorten(get_payment_name($r->paiement), 30, '', '...'),
309  'statut_livraison' => get_delivery_status_name($r->id_statut_livraison)
310  );
311  $i++;
312  }
313  $tpl2->assign('results', $tpl_results);
314  $tpl2->assign('STR_ADMIN_INDEX_DELIVERY_DESC2', $GLOBALS['STR_ADMIN_INDEX_DELIVERY_DESC2']);
315  $tpl2->assign('STR_BEFORE_TWO_POINTS', $GLOBALS['STR_BEFORE_TWO_POINTS']);
316  $tpl2->assign('STR_ADMIN_ID', $GLOBALS['STR_ADMIN_ID']);
317  $tpl2->assign('STR_ADMIN_NAME', $GLOBALS['STR_ADMIN_NAME']);
318  $tpl2->assign('STR_DATE', $GLOBALS['STR_DATE']);
319  $tpl2->assign('STR_TOTAL', $GLOBALS['STR_TOTAL']);
320  $tpl2->assign('STR_TTC', $GLOBALS['STR_TTC']);
321  $tpl2->assign('STR_DELIVERY', $GLOBALS['STR_DELIVERY']);
322  $block_content['description2'] = $tpl2->fetch();
323  break;
324 
325  case 'users':
326  $block_content['title'] = $GLOBALS['STR_ADMIN_INDEX_USERS_LIST'];
327  $block_content['logo'] = $GLOBALS['repertoire_images'] . '/users.jpg';
328  $block_content['link'] = $GLOBALS['administrer_url'] . '/utilisateurs.php';
329  $tpl1 = $GLOBALS['tplEngine']->createTemplate('admin_home_users_desc1.tpl');
330  $tpl1->assign('src', $GLOBALS['repertoire_images'] . '/arrow_right.jpg');
331  $tpl1->assign('link', $block_content['link']);
332  $tpl1->assign('STR_ADMIN_INDEX_USERS_DESC1', $GLOBALS["STR_ADMIN_INDEX_USERS_DESC1"]);
333  $tpl1->assign('STR_ADMIN_INDEX_USERS_LINK', $GLOBALS["STR_ADMIN_INDEX_USERS_LINK"]);
334  $block_content['description1'] = $tpl1->fetch();
335  if (check_if_module_active('chart', 'open-flash-chart.php')) {
336  $tpl2 = $GLOBALS['tplEngine']->createTemplate('admin_home_users_desc2.tpl');
337  if(vb($GLOBALS['site_parameters']['chart_product']) == 'flot') {
338  $tpl2->assign('flash_chart', get_flot_chart('100%', 170, $GLOBALS['administrer_url'] . '/chart-data.php?type=users-count&date1=' . date('Y-m-d', time() - 3600 * 24 * 30) . '&date2=' . date('Y-m-d', time()) . '&width=288', 'line', $GLOBALS['wwwroot_in_admin'] . '/modules/chart/', 'date_format_veryshort'));
339  } else {
340  $tpl2->assign('flash_chart', open_flash_chart_object_str('100%', 170, $GLOBALS['administrer_url'] . '/chart-data.php?type=users-count&date1=' . date('Y-m-d', time() - 3600 * 24 * 30) . '&date2=' . date('Y-m-d', time()) . '&width=288', true, $GLOBALS['wwwroot_in_admin'] . '/modules/chart/'));
341  }
342  $tpl2->assign('STR_ADMIN_INDEX_LAST_USERS', $GLOBALS['STR_ADMIN_INDEX_LAST_USERS']);
343  $tpl2->assign('STR_BEFORE_TWO_POINTS', $GLOBALS['STR_BEFORE_TWO_POINTS']);
344  $block_content['description2'] = $tpl2->fetch();
345  }
346  break;
347 
348  case 'peel':
349  $block_content['title'] = $GLOBALS['STR_ADMIN_INDEX_PEEL_BLOCK_TITLE'];
350  $block_content['logo'] = '';
351  $block_content['link'] = 'https://www.peel.fr/';
352  $tpl1 = $GLOBALS['tplEngine']->createTemplate('admin_home_peel_desc1.tpl');
353  $tpl1->assign('src', $GLOBALS['repertoire_images'] . '/arrow_right.jpg');
354  $tpl1->assign('STR_ADMIN_INDEX_PEEL_DESC1', $GLOBALS['STR_ADMIN_INDEX_PEEL_DESC1']);
355  $tpl1->assign('STR_ADMIN_INDEX_PEEL_LAST_OFFERS', $GLOBALS['STR_ADMIN_INDEX_PEEL_LAST_OFFERS']);
356  $tpl1->assign('last_offers_href', 'https://www.peel.fr/solution-e-commerce-1/peel-premium-1.html');
357  $tpl1->assign('STR_ADMIN_INDEX_CUSTOM_MODULES', $GLOBALS['STR_ADMIN_INDEX_CUSTOM_MODULES']);
358  $tpl1->assign('custom_modules_href', 'https://www.peel.fr/achat/modules-a-la-carte-4.html');
359  $tpl1->assign('STR_ADMIN_CONTACT_US', $GLOBALS['STR_ADMIN_CONTACT_US']);
360  $tpl1->assign('contact_us_href', 'https://www.peel.fr/utilisateurs/contact.php');
361  $block_content['description1'] = $tpl1->fetch();
362 
363  $tpl2 = $GLOBALS['tplEngine']->createTemplate('admin_home_peel_desc2.tpl');
364  $tpl2->assign('link', $block_content['link']);
365  $tpl2->assign('src', $GLOBALS['repertoire_images'] . '/peel.jpg');
366  $block_content['description2'] = $tpl2->fetch();
367  break;
368  default:
369  $block_content = null;
370  break;
371  }
372  return $block_content;
373 }
374 
get_payment_status_name($id)
get_payment_status_name()
Definition: order.php:1065
get_current_url($with_get=true, $get_short_url=false, $take_away_get_args_array=null)
get_current_url()
Definition: fonctions.php:1743
$tpl
Definition: index.php:69
get_delivery_status_name($id)
get_delivery_status_name()
Definition: order.php:1088
redirect_and_die($url, $permanent_redirection=false, $avoid_loop=false)
Redirige vers l'URL demandée et arrête le programme.
Definition: fonctions.php:1551
get_site_id_select_options($selected_site_id=null, $selected_site_name=null, $display_first_option=null, $select_current_site_id_by_default=false)
Créer les options pour le select qui liste les noms de sites configurés en back office.
if(!defined('IN_PEEL')) display_prices_with_taxes_in_admin()
display_prices_with_taxes_in_admin()
static strtolower($string)
Returns string with all alphabetic characters converted to lowercase.
Definition: String.php:135
if(!defined('IN_PEEL')) get_flot_chart($width, $height, $url, $chart_type= 'bar', $base= '', $x_format= 'raw')
get_flot_chart()
Definition: flot.php:29
if(isset($_POST['admin_multisite'])) $q
Definition: index.php:40
get_block_header_image($title_bg_color)
get_block_header_image()
Definition: index.php:157
necessite_priv($priv, $demo_allowed=true, $configuration_modification=false)
Cette fonction vérifie si l'utilisateur a les privilèges de $priv.
Definition: fonctions.php:1575
get_filter_site_cond($table_technical_code, $table_alias=null, $use_strict_rights_if_in_admin=false, $specific_site_id=null, $exclude_public_items=false, $admin_force_multisite_if_allowed=false)
Retourne la condition SQL permettant de filtrer les données pour une table.
Definition: fonctions.php:4643
query($query, $die_if_error=false, $database_object=null, $silent_if_error=false, $security_sql_filter=true)
The query() function is meant to be called anywhere you want to make a query.
Definition: database.php:158
vb(&$var, $default=null)
Variable blanche if $var n'est pas défini, retourne $default, sinon retourne $var.
Definition: format.php:97
$orders_count_object
Definition: index.php:53
necessite_identification()
Si l'utilisateur n'est pas connecté à un compte, on affiche une page d'identification et arrête le sc...
Definition: fonctions.php:1596
fetch_object($query_result)
fetch_object()
Definition: database.php:302
call_module_hook($hook, $params, $mode= 'boolean')
Appelle la fonction correspondant au $hook pour chaque module installé La fonction doit s'appeler : [...
get_formatted_date($datetime_or_timestamp=null, $mode= 'short', $hour_minute=false)
Afficher une date formatée, en évitant les problèmes liés aux noms de mois sur les serveurs qui ne so...
Definition: format.php:440
$paid_orders_delivered_count_object
Definition: index.php:67
$users_count_object
Definition: index.php:48
get_all_sites_name_array($admin_force_multisite_if_allowed=false, $allow_null_site_id=false, $skip_rights_check=false)
Retourne un tableau des noms des sites configurés en fonction des droits de l'administrateur.
Definition: fonctions.php:4792
const PEEL_VERSION(version_compare(PHP_VERSION, '5.1.2', '<'))
$paid_orders_to_deliver_count_object
Definition: index.php:60
if(check_if_module_active('phone_cti')&&check_if_module_active('multisite')) $delivery
Definition: index.php:83
$output
Definition: index.php:61
if(!defined('IN_PEEL')) open_flash_chart_object_str($width, $height, $url, $use_swfobject=true, $base= '')
open_flash_chart_object_str()
backoffice_home_block($block_content, $title_bg_color, $return_mode=false)
backoffice_home_block()
Definition: index.php:130
get_data_lang()
get_data_lang()
a_priv($requested_priv, $demo_allowed=false, $site_configuration_modification=false, $user_id=null)
Renvoie true si l'utilisateur de la session a le privilège $requested_priv ou un droit supérieur Des ...
Definition: user.php:63
$GLOBALS['page_name']
Definition: index.php:28
fprix($price, $display_currency=false, $currency_code_or_default=null, $convertion_needed_into_currency=true, $currency_rate=null, $display_iso_currency_code=false, $format=true, $force_format_separator=null, $add_rdfa_properties=false, $round_even_if_no_format=false)
fprix formatte le prix donné en le convertissant si nécessaire au préalable et en ajoutant éventuelle...
Definition: fonctions.php:242
get_payment_name($id_or_code)
get_payment_name()
Definition: order.php:1046
check_if_module_active($module_name, $specific_file_name=null)
Renvoie si un module est présent et activé ou non - Peut être appelé avant ou après le chargement d'u...
static str_shorten($string, $length_limit, $middle_separator= '', $ending_if_no_middle_separator= '...', $ideal_length_with_clean_cut_if_possible=null)
Raccourcit une chaine de caractère en insérant au milieu ou à la fin un séparateur.
Definition: String.php:233
get_home_block_content($content_code)
get_home_block_content()
Definition: index.php:171
$_SESSION['session_install_serveur']
Definition: index.php:23
$products_count_object
Definition: index.php:43

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:28:54 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.