Changeset 222 for dev

Show
Ignore:
Timestamp:
05/10/07 22:14:53 (15 years ago)
Author:
ralle030583
Message:

some small modifications cause of now working with KB_SITE

Files:
1 modified

Legend:

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

    r218 r222  
    6969        $class = 'kb-table-row-even'; 
    7070    } 
    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>"; 
     71        $html .= "<tr class=$class><form action ='?a=admin_navmanager' method='POST'><td  colspan=2>Statlink must have the name \"Stats\"<br> during repair</td><td><input type='hidden' name='syncStat' value='1'><center><input type='submit' value='Repair Stats'></center></td></form></tr>"; 
    7272        $html .= "</table>"; 
    7373}        
     
    171171{ 
    172172        $qry = new DBQuery(); 
    173         $query = "SELECT posnr FROM kb3_navigation WHERE ID = $id"; 
     173        $query = "SELECT posnr FROM kb3_navigation WHERE ID = $id AND KBSITE = '".KB_SITE."'"; 
    174174        $qry->execute($query); 
    175175        $row = $qry->getRow(); 
     
    177177         
    178178        $qry = new DBQuery(); 
    179         $query = "UPDATE kb3_navigation SET posnr = (posnr-1) WHERE nav_type = 'top' AND posnr = $next"; 
     179        $query = "UPDATE kb3_navigation SET posnr = (posnr-1) WHERE nav_type = 'top' AND posnr = $next AND KBSITE = '".KB_SITE."'"; 
    180180        $qry->execute($query); 
    181181         
     
    187187{ 
    188188        $qry = new DBQuery(); 
    189         $query = "SELECT posnr FROM kb3_navigation WHERE ID = $id"; 
     189        $query = "SELECT posnr FROM kb3_navigation WHERE ID = $id AND KBSITE = '".KB_SITE."'"; 
    190190        $qry->execute($query); 
    191191        $row = $qry->getRow(); 
     
    193193         
    194194        $qry = new DBQuery(); 
    195         $query = "UPDATE kb3_navigation SET posnr = (posnr+1) WHERE nav_type = 'top' AND posnr = $prev"; 
    196         $qry->execute($query); 
    197          
    198         $qry = new DBQuery(); 
    199         $query = "UPDATE kb3_navigation SET posnr = (posnr-1) WHERE ID = $id    "; 
     195        $query = "UPDATE kb3_navigation SET posnr = (posnr+1) WHERE nav_type = 'top' AND posnr = $prev AND KBSITE = '".KB_SITE."'"; 
     196        $qry->execute($query); 
     197         
     198        $qry = new DBQuery(); 
     199        $query = "UPDATE kb3_navigation SET posnr = (posnr-1) WHERE ID = $id"; 
    200200        $qry->execute($query); 
    201201} 
     
    219219function newPage($descr,$url,$target){ 
    220220        $qry = new DBQuery(); 
    221         $query = "SELECT max(posnr) as nr FROM kb3_navigation WHERE nav_type='top'"; 
     221        $query = "SELECT max(posnr) as nr FROM kb3_navigation WHERE nav_type='top' AND KBSITE = '".KB_SITE."'"; 
    222222        $qry->execute($query); 
    223223        $row = $qry->getRow(); 
     
    241241        } 
    242242        $qry = new DBQuery(); 
    243         $query = "UPDATE kb3_navigation SET url ='$statlink' WHERE ID=7"; 
     243        $query = "UPDATE kb3_navigation SET url ='$statlink' WHERE descr='Stats' AND KBSITE = '".KB_SITE."'"; 
    244244        $qry->execute($query); 
    245245}