product_save.php
1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
if (isset ($_POST['save']))
{
$objCatalogs->trim ($_POST);
if (! $objCatalogs->valid ($_POST, $_FILES))
{
$saveId = $objCatalogs->SaveProduct ($_POST, $_FILES);
if (! $_POST['update_id'])
{
$data = array (
'parent_table' => "product",
'parent_table_id' => $saveId,
'data' => $_POST
);
$objForum->SaveTopic ($data, $_FILES);
}
header ("location:" . URL . "admin.php?action={$rule['action']}&modAction=products&rubID=" . $_GET['rubID']);
}
}
elseif (isset ($_GET['updateID']) && $_GET['updateID'] > 0)
{
$objCatalogs->viewProductOne ($_GET['updateID'], $row);
$objCatalogs->viewFilterProductID ($_GET['updateID']);
$objCatalogs->viewSexProductID ($_GET['updateID']);
$objCatalogs->viewFilterProductID2 ($_GET['updateID']);
$objCatalogs->viewYearsProductID ($_GET['updateID']);
$objCatalogs->viewCitiesProductID ($_GET['updateID']);
$objCatalogs->viewAkciiProductID ($_GET['updateID']);
$objCatalogs->viewProductParams ($_GET['updateID']);
}
$objCatalogs->viewRubricsAll (0);
$objCatalogs->viewFiltersAll ($_GET['rubID']);
$objCatalogs->viewFilters2 ($_GET['rubID']);
$objCatalogs->viewYearsAll ($_GET['rubID']);
$objCatalogs->viewCities ();
$objCatalogs->viewRubricOne ($_GET['rubID'], $row);
$objCatalogs->viewBrends ();
$sex = array (
0 => array (
'id' => 1,
'name' => "×îëîâ³÷èé",
'link' => 'male'
),
1 => array (
'id' => 2,
'name' => "Ƴíî÷èé",
'link' => 'female'
),
2 => array (
'id' => 3,
'name' => "Äèòÿ÷èé",
'link' => 'child'
)
)
// 4=>array('name'=>"Óí³ñåêñ",'link'=>'unisex')
;
$objCatalogs->tpl->assign ('sex', $sex);
$objCatalogs->displayProduct ();
?>