Jump to content



Photo
- - - - -

Parse error: syntax error, unexpected '}'


This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1   WebDev22

WebDev22
  • Members
  • 451 posts

Posted 05 November 2009 - 14:25

Can anyone find out why I'm getting this message? The error occurs when we click on "Catalog" in Admin:
Parse error: syntax error, unexpected '}' in /home/server/public_html/wolffengine/categories.php on line 799

Line 797 <!-- /*** Begin Header Tags SEO ***/ //-->     
Line 798 <?php
Line 799  } elseif ($action == 'new_product_preview') {
Line 800    if (tep_not_null($HTTP_POST_VARS)) {
Line 801      $pInfo = new objectInfo($HTTP_POST_VARS);
      $products_name = $HTTP_POST_VARS['products_name'];
      $products_description = $HTTP_POST_VARS['products_description'];
      $products_head_title_tag = $HTTP_POST_VARS['products_head_title_tag'];
      $products_head_desc_tag = $HTTP_POST_VARS['products_head_desc_tag'];
      $products_head_keywords_tag = $HTTP_POST_VARS['products_head_keywords_tag'];
      $products_url = $HTTP_POST_VARS['products_url'];
    } else {
//MVS
      $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_quantity, p.products_model, p.vendors_prod_id, p.products_image, p.products_price, p.vendors_product_price, p.products_weight, p.vendors_prod_comments, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id, p.vendors_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");
      $product = tep_db_fetch_array($product_query);
 /*** End Header Tags SEO ***/
      $pInfo = new objectInfo($product);
      $products_image_name = $pInfo->products_image;
    }

    $form_action = (isset($HTTP_GET_VARS['pID'])) ? 'update_product' : 'insert_product';

    echo tep_draw_form($form_action, FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=' . $form_action, 'post', 'enctype="multipart/form-data"');

    /*** Begin Header Tags SEO ***/       
    $languages = tep_get_languages();
    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
      if (isset($HTTP_GET_VARS['read']) && ($HTTP_GET_VARS['read'] == 'only')) {
        $pInfo->products_name = tep_get_products_name($pInfo->products_id, $languages[$i]['id']);
        $pInfo->products_description = tep_get_products_description($pInfo->products_id, $languages[$i]['id']);
        $pInfo->products_head_title_tag = tep_db_prepare_input($products_head_title_tag[$languages[$i]['id']]);
        $pInfo->products_head_desc_tag = tep_db_prepare_input($products_head_desc_tag[$languages[$i]['id']]);
        $pInfo->products_head_keywords_tag = tep_db_prepare_input($products_head_keywords_tag[$languages[$i]['id']]);
        $pInfo->products_url = tep_get_products_url($pInfo->products_id, $languages[$i]['id']);
      } else {
        $pInfo->products_name = tep_db_prepare_input($products_name[$languages[$i]['id']]);
        $pInfo->products_description = tep_db_prepare_input($products_description[$languages[$i]['id']]);
        $pInfo->products_head_title_tag = tep_db_prepare_input($products_head_title_tag[$languages[$i]['id']]);
        $pInfo->products_head_desc_tag = tep_db_prepare_input($products_head_desc_tag[$languages[$i]['id']]);
        $pInfo->products_head_keywords_tag = tep_db_prepare_input($products_head_keywords_tag[$languages[$i]['id']]);
        $pInfo->products_url = tep_db_prepare_input($products_url[$languages[$i]['id']]);
      }         
    /*** End Header Tags SEO ***/


#2 ONLINE   multimixer

multimixer

    Lemons or Melons ?

  • Partner
  • 4,556 posts

Posted 05 November 2009 - 15:16

ost the code again from line 750 till 800

#3   WebDev22

WebDev22
  • Members
  • 451 posts

Posted 05 November 2009 - 15:29

ost the code again from line 750 till 800

Here's the code from 749 to 800
Line 749 <?php  //MVS start ?>
Line 750          <tr>
            <td class="main"><?php echo TEXT_VENDORS_PROD_ID; ?></td>
            <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_draw_input_field('vendors_prod_id', $pInfo->vendors_prod_id); ?></td>
          </tr>
<?php  //MVS end ?>
          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_MODEL; ?></td>
            <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_draw_input_field('products_model', $pInfo->products_model); ?></td>
          </tr>
          <tr>
Line 760            <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td>
            <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_draw_file_field('products_image') . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . $pInfo->products_image . tep_draw_hidden_field('products_previous_image', $pInfo->products_image); ?></td>
          </tr>
          <tr>
            <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
<?php
Line 770    for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
          <tr>
            <td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_URL . '<br><small>' . TEXT_PRODUCTS_URL_WITHOUT_HTTP . '</small>'; ?></td>
            <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('products_url[' . $languages[$i]['id'] . ']', (isset($products_url[$languages[$i]['id']]) ? stripslashes($products_url[$languages[$i]['id']]) : tep_get_products_url($pInfo->products_id, $languages[$i]['id']))); ?></td>
          </tr>
<?php
    }
?>
          <tr>
            <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TEXT_PRODUCTS_WEIGHT; ?></td>
            <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_draw_input_field('products_weight', $pInfo->products_weight); ?></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
      </tr>
      <tr>
        <td class="main" align="right"><?php echo tep_draw_hidden_field('products_date_added', (tep_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . tep_image_submit('button_preview.gif', IMAGE_PREVIEW) . '&nbsp;&nbsp;<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>
      </tr>
    </table></form>


Line 797 <!-- /*** Begin Header Tags SEO ***/ //-->     
Line 798 <?php
Line 799  } elseif ($action == 'new_product_preview') {
Line 800    if (tep_not_null($HTTP_POST_VARS)) {


#4 ONLINE   multimixer

multimixer

    Lemons or Melons ?

  • Partner
  • 4,556 posts

Posted 05 November 2009 - 15:39

Well, I'm sorry, the error starts more up

The point is: On line 799 you have this
} elseif ($action == 'new_product_preview') {

The error says that this -- } -- is unexpected.

The question is why? Because one opening -- { -- is missing above line 799, to what the closing --}-- is corresponding. This needs to be identified.

Probably you made a mistake somewhere when merging contributions together. Maybe the best is you start for this file over again from your backup

#5   WebDev22

WebDev22
  • Members
  • 451 posts

Posted 05 November 2009 - 15:49

Here are lines 1 through 1004. Thanks for looking at it:
1 <?php
2 /*
3 $Id: categories.php 1755 2007-12-21 14:02:36Z hpdl $
4 $Loc: /catalog/admin/ $
5 $Mod: MVS V1.2 2009/02/28 JCK/CWG $
6
7 osCommerce, Open Source E-Commerce Solutions
8 http://www.oscommerce.com
9
10 Copyright (c) 2007 osCommerce
11
12 Released under the GNU General Public License
13 */
14
15 require('includes/application_top.php');
16
17 require(DIR_WS_CLASSES . 'currencies.php');
18 $currencies = new currencies();
19
20 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
21
22 if (tep_not_null($action)) {
23 switch ($action) {
24 case 'setflag':
25 if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {
26 if (isset($HTTP_GET_VARS['pID'])) {
27 tep_set_product_status($HTTP_GET_VARS['pID'], $HTTP_GET_VARS['flag']);
28 }
29
30 if (USE_CACHE == 'true') {
31 tep_reset_cache_block('categories');
32 tep_reset_cache_block('also_purchased');
33 }
34 }
35
36 tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $HTTP_GET_VARS['cPath'] . '&pID=' . $HTT
P_GET_VARS['pID']));
37 break;
38 case 'insert_category':
39 case 'update_category':
40 if (isset($HTTP_POST_VARS['categories_id'])) $categories_id = tep_db_prepare_input($HTTP_POST_VARS[
'categories_id']);
41 $sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']);
42
43 $sql_data_array = array('sort_order' => (int)$sort_order);
44
45 if ($action == 'insert_category') {
46 $insert_sql_data = array('parent_id' => $current_category_id,
47 'date_added' => 'now()');
48
49 $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
50
51 tep_db_perform(TABLE_CATEGORIES, $sql_data_array);
52
53 $categories_id = tep_db_insert_id();
54 } elseif ($action == 'update_category') {
55 $update_sql_data = array('last_modified' => 'now()');
56
57 $sql_data_array = array_merge($sql_data_array, $update_sql_data);
58
59 tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . (int)$categorie
s_id . "'");
60 }
61
62 $languages = tep_get_languages();
63 for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
64 $categories_name_array = $HTTP_POST_VARS['categories_name'];
65
66 /*** Begin Header Tags SEO ***/
67 $categories_htc_title_array = $HTTP_POST_VARS['categories_htc_title_tag'];
68 $categories_htc_desc_array = $HTTP_POST_VARS['categories_htc_desc_tag'];
69 $categories_htc_keywords_array = $HTTP_POST_VARS['categories_htc_keywords_tag'];
70 $categories_htc_description_array = $HTTP_POST_VARS['categories_htc_description'];
71 /*** End Header Tags SEO ***/
72
73 $language_id = $languages[$i]['id'];
74
75 /*** Begin Header Tags SEO ***/
76 $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id
]),
77 'categories_htc_title_tag' => (tep_not_null($categories_htc_title_array[$language_id]) ? tep_db_
C:\Documents and Settings\All Users\Documents\My Music\Sample Music\New Folder\wt20091103\public_html\admin\categories.php: 1/21
prepare_input(strip_tags($categories_htc_title_array[$language_id])) : tep_db_prepare_input(strip_tags($ca
tegories_name_array[$language_id]))),
78 'categories_htc_desc_tag' => (tep_not_null($categories_htc_desc_array[$language_id]) ? tep_db_pr
epare_input($categories_htc_desc_array[$language_id]) : tep_db_prepare_input($categories_name_array[$langu
age_id])),
79 'categories_htc_keywords_tag' => (tep_not_null($categories_htc_keywords_array[$language_id]) ? t
ep_db_prepare_input(strip_tags($categories_htc_keywords_array[$language_id])) : tep_db_prepare_input(strip
_tags($categories_name_array[$language_id]))),
80 'categories_htc_description' => tep_db_prepare_input($categories_htc_description_array[$language
_id]));
81 /*** End Header Tags SEO ***/
82
83 if ($action == 'insert_category') {
84 $insert_sql_data = array('categories_id' => $categories_id,
85 'language_id' => $languages[$i]['id']);
86
87 $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
88
89 tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array);
90 } elseif ($action == 'update_category') {
91 tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array, 'update', "categories_id = '" . (
int)$categories_id . "' and language_id = '" . (int)$languages[$i]['id'] . "'");
92 }
93 }
94
95 $categories_image = new upload('categories_image');
96 $categories_image->set_destination(DIR_FS_CATALOG_IMAGES);
97
98 if ($categories_image->parse() && $categories_image->save()) {
99 tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categorie
s_image->filename) . "' where categories_id = '" . (int)$categories_id . "'");
100 }
101
102 if (USE_CACHE == 'true') {
103 tep_reset_cache_block('categories');
104 tep_reset_cache_block('also_purchased');
105 }
106
107 tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories_id));
108 break;
109 case 'delete_category_confirm':
110 if (isset($HTTP_POST_VARS['categories_id'])) {
111 $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']);
112
113 $categories = tep_get_category_tree($categories_id, '', '0', '', true);
114 $products = array();
115 $products_delete = array();
116
117 for ($i=0, $n=sizeof($categories); $i<$n; $i++) {
118 $product_ids_query = tep_db_query("select products_id from " . TABLE_PRODUCTS_TO_CATEGORIES . "
where categories_id = '" . (int)$categories[$i]['id'] . "'");
119
120 while ($product_ids = tep_db_fetch_array($product_ids_query)) {
121 $products[$product_ids['products_id']]['categories'][] = $categories[$i]['id'];
122 }
123 }
124
125 reset($products);
126 while (list($key, $value) = each($products)) {
127 $category_ids = '';
128
129 for ($i=0, $n=sizeof($value['categories']); $i<$n; $i++) {
130 $category_ids .= "'" . (int)$value['categories'][$i] . "', ";
131 }
132 $category_ids = substr($category_ids, 0, -2);
133
134 $check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . "
where products_id = '" . (int)$key . "' and categories_id not in (" . $category_ids . ")");
135 $check = tep_db_fetch_array($check_query);
136 if ($check['total'] < '1') {
137 $products_delete[$key] = $key;
138 }
139 }
140
141 // removing categories can be a lengthy process
142 tep_set_time_limit(0);
143 for ($i=0, $n=sizeof($categories); $i<$n; $i++) {
144 tep_remove_category($categories[$i]['id']);
145 }
146
147 reset($products_delete);
C:\Documents and Settings\All Users\Documents\My Music\Sample Music\New Folder\wt20091103\public_html\admin\categories.php: 2/21
148 while (list($key) = each($products_delete)) {
149 tep_remove_product($key);
150 }
151 }
152
153 if (USE_CACHE == 'true') {
154 tep_reset_cache_block('categories');
155 tep_reset_cache_block('also_purchased');
156 }
157
158 tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath));
159 break;
160 case 'delete_product_confirm':
161 if (isset($HTTP_POST_VARS['products_id']) && isset($HTTP_POST_VARS['product_categories']) && is_arr
ay($HTTP_POST_VARS['product_categories'])) {
162 $product_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);
163 $product_categories = $HTTP_POST_VARS['product_categories'];
164
165 for ($i=0, $n=sizeof($product_categories); $i<$n; $i++) {
166 tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$p
roduct_id . "' and categories_id = '" . (int)$product_categories[$i] . "'");
167 }
168
169 $product_categories_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CAT
EGORIES . " where products_id = '" . (int)$product_id . "'");
170 $product_categories = tep_db_fetch_array($product_categories_query);
171
172 if ($product_categories['total'] == '0') {
173 tep_remove_product($product_id);
174 }
175 }
176
177 if (USE_CACHE == 'true') {
178 tep_reset_cache_block('categories');
179 tep_reset_cache_block('also_purchased');
180 }
181
182 tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath));
183 break;
184 case 'move_category_confirm':
185 if (isset($HTTP_POST_VARS['categories_id']) && ($HTTP_POST_VARS['categories_id'] != $HTTP_POST_VARS
['move_to_category_id'])) {
186 $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']);
187 $new_parent_id = tep_db_prepare_input($HTTP_POST_VARS['move_to_category_id']);
188
189 $path = explode('_', tep_get_generated_category_path_ids($new_parent_id));
190
191 if (in_array($categories_id, $path)) {
192 $messageStack->add_session(ERROR_CANNOT_MOVE_CATEGORY_TO_PARENT, 'error');
193
194 tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories_id));
195 } else {
196 tep_db_query("update " . TABLE_CATEGORIES . " set parent_id = '" . (int)$new_parent_id . "', la
st_modified = now() where categories_id = '" . (int)$categories_id . "'");
197
198 if (USE_CACHE == 'true') {
199 tep_reset_cache_block('categories');
200 tep_reset_cache_block('also_purchased');
201 }
202
203 tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $new_parent_id . '&cID=' . $categori
es_id));
204 }
205 }
206
207 break;
208 case 'move_product_confirm':
209 $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);
210 $new_parent_id = tep_db_prepare_input($HTTP_POST_VARS['move_to_category_id']);
211
212 $duplicate_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORI
ES . " where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$new_parent_id . "'");
213 $duplicate_check = tep_db_fetch_array($duplicate_check_query);
214 if ($duplicate_check['total'] < 1) tep_db_query("update " . TABLE_PRODUCTS_TO_CATEGORIES . " set ca
tegories_id = '" . (int)$new_parent_id . "' where products_id = '" . (int)$products_id . "' and categories_
id = '" . (int)$current_category_id . "'");
215
216 if (USE_CACHE == 'true') {
217 tep_reset_cache_block('categories');
218 tep_reset_cache_block('also_purchased');
219 }
C:\Documents and Settings\All Users\Documents\My Music\Sample Music\New Folder\wt20091103\public_html\admin\categories.php: 3/21
220
221 tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $new_parent_id . '&pID=' . $products_id)
);
222 break;
223 case 'insert_product':
224 case 'update_product':
225 if (isset($HTTP_POST_VARS['edit_x']) || isset($HTTP_POST_VARS['edit_y'])) {
226 $action = 'new_product';
227 } else {
228 if (isset($HTTP_GET_VARS['pID'])) $products_id = tep_db_prepare_input($HTTP_GET_VARS['pID']);
229 $products_date_available = tep_db_prepare_input($HTTP_POST_VARS['products_date_available']);
230
231 $products_date_available = (date('Y-m-d') < $products_date_available) ? $products_date_available
: 'null';
232
233 $sql_data_array = array('products_quantity' => (int)tep_db_prepare_input($HTTP_POST_VARS['product
s_quantity']),
234 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model'
]),
235 //MVS start
236 'vendors_prod_id' => tep_db_prepare_input($HTTP_POST_VARS['vendors_prod_i
d']),
237 'vendors_product_price' => tep_db_prepare_input($HTTP_POST_VARS['vendors_
product_price']),
238 'vendors_id' => tep_db_prepare_input($HTTP_POST_VARS['vendors_id']),
239 'vendors_prod_comments' => tep_db_prepare_input($HTTP_POST_VARS['vendors_
prod_comments']),
240 //MVS end
241 'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price'
]),
242 'products_date_available' => $products_date_available,
243 'products_weight' => (float)tep_db_prepare_input($HTTP_POST_VARS['product
s_weight']),
244 'products_status' => tep_db_prepare_input($HTTP_POST_VARS['products_statu
s']),
245 'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products
_tax_class_id']),
246 //---FedEx Freight Modification START ---//
247 // 'products_fxf_class' => tep_db_prepare_input($HTTP_POST_VARS['products_
fxf_class']),
248 // 'products_fxf_desc' => tep_db_prepare_input($HTTP_POST_VARS['products_f
xf_desc']),
249 // 'products_fxf_nmfc' => tep_db_prepare_input($HTTP_POST_VARS['products_f
xf_nmfc']),
250 // 'products_fxf_haz' => tep_db_prepare_input($HTTP_POST_VARS['products_fx
f_haz']),
251 // 'products_fxf_freezable' => tep_db_prepare_input($HTTP_POST_VARS['produ
cts_fxf_freezable']),
252 //---FedEx Freight Modification END ---//
253 'manufacturers_id' => (int)tep_db_prepare_input($HTTP_POST_VARS['manufact
urers_id']));
254
255 if (isset($HTTP_POST_VARS['products_image']) && tep_not_null($HTTP_POST_VARS['products_image']) &
& ($HTTP_POST_VARS['products_image'] != 'none')) {
256 $sql_data_array['products_image'] = tep_db_prepare_input($HTTP_POST_VARS['products_image']);
257 }
258
259 if ($action == 'insert_product') {
260 $insert_sql_data = array('products_date_added' => 'now()');
261
262 $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
263
264 tep_db_perform(TABLE_PRODUCTS, $sql_data_array);
265 $products_id = tep_db_insert_id();
266
267 tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) val
ues ('" . (int)$products_id . "', '" . (int)$current_category_id . "')");
268 } elseif ($action == 'update_product') {
269 $update_sql_data = array('products_last_modified' => 'now()');
270
271 $sql_data_array = array_merge($sql_data_array, $update_sql_data);
272
273 tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id
. "'");
274 }
275
276 $languages = tep_get_languages();
277 for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
278 $language_id = $languages[$i]['id'];
279
280 /*** Begin Header Tags SEO ***/
C:\Documents and Settings\All Users\Documents\My Music\Sample Music\New Folder\wt20091103\public_html\admin\categories.php: 4/21
281 $sql_data_array = array('products_name' => tep_db_prepare_input($HTTP_POST_VARS['products_name'
][$language_id]),
282 'products_description' => tep_db_prepare_input($HTTP_POST_VARS['product
s_description'][$language_id]),
283 'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][
$language_id]),
284 'products_head_title_tag' => ((tep_not_null($HTTP_POST_VARS['products_h
ead_title_tag'][$language_id])) ? tep_db_prepare_input(strip_tags($HTTP_POST_VARS['products_head_title_tag'
][$language_id])) : tep_db_prepare_input(strip_tags($HTTP_POST_VARS['products_name'][$language_id]))),
285 'products_head_desc_tag' => ((tep_not_null($HTTP_POST_VARS['products_he
ad_desc_tag'][$language_id])) ? tep_db_prepare_input($HTTP_POST_VARS['products_head_desc_tag'][$language_id
]) : tep_db_prepare_input($HTTP_POST_VARS['products_name'][$language_id])),
286 'products_head_keywords_tag' => ((tep_not_null($HTTP_POST_VARS['product
s_head_keywords_tag'][$language_id])) ? tep_db_prepare_input(strip_tags($HTTP_POST_VARS['products_head_keyw
ords_tag'][$language_id])) : tep_db_prepare_input(strip_tags($HTTP_POST_VARS['products_name'][$language_id]
))));
287 /*** End Header Tags SEO ***/
288
289 if ($action == 'insert_product') {
290 $insert_sql_data = array('products_id' => $products_id,
291 'language_id' => $language_id);
292
293 $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
294
295 tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array);
296 } elseif ($action == 'update_product') {
297 tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (in
t)$products_id . "' and language_id = '" . (int)$language_id . "'");
298 }
299 }
300
301 if (USE_CACHE == 'true') {
302 tep_reset_cache_block('categories');
303 tep_reset_cache_block('also_purchased');
304 }
305
306 tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id));
307 }
308 break;
309 case 'copy_to_confirm':
310 if (isset($HTTP_POST_VARS['products_id']) && isset($HTTP_POST_VARS['categories_id'])) {
311 $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);
312 $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']);
313
314 if ($HTTP_POST_VARS['copy_as'] == 'link') {
315 if ($categories_id != $current_category_id) {
316 $check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES .
" where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$categories_id . "'");
317 $check = tep_db_fetch_array($check_query);
318 if ($check['total'] < '1') {
319 tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id)
values ('" . (int)$products_id . "', '" . (int)$categories_id . "')");
320 }
321 } else {
322 $messageStack->add_session(ERROR_CANNOT_LINK_TO_SAME_CATEGORY, 'error');
323 }
324 } elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') {
325 //MVS
326 $product_query = tep_db_query("select products_quantity, products_model, vendors_prod_id, produ
cts_image, products_price, vendors_product_price, vendors_prod_comments, products_date_added, products_date
_available, products_weight, products_status, products_tax_class_id, vendors_id, manufacturers_id from " .
TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
327 $product = tep_db_fetch_array($product_query);
328
329 //MVS
330 tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model, vendors_pr
od_id, products_image, products_price, vendors_product_price, vendors_prod_comments, products_date_added, p
roducts_date_available, products_weight, products_status, products_tax_class_id, vendors_id, manufacturers_
id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_mod
el']) . "', '" . tep_db_input($product['vendors_prod_id']) . "', '" . tep_db_input($product['products_image
']) . "', '" . tep_db_input($product['products_price']) . "', '" . tep_db_input($product['vendors_product_p
rice']) . "', '" . tep_db_input($product['vendors_prod_comments']) . "', now(), '" . tep_db_input($product
['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '" . tep_db_input($
product['products_status']) . "', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['ven
dors_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
331 $dup_products_id = tep_db_insert_id();
332
333 /*** Begin Header Tags SEO ***/
334 $description_query = tep_db_query("select language_id, products_name, products_description, pro
ducts_head_title_tag, products_head_desc_tag, products_head_keywords_tag, products_url from " . TABLE_PRODU
CTS_DESCRIPTION . " where products_id = '" . (int)$products_id . "'");
C:\Documents and Settings\All Users\Documents\My Music\Sample Music\New Folder\wt20091103\public_html\admin\categories.php: 5/21
335 while ($description = tep_db_fetch_array($description_query)) {
336 tep_db_query("insert into " . TABLE_PRODUCTS_DESCRIPTION . " (products_id, language_id, produ
cts_name, products_description, products_head_title_tag, products_head_desc_tag, products_head_keywords_tag
, products_url, products_viewed) values ('" . (int)$dup_products_id . "', '" . (int)$description['language_
id'] . "', '" . tep_db_input($description['products_name']) . "', '" . tep_db_input($description['products_
description']) . "', '" . tep_db_input($description['products_head_title_tag']) . "', '" . tep_db_input($de
scription['products_head_desc_tag']) . "', '" . tep_db_input($description['products_head_keywords_tag']) .
"', '" . tep_db_input($description['products_url']) . "', '0')");
337 }
338 /*** End Header Tags SEO ***/
339
340 tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) val
ues ('" . (int)$dup_products_id . "', '" . (int)$categories_id . "')");
341 $products_id = $dup_products_id;
342 }
343
344 if (USE_CACHE == 'true') {
345 tep_reset_cache_block('categories');
346 tep_reset_cache_block('also_purchased');
347 }
348 }
349
350 tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $categories_id . '&pID=' . $products_id)
);
351 break;
352 case 'new_product_preview':
353 // copy image only if modified
354 $products_image = new upload('products_image');
355 $products_image->set_destination(DIR_FS_CATALOG_IMAGES);
356 if ($products_image->parse() && $products_image->save()) {
357 $products_image_name = $products_image->filename;
358 } else {
359 $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['prod
ucts_previous_image'] : '');
360 }
361 break;
362 }
363 }
364
365 // check if the catalog image directory exists
366 if (is_dir(DIR_FS_CATALOG_IMAGES)) {
367 if (!is_writeable(DIR_FS_CATALOG_IMAGES)) $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABL
E, 'error');
368 } else {
369 $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');
370 }
371 ?>
372 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
373 <html <?php echo HTML_PARAMS; ?>>
374 <head>
375 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
376 <title><?php echo TITLE; ?></title>
377 <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
378 <script language="javascript" src="includes/general.js"></script>
379 </head>
380 <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolo
r="#FFFFFF" onLoad="SetFocus();">
381 <div id="spiffycalendar" class="text"></div>
382 <!-- header //-->
383 <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
384 <!-- header_eof //-->
385
386 <!-- body //-->
387 <table border="0" width="100%" cellspacing="2" cellpadding="2">
388 <tr>
389 <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" ce
llspacing="1" cellpadding="1" class="columnLeft">
390 <!-- left_navigation //-->
391 <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
392 <!-- left_navigation_eof //-->
393 </table></td>
394 <!-- body_text //-->
395 <td width="100%" valign="top">
396 <?php
397 if ($action == 'new_product') {
398 $parameters = array('products_name' => '',
399 'products_description' => '',
400 'products_url' => '',
401 'products_id' => '',
402 'products_quantity' => '',
403 'products_model' => '',
C:\Documents and Settings\All Users\Documents\My Music\Sample Music\New Folder\wt20091103\public_html\admin\categories.php: 6/21
404 'products_image' => '',
405 'products_price' => '',
406 'products_weight' => '',
407 'products_date_added' => '',
408 'products_last_modified' => '',
409 'products_date_available' => '',
410 'products_status' => '',
411 'products_tax_class_id' => '',
412 // MVS start
413 'vendors_product_price' => '',
414 'vendors_prod_comments' => '',
415 'vendors_prod_id' => '',
416 'vendors_id' => '',
417 //MVS end
418 //---FedEx Freight Modification START ---//
419 // 'products_fxf_class' => '',
420 // 'products_fxf_desc' => '',
421 // 'products_fxf_nmfc' => '',
422 // 'products_fxf_haz' => '',
423 // 'products_fxf_freezable' => '',
424 //---FedEx Freight Modification END ---//
425 'manufacturers_id' => '');
426
427 $pInfo = new objectInfo($parameters);
428
429 /*** Begin Header Tags SEO I left the FedEx script ***/
430 if (isset ($HTTP_GET_VARS['pID']) && (!$HTTP_POST_VARS) ) {
431 //MVS
432 //---FedEx Freight Modification
433 // $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p
.products_id, p.products_quantity, p.products_model, p.vendors_prod_id, p.products_image, p.products_price,
p.vendors_product_price, p.products_weight, p.vendors_prod_comments, p.products_date_added, p.products_las
t_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_statu
s, p.products_tax_class_id, p.vendors_id, p.manufacturers_id, p.products_fxf_class, p.products_fxf_desc, p.
products_fxf_nmfc, p.products_fxf_haz, p.products_fxf_freezable from " . TABLE_PRODUCTS . " p, " . TABLE_PR
ODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd
.products_id and pd.language_id = '" . (int)$languages_id . "'");
434 $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_head_tit
le_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_id, p.product
s_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added,
p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p
.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PROD
UCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.p
roducts_id and pd.language_id = '" . (int)$languages_id . "'");
435 $product = tep_db_fetch_array($product_query);
436 /*** End Header Tags SEO ***/
437
438 $pInfo->objectInfo($product);
439 } elseif (tep_not_null($HTTP_POST_VARS)) {
440 $pInfo->objectInfo($HTTP_POST_VARS);
441 $products_name = $HTTP_POST_VARS['products_name'];
442 $products_description = $HTTP_POST_VARS['products_description'];
443 $products_url = $HTTP_POST_VARS['products_url'];
444 }
445
446 $manufacturers_array = array(array('id' => '', 'text' => TEXT_NONE));
447 $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFAC
TURERS . " order by manufacturers_name");
448 while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
449 $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],
450 'text' => $manufacturers['manufacturers_name']);
451 }
452
453 //MVS start
454 $vendors_array = array(array('id' => '1', 'text' => 'NONE'));
455 $vendors_query = tep_db_query("select vendors_id, vendors_name from " . TABLE_VENDORS . " order by vend
ors_name");
456 while ($vendors = tep_db_fetch_array($vendors_query)) {
457 $vendors_array[] = array('id' => $vendors['vendors_id'],
458 'text' => $vendors['vendors_name']);
459 }
460 //MVS end
461
462 $tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));
463 $tax_class_query = tep_db_query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " orde
r by tax_class_title");
464 while ($tax_class = tep_db_fetch_array($tax_class_query)) {
465 $tax_class_array[] = array('id' => $tax_class['tax_class_id'],
466 'text' => $tax_class['tax_class_title']);
467 }
468
C:\Documents and Settings\All Users\Documents\My Music\Sample Music\New Folder\wt20091103\public_html\admin\categories.php: 7/21
469 //---FedEx Freight Modification START ---//
470 $fx_freight_vals = array('050', '055', '060', '065', '070', '077', '085', '092', '100', '110', '125', '
150', '175', '200', '250', '300');
471 $fx_freight_array = array();
472
473 foreach($fx_freight_vals as $val) {
474 $fx_freight_array[] = array('id' => $val, 'text' => $val);
475 }
476 //---FedEx Freight Modification END ---//
477
478 $languages = tep_get_languages();
479
480 if (!isset($pInfo->products_status)) $pInfo->products_status = '1';
481 switch ($pInfo->products_status) {
482 case '0': $in_status = false; $out_status = true; break;
483 case '1':
484 default: $in_status = true; $out_status = false;
485 }
486 ?>
487 <link rel="stylesheet" type="text/css" href="includes/javascript/spiffyCal/spiffyCal_v2_1.css">
488 <script language="JavaScript" src="includes/javascript/spiffyCal/spiffyCal_v2_1.js"></script>
489 <script language="javascript"><!--
490 var dateAvailable = new ctlSpiffyCalendarBox("dateAvailable", "new_product", "products_date_available","b
tnDate1","<?php echo $pInfo->products_date_available; ?>",scBTNMODE_CUSTOMBLUE);
491 //--></script>
492 <script language="javascript"><!--
493 var tax_rates = new Array();
494 <?php
495 for ($i=0, $n=sizeof($tax_class_array); $i<$n; $i++) {
496 if ($tax_class_array[$i]['id'] > 0) {
497 echo 'tax_rates["' . $tax_class_array[$i]['id'] . '"] = ' . tep_get_tax_rate_value($tax_class_array
[$i]['id']) . ';' . "\n";
498 }
499 }
500 ?>
501
502 function doRound(x, places) {
503 return Math.round(x * Math.pow(10, places)) / Math.pow(10, places);
504 }
505
506 function getTaxRate() {
507 var selected_value = document.forms["new_product"].products_tax_class_id.selectedIndex;
508 var parameterVal = document.forms["new_product"].products_tax_class_id[selected_value].value;
509
510 if ( (parameterVal > 0) && (tax_rates[parameterVal] > 0) ) {
511 return tax_rates[parameterVal];
512 } else {
513 return 0;
514 }
515 }
516
517 function updateGross() {
518 var taxRate = getTaxRate();
519 var grossValue = document.forms["new_product"].products_price.value;
520
521 if (taxRate > 0) {
522 grossValue = grossValue * ((taxRate / 100) + 1);
523 }
524
525 document.forms["new_product"].products_price_gross.value = doRound(grossValue, 4);
526 }
527
528 function updateNet() {
529 var taxRate = getTaxRate();
530 var netValue = document.forms["new_product"].products_price_gross.value;
531
532 if (taxRate > 0) {
533 netValue = netValue / ((taxRate / 100) + 1);
534 }
535
536 document.forms["new_product"].products_price.value = doRound(netValue, 4);
537 }
538 //--></script>
539 <?php echo tep_draw_form('new_product', FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS[
'pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=new_product_preview', 'post', 'enctype="multipar
t/form-data"'); ?>
540 <table border="0" width="100%" cellspacing="0" cellpadding="2">
541 <tr>
542 <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
543 <tr>
544 <td class="pageHeading"><?php echo sprintf(TEXT_NEW_PRODUCT, tep_output_generated_category_path
C:\Documents and Settings\All Users\Documents\My Music\Sample Music\New Folder\wt20091103\public_html\admin\categories.php: 8/21
($current_category_id)); ?></td>
545 <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_
IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
546 </tr>
547 </table></td>
548 </tr>
549 <tr>
550 <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
551 </tr>
552 <tr>
553 <td><table border="0" cellspacing="0" cellpadding="2">
554 <tr>
555 <td class="main"><?php echo TEXT_PRODUCTS_STATUS; ?></td>
556 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_
draw_radio_field('products_status', '1', $in_status) . '&nbsp;' . TEXT_PRODUCT_AVAILABLE . '&nbsp;' . tep_d
raw_radio_field('products_status', '0', $out_status) . '&nbsp;' . TEXT_PRODUCT_NOT_AVAILABLE; ?></td>
557 </tr>
558 <tr>
559 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
560 </tr>
561 <tr>
562 <td class="main"><?php echo TEXT_PRODUCTS_DATE_AVAILABLE; ?><br><small>(YYYY-MM-DD)</small></td
>
563 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;'; ?><sc
ript language="javascript">dateAvailable.writeControl(); dateAvailable.dateFormat="yyyy-MM-dd";</script></t
d>
564 </tr>
565 <?php //MVS start ?>
566 <tr>
567 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
568 </tr>
569 <tr>
570 <td class="main"><?php echo TEXT_PRODUCTS_VENDORS; ?></td>
571 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_
draw_pull_down_menu('vendors_id', $vendors_array, $pInfo->vendors_id); ?></td>
572 </tr>
573 <?php //MVS end ?>
574 <tr>
575 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
576 </tr>
577 <tr>
578 <td class="main"><?php echo TEXT_PRODUCTS_MANUFACTURER; ?></td>
579 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_
draw_pull_down_menu('manufacturers_id', $manufacturers_array, $pInfo->manufacturers_id); ?></td>
580 </tr>
581 <tr>
582 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
583 </tr>
584 <?php
585 for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
586 ?>
587 <tr>
588 <td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_NAME; ?></td>
589 <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] .
'/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('products_n
ame[' . $languages[$i]['id'] . ']', (isset($products_name[$languages[$i]['id']]) ? stripslashes($products_n
ame[$languages[$i]['id']]) : tep_get_products_name($pInfo->products_id, $languages[$i]['id']))); ?></td>
590 </tr>
591 <?php
592 }
593 ?>
594 <tr>
595 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
596 </tr>
597 <tr bgcolor="#ebebff">
598 <td class="main"><?php echo TEXT_PRODUCTS_TAX_CLASS; ?></td>
599 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_
draw_pull_down_menu('products_tax_class_id', $tax_class_array, $pInfo->products_tax_class_id, 'onchange="up
dateGross()"'); ?></td>
600 </tr>
601 <tr bgcolor="#ebebff">
602 <td class="main"><?php echo TEXT_PRODUCTS_PRICE_NET; ?></td>
603 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_
draw_input_field('products_price', $pInfo->products_price, 'onKeyUp="updateGross()"'); ?></td>
604 </tr>
605 <tr bgcolor="#ebebff">
606 <td class="main"><?php echo TEXT_PRODUCTS_PRICE_GROSS; ?></td>
607 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_
draw_input_field('products_price_gross', $pInfo->products_price, 'OnKeyUp="updateNet()"'); ?></td>
608 </tr>
609 <?php //MVS start ?>
C:\Documents and Settings\All Users\Documents\My Music\Sample Music\New Folder\wt20091103\public_html\admin\categories.php: 9/21
610 <tr bgcolor="#ebebff">
611 <td class="main"><?php echo TEXT_VENDORS_PRODUCT_PRICE_BASE; ?></td>
612 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_
draw_input_field('vendors_product_price', $pInfo->vendors_product_price, 'onKeyUp="updateNet()"'); ?></td>
613 </tr>
614 <?php //MVS end ?>
615 <tr>
616 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
617 </tr>
618 <? //---FedEx Freight Modification START ---// ?>
619 <!-- <tr bgcolor="#ebebff">
620 <td class="main" colspan=2 style="border-bottom:1px solid #000000"><?php echo TEXT_PRODUCTS_FXF
REIGHT; ?></td>
621 </tr>
622 <tr bgcolor="#ebebff">
623 <td class="main"><?php echo TEXT_PRODUCTS_FXFREIGHT_CLASS; ?></td>
624 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_
draw_pull_down_menu('products_fxf_class', $fx_freight_array, $pInfo->products_fxf_class); ?></td>
625 </tr>
626 <tr bgcolor="#ebebff">
627 <td class="main"><?php echo TEXT_PRODUCTS_FXFREIGHT_DESCR; ?></td>
628 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_
draw_input_field('products_fxf_desc', $pInfo->products_fxf_desc, 'maxlength=100'); ?></td>
629 </tr>
630 <tr bgcolor="#ebebff">
631 <td class="main"><?php echo TEXT_PRODUCTS_FXFREIGHT_NMFC; ?></td>
632 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_
draw_input_field('products_fxf_nmfc', $pInfo->products_fxf_nmfc, 'maxlength=100'); ?></td>
633 </tr>
634 <tr bgcolor="#ebebff">
635 <td class="main"><?php echo TEXT_PRODUCTS_FXFREIGHT_HAZ; ?></td>
636 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_
draw_pull_down_menu('products_fxf_haz', array(array('id' => '1', 'text' => 'Yes'), array('id' => '0', 'text
' => 'No')), $pInfo->products_fxf_haz); ?></td>
637 </tr>
638 <tr bgcolor="#ebebff">
639 <td class="main"><?php echo TEXT_PRODUCTS_FXFREIGHT_FREEZE; ?></td>
640 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_
draw_pull_down_menu('products_fxf_freezable', array(array('id' => '1', 'text' => 'Yes'), array('id' => '0',
'text' => 'No')), $pInfo->products_fxf_freezable); ?></td>
641 </tr>
642 <tr>
643 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
644 </tr>
645 -->
646 <? //---FedEx Freight Modification END ---// ?>
647
648 <script language="javascript"><!--
649 updateGross();
650 //--></script>
651 <!-- /*** Begin Header Tags SEO ***/ //-->
652 <?php
653 for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
654 ?>
655 <tr>
656 <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td>
657 <td><table border="0" cellspacing="0" cellpadding="0">
658 <tr>
659 <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i
]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?>&nbsp;</td>
660 <td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i
]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? stripslashes($prod
ucts_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i][
'id']))); ?></td>
661 </tr>
662 </table></td>
663 </tr>
664 <?php
665 }
666 ?>
667 <tr>
668 <td colspan="2" class="main"><hr><?php echo TEXT_PRODUCT_METTA_INFO; ?></td>
669 </tr>
670 <tr>
671 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
672 </tr>
673 <?php
674 for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
675 ?>
676 <tr>
677 <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_PAGE_TITLE; ?></td>
C:\Documents and Settings\All Users\Documents\My Music\Sample Music\New Folder\wt20091103\public_html\admin\categories.php: 10/21
678 <td><table border="0" cellspacing="0" cellpadding="0">
679 <tr>
680 <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i
]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?>&nbsp;</td>
681 <td class="main"><?php echo tep_draw_textarea_field('products_head_title_tag[' . $languages
[$i]['id'] . ']', 'soft', '70', '5', (isset($products_head_title_tag[$languages[$i]['id']]) ? stripslashes(
$products_head_title_tag[$languages[$i]['id']]) : tep_get_products_head_title_tag($pInfo->products_id, $lan
guages[$i]['id']))); ?></td>
682 </tr>
683 </table></td>
684 </tr>
685 <?php
686 }
687 for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
688 ?>
689 <tr>
690 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
691 </tr>
692 <tr>
693 <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_HEADER_DESCRIPTION; ?></td>
694 <td><table border="0" cellspacing="0" cellpadding="0">
695 <tr>
696 <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i
]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?>&nbsp;</td>
697 <td class="main"><?php echo tep_draw_textarea_field('products_head_desc_tag[' . $languages[
$i]['id'] . ']', 'soft', '70', '5', (isset($products_head_desc_tag[$languages[$i]['id']]) ? stripslashes($p
roducts_head_desc_tag[$languages[$i]['id']]) : tep_get_products_head_desc_tag($pInfo->products_id, $languag
es[$i]['id']))); ?></td>
698 </tr>
699 </table></td>
700 </tr>
701 <?php
702 }
703 for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
704 ?>
705 <tr>
706 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
707 </tr>
708 <tr>
709 <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_KEYWORDS; ?></td>
710 <td><table border="0" cellspacing="0" cellpadding="0">
711 <tr>
712 <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i
]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?>&nbsp;</td>
713 <td class="main"><?php echo tep_draw_textarea_field('products_head_keywords_tag[' . $langua
ges[$i]['id'] . ']', 'soft', '70', '5', (isset($products_head_keywords_tag[$languages[$i]['id']]) ? stripsl
ashes($products_head_keywords_tag[$languages[$i]['id']]) : tep_get_products_head_keywords_tag($pInfo->produ
cts_id, $languages[$i]['id']))); ?></td>
714 </tr>
715 </table></td>
716 </tr>
717 <?php
718 }
719 ?>
720 <tr>
721 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
722 </tr>
723 <tr>
724 <td colspan="2" class="main"><hr></td>
725 </tr>
726 <!-- /*** End Header Tags SEO ***/ //-->
727 <?php
728 }
729 ?>
730 <?php //MVS start ?>
731 <tr>
732 <td class="main"><?php echo TEXT_VENDORS_PROD_COMMENTS; ?></td>
733 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' .
tep_draw_textarea_field('vendors_prod_comments', 'soft', '70', '5', (isset($vendors_prod_comments) ? $vendo
rs_prod_comments : tep_get_vendors_prod_comments($pInfo->products_id))); ?></td>
734 </tr>
735 <tr>
736 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
737 </tr>
738 <?php //MVS end ?>
739 <tr>
740 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
741 </tr>
742 <tr>
743 <td class="main"><?php echo TEXT_PRODUCTS_QUANTITY; ?></td>
744 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_
C:\Documents and Settings\All Users\Documents\My Music\Sample Music\New Folder\wt20091103\public_html\admin\categories.php: 11/21
draw_input_field('products_quantity', $pInfo->products_quantity); ?></td>
745 </tr>
746 <tr>
747 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
748 </tr>
749 <?php //MVS start ?>
750 <tr>
751 <td class="main"><?php echo TEXT_VENDORS_PROD_ID; ?></td>
752 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_
draw_input_field('vendors_prod_id', $pInfo->vendors_prod_id); ?></td>
753 </tr>
754 <?php //MVS end ?>
755 <tr>
756 <td class="main"><?php echo TEXT_PRODUCTS_MODEL; ?></td>
757 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_
draw_input_field('products_model', $pInfo->products_model); ?></td>
758 </tr>
759 <tr>
760 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
761 </tr>
762 <tr>
763 <td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td>
764 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_
draw_file_field('products_image') . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' .
$pInfo->products_image . tep_draw_hidden_field('products_previous_image', $pInfo->products_image); ?></td>
765 </tr>
766 <tr>
767 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
768 </tr>
769 <?php
770 for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
771 ?>
772 <tr>
773 <td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_URL . '<br><small>' . TEXT_PRODUCTS_URL_
WITHOUT_HTTP . '</small>'; ?></td>
774 <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] .
'/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('products_u
rl[' . $languages[$i]['id'] . ']', (isset($products_url[$languages[$i]['id']]) ? stripslashes($products_url
[$languages[$i]['id']]) : tep_get_products_url($pInfo->products_id, $languages[$i]['id']))); ?></td>
775 </tr>
776 <?php
777 }
778 ?>
779 <tr>
780 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
781 </tr>
782 <tr>
783 <td class="main"><?php echo TEXT_PRODUCTS_WEIGHT; ?></td>
784 <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . tep_
draw_input_field('products_weight', $pInfo->products_weight); ?></td>
785 </tr>
786 </table></td>
787 </tr>
788 <tr>
789 <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
790 </tr>
791 <tr>
792 <td class="main" align="right"><?php echo tep_draw_hidden_field('products_date_added', (tep_not_nul
l($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . tep_image_submit('button_p
review.gif', IMAGE_PREVIEW) . '&nbsp;&nbsp;<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPat
h . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '')) . '">' . tep_image_button('butto
n_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>
793 </tr>
794 </table></form>
795
796
797 <!-- /*** Begin Header Tags SEO ***/ //-->
798 <?php
799 } elseif ($action == 'new_product_preview') {
800 if (tep_not_null($HTTP_POST_VARS)) {
801 $pInfo = new objectInfo($HTTP_POST_VARS);
802 $products_name = $HTTP_POST_VARS['products_name'];
803 $products_description = $HTTP_POST_VARS['products_description'];
804 $products_head_title_tag = $HTTP_POST_VARS['products_head_title_tag'];
805 $products_head_desc_tag = $HTTP_POST_VARS['products_head_desc_tag'];
806 $products_head_keywords_tag = $HTTP_POST_VARS['products_head_keywords_tag'];
807 $products_url = $HTTP_POST_VARS['products_url'];
808 } else {
809 //MVS
810 $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_de
scription, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.product
C:\Documents and Settings\All Users\Documents\My Music\Sample Music\New Folder\wt20091103\public_html\admin\categories.php: 12/21
s_url, p.products_quantity, p.products_model, p.vendors_prod_id, p.products_image, p.products_price, p.vend
ors_product_price, p.products_weight, p.vendors_prod_comments, p.products_date_added, p.products_last_modif
ied, p.products_date_available, p.products_status, p.manufacturers_id, p.vendors_id from " . TABLE_PRODUCTS
. " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" .
(int)$HTTP_GET_VARS['pID'] . "'");
811 $product = tep_db_fetch_array($product_query);
812 /*** End Header Tags SEO ***/
813 $pInfo = new objectInfo($product);
814 $products_image_name = $pInfo->products_image;
815 }
816
817 $form_action = (isset($HTTP_GET_VARS['pID'])) ? 'update_product' : 'insert_product';
818
819 echo tep_draw_form($form_action, FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID'])
? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=' . $form_action, 'post', 'enctype="multipart/form-data
"');
820
821 /*** Begin Header Tags SEO ***/
822 $languages = tep_get_languages();
823 for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
824 if (isset($HTTP_GET_VARS['read']) && ($HTTP_GET_VARS['read'] == 'only')) {
825 $pInfo->products_name = tep_get_products_name($pInfo->products_id, $languages[$i]['id']);
826 $pInfo->products_description = tep_get_products_description($pInfo->products_id, $languages[$i]['id
']);
827 $pInfo->products_head_title_tag = tep_db_prepare_input($products_head_title_tag[$languages[$i]['id'
]]);
828 $pInfo->products_head_desc_tag = tep_db_prepare_input($products_head_desc_tag[$languages[$i]['id']]
);
829 $pInfo->products_head_keywords_tag = tep_db_prepare_input($products_head_keywords_tag[$languages[$i
]['id']]);
830 $pInfo->products_url = tep_get_products_url($pInfo->products_id, $languages[$i]['id']);
831 } else {
832 $pInfo->products_name = tep_db_prepare_input($products_name[$languages[$i]['id']]);
833 $pInfo->products_description = tep_db_prepare_input($products_description[$languages[$i]['id']]);
834 $pInfo->products_head_title_tag = tep_db_prepare_input($products_head_title_tag[$languages[$i]['id'
]]);
835 $pInfo->products_head_desc_tag = tep_db_prepare_input($products_head_desc_tag[$languages[$i]['id']]
);
836 $pInfo->products_head_keywords_tag = tep_db_prepare_input($products_head_keywords_tag[$languages[$i
]['id']]);
837 $pInfo->products_url = tep_db_prepare_input($products_url[$languages[$i]['id']]);
838 }
839 /*** End Header Tags SEO ***/
840 }
841 ?>
842 <table border="0" width="100%" cellspacing="0" cellpadding="2">
843 <tr>
844 <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
845 <tr>
846 <td class="pageHeading"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directo
ry'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . $pInfo->products_name; ?>
</td>
847 <?php //MVS start?>
848 <td class="pageHeading" align="right"><?php echo TEXT_VENDORS_PRODUCT_PRICE_TITLE . $currencies
->format($pInfo->products_price); ?></td>
849 <td class="pageHeading" align="right"><?php echo TEXT_VENDORS_PRICE_TITLE . $currencies->format
($pInfo->vendors_product_price); ?></td>
850 </tr>
851 <?php //MVS end?>
852 </tr>
853 </table></td>
854 </tr>
855 <tr>
856 <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
857 </tr>
858 <tr>
859 <td class="main"><?php echo tep_image(DIR_WS_CATALOG_IMAGES . $products_image_name, $pInfo->product
s_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"') . $pInfo->products_de
scription; ?></td>
860 </tr>
861 <?php
862 if ($pInfo->products_url) {
863 ?>
864 <tr>
865 <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
866 </tr>
867 <tr>
868 <td class="main"><?php echo sprintf(TEXT_PRODUCT_MORE_INFORMATION, $pInfo->products_url); ?></td>
869 </tr>
870 <?php
871 }
C:\Documents and Settings\All Users\Documents\My Music\Sample Music\New Folder\wt20091103\public_html\admin\categories.php: 13/21
872 ?>
873 <tr>
874 <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
875 </tr>
876 <?php
877 if ($pInfo->products_date_available > date('Y-m-d')) {
878 ?>
879 <tr>
880 <td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_AVAILABLE, tep_date_long(
$pInfo->products_date_available)); ?></td>
881 </tr>
882 <?php
883 } else {
884 ?>
885 <tr>
886 <td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_ADDED, tep_date_long($pIn
fo->products_date_added)); ?></td>
887 </tr>
888 <?php
889 }
890 ?>
891 <tr>
892 <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
893 </tr>
894 <?php
895 }
896
897 if (isset($HTTP_GET_VARS['read']) && ($HTTP_GET_VARS['read'] == 'only')) {
898 if (isset($HTTP_GET_VARS['origin'])) {
899 $pos_params = strpos($HTTP_GET_VARS['origin'], '?', 0);
900 if ($pos_params != false) {
901 $back_url = substr($HTTP_GET_VARS['origin'], 0, $pos_params);
902 $back_url_params = substr($HTTP_GET_VARS['origin'], $pos_params + 1);
903 } else {
904 $back_url = $HTTP_GET_VARS['origin'];
905 $back_url_params = '';
906 }
907 } else {
908 $back_url = FILENAME_CATEGORIES;
909 $back_url_params = 'cPath=' . $cPath . '&pID=' . $pInfo->products_id;
910 }
911 ?>
912 <tr>
913 <td align="right"><?php echo '<a href="' . tep_href_link($back_url, $back_url_params, 'NONSSL') . '
">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td>
914 </tr>
915 <?php
916 } else {
917 ?>
918 <tr>
919 <td align="right" class="smallText">
920 <?php
921 /* Re-Post all POST'ed variables */
922 reset($HTTP_POST_VARS);
923 while (list($key, $value) = each($HTTP_POST_VARS)) {
924 if (!is_array($HTTP_POST_VARS[$key])) {
925 echo tep_draw_hidden_field($key, htmlspecialchars(stripslashes($value)));
926 }
927 }
928 /*** Begin Header Tags SEO ***/
929 $languages = tep_get_languages();
930 for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
931 echo tep_draw_hidden_field('products_name[' . $languages[$i]['id'] . ']', htmlspecialchars(stripsla
shes($products_name[$languages[$i]['id']])));
932 echo tep_draw_hidden_field('products_description[' . $languages[$i]['id'] . ']', htmlspecialchars(s
tripslashes($products_description[$languages[$i]['id']])));
933 echo tep_draw_hidden_field('products_head_title_tag[' . $languages[$i]['id'] . ']', htmlspecialchar
s(stripslashes($products_head_title_tag[$languages[$i]['id']])));
934 echo tep_draw_hidden_field('products_head_desc_tag[' . $languages[$i]['id'] . ']', htmlspecialchars
(stripslashes($products_head_desc_tag[$languages[$i]['id']])));
935 echo tep_draw_hidden_field('products_head_keywords_tag[' . $languages[$i]['id'] . ']', htmlspecialc
hars(stripslashes($products_head_keywords_tag[$languages[$i]['id']])));
936 echo tep_draw_hidden_field('products_url[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslas
hes($products_url[$languages[$i]['id']])));
937 }
938 /*** End Header Tags SEO ***/
939 echo tep_draw_hidden_field('products_image', stripslashes($products_image_name));
940
941 echo tep_image_submit('button_back.gif', IMAGE_BACK, 'name="edit"') . '&nbsp;&nbsp;';
942
943 if (isset($HTTP_GET_VARS['pID'])) {
C:\Documents and Settings\All Users\Documents\My Music\Sample Music\New Folder\wt20091103\public_html\admin\categories.php: 14/21
944 echo tep_image_submit('button_update.gif', IMAGE_UPDATE);
945 } else {
946 echo tep_image_submit('button_insert.gif', IMAGE_INSERT);
947 }
948 echo '&nbsp;&nbsp;<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GE
T_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAG
E_CANCEL) . '</a>';
949 ?></td>
950 </tr>
951 </table></form>
952 <?php
953
954 } else {
955 ?>
956 <table border="0" width="100%" cellspacing="0" cellpadding="2">
957 <tr>
958 <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
959 <tr>
960 <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
961 <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADI
NG_IMAGE_HEIGHT); ?></td>
962 <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0">
963 <tr>
964 <td class="smallText" align="right">
965 <?php
966 echo tep_draw_form('search', FILENAME_CATEGORIES, '', 'get');
967 echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('search');
968 echo tep_hide_session_id() . '</form>';
969 ?>
970 </td>
971 </tr>
972 <tr>
973 <td class="smallText" align="right">
974 <?php
975 echo tep_draw_form('goto', FILENAME_CATEGORIES, '', 'get');
976 echo HEADING_TITLE_GOTO . ' ' . tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_cate
gory_id, 'onChange="this.form.submit();"');
977 echo tep_hide_session_id() . '</form>';
978 ?>
979 </td>
980 </tr>
981 </table></td>
982 </tr>
983 </table></td>
984 </tr>
985 <tr>
986 <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
987 <tr>
988 <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
989 <tr class="dataTableHeadingRow">
990 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CATEGORIES_PRODUCTS; ?></td>
991 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td>
992 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;
</td>
993 </tr>
994 <?php
995 $categories_count = 0;
996 $rows = 0;
997 if (isset($HTTP_GET_VARS['search'])) {
998 $search = tep_db_prepare_input($HTTP_GET_VARS['search']);
999
1000 /*** Begin Header Tags SEO ***/
1001 $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.p
arent_id, c.sort_order, c.date_added, c.last_modified, cd.categories_htc_title_tag, cd.categories_htc_desc_
tag, cd.categories_htc_keywords_tag, cd.categories_htc_description from " . TABLE_CATEGORIES . " c, " . TAB
LE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$l
anguages_id . "' and cd.categories_name like '%" . tep_db_input($search) . "%' order by c.sort_order, cd.ca
tegories_name");
1002 } else {
1003 $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.p
arent_id, c.sort_order, c.date_added, c.last_modified, cd.categories_htc_title_tag, cd.categories_htc_desc_
tag, cd.categories_htc_keywords_tag, cd.categories_htc_description from " . TABLE_CATEGORIES . " c, " . TAB
LE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_i
d = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.sort_order, cd.categories
_name");
1004 /*** End Header Tags SEO ***/


#6 ONLINE   multimixer

multimixer

    Lemons or Melons ?

  • Partner
  • 4,556 posts

Posted 05 November 2009 - 17:56

You should check from where this here come
727 <?php
728 }
729 ?>

Go back to the contributions you installed, starting from the last and check the steps you did.

Could be also a missing --;--, i don't know

#7   MrPhil

MrPhil
  • Members
  • 5,157 posts

Posted 05 November 2009 - 22:50

I counted opening and closing braces { and } up to the first function declaration at line 501. There are 61 open { and 60 close }. They should have equal count and should be balanced (proper nesting). In other words, I think your problem is somewhere in the first 500 lines. Probably a messed up contribution.

#8   WebDev22

WebDev22
  • Members
  • 451 posts

Posted 09 November 2009 - 04:35

I counted opening and closing braces { and } up to the first function declaration at line 501. There are 61 open { and 60 close }. They should have equal count and should be balanced (proper nesting). In other words, I think your problem is somewhere in the first 500 lines. Probably a messed up contribution.

This seems impossible to resolve. I hate having to revert back to the default categories.php file since so many contributions have been added.