[ PHPXref.com ] [ Generated: Sun Jul 20 19:45:58 2008 ] [ phpMSAdmin 0.14 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> view_list.php (source)

   1  <?php
   2       /*
   3       Copyright (C)
   4  
   5       This program is free software; you can redistribute it and/or modify it
   6       under the terms of the GNU General Public License as published by the Free
   7       Software Foundation; either version 2 of the License, or (at your option)
   8       any later version.
   9  
  10       This program is distributed in the hope that it will be useful, but WITHOUT
  11       ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12       FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13       more details.
  14  
  15       You should have received a copy of the GNU General Public License along
  16       with this program; if not, write to the Free Software Foundation, Inc.,
  17       59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18       */
  19  ?>
  20  <?php
  21      include ('inc/header.php');
  22  
  23      mssql_select_db($_SESSION['database']);
  24  ?>
  25  
  26  <form name="form3" method="post" action="view_list.php">
  27  <table width="350" cellpadding="3" cellspacing="3" style="border: 1px solid">
  28      <tr>
  29          <td align="center" colspan="5" style="background: #D0DCE0">
  30              <b>Views</b>
  31          </td>
  32      </tr>
  33      <tr>
  34          <td style="background: #D0DCE0">&nbsp;</td>
  35          <td align="center" style="background: #D0DCE0">
  36              <b>Name</b>
  37          </td>
  38          <td align="center" colspan="3" style="background: #D0DCE0">
  39              <b>Action</b>
  40          </td>
  41      </tr>
  42      <?php
  43          $toggle = true;
  44          $colors = array('#DDDDDD','#CCCCCC');
  45  
  46          $view_query = @mssql_query('sp_help') or die(throwSQLError('unable to retrieve list of stored procedures'));
  47          while($row = mssql_fetch_assoc($view_query))
  48          {
  49              if($row['Object_type'] == 'view' && ($row['Owner'] == 'dbo' || $_SETTINGS['showsysdata']))
  50              {
  51                  if($toggle)
  52                      $bg = $colors[0];
  53                  else
  54                      $bg = $colors[1];
  55      
  56                  $toggle = !$toggle;
  57      
  58                  echo '<tr>';
  59                  echo('<td align="center" style="background: ' . $bg . '"><input type="checkbox" name="views[]" value="' . $row['Name'] . '"></td>');
  60                  echo('<td style="background: ' . $bg . '" nowrap>' . $row['Name'] . '</td>');
  61                  echo('<td align="center" style="background: ' . $bg . '"><a href="table_select.php?view=' . urlencode($row['Name']) . '">Select</a></td>');
  62                  echo('<td align="center" style="background: ' . $bg . '"><a href="view_modify.php?view=' . urlencode($row['Name']) . '">Modify</a></td>');
  63                  echo('<td align="center" style="background: ' . $bg . '"><a href="view_drop.php?view=' . urlencode($row['Name']) . '&returnto=view_list.php">Drop</a></td>');
  64                  echo '</tr>';
  65      
  66                  unset($row);
  67              }
  68          }
  69      ?>
  70  </table>
  71  </form>
  72  
  73  <?php include ('inc/footer.php'); ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]