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


PHP AbstractForm::save方法代码示例

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


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

示例1: save

 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     //save activation token into database
     $token = StringUtil::getRandomID();
     $sql = 'INSERT INTO wcf' . WCF_N . '_' . $this->subscriberTable . "\n        \t\t(email)\n        \t\t\tVALUES\n        \t\t('" . escapeString($this->email) . "')";
     WCF::getDB()->sendQuery($sql);
     $subscriberID = WCF::getDB()->getInsertID();
     //clears cache
     WCF::getCache()->clear(WCF_DIR . 'cache/', 'cache.newsletter-subscriber-' . PACKAGE_ID . '.php', true);
     $sql = 'INSERT INTO wcf' . WCF_N . '_' . $this->activationTable . '
     		(subscriberID, token)
     			VALUES
     		(' . intval($subscriberID) . ", '" . escapeString($token) . "')";
     WCF::getDB()->sendQuery($sql);
     $url = PAGE_URL . '/index.php?action=NewsletterGuestActivate&id=' . $subscriberID . '&t=' . $token;
     $subject = WCF::getLanguage()->get('wcf.acp.newsletter.optin.subject');
     $content = WCF::getLanguage()->getDynamicVariable('wcf.acp.newsletter.optin.text', array('username' => WCF::getLanguage()->get('wcf.acp.newsletter.optin.hello'), 'url' => $url));
     WCF::getTPL()->assign(array('subject' => $subject, 'content' => $content));
     $output = WCF::getTPL()->fetch('validationEmail');
     $mail = new Mail($this->email, $subject, $output, MESSAGE_NEWSLETTERSYSTEM_GENERAL_FROM);
     $mail->setContentType('text/html');
     $mail->send();
     $this->saved();
     WCF::getTPL()->assign(array('message' => WCF::getLanguage()->get('wcf.acp.newsletter.optin.activationPending'), 'url' => PAGE_URL . '/index.php?page=Index' . SID_ARG_2ND));
     WCF::getTPL()->display('redirect');
     exit;
 }
开发者ID:CaribeSoy,项目名称:Newsletter-System,代码行数:31,代码来源:NewsletterRegisterGuestForm.class.php

示例2: save

 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     // delete ignored boards
     $sql = "DELETE FROM\twbb" . WBB_N . "_board_ignored_by_user\n\t\t\tWHERE\t\tuserID = " . WCF::getUser()->userID;
     WCF::getDB()->sendQuery($sql);
     // fix not ignorable boards
     foreach ($this->boards as $board) {
         if (!$board->ignorable) {
             if (!in_array($board->boardID, $this->unignoredBoardIDArray)) {
                 $this->unignoredBoardIDArray[] = $board->boardID;
             }
             $parentBoards = $board->getParentBoards();
             foreach ($parentBoards as $parentBoard) {
                 if (!in_array($parentBoard->boardID, $this->unignoredBoardIDArray)) {
                     $this->unignoredBoardIDArray[] = $parentBoard->boardID;
                 }
             }
         }
     }
     // save ignored boards
     foreach ($this->boards as $board) {
         if (!in_array($board->boardID, $this->unignoredBoardIDArray) && $board->getPermission('canViewBoard')) {
             $sql = "INSERT INTO\twbb" . WBB_N . "_board_ignored_by_user\n\t\t\t\t\t\t\t(userID, boardID)\n\t\t\t\t\tVALUES\t\t(" . WCF::getUser()->userID . ", " . $board->boardID . ")";
             WCF::getDB()->sendQuery($sql);
         }
     }
     WCF::getSession()->resetUserData();
     $this->saved();
     // show success message
     WCF::getTPL()->assign('success', true);
 }
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:35,代码来源:BoardIgnoreForm.class.php

示例3: save

 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     AllianceEditor::create($this->allianceName, $this->allianceTag, WCF::getUser()->userID);
     WCF::getSession()->setUpdate(true);
     header('Location: index.php?page=Alliance');
     exit;
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:11,代码来源:AllianceCreateForm.class.php

示例4: save

 /**
  * @see Form::save()
  */
 public function save()
 {
     AbstractForm::save();
     // update
     $this->suspension->update($this->title, $this->points, $this->suspension->suspensions == 0 ? $this->suspensionType : $this->suspension->suspensionType, $this->suspension->suspensions == 0 ? $this->suspensionTypeObject->getData() : unserialize($this->suspension->suspensionData), $this->expiresHour * 3600 + $this->expiresDay * 86400 + $this->expiresWeek * 86400 * 7);
     $this->saved();
     // show success message
     WCF::getTPL()->assign('success', true);
 }
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:12,代码来源:SuspensionEditForm.class.php

示例5: save

 /**
  * @see Form::save()
  */
 public function save()
 {
     AbstractForm::save();
     $this->source->update($this->name, $this->sourceDirectory, $this->buildDirectory, $this->scm, $this->url, $this->username, $this->password, null, $this->trustServerCert, $this->enableCheckout);
     // call saved event
     $this->saved();
     // show success message
     WCF::getTPL()->assign('success', true);
 }
开发者ID:ZerGabriel,项目名称:PackageBuilder,代码行数:12,代码来源:SourceEditForm.class.php

示例6: save

 /**
  * @see Form::save()
  */
 public function save()
 {
     AbstractForm::save();
     // save server
     $this->updateServer->update($this->server, $this->htUsername, $this->htPassword);
     $this->saved();
     // show success message
     WCF::getTPL()->assign('success', true);
 }
开发者ID:CaribeSoy,项目名称:contest-wcf,代码行数:12,代码来源:UpdateServerEditForm.class.php

示例7: save

 /**
  * @see Form::validate()
  */
 public function save()
 {
     AbstractForm::save();
     // update
     $this->rank->update($this->title, $this->image, $this->groupID, $this->neededPoints, $this->gender, $this->repeatImage);
     $this->saved();
     // show success message
     WCF::getTPL()->assign('success', true);
 }
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:12,代码来源:UserRankEditForm.class.php

示例8: save

 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     $sql = "UPDATE ugml_users\n\t\t\t\tSET ally_request = " . $this->allianceID . ",\n\t\t\t\t\tally_request_text = '" . escapeString($this->applicationText) . "',\n\t\t\t\t\tally_register_time = " . TIME_NOW . "\n\t\t\t\tWHERE id = " . WCF::getUser()->userID;
     WCF::getDB()->sendQuery($sql);
     WCF::getSession()->setUpdate(true);
     header('Location: index.php?page=Alliance');
     exit;
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:12,代码来源:AllianceApplyForm.class.php

示例9: save

 /**
  * @see Form::save()
  */
 public function save()
 {
     AbstractForm::save();
     // save server
     $this->entry->update($this->kind, $this->rulesetTable, $this->rulesetColumn, $this->rulesetColumnTime);
     $this->saved();
     // show success message
     WCF::getTPL()->assign('success', true);
 }
开发者ID:CaribeSoy,项目名称:contest-wcf,代码行数:12,代码来源:ContestInteractionRulesetEditForm.class.php

示例10: save

 /**
  * @see Form::save()
  */
 public function save()
 {
     AbstractForm::save();
     // update item
     $this->contestRatingoption->update($this->classID, $this->topic, $this->text, $this->languageID);
     $this->saved();
     // show success message
     WCF::getTPL()->assign('success', true);
 }
开发者ID:CaribeSoy,项目名称:contest-wcf,代码行数:12,代码来源:ContestRatingoptionEditForm.class.php

示例11: save

 /**
  * @see Form::save()
  */
 public function save()
 {
     AbstractForm::save();
     // save rule
     $this->rule->update($this->title, $this->logicalOperator, $this->ruleConditions, $this->ruleAction, $this->ruleDestination, intval(!$this->enabled));
     $this->saved();
     // show success message
     WCF::getTPL()->assign('success', true);
 }
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:12,代码来源:PMRuleEditForm.class.php

示例12: save

 /**
  * @see Form::save()
  */
 public function save()
 {
     AbstractForm::save();
     // save sponsortalk
     $this->entry->update($this->message);
     $this->saved();
     // forward
     HeaderUtil::redirect('index.php?page=ContestSponsortalk&contestID=' . $this->entry->contestID . '&sponsortalkID=' . $this->entry->sponsortalkID . SID_ARG_2ND_NOT_ENCODED . '#sponsortalk' . $this->entry->sponsortalkID);
     exit;
 }
开发者ID:CaribeSoy,项目名称:contest-wcf,代码行数:13,代码来源:ContestSponsortalkEditForm.class.php

示例13: save

 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     foreach ($this->hideOventTypes as $oventTypeID => $hide) {
         WCF::getUser()->setSetting('hideOventType' . $oventTypeID, $hide);
     }
     WCF::getUser()->setSetting('dontAskOnOventHiding', $this->dontAskOnHiding);
     WCF::getUser()->setSetting('hideInformation', $this->hideInformation);
     WCF::getUser()->setSetting('hideColonies', $this->hideColonies);
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:13,代码来源:OverviewOptionsForm.class.php

示例14: save

 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     foreach ($this->planets as $sortID => $planetID) {
         $sql = "UPDATE ugml_planets\r\n\t\t\t\t\tSET sortID = " . $sortID . "\r\n\t\t\t\t\tWHERE id = " . $planetID;
         WCF::getDB()->sendQuery($sql);
         Planet::getInstance($planetID)->sortID = $sortID;
     }
     $this->planetObjs = array();
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:13,代码来源:PlanetSortForm.class.php

示例15: save

 /**
  * @see Form::save()
  */
 public function save()
 {
     AbstractForm::save();
     // save entry
     $this->entry->update($this->entry->contestID, $this->entry->userID, $this->entry->groupID, $this->state);
     $this->saved();
     // forward
     HeaderUtil::redirect('index.php?page=ContestSponsor&contestID=' . $this->entry->contestID . SID_ARG_2ND_NOT_ENCODED . '#entry' . $this->entry->sponsorID);
     exit;
 }
开发者ID:CaribeSoy,项目名称:contest-wcf,代码行数:13,代码来源:ContestSponsorEditForm.class.php


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