本文整理汇总了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();
}
示例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")));
}
}
示例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;
}
示例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"));
}
}