15 if (defined(
'IN_PEEL')) {
18 include(
"../../configuration.inc.php");
26 $yname =
vb($_POST[
'yname']);
32 for ($numitems = 0; $numitems < $items; $numitems++) {
33 if(!empty($_POST[
'femail'][$numitems])){
34 $fname[$numitems] =
vb($_POST[
'fname'][$numitems]);
35 $femail[$numitems] =
vb($_POST[
'femail'][$numitems]);
39 $referer =
vb($_POST[
'referer']);
40 $comments =
vb($_POST[
'comments']);
42 $yname = trim(
vb(
$_SESSION[
'session_utilisateur'][
'prenom']).
' '.
vb(
$_SESSION[
'session_utilisateur'][
'nom_famille']));
47 define(
'IN_TELL_FRIEND',
true);
49 include(
$GLOBALS[
'repertoire_modele'] .
"/haut.php");
51 switch (
vb($_POST[
'mode'])) {
53 if (empty($_SERVER[
'HTTP_USER_AGENT']) || $_SERVER[
'REQUEST_METHOD'] !=
"POST" || empty(
$_SESSION[
'session_init_form_direaunami'])) {
57 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'modules/direaunami_send.tpl');
58 $tpl->assign(
'STR_TELL_FRIEND',
$GLOBALS[
'STR_TELL_FRIEND']);
59 $tpl->assign(
'STR_MODULE_DIREAUNAMI_MSG_ERR_FRIEND',
$GLOBALS[
'STR_MODULE_DIREAUNAMI_MSG_ERR_FRIEND']);
60 $tpl->assign(
'STR_MODULE_DIREAUNAMI_MSG_FRIEND_SEND',
$GLOBALS[
'STR_MODULE_DIREAUNAMI_MSG_FRIEND_SEND']);
61 $tpl->assign(
'STR_MODULE_DIREAUNAMI_BACK_REFERER',
$GLOBALS[
'STR_MODULE_DIREAUNAMI_BACK_REFERER']);
62 if (empty($yname) || empty($fname[0]) || empty($femail[0]) || empty(
$yemail)) {
63 $tpl->assign(
'is_error',
true);
65 $tpl->assign(
'is_error',
false);
68 $product_link = $referer;
71 $product_link =
$GLOBALS[
'wwwroot'] . $referer;
76 for ($numitems = 0; $numitems < $items; $numitems++) {
77 if ((!empty($fname[$numitems])) && (!empty($femail[$numitems]))) {
78 $custom_template_tags[
'PSEUDO'] = $yname;
79 $custom_template_tags[
'NOM_FAMILLE'] = $fname[$numitems];
80 $custom_template_tags[
'PRODUCT_LINK'] = $product_link;
81 $custom_template_tags[
'SUPPORT'] =
$GLOBALS[
'support'];
82 $custom_template_tags[
'COMMENTS'] = $comments;
83 if (empty(
$_SESSION[
'session_form_direaunami_sent'])) {
84 $_SESSION[
'session_form_direaunami_sent'] = 0;
86 if (
$_SESSION[
'session_form_direaunami_sent'] < 10) {
88 send_email($femail[$numitems],
'',
'',
'direaunami_sent', $custom_template_tags, null,
$GLOBALS[
'support'],
false,
false,
true,
$yemail);
89 $_SESSION[
'session_form_direaunami_sent']++;
93 $tpl->assign(
'referer', $referer);
98 $_SESSION[
'session_init_form_direaunami']=
true;
99 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'modules/direaunami.tpl');
102 if (!empty($_SERVER[
'HTTP_REFERER']) &&
String::strpos($_SERVER[
'HTTP_REFERER'],
$GLOBALS[
'wwwroot']) === 0) {
105 $referer = $_SERVER[
'HTTP_REFERER'];
115 $tpl->assign(
'yname',
vb($yname));
117 $tpl->assign(
'referer', $referer);
118 $tpl->assign(
'STR_TELL_FRIEND',
$GLOBALS[
'STR_TELL_FRIEND']);
119 $tpl->assign(
'STR_MODULE_DIREAUNAMI_MSG_TELL_FRIEND',
$GLOBALS[
'STR_MODULE_DIREAUNAMI_MSG_TELL_FRIEND']);
120 $tpl->assign(
'STR_YOUR_NAME',
$GLOBALS[
'STR_YOUR_NAME']);
121 $tpl->assign(
'STR_YOUR_EMAIL',
$GLOBALS[
'STR_YOUR_EMAIL']);
122 $tpl->assign(
'STR_BEFORE_TWO_POINTS',
$GLOBALS[
'STR_BEFORE_TWO_POINTS']);
123 $tpl->assign(
'STR_THEIR_NAMES',
$GLOBALS[
'STR_THEIR_NAMES']);
124 $tpl->assign(
'STR_THEIR_EMAILS',
$GLOBALS[
'STR_THEIR_EMAILS']);
127 $tpl->assign(
'STR_MANDATORY',
$GLOBALS[
'STR_MANDATORY']);
132 include(
$GLOBALS[
'repertoire_modele'] .
"/bas.php");
static strpos($haystack, $needle, $offset=0)
Returns the numeric position of the first occurrence of needle in the haystack string.
get_current_url($with_get=true, $get_short_url=false, $take_away_get_args_array=null)
get_current_url()
redirect_and_die($url, $permanent_redirection=false, $avoid_loop=false)
Redirige vers l'URL demandée et arrête le programme.
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(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))
if(!defined('IN_PEEL')) send_email($to, $mail_subject= '', $mail_content= '', $template_technical_code=null, $template_tags=null, $format=null, $sender=null, $html_add_structure=true, $html_correct_conformity=false, $html_convert_url_to_links=true, $reply_to=null, $attached_files_infos_array=null, $lang=null, $additional_infos_array=array(), $attachment_not_sent_by_email=false)
Envoi d'un email à un utilisateur.
$GLOBALS['page_columns_count']
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...
if(defined('IN_PEEL_ADMIN')||IN_INSTALLATION) $_SESSION['session_langue']