示例#1
0
			case 'datalist_supplier':
				$Supplier = new Suppliers();
				echo json_encode($Supplier->GetIdOneRowArrayByArt($_POST['article']));
				break;
			case 'insert_related':
				echo json_encode($Products->AddRelatedProduct($_POST['id_prod'], $_POST['id_related_prod']));
				break;
			case 'remove_related':
				echo json_encode($Products->DelRelatedProduct($_POST['id_prod'], $_POST['id_related_prod']));
				break;
			case 'add_supplier':
				echo json_encode($Products->GetSupplierInfoByArticle($_POST['art']));
				break;
			case 'get_segment_list':
				$Segmentation = new Segmentation();
				echo json_encode($Segmentation->GetSegmentation($_POST['type']));
				break;
			case 'UpdateDemandChart':
				echo json_encode($Products->UpdateDemandChart($_POST, true));
				break;
			case 'AddPhotoProduct':
				$echo = 'error';
				if(isset($_POST['id_category'])){
					$_POST['categories_ids'][] = $_POST['id_category'];
					unset($_POST['id_category']);
				}
				if($id_product = $Products->AddPhotoProduct($_POST)){
					$Products->SetFieldsByID($id_product);
					$product = $Products->fields;
					$images = $Products->GetPhotoById($id_product, true);
					$videos = $Products->GetVideoById($id_product);
示例#2
0
<?php

if (!_acl::isAllow('segmentations')) {
    die("Access denied");
}
$segmentation = new Segmentation();
// // ---- center ----
unset($parsed_res);
$ii = count($GLOBALS['IERA_LINKS']);
$GLOBALS['IERA_LINKS'][$ii]['title'] = "Сегментации";
$tpl->Assign('h1', $GLOBALS['IERA_LINKS'][$ii]['title']);
$tpl->Assign('list_types', $segmentation->GetSegmentationType());
$tpl->Assign('list', $segmentation->GetSegmentation());
$parsed_res = array('issuccess' => TRUE, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_segmentations.tpl'));
if (TRUE == $parsed_res['issuccess']) {
    $tpl_center .= $parsed_res['html'];
}