fixed edit tab (test?)

git-svn-id: http://www.observium.org/svn/observer/trunk@2495 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-09-18 18:38:42 +00:00
parent 02024f510a
commit 0e6284b5c3
+12 -6
View File
@@ -1,5 +1,9 @@
<?php <?php
$link_array = array('page' => 'device',
'device' => $device['device_id'],
'tab' => 'edit');
if ($_SESSION['userlevel'] < '7') if ($_SESSION['userlevel'] < '7')
{ {
print_error("Insufficient Privileges"); print_error("Insufficient Privileges");
@@ -25,9 +29,9 @@ if ($_SESSION['userlevel'] < '7')
unset($sep); unset($sep);
foreach ($panes as $type => $text) foreach ($panes as $type => $text)
{ {
if (!isset($_GET['optc'])) { $_GET['optc'] = $type; } if (!isset($vars['section'])) { $vars['section'] = $type; }
echo($sep); echo($sep);
if ($_GET['optc'] == $type) if ($vars['section'] == $type)
{ {
echo("<span class='pagemenu-selected'>"); echo("<span class='pagemenu-selected'>");
#echo('<img src="images/icons/'.$type.'.png" class="optionicon" />'); #echo('<img src="images/icons/'.$type.'.png" class="optionicon" />');
@@ -35,16 +39,18 @@ if ($_SESSION['userlevel'] < '7')
#echo('<img src="images/icons/greyscale/'.$type.'.png" class="optionicon" />'); #echo('<img src="images/icons/greyscale/'.$type.'.png" class="optionicon" />');
} }
echo("<a href='device/".$device['device_id']."/edit/" . $type . ($_GET['optd'] ? "/" . $_GET['optd'] : ''). "/'> " . $text ."</a>"); echo(generate_link($text,$link_array,array('section'=>$type)));
if ($_GET['optc'] == $type) { echo("</span>"); }
# echo("<a href='device/".$device['device_id']."/edit/" . $type . ($_GET['optd'] ? "/" . $_GET['optd'] : ''). "/'> " . $text ."</a>");
if ($vars['section'] == $type) { echo("</span>"); }
$sep = " | "; $sep = " | ";
} }
print_optionbar_end(); print_optionbar_end();
if (is_file("pages/device/edit/".mres($_GET['optc']).".inc.php")) if (is_file("pages/device/edit/".mres($vars['section']).".inc.php"))
{ {
include("pages/device/edit/".mres($_GET['optc']).".inc.php"); include("pages/device/edit/".mres($vars['section']).".inc.php");
} }
} }