14 if (!defined(
'IN_PEEL')) {
30 if(
$GLOBALS[
'site_parameters'][
'in_category']==0) {
33 $sql_cond =
'ppc.categorie_id IN ("' . implode(
'","', $descending_category_array) .
'")';
35 $sql_cond =
'ppc.categorie_id="'. intval($category_id) .
'"';
40 if($prev_next==
'prev') {
41 $sql_cond .=
" AND (pp.position<" . intval(
vn($product_position)) .
" OR (pp.position=" . intval(
vn($product_position)) .
" AND pp.id>" . intval(
$product_id) .
"))";
42 $sql_order =
"pp.position DESC, pp.id ASC";
43 }
elseif($prev_next==
'next') {
44 $sql_cond .=
" AND (pp.position>" . intval(
vn($product_position)) .
" OR (pp.position=" . intval(
vn($product_position)) .
" AND pp.id<" . intval(
$product_id) .
"))";
45 $sql_order =
"pp.position ASC, pp.id DESC";
47 $sql_cond .=
" AND pp.etat = 1 AND pp.on_gift = 0";
48 $sql =
"SELECT ppc.produit_id AS id, ppc.categorie_id as idC, pp.nom_".(!empty(
$GLOBALS[
'site_parameters'][
'product_name_forced_lang'])?
$GLOBALS[
'site_parameters'][
'product_name_forced_lang']:
$_SESSION[
'session_langue']).
" AS nom, pp.position
50 INNER JOIN peel_produits_categories ppc ON ppc.produit_id = pp.id
51 INNER JOIN peel_categories pc ON ppc.categorie_id = pc.id AND pc.etat = 1 AND " .
get_filter_site_cond(
'categories',
'pc') .
"
53 ORDER BY ".$sql_order.
"
57 if($prev_next==
'prev') {
58 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'modules/precedent_suivant_prev.tpl');
60 }
elseif($prev_next==
'next') {
61 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'modules/precedent_suivant_next.tpl');
foreach(array('date1', 'date2', 'type', 'renewals', 'width') as $item) $data
get_name_category($idcat)
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(!defined('IN_PEEL')) $GLOBALS['page_types_array']
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.
get_category_tree_and_itself($id_or_ids_array, $mode= 'sons', $table_to_use= 'categories')
get_category_tree_and_itself()
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(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))
fetch_assoc($query_result)
fetch_assoc()
if(!defined('IN_PEEL')) show_preview_next($product_id, $product_position, $prev_next, $category_id)
show_preview_next()
if(defined('IN_PEEL_ADMIN')||IN_INSTALLATION) $_SESSION['session_langue']