1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- if (!class_exists("plug_mail")) {
- class plug_mail {
- function __construct($ns) {
- $this->title = __("mail", "dagsopt");
- $this->pluginname = $ns->pluginname;
- $this->file = $ns->file;
- $this->ns = $ns;
- }
- function start() {
- $this->logfile = fopen(ABSPATH . "/wp-content/uploads/maillog.log", 'a');
- add_filter('wp_mail', array(&$this, 'mail_logger'), 10, 1);
- }
- function mail_logger($args) {
- $str = date("Y-m-d");
- $str .= " | " . date("H:i:s");
- $str .= " | " . $args['to'];
- $str .= " | " . $args['subject'];
- fwrite($this->logfile, $str . "\n");
- return $args;
- }
- function help() {
- ?>
- <?php echo (__("Adds mail log functions", "dagsopt")) ?>
- <?php
- }
- function Option($pre) {
- // update_option($pre . '_support_splash', $_POST[$pre . '_support_splash']);
- }
- function admin_line($pre) {
- ?>
- <hr>
- <?php
- $data = file_get_contents(ABSPATH . "/wp-content/uploads/maillog.log");
- ?>
- <textarea class="" rows="8" style="width: 100%; font-size: 11px;">
- <?php echo ($data) ?>
- </textarea>
- <?php
- }
- }
- global $plug_mail;
- $plug_mail = new plug_mail($this);
- $this->dagsopt['plug_mail'] = $plug_mail;
- }
|