14 define(
'IN_PEEL_ADMIN',
true);
15 include(
"../configuration.inc.php");
20 include(
$GLOBALS[
'repertoire_modele'] .
"/admin_haut.php");
22 $id = intval(
vn($_REQUEST[
'id']));
28 switch (
vb($_REQUEST[
'mode'])) {
30 if (!empty($_POST[
'form_delete'])) {
31 foreach($_POST[
'form_delete'] as $action_id) {
47 include(
$GLOBALS[
'repertoire_modele'] .
"/admin_bas.php");
59 $search_array = array();
62 if (!empty(
$frm[
'admin_id'])) {
63 $search_array[] =
'paa.id_user="' . intval(
vn(
$frm[
'admin_id'])) .
'" ';
66 if (!empty(
$frm[
'action_cat'])) {
70 if (!empty(
$frm[
'account']) && is_numeric(
$frm[
'account'])) {
71 $search_array[] =
'paa.id_membre="' . intval(
$frm[
'account']) .
'" ';
76 if (!empty(
$frm[
'date_input1']) && !empty(
$frm[
'date'])) {
78 $this_sql_field =
'paa.date';
80 if (
$frm[$this_get] ==
'1') {
82 $last_value = $first_value .
' 23:59:59';
85 $last_value =
'2030-12-31 23:59:59';
89 $last_value .=
' 23:59:59';
91 echo
$GLOBALS[
'tplEngine']->createTemplate(
'global_success.tpl', array(
'message' =>
$GLOBALS[
'STR_ADMIN_CASE_NOT_FORECASTED'] .
' : ' .
$frm[$this_get]))->fetch();
94 if ($last_value !=
'2030-12-31 23:59:59') {
98 $search_array[] = $this_cond_temp_expression;
101 if (!empty(
$frm[
'search']) && !empty(
$frm[
'type'])) {
104 $fields[] =
'paa.data';
105 $fields[] =
'paa.raison';
106 $fields[] =
'paa.remarque';
111 if (!empty($_GET[
'action_cat'])) {
112 if ($_GET[
'action_cat'] ==
'PHONE') {
113 $search_array[] =
'paa.action LIKE "' .
real_escape_string($_GET[
'action_cat']) .
'%"';
118 if (!empty($_GET[
'action_cat']) && $_GET[
'action_cat'] ==
'PHONE') {
119 $title =
$GLOBALS[
'STR_ADMIN_ADMIN_ACTIONS_CALLS_LIST'];
121 $title =
$GLOBALS[
'STR_ADMIN_ADMIN_ACTIONS_ALL_LIST'];
124 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'admin_list_admin_action.tpl');
125 $GLOBALS[
'js_ready_content_array'][] =
'
126 display_input2_element("date");
129 $tpl->assign(
'title', $title);
130 $q =
query(
'SELECT id_utilisateur, pseudo, email
131 FROM peel_utilisateurs
136 $tpl_options[] = array(
'value' => $user_admin[
'id_utilisateur'],
137 'issel' => !empty(
$frm[
'admin_id']) &&
$frm[
'admin_id'] == $user_admin[
'id_utilisateur'],
138 'name' => (!
a_priv(
'demo')?(!empty($user_admin[
'pseudo'])?$user_admin[
'pseudo']:$user_admin[
'email']):
'private [demo]')
145 FROM peel_admins_actions
150 'issel' => !empty(
$frm[
'action_cat']) &&
$frm[
'action_cat'] ==
$action[
'action'],
155 $tpl->assign(
'account',
$frm[
'account']);
162 $tpl->assign(
'STR_ADMIN_ADMIN_ACTIONS_CALLS_EXPLAIN',
$GLOBALS[
'STR_ADMIN_ADMIN_ACTIONS_CALLS_EXPLAIN']);
163 $tpl->assign(
'STR_ADMIN_ADMIN_ACTIONS_MODERATOR',
$GLOBALS[
'STR_ADMIN_ADMIN_ACTIONS_MODERATOR']);
164 $tpl->assign(
'STR_ADMIN_ADMIN_ACTIONS_NO_MODERATOR_WITH_ACTIONS_FOUND',
$GLOBALS[
'STR_ADMIN_ADMIN_ACTIONS_NO_MODERATOR_WITH_ACTIONS_FOUND']);
165 $tpl->assign(
'STR_BEFORE_TWO_POINTS',
$GLOBALS[
'STR_BEFORE_TWO_POINTS']);
166 $tpl->assign(
'STR_ADMIN_ADMIN_ACTIONS_ACTIONS',
$GLOBALS[
'STR_ADMIN_ADMIN_ACTIONS_ACTIONS']);
167 $tpl->assign(
'STR_ADMIN_ADMIN_ACTIONS_CONCERNED_ACCOUNT',
$GLOBALS[
'STR_ADMIN_ADMIN_ACTIONS_CONCERNED_ACCOUNT']);
168 $tpl->assign(
'STR_ADMIN_DATE',
$GLOBALS[
'STR_ADMIN_DATE']);
169 $tpl->assign(
'STR_ADMIN_INPUT_SEARCH',
$GLOBALS[
'STR_ADMIN_INPUT_SEARCH']);
170 $tpl->assign(
'STR_ADMIN_DATE_ON',
$GLOBALS[
'STR_ADMIN_DATE_ON']);
171 $tpl->assign(
'STR_ADMIN_DATE_STARTING',
$GLOBALS[
'STR_ADMIN_DATE_STARTING']);
172 $tpl->assign(
'STR_ADMIN_DATE_BETWEEN_START',
$GLOBALS[
'STR_ADMIN_DATE_BETWEEN_START']);
173 $tpl->assign(
'STR_ADMIN_DATE_BETWEEN_AND',
$GLOBALS[
'STR_ADMIN_DATE_BETWEEN_AND']);
174 $tpl->assign(
'STR_SEARCH_ALL_WORDS',
$GLOBALS[
'STR_SEARCH_ALL_WORDS']);
175 $tpl->assign(
'STR_SEARCH_ANY_WORDS',
$GLOBALS[
'STR_SEARCH_ANY_WORDS']);
176 $tpl->assign(
'STR_SEARCH_EXACT_SENTENCE',
$GLOBALS[
'STR_SEARCH_EXACT_SENTENCE']);
177 $tpl->assign(
'STR_ADMIN_DATE_BETWEEN_AND',
$GLOBALS[
'STR_ADMIN_DATE_BETWEEN_AND']);
178 $tpl->assign(
'STR_ADMIN_CHECK_ALL',
$GLOBALS[
'STR_ADMIN_CHECK_ALL']);
179 $tpl->assign(
'STR_ADMIN_UNCHECK_ALL',
$GLOBALS[
'STR_ADMIN_UNCHECK_ALL']);
180 $tpl->assign(
'STR_ADMIN_ADMIN_ACTIONS_DATA',
$GLOBALS[
'STR_ADMIN_ADMIN_ACTIONS_DATA']);
181 $tpl->assign(
'STR_ADMIN_ADMIN_ACTIONS_DELETE_ACTION',
$GLOBALS[
'STR_ADMIN_ADMIN_ACTIONS_DELETE_ACTION']);
183 $tpl->assign(
'STR_ADMIN_ADMIN_ACTIONS_NO_ACTION_FOUND',
$GLOBALS[
'STR_ADMIN_ADMIN_ACTIONS_NO_ACTION_FOUND']);
184 $tpl->assign(
'STR_ADMIN_ADMIN_ACTIONS_TEMPLATE',
$GLOBALS[
'STR_ADMIN_ADMIN_ACTIONS_TEMPLATE']);
185 $tpl->assign(
'STR_ADMIN_REMARK',
$GLOBALS[
'STR_ADMIN_REMARK']);
187 $sql =
'SELECT paa.id AS id, paa.action AS action, paa.data AS data, paa.raison AS raison, paa.remarque AS remarque, paa.date as date, pu1.pseudo AS pseudo_admin, pu2.pseudo AS pseudo_membre, pu1.id_utilisateur AS id_admin, pu1.email AS email_admin, pu2.id_utilisateur AS id_membre, pu2.email AS email_membre
188 FROM peel_admins_actions paa
189 LEFT JOIN peel_utilisateurs pu1 ON pu1.id_utilisateur = paa.id_user AND ' .
get_filter_site_cond(
'utilisateurs',
'pu1') .
'
190 LEFT JOIN peel_utilisateurs pu2 ON pu2.id_utilisateur = paa.id_membre AND ' .
get_filter_site_cond(
'utilisateurs',
'pu2') .
'
191 ' . (!empty($search_array)?
'WHERE ' . implode(
' AND ', $search_array) .
' AND ' .
get_filter_site_cond(
'admins_actions',
'paa',
true):
'');
193 $HeaderTitlesArray = array(
'',
'date' =>
$GLOBALS[
'STR_DATE'],
'id_user' =>
$GLOBALS[
'STR_BY'],
'action' =>
$GLOBALS[
'STR_ADMIN_ADMIN_ACTIONS_DATE_ACTION_TYPE'],
'id_membre' =>
$GLOBALS[
'STR_ADMIN_ADMIN_ACTIONS_CONCERNED_ACCOUNT'],
$GLOBALS[
'STR_ADMIN_ADMIN_ACTIONS_DATA']);
194 $Links->HeaderTitlesArray = $HeaderTitlesArray;
195 $Links->OrderDefault =
'paa.date';
196 $Links->SortDefault =
'DESC';
199 $tpl->assign(
'links_multipage',
$Links->GetMultipage());
200 $tpl->assign(
'links_header_row',
$Links->getHeaderRow());
202 $tpl_results = array();
205 $tpl_technical_code = null;
207 if (!empty($actions[
'data'])) {
208 if ($actions[
'action'] ==
'SEND_EMAIL') {
210 $tpl_technical_code = $template_infos[
'technical_code'];
211 $tpl_lang = $template_infos[
'lang'];
215 $tpl_results[] = array(
'tr_rollover' => tr_rollover(
$i,
true),
216 'id' => $actions[
'id'],
218 'action' => $actions[
'action'],
219 'modif_admin_href' =>
$GLOBALS[
'administrer_url'] .
'/utilisateurs.php?mode=modif&id_utilisateur=' . $actions[
'id_admin'],
220 'admin' => (!
a_priv(
'demo')?(!empty($actions[
'pseudo_admin']) ? $actions[
'pseudo_admin'] : $actions[
'email_admin']):
'private [demo]'),
221 'is_membre' => !empty($actions[
'id_membre']),
222 'modif_membre_href' =>
$GLOBALS[
'administrer_url'] .
'/utilisateurs.php?mode=modif&id_utilisateur=' . $actions[
'id_membre'],
223 'membre' => (!
a_priv(
'demo')?(!empty($actions[
'pseudo_membre']) ? $actions[
'pseudo_membre'] : $actions[
'email_membre']):
'private [demo]'),
224 'raison' => $actions[
'raison'],
225 'remarque' => $actions[
'remarque'],
226 'data' => $actions[
'data'],
227 'tpl_technical_code' => $tpl_technical_code,
228 'tpl_lang' => $tpl_lang
232 $tpl->assign(
'results', $tpl_results);
253 if (!empty($action_id)) {
255 FROM peel_admins_actions
256 WHERE id="' . intval(
vn($action_id)) .
'" AND ' .
get_filter_site_cond(
'admins_actions', null,
true) .
'');
257 echo
$GLOBALS[
'tplEngine']->createTemplate(
'global_success.tpl', array(
'message' =>
$GLOBALS[
'STR_ADMIN_ADMIN_ACTIONS_MSG_DELETED_OK']))->fetch();
if(!empty($GLOBALS['site_parameters']['order_specific_field_titles'])) if(check_if_module_active('socolissimo')&&!empty($_REQUEST)&&!empty($_REQUEST['PUDOFOID'])&&!empty($_REQUEST['CEEMAIL'])&&!empty($_REQUEST['SIGNATURE'])&&!empty($_REQUEST['ORDERID'])) elseif(!empty($_POST)) elseif(check_if_module_active('socolissimo')&&!empty($_SESSION['session_commande']['is_socolissimo_order'])) foreach(array('bill'=> 1, 'ship'=> 2) as $address_type=> $session_commande_address_id) $frm['societe1']
build_terms_clause($terms, $fields, $match_method)
builds the sql statement's where clause this will build the sql based on the given information Valeur...
get_current_url($with_get=true, $get_short_url=false, $take_away_get_args_array=null)
get_current_url()
build_search_terms($search, $match_method)
Découpe la chaine recherchée en éléments distincts suivant le mode $match_method Valeurs de $match_me...
delete_admin_action($action_id)
Fonction permettant de supprimer une action en fonction de son id.
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...
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 ...
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
real_escape_string($value)
real_escape_string()
if(isset($_POST['pays_zone'])) elseif(empty($_SESSION['session_caddie']->zoneId)&&!empty($GLOBALS['site_parameters']['default_delivery_zone_id'])) if(isset($_POST['type'])) elseif(empty($_SESSION['session_caddie']->typeId)&&!empty($GLOBALS['site_parameters']['default_delivery_type_id'])) if(!empty($_POST['code_promo'])) if(!empty($_GET['code_promo'])&&$_GET['code_promo']== 'delete') $form_error_object
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.
affiche_list_admin_action($frm=null, $return_mode=false)
Affiche la liste des actions de moderation.
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))
necessite_identification()
Si l'utilisateur n'est pas connecté à un compte, on affiche une page d'identification et arrête le sc...
fetch_assoc($query_result)
fetch_assoc()
getTextAndTitleFromEmailTemplateLang($template_technical_code, $template_lang, $template_technical_id=null)
getTextAndTitleFromEmailTemplateLang()
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 ...