[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/admin/attributeManager/includes/ -> attributeManagerUpdateAtomic.inc.php (source)

   1  <?php
   2  /*
   3    $Id: attributeManagerUpdateAtomic.inc.php,v 1.0 21/02/06 Sam West$
   4  
   5    osCommerce, Open Source E-Commerce Solutions
   6    http://www.oscommerce.com
   7  
   8    Released under the GNU General Public License
   9    
  10    Copyright  2006 Kangaroo Partners
  11    http://kangaroopartners.com
  12    [email protected]
  13  */
  14  
  15  require_once('attributeManager/classes/attributeManagerConfig.class.php');
  16  require_once('attributeManager/classes/amDB.class.php');
  17  require_once('attributeManager/classes/stopDirectAccess.class.php');
  18  
  19  
  20  // Check the session var exists
  21  if(is_array($AM_SESSION_VAR_NAME}) && is_numeric($products_id)){
  22      foreach($AM_SESSION_VAR_NAME} as $newAttribute) {
  23          
  24          $newAttributeData = array(
  25              'products_id' => $products_id,
  26              'options_id' => amDB::input($newAttribute['option_id']),
  27                  'options_values_id' => amDB::input($newAttribute['option_value_id']),
  28                  'options_values_price' => amDB::input($newAttribute['price']),
  29                  'price_prefix' => amDB::input($newAttribute['prefix'])
  30              );
  31              if (AM_USE_SORT_ORDER) {
  32                  $newAttributeData[AM_FIELD_OPTION_VALUE_SORT_ORDER] = amDB::input($newAttribute['sortOrder']);
  33              }
  34          
  35          // insert it into the database
  36          amDB::perform(TABLE_PRODUCTS_ATTRIBUTES, $newAttributeData);
  37      }
  38      
  39      /**
  40       * Delete the temporary session var
  41       */
  42      amSessionUnregister(AM_SESSION_VAR_NAME);
  43  
  44      /**
  45       * remove the direct access authorization so that if the session is hijacked they wont be able
  46       * access the attributeManagerFile directly without first going to the product addition page.
  47       * If thats not secured then it doesn't really matter what this script does they have compleate access anyway im not at fault
  48       */
  49      stopDirectAccess::deAuthorise(AM_SESSION_VALID_INCLUDE);
  50  }
  51  
  52  ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7