• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getID函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getID函数的典型用法代码示例。如果您正苦于以下问题:PHP getID函数的具体用法?PHP getID怎么用?PHP getID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: get

function get($id)
{
    $id = getID($id);
    static $q = null;
    \cf\createStaticQuery($q, "SELECT id, code, name, action, method, template FROM cf_form WHERE id=:id");
    $form = \cf\query2array($q, array('id' => $id));
    if ($form['template']) {
        $form['template'] = \cf\query2array("\n\t\t\tSELECT name, subject, recipient, body \n\t\t\tFROM cf_mail_templates \n\t\t\tWHERE id=:id", array('id' => $form['template']));
    } else {
        $form['template'] = false;
    }
    static $qFields = null;
    \cf\createStaticQuery($qFields, "\n\t\tSELECT code,type,name,fmt,descr,mandatory,max_length,min_length,value\n\t\tFROM cf_form_field\n\t\tWHERE form_id=:id\n\t\tORDER BY sort_order\n\t");
    $form['fields'] = \cf\query2arrays($qFields, array('id' => $id), false, 'code');
    foreach ($form['fields'] as &$f) {
        $f['code'] = $form['code'] . '[' . $f['code'] . ']';
        if ($f['type'] == 'radio' || $f['type'] == 'checkbox') {
            $f['options'] = array();
            foreach (explode(';', $f['fmt']) as $option) {
                $f['options'][] = trim($option);
            }
        }
    }
    return $form;
}
开发者ID:sd-studio,项目名称:sh,代码行数:25,代码来源:form.php


示例2: getDuoshuoScript

    public function getDuoshuoScript()
    {
        $short_name = $this->getConf('shortname');
        $wiki_id = getID();
        $wiki_title = tpl_pagetitle($wiki_id, true);
        $host = $_SERVER['HTTPS'] ? "https" : "http";
        $host = $host . "://" . $_SERVER['SERVER_NAME'];
        $wiki_url = $host . wl($wiki_id);
        $doc = '
        <!-- 多说评论框 start -->
    <div class="ds-thread" data-thread-key="" data-title="' . $wiki_title . '" data-url="' . $wiki_url . '"></div>
<!-- 多说评论框 end -->
<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
<script type="text/javascript">
var duoshuoQuery = {short_name:"' . $short_name . '"};
    (function() {
        var ds = document.createElement("script");
        ds.type = "text/javascript";ds.async = true;
        ds.src = (document.location.protocol == "https:" ? "https:" : "http:") + "//static.duoshuo.com/embed.js";
        ds.charset = "UTF-8";
        (document.getElementsByTagName("head")[0] 
         || document.getElementsByTagName("body")[0]).appendChild(ds);
    })();
    </script>
<!-- 多说公共JS代码 end -->';
        return $doc;
    }
开发者ID:xudianyang,项目名称:wiki.phpboy.net,代码行数:27,代码来源:syntax.php


示例3: Component

 /**
  * @param toiminto Toiminnon nimi jossa kyseinen komponentti sijaitsee.
  */
 function Component($toiminto)
 {
     $this->ID = getID(get_class($this));
     $this->TM = TranslationManager::instance();
     $this->toiminto = $toiminto;
     $_SESSION['IDS'][$this->ID] = 1;
 }
开发者ID:kaartine,项目名称:Rysty,代码行数:10,代码来源:component.php


示例4: loadService

 /**
  * Load the needed libraries and initialize the named oAuth service
  *
  * @param string $servicename
  * @return null|\OAuth\Plugin\AbstractAdapter
  */
 public function loadService(&$servicename)
 {
     $id = getID();
     // $ID isn't set in trustExternal, yet
     $servicename = preg_replace('/[^a-zA-Z_]+/', '', $servicename);
     if (!$servicename) {
         return null;
     }
     require_once __DIR__ . '/phpoauthlib/src/OAuth/bootstrap.php';
     require_once __DIR__ . '/classes/AbstractAdapter.php';
     require_once __DIR__ . '/classes/oAuthHTTPClient.php';
     require_once __DIR__ . '/classes/oAuthStorage.php';
     $file = __DIR__ . '/classes/' . $servicename . 'Adapter.php';
     if (!file_exists($file)) {
         return null;
     }
     require_once $file;
     $class = '\\OAuth\\Plugin\\' . $servicename . 'Adapter';
     /** @var \OAuth\Plugin\AbstractAdapter $service */
     $service = new $class($this->redirectURI());
     if (!$service->isInitialized()) {
         msg("Failed to initialize {$service} authentication service. Check credentials", -1);
         return null;
     }
     // The generic service can be externally configured
     if (is_a($service->oAuth, 'OAuth\\OAuth2\\Service\\Generic')) {
         $service->oAuth->setAuthorizationEndpoint($this->getAuthEndpoint($servicename));
         $service->oAuth->setAccessTokenEndpoint($this->getTokenEndpoint($servicename));
     }
     return $service;
 }
开发者ID:ZeusWPI,项目名称:dokuwiki-plugin-oauth,代码行数:37,代码来源:helper.php


示例5: get

function get($id)
{
    $id = getID($id);
    static $q = null;
    \cf\createStaticQuery($q, "SELECT IFNULL(code,id) AS id, file, file_name, file FROM cf_file WHERE id=:id");
    return \cf\query2array($q, array('id' => $id));
}
开发者ID:sd-studio,项目名称:sh,代码行数:7,代码来源:file.php


示例6: isBlog

function isBlog()
{
    if (getRootNS(getID()) == 'blog' || noNSorNS(getID()) == 'blog') {
        return true;
    } else {
        return false;
    }
}
开发者ID:pietersartain,项目名称:dokuwiki-template-lookingforme,代码行数:8,代码来源:main.php


示例7: Add

function Add($No, $isLast, $pdo)
{
    $id = getID($No, $pdo);
    $data = Fetch_Data($id, $pdo);
    $last = $isLast;
    $name = $data['Name'];
    $phone = $data['phone'];
    $email = $data['email'];
    memberList($No, $id, $name, $phone, $email, $last);
}
开发者ID:CPE16,项目名称:web_swe,代码行数:10,代码来源:member.php


示例8: checkNS

function checkNS($ns)
{
    // This tests for root NS or pagename
    //if ( (getRootNS(getID()) == $ns) || (noNSorNS(getID()) == $ns ) ) {
    // This version just tests the namespace, not a pagename.
    if (getRootNS(getID()) == $ns) {
        return true;
    }
    return false;
}
开发者ID:pietersartain,项目名称:dokuwiki-template-projectchorus,代码行数:10,代码来源:main.php


示例9: getSearchObject

 function getSearchObject()
 {
     list($sParamName, $sParamValue, $sParamValue1, $sParamValue2, $sParamValue3) = $this->aAddParams;
     bx_import('Search', $this->oModule->_aModule);
     $sClassName = $this->oConfig->getClassPrefix() . 'Search';
     $oSearch = new $sClassName($sParamValue, $sParamValue1, $sParamValue2, $sParamValue3);
     if (!empty($sParamValue) && !empty($sParamValue1) && isset($oSearch->aCurrent['restriction'][$sParamValue])) {
         $oSearch->aCurrent['restriction'][$sParamValue]['value'] = 'owner' == $sParamValue ? getID($sParamValue1) : $sParamValue1;
     }
     return $oSearch;
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:11,代码来源:BxDolFilesPageAlbumsOwner.php


示例10: determineLang

 protected function determineLang()
 {
     /** @var helper_plugin_translation $trans */
     $trans = plugin_load('helper', 'translation');
     if ($trans) {
         $value = $trans->getLangPart(getID());
         if ($value) {
             return $value;
         }
     }
     global $conf;
     return $conf['lang'];
 }
开发者ID:endoanaconda,项目名称:dokuwiki-plugin-data,代码行数:13,代码来源:helper.php


示例11: onInitLangLoad

 public function onInitLangLoad(Doku_Event $event, $param = null)
 {
     $id = getID();
     if (page_exists($id)) {
         return;
     }
     $page = $this->getActivity($id);
     if ($page instanceof \SimpleXMLElement && $page->attributes()->redirect == 'true' && !empty($page->attributes()->new_id)) {
         header("HTTP/1.1 301 Moved Permanently");
         header("Location: " . wl($page->attributes()->new_id));
         die;
     }
     // else just notify spiders page does not exist 404, instead of 200
     header("HTTP/1.1 404 Not Found");
 }
开发者ID:yurii-github,项目名称:dokuwiki-plugin-yktools,代码行数:15,代码来源:redirect.php


示例12: handle_ajax_call_unknown

 /**
  * [Custom event handler which performs action]
  *
  * @param Doku_Event $event event object by reference
  * @param mixed $param [the parameters passed as fifth argument to register_hook() when this
  *                           handler was registered]
  * @return void
  */
 public function handle_ajax_call_unknown(Doku_Event &$event, $param)
 {
     if ($event->data != 'rating') {
         return;
     }
     $event->preventDefault();
     $event->stopPropagation();
     global $ID;
     $ID = getID();
     // let the other handler do it
     $this->handle_vote($event, $param);
     /** @var helper_plugin_rating $hlp */
     $hlp = plugin_load('helper', 'rating');
     $hlp->tpl(true);
 }
开发者ID:cosmocode,项目名称:dokuwiki-plugin-rating,代码行数:23,代码来源:action.php


示例13: test3

 /**
  * getID with given id in url and userewrite=2, no basedir set, dokuwiki not in document root.
  */
 function test3()
 {
     global $conf;
     $conf['basedir'] = '';
     $conf['userewrite'] = '2';
     $conf['baseurl'] = '';
     $_SERVER['DOCUMENT_ROOT'] = '/var/www/';
     $_SERVER['SCRIPT_FILENAME'] = '/usr/share/dokuwiki/doku.php';
     $_SERVER['SCRIPT_NAME'] = '/dokuwiki/doku.php';
     $_SERVER['REQUEST_URI'] = '/dokuwiki/doku.php/wiki:dokuwiki';
     $_SERVER['PATH_INFO'] = '/wiki:dokuwiki';
     $_SERVER['PATH_TRANSLATED'] = '/var/www/wiki:dokuwiki';
     $_SERVER['PHP_SELF'] = '/dokuwiki/doku.php/wiki:dokuwiki';
     $this->assertEqual(getID(), 'wiki:dokuwiki');
 }
开发者ID:pyfun,项目名称:dokuwiki,代码行数:18,代码来源:pageutils_getid.test.php


示例14: getUserLocation

 function getUserLocation($sUser, $sPwd, $sNick)
 {
     if (!($iId = BxDolXMLRPCUtil::checkLogin($sUser, $sPwd))) {
         return new xmlrpcresp(new xmlrpcval(array('error' => new xmlrpcval(1, "int")), "struct"));
     }
     $iProfileId = getID($sNick, false);
     $aLocation = BxDolService::call('wmap', 'get_location', array('profiles', $iProfileId, $iId));
     if (-1 == $aLocation) {
         return new xmlrpcval("-1");
     }
     if (!is_array($aLocation)) {
         return new xmlrpcval("0");
     }
     return new xmlrpcval(array('lat' => new xmlrpcval($aLocation['lat']), 'lng' => new xmlrpcval($aLocation['lng']), 'zoom' => new xmlrpcval($aLocation['zoom']), 'type' => new xmlrpcval($aLocation['type']), 'address' => new xmlrpcval($aLocation['address']), 'country' => new xmlrpcval($aLocation['country'])), 'struct');
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:15,代码来源:BxDolXMLRPCUser.php


示例15: search

function search($term)
{
    global $name, $path, $TweetsPulled, $TweetsAnalyzed, $tweets;
    $name = $term;
    $path = "Cache Files/cache" . $name . ".txt";
    $id = getID($name);
    $pic = getProfilePic($id, $name);
    $max_id = getNextID($path);
    //gets next tweet to cache, creates file if new cache to be made
    $tweets = getTweets($name, $id, $TweetsPulled, $max_id);
    if (!isset($tweets) || count($tweets) < 1) {
        echo "<script> alert('Bad Twitter Handle'); </script>";
        return;
    }
    $res = parseData($tweets, $TweetsAnalyzed);
}
开发者ID:abapat,项目名称:Tweemo-PHP,代码行数:16,代码来源:process.php


示例16: handle_ajax_call_acl

 /**
  * AJAX call handler for ACL plugin
  *
  * @param Doku_Event $event  event object by reference
  * @param mixed $param  empty
  * @return void
  */
 public function handle_ajax_call_acl(Doku_Event &$event, $param)
 {
     if ($event->data !== 'plugin_acl') {
         return;
     }
     $event->stopPropagation();
     $event->preventDefault();
     global $ID;
     global $INPUT;
     if (!auth_isadmin()) {
         echo 'for admins only';
         return;
     }
     if (!checkSecurityToken()) {
         echo 'CRSF Attack';
         return;
     }
     $ID = getID();
     /** @var $acl admin_plugin_acl */
     $acl = plugin_load('admin', 'acl');
     $acl->handle();
     $ajax = $INPUT->str('ajax');
     header('Content-Type: text/html; charset=utf-8');
     if ($ajax == 'info') {
         $acl->_html_info();
     } elseif ($ajax == 'tree') {
         $ns = $INPUT->str('ns');
         if ($ns == '*') {
             $ns = '';
         }
         $ns = cleanID($ns);
         $lvl = count(explode(':', $ns));
         $ns = utf8_encodeFN(str_replace(':', '/', $ns));
         $data = $acl->_get_tree($ns, $ns);
         foreach (array_keys($data) as $item) {
             $data[$item]['level'] = $lvl + 1;
         }
         echo html_buildlist($data, 'acl', array($acl, '_html_list_acl'), array($acl, '_html_li_acl'));
     }
 }
开发者ID:wernerflamme,项目名称:dokuwiki,代码行数:47,代码来源:action.php


示例17: getAllMembersSQL

function getAllMembersSQL($groupName, $grouptype)
{
    if ($grouptype == "InGame") {
        $groupName2 = str_replace(" ", "+", $groupName);
        $groupID = (int) getID($groupName2)["ownerID"];
        $isCorp = (int) getID($groupName2)["ownerGroupID"];
        if ($isCorp == 2) {
            return ' AND (corporationName ="' . $groupName . '") ';
        } else {
            if ($isCorp == 32) {
                return ' AND (allianceName ="' . $groupName . '") ';
            } else {
                if ($isCorp == 1) {
                    return ' AND (characterName ="' . $groupName . '") ';
                } else {
                    echo "No Corp or Alliance with this name exists, please check spelling.";
                }
            }
        }
    } elseif ($grouptype == "rischwa") {
        $groupName = str_replace("+", " ", $groupName);
        return getCoalitonAlliances($groupName);
    }
}
开发者ID:Shegox,项目名称:WatchListForEvE,代码行数:24,代码来源:addSuperCapPilots.php


示例18: bx_import

/**
 * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
 * CC-BY License - http://creativecommons.org/licenses/by/3.0/
 */
require_once '../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'profiles.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
bx_import('BxRSS');
bx_import('BxDolAdminDashboard');
define('BX_DOL_ADMIN_INDEX', 1);
$bLogged = isLogged();
$bNeedCheck = $bLogged && isAdmin() && $_POST['relocate'] && strncasecmp($_POST['relocate'], BX_DOL_URL_ADMIN . 'license.php', strlen(BX_DOL_URL_ADMIN . 'license.php')) == 0;
if ($bNeedCheck || isset($_POST['ID']) && isset($_POST['Password'])) {
    $iId = getID($_POST['ID']);
    $sPassword = process_pass_data($_POST['Password']);
    if (!$bLogged) {
        $oZ = new BxDolAlerts('profile', 'before_login', 0, 0, array('login' => $iId, 'password' => $sPassword, 'ip' => getVisitorIP()));
        $oZ->alert();
    }
    if ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
        echo check_password($iId, $sPassword, BX_DOL_ROLE_ADMIN, false) ? 'OK' : 'Fail';
    } else {
        if ($bNeedCheck || check_password($iId, $sPassword, BX_DOL_ROLE_ADMIN)) {
            if ($_POST['relocate'] && (strncasecmp($_POST['relocate'], BX_DOL_URL_ROOT, strlen(BX_DOL_URL_ROOT)) == 0 || strncasecmp($_POST['relocate'], BX_DOL_URL_ADMIN . 'license.php', strlen(BX_DOL_URL_ADMIN . 'license.php')) == 0)) {
                $sUrlRelocate = $_POST['relocate'];
            } else {
                $sUrlRelocate = BX_DOL_URL_ADMIN . 'index.php';
            }
            $sUrlRelocate = bx_html_attribute($sUrlRelocate);
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:31,代码来源:index.php


示例19: SetCookieFromFriend

/**
 * Friend's member authentocation and setting up cookies
 **/
function SetCookieFromFriend()
{
    global $en_aff;
    if ($en_aff && $_GET['idFriend']) {
        $idFriend = getID($_GET['idFriend'], 1);
        if ($idFriend) {
            setcookie("idFriend", $idFriend, time() + 10000 * 3600, "/");
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:13,代码来源:design.inc.php


示例20: define

define('DOKU_MEDIADETAIL', 1);
require_once DOKU_INC . 'inc/init.php';
//close session
session_write_close();
$IMG = getID('media');
$ID = cleanID($INPUT->str('id'));
if ($conf['allowdebug'] && $INPUT->has('debug')) {
    print '<pre>';
    foreach (explode(' ', 'basedir userewrite baseurl useslash') as $x) {
        print '$' . "conf['{$x}'] = '" . $conf[$x] . "';\n";
    }
    foreach (explode(' ', 'DOCUMENT_ROOT HTTP_HOST SCRIPT_FILENAME PHP_SELF ' . 'REQUEST_URI SCRIPT_NAME PATH_INFO PATH_TRANSLATED') as $x) {
        print '$' . "_SERVER['{$x}'] = '" . $_SERVER[$x] . "';\n";
    }
    print "getID('media'): " . getID('media') . "\n";
    print "getID('media',false): " . getID('media', false) . "\n";
    print '</pre>';
}
$ERROR = false;
// check image permissions
$AUTH = auth_quickaclcheck($IMG);
if ($AUTH >= AUTH_READ) {
    // check if image exists
    $SRC = mediaFN($IMG);
    if (!@file_exists($SRC)) {
        //doesn't exist!
        header("HTTP/1.0 404 File not Found");
        $ERROR = 'File not found';
    }
} else {
    // no auth
开发者ID:neosunchess,项目名称:dokuwiki,代码行数:31,代码来源:detail.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getIMG函数代码示例发布时间:2022-05-15
下一篇:
PHP getHttpResponsePOST函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap