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; }
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; }
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; }