if(isset($_POST['AJAX'])){ if($_POST['AJAX']=='edit_query_theme'){ RT::save_theme($_POST['query_num'],$_POST['theme']); echo '{"response":"OK"}'; exit; } if($_POST['AJAX']=='update_new_sort_rt'){ RT::update_new_sort_rt_AJAX(); exit; } } ///////////////////// END AJAX ////////////////////// $cont_face_data = RT::fetch_query_client_face($query_num); //print_r($cont_face_data); $cont_face = '<div class="client_faces_select2" sourse="rt" query_num="'.$query_num.'" client_id="'.$client_id.'" onclick="openCloseMenu(event,\'clientManagerMenu\');">Контактное лицо: '.(($cont_face_data['id']==0)?'не установлено':$cont_face_data['details']['last_name'].' '.$cont_face_data['details']['name'].' '.$cont_face_data['details']['surname']).'</div>'; $create_time = RT::fetch_query_create_time($query_num); $query_related_data = RT::fetch_query_related_data($query_num); $theme = $query_related_data['theme']; $query_status = $query_related_data['status']; $manager_id = $query_related_data['manager_id']; $calculator_level = ($query_related_data['calculator_level']!='')?$query_related_data['calculator_level']:'full'; $CALCULATOR_LEVELS = array('full'=>"Конечники",'ra'=>"Рекламщики"); $calculator_level_ru = $CALCULATOR_LEVELS[$calculator_level]; $block_page_elements = ($_SESSION['access']['access']!= 1 && $query_status!='in_work')?true:false; $theme_block = '<input id="query_theme_input" class="query_theme" query_num="'.$query_num.'" type="text" value="'.(($theme=='')?'Введите тему':htmlspecialchars($theme,ENT_QUOTES)).'" onclick="fff(this,\'Введите тему\');">';