[wpkg_web] / packages_list.php Repository:
ViewVC logotype

View of /packages_list.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 29 - (download) (annotate)
Thu Jan 11 02:13:58 2007 UTC (11 years, 8 months ago) by linuxkidd
File size: 6305 byte(s)
Language pack and Icon pack conversion complete.
Moved all settings into config.php.
Added CHANGELOG.
Fixed bug in packages_xml_in which prevented proper creation of initial level.
Added UPGRADE instructions.

<?php
  
include "connect.php";
  include 
"header.php";
  
$page='plist';
  if(isset(
$_GET['sortby'])) {
    
$sortby=$_GET['sortby'];
  } else {
    
$sortby="priority desc,idtxt";
  }
  if(isset(
$_GET['ad'])) {
    
$ad=" " $_GET['ad'];
  } else {
    
$ad='';
  }
?>
<script type="text/javascript">
// Tool Tip Data below
var preFormat="<div class='tip'>";
var postFormat="</div>";
var permDel="<span style=\"background: red; font-weight: bold;color: white;\"><?php print $vocab['tip-permdel']; ?>";
</script>

    <title><?php print $vocab['title-packlist']; ?></title>
  </head>
  <body>
  <div id="popupDiv" style="visibility:hidden; position:absolute; z-index:1000;"></div>
    <table class='tbl_main'>
      <tr>
<?php
   $key
=array(0,1,2,5,3,4);
   include 
"sidebar.php";
?>
        <td valign='top'>
          <table class='tbl_mainsub'>
            <tr class='headline'>
              <td><?php print $vocab['title-packlist']; ?></td>
            </tr>
            <tr class='tr_main'>
              <td>
          <table class='tbl_mainsub' cellpadding='0' cellspacing='0'>
            <tr class='headline'>
              <td width='57px'>&nbsp;</td>
              <td width='80px' align='center'><?php print $vocab['title-pri_short']; ?> <a style='color: white;' href='packages_list.php?sortby=priority&ad=asc' title='<?php print $vocab['gen-sort_asc']; ?>'>( +</a>/<a style='color: white;' href='packages_list.php?sortby=priority&ad=desc' title='<?php print $vocab['gen-sort_desc']; ?>'>- )</a></td>
              <td align='center'><?php print $vocab['title-ID']; ?> <a style='color: white;' href='packages_list.php?sortby=idtxt&ad=asc' title='<?php print $vocab['gen-sort_asc']; ?>'>( +</a>/<a style='color: white;' href='packages_list.php?sortby=idtxt&ad=desc' title='<?php print $vocab['gen-sort_desc']; ?>'>- )</a></td>
              <td align='center'><?php print $vocab['title-edit']; ?></td>
              <td><?php print $vocab['title-name']; ?> <a style='color: white;' href='packages_list.php?sortby=name&ad=asc' title='<?php print $vocab['gen-sort_asc']; ?>'>( +</a>/<a style='color: white;' href='packages_list.php?sortby=name&ad=desc' title='<?php print $vocab['gen-sort_desc']; ?>'>- )</a></td>
              <td><?php print $vocab['title-version']; ?> <a style='color: white;' href='packages_list.php?sortby=version&ad=asc' title='<?php print $vocab['gen-sort_asc']; ?>'>( +</a>/<a style='color: white;' href='packages_list.php?sortby=version&ad=desc' title='<?php print $vocab['gen-sort_desc']; ?>'>- )</a></td>
            </tr>
        <?php
          $page
='general';
          
$sql="select * from packages order by obsolete," $sortby $ad;
          
$sql_handle=mysql_query($sql) or error_report($sql,mysql_error());

          
$count=0;
          while(
$pack_info=mysql_fetch_array($sql_handle)) {
            
$link='';
            foreach ( 
$pages as $page_data ) {
              
$link.="<a href='packages.php?pack_id={$pack_info['id']}&page={$page_data[0]}' onMouseOver='return showTip(event, \"{$vocab['gen-goto']} {$page_data[1]} {$vocab['gen-pageof']} {$pack_info['idtxt']} {$vocab['gen-package']}.\", true);' onMouseOut='return hideTip();'> {$page_data[2]}</a>";
            }
            if(
$pack_info['reboot']>0) {
              
$status=$icon['reboot'][0];
            } else {
              
$status=$icon['space'][0];
            }
            if(
$pack_info['exeonce']>0) {
              
$status.=$icon['once'][0];
            } else {
              
$sql2="select count(id) from pack_checks where pack_id=" quote_smart($pack_info['id']);
              unset(
$check_count);
              
$sql2_handle=mysql_query($sql2) or error_report($sql,mysql_error());
              list(
$check_count)=mysql_fetch_array($sql2_handle);
              if(
$check_count<1) {
                
$status.=$icon['always'][0];
              } else {
                
$status.=$icon['space'][0];
              }
            }

            
$style='';



            if(
$pack_info['obsolete']) {
              
$style='background-color: #FF0033;';
              
$rem="<a href='pack_del.php?pack_id={$pack_info['id']}' onMouseOver='return showTip(event, permDel + \" {$pack_info['idtxt']} {$vocab['gen-package']}.</span>\", true);' onMouseOut='return hideTip();' onClick=\"return confirm('{$vocab['popup-permdel']} {$pack_info['idtxt']} {$vocab['gen-package']} {$vocab['gen-confirm']}');\">{$icon['delete'][0]}</a>";
            } else {
              
$sql4=sprintf("select prof_id from prof_packs where pack_id=%s limit 0,1"quote_smart($pack_info['id']));
              
$sql4_handle=mysql_query($sql4) or error_report($sql4,mysql_error());
              list(
$prof_id)=mysql_fetch_array($sql4_handle);
              
$rem=$icon['space'][0];
              if(!
$prof_id) {
                
$style='background-color: #FFFF33;';
                
$rem="<a href='pack_del.php?pack_id={$pack_info['id']}' onMouseOver='return showTip(event, permDel + \" {$pack_info['idtxt']} {$vocab['gen-package']}.</span>\", true);' onMouseOut='return hideTip();' onClick=\"return confirm('{$vocab['popup-permdel']} {$pack_info['idtxt']} {$vocab['gen-package']} {$vocab['gen-confirm']}');\">{$icon['delete'][0]}</a>";
              }
            }

            
$xmllink="<a href='packages_xml_out.php?id={$pack_info['id']}' onMouseOver='return showTip(event, \"{$vocab['tip-pack_xml-1']} {$pack_info['idtxt']} {$vocab['gen-pack_only']}.\", true);' onMouseOut='return hideTip();'>{$icon['xml'][0]}</a>";
            print 
"      <tr style='background: {$alt_bg_colors[$count%2]};'>\n";
            print 
"        <td  style='text-align: center; width: 38px;'>{$status}{$rem}</td>\n";
            print 
"        <td  style='{$style}; text-align: center;'>{$pack_info['priority']}</td>\n";
            print 
"        <td align='center'>{$pack_info['idtxt']}</td>\n";
            print 
"        <td align='center'>{$link}</td>\n";
            print 
"        <td>{$xmllink} {$pack_info['name']}</td>\n";
            print 
"        <td>{$pack_info['version']}</td>\n";
            print 
"      </tr>\n";
            
$count++;
          }
        
?>
          </table>
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
    <?php include "footer.php"?>
  </body>
</html>

ViewVC Help
Powered by ViewVC 1.0.3