Changeset 181 for dev/common/post.php
- Timestamp:
- 01/28/07 16:04:10 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
dev/common/post.php
r157 r181 11 11 if (isset($_POST['killmail'])) 12 12 { 13 if ($_POST['password'] == $config->getPostPassword() || $page->isAdmin())13 if ($_POST['password'] == config::get('post_password') || $page->isAdmin()) 14 14 { 15 15 $parser = new Parser($_POST['killmail']); 16 16 17 17 // Filtering 18 if ( $config->getConfig("filter_apply"))18 if (config::get("filter_apply")) 19 19 { 20 $filterdate = $config->getConfig("filter_date");20 $filterdate = config::get("filter_date"); 21 21 $year = substr($_POST['killmail'], 0, 4); 22 22 $month = substr($_POST['killmail'], 5, 2); … … 65 65 elseif ($killid == -3) 66 66 { 67 $filterdate = date("j F Y", $config->getConfig("filter_date"));67 $filterdate = date("j F Y", config::get("filter_date")); 68 68 $html = "You are not allowed to post killmails older than $filterdate."; 69 69 } … … 76 76 $kill = new Kill($killid); 77 77 78 $mailer->From = "mailer@".$config->getConfig('mail_host'); 79 $mailer->FromName = $config->getConfig('mail_host'); 78 if (!$server = config::get('post_mailserver')) 79 { 80 $server = 'localhost'; 81 } 82 $mailer->From = "mailer@".config::get('post_mailhost'); 83 $mailer->FromName = config::get('post_mailhost'); 80 84 $mailer->Subject = "Killmail #" . $killid; 81 $mailer->Host = "localhost";85 $mailer->Host = $server; 82 86 $mailer->Port = 25; 83 $mailer->Helo = "localhost";87 $mailer->Helo = $server; 84 88 $mailer->Mailer = "smtp"; 85 $mailer->AddReplyTo("no_reply@". $config->getConfig('mail_host'), "No-Reply");86 $mailer->Sender = "mailer@". $config->getConfig('mail_host');89 $mailer->AddReplyTo("no_reply@".config::get('post_mailhost'), "No-Reply"); 90 $mailer->Sender = "mailer@".config::get('post_mailhost'); 87 91 $mailer->Body = $kill->getRawMail(); 88 $mailer->AddAddress( $config->getPostMailto());92 $mailer->AddAddress(config::get('post_mailhost')); 89 93 $mailer->Send(); 90 94 } 91 95 92 96 $qry = new DBQuery(); 93 $qry->execute("insert into kb3_log 94 values(".$killid.",'".KB_SITE."','".$_SERVER['REMOTE_ADDR']."', now())"); 97 $qry->execute("insert into kb3_log values(".$killid.",'".KB_SITE."','".$_SERVER['REMOTE_ADDR']."', now())"); 95 98 96 99 header("Location: ?a=kill_detail&kll_id=".$killid); … … 103 106 } 104 107 } 105 elseif (! $config->getConfig('post_forbid'))108 elseif (!config::get('post_forbid')) 106 109 { 107 110 $html .= "Paste the killmail from your EVEMail inbox into the box below. Make sure you post the <b>ENTIRE</b> mail.<br>Posting fake or otherwise edited mails is not allowed. All posts are logged.";