$quick_button = '<div class="quick_button_div"><a href="#11" class="button"> </a></div>'; $view_button = '<div class="quick_view_button_div"><a href="#11" class="button"> </a></div>'; 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']; include_once(ROOT."/libs/php/classes/manager_class.php"); $manager = new Manager($user_id); include_once(ROOT."/libs/php/classes/client_class.php"); $kp_id = $_GET['send_kp_by_mail']; $kp_filename = Com_pred::prepare_send_mail($kp_id,$client_id,$user_id); //$kp_filename = ROOT.'/data/com_offers/1894apelburg_1894_2015_56_01.pdf'; $main_window_tpl_name = ROOT.'/skins/tpl/clients/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); $message_tpl_filenames = array('recalculation','new_kp_new_client','new_kp',); foreach($message_tpl_filenames as $tpl_filename){ $tpl_path = ROOT.'/skins/tpl/common/mail_tpls/'.$tpl_filename.'.tpl'; $fd = fopen($tpl_path,'r');