[ Index ]

Source Code Reference for V1.00

title

Body

[close]

/modules/resources/ -> vw_resources.php (source)

   1  <?php /* $Id: vw_resources.php 40 2008-02-11 12:11:44Z pedroix $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/trunk/modules/resources/vw_resources.php $ */
   2  if (!defined('W2P_BASE_DIR')) {
   3      die('You should not access this file directly.');
   4  }
   5  
   6  global $tabbed, $currentTabName, $currentTabId, $AppUI;
   7  $obj = &new CResource;
   8  
   9  $query = &new DBQuery;
  10  $obj->setAllowedSQL($AppUI->user_id, $query);
  11  $query->addTable($obj->_tbl);
  12  if (!$tabbed) {
  13      $currentTabId++;
  14  }
  15  
  16  if ($currentTabId) {
  17      $query->addWhere('resource_type = ' . (int)$_SESSION['resource_type_list'][$currentTabId]['resource_type_id']);
  18  }
  19  $res = &$query->exec();
  20  ?>
  21  <table width="100%" border="0" cellpadding="2" cellspacing="1" class="tbl">
  22  <tr>
  23      <th nowrap="nowrap" width="20%">
  24          <?php echo $AppUI->_('ID'); ?>
  25      </th>
  26      <th nowrap="nowrap" width="70%">
  27          <?php echo $AppUI->_('Resource Name'); ?>
  28      </th>
  29      <th nowrap="nowrap" width="10%">
  30          <?php echo $AppUI->_('Max Alloc %'); ?>
  31      </th>
  32  </tr>
  33  <?php
  34  for ($res; !$res->EOF; $res->MoveNext()) {
  35  ?>
  36  <tr>
  37      <td>
  38          <a href="index.php?m=resources&a=view&resource_id=<?php echo $res->fields['resource_id']; ?>">
  39          <?php echo $res->fields['resource_key']; ?>
  40          </a>
  41      </td>
  42      <td>
  43          <a href="index.php?m=resources&a=view&resource_id=<?php echo $res->fields['resource_id']; ?>">
  44          <?php echo $res->fields['resource_name']; ?>
  45          </a>
  46      </td>
  47      <td align="right">
  48          <?php echo $res->fields['resource_max_allocation']; ?>
  49      </td>
  50  </tr>
  51  <?php
  52  }
  53  $query->clear();
  54  ?>
  55  </table>


Generated: Thu Jan 8 03:00:03 2009 Cross-referenced by PHPXref 0.7