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


PHP Piwik::checkUserHasSomeAdminAccess方法代码示例

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


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

示例1: generalSettings

 public function generalSettings()
 {
     Piwik::checkUserHasSomeAdminAccess();
     $view = Piwik_View::factory('generalSettings');
     if (Piwik::isUserIsSuperUser()) {
         $enableBrowserTriggerArchiving = Piwik_ArchiveProcessing::isBrowserTriggerArchivingEnabled();
         $todayArchiveTimeToLive = Piwik_ArchiveProcessing::getTodayArchiveTimeToLive();
         $showWarningCron = false;
         if (!$enableBrowserTriggerArchiving && $todayArchiveTimeToLive < 3600) {
             $showWarningCron = true;
         }
         $view->showWarningCron = $showWarningCron;
         $view->todayArchiveTimeToLive = $todayArchiveTimeToLive;
         $view->enableBrowserTriggerArchiving = $enableBrowserTriggerArchiving;
         $view->language = Piwik_LanguagesManager::getLanguageCodeForCurrentUser();
         if (!Zend_Registry::get('config')->isFileWritable()) {
             $view->configFileNotWritable = true;
         }
         $view->mail = Zend_Registry::get('config')->mail->toArray();
     }
     $this->setBasicVariablesView($view);
     $view->topMenu = Piwik_GetTopMenu();
     $view->menu = Piwik_GetAdminMenu();
     echo $view->render();
 }
开发者ID:Gninety,项目名称:Microweber,代码行数:25,代码来源:Controller.php

示例2: generalSettings

 public function generalSettings()
 {
     Piwik::checkUserHasSomeAdminAccess();
     $view = Piwik_View::factory('generalSettings');
     if (Piwik::isUserIsSuperUser()) {
         $enableBrowserTriggerArchiving = Piwik_ArchiveProcessing::isBrowserTriggerArchivingEnabled();
         $todayArchiveTimeToLive = Piwik_ArchiveProcessing::getTodayArchiveTimeToLive();
         $showWarningCron = false;
         if (!$enableBrowserTriggerArchiving && $todayArchiveTimeToLive < 3600) {
             $showWarningCron = true;
         }
         $view->showWarningCron = $showWarningCron;
         $view->todayArchiveTimeToLive = $todayArchiveTimeToLive;
         $view->enableBrowserTriggerArchiving = $enableBrowserTriggerArchiving;
         if (!Piwik_Config::getInstance()->isFileWritable()) {
             $view->configFileNotWritable = true;
         }
         $view->mail = Piwik_Config::getInstance()->mail;
         $view->branding = Piwik_Config::getInstance()->branding;
         $directoryWritable = is_writable(PIWIK_DOCUMENT_ROOT . '/themes/');
         $logoFilesWriteable = is_writeable(PIWIK_DOCUMENT_ROOT . '/themes/logo.png') && is_writeable(PIWIK_DOCUMENT_ROOT . '/themes/logo-header.png');
         $view->logosWriteable = ($logoFilesWriteable || $directoryWritable) && ini_get('file_uploads') == 1;
     }
     $view->language = Piwik_LanguagesManager::getLanguageCodeForCurrentUser();
     $this->setBasicVariablesView($view);
     $view->topMenu = Piwik_GetTopMenu();
     $view->menu = Piwik_GetAdminMenu();
     echo $view->render();
 }
开发者ID:0h546f6f78696342756e4e59,项目名称:piwik,代码行数:29,代码来源:Controller.php

示例3: privacySettings

 public function privacySettings()
 {
     Piwik::checkUserHasSomeAdminAccess();
     $view = Piwik_View::factory('privacySettings');
     if (Piwik::isUserIsSuperUser()) {
         $deleteLogs = array();
         $view->deleteLogs = $this->getDeleteLogsInfo();
         $view->anonymizeIP = $this->getAnonymizeIPInfo();
     }
     $view->language = Piwik_LanguagesManager::getLanguageCodeForCurrentUser();
     if (!Zend_Registry::get('config')->isFileWritable()) {
         $view->configFileNotWritable = true;
     }
     $this->setBasicVariablesView($view);
     $view->menu = Piwik_GetAdminMenu();
     echo $view->render();
 }
开发者ID:neolf,项目名称:PIWIK4MOBILE,代码行数:17,代码来源:Controller.php

示例4: index

 public function index()
 {
     Piwik::checkUserHasSomeAdminAccess();
     $idSite = Piwik_Common::getRequestVar('idSite', 1, 'int');
     $period = Piwik_Common::getRequestVar('period', 'day', 'string');
     $date = Piwik_Common::getRequestVar('date', 'today', 'string');
     $_GET['token_auth'] = Piwik::getCurrentUserTokenAuth();
     $reports = Piwik_API_API::getInstance()->getReportMetadata($idSite, $period, $date);
     $plot = array();
     foreach ($reports as $report) {
         if (!empty($report['imageGraphUrl'])) {
             $plot[] = array($report['category'] . ' › ' . $report['name'], Piwik::getPiwikUrl() . $report['imageGraphUrl']);
         }
     }
     $view = Piwik_View::factory('index');
     $view->titleAndUrls = $plot;
     echo $view->render();
 }
开发者ID:neolf,项目名称:PIWIK4MOBILE,代码行数:18,代码来源:Controller.php

示例5: getUsersLogin

 /**
  * Returns the list of all the users login
  * 
  * @return array the list of all the users login
  */
 public function getUsersLogin()
 {
     Piwik::checkUserHasSomeAdminAccess();
     $db = Zend_Registry::get('db');
     $users = $db->fetchAll("SELECT login \n\t\t\t\t\t\t\t\tFROM " . Piwik_Common::prefixTable("user") . " \n\t\t\t\t\t\t\t\tORDER BY login ASC");
     $return = array();
     foreach ($users as $login) {
         $return[] = $login['login'];
     }
     return $return;
 }
开发者ID:nnnnathann,项目名称:piwik,代码行数:16,代码来源:API.php

示例6: getDefaultCurrency

	/**
	 * Returns the default currency that will be set when creating a website through the API.
	 * 
	 * @return string Currency ID eg. 'USD'
	 */
	public function getDefaultCurrency()
	{
		Piwik::checkUserHasSomeAdminAccess();
		$defaultCurrency = Piwik_GetOption(self::OPTION_DEFAULT_CURRENCY);
		if($defaultCurrency)
		{
			return $defaultCurrency;
		}
		return 'USD';
	}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:15,代码来源:API.php

示例7: userEmailExists

 /**
  * Returns true if user with given email (userEmail) is known in the database
  *
  * @return bool true if the user is known
  */
 public function userEmailExists($userEmail)
 {
     Piwik::checkUserHasSomeAdminAccess();
     $count = Piwik_FetchOne("SELECT count(*) \n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM " . Piwik::prefixTable("user") . " \n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE email = ?", $userEmail);
     return $count != 0;
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:11,代码来源:API.php

示例8: getWebsiteIdsToInvalidate

 /**
  * Returns array of idSites to force re-process next time archive.php runs
  * 
  * @ignore
  * @return mixed
  */
 public static function getWebsiteIdsToInvalidate()
 {
     Piwik::checkUserHasSomeAdminAccess();
     $invalidatedIdSites = Piwik_GetOption(self::OPTION_INVALIDATED_IDSITES);
     if ($invalidatedIdSites && ($invalidatedIdSites = unserialize($invalidatedIdSites)) && count($invalidatedIdSites)) {
         return $invalidatedIdSites;
     }
     return array();
 }
开发者ID:nomoto-ubicast,项目名称:piwik,代码行数:15,代码来源:API.php


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