本文整理汇总了PHP中mailpmb函数的典型用法代码示例。如果您正苦于以下问题:PHP mailpmb函数的具体用法?PHP mailpmb怎么用?PHP mailpmb使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mailpmb函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: alert_mail_users_pmb
function alert_mail_users_pmb($id_empr)
{
global $dbh;
global $msg, $charset;
global $opac_biblio_name, $opac_biblio_email;
global $opac_url_base;
global $titre, $sujet, $idtheme, $idtype, $date_fin;
// paramétrage OPAC: choix du nom de la bibliothèque comme expéditeur
$requete = "select location_libelle, email from empr, docs_location where empr_location=idlocation and id_empr='{$id_empr}' ";
$res = mysql_query($requete, $dbh);
$loc = mysql_fetch_object($res);
$PMBusernom = $loc->location_libelle;
$PMBuserprenom = "";
$PMBuseremail = $loc->email;
// libellé du thème de la demande
$requete = "select libelle_theme from demandes_theme where id_theme='" . $idtheme . "'";
$res = mysql_query($requete, $dbh);
$theme = mysql_fetch_object($res);
$libelle_theme = $theme->libelle_theme;
// libellé du type de la demande
$requete = "select libelle_type from demandes_type where id_type='" . $idtype . "'";
$res = mysql_query($requete, $dbh);
$typ = mysql_fetch_object($res);
$libelle_type = $typ->libelle_type;
$query = "select distinct empr_prenom, empr_nom, empr_cb, empr_mail, empr_tel1, empr_tel2, empr_ville, location_libelle, nom, prenom, user_email, date_format(sysdate(), '" . $msg["format_date_heure"] . "') as aff_quand from empr, docs_location, users where id_empr='{$id_empr}' and empr_location=idlocation and user_alert_demandesmail=1";
$result = @mysql_query($query, $dbh);
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=" . $charset . "\n";
while ($empr = @mysql_fetch_object($result)) {
$output_final = "<html><body>";
$output_final .= "<a href='" . $opac_url_base . "'><font color=green><strong>" . $msg["mail_obj_demande_added"];
$sujet = $msg["mail_obj_demande_added"];
$output_final .= "</strong></font></a> " . $empr->aff_quand . "\n\t\t\t\t\t\t\t\t<br /><strong>" . $empr->empr_prenom . " " . $empr->empr_nom . "</strong>\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<br /><i>" . $empr->empr_mail . " / " . $empr->empr_tel1 . " / " . $empr->empr_tel2 . "</i>";
if ($empr->empr_cp || $empr->empr_ville) {
$output_final .= "<br /><u>" . $empr->empr_cp . " " . $empr->empr_ville . "</u>";
}
$output_final .= "<hr />" . $msg[situation] . ": " . $empr->location_libelle . "<hr />";
$output_final .= $msg["mail_content_demande_theme"] . " " . $libelle_theme . "<br />";
$output_final .= $msg["mail_content_demande_type"] . " " . $libelle_type . "<br />";
$output_final .= $titre . "<br /><br />";
$output_final .= $sujet . "<br /><br />";
$output_final .= $msg["mail_content_demande_date_fin"] . " " . formatdate($date_fin) . "<br />";
$output_final .= "<hr /></body></html> ";
$res_envoi = mailpmb($empr->nom . " " . $empr->prenom, $empr->user_email, $sujet . " " . $empr->aff_quand, $output_final, $opac_biblio_email, $opac_biblio_email, $headers, "", "", 1);
}
}
示例2: electronic_ticket
function electronic_ticket($id_empr, $cb_doc = "")
{
global $dbh, $msg, $charset;
global $PMBusernom;
global $PMBuserprenom;
global $PMBuseremail, $PMBuseremailbcc;
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=" . $charset . "\n";
// info site
global $biblio_name, $biblio_logo, $biblio_adr1, $biblio_adr2, $biblio_cp, $biblio_town, $biblio_state, $biblio_country, $biblio_phone, $biblio_email, $biblio_website, $biblio_commentaire;
global $empr_electronic_loan_ticket_obj, $empr_electronic_loan_ticket_msg;
$empr_electronic_loan_ticket_obj = str_replace("!!biblio_name!!", $biblio_name, $empr_electronic_loan_ticket_obj);
$empr_electronic_loan_ticket_obj = str_replace("!!date!!", formatdate(today()), $empr_electronic_loan_ticket_obj);
$empr_electronic_loan_ticket_msg = str_replace("!!biblio_name!!", $biblio_name, $empr_electronic_loan_ticket_msg);
$empr_electronic_loan_ticket_msg = str_replace("!!date!!", formatdate(today()), $empr_electronic_loan_ticket_msg);
$empr_electronic_loan_ticket_msg = str_replace("!!biblio_website!!", $biblio_website, $empr_electronic_loan_ticket_msg);
$empr_electronic_loan_ticket_msg = str_replace("!!biblio_phone!!", $biblio_phone, $empr_electronic_loan_ticket_msg);
$empr_electronic_loan_ticket_msg = str_replace("!!biblio_adr1!!", $biblio_adr1, $empr_electronic_loan_ticket_msg);
$empr_electronic_loan_ticket_msg = str_replace("!!biblio_adr2!!", $biblio_adr2, $empr_electronic_loan_ticket_msg);
$empr_electronic_loan_ticket_msg = str_replace("!!biblio_cp!!", $biblio_cp, $empr_electronic_loan_ticket_msg);
$empr_electronic_loan_ticket_msg = str_replace("!!biblio_town!!", $biblio_town, $empr_electronic_loan_ticket_msg);
$empr_electronic_loan_ticket_msg = str_replace("!!biblio_email!!", $biblio_email, $empr_electronic_loan_ticket_msg);
$empr_electronic_loan_ticket_msg = str_replace("!!biblio_commentaire!!", $biblio_commentaire, $empr_electronic_loan_ticket_msg);
$message_resas = "";
$message_prets = "";
if ($cb_doc == "") {
$rqt = "select expl_cb from pret, exemplaires where pret_idempr='" . $id_empr . "' and pret_idexpl=expl_id order by pret_date ";
$req = mysql_query($rqt) or die($msg['err_sql'] . '<br />' . $rqt . '<br />' . mysql_error());
$message_prets = $msg["prets_en_cours"];
while ($data = mysql_fetch_array($req)) {
$message_prets .= electronic_loan_ticket_expl_info($data['expl_cb']);
}
// Impression des réservations en cours
$rqt = "select resa_idnotice, resa_idbulletin from resa where resa_idempr='" . $id_empr . "' ";
$req = mysql_query($rqt) or die($msg['err_sql'] . '<br />' . $rqt . '<br />' . mysql_error());
if (mysql_num_rows($req) > 0) {
$message_resas = $msg["documents_reserves"];
while ($data = mysql_fetch_array($req)) {
$message_resas .= electronic_loan_ticket_not_bull_info_resa($id_empr, $data['resa_idnotice'], $data['resa_idbulletin']);
}
}
// fin if résas
} else {
$message_prets = $msg["prets_en_cours"];
$message_prets .= electronic_loan_ticket_expl_info($cb_doc);
}
$empr_electronic_loan_ticket_msg = str_replace("!!all_reservations!!", $message_resas, $empr_electronic_loan_ticket_msg);
$empr_electronic_loan_ticket_msg = str_replace("!!all_loans!!", $message_prets, $empr_electronic_loan_ticket_msg);
$requete = "select id_empr, empr_mail, empr_nom, empr_prenom from empr where id_empr='{$id_empr}' ";
$res = mysql_query($requete, $dbh);
$empr = mysql_fetch_object($res);
//remplacement nom et prenom
$empr_electronic_loan_ticket_msg = str_replace("!!empr_name!!", $empr->empr_nom, $empr_electronic_loan_ticket_msg);
$empr_electronic_loan_ticket_msg = str_replace("!!empr_first_name!!", $empr->empr_prenom, $empr_electronic_loan_ticket_msg);
if ($empr->empr_mail) {
// function mailpmb($to_nom="", $to_mail, $obj="", $corps="", $from_name="", $from_mail, $headers, $copie_CC="", $copie_BCC="", $faire_nl2br=0, $pieces_jointes=array()) {
$res_envoi = @mailpmb($empr->empr_prenom . " " . $empr->empr_nom, $empr->empr_mail, $empr_electronic_loan_ticket_obj, $empr_electronic_loan_ticket_msg, $PMBuserprenom . " " . $PMBusernom, $PMBuseremail, $headers, "", $PMBuseremailbcc, 1, "");
}
}
示例3: checkTasks
function checkTasks()
{
global $dbh, $base_path, $include_path, $class_path, $javascript_path, $lang;
global $charset;
global $PMBusernom, $PMBuserprenom, $PMBuseremail;
//Récupération de l'OS pour la vérification des processus
$os = $this->getOS();
$sql = "SELECT id_tache, start_at, id_process FROM taches WHERE id_process <> 0";
$res = pmb_mysql_query($sql, $dbh);
if ($res && pmb_mysql_num_rows($res)) {
while ($row = pmb_mysql_fetch_assoc($res)) {
if ($os == "Linux") {
$command = 'ps -p ' . $row['id_process'];
} else {
if ($os == "Windows") {
$command = 'tasklist /FI "PID eq ' . $row['id_process'] . '" ';
} else {
if ($os == "Mac") {
$command = 'ps -p ' . $row['id_process'];
} else {
$command = 'ps -p ' . $row['id_process'];
}
}
}
$output = array();
exec($command, $output);
if (!isset($output[1])) {
// 5 = STOPPED
$sql_stop_task = "update taches set status=5, ";
if ($row['start_at'] == '0000-00-00 00:00:00') {
$sql_stop_task .= "start_at=CURRENT_TIMESTAMP, ";
}
$sql_stop_task .= "end_at=CURRENT_TIMESTAMP, id_process=0, commande=0 where id_tache=" . $row["id_tache"];
pmb_mysql_query($sql_stop_task);
//En fonction du paramétrage de la tâche...
//Replanifier / Envoi de mail
$query = "select num_type_tache, libelle_tache, param, num_planificateur, indicat_progress from planificateur join taches on id_planificateur=num_planificateur where id_tache=" . $row["id_tache"];
$result = pmb_mysql_query($query);
if ($result && pmb_mysql_num_rows($result)) {
$task_info = pmb_mysql_fetch_object($result);
$params = unserialize($task_info->param);
if ($params["alert_mail_on_failure"] != "") {
$params_alert_mail = explode(",", $params["alert_mail_on_failure"]);
if ($params_alert_mail[0]) {
$mails = explode(";", $params_alert_mail[1]);
if (preg_match("#.*@.*#", $PMBuseremail)) {
if (count($mails)) {
//Allons chercher les messages
if (file_exists("{$include_path}/messages/" . $lang . ".xml")) {
//Allons chercher les messages
require_once "{$class_path}/XMLlist.class.php";
$messages = new XMLlist("{$include_path}/messages/" . $lang . ".xml", 0);
$messages->analyser();
$msg = $messages->table;
$objet = $msg["task_alert_user_mail_obj"];
$corps = str_replace("!!task_name!!", $task_info->libelle_tache, $msg["task_alert_user_mail_corps"]);
$corps = str_replace("!!percent!!", $task_info->indicat_progress, $corps);
foreach ($mails as $mail) {
if (preg_match("#.*@.*#", $mail)) {
@mailpmb("", $mail, $objet, $corps, $PMBusernom . " " . $PMBuserprenom, $PMBuseremail, "Content-Type: text/plain; charset=\"{$charset}\"", '', '', 0, '');
}
}
}
}
}
}
}
if ($params["restart_on_failure"]) {
$this->createNewTask($row["id_tache"], $task_info->num_type_tache, $task_info->num_planificateur);
}
}
}
}
}
}
示例4: diffuser
function diffuser()
{
global $dbh;
global $msg, $charset, $base_path, $opac_connexion_phrase, $pmb_mail_delay;
global $PMBusernom;
global $PMBuserprenom;
global $PMBuseremail;
if (!$this->id_bannette) {
return $msg['dsi_ban_no_access'] . "<br />";
}
// impossible d'accéder à cette bannette
if (!$this->nb_notices && $this->diffusion_email) {
return $msg['dsi_ban_empty'] . "<br />";
}
// On demande à diffuser le contenu et la bannette vide : pas question d'envoyer du vide
mysql_set_wait_timeout(3600);
$this->construit_diff();
$texte_base = $this->texte_diffuse;
if ($this->export_contenu) {
$fic_params = $base_path . "/admin/convert/imports/" . $this->typeexport . "/params.xml";
$temppar = file_get_contents($fic_params);
$params = _parser_text_no_function_($temppar, "PARAMS");
if ($params["OUTPUT"][0]["SUFFIX"]) {
$ext = $params["OUTPUT"][0]["SUFFIX"];
} else {
$ext = "fic";
}
$pieces_jointes[0]["nomfichier"] = $this->prefixe_fichier . today() . "." . $ext;
$pieces_jointes[0]["contenu"] = $this->export_contenu;
}
$nb_dest = 0;
$nb_echec = 0;
$nb_no_email = 0;
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=" . $charset . "\n";
$requete = "select id_empr, empr_cb, empr_mail, empr_nom, empr_prenom, empr_login, empr_password, if(empr_sexe=2,'" . $msg["civilite_madame"] . "',";
$requete .= "if(empr_sexe=1,'" . $msg["civilite_monsieur"] . "','" . $msg["civilite_unknown"] . "')) as empr_sexe, empr_adr1, empr_adr2, empr_cp, empr_ville,";
$requete .= "empr_pays, empr_tel1, empr_tel2, date_format(empr_date_adhesion, '" . $msg["format_date"] . "') as aff_empr_date_adhesion, date_format(empr_date_expiration, '" . $msg["format_date"] . "') as aff_empr_date_expiration,";
$requete .= "statut_libelle, allow_dsi, allow_dsi_priv, proprio_bannette, bannette_mail from empr, empr_statut, bannette_abon, bannettes ";
$requete .= "where num_bannette='" . $this->id_bannette . "' and num_empr=id_empr and empr_statut=idstatut and num_bannette=id_bannette ";
$requete .= "order by empr_nom, empr_prenom ";
$res = pmb_mysql_query($requete, $dbh);
while ($empr = pmb_mysql_fetch_object($res)) {
$emaildest = $empr->empr_mail;
if ($empr->bannette_mail && $emaildest) {
$destinataires = explode(";", $emaildest);
$found = 0;
foreach ($destinataires as $mail) {
if ($mail == $empr->bannette_mail) {
$found = 1;
break;
}
}
if ($found) {
$emaildest = $empr->bannette_mail;
}
}
$texte = $texte_base;
if ($emaildest) {
if (!$empr->allow_dsi && !$empr->proprio_bannette || !$empr->allow_dsi_priv && $empr->proprio_bannette) {
//si la dsi n'est pas autorisée pour ce lecteur, affichage de l'info mais pas d'envoi
$nb_echec++;
$echec_email .= "- " . $empr->empr_nom . " " . $empr->empr_prenom . " (" . $msg["statut_empr"] . "' " . $empr->statut_libelle . "')<br />";
} else {
//function mailpmb($to_nom="", $to_mail, $obj="", $corps="", $from_name="", $from_mail, $headers, $copie_CC="", $copie_BCC="", $faire_nl2br=0, $pieces_jointes=array()) {
$dates = time();
$login = $empr->empr_login;
$code = md5($opac_connexion_phrase . $login . $dates);
$texte = str_replace('!!code!!', $code, $texte);
$texte = str_replace('!!login!!', $login, $texte);
$texte = str_replace('!!empr_login!!', $login, $texte);
$texte = str_replace('!!date_conex!!', $dates, $texte);
$texte = str_replace('!!empr_name!!', $empr->empr_nom, $texte);
$texte = str_replace('!!empr_first_name!!', $empr->empr_prenom, $texte);
$texte = str_replace('!!empr_sexe!!', $empr->empr_sexe, $texte);
$texte = str_replace('!!empr_cb!!', $empr->empr_cb, $texte);
$texte = str_replace('!!empr_mail!!', $empr->empr_mail, $texte);
if (strpos($texte, "!!empr_name_and_adress!!")) {
$texte = str_replace("!!empr_name_and_adress!!", nl2br($this->m_lecteur_adresse($empr)), $texte);
}
if (strpos($texte, "!!empr_all_information!!")) {
$texte = str_replace("!!empr_all_information!!", nl2br($this->m_lecteur_info($empr)), $texte);
}
$res_envoi = @mailpmb($empr->empr_prenom . " " . $empr->empr_nom, $emaildest, $this->comment_public, $texte, $PMBuserprenom . " " . $PMBusernom, $PMBuseremail, $headers, "", "", 0, $pieces_jointes);
if ($pmb_mail_delay * 1) {
sleep((int) $pmb_mail_delay * 1 / 1000);
}
if ($res_envoi) {
$nb_dest++;
} else {
$nb_echec++;
$echec_email .= "- " . $empr->empr_nom . " " . $empr->empr_prenom . "<br />";
}
}
} else {
$nb_no_email++;
$no_email .= "- " . $empr->empr_nom . " " . $empr->empr_prenom . "<br />";
}
}
// remplissage du panier avec le contenu de la bannette
//.........这里部分代码省略.........
示例5: alert_empr_resa
//.........这里部分代码省略.........
$query .= "trim(concat(ifnull(notices_m.niveau_biblio,''), ifnull(notices_s.niveau_biblio,''))) as niveau_biblio, ";
$query .= "trim(concat(ifnull(notices_m.notice_id,''), ifnull(notices_s.notice_id,''))) as id_notice ";
$query .= "from (((resa LEFT JOIN notices AS notices_m ON resa_idnotice = notices_m.notice_id ) LEFT JOIN bulletins ON resa_idbulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id), empr ";
$query .= "where id_resa in (" . $id_resa . ") and resa_idempr=id_empr";
if ($id_empr_concerne) {
$query .= " and id_empr={$id_empr_concerne} ";
}
$result = mysql_query($query, $dbh);
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=" . $charset . "\n";
$var = "pdflettreresa_fdp";
eval("\$pdflettreresa_fdp=\"" . ${$var} . "\";");
// le texte après la liste des ouvrages en résa
$var = "pdflettreresa_after_list";
eval("\$pdflettreresa_after_list=\"" . ${$var} . "\";");
// le texte avant la liste des ouvrges en réservation
$var = "pdflettreresa_before_list";
eval("\$pdflettreresa_before_list=\"" . ${$var} . "\";");
// le "Madame, Monsieur," ou tout autre truc du genre "Cher adhérent,"
$var = "pdflettreresa_madame_monsieur";
eval("\$pdflettreresa_madame_monsieur=\"" . ${$var} . "\";");
$tab_resa = array();
while ($empr = mysql_fetch_object($result)) {
$id_empr = $empr->id_empr;
$rqt_maj = "update resa set resa_confirmee=1 where id_resa in (" . $id_resa . ") AND resa_cb is not null and resa_cb!=''";
if ($id_empr_concerne) {
$rqt_maj .= " and resa_idempr={$id_empr_concerne} ";
}
mysql_query($rqt_maj, $dbh);
if (($pdflettreresa_priorite_email == 1 || $pdflettreresa_priorite_email == 2) && $empr->empr_mail) {
$to = $empr->empr_prenom . " " . $empr->empr_nom . " <" . $empr->empr_mail . ">";
$output_final = "<html><body>";
$texte_madame_monsieur = str_replace("!!empr_name!!", $empr->empr_nom, $pdflettreresa_madame_monsieur);
$texte_madame_monsieur = str_replace("!!empr_first_name!!", $empr->empr_prenom, $texte_madame_monsieur);
$output_final .= "{$texte_madame_monsieur} <br />" . $pdflettreresa_before_list;
if ($empr->niveau_biblio == 'm' || $empr->niveau_biblio == 'b') {
$affichage = new mono_display($empr->id_notice, 0, '', '', '', '', '', '', '', '', '', '', '', true, '', '');
$output_final .= "<hr /><strong>" . $affichage->header . "</strong>";
} elseif ($empr->niveau_biblio == 's' || $empr->niveau_biblio == 'a') {
$affichage_perio = new serial_display($empr->id_notice, 0);
$output_final .= "<hr /><strong>" . $affichage_perio->header . "</strong>";
}
$rqt_detail = "select resa_confirmee, resa_cb,location_libelle, expl_cote from resa\n\t\t\tleft join exemplaires on expl_cb=resa_cb\n\t\t\tleft join docs_location on idlocation=expl_location\n\t\t\twhere id_resa ={$id_resa} and resa_cb is not null and resa_cb!='' ";
$res_detail = mysql_query($rqt_detail);
$expl_detail = mysql_fetch_object($res_detail);
$output_final .= "<br />";
$output_final .= strip_tags($msg[291] . " : " . $expl_detail->resa_cb . " {$msg['296']} : " . $expl_detail->expl_cote);
$output_final .= "<br />";
$output_final .= $msg['fpdf_valide'] . " " . $empr->aff_resa_date_debut . " " . $msg['fpdf_valable'] . " " . $empr->aff_resa_date_fin;
$lieu_retrait = "";
if ($pmb_transferts_actif && $transferts_choix_lieu_opac == 3) {
$rqt = "select resa_confirmee, resa_cb,resa_loc_retrait from resa where id_resa in (" . $id_resa . ") and resa_cb is not null and resa_cb!='' ";
$res = mysql_query($rqt, $dbh);
if ($resa_lue = mysql_fetch_object($res)) {
if ($resa_lue->resa_confirmee) {
if ($resa_lue->resa_loc_retrait) {
$loc_retait = $resa_lue->resa_loc_retrait;
} else {
$rqt = "select expl_location from exemplaires where expl_cb='" . $resa_lue->resa_cb . "' ";
$res = mysql_query($rqt, $dbh);
if ($res_expl = mysql_fetch_object($res)) {
$loc_retait = $res_expl->expl_location;
}
}
$rqt = "select location_libelle from docs_location where idlocation=" . $loc_retait;
$res = mysql_query($rqt, $dbh);
if ($res_expl = mysql_fetch_object($res)) {
$lieu_retrait = str_replace("!!location!!", $res_expl->location_libelle, $msg["resa_lettre_lieu_retrait"]);
}
}
}
} else {
$lieu_retrait = str_replace("!!location!!", $expl_detail->location_libelle, $msg["resa_lettre_lieu_retrait"]);
}
$output_final .= "<br />{$lieu_retrait}<br /><hr />{$pdflettreresa_after_list} <br />" . $pdflettreresa_fdp;
$output_final .= "<br /><br />" . mail_bloc_adresse();
$output_final .= "</body></html> ";
if (is_resa_confirme($empr->id_resa)) {
$res_envoi = mailpmb($empr->empr_prenom . " " . $empr->empr_nom, $empr->empr_mail, $msg["mail_obj_resa_validee"] . " : " . $empr->empr_prenom . " " . mb_strtoupper($empr->empr_nom, $charset) . " (" . $empr->empr_cb . ")", $output_final, $biblio_name, $biblio_email, $headers, "", $PMBuseremailbcc, 1);
}
if (!$res_envoi || $pdflettreresa_priorite_email == 2) {
if (is_resa_confirme($empr->id_resa)) {
array_push($tab_resa, $empr->id_resa);
}
}
} elseif ($pdflettreresa_priorite_email != 3) {
if (is_resa_confirme($empr->id_resa)) {
array_push($tab_resa, $empr->id_resa);
}
}
if (is_resa_confirme($empr->id_resa) && $empr->empr_tel1 && $empr->empr_sms && $empr_sms_msg_resa_dispo) {
$res_envoi_sms = send_sms(1, 0, $empr->empr_tel1, $empr_sms_msg_resa_dispo);
}
}
// end while
$valeur_tab = implode(',', $tab_resa);
if ($valeur_tab && !$print_mode) {
print "<script type='text/javascript'>openPopUp('./pdf.php?pdfdoc=lettre_resa&id_resa={$valeur_tab}', 'lettre_confirm_resa" . $id_resa . "', 600, 500, -2, -2, 'toolbar=no, dependent=yes, resizable=yes, scrollbars=yes');</script>";
}
}
示例6: cp1252Toiso88591
}
if ($charset != 'utf-8') {
$output_final = cp1252Toiso88591($output_final);
}
switch ($environement['output']) {
case 'email':
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=" . $charset . "\n";
$f_objet_mail = $msg['print_emailobj'] . " - {$biblio_name} - {$date_today} ";
$f_message_to_send = "";
if ($environement["emailcontent"]) {
$f_message_to_send .= $msg["523"] . $environement["emailcontent"] . "<br />";
}
$f_message_to_send .= $output_final . '<br /><br />' . mail_bloc_adresse() . "</body></html> ";
$emaildest = $_SESSION["PRINT"]["emaildest"];
$res_envoi = mailpmb("", $emaildest, $f_objet_mail, $f_message_to_send, $PMBuserprenom . " " . $PMBusernom, $PMBuseremail, $headers, "", $PMBuseremailbcc);
if ($res_envoi) {
print "{$pheader}\n<br /><br /><center><h3>" . sprintf($msg["print_emailsucceed"], $emaildest) . "</h3><br /><a href=\"\" onClick=\"self.close(); return false;\">" . $msg["print_emailclose"] . "</a></center></body></html>";
} else {
print "{$pheader}\n<br /><br /><center><h3>" . sprintf($msg["print_emailfailed"], $emaildest) . "</h3><br /><a href=\"\" onClick=\"self.close(); return false;\">" . $msg["print_emailclose"] . "</a></center></body></html>";
}
break;
case 'printer':
$output_final .= '<script type="text/javascript">self.print();</script>';
$output_final .= '</body></html>';
print pmb_bidi($output_final);
break;
case 'tt':
$output_final .= '</body></html>';
print pmb_bidi($output_final);
break;
示例7: mailpmb
$res_envoi = mailpmb($coords->prenom . " " . $coords->nom, $coords->mail, $objet, $texte_mail, $biblio_name, $biblio_email, $headers, "", $PMBuseremailbcc, 1);
if ($res_envoi) {
echo "<center><h3>" . sprintf($msg["mail_retard_succeed"], $coords->mail) . "</h3><br /><a href=\"\" onClick=\"self.close(); return false;\">" . $msg["mail_retard_close"] . "</a></center><br /><br />" . nl2br($texte_relance);
} else {
echo "<center><h3>" . sprintf($msg["mail_retard_failed"], $coords->mail) . "</h3><br /><a href=\"\" onClick=\"self.close(); return false;\">" . $msg["mail_retard_close"] . "</a></center>";
}
}
mysql_free_result($res);
} else {
// mettre ici le texte
$coords = new emprunteur($id_empr, '', FALSE, 0);
if ($madame_monsieur) {
$texte_mail = $madame_monsieur . "\r\n\r\n";
}
$texte = str_replace("!!date_fin_adhesion!!", $coords->aff_date_expiration, $texte);
$texte_mail .= $texte . "\r\n";
if ($fdp) {
$texte_mail .= $fdp . "\r\n\r\n";
}
$texte_mail .= mail_bloc_adresse();
//remplacement nom et prenom
$texte_mail = str_replace("!!empr_name!!", $coords->nom, $texte_mail);
$texte_mail = str_replace("!!empr_first_name!!", $coords->prenom, $texte_mail);
$headers .= "Content-type: text/plain; charset=" . $charset . "\n";
$res_envoi = mailpmb($coords->prenom . " " . $coords->nom, $coords->mail, $objet, $texte_mail, $biblio_name, $biblio_email, $headers, "", $PMBuseremailbcc, 1);
if ($res_envoi) {
echo "<center><h3>" . sprintf($msg["mail_retard_succeed"], $coords->mail) . "</h3><br /><a href=\"\" onClick=\"self.close(); return false;\">" . $msg["mail_retard_close"] . "</a></center><br /><br />" . nl2br($texte);
} else {
echo "<center><h3>" . sprintf($msg["mail_retard_failed"], $coords->mail) . "</h3><br /><a href=\"\" onClick=\"self.close(); return false;\">" . $msg["mail_retard_close"] . "</a></center>";
}
}
示例8: diffuser
function diffuser($texte = "")
{
global $dbh;
global $msg, $charset, $base_path;
global $PMBusernom, $opac_biblio_email, $opac_biblio_name;
global $PMBuserprenom;
global $PMBuseremail;
global $id_empr;
// paramétrage OPAC: choix du nom de la bibliothèque comme expéditeur
$requete = "select location_libelle, email from empr, docs_location where empr_location=idlocation and id_empr='{$id_empr}' ";
$res = pmb_mysql_query($requete, $dbh);
$loc = pmb_mysql_fetch_object($res);
$PMBusernom = $loc->location_libelle;
$PMBuserprenom = "";
$PMBuseremail = $loc->email;
$this->construit_diff($texte);
$texte_base = $this->texte_diffuse;
$res_envoi = false;
if ($this->nb_notices > 0) {
if ($this->export_contenu) {
$fic_params = $base_path . "/admin/convert/imports/" . $this->typeexport . "/params.xml";
$temppar = file_get_contents($fic_params);
$params = _parser_text_no_function_($temppar, "PARAMS");
if ($params["OUTPUT"][0]["SUFFIX"]) {
$ext = $params["OUTPUT"][0]["SUFFIX"];
} else {
$ext = "fic";
}
$pieces_jointes[0][nomfichier] = $this->prefixe_fichier . today() . "." . $ext;
$pieces_jointes[0][contenu] = $this->export_contenu;
}
$nb_dest = 0;
$nb_echec = 0;
$nb_no_email = 0;
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=" . $charset . "\n";
$requete = "select id_empr, empr_mail, empr_nom, empr_prenom, empr_login, empr_password from empr, bannette_abon ";
$requete .= "where num_bannette='" . $this->id_bannette . "' and empr_date_expiration>=sysdate() and num_empr=id_empr ";
$requete .= "order by empr_nom, empr_prenom ";
$res = pmb_mysql_query($requete, $dbh);
while ($empr = pmb_mysql_fetch_object($res)) {
$emaildest = $empr->empr_mail;
$texte = $texte_base;
if ($emaildest) {
// $res_envoi=@mail("$emaildest",$this->comment_public,$texte." ","From: ".$PMBuserprenom." ".$PMBusernom." <".$PMBuseremail.">\r\n".$headers);
$res_envoi = @mailpmb($empr->empr_prenom . " " . $empr->empr_nom, $emaildest, $this->comment_public, $texte, $PMBuserprenom . " " . $PMBusernom, $PMBuseremail, $headers, "", "", 0, $pieces_jointes);
}
}
/* A commenter pour tests */
$temp_requete = "update bannettes set date_last_envoi=sysdate() where id_bannette='" . $this->id_bannette . "' ";
$res = pmb_mysql_query($temp_requete, $dbh);
}
return $res_envoi;
}
示例9: sendMailLoansRunning
//.........这里部分代码省略.........
}
// l'objet du mail
$objet = $msg["prets_en_cours"];
//Date de l'édition
$date_edition = $msg['fpdf_edite'] . " " . formatdate(date("Y-m-d", time()));
// la formule de politesse du bas (le signataire)
$formule = $mailretard_1fdp;
$texte_mail = $objet . "\r\n";
$texte_mail .= $date_edition . "\r\n\r\n";
// if ($id_groupe) {
// //requete par rapport à un groupe d'emprunteurs
// $rqt1 = "select id_empr, empr_nom, empr_prenom from empr_groupe, empr, pret where groupe_id='".$id_groupe."' and empr_groupe.empr_id=empr.id_empr and pret.pret_idempr=empr_groupe.empr_id group by empr_id order by empr_nom, empr_prenom";
// $req1 = pmb_mysql_query($rqt1) or die($msg['err_sql'].'<br />'.$rqt1.'<br />'.pmb_mysql_error());
// }
//
// if ($id_empr) {
// //requete par rapport à un emprunteur
// $rqt1 = "select id_empr, empr_nom, empr_prenom from empr_groupe, empr, pret where id_empr='".$id_empr."' and empr_groupe.empr_id=empr.id_empr and pret.pret_idempr=empr_groupe.empr_id group by empr_id order by empr_nom, empr_prenom";
// $req1 = pmb_mysql_query($rqt1) or die($msg['err_sql'].'<br />'.$rqt1.'<br />'.pmb_mysql_error());
// }
if ($ident) {
if ($type_send == 1) {
//requete par rapport à un emprunteur
$rqt1 = "select id_empr, empr_nom, empr_prenom from empr_groupe, empr, pret where id_empr='" . $ident . "' and empr_groupe.empr_id=empr.id_empr and pret.pret_idempr=empr_groupe.empr_id group by empr_id order by empr_nom, empr_prenom";
$req1 = pmb_mysql_query($rqt1);
} else {
if ($type_send == 2) {
//requete par rapport à un groupe d'emprunteurs
$rqt1 = "select id_empr, empr_nom, empr_prenom from empr_groupe, empr, pret where groupe_id='" . $ident . "' and empr_groupe.empr_id=empr.id_empr and pret.pret_idempr=empr_groupe.empr_id group by empr_id order by empr_nom, empr_prenom";
$req1 = pmb_mysql_query($rqt1);
}
}
}
while ($data1 = pmb_mysql_fetch_array($req1)) {
$id_empr = $data1['id_empr'];
$texte_mail .= $data1['empr_nom'] . " " . $data1['empr_prenom'] . "\r\n\r\n";
//Récupération des exemplaires
$rqt = "select expl_cb from pret, exemplaires where pret_idempr='" . $id_empr . "' and pret_idexpl=expl_id order by pret_date ";
$req = pmb_mysql_query($rqt);
$i = 0;
while ($data = pmb_mysql_fetch_array($req)) {
/* Récupération des infos exemplaires et prêt */
$requete = "SELECT notices_m.notice_id as m_id, notices_s.notice_id as s_id, expl_cb, pret_date, pret_retour, tdoc_libelle, section_libelle, location_libelle, trim(concat(ifnull(notices_m.tit1,''),ifnull(notices_s.tit1,''),' ',ifnull(bulletin_numero,''), if (mention_date, concat(' (',mention_date,')') ,''))) as tit, ";
$requete .= " date_format(pret_date, '" . $msg["format_date"] . "') as aff_pret_date, ";
$requete .= " date_format(pret_retour, '" . $msg["format_date"] . "') as aff_pret_retour, ";
$requete .= " IF(pret_retour>sysdate(),0,1) as retard, notices_m.tparent_id, notices_m.tnvol ";
$requete .= "FROM (((exemplaires LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id), docs_type, docs_section, docs_location, pret ";
$requete .= "WHERE expl_cb='" . $data['expl_cb'] . "' and expl_typdoc = idtyp_doc and expl_section = idsection and expl_location = idlocation and pret_idexpl = expl_id ";
$res = pmb_mysql_query($requete, $dbh);
$expl = pmb_mysql_fetch_object($res);
$responsabilites = array();
$header_aut = "";
$responsabilites = get_notice_authors($expl->m_id + $expl->s_id);
$as = array_search("0", $responsabilites["responsabilites"]);
if ($as !== FALSE && $as !== NULL) {
$auteur_0 = $responsabilites["auteurs"][$as];
$auteur = new auteur($auteur_0["id"]);
$header_aut .= $auteur->isbd_entry;
} else {
$aut1_libelle = array();
$as = array_keys($responsabilites["responsabilites"], "1");
for ($i = 0; $i < count($as); $i++) {
$indice = $as[$i];
$auteur_1 = $responsabilites["auteurs"][$indice];
$auteur = new auteur($auteur_1["id"]);
$aut1_libelle[] = $auteur->isbd_entry;
}
$header_aut .= implode(", ", $aut1_libelle);
}
$header_aut ? $auteur = " / " . $header_aut : ($auteur = "");
// récupération du titre de série
if ($expl->tparent_id && $expl->m_id) {
$parent = new serie($expl->tparent_id);
$tit_serie = $parent->name;
if ($expl->tnvol) {
$tit_serie .= ', ' . $expl->tnvol;
}
}
if ($tit_serie) {
$expl->tit = $tit_serie . '. ' . $expl->tit;
}
$texte_mail .= $expl->tit . $auteur . "\r\n";
$texte_mail .= " -" . $msg[fpdf_date_pret] . " : " . $expl->aff_pret_date . " " . $msg[fpdf_retour_prevu] . " : " . $expl->aff_pret_retour . "\r\n";
$texte_mail .= " -" . $expl->location_libelle . ": " . $expl->section_libelle . " (" . $expl->expl_cb . ")\r\n\r\n";
$i++;
}
}
$texte_mail .= $formule . "\r\n\r\n" . mail_bloc_adresse();
/* Récupération du nom, prénom et mail de l'utilisateur */
$requete = "select id_empr, empr_mail, empr_nom, empr_prenom from empr where id_empr={$id_empr}";
$res = pmb_mysql_query($requete);
$coords = pmb_mysql_fetch_object($res);
$headers .= "Content-type: text/plain; charset=" . $charset . "\n";
$res_envoi = mailpmb($coords->empr_prenom . " " . $coords->empr_nom, $coords->empr_mail, $objet, $texte_mail, $biblio_name, $biblio_email, $headers, "", $PMBuseremailbcc, 1);
if ($res_envoi) {
return sprintf($msg["mail_retard_succeed"], $coords->empr_mail);
} else {
return sprintf($msg["mail_retard_failed"], $coords->empr_mail);
}
}
示例10: send_alert
function send_alert($expl_id)
{
global $serialcirc_send_alert_mail;
global $biblio_name, $biblio_email, $PMBuseremailbcc;
$req = " delete from serialcirc_circ where num_serialcirc_circ_expl=" . $expl_id;
mysql_query($req);
foreach ($this->info_expl[$expl_id]['serialcirc_diff']->diffusion as $diff_id => $diffusion) {
$diff_list[] = $diff_id;
if ($diffusion["empr_type"] == SERIALCIRC_EMPR_TYPE_group) {
foreach ($diffusion['group'] as $empr_group) {
$empr_list[$empr_group["num_empr"]] = $diff_id;
}
} else {
$empr_list[$diffusion["num_empr"]] = $diff_id;
}
}
$req = "UPDATE serialcirc_expl SET \n\t\tserialcirc_expl_state_circ=0,\n\t\tserialcirc_expl_start_date=CURDATE()\n\t\twhere num_serialcirc_expl_id= {$expl_id}";
mysql_query($req);
$order = 0;
foreach ($empr_list as $empr_id => $diff_id) {
$req = " insert into serialcirc_circ SET \n\t\t\tnum_serialcirc_circ_diff=" . $diff_id . ",\n\t\t\tnum_serialcirc_circ_expl=" . $expl_id . ",\n\t\t\tnum_serialcirc_circ_empr=" . $empr_id . ",\n\t\t\tserialcirc_circ_subscription=0,\n\t\t\tserialcirc_circ_order=" . $order . ",\n\t\t\tnum_serialcirc_circ_serialcirc=" . $this->info_expl[$expl_id]['num_serialcirc'];
mysql_query($req);
$order++;
// envoit mail alert
$texte_mail = $serialcirc_send_alert_mail;
$expl_info = $this->expl_info($expl_id);
$empr_info = $this->empr_info($empr_id);
$texte_mail = str_replace("!!issue!!", $expl_info['perio'] . "-" . $expl_info['numero'], $texte_mail);
mailpmb($empr_info["prenom"] . " " . $empr_info["nom"], $empr_info["mail"], $objet, $texte_mail, $biblio_name, $biblio_email, "", "", $PMBuseremailbcc, 1);
}
}
示例11: generateMailReadersSubscription
function generateMailReadersSubscription($id_empr, $empr_location_id)
{
global $mailrelanceadhesion_objet, $mailrelanceadhesion_fdp, $mailrelanceadhesion_madame_monsieur, $mailrelanceadhesion_texte;
$this->infos_biblio($empr_location_id);
// l'objet du mail
$var = "mailrelanceadhesion_objet";
eval("\$objet=\"" . ${$var} . "\";");
// la formule de politesse du bas (le signataire)
$var = "mailrelanceadhesion_fdp";
eval("\$fdp=\"" . ${$var} . "\";");
// le "Madame, Monsieur," ou tout autre truc du genre "Cher adhérent,"
$var = "mailrelanceadhesion_madame_monsieur";
eval("\$madame_monsieur=\"" . ${$var} . "\";");
// le texte
$var = "mailrelanceadhesion_texte";
eval("\$texte=\"" . ${$var} . "\";");
// mettre ici le texte
$coords = new emprunteur($id_empr, '', FALSE, 0);
if ($madame_monsieur) {
$texte_mail = $madame_monsieur . "\r\n\r\n";
}
$texte_mail .= $texte . "\r\n";
if ($fdp) {
$texte_mail .= $fdp . "\r\n\r\n";
}
$texte_mail .= mail_bloc_adresse();
$texte_mail = str_replace("!!date_fin_adhesion!!", $coords->aff_empr_date_expiration, $texte_mail);
//remplacement nom et prenom
$texte_mail = str_replace("!!empr_name!!", $coords->nom, $texte_mail);
$texte_mail = str_replace("!!empr_first_name!!", $coords->prenom, $texte_mail);
$headers .= "Content-type: text/plain; charset=" . $charset . "\n";
$res_envoi = mailpmb($coords->prenom . " " . $coords->nom, $coords->mail, $objet, $texte_mail, $biblio_name, $biblio_email, $headers, "", $PMBuseremailbcc, 1);
return $res_envoi;
}
示例12: send_alert_by_mail
function send_alert_by_mail($idsender, $idparent = 0)
{
global $msg, $PMBusernom, $PMBuserprenom, $PMBuseremail, $dbh;
if ($idparent) {
$nots = new demandes_notes($idparent);
$titre = strlen($nots->contenu) < 30 ? substr($nots->contenu, 0, 30) : substr($nots->contenu, 0, 30) . "...";
$objet = sprintf($msg['demandes_note_mail_reponse_object'], $titre);
$contenu = $PMBuserprenom . " " . $PMBusernom . " " . sprintf($msg['demandes_note_mail_reponse'], $titre, $nots->libelle_action, $nots->libelle_demande);
} else {
$contenu = $PMBuserprenom . " " . $PMBusernom . " " . sprintf($msg['demandes_note_mail_new'], $this->libelle_action, $this->libelle_demande);
$objet = $msg['demandes_note_mail_new_object'];
}
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1";
//Envoi du mail aux autres documentalistes concernés par la demande
$req = "select user_email, concat(prenom,' ',nom) as nom from users\n\t\t\tjoin demandes_users on num_user=userid\n\t\t\twhere num_demande='" . $this->num_demande . "' and num_user !='" . $idsender . "'";
$res = mysql_query($req, $dbh);
while ($user = mysql_fetch_object($res)) {
if ($user->user_email) {
$envoi_OK = mailpmb($user->nom, $user->user_email, $objet, $contenu, $PMBuserprenom . " " . $PMBusernom, $PMBuseremail, $headers, "");
}
}
//Envoi du mail au demandeur
$req = "select concat(empr_nom,' ',empr_prenom) as nom, empr_mail\n\t\t\tfrom empr\n\t\t\tjoin demandes on id_empr=num_demandeur\n\t\t\twhere id_demande='" . $this->num_demande . "'";
$res = mysql_query($req, $dbh);
$empr = mysql_fetch_object($res);
if ($empr->empr_mail) {
$envoi_OK = mailpmb($empr->nom, $empr->empr_mail, $objet, $contenu, $PMBuserprenom . " " . $PMBusernom, $PMBuseremail, $headers, "");
}
}
示例13: sendMail
function sendMail($sug)
{
global $dbh, $msg, $charset;
global $biblio_name, $biblio_email, $biblio_phone;
global $acquisition_mel_rej_obj, $acquisition_mel_rej_cor;
global $acquisition_mel_con_obj, $acquisition_mel_con_cor;
global $acquisition_mel_aba_obj, $acquisition_mel_aba_cor;
global $acquisition_mel_cde_obj, $acquisition_mel_cde_cor;
global $acquisition_mel_rec_obj, $acquisition_mel_rec_cor;
$mask = $this->getMask_FILED();
if (($sug->statut & $mask) == 0) {
$state = $sug->statut;
} else {
$state = $mask;
}
$state_name = $this->id_to_name[$state];
switch ($state_name) {
case 'REJECTED':
//Rejet
$objet = $acquisition_mel_rej_obj;
$corps = $acquisition_mel_rej_cor;
break;
case 'CONFIRMED':
//Confirmation
$objet = $acquisition_mel_con_obj;
$corps = $acquisition_mel_con_cor;
break;
case 'GIVENUP':
//Abandon
$objet = $acquisition_mel_aba_obj;
$corps = $acquisition_mel_aba_cor;
break;
case 'ORDERED':
//Commande
$objet = $acquisition_mel_cde_obj;
$corps = $acquisition_mel_cde_cor;
break;
case 'RECEIVED':
//Réception
$objet = $acquisition_mel_rec_obj;
$corps = $acquisition_mel_rec_cor;
break;
default:
return;
break;
}
$corps .= "\n\n " . $msg['acquisition_sug_tit'] . " :\t " . $sug->titre . "\n";
if ($sug->auteur) {
$corps .= $msg['acquisition_sug_aut'] . " :\t " . $sug->auteur . "\n";
}
if ($sug->editeur) {
$corps .= $msg['acquisition_sug_edi'] . " :\t " . $sug->editeur . "\n";
}
if ($sug->code) {
$corps .= $msg['acquisition_sug_cod'] . " :\t " . $sug->code . "\n";
}
if ($sug->prix) {
$corps .= $msg['acquisition_sug_pri'] . " :\t " . $sug->prix . "\n";
}
if ($sug->commentaires) {
$corps .= $msg['acquisition_sug_com'] . " :\t " . $sug->commentaires . "\n";
}
$corps .= "\n\n";
$corps = str_replace('!!date!!', formatdate($sug->date_creation), $corps);
$q = suggestions_origine::listOccurences($sug->id_suggestion);
$list_orig = mysql_query($q, $dbh);
while ($row = mysql_fetch_object($list_orig)) {
switch ($row->type_origine) {
default:
case '0':
$q = "SELECT nom, prenom, user_email FROM users where userid = '" . $row->origine . "' limit 1 ";
$r = mysql_fetch_object(mysql_query($q, $dbh));
$tonom = $r->prenom . " " . $r->nom;
$tomail = $r->user_email;
break;
case '1':
$q = "SELECT empr_nom, empr_prenom, empr_mail FROM empr where id_empr = '" . $row->origine . "' limit 1 ";
$r = mysql_fetch_object(mysql_query($q, $dbh));
$tonom = $r->empr_prenom . " " . $r->empr_nom;
$tomail = $r->empr_mail;
break;
case '2':
$tonom = $row->origine;
$tomail = $row->origine;
break;
}
if ($tomail != '') {
$res_envoi = mailpmb($tonom, $tomail, $objet, $corps, $biblio_name, $biblio_email, "Content-Type: text/plain; charset=\"{$charset}\"\n", "", "");
}
}
}
示例14: str_replace
// Bonjour,<br /><br />Pour faire suite à votre demande de réinitialisation de mot de passe à <b>!!biblioname!!</b>, veuillez trouver ci-dessous le lien qui vous permettra d'effectuer ce changement : <br /><br />!!lien_mdp!!<br /><br /> - Pour rappel, votre identifiant est : !!login!!<br /><br />Si vous rencontrez des difficultés, adressez un mail à !!biblioemail!!.<br /><br />
$messagemail = $msg[mdp_mail_body];
$messagemail = str_replace("!!login!!", $row->empr_login, $messagemail);
$messagemail = str_replace("!!biblioname!!", "<a href=\"{$opac_url_base}\">" . $biblio_name_temp . "</a>", $messagemail);
$lien_mdp = "<a href='" . $opac_url_base . "empr.php?lvl=change_password&emprlogin=" . $row->empr_login . "&password_key=" . $password_key . "'>" . $opac_url_base . "empr.php?lvl=change_password&emprlogin=" . $row->empr_login . "&password_key=" . $password_key . "</a>";
$messagemail = str_replace("!!lien_mdp!!", $lien_mdp, $messagemail);
$messagemail = str_replace("!!biblioemail!!", "<a href=mailto:{$opac_biblio_email}>{$biblio_email_temp}</a>", $messagemail);
$objetemail = str_replace("!!biblioname!!", $biblio_name_temp, $msg[mdp_mail_obj]);
print "<hr />";
if ($opac_parse_html) {
$objetemail = parseHTML($objetemail);
$messagemail = parseHTML($messagemail);
$biblio_name_temp = parseHTML($biblio_name_temp);
$biblio_email_temp = parseHTML($biblio_email_temp);
}
$res_envoi = @mailpmb(trim($row->nom_prenom), $emails_empr[$i], $objetemail, $messagemail, $biblio_name_temp, $biblio_email_temp, $headers);
if (!$res_envoi) {
print "<p class='texte'>Could not send information to {$emails_empr[$i]}.</p><br />";
} else {
print "<p class='texte'>" . $msg[mdp_sent_ok] . " {$emails_empr[$i]}.</p><br />";
}
}
}
}
if (!$res_envoi) {
print "<hr /><p class='texte'>" . str_replace("!!biblioemail!!", "<a href=mailto:{$opac_biblio_email}>{$opac_biblio_email}</a>", $msg[mdp_no_email]) . "</p>";
print $demandeemail;
}
} else {
print "<hr /><p class='texte'>" . str_replace("!!biblioemail!!", "<a href=mailto:{$opac_biblio_email}>{$opac_biblio_email}</a>", $msg[mdp_no_email]) . "</p>";
print $demandeemail;
示例15: delete_empr
function delete_empr($id_liste, $id_empr)
{
global $dbh, $msg, $opac_url_base, $opac_connexion_phrase, $empr_nom, $empr_prenom, $empr_mail;
//envoi du mail de désinscription
$req = "select empr_login, empr_mail, concat(empr_prenom,' ',empr_nom) as nom, nom_liste \n\tfrom abo_liste_lecture abo, opac_liste_lecture, empr \n\twhere abo.num_empr=id_empr and id_liste=num_liste\n\tand num_liste='" . $id_liste . "' and abo.num_empr='" . $id_empr . "'";
$res = pmb_mysql_query($req, $dbh);
$inscrit = pmb_mysql_fetch_object($res);
$objet = sprintf($msg['list_lecture_objet_unsubscribe_mail'], $inscrit->nom_liste);
$date = time();
$login = $inscrit->empr_login;
$code = md5($opac_connexion_phrase . $login . $date);
$corps = sprintf($msg['list_lecture_intro_mail'], $inscrit->nom, $inscrit->nom_liste) . ", <br />" . sprintf($msg['list_lecture_unsubscribe_mail'], $empr_prenom . " " . $empr_nom, $inscrit->nom_liste);
if ($com) {
$corps .= sprintf("<br />" . $msg['list_lecture_corps_com_mail'], $empr_prenom . " " . $empr_nom, "<br />" . $com . "<br />");
}
$corps .= "<br /><br /><a href='" . $opac_url_base . "empr.php?code={$code}&emprlogin={$login}&date_conex={$date}&tab=lecture&lvl=private_list&sub=my_list' >" . $msg['redirection_mail_link'] . "</a>";
mailpmb($inscrit->nom, $inscrit->empr_mail, $objet, stripslashes($corps), $empr_prenom . " " . $empr_nom, $empr_mail);
//désinscripiton
$requete = "delete from abo_liste_lecture where num_liste='" . $id_liste . "' and num_empr='" . $id_empr . "'";
pmb_mysql_query($requete, $dbh);
//réaffichage de la liste
$req = "select id_empr, trim(concat(empr_prenom,' ',empr_nom)) as nom, confidential \n\tfrom empr e, abo_liste_lecture abo, opac_liste_lecture oll \n\twhere abo.num_empr=e.id_empr and oll.id_liste=abo.num_liste \n\tand etat=2 and num_liste='" . $id_liste . "'\n\torder by nom";
$res = pmb_mysql_query($req, $dbh);
if (!pmb_mysql_num_rows($res)) {
$display = $msg[list_lecture_no_user_inscrit];
print $display;
return;
}
$display = "";
while ($empr = pmb_mysql_fetch_object($res)) {
if ($empr->confidential) {
$display .= "<img border=0 align='top' src='" . $opac_url_base . "images/cross.png' onclick=\"delete_from_liste('" . $id_liste . "','" . $empr->id_empr . "');\">";
}
$display .= $empr->nom . "<br />";
}
print $display;
}