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


PHP urlDecode函数代码示例

本文整理汇总了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>";
开发者ID:gibranda,项目名称:simdesa,代码行数:30,代码来源:simpan_xls.php

示例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);
 }
开发者ID:3116246,项目名称:haolinju,代码行数:31,代码来源:DES.php

示例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();
     }
 }
开发者ID:Niknox,项目名称:aowow,代码行数:52,代码来源:search.php

示例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;
}
开发者ID:kanbang,项目名称:Colt,代码行数:15,代码来源:quickplotpreviewinner.php

示例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;
     }
 }
开发者ID:fornava,项目名称:oodt,代码行数:41,代码来源:ProductPageWidget.php

示例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;

  }
开发者ID:BackupTheBerlios,项目名称:freeform-frmwrk,代码行数:43,代码来源:URL.php5

示例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);
开发者ID:fornava,项目名称:oodt,代码行数:31,代码来源:pageScript.php

示例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;
 }
开发者ID:fornava,项目名称:oodt,代码行数:18,代码来源:Utils.class.php

示例9: udecode

function udecode($u)
{
    return urlDecode(base64_decode($u));
}
开发者ID:yunsite,项目名称:hhzuitu,代码行数:4,代码来源:common.php

示例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;
 }
开发者ID:jaybill,项目名称:Bolts,代码行数:11,代码来源:SignatureUtilsForOutbound.php

示例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
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:loginAjax.php

示例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);
}
开发者ID:AhmadSayadi,项目名称:kearsipan,代码行数:12,代码来源:jumlah_data_cari.php

示例13: decodeValue

 protected static function decodeValue($value)
 {
     return urlDecode($value);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:4,代码来源:TNvpSerializer.php

示例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>');
}
开发者ID:Nolfneo,项目名称:docvert,代码行数:31,代码来源:frameset.php

示例15: _upgrade_info_decode_val

function _upgrade_info_decode_val($str)
{
    return urlDecode($str);
}
开发者ID:rkania,项目名称:GS3,代码行数:4,代码来源:system_gpbx-upgrade.php


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