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