[wpkg_web] / pack_general.php Repository:
ViewVC logotype

View of /pack_general.php

Parent Directory Parent Directory | Revision Log Revision Log


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

<script type="text/javascript">
// Tool Tip Data below
var preFormat="<div class='tip'>";
var postFormat="</div>";

var numregex = /^[0-9]+$/;
var alphregex = /^[a-zA-Z0-9\_\-]+$/;

function checkNum(field) {
  if( numregex.test(field.value) ) {
    return true;
  } else {
    alert("Whole number only for the Version.  No decimals, letters, etc...");
    return false;
  }
}

function checkText(field) {
  if( alphregex.test(field.value) ) {
    return true;
  } else {
    alert("Only Letters, Numbers, underscore and hyphens as ID(txt).");
    return false;
  }
}

</script>

<div id="popupDiv" style="visibility:hidden; position:absolute; z-index:1000;"></div>
<form name='general' id='general' method='GET' action='pack_gen_sub.php'>
<?php
  
if($pack_id) {
?>
<input type='hidden' id='pack_id' name='pack_id' value='<?php print $pack_id?>'>
<?php
  
}
?>
<table class='tbl_sub2' cellspacing='0' cellpadding='2'>
  <tr class='headline'>
    <td><?php print $vocab['title-ID-2']; ?> <a href='javascript:void(0);' onMouseOver='return showTip(event, "<?php print $vocab['tip-id']; ?>", true);' onMouseOut='return hideTip();'><?php print $icon['question'][0]; ?></a></td>
    <td><?php print $vocab['title-name']; ?>  <a href='javascript:void(0);' onMouseOver='return showTip(event, "<?php print $vocab['tip-name']; ?>", true);' onMouseOut='return hideTip();'><?php print $icon['question'][0]; ?></a></td>
    <td><?php print $vocab['title-version']; ?>  <a href='javascript:void(0);' onMouseOver='return showTip(event, "<?php print $vocab['tip-version']; ?>", true);' onMouseOut='return hideTip();'><?php print $icon['question'][0]; ?></a></td>
    <td><?php print $vocab['title-execonce']; ?>  <a href='javascript:void(0);' onMouseOver='return showTip(event, "<?php print $vocab['tip-exec']; ?>", true);' onMouseOut='return hideTip();'><?php print $icon['question'][0]; ?></a></td>
    <td><?php print $vocab['title-obsolete']; ?>  <a href='javascript:void(0);' onMouseOver='return showTip(event, "<?php print $vocab['tip-obs']; ?>", true);' onMouseOut='return hideTip();'><?php print $icon['question'][0]; ?></a></td>
    <td><?php print $vocab['title-priority']; ?>  <a href='javascript:void(0);' onMouseOver='return showTip(event, "<?php print $vocab['tip-prio']; ?>", true);' onMouseOut='return hideTip();'><?php print $icon['question'][0]; ?></a></td>
    <td><?php print $vocab['title-reboot']; ?> <a href='javascript:void(0);' onMouseOver='return showTip(event, "<?php print $vocab['tip-reboot']; ?>", true);' onMouseOut='return hideTip();'><?php print $icon['question'][0]; ?></a></td>
  </tr>
  <tr>
    <td><input type='text' id='idtxt' name='idtxt' size='15' onChange='return checkText(this);' maxlength='100'<?php
      
if($pack_id) {
        print 
"value='" $pack_info['idtxt'] . "'";
      }
?>></td>
    <td><input type='text' id='name' name='name' size='35' maxlength='100'<?php
      
if($pack_id) {
        print 
"value='" $pack_info['name'] . "'";
      }
?>></td>
    <td><input type='text' id='version' name='version' size='10' onChange='return checkNum(this);' maxlength='10'<?php
      
if($pack_id) {
        print 
"value='" $pack_info['version'] . "'";
      }
?>></td>
    <td>
      <select id='exeonce' name='exeonce'>
        <option value='0'<?php if($pack_id) {
          if(!
$pack_info['exeonce']) {
            print 
" selected";
          }
        }
?>><?php print $vocab['option-no']; ?></option>
        <option value='1'<?php if($pack_id) {
          if(
$pack_info['exeonce']) {
            print 
" selected";
          }
        }
?>><?php print $vocab['option-yes']; ?></option>
      </select>
    </td>
    <td>
      <select id='obsolete' name='obsolete'>
        <option value='0'<?php if($pack_id) {
          if(!
$pack_info['obsolete']) {
            print 
" selected";
          }
        }
?>><?php print $vocab['option-no']; ?></option>
        <option value='1'<?php if($pack_id) {
          if(
$pack_info['obsolete']) {
            print 
" selected";
          }
        }
?>><?php print $vocab['option-yes']; ?></option>
      </select>
    </td>
    <td valign='top'><input type='text' id='priority' name='priority' size='2' maxlength='3'<?php
      
if($pack_id) {
        print 
"value='" $pack_info['priority'] . "'";
      }
?>></td>
    <td>
      <select id='reboot' name='reboot'>
        <?php $count=0;
         foreach (
$vocab['option-ny'] as $option) { ?>
        <option value='<?php print $count?>'<?php
          
if($pack_id) {
            if(
$count==$pack_info['reboot']) {
              print 
" selected";
            }
          } else if (
$count==0) {
            print 
" selected";
          }
        
?>><?php print $option?></option>
        <?php
        $count
++;
        } 
?>
      </select>
    </td>
  </tr>
</table>
<table class='tbl_sub2' cellspacing='0' cellpadding='2'>
  <tr class='headline'>
    <td width='600px'><?php print $vocab['title-notes']; ?> <a href='javascript:void(0);' onMouseOver='return showTip(event, "<?php print $vocab['tip-notes']; ?>", true);' onMouseOut='return hideTip();'><?php print $icon['question'][0]; ?></a></td><td><?php print $vocab['title-profpacks_in']; ?> <a href='javascript:void(0);' onMouseOver='return showTip(event, "<?php print $vocab['tip-prof']; ?>", true);' onMouseOut='return hideTip();'><?php print $icon['question'][0]; ?></a></td>
  </tr>
  <tr>
    <td><textarea id='notes' name='notes' wrap='soft' rows='8' cols='70'><?php
      
if($pack_id) {
        print 
$pack_info['notes'];
      }
?></textarea>
    </td>
    <td valign='top'><?php
      $sql4
=sprintf("select profiles.id as id,profiles.name as name from profiles,prof_packs where prof_packs.pack_id=%s and prof_packs.prof_id=profiles.id"quote_smart($pack_id));
      
$sql4_handle=mysql_query($sql4) or error_report($sql4,mysql_error());
      while(
$prof_info=mysql_fetch_array($sql4_handle)) {
        print 
"<li><a href='profiles.php?prof_id={$prof_info['id']}'>{$prof_info['name']}</a><br />\n";
      }
    
?>
    </td>
  </tr>
  <tr>
    <td colspan='2'><input type='submit' value='<?php print $vocab['button-submit']; ?>' name='submit'> &nbsp; <input type='reset' value='<?php print $vocab['button-reset']; ?>'></td>
  </tr>
</table>

ViewVC Help
Powered by ViewVC 1.0.3