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


PHP Key::checkKey方法代码示例

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


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

示例1: view

 public function view()
 {
     $key = \Key::getCurrent();
     if (!\Key::checkKey($key)) {
         return;
     }
     $tpl = array();
     $allSettings = $this->settings->getAll();
     foreach ($allSettings as $key => $value) {
         if ($value == 1) {
             $tpl[$key] = "";
             // dummy template
         }
     }
     $content = \PHPWS_Template::process($tpl, 'addthis', 'addThis.tpl');
     \Layout::add($content, 'addthis', 'DEFAULT');
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:17,代码来源:AddThisView.php

示例2: keyDescriptions

 /**
  * Fills in the meta description with the current key summary.
  */
 public static function keyDescriptions()
 {
     if (!PHPWS_Settings::get('layout', 'use_key_summaries')) {
         return;
     }
     $key = Key::getCurrent();
     if (!Key::checkKey($key, false)) {
         return NULL;
     }
     if (!empty($key->summary)) {
         $GLOBALS['Layout_Description'] =& $key->summary;
     } elseif (!empty($key->title)) {
         $GLOBALS['Layout_Description'] =& $key->title;
     }
 }
开发者ID:sysulsj,项目名称:phpwebsite,代码行数:18,代码来源:Layout.php

示例3: javascript

<?php

/**
 * @author Matthew McNaney <mcnaney at gmail dot com>
 * @version $Id$
 */
Block::show();
if (Current_User::allow('block')) {
    $key = Key::getCurrent();
    if (Key::checkKey($key) && javascriptEnabled()) {
        javascript('jquery');
        javascript('ckeditor');
        $js_address = PHPWS_SOURCE_HTTP . 'mod/block/javascript/addblock/script.js';
        Layout::addJSHeader('<script src="' . $js_address . '" type="text/javascript"></script>', 'addblock');
        $modal = new \Modal('block-form-modal', '<div id="block-form-dialog"></div>', 'Add block here');
        $modal->sizeLarge();
        $save_button = '<button class="btn btn-success" id="save-block">Save</button>';
        $modal->addButton($save_button);
        Layout::add((string) $modal);
        MiniAdmin::add('block', '<a style="cursor:pointer" data-auth-key="' . Current_User::getAuthKey() . '" data-key-id="' . $key->id . '" id="add-block"><i class="fa fa-plus"></i> Add block here</a>');
    }
}
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:22,代码来源:close.php

示例4: permission

 public static function permission()
 {
     if (!isset($_REQUEST['key_id'])) {
         return;
     }
     $key = new Key((int) $_REQUEST['key_id']);
     if (!Key::checkKey($key, false)) {
         return;
     }
     if (Current_User::isRestricted($key->module) || !$key->allowEdit()) {
         Current_User::disallow();
     }
     // View permissions must be first to allow error checking
     // Edit will add its list to the view
     Users_Permission::postViewPermissions($key);
     Users_Permission::postEditPermissions($key);
     $result = $key->savePermissions();
     if (isset($_POST['popbox'])) {
         Layout::nakedDisplay(javascript('close_refresh', array('refresh' => 0)));
     } else {
         if (PHPWS_Error::logIfError($result)) {
             $_SESSION['Permission_Message'] = dgettext('users', 'An error occurred.');
         } else {
             $_SESSION['Permission_Message'] = dgettext('users', 'Permissions updated.');
         }
         PHPWS_Core::goBack();
     }
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:28,代码来源:Action.php


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