当前位置: 首页>>代码示例>>PHP>>正文


PHP Shell::check方法代码示例

本文整理汇总了PHP中Shell::check方法的典型用法代码示例。如果您正苦于以下问题:PHP Shell::check方法的具体用法?PHP Shell::check怎么用?PHP Shell::check使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Shell的用法示例。


在下文中一共展示了Shell::check方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 function __construct($query, $boundary, $logpass, $shellManager, $type = "htmle", $auto = true)
 {
     global $translation;
     $this->query = $query;
     $this->files = isset($_POST['files']) ? $_POST['files'] : null;
     $this->outserver = isset($_POST['outserver']) ? $_POST['outserver'] : null;
     $this->saveInTxtLog = isset($_POST['saveLogInTxt']) && $_POST['saveLogInTxt'] == "true" ? true : false;
     if (SERVICEMODE) {
         $this->outserver = null;
     }
     $this->output = "";
     $this->shellManager = $shellManager;
     if (!$auto) {
         return;
     }
     if ($this->query == "preview") {
         if (SERVICEMODE) {
             if ($type == "text") {
                 $_POST['text'] = $translation->getWord("service-warning-text") . PHP_EOL . $_POST['text'];
             } else {
                 $_POST['text'] = "<div style='color:red;font-weight:bold;'>" . $translation->getWord("service-warning-text") . "</div>" . $_POST['text'];
             }
         }
         $email = EmailSender::makeEmail($_POST['to'], $_POST['fromname'], $_POST['frommail'], $_POST['replymail'], $_POST['tema'], $_POST['additional'], $_POST['text'], $_POST['enumer'], $this->query == "preview");
         $this->output = $email->text;
         return;
     }
     if ($this->query == "send") {
         $emailSender = new EmailSender();
         if (SERVICEMODE) {
             if ($type == "text") {
                 $_POST['text'] = $translation->getWord("service-warning-text") . PHP_EOL . $_POST['text'];
             } else {
                 $_POST['text'] = "<div style='color:red;font-weight:bold;'>" . $translation->getWord("service-warning-text") . "</div>" . $_POST['text'];
             }
         }
         $emailSender->Send($type, $this->files, $this->outserver, $boundary, array('to' => $_POST['to'], 'fromname' => $_POST['fromname'], 'frommail' => $_POST['frommail'], 'replymail' => $_POST['replymail'], 'tema' => $_POST['tema'], 'additional' => $_POST['additional'], 'text' => $_POST['text'], 'sendInBase64' => $_POST['sendInBase64'] == "true", 'enumer' => $_POST['enumer']));
         $this->output = $emailSender->getOutput();
         if ($this->saveInTxtLog) {
             $this->saveToTxtLog($this->output);
         }
         return;
     }
     if ($this->query == "sendFromTemplate") {
         if (SERVICEMODE) {
             return;
         }
         $emailSender = new EmailSender();
         $emailSender->SendFromTemplate($_POST['template'], $_POST['to'], $this->outserver, $boundary);
         $this->output = $emailSender->getOutput();
         if ($this->saveInTxtLog) {
             $this->saveToTxtLog($this->output);
         }
         return;
     }
     if ($this->query == "upload_universal") {
         $this->output = TransferIface::uploadFile(isset($_FILES['elist']) ? $_FILES['elist'] : null);
         return;
     }
     if ($this->query == "savedata") {
         $this->output = TransferIface::downloadFile(isset($_POST['savedata']) ? $_POST['savedata'] : null, $_POST['filename']);
         return;
     }
     if ($this->query == "changepass") {
         if (SERVICEMODE) {
             return;
         }
         $this->output = $this->changePass($_POST['login'], $_POST['pass'], $logpass);
         return;
     }
     if ($this->query == "pingoutserver") {
         if (SERVICEMODE) {
             return;
         }
         $this->output = Shell::check($_POST['server']);
         return;
     }
     if ($this->query == "linesinfile") {
         if (SERVICEMODE) {
             return;
         }
         $this->output = AMUtil::linesInFile($_POST['file_path']);
         return;
     }
     if ($this->query == "saveSettings") {
         if (SERVICEMODE) {
             return;
         }
         $result = Settings::Save($_POST['settings']);
         if ($result) {
             $this->output = $translation->getWord("settings-saved");
         } else {
             $this->output = $translation->getWord("settings-save-error");
         }
         return;
     }
     if ($this->query == "removeSettings") {
         if (SERVICEMODE) {
             return;
         }
//.........这里部分代码省略.........
开发者ID:AlexusBlack,项目名称:alexusMailer-2,代码行数:101,代码来源:AlexusMailer.php


注:本文中的Shell::check方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。