14 define(
'IN_PEEL_ADMIN',
true);
15 include(
"../configuration.inc.php");
20 include(
$GLOBALS[
'repertoire_modele'] .
"/admin_haut.php");
25 switch (
vb($_REQUEST[
'mode'])) {
27 if (!empty($_POST[
'on_child'])) {
64 if (!
verify_token($_SERVER[
'PHP_SELF'] . $frm[
'mode'] . $frm[
'id'])) {
69 if (!empty($_POST[
'on_child'])) {
73 echo
$GLOBALS[
'tplEngine']->createTemplate(
'global_success.tpl', array(
'message' => sprintf(
$GLOBALS[
'STR_ADMIN_MSG_CHANGES_OK'], $_POST[
'id'])))->fetch();
84 if (isset($_GET[
'position']) && !empty($_GET[
'id'])) {
85 $qid =
query(
"SELECT *
87 WHERE id = " . intval($_GET[
'id']).
" AND " .
get_filter_site_cond(
'categories', null,
true) .
"");
90 $qid =
query(
'UPDATE peel_categories
91 SET position="' . intval(
$result[
'position']) .
'"
92 WHERE parent_id="' . intval(
$result[
'parent_id']) .
'" AND position="' . intval($_GET[
'position']) .
'" AND ' .
get_filter_site_cond(
'categories', null,
true) .
'');
94 query(
'UPDATE peel_categories
95 SET position="' . intval($_GET[
'position']) .
'"
96 WHERE id="' . intval($_GET[
'id']) .
'" AND ' .
get_filter_site_cond(
'categories', null,
true) .
'');
106 include(
$GLOBALS[
'repertoire_modele'] .
"/admin_bas.php");
119 $sql =
"SELECT c.id AS categorie_id
120 FROM peel_categories c
121 WHERE c.parent_id='" . intval($parent_id) .
"' AND " .
get_filter_site_cond(
'categories',
'c',
true) .
"
126 $sql =
"UPDATE peel_categories
128 WHERE id=" . intval($cat[
'categorie_id'].
" AND " .
get_filter_site_cond(
'categories', null,
true) .
"");
147 $sql =
"SELECT c.id, c.reference, c.nom_" .
$_SESSION[
'session_langue'] .
", c.etat, c.site_id, c.position, c.nb, c.image_" .
$_SESSION[
'session_langue'] .
"";
149 $sql .=
", c.promotion_devises, c.promotion_percent";
151 $sql .=
' FROM peel_categories c
152 WHERE c.parent_id = "' . intval($parent_id) .
'" AND ' .
get_filter_site_cond(
'categories',
'c',
true) .
'
153 ORDER BY c.position' . (!empty(
$GLOBALS[
'site_parameters'][
'category_primary_order_by'])?
", c." .
$GLOBALS[
'site_parameters'][
'category_primary_order_by'] :
'') .
'';
158 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'admin_arbo_categorie.tpl');
160 if ($cat[
'image_' .
$_SESSION[
'session_langue']] !=
"") {
161 $this_thumb =
thumbs($cat[
'image_' .
$_SESSION[
'session_langue']], 80, 50,
'fit');
162 $tpl->assign(
'image', array(
'src' =>
$GLOBALS[
'repertoire_upload'] .
'/thumbs/' . $this_thumb,
163 'name' => $cat[
'image_' . $_SESSION[
'session_langue']]
166 $tpl->assign(
'image', null);
168 $tpl->assign(
'tr_rollover', tr_rollover($first_line,
true));
170 $tpl->assign(
'ajout_cat_src',
$GLOBALS[
'administrer_url'] .
'/images/rubrique-24.gif');
171 $tpl->assign(
'ajout_prod_href',
$GLOBALS[
'administrer_url'] .
'/produits.php?mode=ajout&categories=' . $cat[
'id']);
172 $tpl->assign(
'ajout_prod_src',
$GLOBALS[
'administrer_url'] .
'/images/prod-cat-24.gif');
174 $tpl->assign(
'drop_src',
$GLOBALS[
'administrer_url'] .
'/images/b_drop.png');
175 $tpl->assign(
'cat_id', $cat[
'id']);
176 $tpl->assign(
'indent', $indent);
178 $tpl->assign(
'cat_nom', (!empty($cat[
'nom_' .
$_SESSION[
'session_langue']])?$cat[
'nom_' . $_SESSION[
'session_langue']]:
'['.$cat[
'id'].
']'));
181 $tpl->assign(
'promotion', array(
'percent' => number_format($cat[
'promotion_percent'], 2),
182 'prix' =>
fprix($cat[
'promotion_devises'],
true,
$GLOBALS[
'site_parameters'][
'code'],
false)
185 $tpl->assign(
'promotion', null);
188 $tpl->assign(
'depth', $depth);
189 $tpl->assign(
'up_src',
$GLOBALS[
'administrer_url'] .
'/images/up.gif');
190 $tpl->assign(
'desc_src',
$GLOBALS[
'administrer_url'] .
'/images/desc.gif');
191 $tpl->assign(
'cat_position', $cat[
'position']);
192 if ($cat[
'position'] > 1) {
193 $tpl->assign(
'up_href',
get_current_url(
false) .
'?mode=modif_etat&id=' . $cat[
'id'] .
'&position=' . ($cat[
'position'] - 1));
195 $tpl->assign(
'up_href', null);
197 $tpl->assign(
'desc_href',
get_current_url(
false) .
'?mode=modif_etat&id=' . $cat[
'id'] .
'&position=' . ($cat[
'position'] + 1));
198 $tpl->assign(
'etat_onclick',
'change_status("categories", "' . $cat[
'id'] .
'", this, "'.
$GLOBALS[
'administrer_url'] .
'")');
199 $tpl->assign(
'modif_src', $GLOBALS[
'administrer_url'] .
'/images/' . (empty($cat[
'etat']) ?
'puce-blanche.gif' :
'puce-verte.gif'));
200 $tpl->assign(
'STR_ADMIN_LEVEL', $GLOBALS[
'STR_ADMIN_LEVEL']);
201 $tpl->assign(
'STR_NUMBER', $GLOBALS[
'STR_NUMBER']);
202 $tpl->assign(
'STR_DELETE', $GLOBALS[
'STR_DELETE']);
203 $tpl->assign(
'STR_ADMIN_CATEGORIES_ADD_SUBCATEGORY', $GLOBALS[
'STR_ADMIN_CATEGORIES_ADD_SUBCATEGORY']);
204 $tpl->assign(
'STR_ADMIN_CATEGORIES_ADD_PRODUCT', $GLOBALS[
'STR_ADMIN_CATEGORIES_ADD_PRODUCT']);
205 $tpl->assign(
'STR_ADMIN_CATEGORIES_DELETE_CATEGORY', $GLOBALS[
'STR_ADMIN_CATEGORIES_DELETE_CATEGORY']);
206 $tpl->assign(
'STR_ADMIN_DELETE_WARNING', $GLOBALS[
'STR_ADMIN_DELETE_WARNING']);
207 $sortie .=
$tpl->fetch();
209 if ($cat[
'id'] != $parent_id) {
210 affiche_arbo_categorie($sortie, $selectionne, $cat[
'id'], $indent .
" ", $first_line, $depth + 1);
224 foreach (
$GLOBALS[
'admin_lang_codes'] as $lng) {
225 $frm[
'nom_' . $lng] =
"";
226 $frm[
'description_' . $lng] =
"";
227 $frm[
'meta_titre_' . $lng] =
"";
228 $frm[
'meta_key_' . $lng] =
"";
229 $frm[
'meta_desc_' . $lng] =
"";
230 $frm[
'header_html_' . $lng] =
"";
231 $frm[
'image_' . $lng] =
"";
232 $frm[
'sentence_displayed_on_product_' . $lng] =
"";
234 $frm[
'position'] = 0;
236 $frm[
'on_special'] =
"";
237 $frm[
'technical_code'] =
"";
238 $frm[
'on_carrousel'] =
"";
239 $frm[
'background_menu'] =
$frm[
'background_color'] =
"#";
240 $frm[
'type_affichage'] = 0;
242 $frm[
'promotion_devises'] = 0;
243 $frm[
'promotion_percent'] = 0;
244 $frm[
'on_child'] = 0;
248 $frm[
'site_id'] =
'';
249 $frm[
'nouveau_mode'] =
"insere";
251 $frm[
"titre_soumet"] =
$GLOBALS[
'STR_ADMIN_CATEGORIES_FORM_ADD_BUTTON'];
266 $qid =
query(
"SELECT *
271 echo
$GLOBALS[
'tplEngine']->createTemplate(
'global_error.tpl', array(
'message' => sprintf(
$GLOBALS[
'STR_ADMIN_CATEGORIES_ERR_NOT_FOUND'],
$id)))->fetch();
275 $frm[
"nouveau_mode"] =
"maj";
276 $frm[
"titre_soumet"] =
$GLOBALS[
'STR_ADMIN_CATEGORIES_FORM_MODIFY'];
289 $qid =
query(
"SELECT cat.nom_" .
$_SESSION[
'session_langue'] .
" AS category_name, cat.parent_id, parent_id.nom_" .
$_SESSION[
'session_langue'] .
" AS parent_category_name
290 FROM peel_categories cat
291 LEFT JOIN peel_categories parent_id ON parent_id.id = cat.parent_id
294 query(
"UPDATE peel_produits_categories
295 SET categorie_id = '" . intval($cat[
"parent_id"]) .
"'
296 WHERE categorie_id = '" . intval(
$id) .
"'");
297 query(
"UPDATE peel_categories
298 SET parent_id = '" . $cat[
"parent_id"] .
"'
302 $message =
$GLOBALS[
'tplEngine']->createTemplate(
'global_error.tpl', array(
'message' => sprintf(
$GLOBALS[
'STR_ADMIN_CATEGORIES_ERR_NOT_FOUND'],
$id)))->fetch();
318 foreach (
$GLOBALS[
'admin_lang_codes'] as $lng) {
319 $frm[
'image_' . $lng] =
upload(
'image_' . $lng,
false,
'image_or_pdf',
$GLOBALS[
'site_parameters'][
'image_max_width'],
$GLOBALS[
'site_parameters'][
'image_max_height'], null, null,
vb(
$frm[
'image_' . $lng]));
325 $sql =
'INSERT INTO peel_categories (parent_id
336 $sql .=
', promotion_devises
340 foreach (
$GLOBALS[
'admin_lang_codes'] as $lng) {
344 , description_" . $lng .
'
345 , meta_titre_' . $lng .
'
346 , meta_key_' . $lng .
'
347 , meta_desc_' . $lng .
'
349 , header_html_' . $lng .
'
350 , sentence_displayed_on_product_' . $lng;
352 $sql .=
") VALUES (" . intval(
$frm[
'parent_id']) .
"
353 , '" . intval(
$frm[
'etat']) .
"'
354 , '" . intval(
vn(
$frm[
'on_special'])) .
"'
356 , '" . intval(
vn(
$frm[
'on_carrousel'])) .
"'
357 , '" . intval(
$frm[
'position']) .
"'
358 , '" . intval(
$frm[
'type_affichage']) .
"'
365 , '" . intval(
$frm[
'on_child']) .
"'";
367 foreach (
$GLOBALS[
'admin_lang_codes'] as $lng) {
382 if (!empty($categorie_id)) {
383 echo
$GLOBALS[
'tplEngine']->createTemplate(
'global_success.tpl', array(
'message' => sprintf(
$GLOBALS[
'STR_ADMIN_CATEGORIES_MSG_CREATED_OK'], $categorie_id)))->fetch();
386 $this_cache_object =
new Cache(null, array(
'group' =>
'categories'));
387 $this_cache_object->delete_cache_file(
true);
388 unset($this_cache_object);
390 echo
$GLOBALS[
'tplEngine']->createTemplate(
'global_error.tpl', array(
'message' =>
$GLOBALS[
'STR_ADMIN_ERR_CHOOSE_TITLE']))->fetch();
404 if (empty(
$frm[
'parent_id']) ||
$frm[
'parent_id'] ==
$id) {
405 $frm[
'parent_id'] = 0;
407 foreach (
$GLOBALS[
'admin_lang_codes'] as $lng) {
408 $frm[
'image_' . $lng] =
upload(
'image_' . $lng,
false,
'image_or_pdf',
$GLOBALS[
'site_parameters'][
'image_max_width'],
$GLOBALS[
'site_parameters'][
'image_max_height'], null, null,
vb(
$frm[
'image_' . $lng]));
414 $sql =
"UPDATE peel_categories
415 SET parent_id = '" . intval(
$frm[
'parent_id']) .
"'
416 , etat = '" . intval(
$frm[
'etat']) .
"'
417 , position = '" . intval(
$frm[
'position']) .
"'
418 , on_special = '" . intval(
vn(
$frm[
'on_special'])) .
"'
420 , on_carrousel = '" . intval(
vn(
$frm[
'on_carrousel'])) .
"'
421 , type_affichage = '" . intval(
$frm[
'type_affichage']) .
"'
428 , on_child = '" . intval(
$frm[
'on_child']) .
"'";
431 foreach (
$GLOBALS[
'admin_lang_codes'] as $lng) {
440 , sentence_displayed_on_product_" . $lng .
" = '" .
real_escape_string(
vb(
$frm[
'sentence_displayed_on_product_' . $lng])) .
"'";
446 $this_cache_object =
new Cache(null, array(
'group' =>
'categories'));
447 $this_cache_object->delete_cache_file(
true);
448 unset($this_cache_object);
472 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'admin_liste_categorie.tpl');
474 $tpl->assign(
'add_src',
$GLOBALS[
'administrer_url'] .
'/images/add.png');
476 $tpl->assign(
'cat_src',
$GLOBALS[
'administrer_url'] .
'/images/rubrique-24.gif');
477 $tpl->assign(
'prod_src',
$GLOBALS[
'administrer_url'] .
'/images/prod-cat-24.gif');
478 $tpl->assign(
'drop_src',
$GLOBALS[
'administrer_url'] .
'/images/b_drop.png');
480 $tpl->assign(
'categorie_options', $categorie_output);
481 $tpl->assign(
'STR_ADMIN_CATEGORIES_LIST_TITLE',
$GLOBALS[
'STR_ADMIN_CATEGORIES_LIST_TITLE']);
482 $tpl->assign(
'STR_ADMIN_CATEGORIES_CREATE',
$GLOBALS[
'STR_ADMIN_CATEGORIES_CREATE']);
483 $tpl->assign(
'STR_ADMIN_CATEGORIES_ADD_SUBCATEGORY',
$GLOBALS[
'STR_ADMIN_CATEGORIES_ADD_SUBCATEGORY']);
484 $tpl->assign(
'STR_ADMIN_CATEGORIES_ADD_PRODUCT',
$GLOBALS[
'STR_ADMIN_CATEGORIES_ADD_PRODUCT']);
485 $tpl->assign(
'STR_ADMIN_CATEGORIES_DELETE_CATEGORY',
$GLOBALS[
'STR_ADMIN_CATEGORIES_DELETE_CATEGORY']);
486 $tpl->assign(
'STR_ADMIN_ACTION',
$GLOBALS[
'STR_ADMIN_ACTION']);
489 $tpl->assign(
'STR_ADMIN_CATEGORIES',
$GLOBALS[
'STR_ADMIN_CATEGORIES']);
491 $tpl->assign(
'STR_PROMOTION',
$GLOBALS[
'STR_PROMOTION']);
492 $tpl->assign(
'STR_ADMIN_POSITION',
$GLOBALS[
'STR_ADMIN_POSITION']);
494 $tpl->assign(
'STR_ADMIN_TECHNICAL_CODE',
$GLOBALS[
'STR_ADMIN_TECHNICAL_CODE']);
505 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'admin_formulaire_categorie.tpl');
508 $tpl->assign(
'mode',
$frm[
"nouveau_mode"]);
509 $tpl->assign(
'id', intval(
$frm[
'id']));
511 if (
$frm[
'nouveau_mode'] ==
"maj") {
512 $tpl->assign(
'cat_href', get_product_category_url(
$frm[
'id'],
$frm[
'nom_' . $_SESSION[
'session_langue']]),
false,
false,
vb(
$frm[
'site_id']));
514 $tpl->assign(
'issel_parent_zero',
vb(
$frm[
'parent_id']) == 0);
515 $tpl->assign(
'categorie_options', get_categories_output(null,
'categories',
$frm[
'parent_id'],
'option',
' ', null, null,
true, 80));
516 $tpl->assign(
'is_on_special', !empty(
$frm[
'on_special']));
517 $tpl->assign(
'technical_code',
vb(
$frm[
"technical_code"]));
519 $tpl->assign(
'is_on_carrousel', !empty(
$frm[
'on_carrousel']));
520 $tpl->assign(
'position',
$frm[
'position']);
523 $tpl->assign(
'site_id_select_multiple', !empty(
$GLOBALS[
'site_parameters'][
'multisite_using_array_for_site_id']));
524 $tpl->assign(
'type_affichage',
$frm[
'type_affichage']);
525 $tpl->assign(
'drop_src',
$GLOBALS[
'administrer_url'] .
'/images/b_drop.png');
530 if (
vb(
$frm[
'nouveau_mode']) ==
"maj") {
531 $tpl->assign(
'lot_explanation_table', get_lot_explanation_table(null,
$frm[
'id']));
532 $tpl->assign(
'lot_href',
$GLOBALS[
'wwwroot_in_admin'] .
'/modules/lot/administrer/lot.php?cat_id=' .
vb(
$frm[
'id']));
534 $tpl->assign(
'lot_supprime_href',
$GLOBALS[
'wwwroot_in_admin'] .
'/modules/lot/administrer/lot.php?cat_id=' .
vb(
$frm[
'id']) .
'&mode=supprime');
538 foreach (
$GLOBALS[
'admin_lang_codes'] as $lng) {
540 'nom' =>
$frm[
'nom_' . $lng],
542 'meta_titre' =>
$frm[
'meta_titre_' . $lng],
543 'meta_key' =>
$frm[
'meta_key_' . $lng],
544 'meta_desc' =>
$frm[
'meta_desc_' . $lng],
545 'header_html' =>
vb(
$frm[
'header_html_' . $lng]),
546 'sentence_displayed_on_product' =>
vb(
$frm[
'sentence_displayed_on_product_' . $lng]),
552 $tpl->assign(
'enable_categorie_sentence_displayed_on_product',
vb(
$GLOBALS[
'site_parameters'][
'enable_categorie_sentence_displayed_on_product']));
554 $tpl->assign(
'promotion_devises',
vb(
$frm[
"promotion_devises"]));
555 $tpl->assign(
'site_symbole',
vb(
$GLOBALS[
'site_parameters'][
'symbole']));
556 $tpl->assign(
'promotion_percent',
vb(
$frm[
"promotion_percent"]));
557 $tpl->assign(
'on_child',
vb(
$frm[
"on_child"]));
558 $tpl->assign(
'background_color',
$frm[
"background_color"]);
559 $tpl->assign(
'background_menu',
$frm[
"background_menu"]);
560 $tpl->assign(
'titre_soumet',
$frm[
"titre_soumet"]);
561 $tpl->assign(
'STR_BEFORE_TWO_POINTS',
$GLOBALS[
'STR_BEFORE_TWO_POINTS']);
562 $tpl->assign(
'STR_ADMIN_WEBSITE',
$GLOBALS[
'STR_ADMIN_WEBSITE']);
563 $tpl->assign(
'STR_ADMIN_AT_ROOT',
$GLOBALS[
'STR_ADMIN_AT_ROOT']);
564 $tpl->assign(
'STR_ADMIN_CATEGORIES_FORM_MODIFY',
$GLOBALS[
'STR_ADMIN_CATEGORIES_FORM_MODIFY']);
565 $tpl->assign(
'STR_ADMIN_SEE_RESULT_IN_REAL',
$GLOBALS[
'STR_ADMIN_SEE_RESULT_IN_REAL']);
566 $tpl->assign(
'STR_ADMIN_CATEGORIES_FORM_ADD_BUTTON',
$GLOBALS[
'STR_ADMIN_CATEGORIES_FORM_ADD_BUTTON']);
567 $tpl->assign(
'STR_ADMIN_CATEGORIES_PARENT',
$GLOBALS[
'STR_ADMIN_CATEGORIES_PARENT']);
568 $tpl->assign(
'STR_ADMIN_DISPLAY_ON_HOMEPAGE',
$GLOBALS[
'STR_ADMIN_DISPLAY_ON_HOMEPAGE']);
569 $tpl->assign(
'STR_ADMIN_CATEGORIES_DISPLAY_IN_CARROUSEL',
$GLOBALS[
'STR_ADMIN_CATEGORIES_DISPLAY_IN_CARROUSEL']);
570 $tpl->assign(
'STR_ADMIN_POSITION',
$GLOBALS[
'STR_ADMIN_POSITION']);
572 $tpl->assign(
'STR_ADMIN_TECHNICAL_CODE',
$GLOBALS[
'STR_ADMIN_TECHNICAL_CODE']);
573 $tpl->assign(
'STR_ADMIN_IN_COLUMNS',
$GLOBALS[
'STR_ADMIN_IN_COLUMNS']);
574 $tpl->assign(
'STR_ADMIN_IN_LINES',
$GLOBALS[
'STR_ADMIN_IN_LINES']);
575 $tpl->assign(
'STR_ADMIN_CATEGORIES_DISPLAY_MODE',
$GLOBALS[
'STR_ADMIN_CATEGORIES_DISPLAY_MODE']);
576 $tpl->assign(
'STR_ADMIN_LANGUAGES_SECTION_HEADER',
$GLOBALS[
'STR_ADMIN_LANGUAGES_SECTION_HEADER']);
577 $tpl->assign(
'STR_ADMIN_NAME',
$GLOBALS[
'STR_ADMIN_NAME']);
578 $tpl->assign(
'STR_ADMIN_DESCRIPTION',
$GLOBALS[
'STR_ADMIN_DESCRIPTION']);
579 $tpl->assign(
'STR_ADMIN_HEADER_HTML_TEXT',
$GLOBALS[
'STR_ADMIN_HEADER_HTML_TEXT']);
581 $tpl->assign(
'STR_ADMIN_CUSTOMIZE_APPEARANCE',
$GLOBALS[
'STR_ADMIN_CUSTOMIZE_APPEARANCE']);
582 $tpl->assign(
'STR_ADMIN_BACKGROUND_COLOR',
$GLOBALS[
'STR_ADMIN_BACKGROUND_COLOR']);
583 $tpl->assign(
'STR_ADMIN_BACKGROUND_COLOR_FOR_MENU',
$GLOBALS[
'STR_ADMIN_BACKGROUND_COLOR_FOR_MENU']);
584 $tpl->assign(
'STR_ADMIN_ONLINE',
$GLOBALS[
'STR_ADMIN_ONLINE']);
585 $tpl->assign(
'STR_ADMIN_OFFLINE',
$GLOBALS[
'STR_ADMIN_OFFLINE']);
586 $tpl->assign(
'STR_ADMIN_META_TITLE',
$GLOBALS[
'STR_ADMIN_META_TITLE']);
587 $tpl->assign(
'STR_ADMIN_META_KEYWORDS',
$GLOBALS[
'STR_ADMIN_META_KEYWORDS']);
588 $tpl->assign(
'STR_ADMIN_SEPARATE_KEYWORDS_EXPLAIN',
$GLOBALS[
'STR_ADMIN_SEPARATE_KEYWORDS_EXPLAIN']);
589 $tpl->assign(
'STR_ADMIN_META_DESCRIPTION',
$GLOBALS[
'STR_ADMIN_META_DESCRIPTION']);
590 $tpl->assign(
'STR_ADMIN_META_TITLE',
$GLOBALS[
'STR_ADMIN_META_TITLE']);
591 $tpl->assign(
'STR_ADMIN_META_KEYWORDS',
$GLOBALS[
'STR_ADMIN_META_KEYWORDS']);
592 $tpl->assign(
'STR_ADMIN_SEPARATE_KEYWORDS_EXPLAIN',
$GLOBALS[
'STR_ADMIN_SEPARATE_KEYWORDS_EXPLAIN']);
593 $tpl->assign(
'STR_ADMIN_META_DESCRIPTION',
$GLOBALS[
'STR_ADMIN_META_DESCRIPTION']);
594 $tpl->assign(
'STR_ADMIN_VARIOUS_INFORMATION_HEADER',
$GLOBALS[
'STR_ADMIN_VARIOUS_INFORMATION_HEADER']);
595 $tpl->assign(
'STR_ADMIN_CATEGORIES_DISCOUNT_IN_CATEGORY',
$GLOBALS[
'STR_ADMIN_CATEGORIES_DISCOUNT_IN_CATEGORY']);
596 $tpl->assign(
'STR_ADMIN_CATEGORIES_LOT_PRICE',
$GLOBALS[
'STR_ADMIN_CATEGORIES_LOT_PRICE']);
597 $tpl->assign(
'STR_ADMIN_PRODUITS_LOT_PRICE_HANDLE',
$GLOBALS[
'STR_ADMIN_PRODUITS_LOT_PRICE_HANDLE']);
598 $tpl->assign(
'STR_ADMIN_PRODUITS_LOT_PRICE_HANDLE_EXPLAIN',
$GLOBALS[
'STR_ADMIN_PRODUITS_LOT_PRICE_HANDLE_EXPLAIN']);
599 $tpl->assign(
'STR_ADMIN_DELETE_WARNING',
$GLOBALS[
'STR_ADMIN_DELETE_WARNING']);
601 $tpl->assign(
'STR_DELETE_THIS_FILE',
$GLOBALS[
'STR_DELETE_THIS_FILE']);
605 $tpl->assign(
'STR_ADMIN_CATEGORIES_DISCOUNT_APPLY_TO_SONS',
$GLOBALS[
'STR_ADMIN_CATEGORIES_DISCOUNT_APPLY_TO_SONS']);
606 $tpl->assign(
'STR_ADMIN_CATEGORIES_DISCOUNT_APPLY_TO_SONS_EXPLAIN',
$GLOBALS[
'STR_ADMIN_CATEGORIES_DISCOUNT_APPLY_TO_SONS_EXPLAIN']);
607 $tpl->assign(
'STR_ADMIN_DELETE_IMAGE',
$GLOBALS[
'STR_ADMIN_DELETE_IMAGE']);
608 $tpl->assign(
'STR_ADMIN_FILE_NAME',
$GLOBALS[
'STR_ADMIN_FILE_NAME']);
609 $tpl->assign(
'STR_ADMIN_SENTENCE_DISPLAYED_ON_PRODUCT',
$GLOBALS[
'STR_ADMIN_SENTENCE_DISPLAYED_ON_PRODUCT']);
631 query(
"UPDATE peel_categories
637 echo
$GLOBALS[
'tplEngine']->createTemplate(
'global_success.tpl', array(
'message' => sprintf(
$GLOBALS[
'STR_ADMIN_FILE_DELETED'], $file[
'image_' . $lang])))->fetch();
static strtoupper($string)
Returns string with all alphabetic characters converted to uppercase.
get_site_name($site_ids, $skip_rights_check=false)
Retourne le nom d'un ou de plusieurs sites à partir de l'id.
getTextEditor($instance_name, $width, $height, $default_text, $default_path=null, $type_html_editor=0, $compter_char_max_if_enabled=255, $placeholder= '')
getTextEditor()
affiche_liste_produits_categorie($parent_id)
affiche_liste_produits_categorie()
get_current_url($with_get=true, $get_short_url=false, $take_away_get_args_array=null)
get_current_url()
supprime_produits_categorie($id)
supprime_produits_categorie()
upload($field_name, $rename_file=true, $file_kind=null, $image_max_width=null, $image_max_height=null, $path=null, $new_file_name_without_extension=null, $default_return_value=null)
Fonction d'upload de fichiers.
fill_other_language_content($frm)
Retourne les contenus remplis si vide.
supprime_fichier_categorie($id, $file, $lang)
Supprime l'image de la catégorie spécifiée par $id.
maj_produits_categorie($id, $frm)
maj_produits_categorie()
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.
static html_entity_decode_if_needed($string)
String::html_entity_decode_if_needed()
word_real_escape_string($value)
Applique real_escape_string dans le cas où on n'insère qu'un seul mot, de moins de 30 caractères...
insert_id($database_object=null)
insert_id()
nohtml_real_escape_string($value, $allowed_tags=null)
Protège les données pour insertion dans MySQL ET supprime les tags HTML pour protéger de toute sorte ...
affiche_formulaire_produits_categorie(&$frm)
affiche_formulaire_produits_categorie()
if(!empty($_GET['id'])) if(isset($_POST['form_name'], $_POST['form_subject'], $_POST['form_text'], $_POST['form_lang'])&&empty($_GET['id'])) if(empty($_GET['id'])) $tpl
affiche_arbo_categorie(&$sortie, $selectionne, $parent_id=0, $indent="", $first_line=0, $depth=1)
affiche_arbo_categorie()
if(!defined('IN_PEEL')) thumbs($source_filename, $width, $height, $method= 'fit', $source_folder=null, $thumb_folder=null, $thumb_rename=true, $return_absolute_path=false)
Charge l'image dont le nom est $source_filename dans le répertoire d'upload, et crée une vignette pou...
real_escape_string($value)
real_escape_string()
necessite_priv($priv, $demo_allowed=true, $configuration_modification=false)
Cette fonction vérifie si l'utilisateur a les privilèges de $priv.
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.
update_category_sons_promotions($parent_id, $promotion_devises=0, $promotion_percent=0)
FONCTIONS.
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.
get_uploaded_file_infos($field_name, $file, $delete_url, $logo_width=100, $logo_height=100)
Remplit un tableau d'informations pour le template d'upload HTML.
necessite_identification()
Si l'utilisateur n'est pas connecté à un compte, on affiche une page d'identification et arrête le sc...
num_rows($query_result)
num_rows()
affiche_formulaire_modif_produits_categorie($id, &$frm)
affiche_formulaire_modif_produits_categorie()
delete_uploaded_file_and_thumbs($filename)
delete_uploaded_file_and_thumbs()
fetch_assoc($query_result)
fetch_assoc()
affiche_formulaire_ajout_produits_categorie($id, &$frm)
affiche_formulaire_ajout_produits_categorie()
get_form_token_input($name= 'general', $use_existing_token=true, $return_as_input_form=true)
get_form_token_input()
get_site_id_sql_set_value($site_ids)
Retourne la valeur SQL d'un champ INT ou SET suivant que ce soit un entier ou un tableau.
verify_token($name= 'general', $delay_in_minutes=60, $check_referer_if_set_by_server=true, $cancel_token=true, $minimum_wait_in_seconds_before_use=0)
Vérification de la validité d'un token Par défaut, un token est valide 1h, et utilisable 1 seule fois...
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...
insere_categorie(&$frm)
insere_categorie()
static substr($string, $start, $length=null)
Returns the portion of string specified by the start and length parameters.
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...
affiche_formulaire_liste_produits_categorie($id)
Affiche un formulaire de catégorie vide.
if(defined('IN_PEEL_ADMIN')||IN_INSTALLATION) $_SESSION['session_langue']