Changeset 218 for dev

Show
Ignore:
Timestamp:
05/10/07 19:11:23 (15 years ago)
Author:
ralle030583
Message:

Bugfixes:
- addition of new Sites now work
- removed cause this causes problems with some PHP versions $PHP_SELF

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/common/admin/admin_navmanager.php

    r217 r218  
    1212        increasePriority($_GET['incPrio']); 
    1313} 
    14 if ($_GET['decPrio']){ 
     14elseif ($_GET['decPrio']){ 
    1515        decreasePriority($_GET['decPrio']); 
    1616} 
    17  
    18 if ($_POST['name']){ 
     17elseif ($_POST['new']){ 
     18        newPage($_POST['name'],$_POST['url'],$_POST['target']); 
     19} 
     20elseif ($_POST['name']){ 
    1921        renamePage($_POST['id'],$_POST['name']); 
    2022} 
    21 if ($_POST['target']){ 
     23elseif ($_POST['target']){ 
    2224        changeTarget($_POST['id'],$_POST['target']); 
    2325} 
    24 if ($_POST['newUrl']){ 
     26elseif ($_POST['newUrl']){ 
    2527        changeUrl($_POST['id'],$_POST['newUrl']); 
    2628} 
    27 if ($_POST['new']){ 
    28         newPage($_POST['name'],$_POST['url'],$_POST['target']); 
    29 } 
    30 if ($_POST['delete']){ 
     29elseif ($_POST['delete']){ 
    3130        delPage($_POST['id']); 
    3231} 
    33 if ($_POST['syncStat']){ 
     32elseif ($_POST['syncStat']){ 
    3433        repairStatLink(); 
    3534} 
    36 //Reading global Navigation Bar 
     35//Reading global Navigatio      n Bar 
    3736$html .= "<div class=block-header2>Navigation for intern pages</div>"; 
    3837$qry = new DBQuery(); 
     
    4746        while ($row = $qry->getRow()) 
    4847        { 
    49                  $html .= "<tr class=$class><td>".$row['descr']."</td><form action ='$PHP_SELF' method='POST'><td><input name='name' type='text' value='".$row['descr']."'></td><td><input type='hidden' name='id' value='".$row['ID']."'><input type='submit' value='rename'></td></form></tr>"; 
     48                 $html .= "<tr class=$class><td>".$row['descr']."</td><form action ='?a=admin_navmanager' method='POST'><td><input name='name' type='text' value='".$row['descr']."'></td><td><input type='hidden' name='id' value='".$row['ID']."'><input type='submit' value='rename'></td></form></tr>"; 
    5049                if (!$odd) 
    5150        { 
     
    7069        $class = 'kb-table-row-even'; 
    7170    } 
    72         $html .= "<tr class=$class><form action ='$PHP_SELF' method='POST'><td colspan = 3><input type='hidden' name='syncStat' value='1'><center><input type='submit' value='Repair Stat Link'></center></td></form></tr>"; 
     71        $html .= "<tr class=$class><form action ='?a=admin_navmanager' method='POST'><td colspan = 3><input type='hidden' name='syncStat' value='1'><center><input type='submit' value='Repair Stat Link'></center></td></form></tr>"; 
    7372        $html .= "</table>"; 
    7473}        
     
    8685        { 
    8786                $html .= "<tr class=$class><td>".$row['descr']."</td>"; 
    88                 $html .= "<form action ='$PHP_SELF' method='POST'><td><input name='name' type='text' value='".$row['descr']."'></td><td><input type='hidden' name='id' value='".$row['ID']."'><input type='submit' value='rename'></td></form>"; 
    89                 $html .= "<form action ='$PHP_SELF' method='POST'><td><input name='newUrl' type='text' value='".$row['url']."'></td><td><input type='hidden' name='id' value='".$row['ID']."'><input type='submit' value='change'></td></form>"; 
    90                 $html .= "<form action ='$PHP_SELF' method='POST'><td><select name='target'>"; 
     87                $html .= "<form action ='?a=admin_navmanager' method='POST'><td><input name='name' type='text' value='".$row['descr']."'></td><td><input type='hidden' name='id' value='".$row['ID']."'><input type='submit' value='rename'></td></form>"; 
     88                $html .= "<form action ='?a=admin_navmanager' method='POST'><td><input name='newUrl' type='text' value='".$row['url']."'></td><td><input type='hidden' name='id' value='".$row['ID']."'><input type='submit' value='change'></td></form>"; 
     89                $html .= "<form action ='?a=admin_navmanager' method='POST'><td><select name='target'>"; 
    9190                $html .= "<option value='_self' "; 
    9291                if ($row['target'] == '_self') 
     
    102101                $html .=">_blank</option></select>"; 
    103102                $html .= "</td><td><input type='hidden' name='id' value='".$row['ID']."'><input type='submit' value='change'></td></form>"; 
    104                 $html .= "<form action ='$PHP_SELF' method='POST'><td><input name='delete' type='hidden' value='1'><input type='hidden' name='id' value='".$row['ID']."'><input type='submit' value='delete'></td></form>"; 
     103                $html .= "<form action ='?a=admin_navmanager' method='POST'><td><input name='delete' type='hidden' value='1'><input type='hidden' name='id' value='".$row['ID']."'><input type='submit' value='delete'></td></form>"; 
    105104                $html .= "</tr>"; 
    106105                if (!$odd) 
     
    127126       } 
    128127        $html .= "<tr class=$class><td>Description:</td>"; 
    129         $html .= "<form action ='$PHP_SELF' method='POST'><td><input name='name' type='text'></td>"; 
     128        $html .= "<form action ='?a=admin_navmanager' method='POST'><td><input name='name' type='text'></td>"; 
    130129        $html .= "<td>URL:</td><td><input name='url' type='text' value='http://'></td><td>Target:</td>"; 
    131130        $html .= "<td><select name='target'><option value='_self'>_self</option><option value='_blank'>_blank</option></select>"; 
     
    217216        $query = "UPDATE kb3_navigation SET target ='$target' WHERE ID=$id"; 
    218217        $qry->execute($query); 
    219 } 
     218}        
    220219function newPage($descr,$url,$target){ 
    221220        $qry = new DBQuery();