本文整理匯總了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
示例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>';
}
示例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) {
示例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;
}
}
示例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");
示例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;
}