Example #1
0
	$quick_button_back = get_link_back();
	
	include_once(ROOT."/libs/php/classes/art_img_class.php");
	include_once(ROOT."/libs/php/classes/com_pred_class.php");
	
	///////////////////////////////////////// AJAX ////////////////////////////////////////////////////
	
	if(isset($_GET['send_kp_by_mail'])){
	    // echo  $_GET['send_kp_by_mail'];exit;
		
		include_once(ROOT."/libs/php/classes/manager_class.php");
		$manager = new Manager($user_id);
		
		
		include_once(ROOT."/libs/php/classes/client_class.php");
		$client_mails = Client::cont_faces_data_for_mail($client_id);

	    $kp_id = $_GET['send_kp_by_mail'];
		$kp_filename = Com_pred::prepare_send_mail($kp_id,$client_id,$user_id);
		$theme = Com_pred::fetch_theme($kp_id);
        //$kp_filename = ROOT.'/data/com_offers/1894apelburg_1894_2015_56_01.pdf';
		
		$main_window_tpl_name = ROOT.'/skins/tpl/client_folder/business_offers/send_mail_window.tpl';
		$fd = fopen($main_window_tpl_name,'r');
		$main_window_tpl = fread($fd,filesize($main_window_tpl_name));
	    fclose($fd);
        
        // кодируем данные в формате HTML перед передачей в формате JSON
		$main_window_tpl = base64_encode($main_window_tpl);