"; exit; } require_once(e_PLUGIN.$mailer."/mailout_class.php"); if (varset($mailer_include_with_default,TRUE) || ($mail_plugin == $mailer)) { // Definitely need this plugin $mail_class = 'mailout_'.$mailer; $temp = new $mail_class; if ($temp->mailer_enabled) { $mail_handlers[] = &$temp; if (($mail_plugin !== FALSE) && varset($mailer_exclude_default,FALSE)) { $mail_handlers[0]->mailer_enabled = FALSE; // Don't need default handler } } else { unset($temp); } } } } } //---------------------------------------- // Send test email - uses standard 'single email' handler //---------------------------------------- if (isset($_POST['testemail']) && getperms("0")) { if(trim($_POST['testaddress']) == "") { $message = LAN_MAILOUT_19; } else { $mailheader_e107id = USERID; require_once(e_HANDLER."mail.php"); $add = ($pref['mailer']) ? " (".strtoupper($pref['mailer']).")" : " (PHP)"; $sendto = trim($_POST['testaddress']); if (!sendemail($sendto, LAN_MAILOUT_113." ".SITENAME.$add, LAN_MAILOUT_114,LAN_MAILOUT_125)) { $message = ($pref['mailer'] == "smtp") ? LAN_MAILOUT_67 : LAN_MAILOUT_106; } else { $message = LAN_MAILOUT_81. "(".$sendto.")"; } } } /* // Delete any mailout entries that have hung around for a day or more (intentionally commented out - done manually now) $sql->db_Delete("generic", "gen_type='sendmail' AND gen_datestamp < ".(time()-86400)); */ //---------------------------------------- // Saved emails //---------------------------------------- if (isset($_POST['save_email'])) { $qry = "0,'massmail', '".time()."', '".USERID."', '".$tp->toDB($_POST['email_subject'])."', '0', \"".$tp->toDB($_POST['email_body'])."\" "; $message = $sql -> db_Insert("generic", $qry) ? LAN_SAVED : LAN_ERROR; } if (isset($_POST['update_email'])) { $qry = "gen_user_id = '".USERID."', gen_datestamp = '".time()."', gen_ip = '".$tp->toDB($_POST['email_subject'])."', gen_chardata= \"".$tp->toDB($_POST['email_body'])."\" WHERE gen_id = '".$_POST['update_id']."' "; $message = $sql -> db_Update("generic", $qry) ? LAN_UPDATED : LAN_UPDATED_FAILED; } /* if (isset($_POST['delete'])) { $d_idt = array_keys($_POST['delete']); $message = ($sql -> db_Delete("generic", "gen_id='".$d_idt[0]."'")) ? LAN_DELETED : LAN_DELETED_FAILED; $action = 'list'; } if (isset($_POST['edit'])) { $e_idt = array_keys($_POST['edit']); if($sql -> db_Select("generic", "*", "gen_id='".$e_idt[0]."' ")) { $foo = $sql -> db_Fetch(); } } */ if (($action == 'savedmail') && $sub_par && $mail_id) { // echo "Dealing with saved emails {$sub_par} ID {$mail_id}
"; switch($sub_par) { case 'edit' : if($sql -> db_Select("generic", "*", "gen_id='".$mail_id."' ")) { $foo = $sql -> db_Fetch(); $action = 'makemail'; } break; case 'delete' : $message = ($sql -> db_Delete("generic", "gen_id='".$mail_id."'")) ? LAN_DELETED : LAN_DELETED_FAILED; $action = 'list'; break; default : $action = 'makemail'; } } $_POST['mail_id'] = time(); // Unique ID for email - used to select our run of emails (as opposed to any other that might be going on) // if (!is_object($sql2)) $sql2 = new db; // Should be OK in 0.8 function ret_extended_field_list($list_name, $add_blank = FALSE) { global $sql; $ret = "\n"; return $ret; } // --------------------------------------------- // Find a block of emails to send // --------------------------------------------- if (isset($_POST['submit'])) { $c = 0; // Record count $dups = 0; // Counter for duplicates $email_subject = $tp->toDB($_POST['email_subject']); $mail_id = intval(varset($_POST['mail_id'],0)); /* Save the actual email, so we aren't reliant on passing $_POST data for immediate use Format is as follows: gen_id int(10) unsigned NOT NULL auto_increment, - set to zero (auto assigned) gen_type varchar(80) NOT NULL default '', - record type being added ('savemail') gen_datestamp int(10) unsigned NOT NULL default '0', - Mail ID code - to match the destination address records gen_user_id int(10) unsigned NOT NULL default '0', - User ID of current author gen_ip varchar(80) NOT NULL default '', - Email subject gen_intdata int(10) unsigned NOT NULL default '0', - Initially set to zero - set to number of emails initially added gen_chardata text NOT NULL, - 'From' email address and name, Email body */ $email_data = array('sender_email' => $email_address, 'sender_name' => $email_name, 'copy_to' => $tp->toDB($_POST['email_cc']), 'bcopy_to' => $tp->toDB($_POST['email_bcc']), 'attach' => $tp->toDB(trim($_POST['email_attachment'])), 'email_subject' => $tp->toDB(trim($_POST['email_subject'])), 'email_body' => $tp->toDB($_POST['email_body']), 'use_theme' => intval(varset($_POST['use_theme'],0)) ); $qry = "0,'savemail', '".$mail_id."', '".USERID."', '".$tp->toDB($_POST['email_subject'])."', '0', '".serialize($email_data)."' "; $message = ($mail_text_id = $sql -> db_Insert("generic", $qry)) ? LAN_SAVED : LAN_ERROR; $mail_text_id = intval($mail_text_id); if ($mail_text_id == 0) { Echo "Email not saved.
"; echo $message; require_once(FOOTERF); exit; } foreach ($mail_handlers as $m) { // Get email addresses from each handler in turn. Do them one at a time, so that all can use the $sql data object if ($m->mailer_enabled) { // Initialise $m->select_init(); // Get email addresses - add to list, strip duplicates while ($row = $m->select_add()) { // Add email addresses to the database ready for sending (the body is never saved in the DB - it gets passed as a $_POST value) $email_address = trim($row['user_email']); $email_name = $row['user_name']; if ($email_name == '') { $email_name = 'unknown'; } $email_target = serialize(array('user_email' => $email_address, 'user_name' => $email_name, 'user_signup' => varset($row['user_signup'],''))); /* Table data: gen_id int(10) unsigned NOT NULL auto_increment, - set to zero (auto assigned) gen_type varchar(80) NOT NULL default '', - record type being added - 'sendmail' gen_datestamp int(10) unsigned NOT NULL default '0', - Mail ID code (matches the stored email) gen_user_id int(10) unsigned NOT NULL default '0', - User ID - zero if not a registered user gen_ip varchar(80) NOT NULL default '', - User email address (so we can search for duplicates) gen_intdata int(10) unsigned NOT NULL default '0', - ID number of email text in 'generic' table (previous version used zero here) gen_chardata text NOT NULL, - User email address, name, signup link ID (previous version stored subject here) */ $qry = "0,'sendmail', '".$_POST['mail_id']."', '".$row['user_id']."', '".$email_address."', '".$mail_text_id."', '".$email_target."' "; if ($sql2->db_Select('generic', 'gen_ip', "`gen_datestamp`= '{$_POST['mail_id']}' AND `gen_ip`='{$email_address}'")) { $dups++; // Found second entry with same email address } else { if($sql2 -> db_Insert("generic", $qry)) { $c++; } else { echo "Error on insert: ".$qry."
"; } } } // Close $m->select_close(); } } $sql->db_Update('generic',"`gen_intdata`={$c} WHERE `gen_id`={$mail_text_id}"); // We've got all the email addresses here - display a confirmation form $debug = (e_MENU == "debug") ? "?[debug]" : ""; $text = "
"; $text .= "\n"; $text .= "\n"; $text .= "
"; $text .= "
{$c} ".LAN_MAILOUT_24."
"; $text .= "

"; $text .= "

".LAN_MAILOUT_118."


"; // Preview Email // -------------- $text .= "
"; // Add in core and any plugin selectors here foreach ($mail_handlers as $m) { if ($m->mailer_enabled) { $text .= ""; } } // Support 'cc' and 'bcc' as standard mailout addresses $text .= ($_POST['email_cc']) ? " ": ""; $text .= ($_POST['email_bcc']) ? " ": ""; $text .= " "; // Attachment if ($email_data['attach']) { $text .= " "; } // Figures - number of emails to send, number of duplicates stripped $text .= " "; // Email text $text .="
".LAN_MAILOUT_01." / ".LAN_MAILOUT_02." ".$_POST['email_from_name']." <".$_POST['email_from_email'].">
".$m->mailer_name."".$m->show_select(FALSE)."
".LAN_MAILOUT_04." ".$_POST['email_cc']." 
".LAN_MAILOUT_05." ".$_POST['email_bcc']." 
".LAN_MAILOUT_51." ".$_POST['email_subject']." 
".LAN_MAILOUT_07." ".$email_data['attach']." 
".LAN_MAILOUT_71." ".$c." ".LAN_MAILOUT_69.$dups.LAN_MAILOUT_70."
".stripslashes($tp->toHTML($_POST['email_body'],TRUE))."
"; $ns->tablerender(LAN_MAILOUT_39." ({$c}) ", $text); require_once(e_ADMIN."footer.php"); exit; } // End of previewed email //. Update Preferences. if (isset($_POST['updateprefs']) && getperms("0")) { $pref['mailer'] = $_POST['mailer']; // Allow qmail as an option as well - works much as sendmail if ((strpos($_POST['sendmail'],'sendmail') !== FALSE) || (strpos($_POST['sendmail'],'qmail') !== FALSE)) $pref['sendmail'] = $_POST['sendmail']; $pref['smtp_server'] = $tp->toDB($_POST['smtp_server']); $pref['smtp_username'] = $tp->toDB($_POST['smtp_username']); $pref['smtp_password'] = $tp->toDB($_POST['smtp_password']); $smtp_opts = array(); switch (trim($_POST['smtp_options'])) { case 'smtp_ssl' : $smtp_opts[] = 'secure=SSL'; break; case 'smtp_tls' : $smtp_opts[] = 'secure=TLS'; break; case 'smtp_pop3auth' : $smtp_opts[] = 'pop3auth'; break; } if (varsettrue($_POST['smtp_keepalive'])) $smtp_opts[] = 'keepalive'; if (varsettrue($_POST['smtp_useVERP'])) $smtp_opts[] = 'useVERP'; $pref['smtp_pop3auth'] = in_array('pop3auth',$smpt_opts); // This will go! $pref['smtp_keepalive'] = $_POST['smtp_keepalive']; // This will go! $pref['smtp_options'] = implode(',',$smtp_opts); $pref['mail_pause'] = $_POST['mail_pause']; $pref['mail_pausetime'] = $_POST['mail_pausetime']; $pref['mail_bounce_email'] = $_POST['mail_bounce_email']; $pref['mail_bounce_pop3'] = $_POST['mail_bounce_pop3']; $pref['mail_bounce_user'] = $_POST['mail_bounce_user']; $pref['mail_bounce_pass'] = $_POST['mail_bounce_pass']; $pref['mail_bounce_type'] = $_POST['mail_bounce_type']; $pref['mail_bounce_delete'] = $_POST['mail_bounce_delete']; $pref['mailout_enabled'] = implode(',',$_POST['mail_mailer_enabled']); $pref['mail_log_options'] = intval($_POST['mail_log_option']).','.intval($_POST['mail_log_email']); save_prefs(); $message = LAN_SETSAVED; } if (isset($message)) { $ns->tablerender("", "
".$message."
"); } // ----------------- Actions -----------------------------------------------> //if((!e_QUERY && !$_POST['delete']) || $_POST['edit']) $action = 'makemail'; if (!varsettrue($action)) $action = 'makemail'; switch ($action) { case "prefs" : if (getperms("0")) { show_prefs(); } break; case 'makemail' : show_mailform($foo); break; case "list" : showList(); break; case 'debug' : showList($sub_par); break; case 'mailouts' : showMailouts($sub_par,$mail_id); } require_once(e_ADMIN."footer.php"); //--------------------------------------------- // List of incomplete mailouts //--------------------------------------------- function showMailouts($sub_par,$mail_id) { global $sql,$ns,$tp, $images_path; // gen_datestamp int(10) unsigned NOT NULL default '0', - Mail ID code - to match the destination address records // gen_user_id int(10) unsigned NOT NULL default '0', - User ID of current author // gen_ip varchar(80) NOT NULL default '', - Email subject // gen_intdata int(10) unsigned NOT NULL default '0', - Initially set to zero - set to number of emails initially added $message = ''; if ($sub_par && $mail_id) { switch ($sub_par) { case 'delete' : if ($sql->db_Select('generic','gen_datestamp',"`gen_datestamp`={$mail_id} AND `gen_type`='savemail'")) { $message = $sql->db_Delete('generic',"`gen_datestamp`={$mail_id} AND (`gen_type`='sendmail' OR `gen_type`='savemail')") ? LAN_DELETED : LAN_DELETED_FAILED; } else { // Should only happen if people fiddle! $message = "Error - database record not found"; echo "DB error
"; } break; case 'detail' : // Show the detail of an email run above the main list if ($sql->db_Select('generic','gen_id,gen_datestamp,gen_chardata',"`gen_datestamp`={$mail_id} AND `gen_type`='savemail'")) { $row = $sql->db_Fetch(); // Display a little bit of the email $mail = unserialize($row['gen_chardata']); $text = " \n \n \n"; if ($sql->db_Select('generic','gen_id,gen_datestamp,gen_chardata',"`gen_datestamp`={$mail_id} AND `gen_type`='sendmail'")) { $text .= "\n"; } $text .= "
".LAN_MAILOUT_51." ".$mail['email_subject']."
".LAN_MAILOUT_103." ".(isset($mail['send_results']) ? implode('
',$mail['send_results']) : LAN_MAILOUT_104)."
".LAN_MAILOUT_105.""; $spacer = ''; $i = 0; while (($row = $sql->db_Fetch()) && ($i < 10)) { $this_mail = unserialize($row['gen_chardata']); if (isset($this_mail['send_result'])) { $text .= $spacer.LAN_MAILOUT_03.' '.$this_mail['user_name'].' '.LAN_MAILOUT_107.' '.$this_mail['user_email'].' '.LAN_MAILOUT_108.' '.$this_mail['send_result']; $spacer = '
'; $i++; } } $text .= "
"; $ns->tablerender(LAN_MAILOUT_102,$text); } else { // Should only happen if people fiddle! $message = "Error - database record not found"; echo "DB error
"; } break; case 'resend' : // Echo "resend: {$mail_id}
"; if ($sql->db_Select('generic','gen_id,gen_datestamp,gen_chardata',"`gen_datestamp`={$mail_id} AND `gen_type`='savemail'")) { // Put up confirmation $row = $sql->db_Fetch(); $debug = (e_MENU == "debug") ? "[debug]" : ""; $mailer_url = e_HANDLER."phpmailer/mailout_process.php?".$debug."{$row['gen_datestamp']}.{$row['gen_id']}"; $c = $sql->db_Count('generic','(*)',"WHERE `gen_datestamp`={$mail_id} AND `gen_type`='sendmail'"); // Count of mails to go $text = "
"; $text .= "
{$c} ".LAN_MAILOUT_24."
"; $text .= "

"; $text .= "


"; $ns->tablerender(LAN_MAILOUT_99,$text); // Display a little bit of the email $mail = unserialize($row['gen_chardata']); $text = " \n \n \n
".LAN_MAILOUT_51." ".$mail['email_subject']."
".LAN_MAILOUT_100." ".$mail['email_body']."
"; $ns->tablerender(LAN_MAILOUT_101,$text); return; } else { // Should only happen if people fiddle! $message = "Error - database record not found"; echo "DB error
"; } break; case 'orphans' : // Delete any orphaned emails if ($sql->db_Select('generic','gen_datestamp',"`gen_datestamp`={$mail_id} AND `gen_type`='sendmail'")) { $message = $sql->db_Delete('generic',"`gen_datestamp`={$mail_id} AND `gen_type`='sendmail'") ? LAN_DELETED : LAN_DELETED_FAILED; } else { // Should only happen if people fiddle! $message = "Error - database record not found"; echo "DB error
"; } break; default : echo "Invalid parameter: {$sub_par}
"; } } if ($message) $ns -> tablerender("
".LAN_MAILOUT_78."
", $message); // Need to select main email entries; count number of addresses attached to each $gen = new convert; $qry = "SELECT u.user_name, g.*, COUNT(m.gen_datestamp) AS pending FROM `#generic` AS g LEFT JOIN `#user` as u ON g.gen_user_id=u.user_id LEFT JOIN `#generic` AS m ON m.gen_datestamp = g.gen_datestamp AND m.gen_type='sendmail' WHERE g.gen_type='savemail' GROUP BY g.gen_datestamp ORDER BY g.gen_id ASC"; $count = $sql -> db_Select_gen($qry); $emails_found = array(); // Log ID and count for later $text = "
"; if (!$count) { $text = "
".LAN_MAILOUT_79."
"; $ns -> tablerender("
".LAN_MAILOUT_78."
", $text); require_once(e_ADMIN."footer.php"); exit; } $text .= "
"; while ($row = $sql->db_Fetch()) { $datestamp = $gen->convert_date($row['gen_datestamp'], "short"); if ($row['pending']) $emails_found[$row['gen_datestamp']] = $row['pending']; // Log the mailshot in a list if any emails to go $text .= " "; } $text .= "
".LAN_MAILOUT_84." ".LAN_MAILOUT_80." ".LAN_MAILOUT_85." ".LAN_MAILOUT_06." ".LAN_MAILOUT_82." ".LAN_MAILOUT_83." ".LAN_OPTIONS."
".$row['gen_datestamp'] ." ".$datestamp." ".$row['user_name']." ".$row['gen_ip']." ".$row['gen_intdata']." ".$row['pending']."
"; $text .= "".LAN_MAILOUT_109.""; if ($row['pending']) { $text .= "".LAN_MAILOUT_86.""; } $text .= " toJS(LAN_CONFIRMDEL." [".$row['gen_ip']."]")."') \">".LAN_DELETE."
\n



"; $ns -> tablerender("
".LAN_MAILOUT_78."
", $text); // Now see if we can find any 'orphaned' mailout entries $qry = "SELECT g.gen_datestamp, COUNT(g.gen_datestamp) AS pending FROM `#generic` AS g WHERE g.gen_type='sendmail' GROUP BY g.gen_datestamp ORDER BY g.gen_id ASC"; $count = $sql -> db_Select_gen($qry); // Echo "There are {$count} groups of unsent emails: ".count($emails_found)." in previous table
"; if ($count > count($emails_found)) { $text = "
\n "; while ($row = $sql->db_Fetch()) { if (!isset($emails_found[$row['gen_datestamp']])) { $text .= "\n "; } // echo "ID: {$row['gen_datestamp']} Unsent: {$row['pending']}"; } $text .= "
".LAN_MAILOUT_84." ".LAN_MAILOUT_83." ".LAN_OPTIONS."
".$row['gen_datestamp'] ." ".$row['pending']."
\n



"; $ns -> tablerender("
".LAN_MAILOUT_98."
", $text); } } //--------------------------------------------- // Display Mailout Form //--------------------------------------------- function show_mailform($foo="") { global $ns,$sql,$tp,$pref,$HANDLERS_DIRECTORY; global $mail_handlers; $email_subject = $foo['gen_ip']; $email_body = $tp->toForm($foo['gen_chardata']); $email_id = $foo['gen_id']; $text = ""; if(strpos($_SERVER['SERVER_SOFTWARE'],"mod_gzip") && !is_readable(e_HANDLER."phpmailer/.htaccess")) { $warning = LAN_MAILOUT_40." ".$HANDLERS_DIRECTORY."phpmailer/ ".LAN_MAILOUT_41; $ns -> tablerender(LAN_MAILOUT_42, $warning); } $debug = (e_MENU == "debug") ? "?[debug]" : ""; $text .= "
"; $text .=" "; // Add in the core and any plugin selectors here foreach ($mail_handlers as $m) { if ($m->mailer_enabled) { $text .= ""; } } // CC, BCC $text .= " "; // Close one table, open another - to give a boundary between addressees and content $text .= "
".LAN_MAILOUT_01.":
".LAN_MAILOUT_02.":
".$m->mailer_name."".$m->show_select(TRUE)."
".LAN_MAILOUT_04.":
".LAN_MAILOUT_05.":
"; // Subject $text .= " "; // Attachment. $text .= ""; $text .= " "; $text .=" "; $text .= "
".LAN_MAILOUT_51.":
".LAN_MAILOUT_07.": "; $text .= ""; $text .= "
".LAN_MAILOUT_09.":
"; global $eplug_bb; $eplug_bb[] = array( "name" => 'shortcode', "onclick" => 'expandit', "onclick_var" => "sc_selector", "icon" => e_IMAGE."generic/bbcode/shortcode.png", "helptext" => LAN_MAILOUT_11, "function" => "sc_Select", "function_var" => "sc_selector" ); $text .= display_help("helpb",'mailout'); if(e_WYSIWYG) { $text .=" "; } $text .="
"; if(isset($_POST['edit'])){ $text .= ""; $text .= ""; }else{ $text .= ""; } $text .=" 
"; $ns->tablerender(LAN_MAILOUT_15, $text); } //---------------------------------------------------- // MAILER OPTIONS //---------------------------------------------------- function show_prefs() { global $pref,$ns; $text = "
\n \n"; if (isset($pref['mailout_sources'])) { // Allow selection of email address sources $text .= "\n"; } list($mail_log_option,$mail_log_email) = explode(',',varset($pref['mail_log_options'],'0,0')); $check = ($mail_log_email == 1) ? " checked='checked'" : ""; $text .= "\n"; $text .= " \n
".LAN_MAILOUT_110."
 
".LAN_MAILOUT_115."
".LAN_MAILOUT_116."

"; // SMTP. --------------> $smtp_opts = explode(',',varset($pref['smtp_options'],'')); $smtpdisp = ($pref['mailer'] != "smtp") ? "display:none;" : ""; $text .= "
"; $text .= " "; $text .= ""; $checked = (in_array('useVERP',$smtp_opts) ? "checked='checked'" : ""); $text .= "
".LAN_MAILOUT_87.":  
".LAN_MAILOUT_88.": (".LAN_OPTIONAL.")  
".LAN_MAILOUT_89.": (".LAN_OPTIONAL.")  
".LAN_MAILOUT_90.":  \n
".LAN_MAILOUT_94."
".LAN_MAILOUT_57.":  "; $checked = (varsettrue($pref['smtp_keepalive']) ) ? "checked='checked'" : ""; $text .= "
".LAN_MAILOUT_95.": 
"; // Sendmail. --------------> $senddisp = ($pref['mailer'] != "sendmail") ? "display:none;" : ""; $text .= "
"; $text .= "
".LAN_MAILOUT_20.":  
"; $text .="
".LAN_MAILOUT_25." ".LAN_MAILOUT_26." ".LAN_MAILOUT_27. " ".LAN_MAILOUT_29.".
".LAN_MAILOUT_30."
".LAN_MAILOUT_31." ".LAN_MAILOUT_32.":
".LAN_MAILOUT_33.":
".LAN_MAILOUT_34.":
".LAN_MAILOUT_35.":
".LAN_MAILOUT_120.":
\n "; $check = ($pref['mail_bounce_delete']==1) ? " checked='checked'" : ""; $text .= LAN_MAILOUT_36.":
".LAN_MAILOUT_77." "; $mail_enable = explode(',',$pref['mailout_enabled']); foreach (explode(',',$pref['mailout_sources']) as $mailer) { $check = (in_array($mailer,$mail_enable)) ? "checked='checked'" : ""; $text .= $mailer." 
"; } $text .= "
".LAN_MAILOUT_72."
\n ".LAN_MAILOUT_76. "
"; $caption = LAN_PREFS; $ns->tablerender($caption, $text); } //-------------------------------------------------------- // Show list of saved emails //-------------------------------------------------------- // Default is what the user wants - saved emails // Debug modes list any type of data in the generic table - don't believe the column headings! function showList($type='massmail') { global $sql,$ns,$tp, $images_path; $gen = new convert; if (!(trim($type))) $type = 'massmail'; $qry ="SELECT g.*,u.* FROM #generic AS g LEFT JOIN #user AS u ON g.gen_user_id = u.user_id WHERE g.gen_type = '{$type}' ORDER BY g.gen_datestamp DESC"; $count = $sql -> db_Select_gen($qry); $text = "
"; if (!$count) { $text = "
".LAN_MAILOUT_22."
"; $ns -> tablerender("
".LAN_MAILOUT_21."
", $text); require_once(e_ADMIN."footer.php"); exit; } $text .= "
"; $glArray = $sql -> db_getList(); foreach($glArray as $row2) { $datestamp = $gen->convert_date($row2['gen_datestamp'], "short"); $text .= " "; } $text .= "
".LAN_MAILOUT_49." ".LAN_MAILOUT_50." ".LAN_MAILOUT_51." ".LAN_MAILOUT_52." ".LAN_OPTIONS."
".$row2['gen_id'] ." ".$row2['user_name']." ".$row2['gen_ip']." ".$datestamp."
"; $text .= "".LAN_EDIT.""; // // toJS(LAN_CONFIRMDEL." [".$row2['gen_ip']."]")."') \" src='".$images_path."delete_16.png' alt='".LAN_DELETE."' title='".LAN_DELETE."' style='border:0px' /> $text .= " toJS(LAN_CONFIRMDEL." [".$row2['gen_ip']."]")."') \">".LAN_DELETE."
\n



"; $ns -> tablerender("
".LAN_MAILOUT_21."
", $text); } // Generate list of userclasses, including the number of members in each class. function userclasses($name) { global $sql; $text .= ""; return $text; } function mailout_adminmenu() { $action = (e_QUERY) ? e_QUERY : "post"; if($action == "edit") { $action = "post"; } $var['post']['text'] = LAN_MAILOUT_56; $var['post']['link'] = e_SELF; $var['post']['perm'] = "W"; $var['list']['text'] = LAN_MAILOUT_97; // Saved emails $var['list']['link'] = e_SELF."?list"; $var['list']['perm'] = "W"; $var['mailouts']['text'] = LAN_MAILOUT_78; // Email runs $var['mailouts']['link'] = e_SELF."?mailouts"; $var['mailouts']['perm'] = "W"; if(getperms("0")){ $var['prefs']['text'] = LAN_OPTIONS; $var['prefs']['link'] = e_SELF."?prefs"; $var['prefs']['perm'] = "0"; } show_admin_menu(LAN_MAILOUT_15, $action, $var); } function sc_Select($container='sc_selector') { $text =" \n "; return $text; } function headerjs() { $text = " "; return $text; } ?>