當前位置: 首頁>>代碼示例>>PHP>>正文


PHP security::esc_url方法代碼示例

本文整理匯總了PHP中security::esc_url方法的典型用法代碼示例。如果您正苦於以下問題:PHP security::esc_url方法的具體用法?PHP security::esc_url怎麽用?PHP security::esc_url使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在security的用法示例。


在下文中一共展示了security::esc_url方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: list

?>
</td>
    <td align='center' class='header'><?php 
echo RATIO;
?>
</td>
    <td align='center' class='header'>S</td>
    <td align='center' class='header'>L</td>
    <td align='center' class='header'>C</TD>
</tr>

<?php 
$anq->free();
$anq = $db->query("SELECT history.uid FROM history INNER JOIN namemap ON history.infohash = namemap.info_hash WHERE history.uid = " . $id . " AND history.date IS NOT NULL ORDER BY date DESC");
if ($anq->num_rows > 0) {
    list($pagertop, $limit) = misc::pager($utorrents == 0 ? 15 : $utorrents, $anq->num_rows, security::esc_url($_SERVER["PHP_SELF"]) . "?id=" . $id . "&", array("pagename" => "historypage"));
    $anq = $db->query("SELECT namemap.filename, namemap.size, namemap.info_hash, history.active, history.agent, history.downloaded, history.uploaded, summary.seeds, summary.leechers, summary.finished\n    FROM history INNER JOIN namemap ON history.infohash = namemap.info_hash INNER JOIN summary ON summary.info_hash = namemap.info_hash WHERE history.uid = " . $id . " AND history.date IS NOT NULL ORDER BY date DESC " . $limit);
    print "<div align='center'>" . $pagertop . "</div>";
    while ($torlist = $anq->fetch_object()) {
        print "\n<tr>\n<td class='lista'><a href='details.php?id=" . $torlist->info_hash . "'>" . security::html_safe(unesc($torlist->filename)) . "</td>";
        print "\n<td class='lista' align='center'>" . misc::makesize((int) $torlist->size) . "</td>";
        print "\n<td class='lista' align='center'>" . security::html_safe($torlist->agent) . "</td>";
        print "\n<td align='center' class='lista'>" . ($torlist->active == 'yes' ? ACTIVATED : 'Stopped') . "</td>";
        print "\n<td align='center' class='lista'>" . misc::makesize((double) $torlist->downloaded) . "</td>";
        print "\n<td align='center' class='lista'>" . misc::makesize((double) $torlist->uploaded) . "</td>";
        if ($torlist->downloaded > 0) {
            $peerratio = number_format((double) $torlist->uploaded / (double) $torlist->downloaded, 2);
        } else {
            $peerratio = "&infin;";
        }
        print "\n<td align='center' class='lista'>" . unesc($peerratio) . "</td>";
開發者ID:Q8HMA,項目名稱:BtiTracker-1.5.1,代碼行數:31,代碼來源:userdetails.php

示例2: dirname

<?php

/*
* BtiTracker v1.5.1 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2015 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
standardheader('Edit Torrents');
$scriptname = security::esc_url($_SERVER["PHP_SELF"]);
$link = unesc($_GET["returnto"]);
if ($link == "") {
    $link = "details.php?id=" . $row["info_hash"];
}
if (isset($_POST["comment"]) && isset($_POST["name"])) {
    if ($_POST["action"] == FRM_CONFIRM) {
        if ($_POST["name"] == '') {
            err_msg("Error!", "You must specify torrent name.");
            stdfoot();
            exit;
        }
        if ($_POST["comment"] == '') {
            err_msg("Error!", "You must specify description.");
            stdfoot();
            exit;
        }
        $fname = sqlesc(security::html_safe($_POST["name"]));
        $torhash = AddSlashes($_POST["info_hash"]);
        write_log("Modified torrent " . $fname . " (" . $torhash . ")", "modify");
開發者ID:Q8HMA,項目名稱:BtiTracker-1.5.1,代碼行數:31,代碼來源:edit.php

示例3: dirname

<?php

/*
* BtiTracker v1.5.1 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2015 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
$scriptname = security::esc_url($_SERVER['PHP_SELF']);
$addparam = '';
dbconn();
standardheader('Torrents');
if (!user::$current || user::$current["view_torrents"] != "yes") {
    err_msg(ERROR . NOT_AUTHORIZED . " " . MNU_TORRENT . "!", SORRY . "...");
    stdfoot();
    exit;
}
block_begin(MNU_TORRENT);
if (isset($_GET["search"])) {
    $trova = security::html_safe(str_replace("+", " ", $_GET["search"]));
} else {
    $trova = '';
}
?>
<p align='center'>
<form action='<?php 
$scriptname;
?>
' method='get'>
   <table border='0' class='lista' align='center'>
開發者ID:Q8HMA,項目名稱:BtiTracker-1.5.1,代碼行數:31,代碼來源:torrents.php

示例4: tabella

function tabella($action, $dati = array())
{
    global $idflag, $link, $idlangue, $idstyle, $db, $USE_IMAGECODE;
    ?>
    <center>
    <p>
	
    <form name="utente" method="post" OnSubmit="return FormControl('<?php 
    echo $action;
    ?>
')" action="<?php 
    echo security::esc_url($_SERVER['PHP_SELF']) . "?act=" . $action . "&returnto=" . urlencode($link);
    ?>
">
    <input type="hidden" name="act" value="<?php 
    echo $action;
    ?>
" />
    <input type="hidden" name="uid" value="<?php 
    echo (int) $dati["id"];
    ?>
" />
    <input type="hidden" name="returnto" value="<?php 
    echo urlencode($link);
    ?>
 "/>
    <input type="hidden" name="language" value="<?php 
    echo $idlangue;
    ?>
 "/>
    <input type="hidden" name="style" value="<?php 
    echo $idstyle;
    ?>
 "/>
    <input type="hidden" name="flag" value="<?php 
    echo $idflag;
    ?>
 "/>
    <input type="hidden" name="username" value="<?php 
    echo security::html_safe($dati["username"]);
    ?>
"/>
    <table width="60%" border="0" class="lista">
    <tr>
    <td align="left" class="header"><?php 
    echo USER_NAME;
    ?>
: </td>
    <td align="left" class="lista">
    <?php 
    if ($action == "mod" || $action == "del") {
        print "\n<input type='text' size='40' name='user' value='" . security::html_safe(unesc($dati['username'])) . "' " . ($action == "mod" ? "" : "readonly") . " />";
    } else {
        print "\n<input type='text' size='40' name='user' />";
    }
    ?>
    </td>
    </tr>
    <?php 
    if (user::$current["uid"] == $dati["id"] && $action == "mod" || $action == "signup" || user::$current["edit_users"] == "yes" && $action == "mod") {
        ?>
    <tr>
    <td align="left" class="header"><?php 
        echo USER_PWD;
        ?>
:</td>
    <td align="left" class="lista"><input type="password" size="40" name="pwd" /></td>
    </tr>
    <tr>
    <td align="left" class="header"><?php 
        echo USER_PWD_AGAIN;
        ?>
:</td>
    <td align="left" class="lista"><input type="password" size="40" name="pwd1" /></td>
    </tr>
    <tr>
    <td align="left" class="header"><?php 
        echo USER_EMAIL;
        ?>
:</td>
    <td align="left" class="lista"><input type="text" size="30" name="email" value="<?php 
        if ($action == "mod") {
            echo security::html_safe($dati['email']);
        }
        ?>
"/></td>
    </tr>
    <?php 
        $lres = Cached::language_list();
        print "<tr>\n\t<td align='left' class='header'>" . USER_LANGUE . ":</td>";
        print "\n\t<td align='left' class='lista'><select name='language'>";
        foreach ($lres as $langue) {
            $option = "\n<option ";
            if ($langue["id"] == $dati["language"]) {
                $option .= "selected='selected' ";
            }
            $option .= "value='" . (int) $langue["id"] . "'>" . security::html_safe($langue["language"]) . "</option>";
            print $option;
        }
        print "</select></td>\n</tr>";
//.........這裏部分代碼省略.........
開發者ID:Q8HMA,項目名稱:BtiTracker-1.5.1,代碼行數:101,代碼來源:account.php


注:本文中的security::esc_url方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。