Esempio n. 1
0
 public function export_active_users_action()
 {
     $this->crumb(AWS_APP::lang()->_t('邮件群发'), "admin/edm/export_active_users");
     if ($export = $this->model('edm')->fetch_task_active_emails($_GET['id'])) {
         HTTP::force_download_header('export.txt');
         foreach ($export as $key => $data) {
             echo $data['email'] . "\r\n";
         }
     } else {
         H::redirect_msg(AWS_APP::lang()->_t('没有活跃用户'), '/admin/edm/tasks/');
     }
 }
 public function download_action()
 {
     $url = @base64_decode($_GET['url']);
     if (!$url) {
         H::redirect_msg(AWS_APP::lang()->_t('文件未找到'));
     }
     $path = get_setting('upload_dir') . '/' . str_replace(get_setting('upload_url'), '', $url);
     if (strstr($path, '..') or !file_exists($path)) {
         H::redirect_msg(AWS_APP::lang()->_t('文件未找到'));
     }
     HTTP::force_download_header(base64_decode($_GET['file_name']), filesize($path));
     readfile($path);
 }