[ Index ]

PHP Cross Reference of Drupal 6 (heimberg)

title

Body

[close]

/ -> update_category_handler.php (source)

   1  <?php
   2  if($_REQUEST[name] != null){
   3      $requestName = addslashes($_REQUEST[name]);
   4      $state = $_REQUEST[state];
   5      $sql = "UPDATE category SET name = '" . $requestName . "', state = '" . $state . "', parentCatId = ";
   6  
   7      if($_REQUEST[parentCategoryList] ==""){
   8          $sql = $sql . "null";
   9      } else {
  10          $sql = $sql . "'" . $_REQUEST[parentCategoryList] . "'";
  11      }
  12      $sql = $sql . " where id = " . $_REQUEST[id];
  13      require_once ('DbLib-12.php');
  14      $db = &new DbLibMySQL;
  15      $db->OpenConnection();
  16      $db->Query($sql);
  17      if($_REQUEST[parentCategoryList] != null) {
  18          $sql = "select name from category where id = $_REQUEST[parentCategoryList]";
  19          $db->Query($sql);
  20          $db->GetNextRecord();
  21          $catName = $db->GetField('name');
  22      } else {
  23          $catName = "";
  24      }
  25      $sql = "SELECT id FROM category where name = '$requestName'";
  26      $db->Query($sql);
  27      $db->GetNextRecord();
  28      $id = $db->GetField('id');
  29      $db->CloseConnection();
  30  
  31      $msg = "The category was changed.";
  32  } else {
  33      //redirect

  34      header( 'Location: update.php' ) ;
  35  }
  36  ?>
  37  
  38  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/content_mgt.dwt" codeOutsideHTMLIsLocked="false" -->
  39  <head>
  40  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  41  <!-- InstanceBeginEditable name="doctitle" -->
  42  <title>Handler for the Modify a Category Form</title>
  43  <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
  44  <!-- InstanceEndEditable -->
  45  <link href="../css/styles_plus_one.css" rel="stylesheet" type="text/css" />
  46  <link href="../css/styles_plus_two.css" rel="stylesheet" type="text/css" />
  47  <link href="../css/styles.css" rel="stylesheet" type="text/css" />
  48  <script src="../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
  49  <script src="../Scripts/utility.js" type="text/javascript"></script>
  50  
  51  <!-- InstanceBeginEditable name="head" -->
  52          
  53          <meta name="generator" content="Adobe GoLive 5" />
  54          
  55      <!-- InstanceEndEditable -->
  56  </head>
  57  
  58  <body>
  59  <div id="wrapper">
  60   <div id="topBar"><a href="../site_search.html">Search</a><a href="../faqs.html">FAQs</a><a href="../sitemap.html">Site Map</a></div> 
  61    <div id="headerBar"><script type="text/javascript">
  62  AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0','width','770','height','120','src','../swf/header2','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','../swf/header2' ); //end AC code

  63  </script><noscript>
  64      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="770" height="120">
  65        <param name="movie" value="../swf/header2.swf" />
  66        <param name="quality" value="high" />
  67        <embed src="../swf/header2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="770" height="120"></embed>
  68      </object></noscript>
  69    </div> 
  70    <div id="navBar">
  71        <a href="../index.html" class="menuItem">Home</a>
  72      <a href="../firm/our_firm.html" class="menuItem">Our Firm</a>
  73      <a href="../results/verdicts_settlements.html" class="menuItem">Verdicts &amp; Settlements</a>
  74      <a href="../practices/our_practices.html" class="menuItem">Our Practices</a>
  75      <a href="../attorneys/attorneys_staff.html" class="menuItem">Our Attorneys</a>
  76      <a href="resources.html" class="menuItem">Resources</a>
  77      <a href="../community/community_outreach.html" class="menuItem">Community Outreach</a>
  78      <a href="../contact/contact.html" class="menuItem">Contact Us</a>
  79      
  80      
  81    </div>
  82    
  83    
  84    <div id="mainBody">
  85        <table width="100%" border="0" cellspacing="0" cellpadding="0">
  86    <tr>
  87      <td id="leftNav">
  88          <a href="the_guide.php" class="subNav">THE GUIDE</a>
  89        <br/>
  90        <a href="add_category.php" class="subNav">Add a Category</a>
  91        <a href="delete_category.php" class="subNav">Delete a Category</a>
  92          <a href="update_category_chooser.php" class="subNav">Modify a Category</a>
  93        <br/>
  94          <a href="add_organization.php" class="subNav">Add an Organization</a>
  95        <a href="delete_organization.php" class="subNav">Delete an Organization</a>
  96          <a href="update_organization_chooser.php" class="subNav">Modify an Organization</a>
  97        
  98        </td>
  99      <td id="contentArea">
 100          
 101  
 102      
 103      
 104      <!-- InstanceBeginEditable name="contentRegion" -->
 105          <h1>Modify a Category</h1>
 106          <p><?php echo $msg ?></p>
 107  
 108          <br />Name: <?php echo $_REQUEST[name] ?>
 109          <br />State: <?php echo $_REQUEST[state] ?>
 110          <br />Parent Category: <?php echo $catName; ?>
 111  
 112          <p></p>
 113          <p><a href="update_category.php?categoryList=<?php echo $id;?>">Modify Category</a></p>
 114  
 115      <!-- InstanceEndEditable --></td>
 116    </tr>
 117  </table>
 118  </div>
 119  <div id="addressBar">1801 Century Park East - Suite 1920 - Los Angeles CA 90067 | TEL: (310) 553-1799 | Toll-Free: (800) 425-5557<br />
 120  2700 N. Central Avenue - Suite 1400 - Phoenix AZ 85004 | TEL:  (602) 285-4406 | Toll-Free: (800) 425-5557</div>
 121    <div id="footerBar">
 122      <table width="100%" border="0" cellspacing="0" cellpadding="0">
 123        <tr>
 124          <td style="padding-left:12px">&copy; Copyright 2006 Heimberg Law Group, LLP. &nbsp;All Rights Reserved. </td>
 125          <td align="right" style="padding-right:12px"><a href="../disclaimer.html">Disclaimer</a></td>
 126        </tr>
 127      </table>
 128    </div>
 129  </div>
 130  </body>
 131  <!-- InstanceEnd --></html>


Generated: Wed Mar 23 13:22:29 2011 Cross-referenced by PHPXref 0.7