• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getRequestVar函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getRequestVar函数的典型用法代码示例。如果您正苦于以下问题:PHP getRequestVar函数的具体用法?PHP getRequestVar怎么用?PHP getRequestVar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: FormSitePdfConfig

 function FormSitePdfConfig(&$template, $siteAdmin, $pdfId = null)
 {
     parent::Form($template);
     $this->siteAdmin = $siteAdmin;
     $confpdf = new PdfConfigDb($siteAdmin);
     $this->tpl->assign('choix_pdf', $confpdf->getChoixPdf());
     $this->tpl->assign('default_pdf', $confpdf->getDefaultPdf());
     $this->tpl->assign('siteAdmin', $siteAdmin);
     $this->tpl->assign('pdfId', $pdfId);
     // case modify a pdf
     if (!is_null($pdfId)) {
         $o_pdf = $confpdf->getPdf($pdfId);
         $setDefault = getRequestVar("default", "false", "string");
         if ($setDefault == "true") {
             $o_pdf->pdfParam = $confpdf->getDefaultPdf();
         }
         $this->pdfId = $pdfId;
         $this->pdfName = $o_pdf->pdfName;
         $this->pdfParam = $o_pdf->pdfParam;
         $this->tpl->assign('pdf', $o_pdf);
     } else {
         // Add PDF : add a blank page
         //$paramPdf = array(array (PDF_KEY_FREE_PAGE, "false", "false"));
         $paramPdf = array();
         $o_pdf = new PdfConfig("", $paramPdf, "");
         $this->tpl->assign('pdf', $o_pdf);
     }
 }
开发者ID:ber5ien,项目名称:www.jade-palace.co.uk,代码行数:28,代码来源:FormSitePdfConfig.class.php


示例2: getLatest

 function getLatest()
 {
     $cat = getRequestVar('mainGenre');
     if (empty($cat)) {
         $cat = getRequestVar('c');
     }
     if (!empty($cat)) {
         $request = "/browse";
         if (strpos($request, "?")) {
             $request .= "&c=" . $cat;
         } else {
             $request .= "?c=" . $cat;
         }
     } else {
         $request = "/?do=latest";
     }
     if (!empty($this->pg)) {
         if (strpos($request, "?")) {
             $request .= "&p=" . $this->pg;
         } else {
             $request .= "?p=" . $this->pg;
         }
     }
     $request .= "&o=72";
     // Sort Newest to Oldest
     //$request .= "&o=52";  // Sort Most Seeded
     if ($this->makeRequest($request)) {
         return $this->parseResponse();
     } else {
         return $this->msg;
     }
 }
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:32,代码来源:btJunkieEngine.php


示例3: performSearch

 function performSearch($searchTerm)
 {
     if ($searchTerm == "") {
         $request = "/";
     } else {
         $searchTerm = str_replace(" ", "+", $searchTerm);
         $request = "/search.php?terms=" . $searchTerm;
     }
     $cat = getRequestVar("cat");
     if (empty($cat)) {
         $cat = getRequestVar("mainGenre");
     }
     if (!empty($cat)) {
         if (strpos($request, "?")) {
             $request .= "&cat=" . $cat;
         } else {
             $request .= "?cat=" . $cat;
         }
     }
     if (!empty($this->pg)) {
         if (strpos($request, "?")) {
             $request .= "&page=" . $this->pg;
         } else {
             $request .= "?page=" . $this->pg;
         }
     }
     if ($this->makeRequest($request)) {
         return $this->parseResponse();
     } else {
         return $this->msg;
     }
 }
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:32,代码来源:TokyoToshoEngine.php


示例4: needAPdf

 function needAPdf($idSite)
 {
     $idPdf = getRequestVar('idPdf', false, 'int');
     if (!$idPdf) {
         $pdfDb = new PdfConfigDb($idSite);
         $this->tpl->assign('pdf_available', $pdfDb->getListPdf());
         $this->tpl->template = "admin/site_pdf_selection.tpl";
         $ret = false;
     } else {
         $ret = $idPdf;
     }
     return $ret;
 }
开发者ID:ber5ien,项目名称:www.jade-palace.co.uk,代码行数:13,代码来源:AdminSitePdfConfig.class.php


示例5: setPriority

function setPriority($torrent)
{
    global $cfg;
    // we will use this to determine if we should create a prio file.
    // if the user passes all 1's then they want the whole thing.
    // so we don't need to create a prio file.
    // if there is a -1 in the array then they are requesting
    // to skip a file. so we will need to create the prio file.
    $okToCreate = false;
    if (!empty($torrent)) {
        $alias = getAliasName($torrent);
        $fileName = $cfg["torrent_file_path"] . $alias . ".prio";
        $result = array();
        // b4rt-4
        //$files = array_filter($_REQUEST['files'],"getFile");
        $files = array();
        if (isset($_REQUEST['files'])) {
            $files = array_filter($_REQUEST['files'], "getFile");
        }
        // b4rt-4
        // if there are files to get then process and create a prio file.
        if (count($files) > 0) {
            for ($i = 0; $i < getRequestVar('count'); $i++) {
                if (in_array($i, $files)) {
                    array_push($result, 1);
                } else {
                    $okToCreate = true;
                    array_push($result, -1);
                }
            }
            $alias = getAliasName($torrent);
            if ($okToCreate) {
                $fp = fopen($fileName, "w");
                fwrite($fp, getRequestVar('filecount') . ",");
                fwrite($fp, implode($result, ','));
                fclose($fp);
            } else {
                // No files to skip so must be wanting them all.
                // So we will remove the prio file.
                @unlink($fileName);
            }
        } else {
            // No files selected so must be wanting them all.
            // So we will remove the prio file.
            @unlink($fileName);
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:48,代码来源:setpriority.php


示例6: showMyProposalPage

function showMyProposalPage()
{
    //TODO check for the role of current user
    $role = getRole();
    if (!Users::isStudent()) {
        echo t('You can only see this page as a student');
        return;
    }
    //Get my groups
    $my_proposals = Proposal::getInstance()->getMyProposals();
    //::getGroups(_ORGANISATION_GROUP);
    if (!$my_proposals) {
        echo t('You have no proposal at the moment.') . '<br/>';
        echo "<a href='" . _WEB_URL . "/projects/browse'>" . t('Please find yourself a project') . "</a>.";
    } else {
        $current_tab = getRequestVar('new_tab', 0);
        showMyProposals($my_proposals, $current_tab);
    }
}
开发者ID:edwinraycom,项目名称:vals-soc,代码行数:19,代码来源:proposals.php


示例7: process

 function process($indexLang = null)
 {
     if (!is_null($indexLang)) {
         $this->addElement('header', 'headertext', $GLOBALS['lang'][$indexLang]);
     }
     $this->addElement('submit', 'submit', $GLOBALS['lang']['install_valider']);
     $this->addElement('submit', 'back', $GLOBALS['lang']['admin_retour']);
     if ($this->getSubmitValue('back') === $GLOBALS['lang']['admin_retour']) {
         $tmpIdSite = getRequestVar('site', -1, 'int');
         if ($tmpIdSite > 0) {
             Request::redirectToModule('admin_index&site=' . $tmpIdSite . '&adminsite=' . $tmpIdSite);
         } else {
             Request::redirectToModule('admin_index');
         }
     } else {
         if ($this->validate()) {
             $this->postProcess();
             return true;
         } else {
             $this->display();
             return false;
         }
     }
 }
开发者ID:ber5ien,项目名称:www.jade-palace.co.uk,代码行数:24,代码来源:Form.class.php


示例8: getTransferList

function getTransferList()
{
    global $cfg, $db;
    include_once "AliasFile.php";
    $kill_id = "";
    $lastUser = "";
    $arUserTorrent = array();
    $arListTorrent = array();
    // settings
    $settings = convertIntegerToArray($cfg["index_page_settings"]);
    // sortOrder
    $sortOrder = getRequestVar("so");
    if ($sortOrder == "") {
        $sortOrder = $cfg["index_page_sortorder"];
    }
    // t-list
    $arList = getTransferArray($sortOrder);
    foreach ($arList as $entry) {
        // ---------------------------------------------------------------------
        // init some vars
        $displayname = $entry;
        $show_run = true;
        $torrentowner = getOwner($entry);
        $owner = IsOwner($cfg["user"], $torrentowner);
        if (strlen($entry) >= 47) {
            // needs to be trimmed
            $displayname = substr($entry, 0, 44);
            $displayname .= "...";
        }
        if ($cfg["enable_torrent_download"]) {
            $torrentfilelink = "<a href=\"maketorrent.php?download=" . urlencode($entry) . "\"><img src=\"images/down.gif\" width=9 height=9 title=\"Download Torrent File\" border=0 align=\"absmiddle\"></a>";
        } else {
            $torrentfilelink = "";
        }
        // ---------------------------------------------------------------------
        // alias / stat
        $alias = getAliasName($entry) . ".stat";
        if (substr(strtolower($entry), -8) == ".torrent") {
            // this is a torrent-client
            $btclient = getTorrentClient($entry);
            $af = AliasFile::getAliasFileInstance($cfg["torrent_file_path"] . $alias, $torrentowner, $cfg, $btclient);
        } else {
            if (substr(strtolower($entry), -4) == ".url") {
                // this is wget. use tornado statfile
                $btclient = "wget";
                $alias = str_replace(".url", "", $alias);
                $af = AliasFile::getAliasFileInstance($cfg["torrent_file_path"] . $alias, $cfg['user'], $cfg, 'tornado');
            } else {
                $btclient = "tornado";
                // this is "something else". use tornado statfile as default
                $af = AliasFile::getAliasFileInstance($cfg["torrent_file_path"] . $alias, $cfg['user'], $cfg, 'tornado');
            }
        }
        // cache running-flag in local var. we will access that often
        $transferRunning = (int) $af->running;
        // cache percent-done in local var. ...
        $percentDone = $af->percent_done;
        // more vars
        $detailsLinkString = "<a style=\"font-size:9px; text-decoration:none;\" href=\"JavaScript:ShowDetails('downloaddetails.php?alias=" . $alias . "&torrent=" . urlencode($entry) . "')\">";
        // ---------------------------------------------------------------------
        //XFER: add upload/download stats to the xfer array
        if ($cfg['enable_xfer'] == 1 && $cfg['xfer_realtime'] == 1) {
            if ($btclient != "wget") {
                $torrentTotalsCurrent = getTorrentTotalsCurrentOP($entry, $btclient, $af->uptotal, $af->downtotal);
            } else {
                $torrentTotalsCurrent["uptotal"] = $af->uptotal;
                $torrentTotalsCurrent["downtotal"] = $af->downtotal;
            }
            $sql = 'SELECT 1 FROM tf_xfer WHERE date = ' . $db->DBDate(time());
            $newday = !$db->GetOne($sql);
            showError($db, $sql);
            sumUsage($torrentowner, $torrentTotalsCurrent["downtotal"] + 0, $torrentTotalsCurrent["uptotal"] + 0, 'total');
            sumUsage($torrentowner, $torrentTotalsCurrent["downtotal"] + 0, $torrentTotalsCurrent["uptotal"] + 0, 'month');
            sumUsage($torrentowner, $torrentTotalsCurrent["downtotal"] + 0, $torrentTotalsCurrent["uptotal"] + 0, 'week');
            sumUsage($torrentowner, $torrentTotalsCurrent["downtotal"] + 0, $torrentTotalsCurrent["uptotal"] + 0, 'day');
            //XFER: if new day add upload/download totals to last date on record and subtract from today in SQL
            if ($newday) {
                $newday = 2;
                $sql = 'SELECT date FROM tf_xfer ORDER BY date DESC';
                $lastDate = $db->GetOne($sql);
                showError($db, $sql);
                // MySQL 4.1.0 introduced 'ON DUPLICATE KEY UPDATE' to make this easier
                $sql = 'SELECT 1 FROM tf_xfer WHERE user_id = "' . $torrentowner . '" AND date = "' . $lastDate . '"';
                if ($db->GetOne($sql)) {
                    $sql = 'UPDATE tf_xfer SET download = download+' . ($torrentTotalsCurrent["downtotal"] + 0) . ', upload = upload+' . ($torrentTotalsCurrent["uptotal"] + 0) . ' WHERE user_id = "' . $torrentowner . '" AND date = "' . $lastDate . '"';
                    $db->Execute($sql);
                    showError($db, $sql);
                } else {
                    showError($db, $sql);
                    $sql = 'INSERT INTO tf_xfer (user_id,date,download,upload) values ("' . $torrentowner . '","' . $lastDate . '",' . ($torrentTotalsCurrent["downtotal"] + 0) . ',' . ($torrentTotalsCurrent["uptotal"] + 0) . ')';
                    $db->Execute($sql);
                    showError($db, $sql);
                }
                $sql = 'SELECT 1 FROM tf_xfer WHERE user_id = "' . $torrentowner . '" AND date = ' . $db->DBDate(time());
                if ($db->GetOne($sql)) {
                    $sql = 'UPDATE tf_xfer SET download = download-' . ($torrentTotalsCurrent["downtotal"] + 0) . ', upload = upload-' . ($torrentTotalsCurrent["uptotal"] + 0) . ' WHERE user_id = "' . $torrentowner . '" AND date = ' . $db->DBDate(time());
                    $db->Execute($sql);
                    showError($db, $sql);
                } else {
                    showError($db, $sql);
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:101,代码来源:functions.b4rt.php


示例9: parseResponse

 function parseResponse($latest = true)
 {
     $thing = $this->htmlPage;
     if (strpos($thing, "Not logged in!") > 0) {
         $tmpStr = substr($thing, strpos($thing, "takelogin"));
         $tmpStr = substr($tmpStr, strpos($tmpStr, ">") + 1);
         $tmpStr2 = "<form method=\"post\" action=\"http://" . $this->mainURL . "/takelogin.php\">";
         $tmpStr = substr($tmpStr, 0, strpos($tmpStr, "</form>") + strlen("</form>"));
         $output = $tmpStr2 . str_replace("src=\"", "src=\"http://" . $this->mainURL . "/", $tmpStr) . "</table>";
     } else {
         $output = $this->tableHeader();
         if (strpos($thing, "Error:") > 0) {
             $tmpStr = substr($thing, strpos($thing, "Error:") + strlen("Error:"));
             $tmpStr = substr($tmpStr, 0, strpos($tmpStr, "</p>"));
             $this->msg = strip_tags($tmpStr);
             return $output . "<center>" . $this->msg . "</center><br>";
         }
         // We got a response so display it.
         // Chop the front end off.
         $thing = substr($thing, strpos($thing, ">Upped&nbsp;by<"));
         $thing = substr($thing, strpos($thing, "<tr>") + strlen("<tr>"));
         //$tmpList = substr($thing,0,strpos($thing,"</table>"));
         // ok so now we have the listing.
         $tmpListArr = split("</tr>", $thing);
         $bg = $this->cfg["bgLight"];
         //var_export($tmpListArr);
         foreach ($tmpListArr as $key => $value) {
             $buildLine = true;
             if (strpos($value, "id=")) {
                 $ts = new OinkMe($value);
                 // Determine if we should build this output
                 /*if (is_int(array_search($ts->MainId,$this->catFilter)))
                                     {
                                         $buildLine = false;
                                     }
                 
                                     if ($this->hideSeedless == "yes")
                                     {
                                         if($ts->Seeds == "N/A" || $ts->Seeds == "0")
                                         {
                                             $buildLine = false;
                                         }
                                     }*/
                 if (!empty($ts->torrentFile) && $buildLine) {
                     $output .= trim($ts->BuildOutput($bg, $this->searchURL()));
                     // ok switch colors.
                     if ($bg == $this->cfg["bgLight"]) {
                         $bg = $this->cfg["bgDark"];
                     } else {
                         $bg = $this->cfg["bgLight"];
                     }
                 }
             }
         }
         // set thing to end of this table.
         $thing = substr($thing, strpos($thing, "</table>"));
         $output .= "</table>";
         // is there paging at the bottom?
         if (strpos($thing, "page=") != false) {
             // Yes, then lets grab it and display it!  ;)
             $pages = substr($thing, strpos($thing, "<p"));
             $pages = substr($pages, strpos($pages, ">"));
             $pages = substr($pages, 0, strpos($pages, "</p>"));
             $pages = str_replace("&nbsp; ", '', $pages);
             $tmpPageArr = split("</a>", $pages);
             array_pop($tmpPageArr);
             $pagesout = '';
             foreach ($tmpPageArr as $key => $value) {
                 $value .= "</a> &nbsp;";
                 $tmpVal = substr($value, strpos($value, "browse.php?"), strpos($value, ">") - 1);
                 $pgNum = substr($tmpVal, strpos($tmpVal, "page=") + strlen("page="));
                 $pagesout .= str_replace($tmpVal, "XXXURLXXX" . $pgNum, $value);
             }
             $cat = getRequestVar('mainGenre');
             if (strpos($this->curRequest, "LATEST")) {
                 if (!empty($cat)) {
                     $pages = str_replace("XXXURLXXX", $this->searchURL() . "&LATEST=1&cat=" . $cat . "&pg=", $pagesout);
                 } else {
                     $pages = str_replace("XXXURLXXX", $this->searchURL() . "&LATEST=1&pg=", $pagesout);
                 }
             } else {
                 if (!empty($cat)) {
                     $pages = str_replace("XXXURLXXX", $this->searchURL() . "&searchterm=" . $_REQUEST["searchterm"] . "&cat=" . $cat . "&pg=", $pagesout);
                 } else {
                     $pages = str_replace("XXXURLXXX", $this->searchURL() . "&searchterm=" . $_REQUEST["searchterm"] . "&pg=", $pagesout);
                 }
             }
             // $pages = strip_tags($pages,"<a><b>");
             $output .= "<div align=center>" . substr($pages, 1) . "</div>";
         }
     }
     return $output;
 }
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:93,代码来源:OinkMeEngine.php


示例10: performSearch

 function performSearch($searchTerm)
 {
     $searchTerm = str_replace(" ", "+", $searchTerm);
     $request = "/torrents-search.php?search=" . $searchTerm;
     if (!empty($cat)) {
         $request .= "&cat=" . $cat;
     }
     $onlyname = getRequestVar('onlyname');
     if (empty($onlyname)) {
         $onlyname = "no";
     }
     $request .= "&onlyname=" . $onlyname;
     $incldead = getRequestVar('incldead');
     if (empty($incldead)) {
         $incldead = "0";
     }
     $request .= "&incldead=" . $incldead;
     $request .= "&submit=";
     if (!empty($this->pg)) {
         $request .= "&page=" . $this->pg;
     }
     if ($this->makeRequest($request)) {
         return $this->parseResponse();
     } else {
         return $this->msg;
     }
 }
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:27,代码来源:TorrentBoxEngine.php


示例11: dequeueTorrent

 /**
  * dequeueTorrent
  * @param $torrent name of the torrent
  */
 function dequeueTorrent($torrent)
 {
     $torrent = urldecode($torrent);
     $alias_file = getRequestVar('alias_file');
     if (isTorrentRunning($torrent)) {
         // torrent has been started... try and kill it.
         AuditAction($this->cfg["constants"]["unqueued_torrent"], $torrent . "has been started -- TRY TO KILL IT");
         header("location: index.php?alias_file=" . $alias_file . "&kill=true&kill_torrent=" . urlencode($torrent));
         exit;
     } else {
         if ($this->isQueueManagerRunning()) {
             // send command to daemon
             $this->sendQueueCommand('remove ' . substr($torrent, 0, -8));
             // flag the torrent as stopped (in db)
             stopTorrentSettings($torrent);
             // update the stat file.
             parent::updateStatFile($torrent, $alias_file);
             // log
             AuditAction($this->cfg["constants"]["unqueued_torrent"], $torrent);
         } else {
             header("location: admin.php?op=queueSettings");
             exit;
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:29,代码来源:QueueManager.Qmgr.php


示例12: AuditAction

 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 GNU General Public License for more details.

 To read the license please visit http://www.gnu.org/copyleft/gpl.html

*******************************************************************************/
include_once "config.php";
include_once "functions.php";
require_once "metaInfo.php";
// is enabled ?
if ($cfg["advanced_start"] != 1) {
    AuditAction($cfg["constants"]["error"], "ILLEGAL ACCESS: " . $cfg["user"] . " tried to use advanced start");
    showErrorPage("advanced start is disabled.");
}
$torrent = getRequestVar('torrent');
// Load saved settings
$btclient_default = $cfg["btclient"];
$torrentExists = loadTorrentSettingsToConfig($torrent);
// savepath
if (!isset($cfg["savepath"]) || empty($cfg["savepath"])) {
    $cfg["savepath"] = $cfg["path"] . getOwner($torrent) . '/';
}
// torrent exists ?
$torrentExists = getTorrentDataSize($torrent) > 0;
// display name
$displayName = htmlentities($torrent, ENT_QUOTES);
if (strlen($displayName) >= 55) {
    $displayName = substr($displayName, 0, 52) . "...";
}
?>
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:31,代码来源:startpop.php


示例13: renderGallery

 public function renderGallery()
 {
     global $siteWebRoot, $useNiceUrls, $galleryTitle, $galleryDescription, $galleryKeywords, $galleryDate, $galleryRowTemplate, $galleryIndexLink, $olderGalleryLink, $olderGalleryTitle, $newerGalleryLink, $newerGalleryTitle;
     $newerGalleryLink = null;
     $olderGalleryLink = null;
     $newerGalleryTitle = null;
     $olderGalleryTitle = null;
     $galleryIndexLink = $useNiceUrls ? sprintf("%s/index/", $siteWebRoot) : sprintf("%s?index=", $siteWebRoot);
     $galleryId = getRequestVar('galleryID');
     if (is_null($galleryId) || empty($galleryId)) {
         forwardTo($galleryIndexLink);
     }
     ob_start();
     $keys = array_keys($this->gallerydata);
     for ($i = 0; $i < count($keys); $i++) {
         $gallery = $this->gallerydata[$keys[$i]];
         if ($gallery->safename == $galleryId) {
             $galleryTitle = $gallery->title;
             $galleryDescription = $gallery->description;
             $galleryKeywords = $gallery->keywords;
             $galleryDate = $gallery->date;
             $galleryPath = sprintf('%s/assets/galleries/%s', $siteWebRoot, $gallery->foldername);
             foreach ($gallery->files as $image) {
                 $row = $galleryRowTemplate;
                 $row = str_replace('IMGSRC', sprintf("%s/%s", $galleryPath, $image), $row);
                 $row = str_replace('ALTTXT', '', $row);
                 $row = str_replace('IMGID', getUrlSafeString(substr($image, 0, strrpos($image, "."))), $row);
                 print $row;
             }
             for ($j = $i - 1; $j >= 0; $j--) {
                 $newerGallery = $this->gallerydata[$keys[$j]];
                 if (is_null($newerGallery->hidden)) {
                     $newerGalleryTitle = $newerGallery->title;
                     $newerGalleryLink = $useNiceUrls ? sprintf('%s/gallery/%s', $siteWebRoot, $newerGallery->safename) : sprintf('%s/?galleryID=%s', $siteWebRoot, $newerGallery->safename);
                     break;
                 }
             }
             for ($j = $i + 1; $j < count($keys); $j++) {
                 $olderGallery = $this->gallerydata[$keys[$j]];
                 if (is_null($olderGallery->hidden)) {
                     $olderGalleryTitle = $olderGallery->title;
                     $olderGalleryLink = $useNiceUrls ? sprintf('%s/gallery/%s', $siteWebRoot, $olderGallery->safename) : sprintf('%s/?galleryID=%s', $siteWebRoot, $olderGallery->safename);
                     break;
                 }
             }
             break;
         }
     }
     $this->output = ob_get_clean();
 }
开发者ID:nikcorg,项目名称:simplegallery,代码行数:50,代码来源:core.php


示例14: sleep

    if (!empty($return)) {
        sleep(3);
        passthru("kill " . $kill);
        // try to remove the pid file
        @unlink($cfg["torrent_file_path"] . $alias_file . ".pid");
        header("location: " . $return . ".php?op=queueSettings");
        exit;
    } else {
        header("location: index.php");
        exit;
    }
}
// Did the user select the option to remove a torrent from the Queue?
if (isset($_REQUEST["dQueue"])) {
    $alias_file = SecurityClean(getRequestVar('alias_file'));
    $QEntry = getRequestVar('QEntry');
    // Is the Qinfo file still there?
    if (file_exists($cfg["torrent_file_path"] . "queue/" . $alias_file . ".Qinfo")) {
        // Yes, then delete it and update the stat file.
        include_once "AliasFile.php";
        // We are going to write a '2' on the front of the stat file so that
        // it will be set back to New Status
        $the_user = getOwner($QEntry);
        // read the alias file
        // create AliasFile object
        $af = new AliasFile($cfg["torrent_file_path"] . $alias_file, $the_user);
        if ($af->percent_done > 0 && $af->percent_done < 100) {
            // has downloaded something at some point, mark it is incomplete
            $af->running = "0";
            $af->time_left = "Torrent Stopped";
        }
开发者ID:aungthiha-richard,项目名称:torrentflux,代码行数:31,代码来源:index.php


示例15: SecurityClean

    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    TorrentFlux is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with TorrentFlux; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
include_once "config.php";
include_once "functions.php";
require_once "metaInfo.php";
$torrent = SecurityClean(getRequestVar('torrent'));
$displayName = $torrent;
if (!file_exists($cfg["torrent_file_path"] . $torrent)) {
    echo $torrent . " could not be found or does not exist.";
    die;
}
if (strlen($displayName) >= 55) {
    $displayName = substr($displayName, 0, 52) . "...";
}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
    <title><?php 
开发者ID:aungthiha-richard,项目名称:torrentflux,代码行数:31,代码来源:startpop.php


示例16: process

 /**
  * Data processing method
  * only called if template is not cached
  */
 function process()
 {
     $request = getRequestVar('request', "", 'string');
     $tab = $this->initFunctionTab();
     if ($request == "") {
         $this->tpl->assign("XmlapiFunctionTab", $tab);
         $this->tpl->assign("PHPMV_URL", PHPMV_URL);
     } else {
         // Get function element
         $fct = $tab[$request];
         // Get parameter from url
         $tabParam = array();
         foreach ($fct->fctParameters as $key => $elem) {
             $tabParam[$elem->fctParamName] = html_entity_decode(getRequestVar($elem->fctParamName, $elem->fctParamDefaultValue, 'string'));
             //echo "test : " . $tabParam[$elem->fctParamName] . "<br>";
         }
         // Call function with parameters
         //$data = $this->data->{$fct->fctCodeName}();
         $data = call_user_func_array(array(&$this->data, $fct->fctCodeName), $tabParam);
         // Get anly specific detail
         if ($fct->fctResultDetail != "") {
             $resultTab = split("[/.-]", $fct->fctResultDetail);
             foreach ($resultTab as $key => $elem) {
                 $data = $data[$elem];
             }
         }
         // Return xml
         $this->returnAllElemXML($data, $fct->fctApiName);
     }
 }
开发者ID:ber5ien,项目名称:www.jade-palace.co.uk,代码行数:34,代码来源:ViewXmlapi.class.php


示例17: module_load_include

<?php

include 'include.php';
//Includes the necessary bootstrapping and the ajax functions
// module_load_include('php', 'vals_soc', 'includes/classes/AbstractEntity');
module_load_include('php', 'vals_soc', 'includes/classes/Groups');
module_load_include('php', 'vals_soc', 'includes/classes/Project');
module_load_include('php', 'vals_soc', 'includes/pages/proposals');
module_load_include('php', 'vals_soc', 'includes/classes/Institutes');
switch ($_GET['action']) {
    case 'list':
        try {
            $instName = null;
            $inst_id = getRequestVar('instid', null);
            if (isset($_POST['iname'])) {
                $instName = $_POST['iname'];
            }
            //Return result to jTable
            $jTableResult = array();
            $jTableResult['Result'] = "OK";
            if ($inst_id) {
                $institutions = Institutes::getInstance()->getInstituteById($inst_id);
                $jTableResult['TotalRecordCount'] = count($institutions);
                $jTableResult['Records'] = $institutions;
            } else {
                $jTableResult['TotalRecordCount'] = Institutes::getInstance()->getInstitutesRowCountBySearchCriteria($instName);
                $jTableResult['Records'] = Institutes::getInstance()->getInstitutesBySearchCriteria($instName, $_GET["jtSorting"], $_GET["jtStartIndex"], $_GET["jtPageSize"]);
            }
            print json_encode($jTableResult);
        } catch (Exception $ex) {
            //Return error message
开发者ID:edwinraycom,项目名称:vals-soc,代码行数:31,代码来源:institute_actions.php


示例18: errorDiv

         }
         if (Users::isStudent() && !Groups::isOwner(_PROPOSAL_OBJ, $proposal_id)) {
             echo errorDiv(t('You can only view your own proposals!'));
         } else {
             //TODO: find out whether we use the proposal view only in the my proposals and if not whether this
             //matters: non owners have no right to delete for example and so no reason to do a followup action
             echo renderProposal($proposal, $target, 'myproposal_page');
         }
     } else {
         echo errorDiv(t('No proposal identifier submitted!'));
     }
     break;
 case 'mark_proposal':
     $proposal_id = getRequestVar('proposal_id', 0, 'post');
     $project_id = getRequestVar('project_id', 0, 'post');
     $is_final = getRequestVar('is_final', 0, 'post');
     if (!$project_id) {
         echo t('The project could not be found');
         return;
     }
     if (!$proposal_id) {
         echo t('The proposal could not be found');
         return;
     }
     if (!$is_final) {
         $is_final = 0;
     }
     // Get the projects current proposal id and state (if set)
     $project = Project::getProjectById($project_id, FALSE, NULL);
     $old_proposal = $project->proposal_id;
     // probably dont need this now
开发者ID:edwinraycom,项目名称:vals-soc,代码行数:31,代码来源:proposal_actions.php


示例19: dequeueTorrent

 /**
  * dequeueTorrent
  * @param $torrent name of the torrent
  */
 function dequeueTorrent($torrent)
 {
     $torrent = urldecode($torrent);
     $alias_file = getRequestVar('alias_file');
     // Is the Qinfo file still there?
     if (file_exists($this->cfg["torrent_file_path"] . "queue/" . $alias_file . ".Qinfo")) {
         // flag the torrent as stopped (in db)
         stopTorrentSettings($torrent);
         // update the stat file.
         parent::updateStatFile($torrent, $alias_file);
         // Remove Qinfo file.
         @unlink($this->cfg["torrent_file_path"] . "queue/" . $alias_file . ".Qinfo");
         // log
         AuditAction($this->cfg["constants"]["unqueued_torrent"], $torrent);
     } else {
         // torrent has been started... try and kill it.
         AuditAction($this->cfg["constants"]["unqueued_torrent"], $torrent . "has been started -- TRY TO KILL IT");
         header("location: index.php?alias_file=" . $alias_file . "&kill=true&kill_torrent=" . urlencode($torrent));
         exit;
     }
 }
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:25,代码来源:QueueManager.tfQManager.php


示例20: updateSearchSettings

function updateSearchSettings()
{
    global $cfg;
    foreach ($_POST as $key => $value) {
        if ($key != "searchEngine") {
            $settings[$key] = $value;
        }
    }
    saveSettings($settings);
    AuditAction($cfg["constants"]["admin"], " Updating TorrentFlux Search Settings");
    $searchEngine = getRequestVar('searchEngine');
    if (empty($searchEngine)) {
        $searchEngine = $cfg["searchEngine"];
    }
    header("location: admin.php?op=searchSettings&searchEngine=" . $searchEngine);
}
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:16,代码来源:admin.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getRequests函数代码示例发布时间:2022-05-15
下一篇:
PHP getRequestUriByServerEnviroment函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap