[wpkg_web] / pack_downloads.php Repository:
ViewVC logotype

View of /pack_downloads.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 29 - (download) (annotate)
Thu Jan 11 02:13:58 2007 UTC (11 years, 6 months ago) by linuxkidd
File size: 4190 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.

<form name='general' id='general' method='GET' action='pack_down_sub.php'>
<?php
  
if(isset($_GET['new'])) {
    
$new=1;
  } else {
    
$new=0;
  }
  if(isset(
$_GET['lang_id'])) {
    
$lang_id=$_GET['lang_id'];
  } else {
    
$lang_id=0;
  }
  if(
$pack_id) {
?>
<input type='hidden' id='pack_id' name='pack_id' value='<?php print $pack_id?>'>
<?php
  
}
  include 
"pack_header.php";
?>
<table class='tbl_sub2' cellspacing='0' cellpadding='2'>
  <tr class='headline'>
    <td style='width: 35px; text-align: center;'><input type='button' onclick='window.location="packages.php?pack_id=<?php
      
print $pack_id?>&page=<?php print $page?>&new=1"'
      value="<?php print $vocab['button-add']; ?>" style='font-weight: normal;'></td><td style='width: 45px; text-align: center;'><?php print $vocab['title-lang']; ?></td>
    <td><?php print $vocab['title-url']; ?></td>
    <td><?php print $vocab['title-saveto']; ?></td>
  </tr>
<?php
  $sql
="select * from languages";
  
$sql_handle=mysql_query($sql) or error_report($sql,mysql_error());
  
$lang=array();
  while(
$lang_data=mysql_fetch_array($sql_handle)) {
    
$lang[$lang_data['id']]=$lang_data['value'];
  }
  
$sql="select * from pack_downloads where pack_id=" quote_smart($pack_id);
  
$sql_handle=mysql_query($sql) or error_report($sql,mysql_error());
  
$count=0;
  while(
$down_data=mysql_fetch_array($sql_handle)) {
    
$bgcolor=$alt_bg_colors[$count%count($alt_bg_colors)];
    print 
"  <tr style='background: {$bgcolor};'>\n";
    if(
$lang_id==$down_data['lang_id']) {
      print 
"    <td>&nbsp;</td><td style='text-align: center;'><input type='hidden' name='lang_id' id='lang_id'
         value='
{$down_data['lang_id']}'>{$lang[$down_data['lang_id']]}</td>\n";
      print 
"    <td><input type='text' name='url' id='url' size='40' maxlength='65000'
         value='
{$down_data['url']}'></td>\n";
      print 
"    <td><input type='text' name='saveto' id='saveto' size='40' maxlength='65000'
         value='
{$down_data['saveto']}'></td>\n  </tr>\n";
      print 
"<tr><td>&nbsp;</td><td colspan='3'><input type='submit' id='Update' name='Update' value='{$vocab['button-update']}'>
        <input type='button' onclick='window.location=\"packages.php?pack_id=
{$pack_id}&page={$page}&page={$page}\"'  value='{$vocab['button-cancel']}'></td>\n";
    } else {
      print 
"    <td style='text-align: center;'><a
        href='pack_down_sub.php?pack_id=
{$pack_id}&lang_id={$down_data['lang_id']}&page={$page}&del=1' title='Delete'
        onClick=\"return confirm('
{$vocab['popup-permdel']} {$lang[$down_data['lang_id']]} {$vocab['popup-dl_permdel']} {$vocab['gen-confirm']}');\">{$icon['delete'][0]}</a></td>\n";
      print 
"    <td style='text-align: center;'><a href='packages.php?pack_id={$pack_id}&lang_id={$down_data['lang_id']}&page={$page}' title='{$vocab['title-edit']}'>{$lang[$down_data['lang_id']]}</a></td>\n";
      print 
"    <td><input type='text' style='background: {$bgcolor};' size='40' readonly value='" htmlspecialchars($down_data['url']) . "'></td>\n";
      print 
"    <td><input type='text' style='background: {$bgcolor}' size='40' readonly value='" htmlspecialchars($down_data['saveto']) . "'></td>\n";
    }
    print 
"  </tr>\n";
    
$count++;
  }
  if(
$new) {
    print 
"  <tr>\n    <td>&nbsp;</td><td>\n      <select style='text-align: center;' name='lang_id' id='lang_id'>\n";
    foreach(
$lang as $id=>$lng) {
      print 
"        <option value='{$id}'";
      if(
$lng=='ALL') {
        print 
" SELECTED";
      }
      print 
">{$lng}</option>\n";
    }
    print 
"      </select>\n    </td>\n";
    print 
"    <td><input type='text' name='url' id='url' size='40' maxlength='65000'></td>\n";
    print 
"    <td><input type='text' name='saveto' id='saveto' size='40' maxlength='65000'></td>\n";
    print 
"<tr><td>&nbsp;</td><td colspan='3'><input type='submit' id='Add' name='Add' value='{$vocab['button-add']}'>
      <input type='button' onclick='window.location=\"packages.php?pack_id=
{$pack_id}&page={$page}\"' value='{$vocab['button-cancel']}'>";
    print 
"</td>\n  </tr>\n";
  }
  if(!
$count && !$new) {
    print 
"  <tr><td colspan='3'>{$vocab['gen-dl_none']}</td></tr>\n";
  }
?>
</table>

ViewVC Help
Powered by ViewVC 1.0.3