本文整理汇总了PHP中urlDecode函数的典型用法代码示例。如果您正苦于以下问题:PHP urlDecode函数的具体用法?PHP urlDecode怎么用?PHP urlDecode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了urlDecode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: urlDecode
<?php
include_once "include/koneksi.php";
include_once "include/config.php";
$sql = urlDecode($_REQUEST['sql']);
$tabel = urlDecode($_REQUEST['tbl']);
$sql_exe = mysqli_query($conn, $sql);
$no = $hal + 1;
if ($sql_exe) {
$tampil .= "<table class='listing' cellpadding='0' cellspacing='0'>";
$tampil .= "<tr>";
$jum_kolom = mysqli_num_fields($sql_exe);
$tampil .= "<th class='full'>No</th>";
$title = array();
for ($i = 0; $i < $jum_kolom; $i++) {
$nm_kolom = mysqli_fetch_field($sql_exe);
array_push($title, $nm_kolom->name);
$tampil .= "<th class='full'>" . $nm_kolom->name . "</th>";
}
$tampil .= "<th class='full' colspan='2'>Aksi</th>";
$tampil .= "</tr>";
while ($data = mysqli_fetch_row($sql_exe)) {
$tampil .= "<tr>";
$tampil .= "<td>" . $no++ . "</td>";
for ($i = 0; $i < count($data); $i++) {
$tampil .= "<td class='data' ondblclick=\"edit_inline(this,'" . $url_update . "','" . $tabel . "','" . $nama_id . "')\" title='" . $title[$i] . "'>" . $data[$i] . "</td>";
}
$tampil .= "<td class='id link' title='" . $data[1] . "'><img src='img/search.png'></td><td class='id link' title='" . $data[1] . "' onclick='hapus_data(this)'><img src='img/b_usrdrop.png' /></td>";
$tampil .= "</tr>";
}
$tampil .= "</table>";
示例2: decrypt_other_crv
public static function decrypt_other_crv($str)
{
$str = urlDecode($str);
$key = [-36, -63, 49, 37, -56, -32, 103, -85];
$keystr = '';
foreach ($key as $ch) {
$keystr .= chr($ch);
}
$str = base64_decode($str);
$strBin = $str;
// hex2bin(strtolower($str));
$td = mcrypt_module_open('des', '', 'ecb', '');
//使用MCRYPT_DES算法,cbc模式
$iv = @mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
$ks = mcrypt_enc_get_key_size($td);
@mcrypt_generic_init($td, $keystr, $iv);
//初始处理
$text = mdecrypt_generic($td, $strBin);
//解密
mcrypt_generic_deinit($td);
//结束
mcrypt_module_close($td);
$pad = ord($text[strlen($text) - 1]);
if ($pad > strlen($text)) {
return false;
}
if (strspn($text, chr($pad), strlen($text) - $pad) != $pad) {
return false;
}
return substr($text, 0, -1 * $pad);
}
示例3: __construct
public function __construct($pageCall, $pageParam)
{
$this->search = trim(urlDecode($pageParam));
$this->query = strtr($this->search, '?*', '_%');
// restricted access
if ($this->reqUGroup && !User::isInGroup($this->reqUGroup)) {
$this->error();
}
// statWeight for JSON-search
if (isset($_GET['wt']) && isset($_GET['wtv'])) {
$this->statWeight = array('wt' => explode(':', $_GET['wt']), 'wtv' => explode(':', $_GET['wtv']));
}
// select search mode
if (isset($_GET['json'])) {
if ($_ = intVal($this->search)) {
// allow for search by Id
$this->query = $_;
}
$type = isset($_GET['type']) ? intVal($_GET['type']) : 0;
if (!empty($_GET['slots'])) {
$this->searchMask |= SEARCH_TYPE_JSON | 0x40;
} else {
if ($type == TYPE_ITEMSET) {
$this->searchMask |= SEARCH_TYPE_JSON | 0x60;
} else {
if ($type == TYPE_ITEM) {
$this->searchMask |= SEARCH_TYPE_JSON | 0x40;
}
}
}
} else {
if (isset($_GET['opensearch'])) {
$this->maxResults = CFG_SQL_LIMIT_QUICKSEARCH;
$this->searchMask |= SEARCH_TYPE_OPEN | SEARCH_MASK_OPEN;
} else {
$this->searchMask |= SEARCH_TYPE_REGULAR | SEARCH_MASK_ALL;
}
}
// handle maintenance status for js-cases
if (CFG_MAINTENANCE && !User::isInGroup(U_GROUP_EMPLOYEE) && !($this->searchMask & SEARCH_TYPE_REGULAR)) {
$this->notFound();
}
parent::__construct($pageCall, $pageParam);
// just to set g_user and g_locale
// fill include, exclude and ignore
$this->tokenizeQuery();
// invalid conditions: not enough characters to search OR no types to search
if ((!$this->included || !($this->searchMask & SEARCH_MASK_ALL)) && !CFG_MAINTENANCE && !($this->searchMask & SEARCH_TYPE_JSON && intVal($this->search))) {
$this->mode = CACHE_TYPE_NONE;
$this->notFound();
}
}
示例4: GetParameters
function GetParameters($params)
{
global $scaleDenominator, $annotations;
$scaleDenominator = intval($params["scale_denominator"]);
$annotations = array();
// The parameters whose name matches this pattern will be treated as annotation
$pattern = "/^\\{field:.+\\}\$/i";
foreach ($params as $key => $value) {
if (preg_match($pattern, $key) == 1) {
$annotations[$key] = htmlspecialchars(urlDecode($value), ENT_QUOTES);
}
}
// The scale annotation
$annotations["{scale}"] = "1 : " . $scaleDenominator;
}
示例5: render
public function render($bEcho = true)
{
$str = '';
if ($this->page) {
$str .= "<table><tr><th>Product Name</th>";
$displayedElements = App::Get()->settings['browser_products_met'];
foreach ($displayedElements as $elementName) {
$str .= "<th>{$elementName}</th>";
}
$str .= "</tr>";
if (!App::Get()->settings['browser_private_products_visibility']) {
// Get a CAS-Browser XML/RPC client
$browser = new CasBrowser();
$client = $browser->getClient();
foreach ($this->pageMetadata as $key => $value) {
if ($browser->getProductVisibilityLevel($key) == "deny") {
unset($this->pageMetadata[$key]);
foreach ($this->pageProducts as $product) {
if ($product->id == $key) {
$productKey = array_search($product, $this->pageProducts);
unset($this->pageProducts[$productKey]);
}
}
}
}
}
foreach ($this->pageProducts as $product) {
$str .= "<tr><td><a href=\"" . $this->urlBase . "/product/{$product->getId()}/{$this->returnPage}\">" . urlDecode(basename($product->getName())) . "</a></td>";
foreach ($displayedElements as $elementName) {
$str .= "<td>" . $this->pageMetadata[$product->getId()]->getMetadata($elementName) . "</td>";
}
$str .= "</tr>";
}
$str .= "</table>";
}
if ($bEcho) {
echo $str;
} else {
return $str;
}
}
示例6: __construct
/**
* The sole constructor that creates a new URL from supplied location
*
* @param string $location an URL
*/
function __construct($location) {
$this->location = $location;
// Regex the url into components
preg_match(self::$regexURL, $location, $matches );
$this->protocol = (strLen(@$matches['proto']) > 0) ? strToLower(@$matches['proto']):null;
$this->user = (strLen(@$matches['user']) > 0) ? @$matches['user']:null;
$this->password = (strLen(@$matches['haspass']) > 0) ? @$matches['pass']:null;
$this->host = (strLen(@$matches['host']) > 0) ? strToLower(@$matches['host']):null;
//Should we get concerned on default port?
// $this->port = ( ! isSet($matches['port'])) ? getProtoByName($matches['proto']) : $matches['port'];
$this->port = (strLen(@$matches['port']) > 0) ? @$matches['port']:null;
$this->path = rtrim(@$matches['path'],($this->resource = baseName(@$matches['path'])));
//$this->resource = baseName(@$matches['path']);
// $this->path = (strLen(@$matches['path']) > 1) ? str_replace('\\', '/', dirName(@$matches['path'])) . '/' : '';
// $this->resource = baseName(@$matches['path']);
preg_match('~(?P<ext>\.[^.]*)~',$this->resource,$extmatches);
$this->extension = @$extmatches['ext'];
$this->ref = (strLen(@$matches['ref']) > 0) ? @$matches['ref']:null;
//keep query as an array
if (( strLen(@$matches['hasquery']) > 1) )
foreach(explode('&', $matches['query']) as $q) {
list($name,$value) = @explode('=', $q, 2);
if (strLen($name) > 0) {
$this->query[$name] = ($value = urlDecode($value)) ? $value:'';
}
}
else
$this->query = null;
}
示例7: catch
try {
$page = Utils::getPage($type, $pageNum);
} catch (Exception $e) {
Utils::reportError($e->getMessage(), $outputFormat);
}
// Get the products from the requested page -- what we're really after
$pageProducts = array();
foreach ($page->getPageProducts() as $p) {
array_push($pageProducts, array('product' => $p));
}
// Format results
if ($outputFormat == 'html') {
$payload = '<ul class="pp_productList" id="product_list">';
foreach ($pageProducts as $p) {
$payload .= '<li><a href="' . $module->moduleRoot . '/product/' . $p['product']->getId() . '">';
$payload .= urlDecode($p['product']->getName()) . '</a></li>';
}
$payload .= "</ul>\n";
$payload .= '<input type="hidden" id="total_pages" value="' . $page->getTotalPages() . '">';
$payload .= '<input type="hidden" id="page_size" value="' . $page->getPageSize() . '">';
} elseif ($outputFormat == 'json') {
$payload = array();
try {
$payload['results'] = Utils::formatResults($pageProducts);
$payload['totalProducts'] = $client->getNumProducts($type);
} catch (Exception $e) {
Utils::reportError($e->getMessage(), $outputFormat);
}
$payload['totalPages'] = $page->getTotalPages();
$payload['pageSize'] = $page->getPageSize();
$payload = json_encode($payload);
示例8: formatResults
public static function formatResults($products)
{
$cb = new CasBrowser();
$client = $cb->getClient();
$results = array();
foreach ($products as $product) {
try {
$p = array('id' => $product['product']->getId(), 'name' => urlDecode($product['product']->getName()), 'metadata' => $client->getMetadata($product['product'])->toAssocArray());
if (isset($product['typeName'])) {
$p['type'] = $product['typeName'];
}
array_push($results, $p);
} catch (Exception $e) {
throw new CasBrowserException("An error occured while formatting product [" . $product['product']->getId() . "] metadata: " . $e->getMessage());
}
}
return $results;
}
示例9: udecode
function udecode($u)
{
return urlDecode(base64_decode($u));
}
示例10: getRequestURI
private static function getRequestURI($endPoint)
{
$url = parse_url($endPoint);
$requestURI = $url['path'];
if ($requestURI == null || $requestURI == self::EMPTY_STRING) {
$requestURI = "/";
} else {
$requestURI = urlDecode($requestURI);
}
return $requestURI;
}
示例11: Services_JSON
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
//G::LoadSystem('json');
require_once PATH_THIRDPARTY . 'pear/json/class.json.php';
$json = new Services_JSON();
$G_FORM = new form(G::getUIDName(urlDecode($_POST['form'])));
$G_FORM->id = urlDecode($_POST['form']);
$G_FORM->values = $_SESSION[$G_FORM->id];
$newValues = $json->decode(urlDecode(stripslashes($_POST['fields'])));
//Resolve dependencies
//Returns an array ($dependentFields) with the names of the fields
//that depends of fields passed through AJAX ($_GET/$_POST)
$dependentFields = array();
for ($r = 0; $r < sizeof($newValues); $r++) {
$newValues[$r] = (array) $newValues[$r];
$G_FORM->setValues($newValues[$r]);
//Search dependent fields
foreach ($newValues[$r] as $k => $v) {
$myDependentFields = explode(',', $G_FORM->fields[$k]->dependentFields);
$dependentFields = array_merge($dependentFields, $myDependentFields);
}
}
$dependentFields = array_unique($dependentFields);
//Parse and update the new content
示例12: urlDecode
<?php
include_once "include/koneksi.php";
// untuk update data
//$tabel = $_REQUEST['tabel'];
$sql = urlDecode($_REQUEST['sql']);
$sql = stripslashes($sql);
// hapus tanda /
$sql_exe = mysql_query($sql);
if ($sql_exe) {
echo mysql_num_rows($sql_exe);
}
示例13: decodeValue
protected static function decodeValue($value)
{
return urlDecode($value);
}
示例14: die
<?php
if (!isset($_GET['path'])) {
die('This script is for displaying an HTML frameset and must be called with a URL parameter. It\'s not for direct access, it\'s called on document previews.');
}
$pathToUse = ensureOnlyValidCharacters(urlDecode($_GET['path']));
$pathToUse = str_replace('\\', '/', $pathToUse) . '/';
$pathToUse = str_replace('/', DIRECTORY_SEPARATOR, $pathToUse);
$thereIsAPreview = file_exists($pathToUse . 'test.html');
$configFilenamesPath = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'custom-filenames.php';
include_once $configFilenamesPath;
$customFileNames = getCustomFilenames();
$chosenFile = null;
$filesToDisplay = array($customFileNames[0], 'index.*', 'default.*', '*.odt');
foreach ($filesToDisplay as $fileToDisplay) {
$possibleFile = getFirstByPattern($pathToUse . $fileToDisplay);
if ($possibleFile) {
$chosenFile = $possibleFile;
break;
}
}
if (!$chosenFile) {
$filesToDisplayAsString = null;
foreach ($filesToDisplay as $fileToDisplay) {
$filesToDisplayAsString .= '"' . $fileToDisplay . '", ';
}
$filesToDisplayAsString = trim($filesToDisplayAsString);
$filesToDisplayAsString = substr($filesToDisplayAsString, 0, strlen($filesToDisplayAsString) - 1);
$filesInPreviewDirectory = glob($pathToUse . '*');
die('Docvert or pipeline error: Unable to determine the file to preview. I searched for the filename patterns ' . $filesToDisplayAsString . ' were tested but do not exist. Was given pathToUse of <tt>"' . $pathToUse . '"</tt> which contained <pre>' . revealXml(print_r($filesInPreviewDirectory, true)) . '</pre>');
}
示例15: _upgrade_info_decode_val
function _upgrade_info_decode_val($str)
{
return urlDecode($str);
}