/** * @see Form::save() */ public function save() { ACPForm::save(); $this->spider->update($this->spiderIdentifier, $this->spiderName, $this->spiderURL); $this->saved(); WCF::getTPL()->assign(array('success' => true)); }
/** * @see Form::save() */ public function save() { parent::save(); // send content type header('Content-Type: text/' . $this->fileType . '; charset=' . CHARSET); header('Content-Disposition: attachment; filename="export.' . $this->fileType . '"'); if ($this->fileType == 'xml') { echo "<?xml version=\"1.0\" encoding=\"" . CHARSET . "\"?>\n<addresses>\n"; } // get users $sql = "SELECT\t\temail\n\t\t\tFROM\t\twcf" . WCF_N . "_user\n\t\t\tWHERE\t\tuserID IN (" . $this->userIDs . ")\n\t\t\tORDER BY\temail"; $result = WCF::getDB()->sendQuery($sql); $i = 0; $j = WCF::getDB()->countRows($result) - 1; while ($row = WCF::getDB()->fetchArray($result)) { if ($this->fileType == 'xml') { echo "<address><![CDATA[" . StringUtil::escapeCDATA($row['email']) . "]]></address>\n"; } else { echo $this->textSeparator . $row['email'] . $this->textSeparator . ($i < $j ? $this->separator : ''); } $i++; } if ($this->fileType == 'xml') { echo "</addresses>"; } UserEditor::unmarkAll(); $this->saved(); exit; }
/** * @see Form::save() */ public function save() { parent::save(); WCF::getTPL()->assign(array('pageTitle' => WCF::getLanguage()->get('wbb.acp.updateCounters.counter.' . $this->counter), 'url' => 'index.php?action=Update' . ucfirst($this->counter) . '&limit=' . $this->limit . '&packageID=' . PACKAGE_ID . SID_ARG_2ND_NOT_ENCODED)); WCF::getTPL()->display('worker'); exit; }
/** * @see Form::save() */ public function save() { parent::save(); SpiderEditor::create($this->spiderIdentifier, $this->spiderName, $this->spiderURL); $this->spiderName = $this->spiderIdentifier = $this->spiderURL = ''; $this->saved(); WCF::getTPL()->assign(array('success' => true)); }
/** * @see Form::save() */ public function save() { parent::save(); $this->userSuspension->update($this->userSuspension->userID, $this->userSuspension->suspensionID, $this->expiresDay && $this->expiresMonth && $this->expiresYear ? DateUtil::getUTC(gmmktime($this->expiresHour, $this->expiresMinute, 0, $this->expiresMonth, $this->expiresDay, $this->expiresYear)) : 0); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { parent::save(); // delete if ($this->show && $this->fDo == 'delete' && isset($_POST['lostAndFoundDel']) && is_array($_POST['lostAndFoundDel']) && count($_POST['lostAndFoundDel']) > 0) { AdminTools::getLostAndFoundDelete($this->show, $_POST['lostAndFoundDel']); } }
/** * @see Form::save() */ public function save() { parent::save(); // send headers header('Content-Type: text/xml; charset=' . CHARSET); header('Content-Disposition: attachment; filename="' . $this->language->getLanguageCode() . '.xml"'); $this->language->export($this->selectedPackages, $this->exportCustomValues); exit; }
/** * @see Form::save() */ public function save() { ACPForm::save(); // save $this->avatarCategory->update($this->title, $this->showOrder, $this->groupID, $this->neededPoints); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { ACPForm::save(); // save $this->warning->update($this->title, $this->points, $this->expiresHour * 3600 + $this->expiresDay * 86400 + $this->expiresWeek * 86400 * 7); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
public function save() { parent::save(); ServerEditor::create($this->serverName, $this->serverPort, $this->serverDescription); ServerEditor::clearCache(); WCF::getTPL()->assign('success', true); $this->serverName = $this->serverDescription = ''; $this->serverPort = 6667; }
/** * @see Form::validate() */ public function save() { parent::save(); // update $this->avatar->update(array('groupID' => $this->groupID, 'neededPoints' => $this->neededPoints, 'avatarCategoryID' => $this->avatarCategoryID)); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { ACPForm::save(); // update cronjob $this->cronjob->update($this->classPath, $this->packageID, $this->description, $this->execMultiple, $this->startMinute, $this->startHour, $this->startDom, $this->startMonth, $this->startDow); $this->saved(); // show success WCF::getTPL()->assign(array('success' => true)); }
/** * @see Form::save() */ public function save() { parent::save(); NewsletterUtil::sendUserValidationEmail($this->user); $this->saved(); //resetting variables $this->username = ''; $this->user = null; WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { parent::save(); // save server $this->rulesetID = ContestInteractionRulesetEditor::create($this->server, $this->htUsername, $this->htPassword); $this->saved(); // reset values $this->kind = $this->rulesetTable = $this->rulesetColumn = $this->rulesetColumnTime = ''; // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { parent::save(); // save server $this->packageUpdateServerID = UpdateServerEditor::create($this->server, $this->htUsername, $this->htPassword); $this->saved(); // reset values $this->server = $this->htUsername = $this->htPassword = ''; // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { parent::save(); // save LanguageEditor::enableMultilingualism($this->enable == 1 ? $this->languageIDs : array()); // clear cache WCF::getCache()->clearResource('languages'); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { ACPForm::save(); // save $this->smileyCategory->update($this->title, $this->showOrder); // reset cache SmileyEditor::resetCache(); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { parent::save(); foreach ($this->styleIDArray as $styleID) { $style = new StyleEditor($styleID); if ($style->styleID) { $style->writeStyleFile(); } } $this->saved(); WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { if (isset($_POST['send'])) { parent::save(); // save stack $processNo = $this->packageUpdate->savePackageInstallationStack(); $this->saved(); // open queue HeaderUtil::redirect('index.php?page=Package&action=openQueue&processNo=' . $processNo . '&packageID=' . PACKAGE_ID . SID_ARG_2ND_NOT_ENCODED); exit; } }
/** * @see Form::save() */ public function save() { parent::save(); // save AvatarCategoryEditor::create($this->title, $this->showOrder, $this->groupID, $this->neededPoints); $this->saved(); // reset values $this->title = ''; $this->showOrder = $this->neededPoints = $this->groupID = 0; // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { parent::save(); // save WarningEditor::create($this->title, $this->points, $this->expiresHour * 3600 + $this->expiresDay * 86400 + $this->expiresWeek * 86400 * 7); $this->saved(); // reset values $this->title = ''; $this->points = $this->expiresWeek = $this->expiresDay = $this->expiresHour = 0; // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { parent::save(); // get style filename $filename = str_replace(' ', '-', preg_replace('/[^a-z0-9 _-]/', '', StringUtil::toLowerCase($this->style->styleName))); // send headers header('Content-Type: application/x-gzip; charset=' . CHARSET); header('Content-Disposition: attachment; filename="' . $filename . '-style.tgz"'); // export style $this->style->export($this->exportTemplates, $this->exportImages, $this->exportIcons); $this->saved(); exit; }
/** * @see Form::save() */ public function save() { parent::save(); $this->rankID = UserRankEditor::create($this->title, $this->image, $this->groupID, $this->neededPoints, $this->gender, $this->repeatImage); $this->saved(); // reset values $this->groupID = Group::getGroupIdByType(Group::USERS); $this->neededPoints = $this->gender = 0; $this->repeatImage = 1; $this->title = $this->image = ''; // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { parent::save(); // update session WCF::getSession()->register('masterPassword', 1); WCF::getSession()->update(); WCF::getSession()->disableUpdate(); // forward if (empty($this->url)) { $this->url = 'index.php?page=Index&packageID=' . PACKAGE_ID . SID_ARG_2ND_NOT_ENCODED; } HeaderUtil::redirect($this->url, false); exit; }
/** * @see Form::save() */ public function save() { parent::save(); // save SmileyCategoryEditor::create($this->title, $this->showOrder); // reset cache SmileyEditor::resetCache(); $this->saved(); // reset values $this->title = ''; $this->showOrder = 0; // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { ACPForm::save(); // save $this->category->update($this->category->categoryName, 'profile', $this->category->categoryIconS, $this->category->categoryIconM, $this->showOrder); // update language variable require_once WCF_DIR . 'lib/system/language/LanguageEditor.class.php'; $language = new LanguageEditor(WCF::getLanguage()->getLanguageID()); $language->updateItems(array('wcf.user.option.category.' . $this->category->categoryName => $this->categoryName), 0, PACKAGE_ID, array('wcf.user.option.category.' . $this->category->categoryName => 1)); // delete cache WCF::getCache()->clear(WCF_DIR . 'cache', 'cache.user-option-*'); $this->saved(); // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { ACPForm::save(); // read form data $this->host->title = $this->title; $this->host->hostname = $this->hostname; $this->host->isFallback = $this->isFallback; $this->host->languageCode = $this->languageCode; // save $this->host->update(); // show success message WCF::getTPL()->assign('success', true); // remove cache HostEditor::clearCache(); // call event $this->saved(); }
/** * @see Form::save() */ public function save() { parent::save(); $sql = strtoupper($this->action) . " TABLE " . implode(', ', $this->tablenameArray); $result = WCF::getDB()->sendQuery($sql); $results = array(); while ($row = WCF::getDB()->fetchArray($result)) { if ($row['Msg_text'] != 'OK' && $row['Msg_text'] != 'Table is already up to date') { $results[] = $row; } } $this->saved(); // reset values $this->tablenameArray = array(); $this->action = ''; // show success message WCF::getTPL()->assign('results', $results); }
/** * @see Form::save() */ public function save() { parent::save(); // save pm $sql = "INSERT INTO\twcf" . WCF_N . "_pm\n\t\t\t\t\t(userID, username, subject, message, time)\n\t\t\tVALUES\t\t(" . WCF::getUser()->userID . ", '" . escapeString(WCF::getUser()->username) . "', '" . escapeString($this->subject) . "', '" . escapeString($this->text) . "', " . TIME_NOW . ")"; WCF::getDB()->sendQuery($sql); $pmID = WCF::getDB()->getInsertID("wcf" . WCF_N . "_pm", 'pmID'); // save recipients if ($this->action == 'group') { $sql = "INSERT IGNORE INTO\twcf" . WCF_N . "_pm_to_user\n\t\t\t\t\t\t\t(pmID, recipientID, recipient, isBlindCopy)\n\t\t\t\tSELECT\t\t\t" . $pmID . ", user_to_groups.userID, user_table.username, 1\n\t\t\t\tFROM\t\t\twcf" . WCF_N . "_user_to_groups user_to_groups\n\t\t\t\tLEFT JOIN\t\twcf" . WCF_N . "_user user_table\n\t\t\t\tON\t\t\t(user_table.userID = user_to_groups.userID)\n\t\t\t\tWHERE\t\t\tuser_to_groups.groupID IN (" . implode(',', $this->groupIDs) . ")"; WCF::getDB()->sendQuery($sql); // update counters $sql = "UPDATE\twcf" . WCF_N . "_user\n\t\t\t\tSET\tpmUnreadCount = pmUnreadCount + 1,\n\t\t\t\t\tpmOutstandingNotifications = pmOutstandingNotifications + 1\n\t\t\t\tWHERE\tuserID IN (\n\t\t\t\t\t\tSELECT\tuserID\n\t\t\t\t\t\tFROM\twcf" . WCF_N . "_user_to_groups\n\t\t\t\t\t\tWHERE\tgroupID IN (" . implode(',', $this->groupIDs) . ")\n\t\t\t\t\t)"; WCF::getDB()->sendQuery($sql); // reset sessions Session::resetSessions(array(), true, false); } else { if ($this->action == 'all') { $sql = "INSERT INTO\twcf" . WCF_N . "_pm_to_user\n\t\t\t\t\t\t(pmID, recipientID, recipient, isBlindCopy)\n\t\t\t\tSELECT\t\t" . $pmID . ", userID, username, 1\n\t\t\t\tFROM\t\twcf" . WCF_N . "_user"; WCF::getDB()->sendQuery($sql); // update counters $sql = "UPDATE\twcf" . WCF_N . "_user\n\t\t\t\tSET\tpmUnreadCount = pmUnreadCount + 1,\n\t\t\t\t\tpmOutstandingNotifications = pmOutstandingNotifications + 1"; WCF::getDB()->sendQuery($sql); // reset sessions Session::resetSessions(array(), true, false); } else { $sql = "INSERT INTO\twcf" . WCF_N . "_pm_to_user\n\t\t\t\t\t\t(pmID, recipientID, recipient, isBlindCopy)\n\t\t\t\tSELECT\t\t" . $pmID . ", userID, username, 1\n\t\t\t\tFROM\t\twcf" . WCF_N . "_user\n\t\t\t\tWHERE\t\tuserID IN (" . $this->userIDs . ")"; WCF::getDB()->sendQuery($sql); // update counters $sql = "UPDATE\twcf" . WCF_N . "_user\n\t\t\t\tSET\tpmUnreadCount = pmUnreadCount + 1,\n\t\t\t\t\tpmOutstandingNotifications = pmOutstandingNotifications + 1\n\t\t\t\tWHERE\tuserID IN (" . $this->userIDs . ")"; WCF::getDB()->sendQuery($sql); // reset sessions Session::resetSessions(explode(',', $this->userIDs), true, false); } } $this->saved(); // reset values $this->subject = $this->text = ''; $this->groupIDs = array(); $this->userIDs = ''; // show success message WCF::getTPL()->assign('success', true); }
/** * @see Form::save() */ public function save() { parent::save(); $sql = "SELECT\t\tuser.*,\n\t\t\t\t\tGROUP_CONCAT(groupID SEPARATOR ',') AS groupIDs\n\t\t\tFROM\t\twcf" . WCF_N . "_user user\n\t\t\tLEFT JOIN\twcf" . WCF_N . "_user_to_groups groups\n\t\t\tON\t\t(groups.userID = user.userID)\n\t\t\tWHERE\t\tuser.userID IN (" . $this->userIDs . ")\n\t\t\tGROUP BY\tuser.userID"; $result = WCF::getDB()->sendQuery($sql); while ($row = WCF::getDB()->fetchArray($result)) { if (!Group::isAccessibleGroup(explode(',', $row['groupIDs']))) { throw new PermissionDeniedException(); } $user = new UserEditor(null, $row); $user->addToGroups($this->groupIDs, false, false); } UserEditor::unmarkAll(); Session::resetSessions(explode(',', $this->userIDs)); $this->saved(); WCF::getTPL()->assign('message', 'wcf.acp.user.assignToGroup.success'); WCF::getTPL()->display('success'); exit; }