本文整理汇总了PHP中messages::registerMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP messages::registerMessage方法的具体用法?PHP messages::registerMessage怎么用?PHP messages::registerMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类messages
的用法示例。
在下文中一共展示了messages::registerMessage方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
public function process()
{
if (!parent::process()) {
$this->redirectNoSession();
}
if (!is_null($this->getRequestVar('affiliateDelList'))) {
$affiliateIds = $this->getRequestVar('affiliateDelList');
foreach ($affiliateIds as $affiliateId) {
$affiliate = new \model\affiliate($this->getDbconnection(), $this->filterRequest($affiliateId, array(1, 4, 7)));
$affiliate->delete();
}
$this->redirect('affiliate/list', array('affiliatedeleted=yes'));
}
$affiliateList = new \model\affiliate_list($this->getDbconnection());
$affiliateList->setGroupByCategory(true);
if (!is_null($this->getRequestVar('affiliateadded'))) {
\messages::registerMessage(\language::returnLanguageConstant('SAVE_SUCCESS_ADDAFFILIATE'));
}
if (!is_null($this->getRequestVar('affiliateedited'))) {
\messages::registerMessage(\language::returnLanguageConstant('SAVE_SUCCESS_EDITAFFILIATE'));
}
if (!is_null($this->getRequestVar('affiliatedeleted'))) {
\messages::registerMessage(\language::returnLanguageConstant('DELETE_SUCCESS_AFFILIATES'));
}
$view = new \model\view_acp('affiliate_list');
$view->assign('theList', $affiliateList->getAffiliates());
$view->assign('dtMask', $this->getSysconfig()->getDateTimeMask());
$view->render();
}
示例2: runUpdate
public function runUpdate($fileList = array())
{
$view = new \model\view_installer('updater');
$view->assign('version', $this->sysconfig->getSysVersion());
include \base_config::$baseDir . '/version.php';
$this->updateConfigKey('sysVersion', $afltrVersion);
if (file_exists(\base_config::$updateCache)) {
@unlink(\base_config::$updateCache);
}
$fileDeleteList = array('/inc/model/model_base.php', '/inc/model/dashcontainerbox.php', '/inc/lib/jquery/jquery-1.10.2.min.js');
foreach ($fileDeleteList as $fileDelete) {
if (file_exists(\base_config::$baseDir . $fileDelete)) {
@unlink(\base_config::$baseDir . $fileDelete);
}
}
$file = new \model\file();
if (is_dir(base_config::$baseDir . '/inc/lib/lightbox')) {
$file->deleteRecursive(base_config::$baseDir . '/inc/lib/lightbox');
}
if (is_dir(base_config::$baseDir . '/inc/lib/jquery_ui')) {
$file->deleteRecursive(base_config::$baseDir . '/inc/lib/jquery_ui');
}
if (!file_exists(base_config::$uploadDir . '/banners')) {
mkdir(base_config::$uploadDir . '/banners');
}
$this->createConfigKey('timeZone', 'Europe/Berlin');
$newVersion = $this->dbconnection->select("config", "config_value", "config_key LIKE 'sysVersion'");
\messages::registerMessage(\language::returnLanguageConstant('UPDATE_SUCCESS'), true);
$view->assign('newVersion', $newVersion[0]['config_value']);
$view->assign('fileList', $fileList);
$view->render();
}
示例3: process
public function process()
{
if (!parent::process()) {
$this->redirectNoSession();
}
$file = new \model\file();
if (!unlink(\base_config::$updateCache)) {
\messages::logSystem('Unable to clear cache!');
\messages::registerError(\language::returnLanguageConstant('CACHE_CLEARED_FAILED'));
} else {
\messages::registerMessage(\language::returnLanguageConstant('CACHE_CLEARED_OK'));
}
\messages::showMessages();
die;
}
示例4: process
public function process()
{
if (!parent::process()) {
$this->redirectNoSession();
}
if (!is_null($this->getRequestVar('options'))) {
$data = $this->getRequestVar('options');
$sysConfigObj = $this->getSysconfig();
if (!empty($data['loginPasswort']) && !$sysConfigObj->isPasswordSecure($data['loginPasswort'])) {
\messages::registerError(\language::returnLanguageConstant('SAVE_FAILED_PASSWORD'));
unset($data['loginPasswort']);
}
foreach ($data as $key => $value) {
if ($value == '') {
continue;
}
$fn = 'set' . $key;
$sysConfigObj->{$fn}($this->filterRequest($value, array(1, 4, 7)));
}
$sysConfigObj->update();
\messages::registerMessage(\language::returnLanguageConstant('SAVE_SUCCESS_OPTIONS'));
}
$fields = array('adminMail' => $this->getSysconfig()->getAdminMail(), 'iframecss' => $this->getSysconfig()->getIframecss(), 'sessionLength' => $this->getSysconfig()->getSessionLength(), 'timeZone' => $this->getSysconfig()->getTimeZone(), 'dateTimeMask' => $this->getSysconfig()->getDateTimeMask(), 'antispamQuestion' => $this->getSysconfig()->getAntispamQuestion(), 'antispamAnswer' => $this->getSysconfig()->getAntispamAnswer());
$dtMasksArray = array('d.m.Y', 'd. M Y', 'd.n.Y', 'j.m.Y', 'j. M Y', 'j.n.Y', 'M dS Y', 'm/d/Y', 'n/d/Y');
$dtMasks = array();
foreach ($dtMasksArray as $dtMask) {
$dtMasks[] = array('label' => $dtMask . ' (' . date($dtMask) . ')', 'value' => $dtMask);
}
$timeZones = timezone_identifiers_list();
$timeZones = array_combine(array_values($timeZones), array_values($timeZones));
unset($timeZones['UTC']);
$view = new \model\view_acp('options');
$view->assign('languages', \language::getLanguages());
$view->assign('modes', array('iframe' => 1, 'phpcinlude' => 2));
$view->assign('timeZones', array_unique($timeZones));
$view->assign('syslang', $this->getSysconfig()->getSysLanguage());
$view->assign('sysmode', $this->getSysconfig()->getSystemMode());
$view->assign('dtMasks', json_encode($dtMasks));
$view->assign('fields', $fields);
$view->render();
}
示例5: checkUpdates
/**
* Update check
* @return string
*/
private function checkUpdates()
{
$updateValue = $this->sysconfig->checkForUpdates();
if (!is_null($updateValue)) {
$updateMessage = \language::replaceLanguageConstant(\language::returnLanguageConstant('UPDATE_NOTAUTOCHECK'), array('{{versionlink}}' => $updateValue));
\messages::registerError($updateMessage, true);
\messages::registerMessage("<iframe src=\"{$updateValue}\" class=\"update-check-iframe\" scrolling=\"no\" seamless></iframe>", true);
}
}
示例6: unzipPackage
public function unzipPackage($fileName, &$fileList = array())
{
$fileName = \base_config::$updateFolder . $fileName;
$zip = new \ZipArchive();
$res = $zip->open($fileName);
if ($res !== TRUE) {
\messages::logSystem($res);
\messages::registerError(\language::returnLanguageConstant('UNPACK_PCK_FAILED'), false);
return false;
}
for ($i = 0; $i < $zip->numFiles; $i++) {
$zipFileName = \base_config::$baseDir . $zip->getNameIndex($i);
if (file_exists($zipFileName) && !is_writable($zipFileName)) {
chmod($zipFileName, 0777);
}
$fileCheck = $zip->getNameIndex($i);
if (file_exists($zipFileName)) {
$fileCheck = is_writable($zipFileName) ? true : false;
} else {
$fileCheck = true;
}
$fileList[$zipFileName] = $fileCheck;
}
if ($zip->extractTo(\base_config::$updateFolder)) {
\messages::logSystem('Extract package file ' . $fileName . ' >> OK!');
\messages::registerMessage(\language::returnLanguageConstant('UNPACK_PCK_SUCCESS'), false);
}
$zip->close();
return true;
}