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


PHP messages::registerMessage方法代码示例

本文整理汇总了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();
 }
开发者ID:sea75300,项目名称:affiliat_r,代码行数:29,代码来源:lists.php

示例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();
 }
开发者ID:sea75300,项目名称:affiliat_r,代码行数:32,代码来源:updateclass.php

示例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;
 }
开发者ID:sea75300,项目名称:affiliat_r,代码行数:15,代码来源:cache.php

示例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();
 }
开发者ID:sea75300,项目名称:affiliat_r,代码行数:41,代码来源:options.php

示例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);
     }
 }
开发者ID:sea75300,项目名称:affiliat_r,代码行数:13,代码来源:base_contrl.php

示例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;
 }
开发者ID:sea75300,项目名称:affiliat_r,代码行数:30,代码来源:file.php


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