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


PHP util::getArg方法代码示例

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


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

示例1: array

<?php

include '../header.php';
$CUSTOM = custom::instance();
$type = util::getArg("type", "");
$id = util::getArg("id", "");
if ($CUSTOM->isPdo()) {
    $arg = array(":id" => $id);
    $argp = ":id";
} else {
    $arg = array($id);
    $argp = "\$1";
}
if ($type == "0") {
    $sql = <<<HERE
select h.handle 
from handle h
inner join item2bundle i2b on h.resource_id=i2b.item_id  
inner join bundle2bitstream b2b on i2b.bundle_id=b2b.bundle_id and b2b.bitstream_id = {$argp}
where h.resource_type_id=2
HERE;
    $handle = $CUSTOM->getQueryVal($sql, $arg);
    if ($handle != "") {
        header("Location: /handle/" . $handle);
        exit;
    }
} elseif ($type == "2") {
    $sql = <<<HERE
select h.handle 
from handle h
where h.resource_id={$argp} and h.resource_type_id=2
开发者ID:LongsightGroup,项目名称:batch-tools,代码行数:31,代码来源:getHandle.php

示例2: toolbar

 public static function toolbar()
 {
     $v = util::getArg("comm", "");
     echo "<select id='communityToolbar'>";
     util::makeOpt('allcoll', "All Collections", $v);
     foreach (self::$COMMUNITIES as $comm) {
         if ($comm->parent_comm_id == null) {
             util::makeOpt('comm' . $comm->community_id, $comm->shortname, $v);
         }
     }
     echo '</select>';
 }
开发者ID:LongsightGroup,项目名称:batch-tools,代码行数:12,代码来源:community.php

示例3: foreach

<?php

include '../header.php';
include 'solrFacets.php';
$CUSTOM = custom::instance();
$bfacet = $CUSTOM->getDSpaceVer() == "1.7" ? "" : "&facet.field=bundleName";
solrFacets::init($CUSTOM);
$comm = util::getArg("comm", "");
$coll = util::getArg("coll", "");
$time = util::getArg("time", "");
$colls = util::getArg("colls", "");
if ($time != "") {
    $time = "+AND+time:" . str_replace(" ", "+", $time);
}
$typearg = solrFacets::getTypeArg();
if ($comm != "") {
    if ($typearg == "COMMV") {
        $q = "(owningComm:" . $comm . "+OR+id:" . $comm . ")";
    } else {
        if ($typearg == "COLLV") {
            $q = "(";
            foreach (explode(",", $colls) as $col) {
                if ($q != "(") {
                    $q .= "+OR+";
                }
                $q .= "id:" . $col;
            }
            $q .= ")";
        } else {
            $q = "(";
            foreach (explode(",", $colls) as $col) {
开发者ID:LongsightGroup,项目名称:batch-tools,代码行数:31,代码来源:solrStats.php

示例4: Copyright

Copyright (c) 2013, Georgetown University Libraries All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 
in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials 
provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
include '../phpconfig/init.php';
include '../web/util.php';
$CUSTOM = custom::instance();
$root = $CUSTOM->getRoot();
$mroot = $CUSTOM->getMapRoot();
$fname = util::getArg("name", "");
$fname2 = $fname;
header("Content-type: text");
if (preg_match("/^\\d{8,8}_\\d\\d\\.\\d\\d\\.\\d\\d\$/", $fname) == 0) {
    $fname = "";
}
if ($fname != "") {
    echo file_get_contents($mroot . $fname);
} else {
    if ($fname2 != "") {
        echo "Illegal file name: " . $fname2;
    }
}
开发者ID:LongsightGroup,项目名称:batch-tools,代码行数:31,代码来源:getmapfile.php

示例5: ini_set

<?php

include '../header.php';
include 'solrFacets.php';
ini_set('max_execution_time', 120);
$CUSTOM = custom::instance();
$CUSTOM->getCommunityInit()->initCommunities();
$CUSTOM->getCommunityInit()->initCollections();
solrFacets::init($CUSTOM);
$duration = solrFacets::getDurationArg();
$type = solrFacets::getTypeArg();
$auth = solrFacets::getAuthArg();
$ip = solrFacets::getIpArg();
$scope = util::getArg("scope", "ALL");
hierarchy::initHierarchy($scope == "ALL", $scope);
$colcount = solrFacets::getDurationKey("colcount");
header('Content-type: text/html; charset=UTF-8');
?>
<html>
<head>
<?php 
$header = new LitHeader(solrFacets::getTypeKey("desc") . " for the " . solrFacets::getDurationKey("desc") . " for " . solrFacets::getAuthKey("desc") . " from " . solrFacets::getIpKey("desc"));
$header->litPageHeader();
?>

<script type="text/javascript">
var first = true;
var complete = 0;

var getStatsFunc = function(cell, tbd) {  
    var id = cell.attr("id");
开发者ID:LongsightGroup,项目名称:batch-tools,代码行数:31,代码来源:qcHierarchyStats.php

示例6: TORT

provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
include '../phpconfig/init.php';
include '../web/util.php';
$CUSTOM = custom::instance();
$hasPerm = $CUSTOM->isUserCollectionOwner();
if (!$hasPerm) {
    exit;
}
$ingestLoc = $CUSTOM->getIngestLoc();
$loc = util::getArg("loc", "");
if (preg_match("|\\.\\.|", $loc) == 1) {
    die("Location cannot contain ..");
}
$testloc = $ingestLoc . $loc;
$myDirectory = opendir($testloc);
echo $testloc;
$dirArray = array();
// get each entry
while ($entryName = readdir($myDirectory)) {
    if (substr($entryName, 0, 1) == ".") {
        continue;
    }
    if (is_dir($testloc . $entryName)) {
        $dirArray[] = $entryName;
    }
开发者ID:LongsightGroup,项目名称:batch-tools,代码行数:31,代码来源:getIngestLoc.php


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