本文整理汇总了PHP中session::url方法的典型用法代码示例。如果您正苦于以下问题:PHP session::url方法的具体用法?PHP session::url怎么用?PHP session::url使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类session
的用法示例。
在下文中一共展示了session::url方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: session
function get_url()
{
global $sess;
$sess or $sess = new session();
$url = "project/project.php?projectID=" . $this->get_id();
if ($sess->Started()) {
$url = $sess->url(SCRIPT_PATH . $url);
// This for urls that are emailed
} else {
static $prefix;
$prefix or $prefix = config::get_config_item("allocURL");
$url = $prefix . $url;
}
return $url;
}
示例2: session
function get_url($absolute = false, $id = false)
{
global $sess;
$sess or $sess = new session();
$id or $id = $this->get_id();
$url = "task/task.php?taskID=" . $id;
if ($sess->Started() && !$absolute) {
$url = $sess->url(SCRIPT_PATH . $url);
// This for urls that are emailed
} else {
static $prefix;
$prefix or $prefix = config::get_config_item("allocURL");
$url = $prefix . $url;
}
return $url;
}
示例3: extra_links
public static function extra_links()
{
$current_user =& singleton("current_user");
global $TPL;
global $sess;
$str = "<a href=\"" . $TPL["url_alloc_starList"] . "\" class=\"icon-star\"></a> ";
$str .= $current_user->get_link() . " ";
if (defined("PAGE_IS_PRINTABLE") && PAGE_IS_PRINTABLE) {
$sess or $sess = new session();
$str .= "<a href=\"" . $sess->url($_SERVER["REQUEST_URI"]) . "media=print\">Print</a> ";
}
if (have_entity_perm("config", PERM_UPDATE, $current_user, true)) {
$str .= "<a href=\"" . $TPL["url_alloc_config"] . "\">Setup</a> ";
}
$url = $sess->url("../help/help.php?topic=" . $TPL["alloc_help_link_name"]);
$str .= "<a href=\"" . $url . "\">Help</a> ";
$url = $TPL["url_alloc_logout"];
$str .= "<a href=\"" . $url . "\">Logout</a>";
return $str;
}