Beispiel #1
0
 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;
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
 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>&nbsp;&nbsp;&nbsp;";
     $str .= $current_user->get_link() . "&nbsp;&nbsp;&nbsp;";
     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>&nbsp;&nbsp;&nbsp;";
     }
     if (have_entity_perm("config", PERM_UPDATE, $current_user, true)) {
         $str .= "<a href=\"" . $TPL["url_alloc_config"] . "\">Setup</a>&nbsp;&nbsp;&nbsp;";
     }
     $url = $sess->url("../help/help.php?topic=" . $TPL["alloc_help_link_name"]);
     $str .= "<a href=\"" . $url . "\">Help</a>&nbsp;&nbsp;&nbsp;";
     $url = $TPL["url_alloc_logout"];
     $str .= "<a href=\"" . $url . "\">Logout</a>";
     return $str;
 }