$product_query = smn_db_query("select p.products_id, pd.language_id, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int) $_GET['pID'] . "'");
     $product = smn_db_fetch_array($product_query);
     $pInfo = new objectInfo($product);
     $products_image_name = $pInfo->products_image;
 }
 $form_action = isset($_GET['pID']) ? 'update_product' : 'insert_product';
 echo smn_draw_form($form_action, FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . '&action=' . $form_action, 'post', 'enctype="multipart/form-data"');
 $languages = smn_get_languages();
 for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
     if (isset($_GET['read']) && $_GET['read'] == 'only') {
         $pInfo->products_name = smn_get_products_name($pInfo->products_id, $languages[$i]['id']);
         $pInfo->products_description = smn_get_products_description($pInfo->products_id, $languages[$i]['id']);
         $pInfo->products_head_title_tag = smn_db_prepare_input($products_head_title_tag[$languages[$i]['id']]);
         $pInfo->products_head_desc_tag = smn_db_prepare_input($products_head_desc_tag[$languages[$i]['id']]);
         $pInfo->products_head_keywords_tag = smn_db_prepare_input($products_head_keywords_tag[$languages[$i]['id']]);
         $pInfo->products_url = smn_get_products_url($pInfo->products_id, $languages[$i]['id']);
     } else {
         $pInfo->products_name = smn_db_prepare_input($products_name[$languages[$i]['id']]);
         $pInfo->products_description = smn_db_prepare_input($products_description[$languages[$i]['id']]);
         $pInfo->products_head_title_tag = smn_db_prepare_input($products_head_title_tag[$languages[$i]['id']]);
         $pInfo->products_head_desc_tag = smn_db_prepare_input($products_head_desc_tag[$languages[$i]['id']]);
         $pInfo->products_head_keywords_tag = smn_db_prepare_input($products_head_keywords_tag[$languages[$i]['id']]);
         $pInfo->products_url = smn_db_prepare_input($products_url[$languages[$i]['id']]);
     }
     ?>
 <table border="0" width="100%" cellspacing="0" cellpadding="0">
   <tr>
     <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
       <tr>
         <td class="pageHeading"><?php 
     echo smn_image(DIR_WS_CATALOG_LANGUAGES . 'images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . $pInfo->products_name;
Beispiel #2
0
echo smn_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
  </tr>          
<?php 
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
    ?>
  <tr>
   <td class="main"><?php 
    if ($i == 0) {
        echo TEXT_PRODUCTS_URL . '<br>' . TEXT_PRODUCTS_URL_WITHOUT_HTTP . '';
    }
    ?>
</td>
   <td><?php 
    echo smn_image(DIR_WS_CATALOG_LANGUAGES . 'images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . smn_draw_input_field('products_url[' . $languages[$i]['id'] . ']', isset($products_url[$languages[$i]['id']]) ? stripslashes($products_url[$languages[$i]['id']]) : smn_get_products_url($pInfo->products_id, $languages[$i]['id']));
    ?>
</td>
  </tr>
<?php 
}
?>
  <tr>
   <td colspan="2"><?php 
echo smn_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
  </tr>
  <tr>
   <td class="main"><?php 
echo TEXT_PRODUCTS_MANUFACTURER;
      $product = smn_db_fetch_array($product_query);
      $pInfo = $product;
      $products_image_name = $pInfo[products_image];
    }

    $form_action = (isset($_GET['pID'])) ? 'update_store_product' : 'insert_product';
    echo smn_draw_form($form_action, FILENAME_STORE_PRODUCT_CATEGORIES.'?ID='.$store_id.'&cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . '&action=' . $form_action, 'post', 'enctype="multipart/form-data"');
    $languages = smn_get_languages();
    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
      if (isset($_GET['read']) && ($_GET['read'] == 'only')) {
        $pInfo[products_name] = smn_get_products_name($pInfo[products_id], $languages[$i]['id']);
        $pInfo[products_description] = smn_get_products_description($pInfo[products_id], $languages[$i]['id']);
        $pInfo[products_head_title_tag] = $products_head_title_tag[$languages[$i]['id']];
        $pInfo[products_head_desc_tag]= $products_head_desc_tag[$languages[$i]['id']];
        $pInfo[products_head_keywords_tag] = $products_head_keywords_tag[$languages[$i]['id']];
        $pInfo[products_url] = smn_get_products_url($pInfo[products_id], $languages[$i]['id']);
      } else {
        $pInfo[products_name] = smn_db_prepare_input($products_name[$languages[$i]['id']]);
        $pInfo[products_description] = $products_description[$languages[$i]['id']];
        $pInfo[products_head_title_tag] = $products_head_title_tag[$languages[$i]['id']];
        $pInfo[products_head_desc_tag]= $products_head_desc_tag[$languages[$i]['id']];
        $pInfo[products_head_keywords_tag] = $products_head_keywords_tag[$languages[$i]['id']];
        $pInfo[products_url] = smn_db_prepare_input($products_url[$languages[$i]['id']]);
      } 
?>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php echo smn_image(DIR_WS_LANGUAGES .  'images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . $pInfo[products_name]; ?></td>
            <td class="pageHeading" align="right"><?php echo $currencies->format($pInfo[products_price]); ?></td>