Changeset 1257 in ExiteCMS
- Timestamp:
- 02/10/08 16:01:38 (4 years ago)
- Location:
- modules/common/mail2forum/php-files/modules/mail2forum
- Files:
-
- 2 deleted
- 6 edited
-
locale (deleted)
-
m2f_admin.php (modified) (4 diffs)
-
m2f_config.php (deleted)
-
m2f_pop3.php (modified) (39 diffs)
-
m2f_smtp.php (modified) (21 diffs)
-
module_installer.php (modified) (6 diffs)
-
templates/modules.mail2forum.admin_panel.tpl (modified) (1 diff)
-
templates/modules.mail2forum.admin_panel_edit.tpl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
modules/common/mail2forum/php-files/modules/mail2forum/m2f_admin.php
r1250 r1257 68 68 } 69 69 70 // save the M2F config 71 if (isset($_POST['saveconfig'])) { 72 // validate the input 73 $m2f_host = stripinput($_POST['m2f_host']); 74 $m2f_interval = isNum($_POST['m2f_interval']) ? $_POST['m2f_interval'] : 300; 75 $m2f_poll_threshold = isNum($_POST['m2f_poll_threshold']) ? $_POST['m2f_poll_threshold'] : 604800; 76 $m2f_max_attachments = isNum($_POST['m2f_max_attachments']) ? $_POST['m2f_max_attachments'] : 1; 77 $m2f_max_attach_size = isNum($_POST['m2f_max_attach_size']) ? $_POST['m2f_max_attach_size'] : 5242880; 78 $m2f_use_forum_email = (isNum($_POST['m2f_use_forum_email']) && ($_POST['m2f_use_forum_email'] == "0" || $_POST['m2f_use_forum_email'] == "1")) ? $_POST['m2f_use_forum_email'] : "1"; 79 $m2f_follow_thread = (isNum($_POST['m2f_follow_thread']) && ($_POST['m2f_follow_thread'] == "0" || $_POST['m2f_follow_thread'] == "1")) ? $_POST['m2f_follow_thread'] : "0"; 80 $m2f_subscribe_required = (isNum($_POST['m2f_subscribe_required']) && ($_POST['m2f_subscribe_required'] == "0" || $_POST['m2f_subscribe_required'] == "1")) ? $_POST['m2f_subscribe_required'] : "0"; 81 $m2f_send_ndr = (isNum($_POST['m2f_send_ndr']) && ($_POST['m2f_send_ndr'] == "0" || $_POST['m2f_send_ndr'] == "1")) ? $_POST['m2f_send_ndr'] : "1"; 82 $m2f_pop3_server = stripinput($_POST['m2f_pop3_server']); 83 $m2f_pop3_port = (isNum($_POST['m2f_pop3_port']) && $_POST['m2f_pop3_port'] > 0 && $_POST['m2f_pop3_port'] < 65536) ? $_POST['m2f_pop3_port'] : 110; 84 $m2f_pop3_timeout = (isNum($_POST['m2f_pop3_timeout']) && $_POST['m2f_pop3_timeout'] > 1 && $_POST['m2f_pop3_timeout'] < 26) ? $_POST['m2f_pop3_timeout'] : 25; 85 $m2f_logfile = stripinput($_POST['m2f_logfile']); 86 $m2f_process_log = (isNum($_POST['m2f_process_log']) && ($_POST['m2f_process_log'] == "0" || $_POST['m2f_process_log'] == "1")) ? $_POST['m2f_process_log'] : "1"; 87 $m2f_smtp_log = (isNum($_POST['m2f_smtp_log']) && ($_POST['m2f_smtp_log'] == "0" || $_POST['m2f_smtp_log'] == "1")) ? $_POST['m2f_smtp_log'] : "0"; 88 $m2f_pop3_debug = (isNum($_POST['m2f_pop3_debug']) && ($_POST['m2f_pop3_debug'] == "0" || $_POST['m2f_pop3_debug'] == "1")) ? $_POST['m2f_pop3_debug'] : "0"; 89 $m2f_pop3_message_debug = (isNum($_POST['m2f_pop3_message_debug']) && ($_POST['m2f_pop3_message_debug'] == "0" || $_POST['m2f_pop3_message_debug'] == "1")) ? $_POST['m2f_pop3_message_debug'] : "0"; 90 $m2f_smtp_debug = (isNum($_POST['m2f_smtp_debug']) && ($_POST['m2f_smtp_debug'] == "0" || $_POST['m2f_smtp_debug'] == "1")) ? $_POST['m2f_smtp_debug'] : "0"; 91 // save 92 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_host."' WHERE cfg_name = 'm2f_host'"); 93 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_interval."' WHERE cfg_name = 'm2f_interval'"); 94 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_poll_threshold."' WHERE cfg_name = 'm2f_poll_threshold'"); 95 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_max_attachments."' WHERE cfg_name = 'm2f_max_attachments'"); 96 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_max_attach_size."' WHERE cfg_name = 'm2f_max_attach_size'"); 97 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_use_forum_email."' WHERE cfg_name = 'm2f_use_forum_email'"); 98 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_follow_thread."' WHERE cfg_name = 'm2f_follow_thread'"); 99 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_subscribe_required."' WHERE cfg_name = 'm2f_subscribe_required'"); 100 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_send_ndr."' WHERE cfg_name = 'm2f_send_ndr'"); 101 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_pop3_server."' WHERE cfg_name = 'm2f_pop3_server'"); 102 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_pop3_port."' WHERE cfg_name = 'm2f_pop3_port'"); 103 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_pop3_timeout."' WHERE cfg_name = 'm2f_pop3_timeout'"); 104 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_logfile."' WHERE cfg_name = 'm2f_logfile'"); 105 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_process_log."' WHERE cfg_name = 'm2f_process_log'"); 106 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_smtp_log."' WHERE cfg_name = 'm2f_smtp_log'"); 107 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_pop3_debug."' WHERE cfg_name = 'm2f_pop3_debug'"); 108 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_pop3_message_debug."' WHERE cfg_name = 'm2f_pop3_message_debug'"); 109 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$m2f_smtp_debug."' WHERE cfg_name = 'm2f_smtp_debug'"); 110 // reload the page to update the site configuration 111 redirect(FUSION_SELF.$aidlink); 112 } 113 114 // save M2F forum settings 70 115 if (isset($_POST['savesettings'])) { 71 116 $m2f_id = isset($_POST['m2f_id'])?$_POST['m2f_id']:0; … … 160 205 $variables = array(); 161 206 } elseif (isset($_POST['config'])) { 162 $result = dbquery("SELECT * FROM ".$db_prefix."forums WHERE forum_id = '".$_POST['m2f_forumid']."'"); 207 // what are we going to configure? 208 $idx = key($_POST['config']); 209 $m2f_forumid = $_POST['m2f_forumid'][$idx]; 210 $m2f_type = $_POST['m2f_type'][$idx]; 211 $result = dbquery("SELECT * FROM ".$db_prefix."forums WHERE forum_id = '".$m2f_forumid."'"); 163 212 if (dbrows($result) == 0) 164 213 fallback(FUSION_SELF.$aidlink); … … 175 224 $m2f['m2f_posting'] = $m2f_posting; 176 225 } else { 177 $result = dbquery("SELECT * FROM ".$db_prefix."M2F_forums WHERE M2F_forumid = '".$ _POST['m2f_forumid']."'");226 $result = dbquery("SELECT * FROM ".$db_prefix."M2F_forums WHERE M2F_forumid = '".$m2f_forumid."'"); 178 227 if (dbrows($result) == 0) { 179 228 $m2f = array(); … … 202 251 $variables['error'] = isset($error) ? $error : ""; 203 252 $variables['forum_id'] = $data['forum_id']; 253 $variables['forum_name'] = $data['forum_name']; 204 254 $variables['forum_posting'] = $data['forum_posting']; 205 $variables['m2f_type'] = $ _POST['m2f_type'];206 $variables['m2f_type_text'] = $mailtypes[$ _POST['m2f_type']];255 $variables['m2f_type'] = $m2f_type; 256 $variables['m2f_type_text'] = $mailtypes[$m2f_type]; 207 257 208 258 // define the panel -
modules/common/mail2forum/php-files/modules/mail2forum/m2f_pop3.php
r1245 r1257 20 20 } 21 21 22 /*---------------------------------------------------+23 | Read the user configuration24 +----------------------------------------------------*/25 require_once "m2f_config.php";26 27 22 // make sure there is no interference from already installed PEAR modules 28 23 ini_set('include_path', '.'); … … 37 32 if (strlen($webroot)>100) die('Unable to find the ExiteCMS document root!'); 38 33 } 34 require_once $webroot."includes/core_functions.php"; 39 35 40 36 // make sure the host is known 41 $_SERVER['HTTP_HOST'] = M2F_HOST; 42 43 require_once $webroot."includes/core_functions.php"; 37 $_SERVER['HTTP_HOST'] = $settings['m2f_host']; 44 38 45 39 // include for attachment manipulation functions … … 65 59 $stripsubject = array('re:', 'fw:', 'betr:'); 66 60 67 define('NET_POP3_DEBUG_LOGFILE', M2F_LOGFILE.'/'.$processor.'.debug.log');61 define('NET_POP3_DEBUG_LOGFILE', $settings['m2f_logfile'].'/'.$processor.'.debug.log'); 68 62 69 63 /*---------------------------------------------------+ … … 74 68 function logentry($task="", $message="", $abort=false, $exitcode=0) { 75 69 76 global $processor ;77 78 $handle = fopen( M2F_LOGFILE.'/M2F_process.log', 'a');70 global $processor, $settings; 71 72 $handle = fopen($settings['m2f_logfile'].'/M2F_process.log', 'a'); 79 73 fwrite($handle, date("Ymd").";".date("His").";".$processor.";".$task.";".$message.chr(10)); 80 74 fclose($handle); … … 99 93 100 94 $i=1; 101 $log = M2F_LOGFILE.'/'.$processor.'.message.';95 $log = $settings['m2f_logfile'].'/'.$processor.'.message.'; 102 96 while(file_exists($log.sprintf('%06u', $i))) { 103 97 $i++; … … 137 131 138 132 if(!$mail->Send()) { 139 if ( M2F_PROCESS_LOG) logentry('SEND', sprintf($locale['m2f906'], $poster['user_email'], $forum['m2f_email'], $mail->ErrorInfo));133 if ($settings['m2f_process_log']) logentry('SEND', sprintf($locale['m2f906'], $poster['user_email'], $forum['m2f_email'], $mail->ErrorInfo)); 140 134 } 141 135 … … 205 199 // do we have iconv? 206 200 if (function_exists('iconv')) { 207 if ( M2F_POP3_DEBUG) logdebug("iconv", "converting string from ".strtoupper($fromcharset)." to ".$settings['charset']);201 if ($settings['m2f_pop3_debug']) logdebug("iconv", "converting string from ".strtoupper($fromcharset)." to ".$settings['charset']); 208 202 // attempt to convert 209 203 $iconvresult = iconv(strtoupper($fromcharset), $settings['charset'], $text); … … 211 205 return $iconresult; 212 206 } 213 if ( M2F_POP3_DEBUG) logdebug("iconv", "conversion failed!");207 if ($settings['m2f_pop3_debug']) logdebug("iconv", "conversion failed!"); 214 208 } 215 209 … … 238 232 $result = dbquery($sql); 239 233 if (!$result) { 240 if ( M2F_PROCESS_LOG) logentry('ADDPOST', sprintf($locale['m2f907'], 'UPDATE', $db_prefix.'forums'));241 if ( M2F_PROCESS_LOG) logentry('SQL: ', $sql);234 if ($settings['m2f_process_log']) logentry('ADDPOST', sprintf($locale['m2f907'], 'UPDATE', $db_prefix.'forums')); 235 if ($settings['m2f_process_log']) logentry('SQL: ', $sql); 242 236 return false; 243 237 } … … 248 242 $result = dbquery($sql); 249 243 if (!$result) { 250 if ( M2F_PROCESS_LOG) logentry('ADDPOST', sprintf($locale['m2f907'], 'INSERT', $db_prefix.'threads'));251 if ( M2F_PROCESS_LOG) logentry('SQL: ', $sql);244 if ($settings['m2f_process_log']) logentry('ADDPOST', sprintf($locale['m2f907'], 'INSERT', $db_prefix.'threads')); 245 if ($settings['m2f_process_log']) logentry('SQL: ', $sql); 252 246 return false; 253 247 } … … 258 252 $result = dbquery($sql); 259 253 if (!$result) { 260 if ( M2F_PROCESS_LOG) logentry('ADDPOST', sprintf($locale['m2f907'], 'UPDATE', $db_prefix.'threads'));261 if ( M2F_PROCESS_LOG) logentry('SQL: ', $sql);254 if ($settings['m2f_process_log']) logentry('ADDPOST', sprintf($locale['m2f907'], 'UPDATE', $db_prefix.'threads')); 255 if ($settings['m2f_process_log']) logentry('SQL: ', $sql); 262 256 return false; 263 257 } … … 269 263 $result = dbquery($sql); 270 264 if (!$result) { 271 if ( M2F_PROCESS_LOG) logentry('ADDPOST', sprintf($locale['m2f907'], 'INSERT (new post)', $db_prefix.'posts'));272 if ( M2F_PROCESS_LOG) logentry('SQL: ', $sql);265 if ($settings['m2f_process_log']) logentry('ADDPOST', sprintf($locale['m2f907'], 'INSERT (new post)', $db_prefix.'posts')); 266 if ($settings['m2f_process_log']) logentry('SQL: ', $sql); 273 267 return false; 274 268 } … … 279 273 $result = dbquery($sql); 280 274 if (!$result) { 281 if ( M2F_PROCESS_LOG) logentry('ADDPOST', sprintf($locale['m2f907'], 'UPDATE', $db_prefix.'users'));282 if ( M2F_PROCESS_LOG) logentry('SQL: ', $sql);275 if ($settings['m2f_process_log']) logentry('ADDPOST', sprintf($locale['m2f907'], 'UPDATE', $db_prefix.'users')); 276 if ($settings['m2f_process_log']) logentry('SQL: ', $sql); 283 277 return false; 284 278 } … … 294 288 $attach_count++; 295 289 // check if we're reached the max number of attachments allowed 296 if ($attach_count > M2F_MAX_ATTACHMENTS) {297 if ( M2F_PROCESS_LOG) logentry('ADDPOST', $locale['m2f908']);298 if ( M2F_SEND_NDR) send_reply($recipient, $sender, $locale['m2f996'].M2F_MAX_ATTACHMENTS);290 if ($attach_count > $settings['m2f_max_attachments']) { 291 if ($settings['m2f_process_log']) logentry('ADDPOST', $locale['m2f908']); 292 if ($settings['m2f_send_ndr']) send_reply($recipient, $sender, $locale['m2f996'].$settings['m2f_max_attachments']); 299 293 break; 300 294 } … … 327 321 if (!$error) { 328 322 $result = dbquery("INSERT INTO ".$db_prefix."forum_attachments (thread_id, post_id, attach_name, attach_ext, attach_size) VALUES ('$thread_id', '$post_id', '$attachname', '$attachext', '".$attach['size']."')"); 329 if ( M2F_PROCESS_LOG) logentry('ADDPOST', sprintf($locale['m2f909'], PATH_ATTACHMENTS.$attachname, $post_id));323 if ($settings['m2f_process_log']) logentry('ADDPOST', sprintf($locale['m2f909'], PATH_ATTACHMENTS.$attachname, $post_id)); 330 324 } 331 325 } … … 342 336 switch ($error) { 343 337 case 1: 344 if ( M2F_PROCESS_LOG) logentry('ADDPOST', sprintf($locale['m2f910'], PATH_ATTACHMENTS.$attachname));338 if ($settings['m2f_process_log']) logentry('ADDPOST', sprintf($locale['m2f910'], PATH_ATTACHMENTS.$attachname)); 345 339 return false; 346 340 case 2: 347 if ( M2F_PROCESS_LOG) logentry('ADDPOST', sprintf($locale['m2f911'], PATH_ATTACHMENTS.$attachname));341 if ($settings['m2f_process_log']) logentry('ADDPOST', sprintf($locale['m2f911'], PATH_ATTACHMENTS.$attachname)); 348 342 return false; 349 343 case 3: 350 if ( M2F_PROCESS_LOG) logentry('ADDPOST', sprintf($locale['m2f911'], PATH_ATTACHMENTS.$attachname));344 if ($settings['m2f_process_log']) logentry('ADDPOST', sprintf($locale['m2f911'], PATH_ATTACHMENTS.$attachname)); 351 345 return false; 352 346 default: … … 365 359 case "multipart": 366 360 // it's another multipart message. Process the parts 367 if ( M2F_PROCESS_LOG) logentry('PARSE', 'MULTIPART-MIME messsage');361 if ($settings['m2f_process_log']) logentry('PARSE', 'MULTIPART-MIME messsage'); 368 362 foreach($messagepart->parts as $partnr => $msgpart) { 369 if ( M2F_PROCESS_LOG) logentry('PARSE', 'MULTIPART-MIME PART: '.$msgpart->headers['content-type']);363 if ($settings['m2f_process_log']) logentry('PARSE', 'MULTIPART-MIME PART: '.$msgpart->headers['content-type']); 370 364 processmessageparts($msgpart); 371 365 } 372 366 break; 373 367 case "text": 374 if ( M2F_PROCESS_LOG) logentry('PARSE', 'MULTIPART-MIME text messsage');368 if ($settings['m2f_process_log']) logentry('PARSE', 'MULTIPART-MIME text messsage'); 375 369 switch (strtolower($messagepart->ctype_secondary)) { 376 370 case "plain": … … 416 410 break; 417 411 default: 418 if ( M2F_PROCESS_LOG) logentry('PARSE', sprintf($locale['m2f913'], $messagepart->ctype_secondary));412 if ($settings['m2f_process_log']) logentry('PARSE', sprintf($locale['m2f913'], $messagepart->ctype_secondary)); 419 413 return false; 420 414 } … … 424 418 case "video": 425 419 case "audio": 426 if ( M2F_PROCESS_LOG) logentry('PARSE', 'MULTIPART-MIME binary attachment');420 if ($settings['m2f_process_log']) logentry('PARSE', 'MULTIPART-MIME binary attachment'); 427 421 if (!isset($post['attachment']) or !is_array($post['attachment'])) $post['attachment'] = array(); 428 422 $attachment = array(); … … 436 430 break; 437 431 default: 438 if ( M2F_PROCESS_LOG) logentry('PARSE', sprintf($locale['m2f914'], $messagepart->ctype_primary));432 if ($settings['m2f_process_log']) logentry('PARSE', sprintf($locale['m2f914'], $messagepart->ctype_primary)); 439 433 return false; 440 434 } … … 470 464 471 465 // log the start 472 if ( M2F_PROCESS_LOG) logentry('INIT', 'Program start');466 if ($settings['m2f_process_log']) logentry('INIT', 'Program start'); 473 467 474 468 // get the last modified timestamp of this module 475 469 $module_lastmod = filemtime('m2f_pop3.php'); 476 470 477 // get the last modified timestamp of the config file 478 $config_lastmod = filemtime('m2f_config.php'); 471 // get the last modified timestamp of the config 472 $data = dbarray(dbquery("SELECT MAX(cfg_timestamp) AS lastmod FROM ".$db_prefix."configuration WHERE cfg_name LIKE 'm2f_%'")); 473 $config_lastmod = $data['lastmod']; 479 474 480 475 // check if the Mail2Forum module is installed 481 476 $result = dbquery("SELECT * FROM ".$db_prefix."modules WHERE mod_title = '".$locale['m2f100']."'"); 482 477 if (dbrows($result) == 0) { 483 if ( M2F_PROCESS_LOG) logentry('INIT', $locale['m2f999'].' NOT_INFUSED', true, 1);478 if ($settings['m2f_process_log']) logentry('INIT', $locale['m2f999'].' NOT_INSTALLED', true, 1); 484 479 die($locale['m2f110']); 485 480 } … … 487 482 // initialize POP3-client 488 483 $pop3 =& new Net_POP3(); 489 $pop3->_debug = M2F_POP3_DEBUG;484 $pop3->_debug = $settings['m2f_pop3_debug']; 490 485 491 486 // initialize the SMTP mailer if required 492 if ( M2F_SEND_NDR) {487 if ($settings['m2f_send_ndr']) { 493 488 require_once PATH_INCLUDES."phpmailer_include.php"; 494 489 $mail = new PHPMailer(); … … 526 521 // Insert a "we're still alive" marker in the log every hour 527 522 if (isset($marker) && $marker <> date("H")) 528 if ( M2F_PROCESS_LOG) logentry("MARKER", "---");523 if ($settings['m2f_process_log']) logentry("MARKER", "---"); 529 524 $marker = date("H"); 530 525 … … 534 529 // Get the incoming mail for this forum 535 530 $pop3connect = false; 536 if ( M2F_POP3_DEBUG) logdebug('LOGIN', 'before the POP3 connect');537 if($pop3->connect( M2F_POP3_SERVER, M2F_POP3_PORT)) {538 if ( M2F_POP3_DEBUG) logdebug('LOGIN', 'before the POP3 login');531 if ($settings['m2f_pop3_debug']) logdebug('LOGIN', 'before the POP3 connect'); 532 if($pop3->connect($settings['m2f_pop3_server'], $settings['m2f_pop3_port'])) { 533 if ($settings['m2f_pop3_debug']) logdebug('LOGIN', 'before the POP3 login'); 539 534 if($pop3->login($forum['m2f_userid'], $forum['m2f_password'])) { 540 if ( M2F_POP3_DEBUG) logdebug('LOGIN', 'before getting the new message counter');535 if ($settings['m2f_pop3_debug']) logdebug('LOGIN', 'before getting the new message counter'); 541 536 $newmsg = $pop3->numMsg(); 542 537 if ($newmsg !== false) { 543 if ($newmsg && M2F_PROCESS_LOG) logentry('RETR', 'Mailbox '.$forum['m2f_email'].' - '.$newmsg.' new messages');538 if ($newmsg && $settings['m2f_process_log']) logentry('RETR', 'Mailbox '.$forum['m2f_email'].' - '.$newmsg.' new messages'); 544 539 $pop3connect = true; 545 540 } … … 548 543 // if the connect failed, log the error. Otherwise start processing the message(s) 549 544 if (!$pop3connect) { 550 if ( M2F_PROCESS_LOG) logentry('CONNECT', $locale['m2f999'].'No connection to the POP3 server');545 if ($settings['m2f_process_log']) logentry('CONNECT', $locale['m2f999'].'No connection to the POP3 server'); 551 546 } else { 552 547 // retrieve and process the new messages … … 561 556 $message = $decoder->decode($params); 562 557 if ($message === false) { 563 if ( M2F_PROCESS_LOG) logentry('PARSE', $decoder->_error);558 if ($settings['m2f_process_log']) logentry('PARSE', $decoder->_error); 564 559 } else { 565 560 // parse the header of the message … … 585 580 $receivedheader = $message->headers['received']; 586 581 if (is_array($receivedheader)) $receivedheader = $receivedheader[0]; 587 if ( M2F_POP3_DEBUG) echo "Header: ".$receivedheader."\n";582 if ($settings['m2f_pop3_debug']) echo "Header: ".$receivedheader."\n"; 588 583 // get some information of the sending system 589 584 if (preg_match("#from (.*)\((.*)\[(.*)\]\)(.*)\; (.*)#i", $receivedheader, $matches)) { … … 623 618 } 624 619 // process the body (or the body parts) 625 if ( M2F_POP3_DEBUG) echo "Message: ".$message->ctype_primary."\n";620 if ($settings['m2f_pop3_debug']) echo "Message: ".$message->ctype_primary."\n"; 626 621 if (strtolower($message->ctype_primary) == 'text') { 627 622 // if it's a plain-text message, just grab the body … … 636 631 } elseif (strtolower($message->ctype_primary) == 'multipart') { 637 632 // in debug mode, skip this message if the mime decoding failed 638 if (!processmessageparts($message) && M2F_POP3_DEBUG)633 if (!processmessageparts($message) && $settings['m2f_pop3_debug']) 639 634 continue; 640 635 } else { 641 636 // unknown primary type 642 if ( M2F_PROCESS_LOG) logentry('PARSE', "Message has an unsupported primary content-type:".$msgpart->ctype_primary."!");637 if ($settings['m2f_process_log']) logentry('PARSE', "Message has an unsupported primary content-type:".$msgpart->ctype_primary."!"); 643 638 } 644 639 } 645 640 // validate the parsed information 646 if (!isset($post['subject']) && M2F_PROCESS_LOG) logentry('PARSE', "Missing 'Subject' information!");641 if (!isset($post['subject']) && $settings['m2f_process_log']) logentry('PARSE', "Missing 'Subject' information!"); 647 642 if (!isset($post['received'])) { 648 643 $post['received'] = array('ip' => '0.0.0.0'); 649 if ( M2F_PROCESS_LOG) logentry('PARSE', "Missing 'Received' information!");644 if ($settings['m2f_process_log']) logentry('PARSE', "Missing 'Received' information!"); 650 645 } 651 if (!isset($post['from']) && M2F_PROCESS_LOG) logentry('PARSE', "Missing 'From' information!");652 if (!isset($post['to']) && M2F_PROCESS_LOG) logentry('PARSE', "Missing 'To' information!");646 if (!isset($post['from']) && $settings['m2f_process_log']) logentry('PARSE', "Missing 'From' information!"); 647 if (!isset($post['to']) && $settings['m2f_process_log']) logentry('PARSE', "Missing 'To' information!"); 653 648 654 if ( M2F_POP3_MESSAGE_DEBUG) dumpmessage($message, $post);649 if ($settings['m2f_pop3_message_debug']) dumpmessage($message, $post); 655 650 656 651 // find the user … … 671 666 $send_allowed = true; 672 667 } else { 673 if ( M2F_SUBSCRIBE_REQUIRED) {668 if ($settings['m2f_subscribe_required']) { 674 669 $send_allowed = dbrows(dbquery("SELECT m2f_subid FROM ".$db_prefix."M2F_subscriptions WHERE m2f_subscribed = '1' AND m2f_userid = '".$sender['user_id']."' AND m2f_forumid = '".$recipient['m2f_forumid']."'")); 675 670 } else { … … 681 676 if (is_array($post['subject']) && isset($post['subject']['thread_id'])) { 682 677 // see if we can locate this thread 683 if ( M2F_FOLLOW_THREAD) {678 if ($settings['m2f_follow_thread']) { 684 679 $thread = dbarray(dbquery("SELECT * FROM ".$db_prefix."threads WHERE thread_id = '".$post['subject']['thread_id']."'")); 685 680 } else { … … 689 684 // found the tread. Post the new message 690 685 if (addnewpost($thread['forum_id'], $thread['thread_id'], $sender, $recipient, $post)) 691 if ( M2F_PROCESS_LOG) logentry('POST', "Post reply from ".$post['from']['email']." to thread ".$post['subject']['thread_id']);686 if ($settings['m2f_process_log']) logentry('POST', "Post reply from ".$post['from']['email']." to thread ".$post['subject']['thread_id']); 692 687 else 693 if ( M2F_PROCESS_LOG) logentry('POST', "Failed to add post reply from ".$post['from']['email']." to thread ".$post['subject']['thread_id']);688 if ($settings['m2f_process_log']) logentry('POST', "Failed to add post reply from ".$post['from']['email']." to thread ".$post['subject']['thread_id']); 694 689 $processed = true; 695 690 } else { 696 691 // Forum/Thread mismatch (or thread does not exist) 697 if ( M2F_PROCESS_LOG) logentry('VERIFY', "Thread: ".$post['subject']['thread_id']." does not belong to forum ".$post['to']['email']);692 if ($settings['m2f_process_log']) logentry('VERIFY', "Thread: ".$post['subject']['thread_id']." does not belong to forum ".$post['to']['email']); 698 693 $subject = (is_array($post['subject'])?$post['subject']['subject']:$post['subject']); 699 if ( M2F_SEND_NDR) send_reply($recipient, $sender, sprintf($locale['m2f992'], $subject));694 if ($settings['m2f_send_ndr']) send_reply($recipient, $sender, sprintf($locale['m2f992'], $subject)); 700 695 $processed = true; 701 696 } … … 713 708 // subject not found. Must be a new post 714 709 if (addnewpost($recipient['m2f_forumid'], -1, $sender, $recipient, $post)) 715 if ( M2F_PROCESS_LOG) logentry('POST', "New thread from ".$post['from']['email']);710 if ($settings['m2f_process_log']) logentry('POST', "New thread from ".$post['from']['email']); 716 711 else 717 if ( M2F_PROCESS_LOG) logentry('POST', "Failed to add new thread from ".$post['from']['email']);712 if ($settings['m2f_process_log']) logentry('POST', "Failed to add new thread from ".$post['from']['email']); 718 713 $processed = true; 719 714 break; … … 722 717 $thread = dbarray($result); 723 718 if (addnewpost($recipient['m2f_forumid'], $thread['thread_id'], $sender, $recipient, $post)) 724 if ( M2F_PROCESS_LOG) logentry('POST', "Post reply from ".$post['from']['email']." to thread ".$thread['thread_id']);719 if ($settings['m2f_process_log']) logentry('POST', "Post reply from ".$post['from']['email']." to thread ".$thread['thread_id']); 725 720 else 726 if ( M2F_PROCESS_LOG) logentry('POST', "Failed to add post reply from ".$post['from']['email']." to thread ".$post['subject']['thread_id']);721 if ($settings['m2f_process_log']) logentry('POST', "Failed to add post reply from ".$post['from']['email']." to thread ".$post['subject']['thread_id']); 727 722 $processed = true; 728 723 break; 729 724 default: 730 725 // multiple subjects matched the query. How now brown cow? 731 if ( M2F_PROCESS_LOG) logentry('VERIFY', "Multiple subject match: ".$post['from']['email']." => ".$post['to']['email']);726 if ($settings['m2f_process_log']) logentry('VERIFY', "Multiple subject match: ".$post['from']['email']." => ".$post['to']['email']); 732 727 // For now, assume a new post 733 728 if (addnewpost($recipient['m2f_forumid'], -1, $sender, $recipient, $post)) 734 if ( M2F_PROCESS_LOG) logentry('POST', "New post from ".$post['from']['email']." to thread ".$thread['thread_id']);729 if ($settings['m2f_process_log']) logentry('POST', "New post from ".$post['from']['email']." to thread ".$thread['thread_id']); 735 730 else 736 if ( M2F_PROCESS_LOG) logentry('POST', "Failed to add new post from ".$post['from']['email']." to thread ".$post['subject']['thread_id']);731 if ($settings['m2f_process_log']) logentry('POST', "Failed to add new post from ".$post['from']['email']." to thread ".$post['subject']['thread_id']); 737 732 $processed = true; 738 733 break; … … 742 737 // sender is not subscribed to the forum 743 738 // Output some debug info for now and send an NDR 744 if ( M2F_PROCESS_LOG) logentry('VERIFY', "Member: ".$post['from']['email']." is not subscribed to ".$post['to']['email']);739 if ($settings['m2f_process_log']) logentry('VERIFY', "Member: ".$post['from']['email']." is not subscribed to ".$post['to']['email']); 745 740 $subject = (is_array($post['subject'])?$post['subject']['subject']:$post['subject']); 746 if ( M2F_SEND_NDR) send_reply($recipient, $sender, sprintf($locale['m2f993'], $subject));741 if ($settings['m2f_send_ndr']) send_reply($recipient, $sender, sprintf($locale['m2f993'], $subject)); 747 742 $processed = true; 748 743 } … … 750 745 // no match on recipient, shouldn't be possible, means a mismatch between smtp envelope and message header. 751 746 // Output some debug info for now and send an NDR 752 if ( M2F_PROCESS_LOG) logentry('VERIFY', "No such forum: ".$post['to']['email']);747 if ($settings['m2f_process_log']) logentry('VERIFY', "No such forum: ".$post['to']['email']); 753 748 $subject = (is_array($post['subject'])?$post['subject']['subject']:$post['subject']); 754 if ( M2F_SEND_NDR) send_reply($recipient, $sender, sprintf($locale['m2f994'], $subject));749 if ($settings['m2f_send_ndr']) send_reply($recipient, $sender, sprintf($locale['m2f994'], $subject)); 755 750 $processed = true; 756 751 } … … 758 753 // no match on sender 759 754 // Output some debug info for now and send an NDR 760 if ( M2F_PROCESS_LOG) logentry('VERIFY', "No such member: ".$post['from']['email']);755 if ($settings['m2f_process_log']) logentry('VERIFY', "No such member: ".$post['from']['email']); 761 756 $subject = (is_array($post['subject'])?$post['subject']['subject']:$post['subject']); 762 if ( M2F_SEND_NDR) send_reply($recipient, $sender, sprintf($locale['m2f995'], $subject, $post['from']['email']));757 if ($settings['m2f_send_ndr']) send_reply($recipient, $sender, sprintf($locale['m2f995'], $subject, $post['from']['email'])); 763 758 $processed = true; 764 759 } … … 775 770 if ($data = dbarray($result)) { 776 771 if ($data['m2f_abort'] == 1) { 777 if ( M2F_PROCESS_LOG) logentry('WAKE-UP', $locale['m2f999'].' ABORT_BY_USER', true, 1);772 if ($settings['m2f_process_log']) logentry('WAKE-UP', $locale['m2f999'].' ABORT_BY_USER', true, 1); 778 773 die('aborted by user'); 779 774 } 780 775 } else { 781 if ( M2F_PROCESS_LOG) logentry('WAKE-UP', $locale['m2f999'].' STATUS_RECORD_GONE', true, 1);776 if ($settings['m2f_process_log']) logentry('WAKE-UP', $locale['m2f999'].' STATUS_RECORD_GONE', true, 1); 782 777 die('status record missing'); 783 778 } … … 786 781 clearstatcache(); 787 782 if (filemtime('m2f_pop3.php') != $module_lastmod) { 788 if ( M2F_PROCESS_LOG) logentry('EXIT', 'Restart due to module code update');783 if ($settings['m2f_process_log']) logentry('EXIT', 'Restart due to module code update'); 789 784 exit(99); 790 785 } 791 if (filemtime('m2f_config.php') != $config_lastmod) { 792 if (M2F_PROCESS_LOG) logentry('EXIT', 'Restart due to a configuration change'); 786 // get the last modified timestamp of the config 787 $data = dbarray(dbquery("SELECT MAX(cfg_timestamp) AS lastmod FROM ".$db_prefix."configuration WHERE cfg_name LIKE 'm2f_%'")); 788 if ($data['lastmod'] != $config_lastmod) { 789 if ($settings['m2f_process_log']) logentry('EXIT', 'Restart due to a configuration change'); 793 790 exit(99); 794 791 } 795 792 796 793 // calculate the next interval. Log a warning if we can't process quick enough 797 $interval = $polltime + M2F_INTERVAL- time();794 $interval = $polltime + $settings['m2f_interval'] - time(); 798 795 if ($interval < 0) { 799 if ( M2F_PROCESS_LOG) logentry('SLEEP', $locale['m2f999'].' INTERVAL_TO_SHORT_TO_PROCESS_ALL_POP3_MAIL');796 if ($settings['m2f_process_log']) logentry('SLEEP', $locale['m2f999'].' INTERVAL_TO_SHORT_TO_PROCESS_ALL_POP3_MAIL'); 800 797 } else { 801 798 sleep($interval); -
modules/common/mail2forum/php-files/modules/mail2forum/m2f_smtp.php
r1238 r1257 14 14 } 15 15 16 /*---------------------------------------------------+17 | Read the user configuration18 +----------------------------------------------------*/19 20 require "m2f_config.php";21 22 16 // find the webroot, so we can load the core functions 23 17 $webroot = ""; … … 26 20 if (strlen($webroot)>100) die('Unable to find the ExiteCMS document root!'); 27 21 } 22 require_once $webroot."includes/core_functions.php"; 28 23 29 24 // make sure the host is known 30 $_SERVER['HTTP_HOST'] = M2F_HOST; 31 32 require_once $webroot."includes/core_functions.php"; 25 $_SERVER['HTTP_HOST'] = $settings['m2f_host']; 33 26 34 27 locale_load("modules.mail2forum"); … … 49 42 function logentry($task="", $message="", $abort=false, $exitcode=0) { 50 43 51 global $processor ;52 53 $handle = fopen( M2F_LOGFILE.'/M2F_process.log', 'a');44 global $processor, $settings; 45 46 $handle = fopen($settings['m2f_logfile'].'/M2F_process.log', 'a'); 54 47 fwrite($handle, date("Ymd").";".date("His").";".$processor.";".$task.";".$message.chr(10)); 55 48 fclose($handle); … … 61 54 function logdebug($task="", $message="") { 62 55 63 global $processor ;64 65 $handle = fopen( M2F_LOGFILE.'/'.$processor.'.debug.log', 'a');56 global $processor, $settings; 57 58 $handle = fopen($settings['m2f_logfile'].'/'.$processor.'.debug.log', 'a'); 66 59 fwrite($handle, date("Ymd").";".date("His").";".$task.";".$message.chr(10)); 67 60 fclose($handle); … … 72 65 global $mail, $locale, $settings; 73 66 74 if ( M2F_SMTP_DEBUG) $mail->SMTPDebug = 2;67 if ($settings['m2f_smtp_debug']) $mail->SMTPDebug = 2; 75 68 76 69 if (file_exists(PATH_INCLUDES."languages/phpmailer.lang-".$settings['phpmailer_locale'].".php")) { … … 105 98 106 99 // log the start 107 if ( M2F_PROCESS_LOG) logentry('INIT', 'Program start');100 if ($settings['m2f_process_log']) logentry('INIT', 'Program start'); 108 101 109 102 // get the last modified timestamp of this module 110 103 $module_lastmod = filemtime('m2f_smtp.php'); 111 104 112 // get the last modified timestamp of the config file 113 $config_lastmod = filemtime('m2f_config.php'); 105 // get the last modified timestamp of the config 106 $data = dbarray(dbquery("SELECT MAX(cfg_timestamp) AS lastmod FROM ".$db_prefix."configuration WHERE cfg_name LIKE 'm2f_%'")); 107 $config_lastmod = $data['lastmod']; 114 108 115 109 // check if the Mail2Forum module is installed 116 110 $result = dbquery("SELECT * FROM ".$db_prefix."modules WHERE mod_title = '".$locale['m2f100']."'"); 117 111 if (dbrows($result) == 0) { 118 if ( M2F_PROCESS_LOG) logentry('INIT', $locale['m2f999'].' '.$locale['m2f110'], true, 1);119 die( 'Mail2Forum is not infused');112 if ($settings['m2f_process_log']) logentry('INIT', $locale['m2f999'].' NOT_INSTALLED', true, 1); 113 die($locale['m2f110']); 120 114 } 121 115 … … 131 125 $lastpoll = time(); 132 126 $result = dbquery("INSERT INTO ".$db_prefix."M2F_status (m2f_lastpoll) VALUES ('".$lastpoll."')"); 133 if ( M2F_PROCESS_LOG) logentry("INIT", sprintf($locale['m2f800'], $processor));127 if ($settings['m2f_process_log']) logentry("INIT", sprintf($locale['m2f800'], $processor)); 134 128 } else { 135 129 if ($data = dbarray($result)) { … … 138 132 die($processor.': LastPoll time is invalid. Use the admin module to correct this'); 139 133 } 140 if ((time() - $data['m2f_lastpoll']) > M2F_POLL_THRESHOLD) {134 if ((time() - $data['m2f_lastpoll']) > $settings['m2f_poll_threshold']) { 141 135 $result = dbquery("UPDATE ".$db_prefix."M2F_status SET m2f_lastpoll = 0"); 142 if ( M2F_PROCESS_LOG) logentry('INIT', $locale['m2f999'].' '.$locale['m2f801'], true, 1);143 die($processor.': More t han a week has passed since the last run! Use the admin module to correct this');136 if ($settings['m2f_process_log']) logentry('INIT', $locale['m2f999'].' '.$locale['m2f801'], true, 1); 137 die($processor.': More time has passed since the last run then the threshold allows! Use the admin module to correct this'); 144 138 } 145 139 $lastpoll = $data['m2f_lastpoll']+1; 146 140 } else { 147 if ( M2F_PROCESS_LOG) logentry('INIT', $locale['m2f999'].' '.$locale['m2f802'], true, 1);141 if ($settings['m2f_process_log']) logentry('INIT', $locale['m2f999'].' '.$locale['m2f802'], true, 1); 148 142 die('This should never happen'); 149 143 } … … 271 265 // Insert a marker in the log every hour to show we're still alive 272 266 if (isset($marker) && $marker <> date("H")) 273 if ( M2F_PROCESS_LOG) logentry("MARKER", "---");267 if ($settings['m2f_process_log']) logentry("MARKER", "---"); 274 268 $marker = date("H"); 275 269 … … 280 274 // get all posts in the selected interval 281 275 while($postrecord = dbarray($result)) { 282 if ( M2F_SMTP_DEBUG) logdebug('POSTRECORD', print_r($postrecord, true));276 if ($settings['m2f_smtp_debug']) logdebug('POSTRECORD', print_r($postrecord, true)); 283 277 284 278 $new_post = ($postrecord['post_datestamp'] >= $lastpoll && $postrecord['post_datestamp'] <= $polltime); 285 279 $edit_post = ($postrecord['post_edittime'] >= $lastpoll && $postrecord['post_edittime'] <= $polltime); 286 280 287 if ( M2F_SMTP_DEBUG) logdebug('POST_STATE', ($new_post?"ADD":"").($new_post&&$edit_post?"-":"").($edit_post?"EDIT":""));281 if ($settings['m2f_smtp_debug']) logdebug('POST_STATE', ($new_post?"ADD":"").($new_post&&$edit_post?"-":"").($edit_post?"EDIT":"")); 288 282 289 283 // if a new post was edited within one poll cycle, don't mark it as edited … … 293 287 $result2 = dbquery("SELECT m.m2f_email, f.forum_name FROM ".$db_prefix."M2F_forums m, ".$db_prefix."forums f WHERE m.m2f_active = '1' AND m.m2f_forumid = '".$postrecord['forum_id']."' AND m.m2f_forumid = f.forum_id"); 294 288 if (!$result2) { 295 if ( M2F_PROCESS_LOG) logentry('ERROR', $locale['m2f999'].' '.$locale['m2f803'].$postrecord['forum_id'], true, 1);289 if ($settings['m2f_process_log']) logentry('ERROR', $locale['m2f999'].' '.$locale['m2f803'].$postrecord['forum_id'], true, 1); 296 290 die($locale['m2f803']); 297 291 } else { 298 292 // get sender information 299 293 $sender = dbarray($result2); 300 if ( M2F_SMTP_DEBUG) logdebug('SENDER', print_r($sender, true));294 if ($settings['m2f_smtp_debug']) logdebug('SENDER', print_r($sender, true)); 301 295 302 296 // get all subscribed users for this forum … … 304 298 WHERE s.m2f_forumid = '".$postrecord['forum_id']."' AND s.m2f_subscribed = '1' AND u.user_status = 0 AND u.user_bad_email = 0 AND u.user_id = s.m2f_userid AND u.user_id = c.m2f_userid"); 305 299 while ($recipient = dbarray($result2)) { 306 if ( M2F_SMTP_DEBUG) logdebug('RECIPIENT', print_r($recipient, true));300 if ($settings['m2f_smtp_debug']) logdebug('RECIPIENT', print_r($recipient, true)); 307 301 308 302 // get the senders profile (need the email address and the email-hidden flag) … … 322 316 } 323 317 } 324 if ( M2F_SMTP_DEBUG) logdebug('POSTER', print_r($poster, true));318 if ($settings['m2f_smtp_debug']) logdebug('POSTER', print_r($poster, true)); 325 319 326 320 // check if the poster wants his email address hidden. If so, use the forum address as sender 327 if ( M2F_USE_FORUM_EMAIL|| $poster['user_hide_email'])321 if ($settings['m2f_use_forum_email'] || $poster['user_hide_email']) 328 322 $poster['user_email'] = $sender['m2f_email']; 329 323 … … 359 353 // although PHP-Fusion does not support multiple attachments, we do... ;-) 360 354 while ($attachment = dbarray($res_att)) { 361 if ( M2F_SMTP_DEBUG) logdebug('ATTACHMENT', print_r($attachment, true));355 if ($settings['m2f_smtp_debug']) logdebug('ATTACHMENT', print_r($attachment, true)); 362 356 $attachURL = $settings['siteurl']."getfile.php?type=a&file_id=".$attachment['attach_id']; 363 357 if ($recipient['m2f_html'] == 1) { … … 385 379 case 1: 386 380 // check the size of the attachments, don't send it out if it's to big 387 if (filesize(PATH_ATTACHMENTS.$attachment['attach_name']) < M2F_MAX_ATTACH_SIZE) {381 if (filesize(PATH_ATTACHMENTS.$attachment['attach_name']) < $settings['m2f_max_attach_size']) { 388 382 // attach the attachments to the email 389 383 $mail->AddAttachment(PATH_ATTACHMENTS.$attachment['attach_name']); … … 405 399 case 1: 406 400 // check the size of the attachments, don't send it out if it's to big 407 if (filesize(PATH_ATTACHMENTS.$attachment['attach_name']) < M2F_MAX_ATTACH_SIZE) {401 if (filesize(PATH_ATTACHMENTS.$attachment['attach_name']) < $settings['m2f_max_attach_size']) { 408 402 // attach the attachments to the email 409 403 $mail->AddAttachment(PATH_ATTACHMENTS.$attachment['attach_name']); … … 443 437 // send the post to the user 444 438 if(!$mail->Send()) { 445 if ( M2F_PROCESS_LOG) logentry('SEND', 'ERROR! From:'.$poster['user_email'].' To:'.$recipient['user_email'].' -> '.$mail->ErrorInfo);439 if ($settings['m2f_process_log']) logentry('SEND', 'ERROR! From:'.$poster['user_email'].' To:'.$recipient['user_email'].' -> '.$mail->ErrorInfo); 446 440 unset($mail); 447 441 $mail = new PHPMailer(); … … 449 443 } else { 450 444 $result4 = dbquery("UPDATE ".$db_prefix."M2F_forums SET m2f_sent = m2f_sent + 1 WHERE m2f_forumid = '".$postrecord['forum_id']."' "); 451 if ( M2F_PROCESS_LOG) logentry('SEND', 'From:'.$poster['user_email'].' To:'.$recipient['user_email'].' -> '.$subject);445 if ($settings['m2f_process_log']) logentry('SEND', 'From:'.$poster['user_email'].' To:'.$recipient['user_email'].' -> '.$subject); 452 446 } 453 447 … … 466 460 } 467 461 } else { 468 if ( M2F_PROCESS_LOG) logentry('POLL', 'no new posts');462 if ($settings['m2f_process_log']) logentry('POLL', 'no new posts'); 469 463 } 470 464 … … 475 469 clearstatcache(); 476 470 if (filemtime('m2f_smtp.php') != $module_lastmod) { 477 if ( M2F_PROCESS_LOG) logentry('EXIT', 'Restart due to module code update');471 if ($settings['m2f_process_log']) logentry('EXIT', 'Restart due to module code update'); 478 472 exit(99); 479 473 } 480 // if the config has been modified, exit so it can be reloaded 481 if (filemtime('m2f_config.php') != $config_lastmod) { 482 if (M2F_PROCESS_LOG) logentry('EXIT', 'Restart due to configuration change'); 474 // get the last modified timestamp of the config 475 $data = dbarray(dbquery("SELECT MAX(cfg_timestamp) AS lastmod FROM ".$db_prefix."configuration WHERE cfg_name LIKE 'm2f_%'")); 476 if ($data['lastmod'] != $config_lastmod) { 477 if ($settings['m2f_process_log']) logentry('EXIT', 'Restart due to a configuration change'); 483 478 exit(99); 484 479 } 485 480 486 481 // calculate the next interval. Log a warning if we can't process quick enough 487 $interval = $polltime + M2F_INTERVAL- time();482 $interval = $polltime + $settings['m2f_interval'] - time(); 488 483 if ($interval < 0) { 489 if ( M2F_PROCESS_LOG) logentry('SLEEP', $locale['m2f999'].' '.$locale['m2f804']);484 if ($settings['m2f_process_log']) logentry('SLEEP', $locale['m2f999'].' '.$locale['m2f804']); 490 485 } else { 491 486 sleep($interval); … … 496 491 if ($data = dbarray($result)) { 497 492 if ($data['m2f_abort'] == 1) { 498 if ( M2F_PROCESS_LOG) logentry('WAKE-UP', $locale['m2f999'].' '.$locale['m2f805'], true, 1);493 if ($settings['m2f_process_log']) logentry('WAKE-UP', $locale['m2f999'].' '.$locale['m2f805'], true, 1); 499 494 die($locale['m2f805']); 500 495 } 501 496 $lastpoll = $data['m2f_lastpoll']+1; 502 497 } else { 503 if ( M2F_PROCESS_LOG) logentry('WAKE-UP', $locale['m2f999'].' '.$locale['m2f802'], true, 1);498 if ($settings['m2f_process_log']) logentry('WAKE-UP', $locale['m2f999'].' '.$locale['m2f802'], true, 1); 504 499 die($locale['m2f802']); 505 500 } -
modules/common/mail2forum/php-files/modules/mail2forum/module_installer.php
r1250 r1257 64 64 65 65 $localestrings['en'] = array(); 66 $localestrings['en']['m2f100'] = "Mail2Forum"; 66 67 // installation error 67 68 $localestrings['en']['m2f110'] = "The Mail2Forum module is not installed. You have to do this before starting a M2F processor"; … … 128 129 $localestrings['en']['m2f463'] = "Thumbnails"; 129 130 $localestrings['en']['m2f464'] = "Full size"; 131 // Mail2forum configuration 132 $localestrings['en']['m2f500'] = "Mail2Forum - Configuration"; 133 $localestrings['en']['m2f501'] = "Save configuration"; 134 $localestrings['en']['m2f502'] = "Forum host name:"; 135 $localestrings['en']['m2f502a'] = "This hostname is used in the footer of email sent out, to link back to your website"; 136 $localestrings['en']['m2f503'] = "Polling interval (seconds):"; 137 $localestrings['en']['m2f503a'] = "Polling interval for the cron processors. Note that this is not the wait time. If set to 5 minutes, and a cycle takes 1 minute and 20 seconds, the processor sleeps for 3 minutes and 40 seconds. If the processors needs more time to process than the interval specified here, a warning will be written to the logfile."; 138 $localestrings['en']['m2f504'] = "Poll threshold value:"; 139 $localestrings['en']['m2f504a'] = "If the last poll happened more than this number of seconds ago, the processors (that use this value) refuse to run, and die with an error message. This is to prevent sending out thousands of emails after undetected downtime of the processor. Press 'Reset' before restarting the processors"; 140 $localestrings['en']['m2f505'] = "Reset poll timer"; 141 $localestrings['en']['m2f506'] = "Maximum number of attachments:"; 142 $localestrings['en']['m2f506a'] = "If a message contains more attachments, the remainder are skipped and not imported into the forum. If 'SEND_NDR' is set to 'Yes', the sender will be notified"; 143 $localestrings['en']['m2f507'] = "Attachment maximum size:"; 144 $localestrings['en']['m2f507a'] = "Attachments bigger that the size defined here will never be send out via email, only a link will be included to the attachment in the forum"; 145 $localestrings['en']['m2f508'] = "Use mailing list address:"; 146 $localestrings['en']['m2f508a'] = "With this switch you control the from address of outgoing email. The default behaviour is to use the email address from the poster, as defined in the members profile. If the member has elected to hide his email address from other member (the 'hide email' option set to 'Yes'), the from is composed of the Nick of the the poster, and the forum email address as defined in Mail2Forum. When you set this switch to true, email always goes out using the forum email address, regardless of the member setting. This can make it easier for users to define mail filters in their client software"; 147 $localestrings['en']['m2f509'] = "Follow moved thread:"; 148 $localestrings['en']['m2f509a'] = "Allow Mail2Forum posts to a thread, even if it has moved to another forum. This makes sure replies to a thread will be processed, even if the thread has been moved to a different forum by a moderator or administrator. CAUTION: activating this could be a risk, as it allows posting to forums the poster doesn't have access to!"; 149 $localestrings['en']['m2f510'] = "Subscribers only:"; 150 $localestrings['en']['m2f510a'] = "Allow every member that has post access to the forum, also post by email. If this switch is set to 'Yes', only members that have a subscription on this forum will be allowed to post/ new messages using email"; 151 $localestrings['en']['m2f511'] = "Send non-deliveries back:"; 152 $localestrings['en']['m2f511a'] = "Send a non-delivery report back to the poster in case an incomming message can not be processed. NDR's are only send to verified email accounts, email from unknown accounts (SPAM) will be deleted"; 153 $localestrings['en']['m2f512'] = "POP3 server:"; 154 $localestrings['en']['m2f512a'] = "Address of the POP3 mailserver you are going to use to receive email. For performance reasons, specify an IP address, and not a hostname."; 155 $localestrings['en']['m2f513'] = "POP3 server port:"; 156 $localestrings['en']['m2f513a'] = "TCP port number the POP3 server listens on. Default is 110 (the standard POP3 port)"; 157 $localestrings['en']['m2f514'] = "POP3 server timeout:"; 158 $localestrings['en']['m2f514a'] = "Timeout used for socket communications. Specify any value between 2 and 25 seconds. Default is 25 seconds"; 159 $localestrings['en']['m2f515'] = "Logfile location:"; 160 $localestrings['en']['m2f515a'] = "Default, logfiles will be stored in the directory 'logs' which is a subdirectory of the mail2forum module directory. All logfiles start with 'M2F_', the exact filename depends on the processor and the type of log. Note: Do NOT add a trailing slash to the pathname!!"; 161 $localestrings['en']['m2f516'] = "Activate processor logging:"; 162 $localestrings['en']['m2f516a'] = "When set to 'Yes', a process log file will be used by all Mail2Forum processor modules, so the state and activity can be tracked"; 163 $localestrings['en']['m2f517'] = "Activate SMTP processor logging:"; 164 $localestrings['en']['m2f517a'] = "When set to 'Yes', additional SMTP logging will be performed by the SMTP processor, so the interaction with the SMTP server can be monitored closely. Note, this can generate a BIG logfile on a busy system, use this for debugging purposes only"; 165 $localestrings['en']['m2f518'] = "Activate POP3 processor logging:"; 166 $localestrings['en']['m2f518a'] = "When set to 'Yes', additional POP3 logging will be performed by the POP3 processor, so the internal POP3 data structures can be monitored closely. Note, this can generate a BIG logfile on a busy system, use this for debugging purposes only"; 167 $localestrings['en']['m2f519'] = "Activate POP3 message logging:"; 168 $localestrings['en']['m2f519a'] = "When set to 'Yes', debugging of POP3 message processing is activated. This logs the raw information from MimeDecode, and the extracted message. This makes it easier to debug MIME decoding errors. Note, this can generate a BIG logfile on a busy system, use this for debugging purposes only"; 169 $localestrings['en']['m2f520'] = "Activate SMTP processor debugging:"; 170 $localestrings['en']['m2f520a'] = "When set to 'Yes', additional STMP debugging will be activated, so the internal SMTP data structures can be monitored closely. Note, this can generate a BIG logfile on a busy system, use this for debugging purposes only"; 130 171 // M2F_SMTP processor: internal 131 172 $localestrings['en']['m2f800'] = "First startup of the %s processor"; … … 179 220 180 221 $localestrings['nl'] = array(); 222 $localestrings['nl']['m2f100'] = "Mail2Forum"; 181 223 // installation error 182 224 $localestrings['nl']['m2f110'] = "De Mail2Forum module is niet geinstalleerd. Dit moet gebeuren voordat een M2F processor wordt gestart!"; … … 205 247 // Admin panel - Edit screen 206 248 $localestrings['nl']['m2f300'] = "configuratie voor forum"; 207 $localestrings['nl']['m2f301'] = " Forum email adres:";249 $localestrings['nl']['m2f301'] = "Adres verzendlijst:"; 208 250 $localestrings['nl']['m2f302'] = "Mailbox gebruiker:"; 209 251 $localestrings['nl']['m2f303'] = "Mailbox wachtwoord:"; … … 243 285 $localestrings['nl']['m2f463'] = "Verkleind"; 244 286 $localestrings['nl']['m2f464'] = "Volle grootte"; 287 // Mail2forum configuration 288 $localestrings['nl']['m2f500'] = "Mail2Forum - Configuratie"; 289 $localestrings['nl']['m2f501'] = "Configuration opslaan"; 290 $localestrings['nl']['m2f502'] = "Forum hostnaam:"; 291 $localestrings['nl']['m2f502a'] = "Deze naam wordt gebruikt in de voettekst van de email, om terug naar de website te linken"; 292 $localestrings['nl']['m2f503'] = "Polling interval (seconden):"; 293 $localestrings['nl']['m2f503a'] = "Polling interval voor de cron processors. Dit is niet de wachttijd. Indien ingesteld op 5 minuten, en een cyclus duurt 1 mimuut en 20 seconden, zal de processor slapen voor 3 minuten en 40 seconden. Als de processor meer tijd nodig heeft voor de verwerking dat dit interval, zal er een melding naar de log worden geschreven."; 294 $localestrings['nl']['m2f504'] = "Poll threshold waarde:"; 295 $localestrings['nl']['m2f504a'] = "Indien de laatste poll meer dat dit aantal seconden geleden is gebeurd, zullen de processors weigeren te starten, en stoppen met een foutmelding. Dit is om er voor te zorgen dat er geen duizenden email worden verstuurd na lange downtijd van de processor. Druk op 'Reset' voor het herstarten van de processors"; 296 $localestrings['nl']['m2f505'] = "Reset poll timer"; 297 $localestrings['nl']['m2f506'] = "Maximum aantal bijlagen:"; 298 $localestrings['nl']['m2f506a'] = "Indien een inkomend bericht meer bijlagen bevat, zullen de resterende worden overgeslagen. Indien 'non-delivery' op 'Ja' staat, zal de verzender worden geinformeerd"; 299 $localestrings['nl']['m2f507'] = "Maximale bijlage grootte:"; 300 $localestrings['nl']['m2f507a'] = "Bijlagen die groter zijn dat deze waarde zullen nooit via email worden uitgestuurd, maar er zal een link in het bericht geplaatst worden naar de bijlage in het forum"; 301 $localestrings['nl']['m2f508'] = "Gebruik verzendlijst adres:"; 302 $localestrings['nl']['m2f508a'] = "Hiermee kunt u het adres voor uitgaande email instellen. Standaard wordt het eigen email adres van de auteur van het bericht gebruikt. Als de gebruiker in zijn profiel gekozen heeft voor 'email adres verbergen', zal als afzender van de email het verzendlijst adres worden gebruikt. Als u deze optie op 'Ja' zet, zal dit altijd het geval zijn, en wordt de gebruikersinstelling genegeerd. Dit kan handig zijn om forum email te kunnen filteren in een email client"; 303 $localestrings['nl']['m2f509'] = "Volg verplaatst topic:"; 304 $localestrings['nl']['m2f509a'] = "Hiermee kunt u Mail2Forum toestaan om een inkomende mail te accepteren als deze is verplaatst naar een ander forum. Hierdoor komen antwoorden altijd aan, ook na verplaatsing. LET OP: dit kan een risico in houden, omdat een abonee hiemee berichten kan plaatsen in een forum waartoe deze geen toegang heeft!"; 305 $localestrings['nl']['m2f510'] = "Alleen voor abonees:"; 306 $localestrings['nl']['m2f510a'] = "Standaard hebben alle leden met toegang tot een forum ook het recht berichten naar de verzendlijst te sturen. Als u dit op 'Ja' zet is men verplicht zich te abonneren."; 307 $localestrings['nl']['m2f511'] = "Stuur non-deliveries terug:"; 308 $localestrings['nl']['m2f511a'] = "Stuur een non-delivery rapport terug naar de verzender indien een ingekomen email niet kan worden verwerkt. Deze rapporten zullen alleen worden verstuurd naar gekende email adressen, email van onbekende adressen (SPAM?) zal worden verwijderd zonder antwoord"; 309 $localestrings['nl']['m2f512'] = "POP3 server:"; 310 $localestrings['nl']['m2f512a'] = "Adres van de POP3 mail server die gebruikt gaat worden voor het ontvangen van email van de verzendlijst. Voor performance redenen, speficieer een IP adres, en geen hostname."; 311 $localestrings['nl']['m2f513'] = "POP3 server poort:"; 312 $localestrings['nl']['m2f513a'] = "TCP poort nummer waarop de POP3 server luistert. Standaard is dit poort 110 (de standaard POP3 poort)"; 313 $localestrings['nl']['m2f514'] = "POP3 server timeout:"; 314 $localestrings['nl']['m2f514a'] = "Timeout voor TCP socket communicatie. Specifeer een waarde tussen 2 en 25 seconden. De standaard waarde is 25 seconden"; 315 $localestrings['nl']['m2f515'] = "Logfile locatie:"; 316 $localestrings['nl']['m2f515a'] = "Standaard worden de logfiles opgeslagen in de directory 'logs', een subdirectory van de mail2forum module directory. Alle logfiles beginnen met 'M2F_', de exacte bestandsnaam hangt af van de processor en het type van log . Opm: Geen slash toevoegen aan het einde van de padnaam!!"; 317 $localestrings['nl']['m2f516'] = "Activeer processor logging:"; 318 $localestrings['nl']['m2f516a'] = "Indien geactiveerd zal er een proces log file worden gebruikt door alle Mail2Forum processor modules, zodat de status en activiteit kan worden gemonitord"; 319 $localestrings['nl']['m2f517'] = "Activeer SMTP processor logging:"; 320 $localestrings['nl']['m2f517a'] = "Indien geactiveerd zal er additionele logging worden aangemaakt door de SMTP processor, waardoor de interactie met de SMTP server kan worden gemonitored. Opm, dit kan zorgen voor een GROTE logfile op een druk systeem, gebruik dit alleen voor debugging"; 321 $localestrings['nl']['m2f518'] = "Activeer POP3 processor logging:"; 322 $localestrings['nl']['m2f518a'] = "Indien geactiveerd zal er additionele logging worden aangemaakt door de POP3 processor, waardoor de interactie met de POP3 server kan worden gemonitored. Opm, dit kan zorgen voor een GROTE logfile op een druk systeem, gebruik dit alleen voor debugging"; 323 $localestrings['nl']['m2f519'] = "Activeer POP3 message logging:"; 324 $localestrings['nl']['m2f519a'] = "Indien geactiveerd zal er additionele loggin worden aangemaakt van het POP3 berichtenverwerkingsproces. In een logfile per bericht kunnen de details van de MimeDecode en het resultaat van de verwerking worden bekeken. Opm, dit kan zorgen voor veel logfiles op een druk systeem, gebruik dit alleen voor debugging"; 325 $localestrings['nl']['m2f520'] = "Activeer SMTP processor debugging:"; 326 $localestrings['nl']['m2f520a'] = "Indien geactiveerd zal er additionele loggin worden aangemaakt van het SMTP berichtenverwerkingsproces. Opm, dit kan zorgen voor een GROTE logfile op een druk systeem, gebruik dit alleen voor debugging"; 245 327 // M2F_SMTP processor: internal 246 328 $localestrings['nl']['m2f800'] = "First startup of the %s processor"; … … 385 467 // ExiteCMS v7.0. no upgrade actions for this release 386 468 case "1.0.1": 469 // larger index pointers 387 470 $result = dbquery("ALTER TABLE ".$db_prefix."M2F_config CHANGE m2f_userid m2f_userid MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0'"); 388 471 $result = dbquery("ALTER TABLE ".$db_prefix."M2F_subscriptions CHANGE m2f_userid m2f_userid MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0'"); 472 // update the admin link 389 473 global $mod_title, $mod_folder, $mod_admin_panel; 390 474 $result = dbquery("UPDATE ".$db_prefix."admin SET admin_link = '".(MODULES.$mod_folder."/".$mod_admin_panel)."' WHERE admin_title = '".$mod_title."'"); 475 // import the config file, and (try to) delete it 476 @require PATH_MODULES.$mod_folder."/m2f_config.php"; 477 if (defined("M2F_HOST")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_host', '".M2F_HOST."')"); 478 if (defined("M2F_INTERVAL")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_interval', '".M2F_INTERVAL."')"); 479 if (defined("M2F_POLL_THRESHOLD")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_poll_threshold', '".M2F_POLL_THRESHOLD."')"); 480 if (defined("M2F_MAX_ATTACHMENTS")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_max_attachments', '".M2F_MAX_ATTACHMENTS."')"); 481 if (defined("M2F_MAX_ATTACH_SIZE")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_max_attach_size', '".M2F_MAX_ATTACH_SIZE."')"); 482 if (defined("M2F_USE_FORUM_EMAIL")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_use_forum_email', '".(M2F_USE_FORUM_EMAIL?"1":"0")."')"); 483 if (defined("M2F_FOLLOW_THREAD")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_follow_thread', '".(M2F_FOLLOW_THREAD?"1":"0")."')"); 484 if (defined("M2F_SUBSCRIBE_REQUIRED")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_subscribe_required', '".(M2F_SUBSCRIBE_REQUIRED?"1":"0")."')"); 485 if (defined("M2F_SEND_NDR")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_send_ndr', '".(M2F_SEND_NDR?"1":"0")."')"); 486 if (defined("M2F_POP3_SERVER")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_pop3_server', '".M2F_POP3_SERVER."')"); 487 if (defined("M2F_POP3_PORT")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_pop3_port', '".M2F_POP3_PORT."')"); 488 if (defined("M2F_POP3_TIMEOUT")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_pop3_timeout', '".M2F_POP3_TIMEOUT."')"); 489 if (defined("M2F_LOGFILE")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_logfile', '".M2F_LOGFILE."')"); 490 if (defined("M2F_PROCESS_LOG")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_process_log', '".(M2F_PROCESS_LOG?"1":"0")."')"); 491 if (defined("M2F_SMTP_LOG")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_smtp_log', '".(M2F_SMTP_LOG?"1":"0")."')"); 492 if (defined("M2F_POP3_DEBUG")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_pop3_debug', '".(M2F_POP3_DEBUG?"1":"0")."')"); 493 if (defined("M2F_POP3_MESSAGE_DEBUG")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_pop3_message_debug', '".(M2F_POP3_MESSAGE_DEBUG?"1":"0")."')"); 494 if (defined("M2F_SMTP_DEBUG")) $result = dbquery("INSERT INTO ".$db_prefix."configuration (cfg_name, cfg_value) VALUES ('m2f_smtp_debug', '".(M2F_SMTP_DEBUG?"1":"0")."')"); 495 @unlink(PATH_MODULES.$mod_folder."/m2f_config.php"); 391 496 case "1.1.0": 392 // upgrade to ExiteCMS v7.1. no upgrade actions for this release497 // upgrade to ExiteCMS v7.1. - current version 393 498 default: 394 499 // do this at every upgrade -
modules/common/mail2forum/php-files/modules/mail2forum/templates/modules.mail2forum.admin_panel.tpl
r971 r1257 54 54 {/section} 55 55 {include file="_closetable.tpl"} 56 {/if} 57 {include file="_opentable.tpl" name=$_name title=$locale.m2f100|cat:" - "|cat:$locale.m2f200 state=$_state style=$_style} 58 {if $error != ""} 59 <center> 60 <br /> 61 <b>{$error}</b> 62 <br /><br /> 63 </center> 64 {/if} 65 <table align='center' cellpadding='0' cellspacing='1' width='95%' class='tbl-border'> 66 {section name=id loop=$forums} 67 {if $smarty.section.id.first} 68 <tr> 69 <td class='tbl2'> 70 <b>{$locale.m2f201}</b> 71 </td> 72 <td align='center' width='1%' class='tbl2' style='white-space:nowrap' colspan='2'> 73 <b>{$locale.m2f202}</b> 74 </td> 75 <td align='center' width='1%' class='tbl2' style='white-space:nowrap' colspan='2'> 76 <b>{$locale.m2f214}</b> 77 </td> 78 <td align='center' width='1%' class='tbl2' style='white-space:nowrap'> 79 <b>{$locale.m2f205}</b> 80 </td> 81 <td align='center' width='1%' class='tbl2' style='white-space:nowrap'> 82 <b>{$locale.m2f213}</b> 83 </td> 84 <td align='center' width='1%' class='tbl2' style='white-space:nowrap'> 85 <b>{$locale.m2f203}</b> 86 </td> 87 </tr> 56 {elseif $step == "config"} 57 {include file="_opentable.tpl" name=$_name title=$locale.m2f500 state=$_state style=$_style} 58 <form name='settingsform' method='post' action='{$smarty.const.FUSION_SELF}{$aidlink}'> 59 <table align='center' cellpadding='0' cellspacing='0' width='500'> 60 <tr> 61 <td width='50%' class='tbl'> 62 {$locale.m2f502} 63 </td> 64 <td width='50%' class='tbl'> 65 <input type='text' name='m2f_host' value='{$settings.m2f_host}' maxlength='255' class='textbox' style='width:230px;' /> 66 </td> 67 </tr> 68 <tr> 69 <td width='10%' align='left' colspan='2' class='tbl'> 70 <span class='small2'>{$locale.m2f502a}</span> 71 </td> 72 </tr> 73 <tr> 74 <td width='50%' class='tbl'> 75 {$locale.m2f503} 76 </td> 77 <td width='50%' class='tbl'> 78 <input type='text' name='m2f_interval' value='{$settings.m2f_interval}' maxlength='5' class='textbox' style='width:50px;' /> 79 </td> 80 </tr> 81 <tr> 82 <td width='10%' align='left' colspan='2' class='tbl'> 83 <span class='small2'>{$locale.m2f503a}</span> 84 </td> 85 </tr> 86 <tr> 87 <td width='50%' class='tbl'> 88 {$locale.m2f504} 89 </td> 90 <td width='50%' class='tbl'> 91 <input type='text' name='m2f_poll_threshold' value='{$settings.m2f_poll_threshold}' maxlength='8' class='textbox' style='width:100px;' /> 92 <input type='submit' name='poll_restart' value='{$locale.m2f505}' class='button' /> 93 </td> 94 </tr> 95 <tr> 96 <td width='10%' align='left' colspan='2' class='tbl'> 97 <span class='small2'>{$locale.m2f504a}</span> 98 </td> 99 </tr> 100 <tr> 101 <td width='50%' class='tbl'> 102 {$locale.m2f506} 103 </td> 104 <td width='50%' class='tbl'> 105 <input type='text' name='m2f_max_attachments' value='{$settings.m2f_max_attachments}' maxlength='5' class='textbox' style='width:50px;' /> 106 </td> 107 </tr> 108 <tr> 109 <td width='10%' align='left' colspan='2' class='tbl'> 110 <span class='small2'>{$locale.m2f506a}</span> 111 </td> 112 </tr> 113 <tr> 114 <td width='50%' class='tbl'> 115 {$locale.m2f507} 116 </td> 117 <td width='50%' class='tbl'> 118 <input type='text' name='m2f_max_attach_size' value='{$settings.m2f_max_attach_size}' maxlength='8' class='textbox' style='width:100px;' /> 119 </td> 120 </tr> 121 <tr> 122 <td width='10%' align='left' colspan='2' class='tbl'> 123 <span class='small2'>{$locale.m2f507a}</span> 124 </td> 125 </tr> 126 <tr> 127 <td width='50%' class='tbl'> 128 {$locale.m2f508} 129 </td> 130 <td width='50%' class='tbl'> 131 <select name='m2f_use_forum_email' class='textbox'> 132 <option value='0'{if $settings.m2f_use_forum_email == "0"} selected="selected"{/if}>{$locale.m2f306}</option> 133 <option value='1'{if $settings.m2f_use_forum_email == "1"} selected="selected"{/if}>{$locale.m2f307}</option> 134 </select> 135 </td> 136 </tr> 137 <tr> 138 <td width='10%' align='left' colspan='2' class='tbl'> 139 <span class='small2'>{$locale.m2f508a}</span> 140 </td> 141 </tr> 142 <tr> 143 <td width='50%' class='tbl'> 144 {$locale.m2f509} 145 </td> 146 <td width='50%' class='tbl'> 147 <select name='m2f_follow_thread' class='textbox'> 148 <option value='0'{if $settings.m2f_follow_thread == "0"} selected="selected"{/if}>{$locale.m2f306}</option> 149 <option value='1'{if $settings.m2f_follow_thread == "1"} selected="selected"{/if}>{$locale.m2f307}</option> 150 </select> 151 </td> 152 </tr> 153 <tr> 154 <td width='10%' align='left' colspan='2' class='tbl'> 155 <span class='small2'>{$locale.m2f509a}</span> 156 </td> 157 </tr> 158 <tr> 159 <td width='50%' class='tbl'> 160 {$locale.m2f510} 161 </td> 162 <td width='50%' class='tbl'> 163 <select name='m2f_subscribe_required' class='textbox'> 164 <option value='0'{if $settings.m2f_subscribe_required == "0"} selected="selected"{/if}>{$locale.m2f306}</option> 165 <option value='1'{if $settings.m2f_subscribe_required == "1"} selected="selected"{/if}>{$locale.m2f307}</option> 166 </select> 167 </td> 168 </tr> 169 <tr> 170 <td width='10%' align='left' colspan='2' class='tbl'> 171 <span class='small2'>{$locale.m2f510a}</span> 172 </td> 173 </tr> 174 <tr> 175 <td width='50%' class='tbl'> 176 {$locale.m2f511} 177 </td> 178 <td width='50%' class='tbl'> 179 <select name='m2f_send_ndr' class='textbox'> 180 <option value='0'{if $settings.m2f_send_ndr == "0"} selected="selected"{/if}>{$locale.m2f306}</option> 181 <option value='1'{if $settings.m2f_send_ndr == "1"} selected="selected"{/if}>{$locale.m2f307}</option> 182 </select> 183 </td> 184 </tr> 185 <tr> 186 <td width='10%' align='left' colspan='2' class='tbl'> 187 <span class='small2'>{$locale.m2f511a}</span> 188 </td> 189 </tr> 190 <tr> 191 <td width='50%' class='tbl'> 192 {$locale.m2f512} 193 </td> 194 <td width='50%' class='tbl'> 195 <input type='text' name='m2f_pop3_server' value='{$settings.m2f_pop3_server}' maxlength='255' class='textbox' style='width:230px;' /> 196 </td> 197 </tr> 198 <tr> 199 <td width='10%' align='left' colspan='2' class='tbl'> 200 <span class='small2'>{$locale.m2f512a}</span> 201 </td> 202 </tr> 203 <tr> 204 <td width='50%' class='tbl'> 205 {$locale.m2f513} 206 </td> 207 <td width='50%' class='tbl'> 208 <input type='text' name='m2f_pop3_port' value='{$settings.m2f_pop3_port}' maxlength='5' class='textbox' style='width:100px;' /> 209 </td> 210 </tr> 211 <tr> 212 <td width='10%' align='left' colspan='2' class='tbl'> 213 <span class='small2'>{$locale.m2f513a}</span> 214 </td> 215 </tr> 216 <tr> 217 <td width='50%' class='tbl'> 218 {$locale.m2f514} 219 </td> 220 <td width='50%' class='tbl'> 221 <input type='text' name='m2f_pop3_timeout' value='{$settings.m2f_pop3_timeout}' maxlength='5' class='textbox' style='width:50px;' /> 222 </td> 223 </tr> 224 <tr> 225 <td width='10%' align='left' colspan='2' class='tbl'> 226 <span class='small2'>{$locale.m2f514a}</span> 227 </td> 228 </tr> 229 <tr> 230 <td width='50%' class='tbl'> 231 {$locale.m2f515} 232 </td> 233 <td width='50%' class='tbl'> 234 <input type='text' name='m2f_logfile' value='{$settings.m2f_logfile}' maxlength='255' class='textbox' style='width:230px;' /> 235 </td> 236 </tr> 237 <tr> 238 <td width='10%' align='left' colspan='2' class='tbl'> 239 <span class='small2'>{$locale.m2f515a}</span> 240 </td> 241 </tr> 242 <tr> 243 <td width='50%' class='tbl'> 244 {$locale.m2f516} 245 </td> 246 <td width='50%' class='tbl'> 247 <select name='m2f_process_log' class='textbox'> 248 <option value='0'{if $settings.m2f_process_log == "0"} selected="selected"{/if}>{$locale.m2f306}</option> 249 <option value='1'{if $settings.m2f_process_log == "1"} selected="selected"{/if}>{$locale.m2f307}</option> 250 </select> 251 </td> 252 </tr> 253 <tr> 254 <td width='10%' align='left' colspan='2' class='tbl'> 255 <span class='small2'>{$locale.m2f516a}</span> 256 </td> 257 </tr> 258 <tr> 259 <td width='50%' class='tbl'> 260 {$locale.m2f517} 261 </td> 262 <td width='50%' class='tbl'> 263 <select name='m2f_smtp_log' class='textbox'> 264 <option value='0'{if $settings.m2f_smtp_log == "0"} selected="selected"{/if}>{$locale.m2f306}</option> 265 <option value='1'{if $settings.m2f_smtp_log == "1"} selected="selected"{/if}>{$locale.m2f307}</option> 266 </select> 267 </td> 268 </tr> 269 <tr> 270 <td width='10%' align='left' colspan='2' class='tbl'> 271 <span class='small2'>{$locale.m2f517a}</span> 272 </td> 273 </tr> 274 <tr> 275 <td width='50%' class='tbl'> 276 {$locale.m2f518} 277 </td> 278 <td width='50%' class='tbl'> 279 <select name='m2f_pop3_debug' class='textbox'> 280 <option value='0'{if $settings.m2f_pop3_debug == "0"} selected="selected"{/if}>{$locale.m2f306}</option> 281 <option value='1'{if $settings.m2f_pop3_debug == "1"} selected="selected"{/if}>{$locale.m2f307}</option> 282 </select> 283 </td> 284 </tr> 285 <tr> 286 <td width='10%' align='left' colspan='2' class='tbl'> 287 <span class='small2'>{$locale.m2f518a}</span> 288 </td> 289 </tr> 290 <tr> 291 <td width='50%' class='tbl'> 292 {$locale.m2f519} 293 </td> 294 <td width='50%' class='tbl'> 295 <select name='m2f_pop3_message_debug' class='textbox'> 296 <option value='0'{if $settings.m2f_pop3_message_debug == "0"} selected="selected"{/if}>{$locale.m2f306}</option> 297 <option value='1'{if $settings.m2f_pop3_message_debug == "1"} selected="selected"{/if}>{$locale.m2f307}</option> 298 </select> 299 </td> 300 </tr> 301 <tr> 302 <td width='10%' align='left' colspan='2' class='tbl'> 303 <span class='small2'>{$locale.m2f519a}</span> 304 </td> 305 </tr> 306 <tr> 307 <td width='50%' class='tbl'> 308 {$locale.m2f520} 309 </td> 310 <td width='50%' class='tbl'> 311 <select name='m2f_smtp_debug' class='textbox'> 312 <option value='0'{if $settings.m2f_smtp_debug == "0"} selected="selected"{/if}>{$locale.m2f306}</option> 313 <option value='1'{if $settings.m2f_smtp_debug == "1"} selected="selected"{/if}>{$locale.m2f307}</option> 314 </select> 315 </td> 316 </tr> 317 <tr> 318 <td width='10%' align='left' colspan='2' class='tbl'> 319 <span class='small2'>{$locale.m2f520a}</span> 320 </td> 321 </tr> 322 <tr> 323 <td align='center' colspan='2' class='tbl'> 324 <br /> 325 <input type='submit' name='saveconfig' value='{$locale.m2f501}' class='button' /> 326 </td> 327 </tr> 328 </table> 329 </form> 330 {include file="_closetable.tpl"} 331 {else} 332 {include file="_opentable.tpl" name=$_name title=$locale.m2f500 state=$_state style=$_style} 333 <form name='settingsform' method='post' action='{$smarty.const.FUSION_SELF}{$aidlink}&step=config'> 334 <center> 335 <input type='submit' name='loadconfig' value='{$locale.m2f500}' class='button' /> 336 </center> 337 </form> 338 {include file="_closetable.tpl"} 339 {include file="_opentable.tpl" name=$_name title=$locale.m2f100|cat:" - "|cat:$locale.m2f200 state=$_state style=$_style} 340 {if $error != ""} 341 <center> 342 <br /> 343 <b>{$error}</b> 344 <br /><br /> 345 </center> 88 346 {/if} 89 347 <form name='forum' method='post' action='{$smarty.const.FUSION_SELF}{$aidlink}'> 90 <tr> 91 <td class='tbl1'> 92 {$forums[id].forum_name} 93 <input type='hidden' name='forum_name' value='{$forums[id].forum_name}'> 94 </td> 95 <td align='center' width='1%' class='tbl1' style='white-space:nowrap'> 96 {$forums[id].forum_posting_name} 97 <input type='hidden' name='forum_posting' value='{$forums[id].forum_posting}'> 98 </td> 99 <td align='center' width='1%' class='tbl1' style='white-space:nowrap'> 100 {$forums[id].m2f_subscribers} 101 </td> 102 <td align='center' width='1%' class='tbl1' style='white-space:nowrap'> 103 <select name='m2f_type' class='textbox'> 104 {foreach from=$mailtypes item=type name=mailtype} 105 <option value='{$smarty.foreach.mailtype.index}'{if $smarty.foreach.mailtype.index == $forums[id].m2f_type} selected{/if}>{$type}</option> 106 {/foreach} 107 </select> 108 </td> 109 <td align='left' width='1%' class='tbl1' style='white-space:nowrap'> 110 <input type='submit' name='config' value='{$locale.m2f210}' class='button' /> 111 {if $forums[id].m2f_config} 112 <input type='submit' name='delete' value='{$locale.m2f215}' class='button' /> 113 <input type='hidden' name='m2f_id' value='{$forums[id].m2f_id}' /> 348 <table align='center' cellpadding='0' cellspacing='1' width='95%' class='tbl-border'> 349 {section name=id loop=$forums} 350 {if $smarty.section.id.first} 351 <tr> 352 <td class='tbl2'> 353 <b>{$locale.m2f201}</b> 354 </td> 355 <td align='center' width='1%' class='tbl2' style='white-space:nowrap' colspan='2'> 356 <b>{$locale.m2f202}</b> 357 </td> 358 <td align='center' width='1%' class='tbl2' style='white-space:nowrap' colspan='2'> 359 <b>{$locale.m2f214}</b> 360 </td> 361 <td align='center' width='1%' class='tbl2' style='white-space:nowrap'> 362 <b>{$locale.m2f205}</b> 363 </td> 364 <td align='center' width='1%' class='tbl2' style='white-space:nowrap'> 365 <b>{$locale.m2f213}</b> 366 </td> 367 <td align='center' width='1%' class='tbl2' style='white-space:nowrap'> 368 <b>{$locale.m2f203}</b> 369 </td> 370 </tr> 114 371 {/if} 115 <input type='hidden' name='m2f_forumid' value='{$forums[id].forum_id}' /> 116 </td> 117 <td align='center' width='1%' class='tbl1' style='white-space:nowrap'> 118 {if $forums[id].m2f_config}{$forums[id].m2f_sent}{else}0{/if} 119 </td> 120 <td align='center' width='1%' class='tbl1' style='white-space:nowrap'> 121 {if $forums[id].m2f_config}{$forums[id].m2f_received}{else}0{/if} 122 </td> 123 <td align='left' width='1%' class='tbl1' style='white-space:nowrap'> 124 {if $forums[id].m2f_config} 125 {if $forums[id].m2f_subscribe} 126 <a href='{$smarty.const.FUSION_SELF}{$aidlink}&step=deactivate&forum_id={$forums[id].forum_id}'><img src='{$smarty.const.THEME}images/cog_delete.gif' alt='{$locale.m2f219}' title='{$locale.m2f219}' /></a> 127 {else} 128 <a href='{$smarty.const.FUSION_SELF}{$aidlink}&step=activate&forum_id={$forums[id].forum_id}'><img src='{$smarty.const.THEME}images/cog_add.gif' alt='{$locale.m2f218}' title='{$locale.m2f218}' /></a> 372 <tr> 373 <td class='tbl1'> 374 {$forums[id].forum_name} 375 <input type='hidden' name='forum_name' value='{$forums[id].forum_name}' /> 376 </td> 377 <td align='center' width='1%' class='tbl1' style='white-space:nowrap'> 378 {$forums[id].forum_posting_name} 379 <input type='hidden' name='forum_posting' value='{$forums[id].forum_posting}' /> 380 </td> 381 <td align='center' width='1%' class='tbl1' style='white-space:nowrap'> 382 {$forums[id].m2f_subscribers} 383 </td> 384 <td align='center' width='1%' class='tbl1' style='white-space:nowrap'> 385 <select name='m2f_type[{$smarty.section.id.index}]' class='textbox'> 386 {foreach from=$mailtypes item=type name=mailtype} 387 <option value='{$smarty.foreach.mailtype.index}'{if $smarty.foreach.mailtype.index == $forums[id].m2f_type} selected="selected"{/if}>{$type}</option> 388 {/foreach} 389 </select> 390 </td> 391 <td align='left' width='1%' class='tbl1' style='white-space:nowrap'> 392 <input type='submit' name='config[{$smarty.section.id.index}]' value='{$locale.m2f210}' class='button' /> 393 {if $forums[id].m2f_config} 394 <input type='submit' name='delete[{$smarty.section.id.index}]' value='{$locale.m2f215}' class='button' /> 395 <input type='hidden' name='m2f_id[{$smarty.section.id.index}]' value='{$forums[id].m2f_id}' /> 396 {/if} 397 <input type='hidden' name='m2f_forumid[{$smarty.section.id.index}]' value='{$forums[id].forum_id}' /> 398 </td> 399 <td align='center' width='1%' class='tbl1' style='white-space:nowrap'> 400 {if $forums[id].m2f_config}{$forums[id].m2f_sent}{else}0{/if} 401 </td> 402 <td align='center' width='1%' class='tbl1' style='white-space:nowrap'> 403 {if $forums[id].m2f_config}{$forums[id].m2f_received}{else}0{/if} 404 </td> 405 <td align='left' width='1%' class='tbl1' style='white-space:nowrap'> 406 {if $forums[id].m2f_config} 407 {if $forums[id].m2f_subscribe} 408 <a href='{$smarty.const.FUSION_SELF}{$aidlink}&step=deactivate&forum_id={$forums[id].forum_id}'><img src='{$smarty.const.THEME}images/cog_delete.gif' alt='{$locale.m2f219}' title='{$locale.m2f219}' /></a> 409 {else} 410 <a href='{$smarty.const.FUSION_SELF}{$aidlink}&step=activate&forum_id={$forums[id].forum_id}'><img src='{$smarty.const.THEME}images/cog_add.gif' alt='{$locale.m2f218}' title='{$locale.m2f218}' /></a> 411 {/if} 412 {if $forums[id].m2f_active} 413 <a href='{$smarty.const.FUSION_SELF}{$aidlink}&step=setstatus&status=0&forum_id={$forums[id].forum_id}'><img src='{$smarty.const.THEME}images/page_red.gif' alt='{$locale.m2f212}' title='{$locale.m2f212}' /></a> 414 {else} 415 <a href='{$smarty.const.FUSION_SELF}{$aidlink}&step=setstatus&status=1&forum_id={$forums[id].forum_id}'><img src='{$smarty.const.THEME}images/page_green.gif' alt='{$locale.m2f211}' title='{$locale.m2f211}' /></a> 416 {/if} 417 {/if} 418 {if $forums[id].m2f_subscribers > 0} 419 <a href='{$smarty.const.FUSION_SELF}{$aidlink}&step=subscribers&forum_id={$forums[id].forum_id}'><img src='{$smarty.const.THEME}images/image_view.gif' alt='{$locale.m2f217}' title='{$locale.m2f217}'></a> 420 {/if} 421 </td> 422 </tr> 423 {if $smarty.section.id.last} 129 424 {/if} 130 {if $forums[id].m2f_active} 131 <a href='{$smarty.const.FUSION_SELF}{$aidlink}&step=setstatus&status=0&forum_id={$forums[id].forum_id}'><img src='{$smarty.const.THEME}images/page_red.gif' alt='{$locale.m2f212}' title='{$locale.m2f212}' /></a> 132 {else} 133 <a href='{$smarty.const.FUSION_SELF}{$aidlink}&step=setstatus&status=1&forum_id={$forums[id].forum_id}'><img src='{$smarty.const.THEME}images/page_green.gif' alt='{$locale.m2f211}' title='{$locale.m2f211}' /></a> 134 {/if} 135 {/if} 136 {if $forums[id].m2f_subscribers > 0} 137 <a href='{$smarty.const.FUSION_SELF}{$aidlink}&step=subscribers&forum_id={$forums[id].forum_id}'><img src='{$smarty.const.THEME}images/image_view.gif' alt='{$locale.m2f217}' title='{$locale.m2f217}'></a> 138 {/if} 139 </td> 140 </tr> 425 {sectionelse} 426 <br /> 427 <center> 428 <b>{$locale.m2f952}</b> 429 </center> 430 <br /> 431 {/section} 432 </table> 141 433 </form> 142 {if $smarty.section.id.last} 143 {/if} 144 {sectionelse} 145 <br /> 146 <center> 147 <b>{$locale.m2f952}</b> 148 </center> 149 <br /> 150 {/section} 151 </table> 152 {include file="_closetable.tpl"} 434 {include file="_closetable.tpl"} 435 {/if} 153 436 {***************************************************************************} 154 437 {* End of template *} -
modules/common/mail2forum/php-files/modules/mail2forum/templates/modules.mail2forum.admin_panel_edit.tpl
r767 r1257 15 15 {* *} 16 16 {***************************************************************************} 17 {include file="_opentable.tpl" name=$ locale.m2f100|cat:" - "|cat:$locale.m2f300|cat:" '"|cat:$forum_name|cat:"'" state=$_state style=$_style}17 {include file="_opentable.tpl" name=$_name title=$locale.m2f100|cat:" - "|cat:$locale.m2f300|cat:" '"|cat:$forum_name|cat:"'" state=$_state style=$_style} 18 18 {if $error != ""} 19 19 <center> … … 97 97 </td> 98 98 </tr> 99 { elseif $m2f_type_text == $locale.m2f231} {* SMTP/IMAP *}100 { elseif $m2f_type_text == $locale.m2f232} {* GMail via HTTPS *}101 { elseif $m2f_type_text == $locale.m2f233} {* Majordomo listserver *}99 {* {elseif $m2f_type_text == $locale.m2f231} {* SMTP/IMAP *} 100 {* {elseif $m2f_type_text == $locale.m2f232} {* GMail via HTTPS *} 101 {* {elseif $m2f_type_text == $locale.m2f233} {* Majordomo listserver *} 102 102 {else} 103 103 <tr> 104 104 <td width='50%' class='tbl' colspan='2' align='center'> 105 The '{$m2f_type_text}' method is not supported by this version of M2F!105 The '{$m2f_type_text}' method is not yet supported by this version of M2F! 106 106 </td> 107 107 </tr>
Note: See TracChangeset
for help on using the changeset viewer.
