Esempio n. 1
0
    // инициализация класса формы
	$FORM = new Forms();

	$quick_button = '<div class="quick_button_div" style="background:none"><a href="#" id="create_new_position" style="display: block;" class="button add">Добавить</a></div>';
	

	$query_num = (!empty($_GET['query_num']))? $_GET['query_num']:FALSE;
	
	if(isset($_POST['set_discount'])){
	     //print_r($_POST['form_data'])."<br>";
	     set_discount($_POST['form_data']);
		 header('Location:'.$_SERVER['HTTP_REFERER']);
	     exit;
    }
	if(isset($_GET['set_svetofor_status'])){
	     RT::change_all_svetofors(json_decode($_GET['ids']),$_GET['set_svetofor_status']);
		 header('Location:?'.addOrReplaceGetOnURL('','set_svetofor_status&ids'));
		 exit;
    }
	if(isset($_GET['set_order_deadline'])){
	     RT::set_order_deadline($_GET['ids'],$_GET['date'],$_GET['time']);
		 header('Location:?'.addOrReplaceGetOnURL('','set_order_deadline&ids&date&time'));
		 exit;
    }
	////////////////////////  AJAX  //////////////////////// 
	
	if(isset($_GET['setCalcualtorLevel'])){
	     // print_r($_GET);
	     require_once(ROOT."/libs/php/classes/rt_class.php");
		 echo RT::setCalcualtorLevel($_GET['query_num'],$_GET['setCalcualtorLevel']);
		 exit;