<li><a href="$script/">Home</a></li>
<li><a href="#">Assistants</a>
<menu>
+ <li><a href="$script/assistant/stats">stats</a></li>
<li><a href="$script/assistant/store">store</a></li>
<li><a href="$script/assistant/dispose">dispose</a></li>
<li><a href="$script/assistant/sell">sell</a></li>
</menu>
<div style="float: right;">
- <form action="?" method="GET">
+ <form action="$script/assistant/go" method="GET" style="float: left;"><!-- TODO: Display only when go plugin available -->
+ <input type="text" name="q" placeholder="smart id..." />
+ <input type="submit" value="go" />
+ </form>
+ <form action="?" method="GET" style="float: left;">
<input type="text" name="q" placeholder="regexp..." value="$search" />
<input type="submit" value="filter" />
</form>
);
foreach($table as $id => $row) {
foreach($collapse as $link => $title)
- if(isset($table[$id][$link])) {
+ if(isset($table[$id][$link]) && isset($row[$title])) {
$type = @array_shift(preg_split('/_/', $link));
if($link != $title) unset($table[$id][$link]);
$table[$id][$title]=$this->link($row[$title], $type.'/'.$row[$link].'/');
}
function post_redirect_get($location, $message='', $error=false) {
- $location = $this->html->internal_url($location).'?message='.urlencode($message);
+ $url_args = $message != '' ? '?message='.urlencode($message) : '';
+ $location = $this->html->internal_url($location).$url_args;
header('Location: '.$location);
if($error) trigger_error($message);
- die("Location: <a href='$location'>$location</a>");
+ $location=htmlspecialchars($location);
+ die(
+ "<meta http-equiv='refresh' content='0; url=$location'>".
+ "Location: <a href='$location'>$location</a>"
+ );
}
function safe_include($dir,$name,$vars=array(),$ext='.inc.php') {