$page->template_dir = $globals->spoolroot . "/templates/";
$page->compile_dir = $globals->spoolroot . "/templates_c/";
- $page->plugins_dir = $globals->spoolroot . "/plugins/";
+ $page->plugins_dir[]= $globals->spoolroot . "/plugins/";
$page->cache_dir = $globals->spoolroot . "/cache/";
$page->assign('xorg_head', $tpl_head);
return ($res?$res:"-");
}
+function url()
+{
+ $chemins = Array('.', '..', '../..');
+ foreach ($chemins as $ch) {
+ if (file_exists("$ch/login.php"))
+ return "$ch";
+ }
+ return "";
+}
/*
* Smarty plugin
* -------------------------------------------------------------
$stats_req = ($stats_req ? $stats_req : "-");
$nbtrk = array(nb_trk(5,2), nb_trk(4,2), nb_trk(5,1), nb_trk(4,1));
+
+ $rel = url();
return <<<EOF
<table class="bicol"
style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0;">
<th width="33%">Todo</th>
</tr>
<tr class="impair">
- <td><a href="admin/valider.php">$stats_req</a></td>
+ <td><a href="$rel/admin/valider.php">$stats_req</a></td>
<td>
- <a href="trackers/tracker_show.php?tr_id=2">
+ <a href="$rel/trackers/tracker_show.php?tr_id=2">
<strong>{$nbtrk[0]}</strong> / {$nbtrk[1]}
</a>
</td>
<td>
- <a href="trackers/tracker_show.php?tr_id=1">
+ <a href="$rel/trackers/tracker_show.php?tr_id=1">
<strong>{$nbtrk[2]}</strong> / {$nbtrk[3]}
</a>
</td>