14 define(
'IN_PEEL_ADMIN',
true);
15 define(
'IN_RPC',
true);
16 define(
'LOAD_NO_OPTIONAL_MODULE',
true);
17 include(
"../configuration.inc.php");
19 if (!empty($_GET[
'encoding'])) {
37 if (!empty($_POST[
'maxRows'])) {
47 if(
$mode==
"products"){
49 if(!empty($queries_results_array)) {
53 FROM peel_utilisateurs
56 if ($rep[
'priv'] ==
'reve') {
60 foreach($queries_results_array as
$result) {
73 $possible_sizes =
$product_object->get_possible_sizes(
'infos', 0,
true,
false,
false,
true);
74 $size_options_html =
'';
75 if (!empty($possible_sizes)) {
76 foreach ($possible_sizes as $this_size_id => $this_size_infos) {
77 $option_content = $this_size_infos[
'name'];
78 $option_content .=
$GLOBALS[
'STR_BEFORE_TWO_POINTS'] .
': ' .
fprix($purchase_prix + $this_size_infos[
'final_price_formatted'],
true) .
' => ' .
$GLOBALS[
"STR_ADMIN_UPDATE"];
79 $size_options_html .=
'<option value="' . intval($this_size_id) .
'">' . $option_content .
'</option>';
83 $color_options_html =
'';
84 if (!empty($possible_colors)) {
86 foreach ($possible_colors as $this_color_id => $this_color_name) {
87 $color_options_html .=
'<option value="' . intval($this_color_id) .
'">' . $this_color_name .
'</option>';
91 if ($display_picture) {
92 $product_picture =
$GLOBALS[
'repertoire_upload'] .
'/thumbs/' .
thumbs($display_picture, 75, 75,
'fit');
94 $product_picture =
$GLOBALS[
'repertoire_upload'] .
'/thumbs/' .
thumbs(
$GLOBALS[
'site_parameters'][
'default_picture'], 75, 75,
'fit');
96 $product_picture = null;
100 'reference' => $result->reference,
102 'nom' => $result->nom,
103 'image' => $display_picture,
104 'image_thumbs' => $product_picture,
107 'size_options_html' => $size_options_html,
108 'color_options_html' => $color_options_html,
109 'tva_options_html' => $tva_options_html,
110 'prix_cat' => $prix_cat,
111 'prix_cat_ht' => $prix_cat_ht,
112 'purchase_prix' => $purchase_prix,
113 'purchase_prix_ht' => $purchase_prix_ht,
114 'purchase_prix_displayed' => $purchase_prix_displayed
119 }
elseif(
$mode==
"offers" && !empty(
$GLOBALS[
'site_parameters'][
'user_offers_table_enable'])) {
121 foreach($queries_results_array as $result) {
123 'nom' => $result->num_offre,
127 }
elseif(
$mode ==
"offer_add_user" && !empty(
$GLOBALS[
'site_parameters'][
'user_offers_table_enable'])) {
129 foreach($queries_results_array as $result_object) {
130 $result = (array)$result_object;
131 $result[
'msg'] =
$GLOBALS[
'STR_ADMIN_MSG_UPDATE_OK'];
136 if (!empty($_POST[
'return_json_array_with_raw_information'])) {
139 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'admin_rpc.tpl');
144 $tpl->assign(
'STR_ADMIN_COMMANDER_ADD_LINE_TO_ORDER',
$GLOBALS[
'STR_ADMIN_COMMANDER_ADD_LINE_TO_ORDER']);
146 $tpl->assign(
'STR_AUCUN_RESULTAT',
$GLOBALS[
'STR_AUCUN_RESULTAT']);
147 $tpl->assign(
'STR_BEFORE_TWO_POINTS',
$GLOBALS[
'STR_BEFORE_TWO_POINTS']);
148 $tpl->assign(
'STR_ADMIN_PRODUITS_ADD_PRODUCT',
$GLOBALS[
'STR_ADMIN_PRODUITS_ADD_PRODUCT']);
150 if(!empty(
$GLOBALS[
'site_parameters'][
'user_offers_table_enable'])) {
151 $tpl->assign(
'STR_OFFER_NO_RESULT',
$GLOBALS[
'STR_OFFER_NO_RESULT']);
152 $tpl->assign(
'STR_ADMIN_OFFER_ADD_OFFER',
$GLOBALS[
'STR_ADMIN_OFFER_ADD_OFFER']);
get_quick_search_results($search, $maxRows, $active_only=false, $search_category=null, $mode= 'products')
get_quick_search_results()
static convert_encoding($string, $new_encoding, $original_encoding=null)
Converts the character encoding of string $string to $new_encoding from optionally $original_encoding...
if(empty($currency_rate)) if(String::strlen($search)>0) if(!empty($_POST['return_json_array_with_raw_information'])) elseif(!empty($search))
output_general_http_header($page_encoding=null, $cache_duration_in_seconds=null)
Envoie les headers avant l'envoi du HTML.
if(!defined('IN_PEEL')) display_prices_with_taxes_in_admin()
display_prices_with_taxes_in_admin()
$return_mode_for_displayed_values
static strlen($string)
Returns the length of the given string.
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
if(empty($_GET['id'])) if(!empty($GLOBALS['site_parameters']['allow_multiple_product_url_with_category'])) $product_object
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...
get_vat_select_options($selected_vat=null, $approximative_amount_selected=false)
get_vat_select_options()
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.
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.
if(!defined('IN_PEEL')) est_identifie()
Retourne true si l'utilisateur est identifié
static str_form_value($value, $flags=ENT_COMPAT)
Encode une chaine de caractères pour affichage dans un value="".
fetch_assoc($query_result)
fetch_assoc()
$GLOBALS['page_columns_count']
if(!check_if_module_active('search')) $page_encoding
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 ...
static html_entity_decode($string, $quote_style=ENT_COMPAT, $charset=GENERAL_ENCODING)
String::html_entity_decode()
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...
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...