hpdl
|
1
|
1
|
<?php
|
|
2
|
/*
|
hpdl
|
121
|
3
|
$Id: products_edit.php 1245 2007-02-10 11:39:24Z frank $
|
hpdl
|
1
|
4
|
|
|
5
|
osCommerce, Open Source E-Commerce Solutions
|
|
6
|
http://www.oscommerce.com
|
|
7
|
|
hpdl
|
443
|
8
|
Copyright (c) 2006 osCommerce
|
hpdl
|
1
|
9
|
|
|
10
|
Released under the GNU General Public License
|
|
11
|
*/
|
|
12
|
|
hpdl
|
608
|
13
|
if (isset($_GET['pID'])) {
|
|
14
|
$Qp = $osC_Database->query('select products_id, products_quantity, products_price, products_weight, products_weight_class, products_date_added, products_last_modified, date_format(products_date_available, "%Y-%m-%d") as products_date_available, products_status, products_tax_class_id, manufacturers_id from :table_products where products_id = :products_id');
|
hpdl
|
1
|
15
|
$Qp->bindTable(':table_products', TABLE_PRODUCTS);
|
|
16
|
$Qp->bindInt(':products_id', $_GET['pID']);
|
|
17
|
$Qp->execute();
|
|
18
|
|
hpdl
|
365
|
19
|
$Qpd = $osC_Database->query('select products_name, products_description, products_model, products_keyword, products_tags, products_url, language_id from :table_products_description where products_id = :products_id');
|
hpdl
|
1
|
20
|
$Qpd->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
|
|
21
|
$Qpd->bindInt(':products_id', $_GET['pID']);
|
|
22
|
$Qpd->execute();
|
|
23
|
|
|
24
|
$pd_extra = array();
|
|
25
|
while ($Qpd->next()) {
|
|
26
|
$pd_extra['products_name'][$Qpd->valueInt('language_id')] = $Qpd->value('products_name');
|
|
27
|
$pd_extra['products_description'][$Qpd->valueInt('language_id')] = $Qpd->value('products_description');
|
hpdl
|
365
|
28
|
$pd_extra['products_model'][$Qpd->valueInt('language_id')] = $Qpd->value('products_model');
|
|
29
|
$pd_extra['products_keyword'][$Qpd->valueInt('language_id')] = $Qpd->value('products_keyword');
|
|
30
|
$pd_extra['products_tags'][$Qpd->valueInt('language_id')] = $Qpd->value('products_tags');
|
hpdl
|
1
|
31
|
$pd_extra['products_url'][$Qpd->valueInt('language_id')] = $Qpd->value('products_url');
|
|
32
|
}
|
|
33
|
|
|
34
|
$pInfo = new objectInfo(array_merge($Qp->toArray(), $pd_extra));
|
|
35
|
}
|
|
36
|
|
|
37
|
$Qmanufacturers = $osC_Database->query('select manufacturers_id, manufacturers_name from :table_manufacturers order by manufacturers_name');
|
|
38
|
$Qmanufacturers->bindTable(':table_manufacturers', TABLE_MANUFACTURERS);
|
|
39
|
$Qmanufacturers->execute();
|
|
40
|
|
|
41
|
$manufacturers_array = array(array('id' => '', 'text' => TEXT_NONE));
|
|
42
|
while ($Qmanufacturers->next()) {
|
|
43
|
$manufacturers_array[] = array('id' => $Qmanufacturers->valueInt('manufacturers_id'),
|
|
44
|
'text' => $Qmanufacturers->value('manufacturers_name'));
|
|
45
|
}
|
|
46
|
|
|
47
|
$Qtc = $osC_Database->query('select tax_class_id, tax_class_title from :table_tax_class order by tax_class_title');
|
|
48
|
$Qtc->bindTable(':table_tax_class', TABLE_TAX_CLASS);
|
|
49
|
$Qtc->execute();
|
|
50
|
|
|
51
|
$tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));
|
|
52
|
while ($Qtc->next()) {
|
|
53
|
$tax_class_array[] = array('id' => $Qtc->valueInt('tax_class_id'),
|
|
54
|
'text' => $Qtc->value('tax_class_title'));
|
|
55
|
}
|
|
56
|
|
|
57
|
$Qwc = $osC_Database->query('select weight_class_id, weight_class_title from :table_weight_class where language_id = :language_id order by weight_class_title');
|
|
58
|
$Qwc->bindTable(':table_weight_class', TABLE_WEIGHT_CLASS);
|
hpdl
|
121
|
59
|
$Qwc->bindInt(':language_id', $osC_Language->getID());
|
hpdl
|
1
|
60
|
$Qwc->execute();
|
|
61
|
|
|
62
|
$weight_class_array = array();
|
|
63
|
while ($Qwc->next()) {
|
|
64
|
$weight_class_array[] = array('id' => $Qwc->valueInt('weight_class_id'),
|
|
65
|
'text' => $Qwc->value('weight_class_title'));
|
|
66
|
}
|
hpdl
|
608
|
67
|
?>
|
hpdl
|
1
|
68
|
|
hpdl
|
608
|
69
|
<script language="javascript" type="text/javascript" src="../ext/prototype/prototype.js"></script>
|
|
70
|
<script language="javascript" type="text/javascript" src="../ext/scriptaculous/scriptaculous.js"></script>
|
hpdl
|
1
|
71
|
|
|
72
|
<style type="text/css">@import url('external/jscalendar/calendar-win2k-1.css');</style>
|
|
73
|
<script type="text/javascript" src="external/jscalendar/calendar.js"></script>
|
|
74
|
<script type="text/javascript" src="external/jscalendar/lang/calendar-en.js"></script>
|
|
75
|
<script type="text/javascript" src="external/jscalendar/calendar-setup.js"></script>
|
|
76
|
|
|
77
|
<style type="text/css">
|
|
78
|
.attributeRemove {
|
|
79
|
background-color: #FFC6C6;
|
|
80
|
}
|
|
81
|
|
|
82
|
.attributeAdd {
|
|
83
|
background-color: #E8FFC6;
|
|
84
|
}
|
|
85
|
</style>
|
|
86
|
|
hpdl
|
365
|
87
|
<script type="text/javascript">
|
hpdl
|
1
|
88
|
|
hpdl
|
1076
|
89
|
|
hpdl
|
1
|
90
|
|
|
91
|
|
|
92
|
|
hpdl
|
758
|
93
|
|
hpdl
|
1
|
94
|
|
|
95
|
|
|
96
|
|
|
97
|
|
|
98
|
|
|
99
|
|
|
100
|
|
|
101
|
|
|
102
|
|
hpdl
|
613
|
103
|
|
|
104
|
|
hpdl
|
1
|
105
|
|
|
106
|
|
|
107
|
|
|
108
|
|
|
109
|
|
|
110
|
|
|
111
|
|
|
112
|
|
hpdl
|
443
|
113
|
|
hpdl
|
1
|
114
|
|
hpdl
|
443
|
115
|
|
hpdl
|
1
|
116
|
|
|
117
|
|
|
118
|
|
|
119
|
|
|
120
|
|
hpdl
|
443
|
121
|
|
hpdl
|
1
|
122
|
|
|
123
|
|
hpdl
|
443
|
124
|
|
hpdl
|
1
|
125
|
|
hpdl
|
443
|
126
|
|
hpdl
|
1
|
127
|
|
|
128
|
|
|
129
|
|
|
130
|
|
|
131
|
|
hpdl
|
443
|
132
|
|
hpdl
|
1
|
133
|
|
|
134
|
|
|
135
|
|
|
136
|
|
|
137
|
|
hpdl
|
613
|
138
|
|
hpdl
|
1
|
139
|
|
|
140
|
|
|
141
|
|
hpdl
|
613
|
142
|
|
hpdl
|
1
|
143
|
|
|
144
|
|
|
145
|
|
|
146
|
|
|
147
|
|
|
148
|
|
|
149
|
|
|
150
|
|
|
151
|
|
|
152
|
|
|
153
|
|
|
154
|
|
|
155
|
|
|
156
|
|
|
157
|
|
hpdl
|
613
|
158
|
|
|
159
|
|
hpdl
|
1
|
160
|
|
|
161
|
|
|
162
|
|
hpdl
|
613
|
163
|
|
hpdl
|
1
|
164
|
|
|
165
|
|
|
166
|
|
|
167
|
|
|
168
|
|
hpdl
|
613
|
169
|
|
hpdl
|
1
|
170
|
|
|
171
|
|
|
172
|
|
|
173
|
|
|
174
|
|
|
175
|
|
|
176
|
|
|
177
|
|
|
178
|
|
|
179
|
|
|
180
|
|
|
181
|
|
|
182
|
|
|
183
|
|
|
184
|
|
|
185
|
|
|
186
|
|
|
187
|
|
|
188
|
|
|
189
|
|
|
190
|
|
|
191
|
|
|
192
|
|
|
193
|
|
|
194
|
|
|
195
|
|
|
196
|
|
|
197
|
|
|
198
|
|
|
199
|
|
|
200
|
|
|
201
|
|
|
202
|
|
|
203
|
|
|
204
|
|
|
205
|
|
|
206
|
|
|
207
|
|
|
208
|
|
|
209
|
|
|
210
|
|
|
211
|
|
|
212
|
|
hpdl
|
875
|
213
|
|
|
214
|
|
|
215
|
|
|
216
|
|
hpdl
|
608
|
217
|
|
frank
|
1154
|
218
|
|
|
219
|
|
hpdl
|
1
|
220
|
|
frank
|
1154
|
221
|
|
|
222
|
|
hpdl
|
608
|
223
|
|
frank
|
1154
|
224
|
|
hpdl
|
608
|
225
|
|
|
226
|
|
|
227
|
|
hpdl
|
1
|
228
|
|
hpdl
|
608
|
229
|
|
|
230
|
|
|
231
|
|
|
232
|
|
|
233
|
|
|
234
|
|
|
235
|
|
|
236
|
|
|
237
|
|
|
238
|
|
|
239
|
|
|
240
|
|
|
241
|
|
|
242
|
|
|
243
|
|
|
244
|
|
|
245
|
|
|
246
|
|
|
247
|
|
|
248
|
|
|
249
|
|
|
250
|
|
|
251
|
|
|
252
|
|
|
253
|
|
|
254
|
|
|
255
|
|
|
256
|
|
|
257
|
|
|
258
|
|
|
259
|
|
|
260
|
|
|
261
|
|
|
262
|
|
|
263
|
|
|
264
|
|
|
265
|
|
|
266
|
|
|
267
|
|
frank
|
1154
|
268
|
|
|
269
|
|
hpdl
|
608
|
270
|
|
frank
|
1154
|
271
|
|
hpdl
|
608
|
272
|
|
|
273
|
|
|
274
|
|
|
275
|
|
|
276
|
|
|
277
|
|
|
278
|
|
|
279
|
|
|
280
|
|
|
281
|
|
|
282
|
|
frank
|
1154
|
283
|
|
|
284
|
|
hpdl
|
608
|
285
|
|
frank
|
1154
|
286
|
|
hpdl
|
608
|
287
|
|
|
288
|
|
|
289
|
|
|
290
|
|
|
291
|
|
frank
|
1182
|
292
|
|
|
293
|
|
hpdl
|
608
|
294
|
|
frank
|
1154
|
295
|
|
|
296
|
|
hpdl
|
608
|
297
|
|
|
298
|
|
|
299
|
|
|
300
|
|
hpdl
|
749
|
301
|
|
hpdl
|
608
|
302
|
|
|
303
|
|
hpdl
|
1078
|
304
|
|
hpdl
|
608
|
305
|
|
|
306
|
|
|
307
|
|
|
308
|
|
|
309
|
|
|
310
|
|
|
311
|
|
|
312
|
|
|
313
|
|
|
314
|
|
|
315
|
|
|
316
|
|
|
317
|
|
|
318
|
|
frank
|
1245
|
319
|
|
hpdl
|
608
|
320
|
|
|
321
|
|
|
322
|
|
hpdl
|
755
|
323
|
|
hpdl
|
608
|
324
|
|
hpdl
|
755
|
325
|
|
hpdl
|
608
|
326
|
|
|
327
|
|
hpdl
|
755
|
328
|
|
hpdl
|
608
|
329
|
|
|
330
|
|
|
331
|
|
|
332
|
|
|
333
|
|
|
334
|
|
|
335
|
|
|
336
|
|
|
337
|
|
|
338
|
|
|
339
|
|
|
340
|
|
|
341
|
|
|
342
|
|
|
343
|
|
|
344
|
|
|
345
|
|
|
346
|
|
|
347
|
|
|
348
|
|
|
349
|
|
|
350
|
|
|
351
|
|
|
352
|
|
|
353
|
|
|
354
|
|
|
355
|
|
|
356
|
|
|
357
|
|
|
358
|
|
|
359
|
|
|
360
|
|
|
361
|
|
hpdl
|
755
|
362
|
|
hpdl
|
608
|
363
|
|
|
364
|
|
|
365
|
|
|
366
|
|
|
367
|
|
|
368
|
|
|
369
|
|
hpdl
|
755
|
370
|
|
hpdl
|
608
|
371
|
|
|
372
|
|
|
373
|
|
|
374
|
|
|
375
|
|
hpdl
|
749
|
376
|
|
hpdl
|
875
|
377
|
|
|
378
|
|
|
379
|
|
|
380
|
|
hpdl
|
749
|
381
|
|
frank
|
1154
|
382
|
|
|
383
|
|
hpdl
|
749
|
384
|
|
frank
|
1154
|
385
|
|
hpdl
|
749
|
386
|
|
|
387
|
|
|
388
|
|
|
389
|
|
|
390
|
|
|
391
|
|
|
392
|
|
|
393
|
|
frank
|
1154
|
394
|
|
|
395
|
|
hpdl
|
749
|
396
|
|
|
397
|
|
|
398
|
|
|
399
|
|
|
400
|
|
|
401
|
|
|
402
|
|
|
403
|
|
|
404
|
|
|
405
|
|
|
406
|
|
|
407
|
|
|
408
|
|
|
409
|
|
|
410
|
|
|
411
|
|
|
412
|
|
|
413
|
|
hpdl
|
755
|
414
|
|
hpdl
|
749
|
415
|
|
|
416
|
|
|
417
|
|
|
418
|
|
|
419
|
|
|
420
|
|
|
421
|
|
|
422
|
|
|
423
|
|
|
424
|
|
|
425
|
|
|
426
|
|
|
427
|
|
|
428
|
|
|
429
|
|
|
430
|
|
|
431
|
|
|
432
|
|
|
433
|
|
|
434
|
|
|
435
|
|
|
436
|
|
|
437
|
|
|
438
|
|
hpdl
|
1
|
439
|
</script>
|
|
440
|
|
hpdl
|
608
|
441
|
<style type="text/css">
|
|
442
|
|
|
443
|
|
|
444
|
|
|
445
|
|
|
446
|
|
hpdl
|
1078
|
447
|
|
hpdl
|
608
|
448
|
|
|
449
|
|
|
450
|
|
|
451
|
|
|
452
|
|
hpdl
|
1078
|
453
|
|
|
454
|
|
hpdl
|
608
|
455
|
|
|
456
|
</style>
|
|
457
|
|
hpdl
|
1
|
458
|
<link type="text/css" rel="stylesheet" href="external/tabpane/css/luna/tab.css" />
|
|
459
|
<script type="text/javascript" src="external/tabpane/js/tabpane.js"></script>
|
|
460
|
|
hpdl
|
608
|
461
|
<div id="overlay" style="display: none; position: absolute; top: 0; left: 0; z-index: 90; width: 100%;"></div>
|
hpdl
|
1
|
462
|
|
hpdl
|
608
|
463
|
<div id="actionLayer" style="display: none; position: absolute; z-index: 100; width: 400px; height: 200px;">
|
hpdl
|
755
|
464
|
<div class="infoBoxHeading"><?php echo osc_icon('trash.png', IMAGE_DELETE) . ' Delete Image'; ?></div>
|
hpdl
|
608
|
465
|
<div class="infoBoxContent">
|
|
466
|
<p>Are you sure you want to delete this product image?</p>
|
|
467
|
|
|
468
|
<p align="center"><?php echo '<button onclick="removeImageConfirmation(\'\')" class="operationButton">' . IMAGE_DELETE . '</button> <button onclick="cancelRemoveImage(\'\')" class="operationButton">' . IMAGE_CANCEL . '</button>'; ?></p>
|
|
469
|
</div>
|
|
470
|
</div>
|
|
471
|
|
hpdl
|
908
|
472
|
<h1><?php echo (isset($pInfo) && isset($pInfo->products_name[$osC_Language->getID()])) ? $pInfo->products_name[$osC_Language->getID()] : TEXT_NEW_PRODUCT; ?></h1>
|
hpdl
|
608
|
473
|
|
hpdl
|
1
|
474
|
<div class="tab-pane" id="mainTabPane">
|
|
475
|
<script type="text/javascript">
|
|
476
|
|
|
477
|
</script>
|
|
478
|
|
hpdl
|
749
|
479
|
<form name="product" method="post" enctype="multipart/form-data">
|
hpdl
|
1
|
480
|
|
|
481
|
<div class="tab-page" id="tabDescription">
|
|
482
|
<h2 class="tab"><?php echo TAB_GENERAL; ?></h2>
|
|
483
|
|
|
484
|
<script type="text/javascript">
|
|
485
|
|
|
486
|
</script>
|
|
487
|
|
|
488
|
<div class="tab-pane" id="descriptionTabPane">
|
|
489
|
<script type="text/javascript">
|
|
490
|
|
|
491
|
</script>
|
|
492
|
|
|
493
|
<?php
|
hpdl
|
121
|
494
|
foreach ($osC_Language->getAll() as $l) {
|
hpdl
|
1
|
495
|
?>
|
|
496
|
|
hpdl
|
121
|
497
|
<div class="tab-page" id="tabDescriptionLanguages_<?php echo $l['code']; ?>">
|
hpdl
|
755
|
498
|
<h2 class="tab"><?php echo osc_image('../includes/languages/' . $l['code'] . '/images/' . $l['image'], $l['name']) . ' ' . $l['name']; ?></h2>
|
hpdl
|
1
|
499
|
|
|
500
|
<script type="text/javascript">
|
hpdl
|
121
|
501
|
|
hpdl
|
1
|
502
|
</script>
|
|
503
|
|
|
504
|
<table border="0" width="100%" cellspacing="0" cellpadding="2">
|
|
505
|
<tr>
|
|
506
|
<td class="smallText"><?php echo TEXT_PRODUCTS_NAME; ?></td>
|
hpdl
|
755
|
507
|
<td class="smallText"><?php echo osc_draw_input_field('products_name[' . $l['id'] . ']', (isset($pInfo) && is_array($pInfo->products_name) && isset($pInfo->products_name[$l['id']]) ? $pInfo->products_name[$l['id']] : null)); ?></td>
|
hpdl
|
1
|
508
|
</tr>
|
|
509
|
<tr>
|
|
510
|
<td class="smallText" valign="top"><?php echo TEXT_PRODUCTS_DESCRIPTION; ?></td>
|
hpdl
|
755
|
511
|
<td class="smallText"><?php echo osc_draw_textarea_field('products_description[' . $l['id'] . ']', (isset($pInfo) && is_array($pInfo->products_description) && isset($pInfo->products_description[$l['id']]) ? $pInfo->products_description[$l['id']] : null), 70, 15, 'style="width: 100%;"'); ?></td>
|
hpdl
|
1
|
512
|
</tr>
|
|
513
|
<tr>
|
hpdl
|
365
|
514
|
<td class="smallText"><?php echo TEXT_PRODUCTS_MODEL; ?></td>
|
hpdl
|
755
|
515
|
<td class="smallText"><?php echo osc_draw_input_field('products_model[' . $l['id'] . ']', (isset($pInfo) && is_array($pInfo->products_model) && isset($pInfo->products_model[$l['id']]) ? $pInfo->products_model[$l['id']] : null)); ?></td>
|
hpdl
|
365
|
516
|
</tr>
|
|
517
|
<tr>
|
|
518
|
<td class="smallText"><?php echo TEXT_PRODUCTS_KEYWORD; ?></td>
|
hpdl
|
755
|
519
|
<td class="smallText"><?php echo osc_draw_input_field('products_keyword[' . $l['id'] . ']', (isset($pInfo) && is_array($pInfo->products_keyword) && isset($pInfo->products_keyword[$l['id']]) ? $pInfo->products_keyword[$l['id']] : null)); ?></td>
|
hpdl
|
365
|
520
|
</tr>
|
|
521
|
<tr>
|
|
522
|
<td class="smallText"><?php echo TEXT_PRODUCTS_TAGS; ?></td>
|
hpdl
|
755
|
523
|
<td class="smallText"><?php echo osc_draw_input_field('products_tags[' . $l['id'] . ']', (isset($pInfo) && is_array($pInfo->products_tags) && isset($pInfo->products_tags[$l['id']]) ? $pInfo->products_tags[$l['id']] : null)); ?></td>
|
hpdl
|
365
|
524
|
</tr>
|
|
525
|
<tr>
|
hpdl
|
1
|
526
|
<td class="smallText"><?php echo TEXT_PRODUCTS_URL; ?></td>
|
hpdl
|
755
|
527
|
<td class="smallText"><?php echo osc_draw_input_field('products_url[' . $l['id'] . ']', (isset($pInfo) && is_array($pInfo->products_url) && isset($pInfo->products_url[$l['id']]) ? $pInfo->products_url[$l['id']] : null)); ?></td>
|
hpdl
|
1
|
528
|
</tr>
|
|
529
|
</table>
|
|
530
|
</div>
|
|
531
|
|
|
532
|
<?php
|
|
533
|
}
|
|
534
|
?>
|
|
535
|
|
|
536
|
</div>
|
|
537
|
</div>
|
|
538
|
|
|
539
|
<div class="tab-page" id="tabData">
|
|
540
|
<h2 class="tab"><?php echo TAB_DATA; ?></h2>
|
|
541
|
|
|
542
|
<script type="text/javascript">
|
|
543
|
|
|
544
|
</script>
|
|
545
|
|
|
546
|
<table border="0" width="100%" cellspacing="0" cellpadding="2">
|
|
547
|
<tr>
|
|
548
|
<td class="smallText" width="50%" height="100%" valign="top">
|
|
549
|
<fieldset style="height: 100%;">
|
|
550
|
<legend>Price</legend>
|
|
551
|
|
|
552
|
<table border="0" width="100%" cellspacing="0" cellpadding="2">
|
|
553
|
<tr>
|
|
554
|
<td class="smallText"><?php echo TEXT_PRODUCTS_TAX_CLASS; ?></td>
|
hpdl
|
755
|
555
|
<td class="smallText"><?php echo osc_draw_pull_down_menu('products_tax_class_id', $tax_class_array, (isset($pInfo) ? $pInfo->products_tax_class_id : null), 'onchange="updateGross(\'products_price\');"'); ?></td>
|
hpdl
|
1
|
556
|
</tr>
|
|
557
|
<tr>
|
|
558
|
<td class="smallText"><?php echo TEXT_PRODUCTS_PRICE_NET; ?></td>
|
hpdl
|
755
|
559
|
<td class="smallText"><?php echo osc_draw_input_field('products_price', (isset($pInfo) ? $pInfo->products_price : null), 'onkeyup="updateGross(\'products_price\')"'); ?></td>
|
hpdl
|
1
|
560
|
</tr>
|
|
561
|
<tr>
|
|
562
|
<td class="smallText"><?php echo TEXT_PRODUCTS_PRICE_GROSS; ?></td>
|
hpdl
|
755
|
563
|
<td class="smallText"><?php echo osc_draw_input_field('products_price_gross', (isset($pInfo) ? $pInfo->products_price : null), 'onkeyup="updateNet(\'products_price\')"'); ?></td>
|
hpdl
|
1
|
564
|
</tr>
|
|
565
|
</table>
|
|
566
|
|
hpdl
|
365
|
567
|
<script type="text/javascript">
|
hpdl
|
443
|
568
|
|
hpdl
|
1
|
569
|
</script>
|
|
570
|
</fieldset>
|
|
571
|
</td>
|
|
572
|
<td class="smallText" width="50%" height="100%" valign="top">
|
|
573
|
<fieldset style="height: 100%;">
|
|
574
|
<legend>Data</legend>
|
|
575
|
|
|
576
|
<table border="0" width="100%" cellspacing="0" cellpadding="2">
|
|
577
|
<tr>
|
|
578
|
<td class="smallText"><?php echo TEXT_PRODUCTS_MANUFACTURER; ?></td>
|
hpdl
|
755
|
579
|
<td class="smallText"><?php echo osc_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($pInfo) ? $pInfo->manufacturers_id : null)); ?></td>
|
hpdl
|
1
|
580
|
</tr>
|
|
581
|
<tr>
|
|
582
|
<td class="smallText"><?php echo TEXT_PRODUCTS_QUANTITY; ?></td>
|
hpdl
|
755
|
583
|
<td class="smallText"><?php echo osc_draw_input_field('products_quantity', (isset($pInfo) ? $pInfo->products_quantity : null)); ?></td>
|
hpdl
|
1
|
584
|
</tr>
|
|
585
|
<tr>
|
|
586
|
<td class="smallText"><?php echo TEXT_PRODUCTS_WEIGHT; ?></td>
|
hpdl
|
755
|
587
|
<td class="smallText"><?php echo osc_draw_input_field('products_weight', (isset($pInfo) ? $pInfo->products_weight : null)). ' ' . osc_draw_pull_down_menu('products_weight_class', $weight_class_array, (isset($pInfo) ? $pInfo->products_weight_class : SHIPPING_WEIGHT_UNIT)); ?></td>
|
hpdl
|
1
|
588
|
</tr>
|
|
589
|
</table>
|
|
590
|
</fieldset>
|
|
591
|
</td>
|
|
592
|
</tr>
|
|
593
|
<tr>
|
|
594
|
<td class="smallText" width="50%" height="100%" valign="top">
|
|
595
|
<fieldset style="height: 100%;">
|
|
596
|
<legend><?php echo TEXT_PRODUCTS_STATUS; ?></legend>
|
|
597
|
|
hpdl
|
755
|
598
|
<?php echo osc_draw_radio_field('products_status', array(array('id' => '1', 'text' => TEXT_PRODUCT_AVAILABLE), array('id' => '0', 'text' => TEXT_PRODUCT_NOT_AVAILABLE)), (isset($pInfo) ? $pInfo->products_status : '0'), null, '<br />'); ?>
|
hpdl
|
1
|
599
|
</fieldset>
|
|
600
|
</td>
|
|
601
|
<td class="smallText" width="50%" height="100%" valign="top">
|
|
602
|
<fieldset style="height: 100%;">
|
|
603
|
<legend>Information</legend>
|
|
604
|
|
|
605
|
<table border="0" width="100%" cellspacing="0" cellpadding="2">
|
|
606
|
<tr>
|
|
607
|
<td class="smallText"><?php echo TEXT_PRODUCTS_DATE_AVAILABLE; ?></td>
|
hpdl
|
755
|
608
|
<td class="smallText"><?php echo osc_draw_input_field('products_date_available', (isset($pInfo) ? $pInfo->products_date_available : null)); ?><input type="button" value="..." id="calendarTrigger" class="operationButton"><script type="text/javascript">Calendar.setup( { inputField: "products_date_available", ifFormat: "%Y-%m-%d", button: "calendarTrigger" } );</script><small>(YYYY-MM-DD)</small></td>
|
hpdl
|
1
|
609
|
</tr>
|
|
610
|
</table>
|
|
611
|
</fieldset>
|
|
612
|
</td>
|
|
613
|
</tr>
|
|
614
|
</table>
|
|
615
|
</div>
|
|
616
|
|
|
617
|
<div class="tab-page" id="tabImages">
|
|
618
|
<h2 class="tab"><?php echo TAB_IMAGES; ?></h2>
|
|
619
|
|
|
620
|
<script type="text/javascript">
|
|
621
|
|
|
622
|
</script>
|
|
623
|
|
|
624
|
<table border="0" width="100%" cellspacing="0" cellpadding="2">
|
|
625
|
<tr>
|
hpdl
|
608
|
626
|
<td class="smallText" width="100%" height="100%" valign="top">
|
|
627
|
<fieldset style="height: 100%;">
|
hpdl
|
749
|
628
|
<legend>New Image</legend>
|
hpdl
|
1
|
629
|
|
hpdl
|
749
|
630
|
<div style="float: right;">
|
|
631
|
<a href="#" id="remoteFilesLink" onclick="switchImageFilesView('remote');" style="background-color: #E5EFE5;">Remote File Upload</a> | <a href="#" id="localFilesLink" onclick="switchImageFilesView('local');">Local Files</a>
|
|
632
|
</div>
|
|
633
|
|
|
634
|
<div id="remoteFiles">
|
|
635
|
<span id="fileUploadField"></span>
|
|
636
|
|
|
637
|
<?php
|
|
638
|
if (isset($pInfo)) {
|
hpdl
|
1076
|
639
|
echo '<input type="submit" value="Send To Server" class="operationButton" onclick="document.product.target=\'fileUploadFrame\'; document.product.action=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&action=fileUpload' . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '')) . '\'; document.getElementById(\'showProgress\').style.display=\'inline\';" /><div id="showProgress" style="display: none; padding-left: 10px;">' . osc_icon('progress_ani.gif') . ' Uploading image to server...</div>';
|
hpdl
|
749
|
640
|
}
|
|
641
|
?>
|
|
642
|
</div>
|
|
643
|
|
|
644
|
<script type="text/javascript">
|
|
645
|
|
|
646
|
</script>
|
|
647
|
|
|
648
|
<div id="localFiles" style="display: none;">
|
|
649
|
<p><?php echo 'Product images can be uploaded via FTP to the following directory:<br /><br />' . realpath('../images/products/_upload'); ?></p>
|
|
650
|
|
|
651
|
<select id="localImagesSelection" name="localimages[]" size="5" multiple="multiple" style="width: 100%;"></select>
|
|
652
|
|
hpdl
|
755
|
653
|
<div id="showProgressGetLocalImages" style="display: none; float: right; padding-right: 10px;"><?php echo osc_icon('progress_ani.gif') . ' Retrieving local images..'; ?></div>
|
hpdl
|
749
|
654
|
|
|
655
|
<?php
|
|
656
|
if (isset($pInfo)) {
|
hpdl
|
1076
|
657
|
echo '<input type="submit" value="Assign To Product" class="operationButton" onclick="document.product.target=\'fileUploadFrame\'; document.product.action=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&action=assignLocalImages' . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '')) . '\'; document.getElementById(\'showProgressAssigningLocalImages\').style.display=\'inline\';" /><div id="showProgressAssigningLocalImages" style="display: none; padding-left: 10px;">' . osc_icon('progress_ani.gif') . ' Uploading image(s) to server...</div>';
|
hpdl
|
749
|
658
|
}
|
|
659
|
?>
|
|
660
|
|
|
661
|
</div>
|
|
662
|
|
|
663
|
<iframe id="fileUploadFrame" name="fileUploadFrame" style="height: 0px; width: 0px; border: 0px"></iframe>
|
hpdl
|
608
|
664
|
</fieldset>
|
hpdl
|
1
|
665
|
|
hpdl
|
749
|
666
|
<script type="text/javascript">
|
|
667
|
|
|
668
|
</script>
|
|
669
|
|
|
670
|
<?php
|
|
671
|
if (isset($pInfo)) {
|
|
672
|
?>
|
|
673
|
|
hpdl
|
608
|
674
|
<fieldset style="height: 100%;">
|
|
675
|
<legend>Original Images</legend>
|
|
676
|
|
|
677
|
<div id="imagesOriginal" style="overflow: auto;"></div>
|
|
678
|
</fieldset>
|
|
679
|
|
|
680
|
<fieldset style="height: 100%;">
|
|
681
|
<legend>Images</legend>
|
|
682
|
|
|
683
|
<div id="imagesOther" style="overflow: auto;"></div>
|
|
684
|
</fieldset>
|
|
685
|
|
|
686
|
<script type="text/javascript">
|
|
687
|
|
|
688
|
</script>
|
|
689
|
|
|
690
|
<?php
|
hpdl
|
749
|
691
|
}
|
hpdl
|
608
|
692
|
?>
|
|
693
|
|
hpdl
|
1
|
694
|
</td>
|
|
695
|
</tr>
|
|
696
|
</table>
|
|
697
|
</div>
|
|
698
|
|
|
699
|
<div class="tab-page" id="tabAttributes">
|
|
700
|
<h2 class="tab"><?php echo TAB_ATTRIBUTES; ?></h2>
|
|
701
|
|
|
702
|
<script type="text/javascript">mainTabPane.addTabPage( document.getElementById( "tabAttributes" ) );</script>
|
|
703
|
|
|
704
|
<table border="0" width="100%" cellspacing="0" cellpadding="2">
|
|
705
|
<tr>
|
|
706
|
<td width="30%" valign="top"><select name="attributes" size="20" style="width: 100%;">
|
|
707
|
<?php
|
|
708
|
$Qoptions = $osC_Database->query('select products_options_id, products_options_name from :table_products_options where language_id = :language_id order by products_options_name');
|
|
709
|
$Qoptions->bindTable(':table_products_options', TABLE_PRODUCTS_OPTIONS);
|
hpdl
|
121
|
710
|
$Qoptions->bindInt(':language_id', $osC_Language->getID());
|
hpdl
|
1
|
711
|
$Qoptions->execute();
|
|
712
|
|
|
713
|
while ($Qoptions->next()) {
|
|
714
|
echo ' <optgroup label="' . $Qoptions->value('products_options_name') . '" id="' . $Qoptions->value('products_options_id') . '">' . "\n";
|
|
715
|
|
|
716
|
$Qvalues = $osC_Database->query('select pov.products_options_values_id, pov.products_options_values_name from :table_products_options_values pov, :table_products_options_values_to_products_options pov2po where pov2po.products_options_id = :products_options_id and pov2po.products_options_values_id = pov.products_options_values_id and pov.language_id = :language_id order by pov.products_options_values_name');
|
|
717
|
$Qvalues->bindTable(':table_products_options_values', TABLE_PRODUCTS_OPTIONS_VALUES);
|
|
718
|
$Qvalues->bindTable(':table_products_options_values_to_products_options', TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS);
|
|
719
|
$Qvalues->bindInt(':products_options_id', $Qoptions->valueInt('products_options_id'));
|
hpdl
|
121
|
720
|
$Qvalues->bindInt(':language_id', $osC_Language->getID());
|
hpdl
|
1
|
721
|
$Qvalues->execute();
|
|
722
|
|
|
723
|
while ($Qvalues->next()) {
|
|
724
|
echo ' <option value="' . $Qvalues->valueInt('products_options_values_id') . '">' . $Qvalues->value('products_options_values_name') . '</option>' . "\n";
|
|
725
|
}
|
|
726
|
|
|
727
|
echo ' </optgroup>' . "\n";
|
|
728
|
}
|
|
729
|
?>
|
|
730
|
</select></td>
|
|
731
|
<td align="center" width="10%" class="smallText">
|
hpdl
|
365
|
732
|
<input type="button" value=">>" onclick="moreFields()" class="infoBoxButton">
|
hpdl
|
1
|
733
|
</td>
|
|
734
|
<td width="60%" valign="top" class="smallText">
|
|
735
|
<fieldset>
|
|
736
|
<legend><?php echo FIELDSET_ASSIGNED_ATTRIBUTES; ?></legend>
|
|
737
|
|
|
738
|
<?php
|
hpdl
|
894
|
739
|
if (isset($_GET['pID'])) {
|
|
740
|
echo '<table border="0" width="100%" cellspacing="0" cellpadding="2">';
|
hpdl
|
1
|
741
|
|
hpdl
|
894
|
742
|
$Qattributes = $osC_Database->query('select po.products_options_id, po.products_options_name, pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from :table_products_attributes pa, :table_products_options po, :table_products_options_values pov where pa.products_id = :products_id and pa.options_id = po.products_options_id and po.language_id = :language_id and pa.options_values_id = pov.products_options_values_id and pov.language_id = :language_id order by po.products_options_name, pov.products_options_values_name');
|
|
743
|
$Qattributes->bindTable(':table_products_attributes', TABLE_PRODUCTS_ATTRIBUTES);
|
|
744
|
$Qattributes->bindTable(':table_products_options', TABLE_PRODUCTS_OPTIONS);
|
|
745
|
$Qattributes->bindTable(':table_products_options_values', TABLE_PRODUCTS_OPTIONS_VALUES);
|
|
746
|
$Qattributes->bindInt(':products_id', $_GET['pID']);
|
|
747
|
$Qattributes->bindInt(':language_id', $osC_Language->getID());
|
|
748
|
$Qattributes->bindInt(':language_id', $osC_Language->getID());
|
|
749
|
$Qattributes->execute();
|
hpdl
|
1
|
750
|
|
hpdl
|
894
|
751
|
$current_attribute_group = '';
|
|
752
|
|
|
753
|
while ($Qattributes->next()) {
|
|
754
|
if ($Qattributes->value('products_options_name') != $current_attribute_group) {
|
|
755
|
echo ' <tr>' . "\n" .
|
|
756
|
' <td class="smallText" colspan="3"><b>' . $Qattributes->value('products_options_name') . '</b></td>' . "\n" .
|
|
757
|
' </tr>' . "\n";
|
|
758
|
|
|
759
|
$current_attribute_group = $Qattributes->value('products_options_name');
|
|
760
|
}
|
|
761
|
|
|
762
|
echo ' <tr id="attribute-' . $Qattributes->valueInt('products_options_id') . '_' . $Qattributes->valueInt('products_options_values_id') . '">' . "\n" .
|
|
763
|
' <td class="smallText" width="50%">' . $Qattributes->value('products_options_values_name') . '</td>' . "\n" .
|
|
764
|
' <td class="smallText">' . osc_draw_pull_down_menu('attribute_prefix[' . $Qattributes->valueInt('products_options_id') . '][' . $Qattributes->valueInt('products_options_values_id') . ']', array(array('id' => '+', 'text' => '+'), array('id' => '-', 'text' => '-')), $Qattributes->value('price_prefix')) . ' ' . osc_draw_input_field('attribute_price[' . $Qattributes->valueInt('products_options_id') . '][' . $Qattributes->valueInt('products_options_values_id') . ']', $Qattributes->value('options_values_price')) . '</td>' . "\n" .
|
|
765
|
' <td class="smallText" align="right"><input type="button" value="-" id="attribute-' . $Qattributes->valueInt('products_options_id') . '_' . $Qattributes->valueInt('products_options_values_id') . '-button" onclick="toggleAttributeStatus(\'attribute-' . $Qattributes->valueInt('products_options_id') . '_' . $Qattributes->valueInt('products_options_values_id') . '\');" class="infoBoxButton"></td>' . "\n" .
|
hpdl
|
1
|
766
|
' </tr>' . "\n";
|
|
767
|
}
|
|
768
|
|
hpdl
|
894
|
769
|
echo '</table>';
|
hpdl
|
1
|
770
|
}
|
|
771
|
?>
|
|
772
|
|
|
773
|
<span id="writeroot"></span>
|
|
774
|
|
|
775
|
<div id="readroot" style="display: none">
|
|
776
|
<table border="0" width="100%" cellspacing="0" cellpadding="2">
|
|
777
|
<tr>
|
|
778
|
<td class="smallText" colspan="3"><b><span id="attribteGroupName"> </span></b></td>
|
|
779
|
</tr>
|
|
780
|
<tr class="attributeAdd">
|
|
781
|
<td class="smallText" width="50%"><span id="attributeKey"> </span></td>
|
hpdl
|
755
|
782
|
<td class="smallText"><?php echo osc_draw_pull_down_menu('new_attribute_prefix', array(array('id' => '+', 'text' => '+'), array('id' => '-', 'text' => '-')), '+', 'disabled="disabled"') . ' ' . osc_draw_input_field('new_attribute_price', null, 'disabled="disabled"'); ?></td>
|
hpdl
|
365
|
783
|
<td class="smallText" align="right"><input type="button" value="-" onclick="this.parentNode.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode.parentNode);" class="infoBoxButton"></td>
|
hpdl
|
1
|
784
|
</tr>
|
|
785
|
</table>
|
|
786
|
</div>
|
|
787
|
</fieldset>
|
|
788
|
</td>
|
|
789
|
</tr>
|
|
790
|
</table>
|
|
791
|
</div>
|
|
792
|
|
|
793
|
<div class="tab-page" id="tabCategories">
|
|
794
|
<h2 class="tab"><?php echo TAB_CATEGORIES; ?></h2>
|
|
795
|
|
|
796
|
<script type="text/javascript">mainTabPane.addTabPage( document.getElementById( "tabCategories" ) );</script>
|
|
797
|
|
|
798
|
<table border="0" width="100%" cellspacing="0" cellpadding="2">
|
|
799
|
<tr>
|
|
800
|
<td class="smallText"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">
|
|
801
|
<thead>
|
|
802
|
<tr>
|
|
803
|
<th>Categories</th>
|
|
804
|
<th>Selected</th>
|
|
805
|
</tr>
|
|
806
|
</thead>
|
|
807
|
<tbody>
|
|
808
|
<?php
|
|
809
|
$product_categories_array = array();
|
|
810
|
|
hpdl
|
877
|
811
|
if (isset($_GET['pID'])) {
|
|
812
|
$Qcategories = $osC_Database->query('select categories_id from :table_products_to_categories where products_id = :products_id');
|
|
813
|
$Qcategories->bindTable(':table_products_to_categories', TABLE_PRODUCTS_TO_CATEGORIES);
|
|
814
|
$Qcategories->bindInt(':products_id', $_GET['pID']);
|
|
815
|
$Qcategories->execute();
|
hpdl
|
1
|
816
|
|
hpdl
|
877
|
817
|
while ($Qcategories->next()) {
|
|
818
|
$product_categories_array[] = $Qcategories->valueInt('categories_id');
|
|
819
|
}
|
hpdl
|
1
|
820
|
}
|
|
821
|
|
|
822
|
$assignedCategoryTree = new osC_CategoryTree();
|
|
823
|
$assignedCategoryTree->setBreadcrumbUsage(false);
|
|
824
|
$assignedCategoryTree->setSpacerString(' ', 5);
|
|
825
|
|
|
826
|
foreach ($assignedCategoryTree->getTree() as $value) {
|
hpdl
|
365
|
827
|
echo ' <tr onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' . "\n" .
|
hpdl
|
613
|
828
|
' <td class="smallText"><a href="#" onclick="document.product.categories_' . $value['id'] . '.checked=!document.product.categories_' . $value['id'] . '.checked;">' . $value['title'] . '</a></td>' . "\n" .
|
hpdl
|
1
|
829
|
' <td class="smallText" align="right">' . osc_draw_checkbox_field('categories[]', $value['id'], in_array($value['id'], $product_categories_array), 'id="categories_' . $value['id'] . '"') . '</td>' . "\n" .
|
|
830
|
' </tr>' . "\n";
|
|
831
|
}
|
|
832
|
?>
|
|
833
|
</table></td>
|
|
834
|
</tr>
|
|
835
|
</table>
|
|
836
|
</div>
|
|
837
|
|
hpdl
|
1076
|
838
|
<p align="right"><?php echo '<input type="submit" value="' . IMAGE_SAVE . '" class="operationButton" onclick="' . (isset($pInfo) ? 'setFileUploadField(); ' : '') . 'document.product.target=\'_self\'; document.product.action=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&cPath=' . $_GET['cPath'] . '&search=' . $_GET['search'] . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . '&action=save') . '\';"> <input type="button" value="' . IMAGE_CANCEL . '" onclick="document.location.href=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&cPath=' . $_GET['cPath'] . '&search=' . $_GET['search'] . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '')) . '\';" class="operationButton">'; ?></p>
|
hpdl
|
1
|
839
|
|
|
840
|
</form>
|
hpdl
|
749
|
841
|
</div>
|