當前位置: 首頁>>代碼示例>>PHP>>正文


PHP EmailFolder::model方法代碼示例

本文整理匯總了PHP中EmailFolder::model方法的典型用法代碼示例。如果您正苦於以下問題:PHP EmailFolder::model方法的具體用法?PHP EmailFolder::model怎麽用?PHP EmailFolder::model使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在EmailFolder的用法示例。


在下文中一共展示了EmailFolder::model方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: init

 public function init()
 {
     $this->uid = $uid = intval(Yii::app()->user->uid);
     $this->folders = EmailFolder::model()->fetchAllUserFolderByUid($uid);
     $this->allowWebMail = (bool) Yii::app()->setting->get("setting/emailexternalmail");
     $this->webMails = $this->allowWebMail ? EmailWeb::model()->fetchAllByUid($uid) : array();
     parent::init();
 }
開發者ID:AxelPanda,項目名稱:ibos,代碼行數:8,代碼來源:EmailBaseController.php

示例2: actionDel

 public function actionDel()
 {
     $fid = $this->fid;
     $cleanAll = EnvUtil::getRequest("delemail");
     $emailIds = Email::model()->fetchAllEmailIdsByFolderId($fid, $this->uid);
     if ($cleanAll) {
         $emailIds && Email::model()->completelyDelete($emailIds, $this->uid);
     } else {
         $emailIds && Email::model()->updateByPk($emailIds, array("fid" => parent::INBOX_ID));
     }
     $deleted = EmailFolder::model()->deleteByPk($fid);
     if ($deleted) {
         $this->ajaxReturn(array("isSuccess" => true));
     } else {
         $this->ajaxReturn(array("isSuccess" => false, "errorMsg" => Ibos::lang("Del failed", "message")));
     }
 }
開發者ID:AxelPanda,項目名稱:ibos,代碼行數:17,代碼來源:FolderController.php

示例3: processAddWebMail

 protected function processAddWebMail($inAjax = false)
 {
     $web = $_POST["web"];
     $errMsg = "";
     $this->submitCheck($web, $inAjax);
     if (isset($_POST["moreinfo"])) {
         if (empty($web["server"])) {
             $this->error(Ibos::lang("Empty server address"), "", array(), $inAjax);
         }
         $passCheck = WebMailUtil::checkAccount($web["address"], $web["password"], $web);
         if ($passCheck) {
             $web = WebMailUtil::mergePostConfig($web["address"], $web["password"], $web);
         } else {
             $errMsg = Ibos::lang("Error server info");
         }
     } else {
         $passCheck = WebMailUtil::checkAccount($web["address"], $web["password"]);
         if ($passCheck) {
             $web = WebMailUtil::getEmailConfig($web["address"], $web["password"]);
         } else {
             $errMsg = Ibos::lang("More server info");
         }
     }
     if (!$passCheck) {
         if (!$inAjax) {
             $this->setPageTitle(Ibos::lang("Add web email"));
             $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Personal Office")), array("name" => Ibos::lang("Email center"), "url" => $this->createUrl("list/index")), array("name" => Ibos::lang("Add web email"))));
             $this->render("add", array("more" => true, "errMsg" => $errMsg, "web" => $web));
         } else {
             $data = array("lang" => Ibos::getLangSources(), "more" => true, "errMsg" => $errMsg, "web" => $web);
             $content = $this->renderPartial("ajaxAdd", $data, true);
             $this->ajaxReturn(array("moreinfo" => true, "content" => $content));
         }
         exit;
     }
     $web = $this->beforeSave($web);
     $newId = EmailWeb::model()->add($web, true);
     $folder = array("sort" => 0, "name" => isset($_POST["web"]["name"]) ? StringUtil::filterCleanHtml($_POST["web"]["name"]) : $web["address"], "uid" => $this->uid, "webid" => $newId);
     $fid = EmailFolder::model()->add($folder, true);
     EmailWeb::model()->modify($newId, array("fid" => $fid));
     return $newId;
 }
開發者ID:AxelPanda,項目名稱:ibos,代碼行數:42,代碼來源:WebController.php

示例4: checkUserSize

 protected function checkUserSize()
 {
     $userSize = EmailUtil::getUserSize($this->uid);
     $usedSize = EmailFolder::model()->getUsedSize($this->uid);
     if (ConvertUtil::ConvertBytes($userSize . "m") < $usedSize) {
         $this->error(Ibos::lang("Capacity overflow", "", array("{size}" => $usedSize)), $this->createUrl("email/list"));
     }
 }
開發者ID:AxelPanda,項目名稱:ibos,代碼行數:8,代碼來源:ContentController.php


注:本文中的EmailFolder::model方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。