Changeset 2708596
- Timestamp:
- 04/12/2022 12:38:27 PM (4 years ago)
- Location:
- nirweb-support/trunk
- Files:
-
- 43 edited
-
core/core.php (modified) (23 diffs)
-
core/create_db.php (modified) (2 diffs)
-
inc/admin/functions/ajax.php (modified) (16 diffs)
-
inc/admin/functions/ajax_search_in_ticketes_wpyar.php (modified) (1 diff)
-
inc/admin/functions/func_FAQ.php (modified) (1 diff)
-
inc/admin/functions/func_answerd_ticket.php (modified) (3 diffs)
-
inc/admin/functions/func_department.php (modified) (2 diffs)
-
inc/admin/functions/func_list_tickets.php (modified) (13 diffs)
-
inc/admin/functions/func_number_tab_ticktes.php (modified) (6 diffs)
-
inc/admin/functions/func_send_ticket.php (modified) (4 diffs)
-
inc/admin/functions/scripts.php (modified) (2 diffs)
-
inc/admin/themes/FAQ.php (modified) (1 diff)
-
inc/admin/themes/all_ticket.php (modified) (5 diffs)
-
inc/admin/themes/answer-ticket.php (modified) (17 diffs)
-
inc/admin/themes/answered_ticket.php (modified) (4 diffs)
-
inc/admin/themes/closed_ticket.php (modified) (3 diffs)
-
inc/admin/themes/department.php (modified) (6 diffs)
-
inc/admin/themes/file_uploads.php (modified) (5 diffs)
-
inc/admin/themes/manage_tickets.php (modified) (5 diffs)
-
inc/admin/themes/new_ticket.php (modified) (2 diffs)
-
inc/admin/themes/process_ticket.php (modified) (4 diffs)
-
inc/admin/themes/send_ticket.php (modified) (10 diffs)
-
inc/user/functions/ajax_user_send_answer.php (modified) (7 diffs)
-
inc/user/functions/ajax_user_send_tiket.php (modified) (1 diff)
-
inc/user/functions/ajax_wpyar_ticket_user_search.php (modified) (1 diff)
-
inc/user/functions/filter_ajax_ticket.php (modified) (7 diffs)
-
inc/user/functions/func_shourt_code.php (modified) (1 diff)
-
inc/user/functions/func_u_list_ticket.php (modified) (3 diffs)
-
inc/user/themes/home.php (modified) (1 diff)
-
inc/user/themes/new_ticket.php (modified) (18 diffs)
-
inc/user/themes/replay_ticket.php (modified) (1 diff)
-
nirweb-support.php (modified) (1 diff)
-
option/classes/admin-options.class.php (modified) (2 diffs)
-
option/classes/setup.class.php (modified) (3 diffs)
-
option/fields/backup/backup.php (modified) (1 diff)
-
option/fields/code_editor/code_editor.php (modified) (1 diff)
-
option/fields/gallery/gallery.php (modified) (1 diff)
-
option/fields/image_select/image_select.php (modified) (1 diff)
-
option/fields/map/map.php (modified) (1 diff)
-
option/fields/media/media.php (modified) (1 diff)
-
option/fields/upload/upload.php (modified) (1 diff)
-
option/views/header.php (modified) (2 diffs)
-
option/views/welcome.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
nirweb-support/trunk/core/core.php
r2707344 r2708596 9 9 //---------- Styles And JS Files -------------------- 10 10 add_action('wp_enqueue_scripts', function () { 11 $size = wpyar_ticket['size_of_file_wpyartik']; 12 11 $size = sanitize_text_field(wpyar_ticket['size_of_file_wpyartik']); 13 12 wp_enqueue_style('font5-css-wpyt', NIRWEB_SUPPORT_URL_TICKET . 'assets/css/all.min.css'); 14 13 if (is_rtl()) { … … 17 16 wp_enqueue_style('user-css-wpyt', NIRWEB_SUPPORT_URL_TICKET . 'assets/css/user.css'); 18 17 } 19 wp_enqueue_script('jquery');20 wp_enqueue_script('user-js-file', NIRWEB_SUPPORT_URL_TICKET . 'assets/js/user.js');18 wp_enqueue_script('jquery'); 19 wp_enqueue_script('user-js-file', NIRWEB_SUPPORT_URL_TICKET . 'assets/js/user.js'); 21 20 wp_localize_script( 22 21 'user-js-file', … … 24 23 [ 25 24 'upload_url' => admin_url('async-upload.php'), 26 'ajax_url' => admin_url('admin-ajax.php'), 27 'nonce' => wp_create_nonce('media-form'), 28 'reset_form_title' => __('Are you sure you want to reset?', 'nirweb-support'), 29 'reset_form_subtitle' => __('This will cause data loss.', 'nirweb-support'), 30 'reset_form_success' => __('Form successfully reset.', 'nirweb-support'), 31 'attach_file' => __('Attachment File', 'nirweb-support'), 32 'recv_info' => __('Receiving information ...', 'nirweb-support'), 33 'nes_field' => __('complete all stared sections Please', 'nirweb-support'), 34 'max_size_file' => __("maximum Size Of File $size MB", 'nirweb-support'), 35 'nvalid_file' => __("File is not valid.", 'nirweb-support'), 36 'answerede' => __("Answerede", 'nirweb-support'), 37 'necessary' => __("necessary", 'nirweb-support'), 38 'normal' => __("normal", 'nirweb-support'), 39 'low' => __("low", 'nirweb-support'), 40 'new' => __("new", 'nirweb-support'), 41 'inprogress' => __("inprogress", 'nirweb-support'), 42 'answerede' => __("answerede", 'nirweb-support'), 43 'closed' => __("closed", 'nirweb-support'), 44 'ok_text' => __('Ok', 'nirweb-support'), 45 'cancel_text' => __('Cancel', 'nirweb-support'), 25 'ajax_url' => admin_url('admin-ajax.php'), 26 'nonce' => wp_create_nonce('media-form'), 27 'reset_form_title' => esc_html__('Are you sure you want to reset?', 'nirweb-support'), 28 'reset_form_subtitle' => esc_html__('This will cause data loss.', 'nirweb-support'), 29 'reset_form_success' => esc_html__('Form successfully reset.', 'nirweb-support'), 30 'attach_file' => esc_html__('Attachment File', 'nirweb-support'), 31 'recv_info' => esc_html__('Receiving information ...', 'nirweb-support'), 32 'nes_field' => esc_html__('complete all stared sections Please', 'nirweb-support'), 33 'max_size_file' => esc_html__("maximum Size Of File $size MB", 'nirweb-support'), 34 'nvalid_file' => esc_html__("File is not valid.", 'nirweb-support'), 35 'necessary' => esc_html__("necessary", 'nirweb-support'), 36 'normal' => esc_html__("normal", 'nirweb-support'), 37 'low' => esc_html__("low", 'nirweb-support'), 38 'new' => esc_html__("new", 'nirweb-support'), 39 'inprogress' => esc_html__("inprogress", 'nirweb-support'), 40 'answerede' => esc_html__("answerede", 'nirweb-support'), 41 'closed' => esc_html__("closed", 'nirweb-support'), 42 'ok_text' => esc_html__('Ok', 'nirweb-support'), 43 'cancel_text' => esc_html__('Cancel', 'nirweb-support'), 46 44 ] 47 45 ); 48 46 }); 49 47 //~~~~~~~~~~~~START Create Menu~~~~~~~~~~ 50 add_action('admin_menu',function () 51 { 48 add_action('admin_menu', function () { 52 49 require_once NIRWEB_SUPPORT_TICKET . 'inc/admin/functions/func_number_tab_ticktes.php'; 53 50 if (current_user_can('administrator')) { … … 58 55 $cont = $scount > 0 ? '<p class="number_ticket">' . nirweb_ticket_count_new_ticket() . '</p>' : ''; 59 56 add_menu_page( 60 __('Tickets', 'nirweb-support'),61 __('Tickets', 'nirweb-support') . $cont,57 esc_html__('Tickets', 'nirweb-support'), 58 esc_html__('Tickets', 'nirweb-support') . $cont, 62 59 'upload_files', 63 60 'nirweb_ticket_manage_tickets', … … 66 63 8 67 64 ); 68 add_submenu_page('nirweb_ticket_manage_tickets&tab=all_ticket', __('All tickets', 'nirweb-support'), __('All tickets', 'nirweb-support'), 'upload_files', 'nirweb_ticket_manage_tickets&tab=all_ticket', 'nirweb_ticket_manage_tickets_callback'); 69 add_submenu_page('nirweb_ticket_manage_tickets', __('Send ticket', 'nirweb-support'), __('Send ticket', 'nirweb-support'), 'upload_files', 'nirweb_ticket_send_ticket', 'nirweb_ticket_send_ticket_callback'); 70 add_submenu_page('nirweb_ticket_manage_tickets', __('Department', 'nirweb-support'), __('Department', 'nirweb-support'), 'manage_options', 'nirweb_ticket_department_ticket', 'nirweb_ticket_department_ticket_callback'); 71 add_submenu_page('nirweb_ticket_manage_tickets', __('Pre answer', 'nirweb-support'), __('Pre answer', 'nirweb-support'), 'manage_options', 'edit.php?post_type=pre_answer_wpyticket'); 72 add_submenu_page('nirweb_ticket_manage_tickets', __('FAQ', 'nirweb-support'), __('FAQ', 'nirweb-support'), 'manage_options', 'nirweb_ticket_FAQ_ticket', 'nirweb_ticket_FAQ_ticket_callback'); 73 74 65 add_submenu_page('nirweb_ticket_manage_tickets&tab=all_ticket', 66 esc_html__('All tickets', 'nirweb-support'), 67 esc_html__('All tickets', 'nirweb-support'), 68 'upload_files', 69 'nirweb_ticket_manage_tickets&tab=all_ticket', 70 'nirweb_ticket_manage_tickets_callback'); 71 add_submenu_page('nirweb_ticket_manage_tickets', 72 esc_html__('Send ticket', 'nirweb-support'), 73 esc_html__('Send ticket', 'nirweb-support'), 74 'upload_files', 'nirweb_ticket_send_ticket', 75 'nirweb_ticket_send_ticket_callback'); 76 add_submenu_page('nirweb_ticket_manage_tickets', 77 esc_html__('Department', 'nirweb-support'), 78 esc_html__('Department', 'nirweb-support'), 79 'manage_options', 80 'nirweb_ticket_department_ticket', 81 'nirweb_ticket_department_ticket_callback'); 82 add_submenu_page('nirweb_ticket_manage_tickets', 83 esc_html__('Pre answer', 'nirweb-support'), 84 esc_html__('Pre answer', 'nirweb-support'), 85 'manage_options', 86 'edit.php?post_type=pre_answer_wpyticket'); 87 add_submenu_page('nirweb_ticket_manage_tickets', 88 esc_html__('FAQ', 'nirweb-support'), 89 esc_html__('FAQ', 'nirweb-support'), 90 'manage_options', 91 'nirweb_ticket_FAQ_ticket', 92 'nirweb_ticket_FAQ_ticket_callback'); 75 93 //---------- Transfer Data Start ------------ 94 global $wpdb; 95 $table_name = $wpdb->prefix . 'wp_yar_ticket'; 96 $query = $wpdb->prepare('SHOW TABLES LIKE %s', $wpdb->esc_like($table_name)); 97 if ($wpdb->get_var($query) == $table_name) { 98 add_submenu_page('nirweb_ticket_manage_tickets', 99 esc_html__('Transfer Data', 'nirweb-support'), 100 esc_html__('Transfer Data', 'nirweb-support'), 101 'manage_options', 102 'nirweb_ticket_tranfer_data', 103 'nirweb_ticket_tranfer_data_callback'); 104 } 105 }); 106 107 function nirweb_ticket_tranfer_data_callback() 108 { 109 if (isset($_POST['trans_data_nirweb_ticket']) && wp_verify_nonce($_POST['trans_data_nirweb_ticket'], 'trans_data_nirweb_ticket')) { 76 110 global $wpdb; 77 $table_name = $wpdb->prefix . 'wp_yar_ticket'; 78 $query = $wpdb->prepare('SHOW TABLES LIKE %s', $wpdb->esc_like($table_name)); 79 if ($wpdb->get_var($query) == $table_name) { 80 add_submenu_page('nirweb_ticket_manage_tickets', __('Transfer Data', 'nirweb-support'), __('Transfer Data', 'nirweb-support'), 'manage_options', 'nirweb_ticket_tranfer_data', 'nirweb_ticket_tranfer_data_callback'); 81 } 82 } ); 83 84 function nirweb_ticket_tranfer_data_callback(){ 85 if (isset( $_POST['trans_data_nirweb_ticket'] ) 86 && wp_verify_nonce( $_POST['trans_data_nirweb_ticket'], 'trans_data_nirweb_ticket' ) 87 ) { 88 89 global $wpdb; 90 91 $table_name = $wpdb->prefix . 'nirweb_ticket_ticket_faq'; 92 $table_name2 = $wpdb->prefix . 'wp_yar_ticket_faq'; 93 $list_1 = $wpdb->get_results("SELECT * FROM $table_name2"); 94 foreach($list_1 as $row){ 95 $wpdb->insert($table_name,[ 96 'question'=>$row->question, 97 'answer'=>$row->answer, 98 'department_id'=>$row->department_id, 99 ]); 100 101 } 102 $table_name = $wpdb->prefix . 'nirweb_ticket_ticket_user_upload'; 103 $table_name2 = $wpdb->prefix . 'wp_yar_ticket_user_upload'; 104 $list_1 = $wpdb->get_results("SELECT * FROM $table_name2"); 105 foreach($list_1 as $row){ 106 $wpdb->insert($table_name,[ 107 'url_file'=>$row->url_file, 108 'user_id'=>$row->user_id, 109 'file_id'=>$row->file_id, 110 'time_upload'=>$row->time_upload, 111 ]); 112 } 113 114 $table_name = $wpdb->prefix . 'nirweb_ticket_ticket_department'; 115 $table_name2 = $wpdb->prefix . 'wp_yar_ticket_department'; 116 $list_1 = $wpdb->get_results("SELECT * FROM $table_name2"); 117 foreach($list_1 as $row){ 118 $wpdb->insert($table_name,[ 119 'name'=>$row->name, 120 'support_id'=>$row->support_id, 121 ]); 122 } 123 124 $table_name = $wpdb->prefix . 'nirweb_ticket_ticket_answered'; 125 $table_name2 = $wpdb->prefix . 'wp_yar_ticket_answered'; 126 $list_1 = $wpdb->get_results("SELECT * FROM $table_name2"); 127 foreach($list_1 as $row){ 128 $wpdb->insert($table_name,[ 129 'user_id'=>$row->user_id, 130 'text'=>$row->text, 131 'attach_url'=>$row->attach_url, 132 'time_answer'=>$row->time_answer, 133 'ticket_id'=>$row->ticket_id, 134 ]); 135 } 136 $table_name = $wpdb->prefix . 'nirweb_ticket_ticket'; 137 $table_name2 = $wpdb->prefix . 'wp_yar_ticket'; 138 $list_1 = $wpdb->get_results("SELECT * FROM $table_name2"); 139 foreach($list_1 as $row){ 140 $wpdb->insert($table_name,[ 141 'id_receiver'=>$row->id_receiver, 142 'subject'=>$row->subject, 143 'content'=>$row->content, 144 'department'=>$row->department, 145 'priority'=>$row->priority, 146 'website'=>$row->website, 147 'product'=>$row->product, 148 'support_id'=>$row->support_id, 149 'sender_id'=>$row->sender_id, 150 'status'=>$row->status, 151 'date_qustion'=>$row->date_qustion, 152 'time_update'=>$row->time_update, 153 'file_url'=>$row->file_url, 154 155 ]); 156 } 157 158 159 update_option( 'trans_ticket_nirweb', true ); 160 161 } 162 163 if (isset( $_POST['del_data_nirweb_ticket'] ) && wp_verify_nonce( $_POST['del_data_nirweb_ticket'], 'del_data_nirweb_ticket' ) ) { 164 global $wpdb; 165 166 $tb1 = $wpdb->prefix . 'wp_yar_ticket_faq'; 167 $tb2 = $wpdb->prefix . 'wp_yar_ticket_user_upload'; 168 $tb3 = $wpdb->prefix . 'wp_yar_ticket_department'; 169 $tb4 = $wpdb->prefix . 'wp_yar_ticket_priority'; 170 $tb5 = $wpdb->prefix . 'wp_yar_ticket_status'; 171 $tb6 = $wpdb->prefix . 'wp_yar_ticket_pre_answer'; 172 $tb7 = $wpdb->prefix . 'wp_yar_ticket_answered'; 173 $tb8 = $wpdb->prefix . 'wp_yar_ticket'; 174 $wpdb->query( "DROP TABLE $tb1" ); 175 $wpdb->query( "DROP TABLE $tb2" ); 176 $wpdb->query( "DROP TABLE $tb3" ); 177 $wpdb->query( "DROP TABLE $tb4" ); 178 $wpdb->query( "DROP TABLE $tb5" ); 179 $wpdb->query( "DROP TABLE $tb6" ); 180 $wpdb->query( "DROP TABLE $tb7" ); 181 $wpdb->query( "DROP TABLE $tb8" ); 182 wp_safe_redirect(admin_url());exit; 183 } 184 ?> 185 <div class="wrap"> 186 <h1><?php echo __('Transfer Data', 'nirweb-support') ?></h1> 187 <?php if(! get_option('trans_ticket_nirweb')) :?> 188 <form method="POST" style="background: #fff;padding: 15px;border-radius: 3px;border: solid 1px #CCC;"> 189 <?php wp_nonce_field( 'trans_data_nirweb_ticket', 'trans_data_nirweb_ticket' ); ?> 190 <p><?php echo __('To transfer data from the old table to the new one, please click on the button below', 'nirweb-support') ?></p> 191 <button type="submit" class="button button-primary"><?php echo __('Transfer Data', 'nirweb-support') ?></button> 192 </form> 193 <?php endif; ?> 194 <form method="POST" id="del_old_tbl_nirweb_ticket" style="background: #ffffff;padding: 15px;border-radius: 3px;border: solid 1px #CCC;margin-top: 20px;color: #f00;"> 195 <?php wp_nonce_field( 'del_data_nirweb_ticket', 'del_data_nirweb_ticket' ); ?> 196 <p style="font-size: 18px;font-weight: bold;"><?php echo __('To delete old tables, click on the button below (if deleted, it is not possible to recover)', 'nirweb-support') ?></p> 197 <button type="submit" class="button"><?php echo __('Delete Data', 'nirweb-support') ?></button> 198 </form> 199 </div> 111 $table_name = $wpdb->prefix . 'nirweb_ticket_ticket_faq'; 112 $table_name2 = $wpdb->prefix . 'wp_yar_ticket_faq'; 113 $list_1 = $wpdb->get_results("SELECT * FROM $table_name2"); 114 foreach ($list_1 as $row) { 115 $wpdb->insert($table_name, [ 116 'question' => sanitize_text_field($row->question), 117 'answer' => sanitize_textarea_field($row->answer), 118 'department_id' => sanitize_text_field($row->department_id), 119 ]); 120 } 121 $table_name = $wpdb->prefix . 'nirweb_ticket_ticket_user_upload'; 122 $table_name2 = $wpdb->prefix . 'wp_yar_ticket_user_upload'; 123 $list_1 = $wpdb->get_results("SELECT * FROM $table_name2"); 124 foreach ($list_1 as $row) { 125 $wpdb->insert($table_name, [ 126 'url_file' => esc_url_raw($row->url_file), 127 'user_id' => sanitize_text_field($row->user_id), 128 'file_id' => sanitize_text_field($row->file_id), 129 'time_upload' => sanitize_text_field($row->time_upload), 130 ]); 131 } 132 133 $table_name = $wpdb->prefix . 'nirweb_ticket_ticket_department'; 134 $table_name2 = $wpdb->prefix . 'wp_yar_ticket_department'; 135 $list_1 = $wpdb->get_results("SELECT * FROM $table_name2"); 136 foreach ($list_1 as $row) { 137 $wpdb->insert($table_name, [ 138 'name' => sanitize_text_field($row->name), 139 'support_id' => sanitize_text_field($row->support_id), 140 ]); 141 } 142 143 $table_name = $wpdb->prefix . 'nirweb_ticket_ticket_answered'; 144 $table_name2 = $wpdb->prefix . 'wp_yar_ticket_answered'; 145 $list_1 = $wpdb->get_results("SELECT * FROM $table_name2"); 146 foreach ($list_1 as $row) { 147 $wpdb->insert($table_name, [ 148 'user_id' => sanitize_text_field($row->user_id), 149 'text' => sanitize_text_field($row->text), 150 'attach_url' => sanitize_url($row->attach_url), 151 'time_answer' => sanitize_text_field($row->time_answer), 152 'ticket_id' => sanitize_text_field($row->ticket_id), 153 ]); 154 } 155 $table_name = $wpdb->prefix . 'nirweb_ticket_ticket'; 156 $table_name2 = $wpdb->prefix . 'wp_yar_ticket'; 157 $list_1 = $wpdb->get_results("SELECT * FROM $table_name2"); 158 foreach ($list_1 as $row) { 159 $wpdb->insert($table_name, [ 160 'id_receiver' => sanitize_text_field($row->id_receiver), 161 'subject' => sanitize_text_field($row->subject), 162 'content' => sanitize_textarea_field($row->content), 163 'department' => sanitize_text_field($row->department), 164 'priority' => sanitize_text_field($row->priority), 165 'website' => sanitize_text_field($row->website), 166 'product' => sanitize_text_field($row->product), 167 'support_id' => sanitize_text_field($row->support_id), 168 'sender_id' => sanitize_text_field($row->sender_id), 169 'status' => sanitize_text_field($row->status), 170 'date_qustion' => sanitize_text_field($row->date_qustion), 171 'time_update' => sanitize_text_field($row->time_update), 172 'file_url' => sanitize_url($row->file_url), 173 174 ]); 175 } 176 update_option('trans_ticket_nirweb', true); 177 } 178 179 if (isset($_POST['del_data_nirweb_ticket']) && wp_verify_nonce($_POST['del_data_nirweb_ticket'], 'del_data_nirweb_ticket')) { 180 global $wpdb; 181 182 $tb1 = $wpdb->prefix . 'wp_yar_ticket_faq'; 183 $tb2 = $wpdb->prefix . 'wp_yar_ticket_user_upload'; 184 $tb3 = $wpdb->prefix . 'wp_yar_ticket_department'; 185 $tb4 = $wpdb->prefix . 'wp_yar_ticket_priority'; 186 $tb5 = $wpdb->prefix . 'wp_yar_ticket_status'; 187 $tb6 = $wpdb->prefix . 'wp_yar_ticket_pre_answer'; 188 $tb7 = $wpdb->prefix . 'wp_yar_ticket_answered'; 189 $tb8 = $wpdb->prefix . 'wp_yar_ticket'; 190 $wpdb->query("DROP TABLE $tb1"); 191 $wpdb->query("DROP TABLE $tb2"); 192 $wpdb->query("DROP TABLE $tb3"); 193 $wpdb->query("DROP TABLE $tb4"); 194 $wpdb->query("DROP TABLE $tb5"); 195 $wpdb->query("DROP TABLE $tb6"); 196 $wpdb->query("DROP TABLE $tb7"); 197 $wpdb->query("DROP TABLE $tb8"); 198 wp_safe_redirect(admin_url()); 199 exit; 200 } 201 ?> 202 <div class="wrap"> 203 <h1><?php echo esc_html__('Transfer Data', 'nirweb-support') ?></h1> 204 <?php if (!get_option('trans_ticket_nirweb')) : ?> 205 <form method="POST" style="background: #fff;padding: 15px;border-radius: 3px;border: solid 1px #CCC;"> 206 <?php wp_nonce_field('trans_data_nirweb_ticket', 'trans_data_nirweb_ticket'); ?> 207 <p> 208 <?php echo esc_html__('To transfer data from the old table to the new one, please click on the button below', 'nirweb-support') ?> 209 </p> 210 <button type="submit" 211 class="button button-primary"><?php echo esc_html__('Transfer Data', 'nirweb-support') ?></button> 212 </form> 213 <?php endif; ?> 214 <form method="POST" id="del_old_tbl_nirweb_ticket" 215 style="background: #ffffff;padding: 15px;border-radius: 3px;border: solid 1px #CCC;margin-top: 20px;color: #f00;"> 216 <?php wp_nonce_field('del_data_nirweb_ticket', 'del_data_nirweb_ticket'); ?> 217 <p style="font-size: 18px;font-weight: bold;"><?php echo esc_html__('To delete old tables, click on the button below (if deleted, it is not possible to recover)', 'nirweb-support') ?></p> 218 <button type="submit" class="button"><?php echo esc_html__('Delete Data', 'nirweb-support') ?></button> 219 </form> 220 </div> 200 221 <?php } 222 201 223 //-------- Transfer Data End -------------- 202 224 if (!function_exists('nirweb_ticket_manage_tickets_callback')) { … … 214 236 if (!function_exists('nirweb_ticket_department_ticket_callback')) { 215 237 function nirweb_ticket_department_ticket_callback() 216 {217 require_once NIRWEB_SUPPORT_INC_ADMIN_THEMES_TICKET . 'department.php';218 }238 { 239 require_once NIRWEB_SUPPORT_INC_ADMIN_THEMES_TICKET . 'department.php'; 240 } 219 241 } 220 242 if (!function_exists('nirweb_ticket_PreAnswer_ticket_callback')) { … … 230 252 } 231 253 } 232 233 234 254 //~~~~~~~~~~~~END create Menu~~~~~~~~~~~~~ 235 255 //~~~~~~~~~~~~START Action Create Roles~~~~~~ 236 add_action('init',function () 237 { 238 $role = add_role('user_support', __('Support', 'nirweb-support'), array( 256 add_action('init', function () { 257 $role = add_role('user_support', 258 esc_html__('Support', 'nirweb-support'), 259 array( 239 260 'read' => true, 240 261 'upload_files' => true … … 248 269 249 270 //~~~~~~~~~~~~END Action Create Roles~~~~~~ 250 add_action('admin_menu', function () 251 { 271 add_action('admin_menu', function () { 252 272 if (current_user_can('user_support')) { 253 273 remove_menu_page('edit.php'); … … 257 277 }); 258 278 259 add_action('admin_bar_menu', function ($wp_admin_bar) 260 { 279 add_action('admin_bar_menu', function ($wp_admin_bar) { 261 280 if (current_user_can('user_support')) { 262 281 $wp_admin_bar->remove_node('new-post'); … … 267 286 add_action('init', function () { 268 287 $labels = array( 269 'name' => __('pre answer', 'nirweb-support'),270 'singular_name' => __('pre answer', 'nirweb-support'),271 'add_new' => __('New Answer', 'nirweb-support'),272 'add_new_item' => __('New Answer', 'nirweb-support'),273 'edit_item' => __('Edit Answer', 'nirweb-support'),274 'new_item' => __('New Answer', 'nirweb-support'),275 'all_items' => __('pre answer', 'nirweb-support'),276 'view_item' => __('Show Answer', 'nirweb-support'),277 'menu_name' => __('pre answer', 'nirweb-support')288 'name' => esc_html__('pre answer', 'nirweb-support'), 289 'singular_name' => esc_html__('pre answer', 'nirweb-support'), 290 'add_new' => esc_html__('New Answer', 'nirweb-support'), 291 'add_new_item' => esc_html__('New Answer', 'nirweb-support'), 292 'edit_item' => esc_html__('Edit Answer', 'nirweb-support'), 293 'new_item' => esc_html__('New Answer', 'nirweb-support'), 294 'all_items' => esc_html__('pre answer', 'nirweb-support'), 295 'view_item' => esc_html__('Show Answer', 'nirweb-support'), 296 'menu_name' => esc_html__('pre answer', 'nirweb-support') 278 297 ); 279 298 $args = array( … … 283 302 'show_ui' => true, 284 303 'query_var' => false, 285 'rewrite' => array('slug' => false),304 'rewrite' => ['slug' => false], 286 305 'capability_type' => 'post', 287 306 'has_archive' => false, … … 298 317 class nirweb_ticket_My_Account_Endpoint 299 318 { 300 /**301 * Custom endpoint name.302 *303 * @var string304 */305 319 public static $endpoint = 'wpyar-ticket'; 306 /**307 * Plugin actions.308 */309 320 public function __construct() 310 321 { … … 315 326 add_action('woocommerce_account_' . self::$endpoint . '_endpoint', array($this, 'endpoint_content')); 316 327 } 328 317 329 public function add_endpoints() 318 330 { 319 331 add_rewrite_endpoint(self::$endpoint, EP_ROOT | EP_PAGES); 320 332 } 333 321 334 public function add_query_vars($vars) 322 335 { … … 324 337 return $vars; 325 338 } 339 326 340 public function endpoint_title($title) 327 341 { … … 329 343 $is_endpoint = isset($wp_query->query_vars[self::$endpoint]); 330 344 if ($is_endpoint && !is_admin() && is_main_query() && in_the_loop() && is_account_page()) { 331 // New page title. 332 $title = __('Support Ticket', 'nirweb-support'); 345 $title = esc_html__('Support Ticket', 'nirweb-support'); 333 346 remove_filter('the_title', array($this, 'endpoint_title')); 334 347 } 335 348 return $title; 336 349 } 350 337 351 public function new_menu_items($items) 338 352 { 339 353 $logout = $items['customer-logout']; 340 354 unset($items['customer-logout']); 341 $items[self::$endpoint] = __('Support Ticket', 'nirweb-support');355 $items[self::$endpoint] = esc_html__('Support Ticket', 'nirweb-support'); 342 356 $items['customer-logout'] = $logout; 343 357 return $items; 344 358 } 345 /** 346 * Endpoint HTML content. 347 */ 359 348 360 public function endpoint_content() 349 361 { 350 351 if (isset($_GET['action']) && !empty(sanitize_text_field($_GET['action']))) { 352 if (sanitize_text_field($_GET['action']) == 'new') { 362 if (isset($_GET['action']) && !empty(esc_html($_GET['action']))) { 363 if (esc_html($_GET['action']) == 'new') { 353 364 require_once NIRWEB_SUPPORT_INC_USER_THEMES_TICKET . 'new_ticket.php'; 354 } elseif ( sanitize_text_field($_GET['action']) == 'reply') {365 } elseif (esc_html($_GET['action']) == 'reply') { 355 366 require_once NIRWEB_SUPPORT_INC_USER_THEMES_TICKET . 'replay_ticket.php'; 356 367 } … … 359 370 } 360 371 } 361 /**362 * Plugin install action.363 * Flush rewrite rules to make our custom endpoint available.364 */365 372 public static function install() 366 373 { … … 368 375 } 369 376 } 377 370 378 new nirweb_ticket_My_Account_Endpoint(); 371 379 // Flush rewrite rules on plugin activation. … … 374 382 //~~~~~~~~~~~~END Add Page Ticket To My Account ~~~~~~~~~~ 375 383 //~~~~~~~~~~~~ Start ShortCode ~~~~~~ 376 add_shortcode('nirweb_ticket',function () 377 { 384 add_shortcode('nirweb_ticket', function () { 378 385 if (is_user_logged_in()) { 379 if (isset($_GET['action']) && sanitize_text_field($_GET['action']) == 'new') {386 if (isset($_GET['action']) && esc_html($_GET['action']) == 'new') { 380 387 require_once NIRWEB_SUPPORT_INC_USER_THEMES_TICKET . 'new_ticket.php'; 381 } else if (isset($_GET['action']) && sanitize_text_field($_GET['action']) == 'reply') {388 } else if (isset($_GET['action']) && esc_html($_GET['action']) == 'reply') { 382 389 require_once NIRWEB_SUPPORT_INC_USER_THEMES_TICKET . 'replay_ticket.php'; 383 390 } else { … … 387 394 }); 388 395 389 390 391 add_shortcode('nirweb_ticket_new', function (){ 396 397 add_shortcode('nirweb_ticket_new', function () { 392 398 require_once NIRWEB_SUPPORT_INC_USER_THEMES_TICKET . 'new_ticket.php'; 393 399 }); 394 400 395 add_shortcode('nirweb_ticket_rep',function () 396 { 397 require_once NIRWEB_SUPPORT_INC_USER_THEMES_TICKET . 'replay_ticket.php'; 401 add_shortcode('nirweb_ticket_rep', function () { 402 require_once NIRWEB_SUPPORT_INC_USER_THEMES_TICKET . 'replay_ticket.php'; 398 403 }); 399 404 //--- ~~~~~~~~~~~~ END ShortCode ~~~~~~~~~~~~~ 400 if ( wpyar_ticket['display_icon_send_ticket'] == '1') {401 add_action('wp_footer', function (){402 $pag_id = intval(wpyar_ticket['select_page_ticket']);403 ?>404 <?php405 if (is_plugin_active('wpyar_panel/wpyar_panel.php' )){406 $wpyarud = get_option('wpyarud_prefix_my_options');407 $page_name =$wpyarud['page_wpyarud_plugin'];408 $page = get_bloginfo('url').'/'.get_post_field( 'post_name', op_wpyar_panel['page_wpyarud_plugin']).'?endp=nirweb-ticket';409 } else{410 if ( wpyar_ticket['select_page_ticket']){411 $page = esc_url( get_page_link( wpyar_ticket['select_page_ticket'] ));412 } else{413 $page = get_permalink( get_option('woocommerce_myaccount_page_id') ).'wpyar-ticket/';405 if (isset(wpyar_ticket['display_icon_send_ticket']) && wpyar_ticket['display_icon_send_ticket']) { 406 add_action('wp_footer', function () { 407 $pag_id = esc_html(intval(wpyar_ticket['select_page_ticket'])); 408 ?> 409 <?php 410 if (is_plugin_active('wpyar_panel/wpyar_panel.php')) { 411 $wpyarud = get_option('wpyarud_prefix_my_options'); 412 $page_name = $wpyarud['page_wpyarud_plugin']; 413 $page = get_bloginfo('url') . '/' . get_post_field('post_name', op_wpyar_panel['page_wpyarud_plugin']) . '?endp=nirweb-ticket'; 414 } else { 415 if (wpyar_ticket['select_page_ticket']) { 416 $page = esc_url_raw(get_page_link(wpyar_ticket['select_page_ticket'])); 417 } else { 418 $page = get_permalink(get_option('woocommerce_myaccount_page_id')) . 'wpyar-ticket/'; 414 419 } 415 420 } 416 ?>421 ?> 417 422 418 423 <a class="nirweb_ticket_logo" href="<?php echo esc_html($page) ?>" style="<?php 419 echo (wpyar_ticket['position_icon_nirweb_ticket_front']== 'icon-left') ? 'left:0' : 'right:0';420 ?> ">421 <img class="logo_ticket_wpyar" src="<?php if ( wpyar_ticket['icon_nirweb_ticket_front']['url']) {422 echo wpyar_ticket['icon_nirweb_ticket_front']['url'];423 } else {424 echo NIRWEB_SUPPORT_URL_TICKET . 'assets/images/defualt-logo.png';425 } ?>" alt="<?php bloginfo('name') ?>"/>424 echo (esc_html(wpyar_ticket['position_icon_nirweb_ticket_front']) == 'icon-left') ? 'left:0' : 'right:0'; 425 ?> "> 426 <img class="logo_ticket_wpyar" src="<?php if (esc_url_raw(wpyar_ticket['icon_nirweb_ticket_front']['url'])) { 427 echo esc_url_raw(wpyar_ticket['icon_nirweb_ticket_front']['url']); 428 } else { 429 echo NIRWEB_SUPPORT_URL_TICKET . 'assets/images/defualt-logo.png'; 430 } ?>" alt="<?php bloginfo('name') ?>"/> 426 431 </a> 427 432 <style> … … 432 437 } 433 438 </style> 434 <?php }, 100);435 436 439 <?php }, 100); 440 441 437 442 } 438 443 //----------- Add Number Ticket in Admin Bar 439 444 require_once NIRWEB_SUPPORT_TICKET . 'inc/admin/functions/func_number_tab_ticktes.php'; 440 445 441 add_action('admin_bar_menu', function ($wp_admin_bar) 442 { 446 add_action('admin_bar_menu', function ($wp_admin_bar) { 443 447 if (current_user_can('administrator')) { 444 448 $scount = nirweb_ticket_count_new_ticket(); … … 449 453 $args = array( 450 454 'id' => 'New_ticket', 451 'title' => '<p style="background:red;color:#fff;padding:0 5px;"> ' . __('Count New Ticket', 'nirweb-support') . $scount . '</p>',455 'title' => '<p style="background:red;color:#fff;padding:0 5px;"> ' . esc_html__('Count New Ticket', 'nirweb-support') . $scount . '</p>', 452 456 'href' => get_bloginfo('url') . '/wp-admin/admin.php?page=nirweb_ticket_manage_tickets&tab=new_ticket', 453 457 'meta' => array( 454 458 'class' => 'New_ticket', 455 'title' => __('New Ticket', 'nirweb-support')459 'title' => esc_html__('New Ticket', 'nirweb-support') 456 460 ) 457 461 ); … … 460 464 }, 999); 461 465 //--------------- Filter Media 462 add_filter('ajax_query_attachments_args', function ($query = array()) 463 { 466 add_filter('ajax_query_attachments_args', function ($query = array()) { 464 467 $user_id = get_current_user_id(); 465 468 if ($user_id) { … … 469 472 }, 10, 1); 470 473 471 //--------------- Timr Ago474 //--------------- Timr Ago 472 475 if (!function_exists('ago_ticket_nirweb')) { 473 476 function ago_ticket_nirweb($post_date) 474 477 { 475 echo esc_html(human_time_diff($post_date, strtotime(current_time("Y-m-d H:i:s")))) .__(' ago', 'nirweb-support');476 } 477 } 478 echo esc_html(human_time_diff($post_date, strtotime(current_time("Y-m-d H:i:s")))) . esc_html__(' ago', 'nirweb-support'); 479 } 480 } -
nirweb-support/trunk/core/create_db.php
r2707344 r2708596 125 125 $wpdb->delete($table_name,['priority_id'=>2]); 126 126 $wpdb->delete($table_name,['priority_id'=>3]); 127 $wpdb->insert($table_name,['priority_id'=>1,'name'=> __('low','nirweb-support')]);128 $wpdb->insert($table_name,['priority_id'=>2,'name'=> __('normal','nirweb-support')]);129 $wpdb->insert($table_name,['priority_id'=>3,'name'=> __('necessary','nirweb-support')]);127 $wpdb->insert($table_name,['priority_id'=>1,'name'=>esc_html__('low','nirweb-support')]); 128 $wpdb->insert($table_name,['priority_id'=>2,'name'=>esc_html__('normal','nirweb-support')]); 129 $wpdb->insert($table_name,['priority_id'=>3,'name'=>esc_html__('necessary','nirweb-support')]); 130 130 }); 131 131 //----------------- Status Datbase … … 149 149 $wpdb->delete($table_name,['status_id'=>3]); 150 150 $wpdb->delete($table_name,['status_id'=>4]); 151 $wpdb->insert($table_name,['status_id'=>1,'name_status'=> __('new','nirweb-support')]);152 $wpdb->insert($table_name,['status_id'=>2,'name_status'=> __('in progress','nirweb-support')]);153 $wpdb->insert($table_name,['status_id'=>3,'name_status'=> __('answered','nirweb-support')]);154 $wpdb->insert($table_name,['status_id'=>4,'name_status'=> __('closed','nirweb-support')]);151 $wpdb->insert($table_name,['status_id'=>1,'name_status'=>esc_html__('new','nirweb-support')]); 152 $wpdb->insert($table_name,['status_id'=>2,'name_status'=>esc_html__('in progress','nirweb-support')]); 153 $wpdb->insert($table_name,['status_id'=>3,'name_status'=>esc_html__('answered','nirweb-support')]); 154 $wpdb->insert($table_name,['status_id'=>4,'name_status'=>esc_html__('closed','nirweb-support')]); 155 155 }); -
nirweb-support/trunk/inc/admin/functions/ajax.php
r2707344 r2708596 3 3 #--------------- Ajax Search in ticketes 4 4 */ 5 add_action('wp_ajax_ajax_search_in_ticketes_wpyar', 'ajax_search_in_ticketes_wpyar'); 6 add_action('wp_ajax_nopriv_ajax_search_in_ticketes_wpyar', 'ajax_search_in_ticketes_wpyar'); 5 add_action('wp_ajax_ajax_search_in_ticketes_wpyar', 'ajax_search_in_ticketes_wpyar'); 6 add_action('wp_ajax_nopriv_ajax_search_in_ticketes_wpyar', 'ajax_search_in_ticketes_wpyar'); 7 7 if (!function_exists('func_ajax_search_in_ticketes_wpyar')) { 8 8 function ajax_search_in_ticketes_wpyar() … … 10 10 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'ajax_search_in_ticketes_wpyar.php'; 11 11 func_ajax_search_in_ticketes_wpyar(sanitize_text_field($_POST['value'])); 12 exit(); 13 } 14 } 12 exit(); 13 } 14 } 15 15 16 16 /* 17 17 #--------------- Ajax Send type user 18 18 */ 19 add_action('wp_ajax_send_type_role_user', 'send_type_role_user'); 20 add_action('wp_ajax_nopriv_send_type_role_user', 'send_type_role_user'); 19 add_action('wp_ajax_send_type_role_user', 'send_type_role_user'); 20 add_action('wp_ajax_nopriv_send_type_role_user', 'send_type_role_user'); 21 21 if (!function_exists('send_type_role_user')) { 22 22 function send_type_role_user() … … 26 26 $get_users = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}users"); 27 27 foreach ($get_users as $user) { 28 echo esc_html('<option data-mail="'.$user->user_email.'" value="' . sanitize_text_field($user->ID) . '">' . sanitize_text_field($user->display_name) . '</option>');28 echo('<option data-mail="' . esc_html($user->user_email) . '" value="' . esc_html($user->ID) . '">' . esc_html($user->display_name) . '</option>'); 29 29 } 30 30 } else if (sanitize_text_field($_POST['selectedtypsender']) == 2) { 31 $get_users = get_users(['role__in' => ['user_support']]); 31 $get_users = get_users(['role__in' => ['user_support']]); 32 32 foreach ($get_users as $user) { 33 echo esc_html('<option value="' . sanitize_text_field($user->ID) . '">' . sanitize_text_field($user->display_name) . '</option>');33 echo('<option value="' . esc_html($user->ID) . '">' . esc_html($user->display_name) . '</option>'); 34 34 } 35 35 } 36 36 exit(); 37 37 } 38 } 38 } 39 39 40 40 /* … … 53 53 )); 54 54 if (!$customer_orders) return; 55 foreach ($customer_orders as $customer_order) {55 foreach ($customer_orders as $customer_order) { 56 56 $order = wc_get_order($customer_order->ID); 57 57 $items = $order->get_items(); 58 echo esc_html('<option value="0">'.__('Select Prodcut', 'nirweb-support').'</option>');58 echo('<option value="0">' . esc_html__('Select Prodcut', 'nirweb-support') . '</option>'); 59 59 foreach ($items as $item) { 60 60 $product_id = $item->get_product_id(); 61 61 $product_name = $item->get_name(); 62 echo esc_html('<option value="' . esc_html($product_id) . '">' . esc_html($product_name) . '</option>');62 echo('<option value="' . esc_html($product_id) . '">' . esc_html($product_name) . '</option>'); 63 63 } 64 64 } … … 73 73 add_action('wp_ajax_nopriv_load_page_new_tiket', 'load_page_new_tiket'); 74 74 if (!function_exists('load_page_new_tiket')) { 75 function load_page_new_tiket(){ 76 include_once NIRWEB_SUPPORT_INC_USER_THEMES_TICKET . 'new_ticket.php'; 77 exit(); 78 } 75 function load_page_new_tiket() 76 { 77 include_once NIRWEB_SUPPORT_INC_USER_THEMES_TICKET . 'new_ticket.php'; 78 exit(); 79 } 79 80 } 80 81 /* … … 84 85 add_action('wp_ajax_nopriv_send_new_ticket', 'send_new_ticket'); 85 86 if (!function_exists('send_new_ticket')) { 86 function send_new_ticket(){ 87 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET.'func_send_ticket.php'; 88 nirweb_ticket_send_ticket(); 89 } 90 } 91 92 /* 93 #--------------- Ajax answer_ticket_admin 94 */ 87 function send_new_ticket() 88 { 89 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_send_ticket.php'; 90 nirweb_ticket_send_ticket(); 91 } 92 } 93 94 /* 95 #--------------- Ajax answer_ticket_admin 96 */ 95 97 add_action('wp_ajax_answerd_ticket', 'answerd_ticket'); 96 98 add_action('wp_ajax_nopriv_answerd_ticket', 'answerd_ticket'); 97 if (!function_exists('answerd_ticket') && is_admin( )) {99 if (!function_exists('answerd_ticket') && is_admin()) { 98 100 function answerd_ticket() 99 {100 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET.'func_answerd_ticket.php';101 nirweb_ticket_answer_ticket(sanitize_text_field($_POST['id_form']));102 func_list_answer_ajax(sanitize_text_field($_POST['id_form']));103 exit(); 104 }101 { 102 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_answerd_ticket.php'; 103 nirweb_ticket_answer_ticket(sanitize_text_field($_POST['id_form'])); 104 func_list_answer_ajax(sanitize_text_field($_POST['id_form'])); 105 exit(); 106 } 105 107 } 106 108 … … 113 115 function delete_tickets_admin() 114 116 { 115 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET .'func_list_tickets.php';117 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_list_tickets.php'; 116 118 nirweb_ticket_delete_ticket(sanitize_post($_POST['check'])); 117 119 exit(); … … 125 127 add_action('wp_ajax_nopriv_add_department_wpyt', 'add_department_wpyt'); 126 128 if (!function_exists('add_department_wpyt')) { 127 function add_department_wpyt(){ 128 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET.'func_department.php'; 129 function add_department_wpyt() 130 { 131 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_department.php'; 129 132 nirweb_ticket_ticket_add_department(); 130 133 get_list_department_ajax(); … … 141 144 function delete_department() 142 145 { 143 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET .'func_department.php';146 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_department.php'; 144 147 nirweb_ticket_delete_department(); 145 exit();148 exit(); 146 149 } 147 150 } … … 154 157 if (!function_exists('edite_department')) { 155 158 function edite_department() 156 {157 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET.'func_department.php';158 nirweb_ticket_edite_department(sanitize_post($_POST));159 get_list_department_ajax();160 exit();161 }159 { 160 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_department.php'; 161 nirweb_ticket_edite_department(sanitize_post($_POST)); 162 get_list_department_ajax(); 163 exit(); 164 } 162 165 } 163 166 … … 168 171 add_action('wp_ajax_nopriv_add_question_faq', 'add_question_faq'); 169 172 if (!function_exists('add_question_faq')) { 170 function add_question_faq(){ 171 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET.'func_FAQ.php'; 173 function add_question_faq() 174 { 175 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_FAQ.php'; 172 176 nirweb_ticket_add_question_faq(); 173 177 nirweb_ticket_ajax_get_all_faq(); … … 184 188 function delete_faq() 185 189 { 186 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET .'func_FAQ.php';190 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_FAQ.php'; 187 191 nirweb_ticket_delete_faq(); 188 exit();192 exit(); 189 193 } 190 194 } … … 197 201 if (!function_exists('ticket_wpyar_file_user_delete')) { 198 202 function ticket_wpyar_file_user_delete() 199 {200 include NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET.'func_upload_file.php';201 fun_ticket_wpyar_file_user_delete();202 exit();203 }203 { 204 include NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_upload_file.php'; 205 fun_ticket_wpyar_file_user_delete(); 206 exit(); 207 } 204 208 } 205 209 … … 210 214 #--------------- Ajax Search in ticketes 211 215 */ 212 add_action('wp_ajax_nirweb_ticket_user_search', 'nirweb_ticket_user_search'); 213 add_action('wp_ajax_nopriv_nirweb_ticket_user_search', 'nirweb_ticket_user_search'); 216 add_action('wp_ajax_nirweb_ticket_user_search', 'nirweb_ticket_user_search'); 217 add_action('wp_ajax_nopriv_nirweb_ticket_user_search', 'nirweb_ticket_user_search'); 214 218 if (!function_exists('nirweb_ticket_user_search')) { 215 219 function nirweb_ticket_user_search() 216 {217 include_once NIRWEB_SUPPORT_INC_USER_FUNCTIONS_TICKET.'ajax_nirweb_ticket_user_search.php';218 func_ajax_nirweb_ticket_user_search(sanitize_text_field($_POST['value']));219 exit();220 }221 } 222 223 /*224 #--------------- Ajax send ticketes225 */226 add_action('wp_ajax_user_send_tiket', 'user_send_tiket'); 227 add_action('wp_ajax_nopriv_user_send_tiket', 'user_send_tiket'); 220 { 221 include_once NIRWEB_SUPPORT_INC_USER_FUNCTIONS_TICKET . 'ajax_nirweb_ticket_user_search.php'; 222 func_ajax_nirweb_ticket_user_search(sanitize_text_field($_POST['value'])); 223 exit(); 224 } 225 } 226 227 /* 228 #--------------- Ajax send ticketes 229 */ 230 add_action('wp_ajax_user_send_tiket', 'user_send_tiket'); 231 add_action('wp_ajax_nopriv_user_send_tiket', 'user_send_tiket'); 228 232 if (!function_exists('user_send_tiket')) { 229 233 function user_send_tiket() 230 {231 include_once NIRWEB_SUPPORT_INC_USER_FUNCTIONS_TICKET.'ajax_user_send_tiket.php';232 func_user_send_tiket();233 exit();234 }234 { 235 include_once NIRWEB_SUPPORT_INC_USER_FUNCTIONS_TICKET . 'ajax_user_send_tiket.php'; 236 func_user_send_tiket(); 237 exit(); 238 } 235 239 } 236 240 … … 238 242 #--------------- Ajax send Answer 239 243 */ 240 add_action('wp_ajax_user_answer_ticket', 'user_answer_ticket');241 add_action('wp_ajax_nopriv_user_answer_ticket', 'user_answer_ticket');244 add_action('wp_ajax_user_answer_ticket', 'user_answer_ticket'); 245 add_action('wp_ajax_nopriv_user_answer_ticket', 'user_answer_ticket'); 242 246 if (!function_exists('user_answer_ticket')) { 243 function user_answer_ticket(){ 244 include_once NIRWEB_SUPPORT_INC_USER_FUNCTIONS_TICKET.'ajax_user_send_answer.php'; 247 function user_answer_ticket() 248 { 249 include_once NIRWEB_SUPPORT_INC_USER_FUNCTIONS_TICKET . 'ajax_user_send_answer.php'; 245 250 user_wpyar_answer_ticket(); 246 251 func_list_answer_ajax_user(); … … 252 257 #--------------- Ajax Filtter Ststus 253 258 */ 254 add_action('wp_ajax_filtter_ticket_status', 'filtter_ticket_status');255 add_action('wp_ajax_nopriv_filtter_ticket_status', 'filtter_ticket_status');259 add_action('wp_ajax_filtter_ticket_status', 'filtter_ticket_status'); 260 add_action('wp_ajax_nopriv_filtter_ticket_status', 'filtter_ticket_status'); 256 261 if (!function_exists('filtter_ticket_status')) { 257 function filtter_ticket_status(){ 258 include_once NIRWEB_SUPPORT_INC_USER_FUNCTIONS_TICKET.'filter_ajax_ticket.php'; 262 function filtter_ticket_status() 263 { 264 include_once NIRWEB_SUPPORT_INC_USER_FUNCTIONS_TICKET . 'filter_ajax_ticket.php'; 259 265 filter_ajax_ticket_func(); 260 exit();261 } 262 } 263 266 exit(); 267 } 268 } 269 -
nirweb-support/trunk/inc/admin/functions/ajax_search_in_ticketes_wpyar.php
r2707344 r2708596 8 8 $results = $wpdb->get_results( "SELECT * FROM {$address_table} {$where}" ); 9 9 if(sizeof($results)>0){ 10 foreach($results as $row){11 echo esc_html('<li><a href="'.get_bloginfo('url').'/wp-admin/admin.php?page=nirweb_ticket_manage_tickets&tab=all_ticket&action=edit&id='.esc_html($row->ticket_id).'">'.esc_html($row->subject).'</a></li>');12 }10 foreach($results as $row){ 11 echo ('<li><a href="'.get_bloginfo('url').'/wp-admin/admin.php?page=nirweb_ticket_manage_tickets&tab=all_ticket&action=edit&id='.esc_html($row->ticket_id).'">'.esc_html($row->subject).'</a></li>'); 12 } 13 13 }else{ 14 echo esc_html('<p class="not_found">'.__('not found', 'nirweb-support').'</p>') ;14 echo ('<p class="not_found">'.esc_html__('not found', 'nirweb-support').'</p>') ; 15 15 } 16 16 } -
nirweb-support/trunk/inc/admin/functions/func_FAQ.php
r2705011 r2708596 14 14 $faqs = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}nirweb_ticket_ticket_faq ORDER BY id DESC "); 15 15 foreach ($faqs as $faq): 16 echo esc_html('16 echo (' 17 17 <li class="flex w-100"> 18 18 <span class="dashicons dashicons-trash remove_faq danger" data-id=""></span> 19 19 <div class="li_list_question "> 20 20 <div class="question_wpy_faq flex"> 21 <span class="soal_name_wpyt">' . $faq->question. '</span>21 <span class="soal_name_wpyt">' .esc_html($faq->question). '</span> 22 22 <span class="arrow_wpyt cret flex aline-c"></span> 23 23 </div> 24 24 <div class="answer_wpys_faq" > 25 <p>' . $faq->answer. '25 <p>' .esc_html($faq->answer). ' 26 26 </p> 27 27 </div> </div> </li> -
nirweb-support/trunk/inc/admin/functions/func_answerd_ticket.php
r2707344 r2708596 9 9 'user_id' => get_current_user_id(), 10 10 'time_answer' => current_time("Y-m-d H:i:s"), 11 'text' => $text,12 'attach_url' => isset($_POST['file_url']) && wp_http_validate_url($_POST['file_url']) ? esc_url_raw( $_POST['file_url']) : '',11 'text' => sanitize_textarea_field($text), 12 'attach_url' => isset($_POST['file_url']) && wp_http_validate_url($_POST['file_url']) ? esc_url_raw(sanitize_url($_POST['file_url'])) : '', 13 13 'ticket_id' => isset($_POST['id_form']) ? sanitize_text_field($_POST['id_form']) : ''); 14 14 if (strlen(sanitize_text_field($_POST['content'])) > 3) { … … 22 22 if (get_option('nirweb_ticket_perfix')['active_send_mail_to_user'] == '1') { 23 23 $user = get_user_by('id', intval(sanitize_text_field($_POST['sender_id']))); 24 $user = $user->user_email;24 $user = sanitize_text_field($user->user_email); 25 25 $ticket_id = sanitize_text_field($_POST['id_form']); 26 26 $ticket_title = sanitize_text_field($_POST['subject']); 27 27 $name_poshtiban = get_user_by('id', intval(sanitize_text_field($_POST['resivered_id']))); 28 $ticket_poshtiban = $name_poshtiban->user_nicename;28 $ticket_poshtiban = sanitize_text_field($name_poshtiban->user_nicename); 29 29 $ticket_dep = sanitize_text_field($_POST['department_name']); 30 30 $ticket_pri = sanitize_text_field($_POST['proname']); … … 47 47 $t_id = sanitize_text_field($ticket_id); 48 48 global $wpdb; 49 $process_answer_list = $wpdb->get_results("SELECT answered.* ,users.ID , users.display_name 50 FROM {$wpdb->prefix}nirweb_ticket_ticket_answered answered JOIN {$wpdb->prefix}users users ON user_id=ID 51 WHERE ticket_id=$t_id ORDER BY answer_id ASC "); 49 $process_answer_list = $wpdb->get_results("SELECT answered.* ,users.ID , users.display_name FROM {$wpdb->prefix}nirweb_ticket_ticket_answered answered JOIN {$wpdb->prefix}users users ON user_id=ID WHERE ticket_id=$t_id ORDER BY answer_id ASC "); 52 50 foreach ($process_answer_list as $row): 53 51 echo '<li> <div class="head_answer"> <span class="name">' . esc_html($row->display_name) . ' </span> 54 <span class="time">' . $date = date('(H:i:s)', strtotime($row->time_answer)) . '' . $date = wp_date(' Y-m-d', strtotime($row->time_answer)) . ' </span> </div> <div class="content">' . $row->text; ?> 55 <?php if ($row->attach_url) { echo esc_html('<p>' . __('Attachment File', 'nirweb-support') . ' ' . esc_url($row->attach_url) . ' </p>'); } ?> 52 <span class="time">' .esc_html(date('(H:i:s)', strtotime($row->time_answer))) . esc_html(wp_date(' Y-m-d', strtotime($row->time_answer))) . ' </span> </div> 53 <div class="content">' .wpautop(esc_html($row->text)); ?> 54 <?php if ($row->attach_url) { echo ('<p>' . esc_html__('Attachment File', 'nirweb-support') . ' ' . esc_url_raw($row->attach_url) . ' </p>'); } ?> 56 55 <?php echo ' </div></li> ' ; endforeach; 57 56 exit(); -
nirweb-support/trunk/inc/admin/functions/func_department.php
r2707344 r2708596 1 1 <?php 2 global $wpdb,$table_prefix; 3 if (!function_exists('nirweb_ticket_ticket_get_supporter_department')) {function nirweb_ticket_ticket_get_supporter_department() 2 global $wpdb, $table_prefix; 3 if (!function_exists('nirweb_ticket_ticket_get_supporter_department')) { 4 function nirweb_ticket_ticket_get_supporter_department() 4 5 { 5 $users = get_users( [ 'role__in' => [ 'user_support', 'administrator']]);6 $users = get_users(['role__in' => ['user_support', 'administrator']]); 6 7 return $users; 7 }} 8 } 9 } 8 10 if (!function_exists('nirweb_ticket_ticket_add_department')) { 9 11 function nirweb_ticket_ticket_add_department() 10 { 11 $new_arg=array( 12 'name' => sanitize_text_field($_POST['department_name']), 13 'support_id' => sanitize_text_field($_POST['id_poshtiban']) 14 ); 15 global $wpdb; 16 $wpdb->insert($wpdb->prefix.'nirweb_ticket_ticket_department',$new_arg); 17 return $wpdb->last_query; 12 { 13 $new_arg = array( 14 'name' => sanitize_text_field($_POST['department_name']), 15 'support_id' => sanitize_text_field($_POST['id_poshtiban']) 16 ); 17 global $wpdb; 18 $wpdb->insert($wpdb->prefix . 'nirweb_ticket_ticket_department', $new_arg); 19 return $wpdb->last_query; 20 } 18 21 } 22 if (!function_exists('get_list_department_ajax')) { 23 function get_list_department_ajax() 24 { 25 global $wpdb; 26 $departments = $wpdb->get_results("SELECT wd.*,wu.ID,wu.display_name 27 FROM {$wpdb->prefix}nirweb_ticket_ticket_department wd JOIN {$wpdb->prefix}users wu ON ID=support_id ORDER BY department_id DESC "); 28 foreach ($departments as $department) { 29 echo (' <tr style="border: solid 1px #ccc" class="row_dep"> <th><input type="checkbox" id="frm_check_items" name="frm_check_items[]" value="' . esc_html($department->department_id) . '"></th> 30 <th class="dep_name" data-id="' . esc_html($department->department_id) . '" >' . esc_html($department->name) . '</th> 31 <th class="name_user" data-user_id="' . esc_html($department->support_id) . '" >' . esc_html($department->display_name) . '</th> 32 <th><a class="edit_ticket_wpys"> <span class="dashicons dashicons-edit"></span></a></a></th> </tr>'); 33 } 34 } 19 35 } 20 if (!function_exists('get_list_department_ajax')) {function get_list_department_ajax(){ 21 global $wpdb; 22 $departments = $wpdb->get_results("SELECT wd.*,wu.ID,wu.display_name 23 FROM {$wpdb->prefix}nirweb_ticket_ticket_department wd JOIN {$wpdb->prefix}users wu ON ID=support_id ORDER BY department_id DESC "); 24 foreach ($departments as $department){ 25 echo esc_html(' <tr style="border: solid 1px #ccc" class="row_dep"> <th><input type="checkbox" id="frm_check_items" name="frm_check_items[]" value="'.esc_html($department->department_id).'"></th> 26 <th class="dep_name" data-id="'.esc_html($department->department_id) .'" >'.esc_html($department->name) .'</th> 27 <th class="name_user" data-user_id="'.esc_html($department->support_id) .'" >'.esc_html($department->display_name) .'</th> 28 <th><a class="edit_ticket_wpys"> <span class="dashicons dashicons-edit"></span></a></a></th> </tr>'); 29 } 30 }} 31 if (!function_exists('nirweb_ticket_ticket_get_list_department')) {function nirweb_ticket_ticket_get_list_department() 36 if (!function_exists('nirweb_ticket_ticket_get_list_department')) { 37 function nirweb_ticket_ticket_get_list_department() 32 38 { 33 39 global $wpdb; … … 35 41 FROM {$wpdb->prefix}nirweb_ticket_ticket_department wd JOIN {$wpdb->prefix}users wu ON ID=support_id ORDER BY department_id DESC "); 36 42 return $departments; 37 }}38 if (!function_exists('nirweb_ticket_delete_department')) {function nirweb_ticket_delete_department(){39 global $wpdb;40 $item_delete = sanitize_post($_POST['check']);41 for ($i = 0; $i < count($item_delete); $i++) {42 $wpdb->delete($wpdb->prefix.'nirweb_ticket_ticket_department', array('department_id' => $item_delete[$i]));43 43 } 44 }} 45 if (!function_exists('nirweb_ticket_edite_department')) {function nirweb_ticket_edite_department($data){ 46 $name = sanitize_text_field($data['department_name']); 47 $id = sanitize_text_field($data['depa_id']); 48 $support_id = sanitize_text_field($data['id_poshtiban']); 49 global $wpdb; 50 $table_name = $wpdb->prefix."nirweb_ticket_ticket_department"; 51 $wpdb->update( $table_name, array('name'=>$name, 'support_id'=>$support_id), array('department_id' => $id)); 52 }} 44 } 45 if (!function_exists('nirweb_ticket_delete_department')) { 46 function nirweb_ticket_delete_department() 47 { 48 global $wpdb; 49 $item_delete = sanitize_post($_POST['check']); 50 for ($i = 0; $i < count($item_delete); $i++) { 51 $wpdb->delete($wpdb->prefix . 'nirweb_ticket_ticket_department', array('department_id' => $item_delete[$i])); 52 } 53 } 54 } 55 if (!function_exists('nirweb_ticket_edite_department')) { 56 function nirweb_ticket_edite_department($data) 57 { 58 $name = sanitize_text_field($data['department_name']); 59 $id = sanitize_text_field($data['depa_id']); 60 $support_id = sanitize_text_field($data['id_poshtiban']); 61 global $wpdb; 62 $table_name = $wpdb->prefix . "nirweb_ticket_ticket_department"; 63 $wpdb->update($table_name, array('name' => $name, 'support_id' => $support_id), array('department_id' => $id)); 64 } 65 } -
nirweb-support/trunk/inc/admin/functions/func_list_tickets.php
r2707344 r2708596 1 1 <?php 2 if (!function_exists('wp_list_ticket_check')) {function wp_list_ticket_check(){ 3 global $wpdb; 4 $new_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname 2 if (!function_exists('wp_list_ticket_check')) { 3 function wp_list_ticket_check() 4 { 5 global $wpdb; 6 $new_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname 5 7 ,post.ID,post.post_title as product_name 6 8 FROM {$wpdb->prefix}nirweb_ticket_ticket ticket … … 16 18 ON product=post.ID 17 19 "); 18 return $new_ticket_list; 19 }} 20 if (!function_exists('wp_list_ticket_check_posht')) {function wp_list_ticket_check_posht($id) 21 { 22 global $wpdb; 23 $new_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname 20 return $new_ticket_list; 21 } 22 } 23 if (!function_exists('wp_list_ticket_check_posht')) { 24 function wp_list_ticket_check_posht($id) 25 { 26 global $wpdb; 27 $id = sanitize_text_field($id); 28 $new_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname 24 29 ,post.ID,post.post_title as product_name 25 30 FROM {$wpdb->prefix}nirweb_ticket_ticket ticket … … 36 41 WHERE ticket.support_id = $id OR ticket.sender_id = $id 37 42 "); 38 return $new_ticket_list; 39 }} 40 if (!function_exists('nirweb_ticket_get_list_all_ticket')) {function nirweb_ticket_get_list_all_ticket() 41 { 42 global $wpdb; 43 $items_per_page = 20; 44 $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1; 45 $offset = ( $page * $items_per_page ) - $items_per_page; 46 $query = 'SELECT * FROM '.$wpdb->prefix.'nirweb_ticket_ticket ticket'; 47 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 48 $total = $wpdb->get_var( $total_query ); 49 $new_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname 43 return $new_ticket_list; 44 } 45 } 46 if (!function_exists('nirweb_ticket_get_list_all_ticket')) { 47 function nirweb_ticket_get_list_all_ticket() 48 { 49 global $wpdb; 50 $items_per_page = 20; 51 $page = isset($_GET['cpage']) ? abs((int)$_GET['cpage']) : 1; 52 $offset = ($page * $items_per_page) - $items_per_page; 53 $query = 'SELECT * FROM ' . $wpdb->prefix . 'nirweb_ticket_ticket ticket'; 54 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 55 $total = $wpdb->get_var($total_query); 56 $new_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname 50 57 ,post.ID,post.post_title as product_name 51 FROM {$wpdb->prefix}nirweb_ticket_ticket ticket 52 LEFT JOIN {$wpdb->prefix}users users 53 ON sender_id=ID 54 LEFT JOIN {$wpdb->prefix}nirweb_ticket_ticket_status status 55 ON status=status_id 56 LEFT JOIN {$wpdb->prefix}nirweb_ticket_ticket_department department 57 ON department=department_id 58 LEFT JOIN {$wpdb->prefix}nirweb_ticket_ticket_priority priority 59 ON priority=priority_id 60 LEFT JOIN {$wpdb->prefix}posts post 61 ON product=post.ID 62 ORDER BY ticket_id DESC 63 LIMIT $offset, $items_per_page 64 "); 65 return array($new_ticket_list,paginate_links( array( 66 'base' => add_query_arg( 'cpage', '%#%' ), 67 'format' => '', 68 'prev_text' => __('«'), 69 'next_text' => __('»'), 70 'total' => ceil($total / $items_per_page), 71 'current' => $page 72 ))); 73 }} 74 if (!function_exists('nirweb_ticket_get_list_all_ticket_posht')) {function nirweb_ticket_get_list_all_ticket_posht($id) 75 { 76 global $wpdb; 77 $items_per_page = 20; 78 $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1; 79 $offset = ( $page * $items_per_page ) - $items_per_page; 80 $query = 'SELECT * FROM '.$wpdb->prefix.'nirweb_ticket_ticket ticket'; 81 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 82 $total = $wpdb->get_var( $total_query ); 83 $new_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname 84 ,post.ID,post.post_title as product_name 85 FROM {$wpdb->prefix}nirweb_ticket_ticket ticket 86 LEFT JOIN {$wpdb->prefix}users users 87 ON sender_id=ID 88 LEFT JOIN {$wpdb->prefix}nirweb_ticket_ticket_status status 89 ON status=status_id 90 LEFT JOIN {$wpdb->prefix}nirweb_ticket_ticket_department department 91 ON department=department_id 92 LEFT JOIN {$wpdb->prefix}nirweb_ticket_ticket_priority priority 93 ON priority=priority_id 94 LEFT JOIN {$wpdb->prefix}posts post 95 ON product=post.ID 96 WHERE ticket.support_id = $id OR ticket.sender_id = $id 97 ORDER BY ticket_id DESC 98 LIMIT $offset, $items_per_page 99 "); 100 return array($new_ticket_list,paginate_links( array( 101 'base' => add_query_arg( 'cpage', '%#%' ), 102 'format' => '', 103 'prev_text' => __('«'), 104 'next_text' => __('»'), 105 'total' => ceil($total / $items_per_page), 106 'current' => $page 107 ))); 108 }} 109 if (!function_exists('nirweb_ticket_get_list_new_ticket')) {function nirweb_ticket_get_list_new_ticket() 110 { 111 global $wpdb; 112 $items_per_page = 20; 113 $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1; 114 $offset = ( $page * $items_per_page ) - $items_per_page; 115 $query = 'SELECT * FROM '.$wpdb->prefix.'nirweb_ticket_ticket ticket WHERE status=1'; 116 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 117 $total = $wpdb->get_var( $total_query ); 118 $process_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname ,priority.*,priority.name as proname ,post.ID,post.post_title as product_name 58 FROM {$wpdb->prefix}nirweb_ticket_ticket ticket 59 LEFT JOIN {$wpdb->prefix}users users 60 ON sender_id=ID 61 LEFT JOIN {$wpdb->prefix}nirweb_ticket_ticket_status status 62 ON status=status_id 63 LEFT JOIN {$wpdb->prefix}nirweb_ticket_ticket_department department 64 ON department=department_id 65 LEFT JOIN {$wpdb->prefix}nirweb_ticket_ticket_priority priority 66 ON priority=priority_id 67 LEFT JOIN {$wpdb->prefix}posts post 68 ON product=post.ID 69 ORDER BY ticket_id DESC 70 LIMIT $offset, $items_per_page "); 71 return array($new_ticket_list, paginate_links(array( 72 'base' => add_query_arg('cpage', '%#%'), 73 'format' => '', 74 'prev_text' => __('«'), 75 'next_text' => __('»'), 76 'total' => ceil($total / $items_per_page), 77 'current' => $page 78 ))); 79 } 80 } 81 if (!function_exists('nirweb_ticket_get_list_all_ticket_posht')) { 82 function nirweb_ticket_get_list_all_ticket_posht($id) 83 { 84 global $wpdb; 85 $id = sanitize_text_field($id); 86 $items_per_page = 20; 87 $page = isset($_GET['cpage']) ? abs((int)$_GET['cpage']) : 1; 88 $offset = ($page * $items_per_page) - $items_per_page; 89 $query = 'SELECT * FROM ' . $wpdb->prefix . 'nirweb_ticket_ticket ticket'; 90 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 91 $total = $wpdb->get_var($total_query); 92 $new_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname 93 ,post.ID,post.post_title as product_name 94 FROM {$wpdb->prefix}nirweb_ticket_ticket ticket 95 LEFT JOIN {$wpdb->prefix}users users 96 ON sender_id=ID 97 LEFT JOIN {$wpdb->prefix}nirweb_ticket_ticket_status status 98 ON status=status_id 99 LEFT JOIN {$wpdb->prefix}nirweb_ticket_ticket_department department 100 ON department=department_id 101 LEFT JOIN {$wpdb->prefix}nirweb_ticket_ticket_priority priority 102 ON priority=priority_id 103 LEFT JOIN {$wpdb->prefix}posts post 104 ON product=post.ID 105 WHERE ticket.support_id = $id OR ticket.sender_id = $id 106 ORDER BY ticket_id DESC 107 LIMIT $offset, $items_per_page 108 "); 109 return array($new_ticket_list, paginate_links(array( 110 'base' => add_query_arg('cpage', '%#%'), 111 'format' => '', 112 'prev_text' => __('«'), 113 'next_text' => __('»'), 114 'total' => ceil($total / $items_per_page), 115 'current' => $page 116 ))); 117 } 118 } 119 if (!function_exists('nirweb_ticket_get_list_new_ticket')) { 120 function nirweb_ticket_get_list_new_ticket() 121 { 122 global $wpdb; 123 $items_per_page = 20; 124 $page = isset($_GET['cpage']) ? abs((int)$_GET['cpage']) : 1; 125 $offset = ($page * $items_per_page) - $items_per_page; 126 $query = 'SELECT * FROM ' . $wpdb->prefix . 'nirweb_ticket_ticket ticket WHERE status=1'; 127 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 128 $total = $wpdb->get_var($total_query); 129 $process_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname ,priority.*,priority.name as proname ,post.ID,post.post_title as product_name 119 130 FROM {$wpdb->prefix}nirweb_ticket_ticket ticket 120 131 LEFT JOIN {$wpdb->prefix}users users … … 132 143 LIMIT $offset, $items_per_page 133 144 "); 134 return array($process_ticket_list,paginate_links( array( 135 'base' => add_query_arg( 'cpage', '%#%' ), 136 'format' => '', 137 'prev_text' => __('«'), 138 'next_text' => __('»'), 139 'total' => ceil($total / $items_per_page), 140 'current' => $page 141 )) 142 ); 143 }} 144 if (!function_exists('nirweb_ticket_get_list_new_ticket_posht')) {function nirweb_ticket_get_list_new_ticket_posht($id) 145 { 146 global $wpdb; 147 $items_per_page = 20; 148 $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1; 149 $offset = ( $page * $items_per_page ) - $items_per_page; 150 $query = 'SELECT * FROM '.$wpdb->prefix.'nirweb_ticket_ticket ticket WHERE status=1'; 151 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 152 $total = $wpdb->get_var( $total_query ); 153 $process_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname ,priority.*,priority.name as proname ,post.ID,post.post_title as product_name 145 return array($process_ticket_list, paginate_links(array( 146 'base' => add_query_arg('cpage', '%#%'), 147 'format' => '', 148 'prev_text' => __('«'), 149 'next_text' => __('»'), 150 'total' => ceil($total / $items_per_page), 151 'current' => $page 152 )) 153 ); 154 } 155 } 156 if (!function_exists('nirweb_ticket_get_list_new_ticket_posht')) { 157 function nirweb_ticket_get_list_new_ticket_posht($id) 158 { 159 global $wpdb; 160 $id = sanitize_text_field($id); 161 $items_per_page = 20; 162 $page = isset($_GET['cpage']) ? abs((int)$_GET['cpage']) : 1; 163 $offset = ($page * $items_per_page) - $items_per_page; 164 $query = 'SELECT * FROM ' . $wpdb->prefix . 'nirweb_ticket_ticket ticket WHERE status=1'; 165 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 166 $total = $wpdb->get_var($total_query); 167 $process_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname ,priority.*,priority.name as proname ,post.ID,post.post_title as product_name 154 168 FROM {$wpdb->prefix}nirweb_ticket_ticket ticket 155 169 LEFT JOIN {$wpdb->prefix}users users … … 167 181 LIMIT $offset, $items_per_page 168 182 "); 169 return array($process_ticket_list,paginate_links( array( 170 'base' => add_query_arg( 'cpage', '%#%' ), 171 'format' => '', 172 'prev_text' => __('«'), 173 'next_text' => __('»'), 174 'total' => ceil($total / $items_per_page), 175 'current' => $page 176 )) 177 ); 178 }} 179 if (!function_exists('nirweb_ticket_get_list_process_ticket')) {function nirweb_ticket_get_list_process_ticket() 180 { 181 global $wpdb; 182 $items_per_page = 20; 183 $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1; 184 $offset = ( $page * $items_per_page ) - $items_per_page; 185 $query = 'SELECT * FROM '.$wpdb->prefix.'nirweb_ticket_ticket ticket WHERE status=2'; 186 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 187 $total = $wpdb->get_var( $total_query ); 188 $process_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname,post.ID,post.post_title as product_name 183 return array($process_ticket_list, paginate_links(array( 184 'base' => add_query_arg('cpage', '%#%'), 185 'format' => '', 186 'prev_text' => __('«'), 187 'next_text' => __('»'), 188 'total' => ceil($total / $items_per_page), 189 'current' => $page 190 )) 191 ); 192 } 193 } 194 if (!function_exists('nirweb_ticket_get_list_process_ticket')) { 195 function nirweb_ticket_get_list_process_ticket() 196 { 197 global $wpdb; 198 $items_per_page = 20; 199 $page = isset($_GET['cpage']) ? abs((int)$_GET['cpage']) : 1; 200 $offset = ($page * $items_per_page) - $items_per_page; 201 $query = 'SELECT * FROM ' . $wpdb->prefix . 'nirweb_ticket_ticket ticket WHERE status=2'; 202 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 203 $total = $wpdb->get_var($total_query); 204 $process_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname,post.ID,post.post_title as product_name 189 205 FROM {$wpdb->prefix}nirweb_ticket_ticket ticket 190 206 LEFT JOIN {$wpdb->prefix}users users … … 202 218 LIMIT $offset, $items_per_page 203 219 "); 204 return array($process_ticket_list,paginate_links( array( 205 'base' => add_query_arg( 'cpage', '%#%' ), 206 'format' => '', 207 'prev_text' => __('«'), 208 'next_text' => __('»'), 209 'total' => ceil($total / $items_per_page), 210 'current' => $page 211 )) 212 ); 213 }} 214 if (!function_exists('nirweb_ticket_get_list_process_ticket_posht')) {function nirweb_ticket_get_list_process_ticket_posht($id) 215 { 216 global $wpdb; 217 $items_per_page = 20; 218 $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1; 219 $offset = ( $page * $items_per_page ) - $items_per_page; 220 $query = 'SELECT * FROM '.$wpdb->prefix.'nirweb_ticket_ticket ticket WHERE status=2'; 221 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 222 $total = $wpdb->get_var( $total_query ); 223 $process_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname,post.ID,post.post_title as product_name 220 return array($process_ticket_list, paginate_links(array( 221 'base' => add_query_arg('cpage', '%#%'), 222 'format' => '', 223 'prev_text' => __('«'), 224 'next_text' => __('»'), 225 'total' => ceil($total / $items_per_page), 226 'current' => $page 227 )) 228 ); 229 } 230 } 231 if (!function_exists('nirweb_ticket_get_list_process_ticket_posht')) { 232 function nirweb_ticket_get_list_process_ticket_posht($id) 233 { 234 global $wpdb; 235 $id = sanitize_text_field($id); 236 $items_per_page = 20; 237 $page = isset($_GET['cpage']) ? abs((int)$_GET['cpage']) : 1; 238 $offset = ($page * $items_per_page) - $items_per_page; 239 $query = 'SELECT * FROM ' . $wpdb->prefix . 'nirweb_ticket_ticket ticket WHERE status=2'; 240 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 241 $total = $wpdb->get_var($total_query); 242 $process_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname,post.ID,post.post_title as product_name 224 243 FROM {$wpdb->prefix}nirweb_ticket_ticket ticket 225 244 LEFT JOIN {$wpdb->prefix}users users … … 236 255 ORDER BY ticket_id DESC 237 256 LIMIT $offset, $items_per_page "); 238 return array($process_ticket_list,paginate_links( array( 239 'base' => add_query_arg( 'cpage', '%#%' ), 240 'format' => '', 241 'prev_text' => __('«'), 242 'next_text' => __('»'), 243 'total' => ceil($total / $items_per_page), 244 'current' => $page 245 )) 246 ); 247 }} 257 return array($process_ticket_list, paginate_links(array( 258 'base' => add_query_arg('cpage', '%#%'), 259 'format' => '', 260 'prev_text' => __('«'), 261 'next_text' => __('»'), 262 'total' => ceil($total / $items_per_page), 263 'current' => $page 264 )) 265 ); 266 } 267 } 248 268 if (!function_exists('wp_yap_get_list_answered_ticket')) { 249 269 function wp_yap_get_list_answered_ticket() … … 251 271 global $wpdb; 252 272 $items_per_page = 20; 253 $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage']) : 1;254 $offset = ( $page * $items_per_page) - $items_per_page;255 $query = 'SELECT * FROM ' .$wpdb->prefix.'nirweb_ticket_ticket ticket WHERE status=3';256 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 257 $total = $wpdb->get_var( $total_query);273 $page = isset($_GET['cpage']) ? abs((int)$_GET['cpage']) : 1; 274 $offset = ($page * $items_per_page) - $items_per_page; 275 $query = 'SELECT * FROM ' . $wpdb->prefix . 'nirweb_ticket_ticket ticket WHERE status=3'; 276 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 277 $total = $wpdb->get_var($total_query); 258 278 $answered_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname,post.ID,post.post_title as product_name 259 279 FROM {$wpdb->prefix}nirweb_ticket_ticket ticket … … 272 292 LIMIT $offset, $items_per_page 273 293 "); 274 return array($answered_ticket_list,paginate_links( array( 275 'base' => add_query_arg( 'cpage', '%#%' ), 276 'format' => '', 277 'prev_text' => __('«'), 278 'next_text' => __('»'), 279 'total' => ceil($total / $items_per_page), 280 'current' => $page 281 )) 282 ); 283 } 284 } 285 if (!function_exists('wp_yap_get_list_answered_ticket_posht')) {function wp_yap_get_list_answered_ticket_posht($id) 286 { 287 global $wpdb; 288 $items_per_page = 20; 289 $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1; 290 $offset = ( $page * $items_per_page ) - $items_per_page; 291 $query = 'SELECT * FROM '.$wpdb->prefix.'nirweb_ticket_ticket ticket WHERE status=3'; 292 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 293 $total = $wpdb->get_var( $total_query ); 294 $answered_ticket_list = $wpdb->get_results("SELECT ticket.* ,users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname,post.ID,post.post_title as product_name 294 return array($answered_ticket_list, paginate_links(array( 295 'base' => add_query_arg('cpage', '%#%'), 296 'format' => '', 297 'prev_text' => __('«'), 298 'next_text' => __('»'), 299 'total' => ceil($total / $items_per_page), 300 'current' => $page 301 )) 302 ); 303 } 304 } 305 if (!function_exists('wp_yap_get_list_answered_ticket_posht')) { 306 function wp_yap_get_list_answered_ticket_posht($id) 307 { 308 global $wpdb; 309 $id = sanitize_text_field($id); 310 $items_per_page = 20; 311 $page = isset($_GET['cpage']) ? abs((int)$_GET['cpage']) : 1; 312 $offset = ($page * $items_per_page) - $items_per_page; 313 $query = 'SELECT * FROM ' . $wpdb->prefix . 'nirweb_ticket_ticket ticket WHERE status=3'; 314 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 315 $total = $wpdb->get_var($total_query); 316 $answered_ticket_list = $wpdb->get_results("SELECT ticket.* ,users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname,post.ID,post.post_title as product_name 295 317 FROM {$wpdb->prefix}nirweb_ticket_ticket ticket 296 318 LEFT JOIN {$wpdb->prefix}users users … … 308 330 LIMIT $offset, $items_per_page 309 331 "); 310 return array($answered_ticket_list,paginate_links( array( 311 'base' => add_query_arg( 'cpage', '%#%' ), 312 'format' => '', 313 'prev_text' => __('«'), 314 'next_text' => __('»'), 315 'total' => ceil($total / $items_per_page), 316 'current' => $page 317 )) 318 ); 319 }} 320 if (!function_exists('wp_yap_get_list_closed_ticket')) {function wp_yap_get_list_closed_ticket() 321 { 322 global $wpdb; 323 $items_per_page = 20; 324 $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1; 325 $offset = ( $page * $items_per_page ) - $items_per_page; 326 $query = 'SELECT * FROM '.$wpdb->prefix.'nirweb_ticket_ticket ticket WHERE status=4'; 327 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 328 $total = $wpdb->get_var( $total_query ); 329 $closed_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname,post.ID,post.post_title as product_name 332 return array($answered_ticket_list, paginate_links(array( 333 'base' => add_query_arg('cpage', '%#%'), 334 'format' => '', 335 'prev_text' => __('«'), 336 'next_text' => __('»'), 337 'total' => ceil($total / $items_per_page), 338 'current' => $page 339 )) 340 ); 341 } 342 } 343 if (!function_exists('wp_yap_get_list_closed_ticket')) { 344 function wp_yap_get_list_closed_ticket() 345 { 346 global $wpdb; 347 $items_per_page = 20; 348 $page = isset($_GET['cpage']) ? abs((int)$_GET['cpage']) : 1; 349 $offset = ($page * $items_per_page) - $items_per_page; 350 $query = 'SELECT * FROM ' . $wpdb->prefix . 'nirweb_ticket_ticket ticket WHERE status=4'; 351 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 352 $total = $wpdb->get_var($total_query); 353 $closed_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname,post.ID,post.post_title as product_name 330 354 FROM {$wpdb->prefix}nirweb_ticket_ticket ticket 331 355 LEFT JOIN {$wpdb->prefix}users users … … 343 367 LIMIT $offset, $items_per_page 344 368 "); 345 return array($closed_ticket_list,paginate_links( array( 346 'base' => add_query_arg( 'cpage', '%#%' ), 347 'format' => '', 348 'prev_text' => __('«'), 349 'next_text' => __('»'), 350 'total' => ceil($total / $items_per_page), 351 'current' => $page 352 )) 353 ); 354 }} 355 if (!function_exists('wp_yap_get_list_closed_ticket_posht')) {function wp_yap_get_list_closed_ticket_posht($id) 356 { 357 global $wpdb; 358 $items_per_page = 20; 359 $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1; 360 $offset = ( $page * $items_per_page ) - $items_per_page; 361 $query = 'SELECT * FROM '.$wpdb->prefix.'nirweb_ticket_ticket ticket WHERE status=4'; 362 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 363 $total = $wpdb->get_var( $total_query ); 364 $closed_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname,post.ID,post.post_title as product_name 369 return array($closed_ticket_list, paginate_links(array( 370 'base' => add_query_arg('cpage', '%#%'), 371 'format' => '', 372 'prev_text' => __('«'), 373 'next_text' => __('»'), 374 'total' => ceil($total / $items_per_page), 375 'current' => $page 376 )) 377 ); 378 } 379 } 380 if (!function_exists('wp_yap_get_list_closed_ticket_posht')) { 381 function wp_yap_get_list_closed_ticket_posht($id) 382 { 383 global $wpdb; 384 $id = sanitize_text_field($id); 385 $items_per_page = 20; 386 $page = isset($_GET['cpage']) ? abs((int)$_GET['cpage']) : 1; 387 $offset = ($page * $items_per_page) - $items_per_page; 388 $query = 'SELECT * FROM ' . $wpdb->prefix . 'nirweb_ticket_ticket ticket WHERE status=4'; 389 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 390 $total = $wpdb->get_var($total_query); 391 $closed_ticket_list = $wpdb->get_results("SELECT ticket.* , users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname,post.ID,post.post_title as product_name 365 392 FROM {$wpdb->prefix}nirweb_ticket_ticket ticket 366 393 LEFT JOIN {$wpdb->prefix}users users … … 378 405 LIMIT $offset, $items_per_page 379 406 "); 380 return array($closed_ticket_list,paginate_links( array( 381 'base' => add_query_arg( 'cpage', '%#%' ), 382 'format' => '', 383 'prev_text' => __('«'), 384 'next_text' => __('»'), 385 'total' => ceil($total / $items_per_page), 386 'current' => $page 387 )) 388 ); 389 }} 390 if (!function_exists('nirweb_ticket_edit_ticket')) { function nirweb_ticket_edit_ticket($ticket_id) 391 { 392 global $wpdb; 393 $ticket = $wpdb->get_row("SELECT ticket.* ,users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname ,revuser.ID as rev_id,revuser.display_name as rev_name ,posts.ID,posts.post_title as product_name 407 return array($closed_ticket_list, paginate_links(array( 408 'base' => add_query_arg('cpage', '%#%'), 409 'format' => '', 410 'prev_text' => __('«'), 411 'next_text' => __('»'), 412 'total' => ceil($total / $items_per_page), 413 'current' => $page 414 )) 415 ); 416 } 417 } 418 if (!function_exists('nirweb_ticket_edit_ticket')) { 419 function nirweb_ticket_edit_ticket($ticket_id) 420 { 421 global $wpdb; 422 $ticket_id = sanitize_text_field($ticket_id); 423 $ticket = $wpdb->get_row("SELECT ticket.* ,users.* ,status.*,department.* ,department.name as depname,priority.*,priority.name as proname ,revuser.ID as rev_id,revuser.display_name as rev_name ,posts.ID,posts.post_title as product_name 394 424 FROM {$wpdb->prefix}nirweb_ticket_ticket ticket 395 425 LEFT JOIN {$wpdb->prefix}users users … … 406 436 ON priority=priority_id 407 437 where $ticket_id = ticket_id; "); 408 return $ticket; 409 }} 410 if (!function_exists('nirweb_ticket_delete_ticket')) {function nirweb_ticket_delete_ticket($item_delete) 411 { 412 global $wpdb; 413 for ($i = 0; $i < count($item_delete); $i++) { 414 $wpdb->delete($wpdb->prefix.'nirweb_ticket_ticket', array('ticket_id' => $item_delete[$i])); 415 $wpdb->delete($wpdb->prefix.'nirweb_ticket_ticket_answered', array('ticket_id' => $item_delete[$i])); 416 } 417 } 438 return $ticket; 439 } 440 } 441 if (!function_exists('nirweb_ticket_delete_ticket')) { 442 function nirweb_ticket_delete_ticket($item_delete) 443 { 444 global $wpdb; 445 for ($i = 0; $i < count($item_delete); $i++) { 446 $wpdb->delete($wpdb->prefix . 'nirweb_ticket_ticket', array('ticket_id' => $item_delete[$i])); 447 $wpdb->delete($wpdb->prefix . 'nirweb_ticket_ticket_answered', array('ticket_id' => $item_delete[$i])); 448 } 449 } 418 450 } 419 451 -
nirweb-support/trunk/inc/admin/functions/func_number_tab_ticktes.php
r2529767 r2708596 3 3 global $wpdb; 4 4 $count_all=intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}nirweb_ticket_ticket")); 5 return $count_all;5 return esc_html($count_all); 6 6 }} 7 7 if (!function_exists('nirweb_ticket_count_new_ticket')) {function nirweb_ticket_count_new_ticket(){ … … 9 9 $count_all=intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}nirweb_ticket_ticket 10 10 WHERE status=1")); 11 return $count_all;11 return esc_html($count_all); 12 12 }} 13 13 if (!function_exists('nirweb_ticket_count_new_ticket_posht')) {function nirweb_ticket_count_new_ticket_posht($id){ … … 15 15 $count_all=intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}nirweb_ticket_ticket 16 16 WHERE (support_id = $id OR sender_id = $id) AND status=1")); 17 return $count_all;17 return esc_html($count_all); 18 18 }} 19 19 if (!function_exists('nirweb_ticket_count_process_ticket')) {function nirweb_ticket_count_process_ticket(){ … … 21 21 $count_all=intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}nirweb_ticket_ticket 22 22 WHERE status=2")); 23 return $count_all;23 return esc_html($count_all); 24 24 }} 25 25 if (!function_exists('nirweb_ticket_count_answered_ticket')) {function nirweb_ticket_count_answered_ticket(){ … … 27 27 $count_all=intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}nirweb_ticket_ticket 28 28 WHERE status=3")); 29 return $count_all;29 return esc_html($count_all); 30 30 }} 31 31 if (!function_exists('nirweb_ticket_count_closed_ticket')) {function nirweb_ticket_count_closed_ticket(){ … … 33 33 $count_all=intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}nirweb_ticket_ticket 34 34 WHERE status=4")); 35 return $count_all;35 return esc_html($count_all); 36 36 }} 37 37 -
nirweb-support/trunk/inc/admin/functions/func_send_ticket.php
r2707344 r2708596 9 9 'receiver_type' =>sanitize_text_field($_POST['receiver_type']), 10 10 'subject' => sanitize_text_field($_POST['subject']), 11 'content' => $text,11 'content' => sanitize_textarea_field($text), 12 12 'department' => isset($_POST['department_id']) ? intval(sanitize_text_field($_POST['department_id'])) : '', 13 13 'priority' => isset($_POST['priority_id']) ? intval(sanitize_text_field($_POST['priority_id'])) : '', … … 16 16 'support_id' => isset( $_POST[''] ) ? sanitize_text_field($_POST['']) : '', 17 17 'status' => isset($_POST['status']) ? intval(sanitize_text_field($_POST['status'])):'', 18 'file_url' => isset($_POST['file_url']) ? esc_url ($_POST['file_url']) : '' ,18 'file_url' => isset($_POST['file_url']) ? esc_url_raw($_POST['file_url']) : '' , 19 19 'time_update' => current_time("Y-m-d H:i:s"), 20 20 'date_qustion' => current_time("Y-m-d H:i:s") … … 25 25 $recever_name = sanitize_text_field($_POST['receiver_name']); 26 26 $current_user = wp_get_current_user(); 27 $user_sender = $current_user->display_name;27 $user_sender = sanitize_text_field($current_user->display_name); 28 28 $department = sanitize_text_field($_POST['department']); 29 29 $priority = sanitize_text_field($_POST['priority']); … … 35 35 $htmlContent = wpautop(str_replace('{username}',$recever_name,get_option('nirweb_ticket_perfix')['template_send_ticket_email'])); 36 36 $headers = array('Content-Type: text/html; charset=UTF-8'); 37 $body = $htmlContent;38 $rres =wp_mail( $to, $subject, $body, $headers );37 $body = sanitize_textarea_field($htmlContent); 38 wp_mail( $to, $subject, $body, $headers ); 39 39 } 40 40 -
nirweb-support/trunk/inc/admin/functions/scripts.php
r2703852 r2708596 16 16 [ 17 17 'ajax_url' => admin_url( 'admin-ajax.php' ), 18 'comp_sec' => __('Please complete all starred sections', 'nirweb-support'),19 'send_info' => __('Sending information...', 'nirweb-support'),20 'add_file' => __('Add File', 'nirweb-support'),21 'use_file' => __('Use the file', 'nirweb-support'),22 'send_tik_success' => __('Your ticket was sent successfully', 'nirweb-support'),23 'send_ans_success' => __('Your answer was sent successfully', 'nirweb-support'),24 'send_ans_err' => __('There was a problem sending the reply', 'nirweb-support'),25 'ques' => __('Are you sure?', 'nirweb-support'),26 'subdel' => __('The delete action causes the information to be lost.', 'nirweb-support'),27 'ok' => __('Ok', 'nirweb-support'),28 'cancel' => __('Cancel', 'nirweb-support'),29 'add_dep' => __('Add Department', 'nirweb-support'),30 'name_dep_err' => __('Please enter the name of the department', 'nirweb-support'),31 'sup_dep_err' => __('Please enter the support of the department', 'nirweb-support'),32 'chenge_dep' => __('The department changed successfully', 'nirweb-support'),33 'add_ques_err' => __('Please enter a question', 'nirweb-support'),34 'add_text_faq_err' => __('Please enter the answer text', 'nirweb-support'),35 'faq_ques_add' => __('Question added', 'nirweb-support'),18 'comp_sec' => esc_html__('Please complete all starred sections', 'nirweb-support'), 19 'send_info' => esc_html__('Sending information...', 'nirweb-support'), 20 'add_file' => esc_html__('Add File', 'nirweb-support'), 21 'use_file' => esc_html__('Use the file', 'nirweb-support'), 22 'send_tik_success' => esc_html__('Your ticket was sent successfully', 'nirweb-support'), 23 'send_ans_success' => esc_html__('Your answer was sent successfully', 'nirweb-support'), 24 'send_ans_err' => esc_html__('There was a problem sending the reply', 'nirweb-support'), 25 'ques' => esc_html__('Are you sure?', 'nirweb-support'), 26 'subdel' => esc_html__('The delete action causes the information to be lost.', 'nirweb-support'), 27 'ok' => esc_html__('Ok', 'nirweb-support'), 28 'cancel' => esc_html__('Cancel', 'nirweb-support'), 29 'add_dep' => esc_html__('Add Department', 'nirweb-support'), 30 'name_dep_err' => esc_html__('Please enter the name of the department', 'nirweb-support'), 31 'sup_dep_err' => esc_html__('Please enter the support of the department', 'nirweb-support'), 32 'chenge_dep' => esc_html__('The department changed successfully', 'nirweb-support'), 33 'add_ques_err' => esc_html__('Please enter a question', 'nirweb-support'), 34 'add_text_faq_err' => esc_html__('Please enter the answer text', 'nirweb-support'), 35 'faq_ques_add' => esc_html__('Question added', 'nirweb-support'), 36 36 ] 37 37 ); … … 40 40 'wpyarticketsw', 41 41 [ 42 'ok' => __('Ok', 'nirweb-support'),43 'cancel' => __('Cancel', 'nirweb-support'),42 'ok' => esc_html__('Ok', 'nirweb-support'), 43 'cancel' => esc_html__('Cancel', 'nirweb-support'), 44 44 ] 45 45 ); -
nirweb-support/trunk/inc/admin/themes/FAQ.php
r2707344 r2708596 1 1 <?php 2 include NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET.'func_FAQ.php'; 3 if(isset($_POST['submit_new_faq'])) 4 { 2 include NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_FAQ.php'; 3 if (isset($_POST['submit_new_faq'])) { 5 4 nirweb_ticket_save_new_faq(); 6 5 } 7 $FAQS =nirweb_ticket_get_all_faq();6 $FAQS = nirweb_ticket_get_all_faq(); 8 7 ?> 9 8 10 <h1 class="title_page_wpyt"><?php echo __('FAQ', 'nirweb-support') ?></h1>9 <h1 class="title_page_wpyt"><?php echo esc_html__('FAQ', 'nirweb-support') ?></h1> 11 10 <div class="wapper flex"> 12 <div class="right_FAQ" > 13 <form action="" id="form_Add_faq" method="post"> 14 <div class="question__faq flex flexd-cul" > 15 <label class="w-100"><b><?php echo __('Question', 'nirweb-support') ?></b></label> 16 <input name="nirweb_ticket_frm_subject_faq_ticket" id="nirweb_ticket_frm_subject_faq_ticket" class="wpyt_input" placeholder="<?php echo __('Enter Question', 'nirweb-support') ?>"> 17 </div> 11 <div class="right_FAQ"> 12 <form action="" id="form_Add_faq" method="post"> 13 <div class="question__faq flex flexd-cul"> 14 <label class="w-100"><b><?php echo esc_html__('Question', 'nirweb-support') ?></b></label> 15 <input name="nirweb_ticket_frm_subject_faq_ticket" id="nirweb_ticket_frm_subject_faq_ticket" 16 class="wpyt_input" placeholder="<?php echo esc_html__('Enter Question', 'nirweb-support') ?>"> 17 </div> 18 18 19 19 20 <div class="answer__faq flex flexd-cul">21 <label class="w-100"><b><?php echo__('Answer', 'nirweb-support') ?></b></label>20 <div class="answer__faq flex flexd-cul"> 21 <label class="w-100"><b><?php echo esc_html__('Answer', 'nirweb-support') ?></b></label> 22 22 23 <?php24 $content = '';25 $editor_id = 'nirweb_ticket_frm_faq_ticket';26 wp_editor($content, $editor_id); ?>23 <?php 24 $content = ''; 25 $editor_id = 'nirweb_ticket_frm_faq_ticket'; 26 wp_editor($content, $editor_id); ?> 27 27 28 </div>28 </div> 29 29 30 <buttonname="submit_new_faq" id="submit_new_faq" class="button button-primary">31 <?php echo__('Add Question', 'nirweb-support') ?>32 </button>30 <button name="submit_new_faq" id="submit_new_faq" class="button button-primary"> 31 <?php echo esc_html__('Add Question', 'nirweb-support') ?> 32 </button> 33 33 34 </form>34 </form> 35 35 36 36 </div> 37 37 38 38 <div class="left_FAQ"> 39 <ul class="list__question_faq">40 <?php if(count($FAQS)>=1)41 foreach ($FAQS as $faq):42 echo esc_html('43 <li class="flex w-100"> <span class="dashicons dashicons-trash remove_faq danger" data-id="' .esc_html($faq->id).'"></span>44 <div class="li_list_question "> <div class="question_wpy_faq flex"> <span class="soal_name_wpyt">' .esc_html($faq->question).'</span> <span class="arrow_wpyt cret flex aline-c"></span>45 </div> <div class="answer_wpys_faq" > <p>' .wpautop(esc_html($faq->answer)).' </p> </div> </div> </li> ');46 endforeach;47 else48 echo__('not found', 'nirweb-support'); ?>39 <ul class="list__question_faq"> 40 <?php if (count($FAQS) >= 1) 41 foreach ($FAQS as $faq): 42 echo(' 43 <li class="flex w-100"> <span class="dashicons dashicons-trash remove_faq danger" data-id="' . esc_html($faq->id) . '"></span> 44 <div class="li_list_question "> <div class="question_wpy_faq flex"> <span class="soal_name_wpyt">' . esc_html($faq->question) . '</span> <span class="arrow_wpyt cret flex aline-c"></span> 45 </div> <div class="answer_wpys_faq" > <p>' . wpautop(esc_html($faq->answer)) . ' </p> </div> </div> </li> '); 46 endforeach; 47 else 48 echo esc_html__('not found', 'nirweb-support'); ?> 49 49 50 </ul>50 </ul> 51 51 </div> 52 52 -
nirweb-support/trunk/inc/admin/themes/all_ticket.php
r2707344 r2708596 6 6 }else{ 7 7 $tickets=nirweb_ticket_get_list_all_ticket_posht(get_current_user_id()); 8 9 8 } 10 9 ?> … … 16 15 <th> <input type="checkbox" id="selectAll" /></th> 17 16 <th>ID</th> 18 <th><?php echo __('Status', 'nirweb-support')?></th>19 <th><?php echo __('Subject', 'nirweb-support')?></th>20 <th><?php echo __('Sender', 'nirweb-support')?></th>21 <th><?php echo __('Department', 'nirweb-support')?></th>22 <th><?php echo __('Priority', 'nirweb-support')?></th>23 <th><?php echo __('Product', 'nirweb-support')?></th>24 <th><?php echo __('Answer', 'nirweb-support')?></th>17 <th><?php echo esc_html__('Status', 'nirweb-support')?></th> 18 <th><?php echo esc_html__('Subject', 'nirweb-support')?></th> 19 <th><?php echo esc_html__('Sender', 'nirweb-support')?></th> 20 <th><?php echo esc_html__('Department', 'nirweb-support')?></th> 21 <th><?php echo esc_html__('Priority', 'nirweb-support')?></th> 22 <th><?php echo esc_html__('Product', 'nirweb-support')?></th> 23 <th><?php echo esc_html__('Answer', 'nirweb-support')?></th> 25 24 </tr> 26 25 </thead> … … 28 27 29 28 30 <?php foreach ($tickets[0] as $ticket): 31 $date = strtotime($ticket->date_qustion); 32 $date = wp_date( 'Y-m-d H:i:s' , $date); 33 34 ?> 29 <?php foreach ($tickets[0] as $ticket): ?> 35 30 <tr style="border: solid 1px #ccc"> 36 31 <th><input type="checkbox" id="frm_check_items" name="frm_check_items[]" value="<?php echo esc_html($ticket->ticket_id) ?>"></th> … … 56 51 <th></th> 57 52 <th>ID</th> 58 <th><?php echo __('Status', 'nirweb-support')?></th>59 <th><?php echo __('Subject', 'nirweb-support')?></th>60 <th><?php echo __('Sender', 'nirweb-support')?></th>61 <th><?php echo __('Department', 'nirweb-support')?></th>62 <th><?php echo __('Priority', 'nirweb-support')?></th>63 <th><?php echo __('Product', 'nirweb-support')?></th>64 <th><?php echo __('Answer', 'nirweb-support')?></th>53 <th><?php echo esc_html__('Status', 'nirweb-support')?></th> 54 <th><?php echo esc_html__('Subject', 'nirweb-support')?></th> 55 <th><?php echo esc_html__('Sender', 'nirweb-support')?></th> 56 <th><?php echo esc_html__('Department', 'nirweb-support')?></th> 57 <th><?php echo esc_html__('Priority', 'nirweb-support')?></th> 58 <th><?php echo esc_html__('Product', 'nirweb-support')?></th> 59 <th><?php echo esc_html__('Answer', 'nirweb-support')?></th> 65 60 </tr> 66 61 </tfoot> … … 70 65 71 66 <div class="nirweb_ticket_pagination"> 72 73 67 <?php echo esc_html($tickets[1]) ?> 74 75 68 </div> 76 69 -
nirweb-support/trunk/inc/admin/themes/answer-ticket.php
r2707344 r2708596 23 23 24 24 <h1 class="title_page_wpyt"> 25 <?php echo __('Ticket Number ', 'nirweb-support') ?>25 <?php echo esc_html__('Ticket Number ', 'nirweb-support') ?> 26 26 <?php echo esc_html($ticket_id) ?> 27 27 … … 31 31 <div class="display_content_ticket"> 32 32 <h3> 33 34 33 <span class="subject"> <?php echo esc_html($info_ticket->subject) ?></span> 35 36 37 34 <span class="titme_title"> 38 <?php echo $date = wp_date( 'Y-m-d ' , strtotime($info_ticket->date_qustion)); ?>39 <?php echo $date = date('H:i:s',strtotime($info_ticket->date_qustion)); ?>35 <?php echo esc_html(wp_date( 'Y-m-d ' , strtotime($info_ticket->date_qustion))); ?> 36 <?php echo esc_html(date('H:i:s',strtotime($info_ticket->date_qustion))); ?> 40 37 </span> 41 42 43 38 </h3> 44 45 46 47 48 39 <div class="text_ticket"> 49 40 <?php echo wpautop(esc_html($info_ticket->content)) ?> 50 41 </div> 51 52 53 54 42 </div> 55 43 56 44 57 45 <div class="info_wpyar_ticket"> 58 <!-~~ Start info ticket ~~~--> 59 60 <h2> <?php echo __('Ticket Information ', 'nirweb-support') ?> 61 </h2> 62 46 <h2> <?php echo esc_html__('Ticket Information ', 'nirweb-support') ?> </h2> 63 47 <div class="row_wpyt"> 64 <!-~~ start row ~~~-->65 66 48 <div class="left_info"> 67 <!-~~ Start Left info ~~~--> 68 <div class="row_wpyt"> 69 <div class="name_info"> 70 <p> <?php echo __('Sender', 'nirweb-support') ?> : </p> 49 <div class="row_wpyt"> 50 <div class="name_info"> 51 <p> <?php echo esc_html__('Sender', 'nirweb-support') ?> : </p> 71 52 </div> 72 53 <div class="val_info"> … … 78 59 <div class="row_wpyt"> 79 60 <div class="name_info"> 80 <p> <?php echo __('Receiver', 'nirweb-support') ?>: </p>61 <p> <?php echo esc_html__('Receiver', 'nirweb-support') ?>: </p> 81 62 </div> 82 63 <div class="val_info"> … … 90 71 <div class="row_wpyt"> 91 72 <div class="name_info"> 92 <p> <?php echo __('Priority', 'nirweb-support') ?> : </p>73 <p> <?php echo esc_html__('Priority', 'nirweb-support') ?> : </p> 93 74 </div> 94 75 <div class="val_info"> … … 100 81 <div class="row_wpyt"> 101 82 <div class="name_info"> 102 <p><?php echo __('WebSite', 'nirweb-support') ?></p>83 <p><?php echo esc_html__('WebSite', 'nirweb-support') ?></p> 103 84 </div> 104 85 <div class="val_info"> … … 110 91 <div class="row_wpyt"> 111 92 <div class="name_info"> 112 <p><?php echo __('Product', 'nirweb-support') ?></p>93 <p><?php echo esc_html__('Product', 'nirweb-support') ?></p> 113 94 </div> 114 95 <div class="val_info"> … … 119 100 <div class="row_wpyt"> 120 101 <div class="name_info"> 121 <p><?php echo __('Attachment File', 'nirweb-support') ?></p>102 <p><?php echo esc_html__('Attachment File', 'nirweb-support') ?></p> 122 103 </div> 123 104 <div class="val_info"> 124 105 <?php if($info_ticket->file_url){ ?> 125 <p><a href="<?php echo esc_url($info_ticket->file_url) ?>" target="_blank"><?php echo __('Attachment File', 'nirweb-support') ?></a></p> 106 <p><a href="<?php echo esc_url_raw($info_ticket->file_url) ?>" target="_blank"> 107 <?php echo esc_html__('Attachment File', 'nirweb-support') ?></a></p> 126 108 <?php } ?> 127 109 </div> 128 110 </div> 129 111 </div> 130 <!-~~ end Left info ~~~-->131 112 132 113 <div class="right_info"> 133 <!-~~ Start right info ~~~--> 134 <div class=" "> 135 136 114 <div class=" "> 137 115 <label><?php echo __('Department', 'nirweb-support') ?></label> 138 116 <select class="wpyt_select" id="nirweb_ticket_frm_department_send_ticket" … … 150 128 151 129 <div class=""> 152 <label><?php echo __('Status', 'nirweb-support') ?></label>130 <label><?php echo esc_html__('Status', 'nirweb-support') ?></label> 153 131 <select class="wpyt_select" id="nirweb_ticket_frm_status_send_ticket" 154 132 name="nirweb_ticket_frm_status_send_ticket"> … … 157 135 foreach ($list_status as $status):?> 158 136 <option <?php selected($info_ticket->status,$status->status_id)?> 159 value="<?php echo esc_html($status->status_id) ?>"><?php echo esc_html($status->name_status) ?></option> 137 value="<?php echo esc_html($status->status_id) ?>"> 138 <?php echo esc_html($status->name_status) ?></option> 160 139 <?php endforeach; ?> 161 140 </select> 162 141 </div> 163 164 142 </div> 165 <!-~~ end right info ~~~-->166 167 143 </div> 168 <!-~~ end row ~~~-->169 170 144 </div> 171 <!-~~ End info ticket ~~~-->172 145 173 146 <div class="answerd_this_ticket_wpyar"> 174 <h2><?php echo __('Answer', 'nirweb-support') ?></h2>147 <h2><?php echo esc_html__('Answer', 'nirweb-support') ?></h2> 175 148 176 149 <div class="war_pre_answer_wp_yar"> … … 181 154 <span class="icons"></span> 182 155 </p> 183 <p><?php echo __('Pre Answer', 'nirweb-support') ?></p>156 <p><?php echo esc_html__('Pre Answer', 'nirweb-support') ?></p> 184 157 </div> 185 158 … … 196 169 <span class="soal_name_wpyt"><?php the_title() ?></span> 197 170 <div class="flex"> 198 <a href="#" class="insert_text_into_editor_wp"><?php echo __('Insert', 'nirweb-support') ?></a>171 <a href="#" class="insert_text_into_editor_wp"><?php echo esc_html__('Insert', 'nirweb-support') ?></a> 199 172 <span class="arrow_wpyt flex aline-c cret_t"></span> 200 173 </div> … … 205 178 206 179 </li> 207 <?php 208 209 endwhile; 210 wp_reset_query(); 211 ?> 212 180 <?php endwhile; wp_reset_query(); ?> 213 181 </ul> 214 215 216 217 218 </div> 182 </div> 219 183 220 184 <div class="war_insert_pre_answer_wp_yar"> … … 226 190 227 191 <div class="file__wpyt"> 228 <label><?php echo __('Attachment File', 'nirweb-support') ?></label>192 <label><?php echo esc_html__('Attachment File', 'nirweb-support') ?></label> 229 193 230 194 <input type="text" id="nirweb_ticket_frm_file_send_ticket" name="nirweb_ticket_frm_file_send_ticket" 231 195 class="regular-text process_custom_images"> 232 196 <input id="plupload-browse-button" name="misha_upload_image_button" type="button" 233 value="<?php echo __('Image Select', 'nirweb-support') ?>" class="button wpyt_upload_image_button"197 value="<?php echo esc_html__('Image Select', 'nirweb-support') ?>" class="button wpyt_upload_image_button" 234 198 style=" position: relative; z-index: 1;"> 235 199 </div> 236 200 <div class="box_send_answered"> 237 <button type="submit" class="btn_send_answered btn-send "><?php echo __('Send Answer', 'nirweb-support') ?></button>201 <button type="submit" class="btn_send_answered btn-send "><?php echo esc_html__('Send Answer', 'nirweb-support') ?></button> 238 202 </div> 239 203 </form> … … 246 210 247 211 <div class="list_answerd_in_dash_admin"> 248 <h2 class="title_get_answered"><?php echo __('List Answer', 'nirweb-support') ?></h2> 249 212 <h2 class="title_get_answered"><?php echo esc_html__('List Answer', 'nirweb-support') ?></h2> 250 213 <ul class="list_all_answered"> 251 252 214 <?php foreach($info_answerd as $row): ?> 253 254 215 <li> 255 216 <div class="head_answer"> … … 260 221 261 222 <span class="time"> 262 <?php echo $date = date( '(H:i:s)' , strtotime($row->time_answer)); ?>263 <?php echo $date = wp_date( 'Y-m-d' , strtotime($row->time_answer)); ?>223 <?php echo esc_html( date( '(H:i:s)' , strtotime($row->time_answer))); ?> 224 <?php echo esc_html( wp_date( 'Y-m-d' , strtotime($row->time_answer))); ?> 264 225 </span> 265 226 … … 268 229 269 230 <div class="content"> 270 <?php echo wpautop(sanitize_textarea_field($row->text)) ?> 271 231 <?php echo wpautop(esc_html($row->text)) ?> 272 232 <?php if ($row->attach_url){ 273 233 echo '<p>'. 274 __('Attachment File', 'nirweb-support').'275 '.esc_url ($row->attach_url).'276 </p>';234 esc_html__('Attachment File', 'nirweb-support').' 235 '.esc_url_raw($row->attach_url).' 236 </p>'; 277 237 } ?> 278 238 </div> … … 281 241 </ul> 282 242 </div> 283 284 243 </div> 285 <!-~~~ End Base ~~~-->286 287 244 <?php } else{ 288 echo'<p>'. __('You do not have permission to access this ticket', 'nirweb-support').'</p>';245 echo'<p>'.esc_html__('You do not have permission to access this ticket', 'nirweb-support').'</p>'; 289 246 } -
nirweb-support/trunk/inc/admin/themes/answered_ticket.php
r2707344 r2708596 13 13 <th> <input type="checkbox" id="selectAll" /></th> 14 14 <th>ID</th> 15 <th><?php echo __('Status', 'nirweb-support')?></th>16 <th><?php echo __('Subject', 'nirweb-support')?></th>17 <th><?php echo __('Sender', 'nirweb-support')?></th>18 <th><?php echo __('Department', 'nirweb-support')?></th>19 <th><?php echo __('Priority', 'nirweb-support')?></th>20 <th><?php echo __('Product', 'nirweb-support')?></th>21 <th><?php echo __('Answer', 'nirweb-support')?></th>15 <th><?php echo esc_html__('Status', 'nirweb-support')?></th> 16 <th><?php echo esc_html__('Subject', 'nirweb-support')?></th> 17 <th><?php echo esc_html__('Sender', 'nirweb-support')?></th> 18 <th><?php echo esc_html__('Department', 'nirweb-support')?></th> 19 <th><?php echo esc_html__('Priority', 'nirweb-support')?></th> 20 <th><?php echo esc_html__('Product', 'nirweb-support')?></th> 21 <th><?php echo esc_html__('Answer', 'nirweb-support')?></th> 22 22 </tr> 23 23 </thead> … … 26 26 <th></th> 27 27 <th>ID</th> 28 <th><?php echo __('Status', 'nirweb-support')?></th>29 <th><?php echo __('Subject', 'nirweb-support')?></th>30 <th><?php echo __('Sender', 'nirweb-support')?></th>31 <th><?php echo __('Department', 'nirweb-support')?></th>32 <th><?php echo __('Priority', 'nirweb-support')?></th>33 <th><?php echo __('Product', 'nirweb-support')?></th>34 <th><?php echo __('Answer', 'nirweb-support')?></th>28 <th><?php echo esc_html__('Status', 'nirweb-support')?></th> 29 <th><?php echo esc_html__('Subject', 'nirweb-support')?></th> 30 <th><?php echo esc_html__('Sender', 'nirweb-support')?></th> 31 <th><?php echo esc_html__('Department', 'nirweb-support')?></th> 32 <th><?php echo esc_html__('Priority', 'nirweb-support')?></th> 33 <th><?php echo esc_html__('Product', 'nirweb-support')?></th> 34 <th><?php echo esc_html__('Answer', 'nirweb-support')?></th> 35 35 36 36 </tr> … … 38 38 39 39 <tbody> 40 <?php foreach ($tickets[0] as $ticket): 41 $date = strtotime($ticket->date_qustion); 42 $date = wp_date( 'Y-m-d H:i:s' , $date); 43 ?> 40 <?php foreach ($tickets[0] as $ticket): ?> 44 41 <tr style="border: solid 1px #ccc"> 45 42 <th><input type="checkbox" id="frm_check_items" name="frm_check_items[]" value="<?php echo esc_html($ticket->ticket_id)?>"></th> … … 59 56 </form> 60 57 <div class="nirweb_ticket_pagination"> 61 62 58 <?php echo esc_html($tickets[1]) ?> 63 64 59 </div> -
nirweb-support/trunk/inc/admin/themes/closed_ticket.php
r2707344 r2708596 13 13 <th> <input type="checkbox" id="selectAll" /></th> 14 14 <th>ID</th> 15 <th><?php echo __('Status', 'nirweb-support')?></th>16 <th><?php echo __('Subject', 'nirweb-support')?></th>17 <th><?php echo __('Sender', 'nirweb-support')?></th>18 <th><?php echo __('Department', 'nirweb-support')?></th>19 <th><?php echo __('Priority', 'nirweb-support')?></th>20 <th><?php echo __('Product', 'nirweb-support')?></th>21 <th><?php echo __('Answer', 'nirweb-support')?></th>15 <th><?php echo esc_html__('Status', 'nirweb-support')?></th> 16 <th><?php echo esc_html__('Subject', 'nirweb-support')?></th> 17 <th><?php echo esc_html__('Sender', 'nirweb-support')?></th> 18 <th><?php echo esc_html__('Department', 'nirweb-support')?></th> 19 <th><?php echo esc_html__('Priority', 'nirweb-support')?></th> 20 <th><?php echo esc_html__('Product', 'nirweb-support')?></th> 21 <th><?php echo esc_html__('Answer', 'nirweb-support')?></th> 22 22 </tr> 23 23 </thead> … … 26 26 <th></th> 27 27 <th>ID</th> 28 <th><?php echo __('Status', 'nirweb-support')?></th> 29 <th><?php echo __('Subject', 'nirweb-support')?></th> 30 <th><?php echo __('Sender', 'nirweb-support')?></th> 31 <th><?php echo __('Department', 'nirweb-support')?></th> 32 <th><?php echo __('Priority', 'nirweb-support')?></th> 33 <th><?php echo __('Product', 'nirweb-support')?></th> 34 <th><?php echo __('Answer', 'nirweb-support')?></th> 35 28 <th><?php echo esc_html__('Status', 'nirweb-support')?></th> 29 <th><?php echo esc_html__('Subject', 'nirweb-support')?></th> 30 <th><?php echo esc_html__('Sender', 'nirweb-support')?></th> 31 <th><?php echo esc_html__('Department', 'nirweb-support')?></th> 32 <th><?php echo esc_html__('Priority', 'nirweb-support')?></th> 33 <th><?php echo esc_html__('Product', 'nirweb-support')?></th> 34 <th><?php echo esc_html__('Answer', 'nirweb-support')?></th> 36 35 </tr> 37 36 </tfoot> 38 37 39 38 <tbody> 40 <?php foreach ($tickets[0] as $ticket): 41 $date = strtotime($ticket->date_qustion); 42 $date = wp_date( 'Y-m-d H:i:s' , $date); 43 ?> 39 <?php foreach ($tickets[0] as $ticket): ?> 44 40 <tr style="border: solid 1px #ccc"> 45 41 <th><input type="checkbox" id="frm_check_items" name="frm_check_items[]" value="<?php echo esc_html($ticket->ticket_id)?>"></th> 46 42 <th><?php echo esc_html($ticket->ticket_id)?></th> 47 43 <th><?php echo esc_html( $ticket->name_status)?></th> 48 <th><a href="<?php echo get_bloginfo('url').'/wp-admin/admin.php?page=nirweb_ticket_send_ticket&action=edit&id='.esc_html($ticket->ticket_id) ?>" class="su_link_tik"><?php echo esc_html($ticket->subject)?></a></th>44 <th><a href="<?php echo get_bloginfo('url').'/wp-admin/admin.php?page=nirweb_ticket_send_ticket&action=edit&id='.esc_html($ticket->ticket_id)?>" class="su_link_tik"><?php echo esc_html($ticket->subject)?></a></th> 49 45 <th><?php echo esc_html($ticket->user_login) ?></th> 50 46 <th><?php echo esc_html($ticket->depname)?></th> … … 56 52 </tbody> 57 53 </table> 58 59 54 </form> 60 55 <div class="nirweb_ticket_pagination"> <?php echo esc_html($tickets[1]) ?> </div> -
nirweb-support/trunk/inc/admin/themes/department.php
r2707344 r2708596 4 4 ?> 5 5 6 <h1 class="title_page_wpyt"><?php echo __('Departments', 'nirweb-support') ?></h1>6 <h1 class="title_page_wpyt"><?php echo esc_html__('Departments', 'nirweb-support') ?></h1> 7 7 <div class="wapper flex"> 8 8 <div class="right_FAQ" > 9 9 <form method="post"> 10 10 <div class="question__faq flex flexd-cul" > 11 <label class="w-100"><b><?php echo __('Department Name', 'nirweb-support') ?></b></label> 12 <input id="nirweb_ticket_name_department" name="nirweb_ticket_name_department" class="wpyt_input" placeholder="<?php echo __('Department Name', 'nirweb-support') ?>"> 11 <label class="w-100"> 12 <b><?php echo esc_html__('Department Name', 'nirweb-support') ?></b> 13 </label> 14 <input id="nirweb_ticket_name_department" name="nirweb_ticket_name_department" class="wpyt_input" placeholder="<?php echo esc_html__('Department Name', 'nirweb-support') ?>"> 13 15 </div> 14 16 <div class="question__faq flex flexd-cul" > 15 <label class="w-100"><b><?php echo __('Support', 'nirweb-support') ?></b></label>17 <label class="w-100"><b><?php echo esc_html__('Support', 'nirweb-support') ?></b></label> 16 18 <?php 17 19 echo '<select id="nirweb_ticket_support_department" name="nirweb_ticket_support_department">'; 18 echo '<option value="-1">'. __('Select Support User', 'nirweb-support').'</option>';20 echo '<option value="-1">'.esc_html__('Select Support User', 'nirweb-support').'</option>'; 19 21 foreach ($users as $user) { ?> 20 22 <option data-mail="<?php echo esc_html($user->user_email) ?>" value="<?php echo esc_html($user->ID) ?>"> … … 24 26 ?> 25 27 </div> 26 <button name="submit_new_department" id="submit_new_department" class="button button-primary"><?php echo __('Add Department', 'nirweb-support') ?></button>28 <button name="submit_new_department" id="submit_new_department" class="button button-primary"><?php echo esc_html__('Add Department', 'nirweb-support') ?></button> 27 29 </form> 28 30 </div> … … 32 34 <tr> 33 35 <th></th> 34 <th><?php echo __('Department Name', 'nirweb-support') ?></th>35 <th><?php echo __('Support', 'nirweb-support') ?></th>36 <th><?php echo __('Edit', 'nirweb-support') ?></th>36 <th><?php echo esc_html__('Department Name', 'nirweb-support') ?></th> 37 <th><?php echo esc_html__('Support', 'nirweb-support') ?></th> 38 <th><?php echo esc_html__('Edit', 'nirweb-support') ?></th> 37 39 </tr> 38 40 </thead> … … 41 43 42 44 <th></th> 43 <th><?php echo __('Department Name', 'nirweb-support') ?></th>44 <th><?php echo __('Support', 'nirweb-support') ?></th>45 <th><?php echo __('Edit', 'nirweb-support') ?></th>45 <th><?php echo esc_html__('Department Name', 'nirweb-support') ?></th> 46 <th><?php echo esc_html__('Support', 'nirweb-support') ?></th> 47 <th><?php echo esc_html__('Edit', 'nirweb-support') ?></th> 46 48 </tr> 47 49 </tfoot> … … 50 52 <tr style="border: solid 1px #ccc" class="row_dep"> 51 53 <th><input type="checkbox" id="frm_check_items" name="frm_check_items[]" value="<?php echo esc_html($department->department_id) ?>"></th> 52 <th class="dep_name" data-id="<?php echo esc_html($department->department_id) ?>" ><?php echo esc_html($department->name) ?></th>53 <th class="name_user" data-user_id="<?php echo esc_html($department->support_id) ?>" ><?php echo esc_html($department->display_name) ?></th>54 <th class="dep_name" data-id="<?php echo esc_html($department->department_id) ?>" ><?php echo esc_html($department->name) ?></th> 55 <th class="name_user" data-user_id="<?php echo esc_html($department->support_id) ?>" ><?php echo esc_html($department->display_name) ?></th> 54 56 <th><a class="edit_ticket_wpys edit_dep_wpys"> 55 57 <span class="dashicons dashicons-edit"></span></a></a></th> … … 60 62 <div class="remove_wpyt font-base" > 61 63 <button class="button button-primary" id="frm_btn_delete_dep"> 62 <?php echo __('Delete', 'nirweb-support') ?>64 <?php echo esc_html__('Delete', 'nirweb-support') ?> 63 65 </button> 64 66 </div> -
nirweb-support/trunk/inc/admin/themes/file_uploads.php
r2707344 r2708596 5 5 <div class="base_load_file"> 6 6 7 <h2><?php echo __('List of uploaded files', 'nirweb-support'); ?></h2>7 <h2><?php echo esc_html__('List of uploaded files', 'nirweb-support'); ?></h2> 8 8 9 9 <form method="post" id="list_all_user_files" name="list_all_user_files[]"> … … 13 13 <tr> 14 14 <th style="width: 45px"></th> 15 <th style="width: 80px"><?php echo __('Image File', 'nirweb-support'); ?></th>16 <th><?php echo __('Link File', 'nirweb-support'); ?></th>15 <th style="width: 80px"><?php echo esc_html__('Image File', 'nirweb-support'); ?></th> 16 <th><?php echo esc_html__('Link File', 'nirweb-support'); ?></th> 17 17 </tr> 18 18 </thead> … … 27 27 <th><input type="checkbox" id="frm_check_items" name="frm_check_items[]" 28 28 value="<?php echo esc_html($row->id) ?>" data-file="<?php echo esc_html($row->file_id) ?>"></th> 29 <th><img src="<?php echo esc_ html($row->url_file) ?>" width="50" height="50"></th>30 <th><a href="<?php echo esc_ html($row->url_file) ?>" target="_blank"><?php echo__('Show Image', 'nirweb-support'); ?></a></th>29 <th><img src="<?php echo esc_url_raw($row->url_file) ?>" width="50" height="50"></th> 30 <th><a href="<?php echo esc_url_raw($row->url_file) ?>" target="_blank"><?php echo esc_html__('Show Image', 'nirweb-support'); ?></a></th> 31 31 </tr> 32 32 <?php endforeach ?> … … 36 36 <tr> 37 37 <th></th> 38 <th><?php echo __('Image File', 'nirweb-support'); ?></th>39 <th><?php echo __('Link File', 'nirweb-support'); ?></th>38 <th><?php echo esc_html__('Image File', 'nirweb-support'); ?></th> 39 <th><?php echo esc_html__('Link File', 'nirweb-support'); ?></th> 40 40 </tr> 41 41 </tfoot> … … 43 43 <div class="remove_wpyt font-base" > 44 44 <button type="submit" class="danger" id="frm_btn_delete_files_users"> 45 <?php echo __('Delete', 'nirweb-support'); ?>45 <?php echo esc_html__('Delete', 'nirweb-support'); ?> 46 46 </button> 47 47 </div> -
nirweb-support/trunk/inc/admin/themes/manage_tickets.php
r2707344 r2708596 2 2 <?php 3 3 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET.'func_number_tab_ticktes.php'; 4 $action = isset($_GET['action']) && !empty($_GET['action']) && ctype_alpha($_GET['action']) ?5 $_GET['action']: null;4 $action = isset($_GET['action']) && !empty($_GET['action']) && esc_html($_GET['action']) ? 5 esc_html($_GET['action']) : null; 6 6 if($action=='edit') 7 7 { 8 $ticket_id=isset($_GET['id']) && !empty($_GET['id']) && ctype_digit($_GET['id'])?8 $ticket_id=isset($_GET['id']) && !empty($_GET['id']) && esc_html($_GET['id'])? 9 9 intval($_GET['id']):null; 10 10 if($ticket_id) { 11 wp_redirect(admin_url('admin.php?page=nirweb_ticket_send_ticket&id='. $ticket_id));11 wp_redirect(admin_url('admin.php?page=nirweb_ticket_send_ticket&id='.esc_html($ticket_id))); 12 12 } 13 13 } 14 14 $tabs = array( 15 'all_ticket' => __('All Ticket', 'nirweb-support').'('.nirweb_ticket_count_all_ticket().')',16 'new_ticket' => __('New', 'nirweb-support').'('.nirweb_ticket_count_new_ticket().')',17 'process_ticket' => __('InProgress', 'nirweb-support').'('.nirweb_ticket_count_process_ticket().')',18 'answered_ticket' => __('Answered', 'nirweb-support').'('.nirweb_ticket_count_answered_ticket().')',19 'closed_ticket' => __('Closed', 'nirweb-support').'('.nirweb_ticket_count_closed_ticket().')',15 'all_ticket' => esc_html__('All Ticket', 'nirweb-support').'('.nirweb_ticket_count_all_ticket().')', 16 'new_ticket' => esc_html__('New', 'nirweb-support').'('.nirweb_ticket_count_new_ticket().')', 17 'process_ticket' => esc_html__('InProgress', 'nirweb-support').'('.nirweb_ticket_count_process_ticket().')', 18 'answered_ticket' => esc_html__('Answered', 'nirweb-support').'('.nirweb_ticket_count_answered_ticket().')', 19 'closed_ticket' => esc_html__('Closed', 'nirweb-support').'('.nirweb_ticket_count_closed_ticket().')', 20 20 21 21 ); 22 $curent_tab = isset($_GET['tab']) ? $_GET['tab']: 'new_ticket';22 $curent_tab = isset($_GET['tab']) ? esc_html($_GET['tab']) : 'new_ticket'; 23 23 ?> 24 <h1 class="title_page_wpyt"><?php echo __('Tickets', 'nirweb-support') ?></h1>24 <h1 class="title_page_wpyt"><?php echo esc_html__('Tickets', 'nirweb-support') ?></h1> 25 25 <style> 26 26 a:focus,button:focus, input[type=color]:focus, input[type=date]:focus, input[type=datetime-local]:focus, input[type=datetime]:focus, input[type=email]:focus, input[type=month]:focus, input[type=number]:focus, input[type=password]:focus, input[type=radio]:focus, input[type=search]:focus, input[type=tel]:focus, input[type=text]:focus, input[type=time]:focus, input[type=url]:focus, input[type=week]:focus, select:focus, textarea:focus { … … 52 52 <?php foreach ($tabs as $tab=>$title): ?> 53 53 <?php $class = ( $tab == $curent_tab ) ? ' nav-active' : '';?> 54 <li class='<?php echo $class?> <?php echo $tab ?> '> <a href='?page=nirweb_ticket_manage_tickets&tab=<?php echo $tab?>'>55 <?php if( $tab=='all_ticket'){56 echo '<svg id="svg_total-ticket" viewBox="0 0 48.4 48.4" style="width: 40px"><g transform="translate(-2300 -319)"><path fill="#FEA000" d="M2318.241 335.827l3.748-3.747 16.475 16.475-3.748 3.748z"></path><path fill="#4D4D4D" d="M2326.4 352.4c-.3 0-.5-.1-.7-.3l-2.4-2.4c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.4 2.4c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-4.9-4.9c-.3 0-.5-.1-.7-.3l-2.4-2.4c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.4 2.4c.4.4.4 1 0 1.4-.1.2-.4.3-.7.3z"></path><path fill="#E6E6E6" d="M2338.4 348.5l9-9-3.8-3.8c-2.4 2.5-6.4 2.5-8.9.1-2.4-2.5-2.4-6.5.1-8.9l-3.8-3.8-9 9 16.4 16.4z"></path><path fill="#4D4D4D" d="M2348.4 339.5c0-.1 0-.3-.1-.4 0-.1-.1-.2-.2-.3l-3.8-3.8c-.2-.2-.4-.3-.7-.3-.3 0-.5.1-.7.3-.5.5-1.1.9-1.7 1.2h-.2c-.3.1-.5.2-.8.2-.3.1-.7.1-1 .1-1.4 0-2.7-.5-3.7-1.5l-.1-.1c-1-1-1.5-2.4-1.5-3.7 0-1.3.6-2.7 1.6-3.7.2-.2.3-.4.3-.7v-.1c0-.3-.1-.5-.3-.7l-3.8-3.8c-.4-.4-1-.4-1.4 0l-27 27c-.4.4-.4 1 0 1.4l3.8 3.8c.2.2.4.3.7.3.3 0 .5-.1.7-.3 2-2.1 5.4-2.1 7.5-.1 2 2.1 2 5.4-.1 7.5-.2.2-.3.4-.3.7 0 .3.1.5.3.7l3.8 3.8c.2.2.5.3.7.3.3 0 .5-.1.7-.3l14-13.9c.1 0 .3-.1.4-.2l3.7-3.7c.1-.1.1-.2.2-.2l8.6-8.6.1-.1c.1-.1.2-.2.2-.3.1-.2.1-.3.1-.5zm-14.4-3c.8.8 1.8 1.3 2.8 1.7.1 0 .3.1.4.1.2 0 .3.1.5.1.3.1.6.1.9.1h1c.2 0 .4 0 .6-.1.3 0 .5-.1.8-.2.1 0 .2-.1.4-.1.3-.1.7-.2 1-.4.1 0 .1 0 .2-.1.4-.2.7-.4 1.1-.7l1.2 1.2 1.2 1.2-7.5 7.5-15-15 7.5-7.5 2.4 2.4c-1.1 1.4-1.6 3.1-1.5 4.8 0 2 .7 3.7 2 5zm-12-3l15 15-2.3 2.3-15-15 2.3-2.3zm-1.6 31.5l-2.4-2.4c2.2-2.8 2-6.9-.6-9.6-2.6-2.6-6.7-2.7-9.6-.6l-2.4-2.4 9.1-9.1v.1l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4h-.1l2.3-2.3 15 15-2.3 2.3-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4-9 9zM2301.4 347.3c-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l25.4-25.9c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4l-25.4 25.9c-.2.2-.4.3-.7.3z"></path></g></svg>';57 }if( $tab=='new_ticket'){54 <li class='<?php echo esc_html($class)?> <?php echo esc_html($tab) ?> '> <a href='?page=nirweb_ticket_manage_tickets&tab=<?php echo esc_html($tab)?>'> 55 <?php if(esc_html($tab) =='all_ticket'){ 56 echo '<svg id="svg_total-ticket" viewBox="0 0 48.4 48.4" style="width: 40px"><g transform="translate(-2300 -319)"><path fill="#FEA000" d="M2318.241 335.827l3.748-3.747 16.475 16.475-3.748 3.748z"></path><path fill="#4D4D4D" d="M2326.4 352.4c-.3 0-.5-.1-.7-.3l-2.4-2.4c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.4 2.4c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-4.9-4.9c-.3 0-.5-.1-.7-.3l-2.4-2.4c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.4 2.4c.4.4.4 1 0 1.4-.1.2-.4.3-.7.3z"></path><path fill="#E6E6E6" d="M2338.4 348.5l9-9-3.8-3.8c-2.4 2.5-6.4 2.5-8.9.1-2.4-2.5-2.4-6.5.1-8.9l-3.8-3.8-9 9 16.4 16.4z"></path><path fill="#4D4D4D" d="M2348.4 339.5c0-.1 0-.3-.1-.4 0-.1-.1-.2-.2-.3l-3.8-3.8c-.2-.2-.4-.3-.7-.3-.3 0-.5.1-.7.3-.5.5-1.1.9-1.7 1.2h-.2c-.3.1-.5.2-.8.2-.3.1-.7.1-1 .1-1.4 0-2.7-.5-3.7-1.5l-.1-.1c-1-1-1.5-2.4-1.5-3.7 0-1.3.6-2.7 1.6-3.7.2-.2.3-.4.3-.7v-.1c0-.3-.1-.5-.3-.7l-3.8-3.8c-.4-.4-1-.4-1.4 0l-27 27c-.4.4-.4 1 0 1.4l3.8 3.8c.2.2.4.3.7.3.3 0 .5-.1.7-.3 2-2.1 5.4-2.1 7.5-.1 2 2.1 2 5.4-.1 7.5-.2.2-.3.4-.3.7 0 .3.1.5.3.7l3.8 3.8c.2.2.5.3.7.3.3 0 .5-.1.7-.3l14-13.9c.1 0 .3-.1.4-.2l3.7-3.7c.1-.1.1-.2.2-.2l8.6-8.6.1-.1c.1-.1.2-.2.2-.3.1-.2.1-.3.1-.5zm-14.4-3c.8.8 1.8 1.3 2.8 1.7.1 0 .3.1.4.1.2 0 .3.1.5.1.3.1.6.1.9.1h1c.2 0 .4 0 .6-.1.3 0 .5-.1.8-.2.1 0 .2-.1.4-.1.3-.1.7-.2 1-.4.1 0 .1 0 .2-.1.4-.2.7-.4 1.1-.7l1.2 1.2 1.2 1.2-7.5 7.5-15-15 7.5-7.5 2.4 2.4c-1.1 1.4-1.6 3.1-1.5 4.8 0 2 .7 3.7 2 5zm-12-3l15 15-2.3 2.3-15-15 2.3-2.3zm-1.6 31.5l-2.4-2.4c2.2-2.8 2-6.9-.6-9.6-2.6-2.6-6.7-2.7-9.6-.6l-2.4-2.4 9.1-9.1v.1l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4h-.1l2.3-2.3 15 15-2.3 2.3-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4-9 9zM2301.4 347.3c-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l25.4-25.9c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4l-25.4 25.9c-.2.2-.4.3-.7.3z"></path></g></svg>'; 57 }if(esc_html($tab) =='new_ticket'){ 58 58 echo '<svg id="svg_open-ticket" viewBox="0 0 48.6 48.6" style="width: 40px"><path fill="#FFF" d="M17.5 14.2l2.4-2.4c5.6 5.6 11.2 11.3 16.8 16.9L34.4 31c-5.6-5.5-11.3-11.2-16.9-16.8z"></path><path fill="#E6E6E6" d="M38.2 28.8l9.4-9.4-4.2-4.2c-2.7 2.6-7.1 2.5-9.7-.2-2.7-2.6-2.8-7-.2-9.7L29.3 1l-9.4 9.4 18.3 18.4z"></path><path fill="#4D4D4D" d="M25.3 32.3c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-5.4-5.4c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3z"></path><path fill="#4D4D4D" d="M48.3 18.6l-4.2-4.2c-.4-.4-1-.4-1.4 0-2.3 2.2-6 2.1-8.2-.2-2.3-2.2-2.4-6-.2-8.3.4-.4.4-1 0-1.4L30 .3l-.2-.1-.2-.1-.2-.1H29.1c-.2 0-.4.1-.5.2l-9.4 9.4-18.9 19c-.4.4-.4 1 0 1.4l4.2 4.2c.4.4 1 .4 1.4 0 2.3-2.2 6.1-2.1 8.3.2 2.3 2.2 2.4 6 .2 8.3-.4.4-.4 1 0 1.4l4.2 4.2c.2.2.5.3.7.3s.5-.1.7-.3l14.8-14.8c.2 0 .3-.1.4-.2l4.2-4.2c.1-.1.1-.2.2-.3l8.7-8.7c.2-.2.3-.5.3-.8 0-.2-.1-.5-.3-.7zm-19-16.2l2.9 2.9c-2.3 3.1-2 7.6.8 10.3 2.8 2.8 7.2 3.1 10.4.9l2.8 2.8-7.5 7.5L21.8 10l7.5-7.6zm-9.4 9.4l16.8 16.9-2.3 2.3-16.9-16.8 2.4-2.4zm-.6 34.4l-2.8-2.8c2.3-3.1 2-7.6-.8-10.3-2.8-2.8-7.2-3.1-10.4-.9l-2.8-2.8 9.8-9.8c0 .1.1.2.2.3l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4c-.1-.1-.2-.1-.3-.2l2.6-2.6L33 32.5l-2.6 2.6c0-.2-.1-.3-.2-.4l-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4c.1.1.3.2.4.2l-9.9 9.9z"></path><circle fill="#FF1A1A" cx="35.2" cy="35.7" r="9.9"></circle><path fill="#FFF" d="M35.2 47.7c-6.6 0-12-5.4-12-12s5.4-12 12-12 12 5.4 12 12-5.4 12-12 12zm0-22c-5.5 0-10 4.5-10 10s4.5 10 10 10 10-4.5 10-10-4.5-10-10-10z"></path><path fill="#FFF" d="M38.8 40.5h-6c-.6 0-1-.4-1-1s.4-1 1-1h5v-5h-5c-.6 0-1-.4-1-1s.4-1 1-1h6c.6 0 1 .4 1 1v7c0 .6-.4 1-1 1z"></path></svg>'; 59 }if( $tab=='process_ticket'){60 echo '<svg id="svg_doing-ticket" viewBox="0 0 48.6 48.6" style="width: 40px"><g transform="translate(-1031 1558)"><path fill="#FFF" d="M1047.103-1543.742l4.242-4.242 18.385 18.384-4.243 4.243z"></path><path fill="#4D4D4D" d="M1056.3-1525.7c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-5.4-5.4c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3z"></path><path fill="#E6E6E6" d="M1069.2-1529.2l9.4-9.4-4.2-4.2c-2.7 2.6-7.1 2.5-9.7-.2-2.7-2.6-2.8-7-.2-9.7l-4.2-4.3-9.4 9.4 18.3 18.4z"></path><path fill="#4D4D4D" d="M1079.3-1539.4l-4.2-4.2c-.4-.4-1-.4-1.4 0-2.3 2.2-6 2.1-8.2-.2-2.3-2.2-2.4-6-.2-8.3.4-.4.4-1 0-1.4l-4.3-4.2s-.1-.1-.2-.1-.1-.1-.2-.1-.2 0-.3-.1H1060c-.2 0-.4.1-.5.2l-9.4 9.4-18.9 18.9c-.4.4-.4 1 0 1.4l4.2 4.2c.4.4 1 .4 1.4 0 2.3-2.2 6.1-2.1 8.3.2 2.3 2.2 2.4 6 .2 8.3-.4.4-.4 1 0 1.4l4.2 4.2c.2.2.5.3.7.3s.5-.1.7-.3l14.8-14.8c.2 0 .3-.1.4-.2l4.2-4.2c.1-.1.1-.2.2-.3l8.7-8.7c.2-.2.3-.5.3-.8.1-.1 0-.4-.2-.6zm-19-16.2l2.9 2.9c-2.3 3.1-2 7.6.8 10.3 2.8 2.8 7.2 3.1 10.4.9l2.8 2.8-7.5 7.5-16.9-16.9 7.5-7.5zm-9.4 9.4l16.8 16.9-2.3 2.3-16.9-16.9 2.4-2.3zm-.6 34.4l-2.8-2.8c2.3-3.1 2-7.6-.8-10.3-2.8-2.8-7.2-3.1-10.4-.9l-2.8-2.8 9.8-9.8c0 .1.1.2.2.3l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4c-.1-.1-.2-.1-.3-.2l2.6-2.6 16.9 16.9-2.6 2.6c0-.2-.1-.3-.2-.4l-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4c.1.1.3.2.4.2l-10 9.8z"></path><circle fill="#2096FC" cx="1065.2" cy="-1522.3" r="11"></circle><path fill="#FFF" d="M1065.2-1510.3c-6.6 0-12-5.4-12-12s5.4-12 12-12 12 5.4 12 12-5.4 12-12 12zm0-22c-5.5 0-10 4.5-10 10s4.5 10 10 10 10-4.5 10-10-4.5-10-10-10z"></path><path fill="#FFF" d="M1071.3-1520.7h-1.1c-.6 0-1-.4-1-1s.4-1 1-1h1.1c.6 0 1 .4 1 1s-.4 1-1 1zM1060.4-1520.7h-1.1c-.6 0-1-.4-1-1s.4-1 1-1h1.1c.6 0 1 .4 1 1s-.4 1-1 1zM1065.9-1520.7h-1.1c-.6 0-1-.4-1-1s.4-1 1-1h1.1c.6 0 1 .4 1 1s-.4 1-1 1z"></path></g></svg>';61 }if( $tab=='answered_ticket'){62 echo '<svg id="svg_answered-ticket" viewBox="0 0 48.6 48.6" style="width: 40px"><g transform="translate(-1179 1558)"><path fill="#FFF" d="M1195.102-1543.74l4.242-4.243 18.385 18.384-4.243 4.243z"></path><path fill="#E6E6E6" d="M1217.2-1529.2l9.4-9.4-4.2-4.2c-2.7 2.6-7.1 2.5-9.7-.2-2.7-2.6-2.8-7-.2-9.7l-4.2-4.3-9.4 9.4 18.3 18.4z"></path><path fill="#4D4D4D" d="M1204.3-1525.7c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-5.4-5.4c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3z"></path><path fill="#4D4D4D" d="M1227.3-1539.4l-4.2-4.2c-.4-.4-1-.4-1.4 0-2.3 2.2-6 2.1-8.2-.2-2.3-2.2-2.4-6-.2-8.3.4-.4.4-1 0-1.4l-4.3-4.2s-.1-.1-.2-.1-.1-.1-.2-.1-.2 0-.3-.1H1208c-.2 0-.4.1-.5.2l-9.4 9.4-18.9 18.9c-.4.4-.4 1 0 1.4l4.2 4.2c.4.4 1 .4 1.4 0 2.3-2.2 6.1-2.1 8.3.2 2.3 2.2 2.4 6 .2 8.3-.4.4-.4 1 0 1.4l4.2 4.2c.2.2.5.3.7.3s.5-.1.7-.3l14.8-14.8c.2 0 .3-.1.4-.2l4.2-4.2c.1-.1.1-.2.2-.3l8.7-8.7c.2-.2.3-.5.3-.8.1-.1 0-.4-.2-.6zm-19-16.2l2.9 2.9c-2.3 3.1-2 7.6.8 10.3 2.8 2.8 7.2 3.1 10.4.9l2.8 2.8-7.5 7.5-16.9-16.9 7.5-7.5zm-9.4 9.4l16.8 16.9-2.3 2.3-16.9-16.9 2.4-2.3zm-.6 34.4l-2.8-2.8c2.3-3.1 2-7.6-.8-10.3-2.8-2.8-7.2-3.1-10.4-.9l-2.8-2.8 9.8-9.8c0 .1.1.2.2.3l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4c-.1-.1-.2-.1-.3-.2l2.6-2.6 16.9 16.9-2.6 2.6c0-.2-.1-.3-.2-.4l-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4c.1.1.3.2.4.2l-10 9.8z"></path><path fill="#9F3FE5" d="M1213.2-1533.3c6.1 0 11 4.9 11 11s-4.9 11-11 11-11-4.9-11-11 4.9-11 11-11z"></path><path fill="#FFF" d="M1213.2-1510.3c-6.6 0-12-5.4-12-12 0-3.2 1.2-6.2 3.5-8.5s5.3-3.5 8.5-3.5h.1c6.6 0 12 5.4 12 12s-5.5 12-12.1 12zm0-23v1c-2.7 0-5.2 1.1-7.1 2.9-1.9 1.9-2.9 4.4-2.9 7.1 0 5.5 4.5 10 10 10s10-4.5 10-10-4.5-10-10-10v-1z"></path><path fill="#FFF" d="M1212.4-1517.6c-.2 0-.4-.1-.6-.2l-2.9-2.3c-.4-.3-.5-1-.2-1.4.3-.4 1-.5 1.4-.2l2.1 1.7 4.1-5.3c.3-.4 1-.5 1.4-.2.4.3.5 1 .2 1.4l-4.7 6.1c-.2.2-.4.3-.7.4h-.1z"></path></g></svg>';63 }if( $tab=='closed_ticket'){64 echo '<svg id="svg_close-ticket" viewBox="0 0 48.6 48.6" style="width: 40px"><g transform="translate(-905 1558)"><path fill="#FFF" d="M921.104-1543.743l4.242-4.242 18.385 18.384-4.243 4.243z"></path><path fill="#E6E6E6" d="M943.2-1529.2l9.4-9.4-4.2-4.2c-2.7 2.6-7.1 2.5-9.7-.2-2.7-2.6-2.8-7-.2-9.7l-4.2-4.3-9.4 9.4 18.3 18.4z"></path><path fill="#4D4D4D" d="M930.3-1525.7c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-5.4-5.4c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3z"></path><path fill="#4D4D4D" d="M953.3-1539.4l-4.2-4.2c-.4-.4-1-.4-1.4 0-2.3 2.2-6 2.1-8.2-.2-2.3-2.2-2.4-6-.2-8.3.4-.4.4-1 0-1.4l-4.3-4.2s-.1-.1-.2-.1-.1-.1-.2-.1-.2 0-.3-.1H934c-.2 0-.4.1-.5.2l-9.4 9.4-18.9 18.9c-.4.4-.4 1 0 1.4l4.2 4.2c.4.4 1 .4 1.4 0 2.3-2.2 6.1-2.1 8.3.2 2.3 2.2 2.4 6 .2 8.3-.4.4-.4 1 0 1.4l4.2 4.2c.2.2.5.3.7.3s.5-.1.7-.3l14.8-14.8c.2 0 .3-.1.4-.2l4.2-4.2c.1-.1.1-.2.2-.3l8.7-8.7c.2-.2.3-.5.3-.8.1-.1 0-.4-.2-.6zm-19-16.2l2.9 2.9c-2.3 3.1-2 7.6.8 10.3 2.8 2.8 7.2 3.1 10.4.9l2.8 2.8-7.5 7.5-16.9-16.9 7.5-7.5zm-9.4 9.4l16.8 16.9-2.3 2.3-16.9-16.9 2.4-2.3zm-.6 34.4l-2.8-2.8c2.3-3.1 2-7.6-.8-10.3-2.8-2.8-7.2-3.1-10.4-.9l-2.8-2.8 9.8-9.8c0 .1.1.2.2.3l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4c-.1-.1-.2-.1-.3-.2l2.6-2.6 16.9 16.9-2.6 2.6c0-.2-.1-.3-.2-.4l-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4c.1.1.3.2.4.2l-10 9.8z"></path><circle fill="#2FBE35" cx="940.2" cy="-1522.3" r="11"></circle><path fill="#FFF" d="M940.2-1510.3c-6.6 0-12-5.4-12-12s5.4-12 12-12 12 5.4 12 12-5.4 12-12 12zm0-22c-5.5 0-10 4.5-10 10s4.5 10 10 10 10-4.5 10-10-4.5-10-10-10z"></path><path fill="#FFF" d="M943.8-1517.5h-7c-.6 0-1-.4-1-1v-7c0-.6.4-1 1-1h7c.6 0 1 .4 1 1v7c0 .6-.4 1-1 1zm-6-2h5v-5h-5v5z"></path></g></svg>';59 }if(esc_html($tab) =='process_ticket'){ 60 echo '<svg id="svg_doing-ticket" viewBox="0 0 48.6 48.6" style="width: 40px"><g transform="translate(-1031 1558)"><path fill="#FFF" d="M1047.103-1543.742l4.242-4.242 18.385 18.384-4.243 4.243z"></path><path fill="#4D4D4D" d="M1056.3-1525.7c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-5.4-5.4c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3z"></path><path fill="#E6E6E6" d="M1069.2-1529.2l9.4-9.4-4.2-4.2c-2.7 2.6-7.1 2.5-9.7-.2-2.7-2.6-2.8-7-.2-9.7l-4.2-4.3-9.4 9.4 18.3 18.4z"></path><path fill="#4D4D4D" d="M1079.3-1539.4l-4.2-4.2c-.4-.4-1-.4-1.4 0-2.3 2.2-6 2.1-8.2-.2-2.3-2.2-2.4-6-.2-8.3.4-.4.4-1 0-1.4l-4.3-4.2s-.1-.1-.2-.1-.1-.1-.2-.1-.2 0-.3-.1H1060c-.2 0-.4.1-.5.2l-9.4 9.4-18.9 18.9c-.4.4-.4 1 0 1.4l4.2 4.2c.4.4 1 .4 1.4 0 2.3-2.2 6.1-2.1 8.3.2 2.3 2.2 2.4 6 .2 8.3-.4.4-.4 1 0 1.4l4.2 4.2c.2.2.5.3.7.3s.5-.1.7-.3l14.8-14.8c.2 0 .3-.1.4-.2l4.2-4.2c.1-.1.1-.2.2-.3l8.7-8.7c.2-.2.3-.5.3-.8.1-.1 0-.4-.2-.6zm-19-16.2l2.9 2.9c-2.3 3.1-2 7.6.8 10.3 2.8 2.8 7.2 3.1 10.4.9l2.8 2.8-7.5 7.5-16.9-16.9 7.5-7.5zm-9.4 9.4l16.8 16.9-2.3 2.3-16.9-16.9 2.4-2.3zm-.6 34.4l-2.8-2.8c2.3-3.1 2-7.6-.8-10.3-2.8-2.8-7.2-3.1-10.4-.9l-2.8-2.8 9.8-9.8c0 .1.1.2.2.3l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4c-.1-.1-.2-.1-.3-.2l2.6-2.6 16.9 16.9-2.6 2.6c0-.2-.1-.3-.2-.4l-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4c.1.1.3.2.4.2l-10 9.8z"></path><circle fill="#2096FC" cx="1065.2" cy="-1522.3" r="11"></circle><path fill="#FFF" d="M1065.2-1510.3c-6.6 0-12-5.4-12-12s5.4-12 12-12 12 5.4 12 12-5.4 12-12 12zm0-22c-5.5 0-10 4.5-10 10s4.5 10 10 10 10-4.5 10-10-4.5-10-10-10z"></path><path fill="#FFF" d="M1071.3-1520.7h-1.1c-.6 0-1-.4-1-1s.4-1 1-1h1.1c.6 0 1 .4 1 1s-.4 1-1 1zM1060.4-1520.7h-1.1c-.6 0-1-.4-1-1s.4-1 1-1h1.1c.6 0 1 .4 1 1s-.4 1-1 1zM1065.9-1520.7h-1.1c-.6 0-1-.4-1-1s.4-1 1-1h1.1c.6 0 1 .4 1 1s-.4 1-1 1z"></path></g></svg>'; 61 }if(esc_html($tab) =='answered_ticket'){ 62 echo '<svg id="svg_answered-ticket" viewBox="0 0 48.6 48.6" style="width: 40px"><g transform="translate(-1179 1558)"><path fill="#FFF" d="M1195.102-1543.74l4.242-4.243 18.385 18.384-4.243 4.243z"></path><path fill="#E6E6E6" d="M1217.2-1529.2l9.4-9.4-4.2-4.2c-2.7 2.6-7.1 2.5-9.7-.2-2.7-2.6-2.8-7-.2-9.7l-4.2-4.3-9.4 9.4 18.3 18.4z"></path><path fill="#4D4D4D" d="M1204.3-1525.7c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-5.4-5.4c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3z"></path><path fill="#4D4D4D" d="M1227.3-1539.4l-4.2-4.2c-.4-.4-1-.4-1.4 0-2.3 2.2-6 2.1-8.2-.2-2.3-2.2-2.4-6-.2-8.3.4-.4.4-1 0-1.4l-4.3-4.2s-.1-.1-.2-.1-.1-.1-.2-.1-.2 0-.3-.1H1208c-.2 0-.4.1-.5.2l-9.4 9.4-18.9 18.9c-.4.4-.4 1 0 1.4l4.2 4.2c.4.4 1 .4 1.4 0 2.3-2.2 6.1-2.1 8.3.2 2.3 2.2 2.4 6 .2 8.3-.4.4-.4 1 0 1.4l4.2 4.2c.2.2.5.3.7.3s.5-.1.7-.3l14.8-14.8c.2 0 .3-.1.4-.2l4.2-4.2c.1-.1.1-.2.2-.3l8.7-8.7c.2-.2.3-.5.3-.8.1-.1 0-.4-.2-.6zm-19-16.2l2.9 2.9c-2.3 3.1-2 7.6.8 10.3 2.8 2.8 7.2 3.1 10.4.9l2.8 2.8-7.5 7.5-16.9-16.9 7.5-7.5zm-9.4 9.4l16.8 16.9-2.3 2.3-16.9-16.9 2.4-2.3zm-.6 34.4l-2.8-2.8c2.3-3.1 2-7.6-.8-10.3-2.8-2.8-7.2-3.1-10.4-.9l-2.8-2.8 9.8-9.8c0 .1.1.2.2.3l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4c-.1-.1-.2-.1-.3-.2l2.6-2.6 16.9 16.9-2.6 2.6c0-.2-.1-.3-.2-.4l-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4c.1.1.3.2.4.2l-10 9.8z"></path><path fill="#9F3FE5" d="M1213.2-1533.3c6.1 0 11 4.9 11 11s-4.9 11-11 11-11-4.9-11-11 4.9-11 11-11z"></path><path fill="#FFF" d="M1213.2-1510.3c-6.6 0-12-5.4-12-12 0-3.2 1.2-6.2 3.5-8.5s5.3-3.5 8.5-3.5h.1c6.6 0 12 5.4 12 12s-5.5 12-12.1 12zm0-23v1c-2.7 0-5.2 1.1-7.1 2.9-1.9 1.9-2.9 4.4-2.9 7.1 0 5.5 4.5 10 10 10s10-4.5 10-10-4.5-10-10-10v-1z"></path><path fill="#FFF" d="M1212.4-1517.6c-.2 0-.4-.1-.6-.2l-2.9-2.3c-.4-.3-.5-1-.2-1.4.3-.4 1-.5 1.4-.2l2.1 1.7 4.1-5.3c.3-.4 1-.5 1.4-.2.4.3.5 1 .2 1.4l-4.7 6.1c-.2.2-.4.3-.7.4h-.1z"></path></g></svg>' ; 63 }if(esc_html($tab) =='closed_ticket'){ 64 echo '<svg id="svg_close-ticket" viewBox="0 0 48.6 48.6" style="width: 40px"><g transform="translate(-905 1558)"><path fill="#FFF" d="M921.104-1543.743l4.242-4.242 18.385 18.384-4.243 4.243z"></path><path fill="#E6E6E6" d="M943.2-1529.2l9.4-9.4-4.2-4.2c-2.7 2.6-7.1 2.5-9.7-.2-2.7-2.6-2.8-7-.2-9.7l-4.2-4.3-9.4 9.4 18.3 18.4z"></path><path fill="#4D4D4D" d="M930.3-1525.7c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-5.4-5.4c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3z"></path><path fill="#4D4D4D" d="M953.3-1539.4l-4.2-4.2c-.4-.4-1-.4-1.4 0-2.3 2.2-6 2.1-8.2-.2-2.3-2.2-2.4-6-.2-8.3.4-.4.4-1 0-1.4l-4.3-4.2s-.1-.1-.2-.1-.1-.1-.2-.1-.2 0-.3-.1H934c-.2 0-.4.1-.5.2l-9.4 9.4-18.9 18.9c-.4.4-.4 1 0 1.4l4.2 4.2c.4.4 1 .4 1.4 0 2.3-2.2 6.1-2.1 8.3.2 2.3 2.2 2.4 6 .2 8.3-.4.4-.4 1 0 1.4l4.2 4.2c.2.2.5.3.7.3s.5-.1.7-.3l14.8-14.8c.2 0 .3-.1.4-.2l4.2-4.2c.1-.1.1-.2.2-.3l8.7-8.7c.2-.2.3-.5.3-.8.1-.1 0-.4-.2-.6zm-19-16.2l2.9 2.9c-2.3 3.1-2 7.6.8 10.3 2.8 2.8 7.2 3.1 10.4.9l2.8 2.8-7.5 7.5-16.9-16.9 7.5-7.5zm-9.4 9.4l16.8 16.9-2.3 2.3-16.9-16.9 2.4-2.3zm-.6 34.4l-2.8-2.8c2.3-3.1 2-7.6-.8-10.3-2.8-2.8-7.2-3.1-10.4-.9l-2.8-2.8 9.8-9.8c0 .1.1.2.2.3l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4c-.1-.1-.2-.1-.3-.2l2.6-2.6 16.9 16.9-2.6 2.6c0-.2-.1-.3-.2-.4l-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4c.1.1.3.2.4.2l-10 9.8z"></path><circle fill="#2FBE35" cx="940.2" cy="-1522.3" r="11"></circle><path fill="#FFF" d="M940.2-1510.3c-6.6 0-12-5.4-12-12s5.4-12 12-12 12 5.4 12 12-5.4 12-12 12zm0-22c-5.5 0-10 4.5-10 10s4.5 10 10 10 10-4.5 10-10-4.5-10-10-10z"></path><path fill="#FFF" d="M943.8-1517.5h-7c-.6 0-1-.4-1-1v-7c0-.6.4-1 1-1h7c.6 0 1 .4 1 1v7c0 .6-.4 1-1 1zm-6-2h5v-5h-5v5z"></path></g></svg>' ; 65 65 } ?> 66 67 <span><?php echo esc_html($title) ?></span></a></li> 66 <span><?php echo esc_html($title) ?></span></a></li> 68 67 <?php endforeach; ?> 69 68 <li class="search_del"><a> … … 123 122 </g> 124 123 </svg> 125 126 124 </i> 127 125 … … 138 136 </button> 139 137 <?php } ?> 140 141 142 138 </div> 143 139 </a></li> … … 148 144 <div class="ajax_search"> 149 145 <input class="form-control" id="serch_support_wpy" type="text" 150 placeholder="<?php echo __('Enter ID or subject ticket', 'nirweb-support') ?>">146 placeholder="<?php echo esc_html__('Enter ID or subject ticket', 'nirweb-support') ?>"> 151 147 <span class="ajax_search_loading_ticket ajxtd"></span> 152 148 <ul></ul> 153 149 </div> 154 150 155 <?php include NIRWEB_SUPPORT_INC_ADMIN_THEMES_TICKET. $curent_tab.'.php'?>151 <?php include NIRWEB_SUPPORT_INC_ADMIN_THEMES_TICKET.esc_html($curent_tab).'.php'?> 156 152 -
nirweb-support/trunk/inc/admin/themes/new_ticket.php
r2707344 r2708596 13 13 <th> <input type="checkbox" id="selectAll" /></th> 14 14 <th>ID</th> 15 <th><?php echo __('Status', 'nirweb-support')?></th>16 <th><?php echo __('Subject', 'nirweb-support')?></th>17 <th><?php echo __('Sender', 'nirweb-support')?></th>18 <th><?php echo __('Department', 'nirweb-support')?></th>19 <th><?php echo __('Priority', 'nirweb-support')?></th>20 <th><?php echo __('Product', 'nirweb-support')?></th>21 <th><?php echo __('Answer', 'nirweb-support')?></th>15 <th><?php echo esc_html__('Status', 'nirweb-support')?></th> 16 <th><?php echo esc_html__('Subject', 'nirweb-support')?></th> 17 <th><?php echo esc_html__('Sender', 'nirweb-support')?></th> 18 <th><?php echo esc_html__('Department', 'nirweb-support')?></th> 19 <th><?php echo esc_html__('Priority', 'nirweb-support')?></th> 20 <th><?php echo esc_html__('Product', 'nirweb-support')?></th> 21 <th><?php echo esc_html__('Answer', 'nirweb-support')?></th> 22 22 </tr> 23 23 </thead> 24 24 <tbody> 25 <?php foreach ($tickets[0] as $ticket): 26 $date = strtotime($ticket->date_qustion); 27 $date = wp_date( 'Y-m-d H:i:s' , $date); 28 ?> 25 <?php foreach ($tickets[0] as $ticket): ?> 29 26 <tr style="border: solid 1px #ccc"> 30 27 <th><input type="checkbox" id="frm_check_items" name="frm_check_items[]" value="<?php echo esc_html($ticket->ticket_id) ?>"></th> … … 44 41 <th></th> 45 42 <th>ID</th> 46 <th><?php echo __('Status', 'nirweb-support')?></th>47 <th><?php echo __('Subject', 'nirweb-support')?></th>48 <th><?php echo __('Sender', 'nirweb-support')?></th>49 <th><?php echo __('Department', 'nirweb-support')?></th>50 <th><?php echo __('Priority', 'nirweb-support')?></th>51 <th><?php echo __('Product', 'nirweb-support')?></th>52 <th><?php echo __('Answer', 'nirweb-support')?></th>43 <th><?php echo esc_html__('Status', 'nirweb-support')?></th> 44 <th><?php echo esc_html__('Subject', 'nirweb-support')?></th> 45 <th><?php echo esc_html__('Sender', 'nirweb-support')?></th> 46 <th><?php echo esc_html__('Department', 'nirweb-support')?></th> 47 <th><?php echo esc_html__('Priority', 'nirweb-support')?></th> 48 <th><?php echo esc_html__('Product', 'nirweb-support')?></th> 49 <th><?php echo esc_html__('Answer', 'nirweb-support')?></th> 53 50 54 51 </tr> -
nirweb-support/trunk/inc/admin/themes/process_ticket.php
r2707344 r2708596 13 13 <th> <input type="checkbox" id="selectAll" /></th> 14 14 <th>ID</th> 15 <th><?php echo __('Status', 'nirweb-support')?></th>16 <th><?php echo __('Subject', 'nirweb-support')?></th>17 <th><?php echo __('Sender', 'nirweb-support')?></th>18 <th><?php echo __('Department', 'nirweb-support')?></th>19 <th><?php echo __('Priority', 'nirweb-support')?></th>20 <th><?php echo __('Product', 'nirweb-support')?></th>21 <th><?php echo __('Answer', 'nirweb-support')?></th>15 <th><?php echo esc_html__('Status', 'nirweb-support')?></th> 16 <th><?php echo esc_html__('Subject', 'nirweb-support')?></th> 17 <th><?php echo esc_html__('Sender', 'nirweb-support')?></th> 18 <th><?php echo esc_html__('Department', 'nirweb-support')?></th> 19 <th><?php echo esc_html__('Priority', 'nirweb-support')?></th> 20 <th><?php echo esc_html__('Product', 'nirweb-support')?></th> 21 <th><?php echo esc_html__('Answer', 'nirweb-support')?></th> 22 22 </tr> 23 23 </thead> … … 26 26 <th></th> 27 27 <th>ID</th> 28 <th><?php echo __('Status', 'nirweb-support')?></th>29 <th><?php echo __('Subject', 'nirweb-support')?></th>30 <th><?php echo __('Sender', 'nirweb-support')?></th>31 <th><?php echo __('Department', 'nirweb-support')?></th>32 <th><?php echo __('Priority', 'nirweb-support')?></th>33 <th><?php echo __('Product', 'nirweb-support')?></th>34 <th><?php echo __('Answer', 'nirweb-support')?></th>28 <th><?php echo esc_html__('Status', 'nirweb-support')?></th> 29 <th><?php echo esc_html__('Subject', 'nirweb-support')?></th> 30 <th><?php echo esc_html__('Sender', 'nirweb-support')?></th> 31 <th><?php echo esc_html__('Department', 'nirweb-support')?></th> 32 <th><?php echo esc_html__('Priority', 'nirweb-support')?></th> 33 <th><?php echo esc_html__('Product', 'nirweb-support')?></th> 34 <th><?php echo esc_html__('Answer', 'nirweb-support')?></th> 35 35 36 36 </tr> … … 38 38 39 39 <tbody> 40 <?php foreach ($tickets[0] as $ticket): 41 $date = strtotime($ticket->date_qustion); 42 $date = wp_date( 'Y-m-d H:i:s' , $date); 43 ?> 40 <?php foreach ($tickets[0] as $ticket): ?> 44 41 <tr style="border: solid 1px #ccc"> 45 42 <th><input type="checkbox" id="frm_check_items" name="frm_check_items[]" value="<?php echo esc_html($ticket->ticket_id)?>"></th> … … 56 53 </tbody> 57 54 </table> 58 59 55 </form> 60 56 <div class="nirweb_ticket_pagination"> <?php echo esc_html($tickets[1]) ?> </div> -
nirweb-support/trunk/inc/admin/themes/send_ticket.php
r2707344 r2708596 1 <h1 class="title_page_wpyt"><?php echo __('Send ticket','nirweb-support') ?></h1> 2 <!--~~~~~~~START Container~~~~~~~ --> 3 <div class="container flex justify-content-sb"> 4 <!--Right Container --> 5 <div class="nirweb_ticket_right_container_send_ticket"> 6 <!--Form Send ticket--> 7 <form action="" id="send_form_ticket" name="send_form_ticket[]" method="post" enctype="multipart/form-data"> 8 <!--Select Receiver--> 9 <div class="nirweb_ticket_frm_send_ticket_select_receiver flex aline-c"> 10 <!--Receiver Type--> 11 <div class="nirweb_ticket_frm_type_receiver flex flexd-cul halft_wpyt"> 12 13 <label><?php echo __('Receiver type', 'nirweb-support') ?> *</label> 1 <h1 class="title_page_wpyt"><?php echo esc_html__('Send ticket','nirweb-support') ?></h1> 2 <div class="container flex justify-content-sb"> 3 <div class="nirweb_ticket_right_container_send_ticket"> 4 <form action="" id="send_form_ticket" name="send_form_ticket[]" method="post" enctype="multipart/form-data"> 5 <div class="nirweb_ticket_frm_send_ticket_select_receiver flex aline-c"> 6 <div class="nirweb_ticket_frm_type_receiver flex flexd-cul halft_wpyt"> 7 <label><?php echo esc_html__('Receiver type', 'nirweb-support') ?> *</label> 14 8 <select id="nirweb_ticket_frm_type_receiver" name="nirweb_ticket_frm_type_receiver" class="wpyt_select" required aria-required="true" > 15 <option value="0"><?php echo __('Select Receiver type', 'nirweb-support') ?></option>16 <option value="1"><?php echo __('User', 'nirweb-support') ?></option>17 <option value="2"> <?php echo __('Suport', 'nirweb-support') ?></option>9 <option value="0"><?php echo esc_html__('Select Receiver type', 'nirweb-support') ?></option> 10 <option value="1"><?php echo esc_html__('User', 'nirweb-support') ?></option> 11 <option value="2"> <?php echo esc_html__('Suport', 'nirweb-support') ?></option> 18 12 </select> 19 13 </div> 20 14 <!-- List Receiver Final--> 21 15 <div class="nirweb_ticket_frm_final_items_receiver flex flexd-cul halft_wpyt sel2"> 22 <label><?php echo __('Receiver', 'nirweb-support') ?> *</label>16 <label><?php echo esc_html__('Receiver', 'nirweb-support') ?> *</label> 23 17 <select id="selUser" class="wpyt_select" name="selUser" aria-required="true" > 24 18 <?php if (isset($info_ticket->id_receiver)) { … … 39 33 </div> 40 34 </div> 41 <!--Enter Subject --> 42 <label for="nirweb_ticket_frm_subject_send_ticket"><?php echo __('Subject', 'nirweb-support') ?> *</label> 43 <input type="text" id="nirweb_ticket_frm_subject_send_ticket" class="wpyt_input" 44 name="nirweb_ticket_frm_subject_send_ticket" 45 placeholder="<?php echo __('Enter Subject', 'nirweb-support') ?>" > 46 <!--Write Content Ticket --> 47 <div class="box_wpyt flex justify-content-sb"> 35 <label for="nirweb_ticket_frm_subject_send_ticket"><?php echo esc_html__('Subject', 'nirweb-support') ?> *</label> 36 <input type="text" id="nirweb_ticket_frm_subject_send_ticket" class="wpyt_input" name="nirweb_ticket_frm_subject_send_ticket" 37 placeholder="<?php echo esc_html__('Enter Subject', 'nirweb-support') ?>" > 38 <div class="box_wpyt flex justify-content-sb"> 48 39 <div class="halft_wpyt"> 49 <label><?php echo __('Department', 'nirweb-support') ?></label>40 <label><?php echo esc_html__('Department', 'nirweb-support') ?></label> 50 41 <select class="wpyt_select" id="nirweb_ticket_frm_department_send_ticket" name="nirweb_ticket_frm_department_send_ticket"> 51 <option value="0"><?php echo __('Select Department', 'nirweb-support') ?></option>42 <option value="0"><?php echo esc_html__('Select Department', 'nirweb-support') ?></option> 52 43 <?php foreach ($departments as $department): ?> 53 44 <option value="<?php echo esc_html($department->department_id) ?>"><?php echo esc_html($department->name) ?></option> … … 56 47 </div> 57 48 <div class="halft_wpyt"> 58 <label><?php echo __('Priority', 'nirweb-support') ?></label>49 <label><?php echo esc_html__('Priority', 'nirweb-support') ?></label> 59 50 <select class="wpyt_select" id="nirweb_ticket_frm_priority_send_ticket" name="nirweb_ticket_frm_priority_send_ticket"> 60 <option value="0"><?php echo __('Select Priority', 'nirweb-support') ?></option>51 <option value="0"><?php echo esc_html__('Select Priority', 'nirweb-support') ?></option> 61 52 <?php $list_priority = nirweb_ticket_get_priority(); 62 53 foreach ($list_priority as $priority) { ?> … … 68 59 <div class="box_wpyt flex justify-content-sb"> 69 60 <div class="halft_wpyt"> 70 <label><?php echo __('WebSite', 'nirweb-support') ?></label>61 <label><?php echo esc_html__('WebSite', 'nirweb-support') ?></label> 71 62 <input type="text" class="wpyt_input" name="nirweb_ticket_frm_website_send_ticket" 72 63 id="nirweb_ticket_frm_website_send_ticket"> … … 74 65 <?php if (is_plugin_active('woocommerce/woocommerce.php')) { ?> 75 66 <div class="halft_wpyt select_product_wpyt sel3"> 76 <label><?php echo __('Product', 'nirweb-support') ?></label>67 <label><?php echo esc_html__('Product', 'nirweb-support') ?></label> 77 68 <select id="nirweb_ticket_frm_product_send_ticket" class="wpyt_select" name="nirweb_ticket_frm_product_send_ticket"> 78 <option value="-1"><?php echo __('Select Product', 'nirweb-support') ?></option>69 <option value="-1"><?php echo esc_html__('Select Product', 'nirweb-support') ?></option> 79 70 <?php $args = array('post_type' => 'product',); 80 71 $loop = new WP_Query($args); 81 72 while ($loop->have_posts()) : $loop->the_post(); 82 73 global $product; 83 echo '<option value="' . $product->get_ID() . '" >' . get_the_title() . '</option>';74 echo '<option value="' .esc_html($product->get_ID()) . '" >' . esc_html(get_the_title()) . '</option>'; 84 75 endwhile; 85 76 wp_reset_query(); ?> … … 89 80 <?php }elseif (is_plugin_active('easy-digital-downloads/easy-digital-downloads.php')){ ?> 90 81 <div class="halft_wpyt select_product_wpyt sel3"> 91 <label><?php echo __('Product', 'nirweb-support') ?></label>82 <label><?php echo esc_html__('Product', 'nirweb-support') ?></label> 92 83 <select id="nirweb_ticket_frm_product_send_ticket" class="wpyt_select" name="nirweb_ticket_frm_product_send_ticket"> 93 <option value="-1"><?php echo __('Select Product', 'nirweb-support') ?></option>84 <option value="-1"><?php echo esc_html__('Select Product', 'nirweb-support') ?></option> 94 85 <?php $args = array('post_type' => 'download',); 95 86 $loop = new WP_Query($args); … … 103 94 </div> 104 95 <div class="box_wpyt"> 105 <label for="nirweb_ticket_frm_custom_editor"><?php echo __('Message', 'nirweb-support') ?> *</label>96 <label for="nirweb_ticket_frm_custom_editor"><?php echo esc_html__('Message', 'nirweb-support') ?> *</label> 106 97 <?php 107 98 $content = ''; … … 111 102 </div> 112 103 <div class="file__wpyt"> 113 <label><?php echo __('Attachment File', 'nirweb-support') ?></label>104 <label><?php echo esc_html__('Attachment File', 'nirweb-support') ?></label> 114 105 115 106 <input type="text" id="nirweb_ticket_frm_file_send_ticket" name="nirweb_ticket_frm_file_send_ticket" 116 107 class="regular-text process_custom_images"> 117 <input id="plupload-browse-button" name="misha_upload_image_button" type="button" value="<?php echo __('Select Image', 'nirweb-support') ?>"108 <input id="plupload-browse-button" name="misha_upload_image_button" type="button" value="<?php echo esc_html__('Select Image', 'nirweb-support') ?>" 118 109 class="button wpyt_upload_image_button" style=" position: relative; z-index: 1;"> 119 110 </div> 120 111 <div class="send__form"> 121 <button type="submit" class="btn-send btn_send_ticket" data-name="nirweb_ticket_frm_btn_send_ticket"><?php echo __('Send Ticket', 'nirweb-support') ?></button>112 <button type="submit" class="btn-send btn_send_ticket" data-name="nirweb_ticket_frm_btn_send_ticket"><?php echo esc_html__('Send Ticket', 'nirweb-support') ?></button> 122 113 </div> 123 114 </div> … … 126 117 <div class="nirweb_ticket_left_sidebar_send_ticket"> 127 118 <div class="nirweb_ticket_left_sidebar_header"> 128 <h4><?php echo __('Status', 'nirweb-support') ?></h4>119 <h4><?php echo esc_html__('Status', 'nirweb-support') ?></h4> 129 120 <span class="arrow_wpyt cret flex aline-c"></span> 130 121 </div> 131 122 <div class="nirweb_ticket_left_sidebar_content"> 132 <label><?php echo __('Select Status', 'nirweb-support') ?></label>123 <label><?php echo esc_html__('Select Status', 'nirweb-support') ?></label> 133 124 <select id="nirweb_ticket_frm_status_send_ticket" class="wpyt_select" name="nirweb_ticket_frm_status_send_ticket"> 134 125 <?php … … 143 134 <div class="nirweb_ticket_left_sidebar_send_ticket"> 144 135 <div class="nirweb_ticket_left_sidebar_header"> 145 <h4><?php echo __('Notification', 'nirweb-support') ?></h4>136 <h4><?php echo esc_html__('Notification', 'nirweb-support') ?></h4> 146 137 <span class="arrow_wpyt cret"></span> 147 138 </div> 148 139 <div class="nirweb_ticket_left_sidebar_content"> 149 <label><?php echo __('Select Type Notification', 'nirweb-support') ?></label>140 <label><?php echo esc_html__('Select Type Notification', 'nirweb-support') ?></label> 150 141 <div class="arow"> 151 142 <input id="chk_email" name="chk_email" type="checkbox"> 152 <label><?php echo __('Send Email To User', 'nirweb-support') ?></label>143 <label><?php echo esc_html__('Send Email To User', 'nirweb-support') ?></label> 153 144 </div> 154 145 </div> -
nirweb-support/trunk/inc/user/functions/ajax_user_send_answer.php
r2707344 r2708596 3 3 function user_wpyar_answer_ticket() 4 4 { 5 5 6 global $wpdb; 6 7 if ( $_FILES ) { … … 30 31 'time_answer' => current_time("Y-m-d H:i:s"), 31 32 'text' => isset($_POST['user_answer']) ? sanitize_textarea_field(wpautop($_POST['user_answer'])) : '', 32 'attach_url' => esc_url($url_file),33 'attach_url' => sanitize_url(esc_url_raw($url_file)), 33 34 'ticket_id' => isset($_POST['tik_id']) ? sanitize_text_field( $_POST['tik_id'] ) : ''); 34 35 if(sanitize_text_field($_POST['user_answer']) or $url_file){ … … 39 40 $wpdb->update($wpdb->prefix.'nirweb_ticket_ticket',array( 40 41 'status' => sanitize_text_field($status), 41 'time_update' => $time,42 ),array( 'ticket_id' => intval(sanitize_text_field($_POST['tik_id']))));42 'time_update' => sanitize_text_field($time), 43 ),array( 'ticket_id' => sanitize_text_field(intval($_POST['tik_id'])))); 43 44 if($attach_id){ 44 45 global $wpdb; 45 46 $wpyar_user_upload=array( 46 47 'user_id' => get_current_user_id(), 47 'url_file' => $url_file,48 'file_id' => $attach_id,48 'url_file' => sanitize_url(esc_url_raw($url_file)), 49 'file_id' => sanitize_text_field($attach_id), 49 50 'time_upload' => current_time("Y-m-d H:i:s") 50 51 ); 51 52 $wpdb->insert($wpdb->prefix.'nirweb_ticket_ticket_user_upload',$wpyar_user_upload); 52 53 } 54 55 53 56 //----------- Start Mail Department User 54 57 $wpytik = get_option('nirweb_ticket_perfix'); 55 58 if( $wpytik['active_send_mail_to_poshtiban']=='1'){ 56 59 $user_poshtiban = get_user_by('id',intval(sanitize_text_field($_POST['id_user']))); 57 $user_poshtiban = $user_poshtiban->user_email;60 $user_poshtiban =sanitize_text_field($user_poshtiban->user_email); 58 61 $ticket_id=sanitize_text_field($_POST['tik_id']); 59 62 $ticket_title= sanitize_text_field($_POST['subject']); 60 63 $name_poshtiban = get_user_by('id', intval(sanitize_text_field($_POST['id_user'] ))); 61 $ticket_poshtiban = $name_poshtiban->user_nicename;64 $ticket_poshtiban = sanitize_text_field($name_poshtiban->user_nicename); 62 65 $ticket_dep = sanitize_text_field($_POST['dep_name']); 63 66 $ticket_pri = sanitize_text_field($_POST['priority_name']); 64 67 $search = ['{{ticket_id}}','{{ticket_title}}','{{ticket_poshtiban}}','{{ticket_dep}}','{{ticket_pri}}','{{ticket_stu}}']; 65 $replace = [ $ticket_id,$ticket_title,$ticket_poshtiban,$ticket_dep,$ticket_pri , __('open', 'nirweb-support') ];68 $replace = [ $ticket_id,$ticket_title,$ticket_poshtiban,$ticket_dep,$ticket_pri ,esc_html__('new', 'nirweb-support') ]; 66 69 $to = $user_poshtiban; 67 70 $headers = array('Content-Type: text/html; charset=UTF-8'); 68 71 $subject = $wpytik['oposhtiban_tab_wpyarticket']['subject_mail_poshtiban_answer']; 69 72 $body = wpautop(str_replace($search, $replace, $wpytik['oposhtiban_tab_wpyarticket']['poshtiban_text_email_send_answer'])); 70 wp_mail( $to, $subject, $body, $headers );73 wp_mail( esc_html($to), esc_html($subject), esc_html($body), $headers ); 71 74 } 72 75 } 76 73 77 } 74 78 75 79 if (!function_exists('func_list_answer_ajax_user')) { 76 80 function func_list_answer_ajax_user(){ 81 77 82 $ticket_id = sanitize_text_field($_POST['tik_id']); 78 83 global $wpdb; … … 80 85 FROM {$wpdb->prefix}nirweb_ticket_ticket_answered answered JOIN {$wpdb->prefix}users users ON user_id=ID 81 86 WHERE ticket_id=$ticket_id ORDER BY answer_id ASC"); 87 88 89 82 90 foreach($process_answer_list as $row): 83 91 $user=get_userdata( $row->user_id); 84 $role = $user->roles;92 $role =$user->roles; 85 93 if(in_array ('user_support', $role) or in_array ('administrator', $role)){ 86 94 $cls ='user_support_wpyar'; … … 95 103 <?php if ($row->attach_url){ ?> 96 104 <p class="file_atach_url"> 97 <a href="<?php echo esc_url ($row->attach_url) ?>" target="_blank">98 <?php echo __('show attachment file', 'nirweb-support') ?>105 <a href="<?php echo esc_url_raw($row->attach_url) ?>" target="_blank"> 106 <?php echo esc_html__('show attachment file', 'nirweb-support') ?> 99 107 </a> 100 108 </p> … … 103 111 <div class="head_answer"> 104 112 <span class="name"> 105 <?php echo $row->display_name?>113 <?php echo esc_html( $row->display_name) ?> 106 114 </span> 107 115 <?php if(in_array ('user_support', $role)){ ?> 108 116 <span class="time"> 109 <?php echo __('Hour', 'nirweb-support') ?>110 <?php echo $date = date( 'H:i:s' , strtotime($row->time_answer)); ?>117 <?php echo esc_html__('Hour', 'nirweb-support') ?> 118 <?php echo esc_html( date( 'H:i:s' , strtotime($row->time_answer))); ?> 111 119 </span> 112 120 <span class="date"> 113 <?php echo __('Date :', 'nirweb-support') ?>114 <?php echo wp_date('d F Y' , strtotime($row->time_answer)) ?>121 <?php echo esc_html__('Date :', 'nirweb-support') ?> 122 <?php echo esc_html(wp_date('d F Y' , strtotime($row->time_answer))) ?> 115 123 </span> 116 124 <?php } else { ?> 117 125 <span class="date"> 118 <?php echo __('Date :', 'nirweb-support') ?>119 <?php echo wp_date('d F Y' , strtotime($row->time_answer))?>126 <?php echo esc_html__('Date :', 'nirweb-support') ?> 127 <?php echo esc_html(wp_date('d F Y' , strtotime($row->time_answer))) ?> 120 128 </span> 121 129 <span class="time"> 122 <?php echo __('Hour', 'nirweb-support') ?>123 <?php echo $date = date( 'H:i:s' , strtotime($row->time_answer)); ?>130 <?php echo esc_html__('Hour', 'nirweb-support') ?> 131 <?php echo esc_html( date( 'H:i:s' , strtotime($row->time_answer))); ?> 124 132 </span> 125 133 <?php } ?> … … 128 136 </li> 129 137 <?php endforeach; 138 130 139 exit(); 131 140 } -
nirweb-support/trunk/inc/user/functions/ajax_user_send_tiket.php
r2707344 r2708596 1 1 <?php 2 2 if (!function_exists('func_user_send_tiket')) { 3 function func_user_send_tiket(){ 3 function func_user_send_tiket() 4 { 4 5 global $wpdb; 5 6 7 if (sizeof( $_FILES) >0) {8 $accsses_file = explode(",",trim(wpyar_ticket['mojaz_file_upload_user_wpyar']));9 if ( $_FILES['updoc']['type'] =='text/javascript' || $_FILES['updoc']['type'] == 'application/octet-stream' ){6 7 8 if (sizeof($_FILES) > 0) { 9 $accsses_file = explode(",", trim(wpyar_ticket['mojaz_file_upload_user_wpyar'])); 10 if ($_FILES['updoc']['type'] == 'text/javascript' || $_FILES['updoc']['type'] == 'application/octet-stream') { 10 11 echo 'error_valid_type'; 11 12 exit; 12 13 } 13 14 15 require_once(ABSPATH . "wp-admin" . '/includes/image.php');16 require_once(ABSPATH . "wp-admin" . '/includes/file.php');17 require_once(ABSPATH . "wp-admin" . '/includes/media.php');18 $file_handler = 'updoc';19 $attach_id = media_handle_upload($file_handler,$post_id);20 $url_file = wp_get_attachment_url( $attach_id );21 22 }else{23 $url_file='';24 }25 14 26 15 27 $frm_ary_elements=array( 28 'sender_id' => get_current_user_id(), 29 'id_receiver' => sanitize_text_field($_POST['resived_id']), 30 'receiver_type' =>2, 31 'subject' => sanitize_text_field($_POST['subject']), 32 'content' => sanitize_textarea_field($_POST['content']), 33 'department' => isset($_POST['department'])?intval(sanitize_text_field($_POST['department'])):'', 34 'priority' => sanitize_text_field(intval($_POST['priority'])), 35 'website' => isset($_POST['website']) ? sanitize_text_field($_POST['website']) : '', 36 'product' => isset($_POST['product']) ? intval(sanitize_text_field($_POST['product'])) : '', 37 'support_id' => isset($_POST['resived_id']) ? sanitize_text_field($_POST['resived_id']) : '', 38 'status' => 1, 39 'file_url' => $url_file, 40 'date_qustion' => current_time("Y-m-d H:i:s"), 41 'time_update' => current_time("Y-m-d H:i:s") 42 ); 43 $wpdb->insert($wpdb->prefix.'nirweb_ticket_ticket',$frm_ary_elements); 44 $ticket_id=$wpdb->insert_id; 45 if($attach_id){ 46 $wpyar_user_upload=array( 47 'user_id' => get_current_user_id(), 48 'url_file' => $url_file, 49 'file_id' => $attach_id, 50 'time_upload' => current_time("Y-m-d H:i:s") 16 require_once(ABSPATH . "wp-admin" . '/includes/image.php'); 17 require_once(ABSPATH . "wp-admin" . '/includes/file.php'); 18 require_once(ABSPATH . "wp-admin" . '/includes/media.php'); 19 $file_handler = 'updoc'; 20 $attach_id = media_handle_upload($file_handler, $post_id); 21 $url_file = wp_get_attachment_url($attach_id); 22 23 } else { 24 $url_file = ''; 25 } 26 27 $frm_ary_elements = array( 28 'sender_id' => get_current_user_id(), 29 'id_receiver' => sanitize_text_field($_POST['resived_id']), 30 'receiver_type' => 2, 31 'subject' => sanitize_text_field($_POST['subject']), 32 'content' => sanitize_textarea_field($_POST['content']), 33 'department' => isset($_POST['department']) ? intval(sanitize_text_field($_POST['department'])) : '', 34 'priority' => sanitize_text_field(intval($_POST['priority'])), 35 'website' => isset($_POST['website']) ? sanitize_text_field($_POST['website']) : '', 36 'product' => isset($_POST['product']) ? intval(sanitize_text_field($_POST['product'])) : '', 37 'support_id' => isset($_POST['resived_id']) ? sanitize_text_field($_POST['resived_id']) : '', 38 'status' => 1, 39 'file_url' => sanitize_url(esc_url_raw($url_file)), 40 'date_qustion' => current_time("Y-m-d H:i:s"), 41 'time_update' => current_time("Y-m-d H:i:s") 51 42 ); 43 $wpdb->insert($wpdb->prefix . 'nirweb_ticket_ticket', $frm_ary_elements); 44 $ticket_id = $wpdb->insert_id; 45 if ($attach_id) { 46 $wpyar_user_upload = array( 47 'user_id' => get_current_user_id(), 48 'url_file' => sanitize_url(esc_url_raw($url_file)), 49 'file_id' => sanitize_text_field($attach_id), 50 'time_upload' => current_time("Y-m-d H:i:s") 51 ); 52 52 53 $wpdb->insert($wpdb->prefix.'nirweb_ticket_ticket_user_upload',$wpyar_user_upload); 54 } 53 $wpdb->insert($wpdb->prefix . 'nirweb_ticket_ticket_user_upload', $wpyar_user_upload); 54 var_dump($wpdb->last_error); 55 exit; 56 } 55 57 56 58 57 //----------- Information Send Mail58 59 if( wpyar_ticket['active_send_mail_to_poshtiban']=='1' or wpyar_ticket['active_send_mail_to_user']=='1' ){60 $ticket_title= sanitize_text_field($_POST['subject']);61 $name_poshtiban = get_user_by('id', intval(sanitize_text_field($_POST['resived_id'])));62 $ticket_poshtiban = $name_poshtiban->display_name;63 $ticket_dep = sanitize_text_field($_POST['dep_name']);64 $ticket_pri = sanitize_text_field($_POST['priority_name']);65 $search = ['{{ticket_id}}','{{ticket_title}}','{{ticket_poshtiban}}','{{ticket_dep}}','{{ticket_pri}}','{{ticket_stu}}'];66 $replace = [ $ticket_id,$ticket_title,$ticket_poshtiban,$ticket_dep,$ticket_pri ,__('open', 'nirweb-support') ];67 }59 //----------- Information Send Mail 60 61 if (wpyar_ticket['active_send_mail_to_poshtiban'] == '1' or wpyar_ticket['active_send_mail_to_user'] == '1') { 62 $ticket_title = sanitize_text_field($_POST['subject']); 63 $name_poshtiban = get_user_by('id', intval(sanitize_text_field($_POST['resived_id']))); 64 $ticket_poshtiban = sanitize_text_field($name_poshtiban->display_name); 65 $ticket_dep = sanitize_text_field($_POST['dep_name']); 66 $ticket_pri = sanitize_text_field($_POST['priority_name']); 67 $search = ['{{ticket_id}}', '{{ticket_title}}', '{{ticket_poshtiban}}', '{{ticket_dep}}', '{{ticket_pri}}', '{{ticket_stu}}']; 68 $replace = [$ticket_id, $ticket_title, $ticket_poshtiban, $ticket_dep, $ticket_pri, __('open', 'nirweb-support')]; 69 } 68 70 69 71 //----------- Start Mail Department User 70 if(wpyar_ticket['active_send_mail_to_poshtiban'] == '1'){71 $user_poshtiban = get_user_by('id', intval(sanitize_text_field($_POST['resived_id'])));72 $user_poshtiban =$user_poshtiban->user_email;73 $subject = wpyar_ticket['oposhtiban_tab_wpyarticket']['subject_mail_poshtiban_new'];74 $body = wpautop(str_replace($search, $replace, wpyar_ticket['oposhtiban_tab_wpyarticket']['poshtiban_text_email_send']));75 $to = $user_poshtiban;76 $headers = array('Content-Type: text/html; charset=UTF-8');77 wp_mail( $to, $subject, $body, $headers);78 }72 if (wpyar_ticket['active_send_mail_to_poshtiban'] == '1') { 73 $user_poshtiban = get_user_by('id', intval(sanitize_text_field($_POST['resived_id']))); 74 $user_poshtiban = $user_poshtiban->user_email; 75 $subject = wpyar_ticket['oposhtiban_tab_wpyarticket']['subject_mail_poshtiban_new']; 76 $body = wpautop(str_replace($search, $replace, wpyar_ticket['oposhtiban_tab_wpyarticket']['poshtiban_text_email_send'])); 77 $to = $user_poshtiban; 78 $headers = array('Content-Type: text/html; charset=UTF-8'); 79 wp_mail(esc_html($to), esc_html($subject), esc_html($body), $headers); 80 } 79 81 80 //---------------- End Mail Department User 82 if (get_option('nirweb_ticket_perfix')['active_send_mail_to_user'] == 1) { 83 $user = get_user_by('id', get_current_user_id()); 84 $user = sanitize_text_field($user->user_email); 81 85 82 //----------- Start Mail User 83 84 if( get_option('nirweb_ticket_perfix')['active_send_mail_to_user']==1 ){ 85 $user = get_user_by('id',get_current_user_id()); 86 $user =$user->user_email; 87 88 89 $subject = wpyar_ticket['ueser_tab_wpyarticket']['subject_mail_user_new']; 90 $body = wpautop(str_replace($search, $replace, wpyar_ticket['ueser_tab_wpyarticket']['user_text_email_send'])); 91 $to = $user; 92 $headers = array('Content-Type: text/html; charset=UTF-8'); 93 wp_mail( $to, $subject, $body, $headers ); 94 } 95 96 echo esc_html('<div class="upfile_wpyartick"> 86 87 $subject = wpyar_ticket['ueser_tab_wpyarticket']['subject_mail_user_new']; 88 $body = wpautop(str_replace($search, $replace, wpyar_ticket['ueser_tab_wpyarticket']['user_text_email_send'])); 89 $to = $user; 90 $headers = array('Content-Type: text/html; charset=UTF-8'); 91 wp_mail(esc_html($to), esc_html($subject), esc_html($body), $headers); 92 } 93 94 echo '<div class="upfile_wpyartick"> 97 95 98 96 <label for="main_image" class="label_main_image"> 99 97 <span class="remove_file_by_user"><i class="fal fa-times-circle"></i></span> 100 98 <i class="fal fa-arrow-up upicon" style="font-size: 30px;margin-bottom: 10px;"></i> 101 <span class="text_label_main_image">' .__('Attachment File', 'nirweb-support').'</span>99 <span class="text_label_main_image">' . esc_html__('Attachment File', 'nirweb-support') . '</span> 102 100 </label> 103 <input type="file" name="main_image" id="main_image" accept="'.wpyar_ticket['mojaz_file_upload_user_wpyar'].'"> 104 </div> '); 101 <input type="file" name="main_image" id="main_image" accept="' . esc_html(wpyar_ticket['mojaz_file_upload_user_wpyar']) . '"> 102 </div> '; 103 } 105 104 } 106 } -
nirweb-support/trunk/inc/user/functions/ajax_wpyar_ticket_user_search.php
r2705011 r2708596 1 1 <?php 2 2 if (!function_exists('func_ajax_nirweb_ticket_user_search')) { 3 function func_ajax_nirweb_ticket_user_search($value){ 3 function func_ajax_nirweb_ticket_user_search($value) 4 { 4 5 global $wpdb; 5 $user_id=get_current_user_id(); 6 $value = sanitize_text_field($value); 7 $user_id = get_current_user_id(); 6 8 $address_table = $wpdb->prefix . "nirweb_ticket_ticket"; 7 // To use "LIKE" with the wildcards (%), we have to do some funny business:8 9 $search = "%{$value}%"; 9 // Build the where clause using $wpdb->prepare to prevent SQL injection attacks 10 // Searching ALL THREE of our columns: Product, Application, Sector 11 $where = $wpdb->prepare( 'WHERE (id_receiver=%s OR sender_id=%s) AND (ticket_id LIKE %s OR subject LIKE %s)', $user_id, $user_id,$search, $search); 12 // Execute the query with our WHERE clause 13 // NOTE: Your code originally used "$sc_products", but that variable was not defined - so have replaced to the proper $address_table here. 14 $results = $wpdb->get_results( "SELECT * FROM {$address_table} {$where}" ); 15 if(sizeof($results)>0){ 16 foreach($results as $row){ 17 18 echo esc_html( '<li><a href="#">'.$row->subject.'</a></li>'); 10 $where = $wpdb->prepare('WHERE (id_receiver=%s OR sender_id=%s) AND (ticket_id LIKE %s OR subject LIKE %s)', $user_id, $user_id, $search, $search); 11 $results = $wpdb->get_results("SELECT * FROM {$address_table} {$where}"); 12 if (sizeof($results) > 0) { 13 foreach ($results as $row) { 14 echo '<li><a href="#">' . esc_html($row->subject) . '</a></li>'; 19 15 } 20 }else{21 echo'<p class="not_found">'.__('not found', 'nirweb-support').'</p>' ;22 }16 } else { 17 echo '<p class="not_found">' . esc_html__('not found', 'nirweb-support') . '</p>'; 18 } 23 19 } 24 20 } -
nirweb-support/trunk/inc/user/functions/filter_ajax_ticket.php
r2707344 r2708596 40 40 <?php foreach ($process_ticket_list as $row) : ?> 41 41 <li> 42 <a href="?action=reply&id=<?php echo $row->ticket_id?>" class="<?php42 <a href="?action=reply&id=<?php echo esc_html($row->ticket_id) ?>" class="<?php 43 43 if (intval($row->status) == 1) { 44 44 echo 'arbitrator_wpyaru-red'; … … 68 68 $orig_time = strtotime( $row->time_update); 69 69 $date = strtotime($row->date_qustion); 70 echo $date = wp_date('d F Y', $date); ?>71 <?php echo __('Hour', 'nirweb-support') ?>70 echo esc_html(wp_date('d F Y', $date)); ?> 71 <?php echo esc_html__('Hour', 'nirweb-support') ?> 72 72 <?php 73 echo $date = wp_date('H:i', $date); ?>73 echo esc_html(wp_date('H:i', $date)); ?> 74 74 </time> 75 75 </div> … … 78 78 <time> 79 79 <?php 80 $orig_time = strtotime( $row->time_update);80 $orig_time = strtotime(esc_html($row->time_update)); 81 81 ago_ticket_nirweb($orig_time) ?> 82 82 </time> … … 89 89 <?php 90 90 }else{ 91 echo '<h3 style="color:red;font-weight: 400;text-align: center;font-size: 18px;"> 92 '.__('not found', 'nirweb-support').' 91 echo '<h3 style="color:red;font-weight: 400;text-align: center;font-size: 18px;"> '.esc_html__('not found', 'nirweb-support').' 93 92 </h3>' ; 94 93 } … … 100 99 <?php foreach ($list_ticket[0] as $row) : ?> 101 100 <li> 102 <a href="?action=reply&id=<?php echo $row->ticket_id?>" class="<?php101 <a href="?action=reply&id=<?php echo esc_html($row->ticket_id) ?>" class="<?php 103 102 if (intval($row->status) == 1) { 104 103 echo 'arbitrator_wpyaru-red'; … … 128 127 $orig_time = strtotime( $row->time_update); 129 128 $date = strtotime($row->date_qustion); 130 echo $date = wp_date('d F Y', $date); ?>131 <?php echo __('Hour', 'nirweb-support') ?>129 echo esc_html(wp_date('d F Y', $date)); ?> 130 <?php echo esc_html__('Hour', 'nirweb-support') ?> 132 131 <?php 133 echo $date = wp_date('H:i', $date); ?>132 echo esc_html( wp_date('H:i', $date)); ?> 134 133 </time> 135 134 </div> … … 138 137 <time> 139 138 <?php 140 $orig_time = strtotime( $row->time_update);139 $orig_time = strtotime( esc_html($row->time_update)); 141 140 ago_ticket_nirweb($orig_time) ?> 142 141 </time> -
nirweb-support/trunk/inc/user/functions/func_shourt_code.php
r2705011 r2708596 3 3 function nirweb_ticket_login_ticket() 4 4 { 5 5 6 if (!is_user_logged_in()) { 6 7 include NIRWEB_SUPPORT_INC_USER_THEMES_TICKET . 'login.php'; -
nirweb-support/trunk/inc/user/functions/func_u_list_ticket.php
r2707344 r2708596 1 1 <?php 2 if (!function_exists('nirweb_ticket_get_list_all_ticket_user')) {function nirweb_ticket_get_list_all_ticket_user(){ 3 global $wpdb,$table_prefix; 2 if (!function_exists('nirweb_ticket_get_list_all_ticket_user')) { 3 function nirweb_ticket_get_list_all_ticket_user() 4 { 5 global $wpdb, $table_prefix; 6 $user_id = get_current_user_id(); 7 global $wpdb; 8 $items_per_page = 20; 9 $page = isset($_GET['cpage']) ? abs((int)$_GET['cpage']) : 1; 10 $offset = ($page * $items_per_page) - $items_per_page; 11 $query = 'SELECT * FROM ' . $wpdb->prefix . 'nirweb_ticket_ticket ticket WHERE ticket.id_receiver=' . $user_id . ' 12 or ticket.sender_id=' . $user_id . ' '; 4 13 5 6 $user_id=get_current_user_id(); 7 8 global $wpdb; 9 $items_per_page = 20; 10 $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1; 11 $offset = ( $page * $items_per_page ) - $items_per_page; 12 $query = 'SELECT * FROM '.$wpdb->prefix.'nirweb_ticket_ticket ticket WHERE ticket.id_receiver='.$user_id.' 13 or ticket.sender_id='.$user_id.' '; 14 15 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 16 $total = $wpdb->get_var( $total_query ); 17 18 19 20 $new_ticket_list=$wpdb->get_results("SELECT ticket.* , users.ID , users.display_name,status.*,depart.*, depart.name as department_name,post.ID,post.post_title,priority.*,priority.name as proname 14 $total_query = "SELECT COUNT(1) FROM (${query}) AS combined_table"; 15 $total = $wpdb->get_var($total_query); 16 $new_ticket_list = $wpdb->get_results("SELECT ticket.* , users.ID , users.display_name,status.*,depart.*, depart.name as department_name,post.ID,post.post_title,priority.*,priority.name as proname 21 17 FROM {$wpdb->prefix}nirweb_ticket_ticket ticket 22 18 … … 42 38 LIMIT $offset, $items_per_page 43 39 "); 44 return array(40 return array( 45 41 46 $new_ticket_list,paginate_links(array(47 'base' => add_query_arg( 'cpage', '%#%'),48 'format' => '',49 'prev_text' => __('«'),50 'next_text' => __('»'),51 'total' => ceil($total / $items_per_page),52 'current' => $page53 ))54 );42 $new_ticket_list, paginate_links(array( 43 'base' => add_query_arg('cpage', '%#%'), 44 'format' => '', 45 'prev_text' => __('«'), 46 'next_text' => __('»'), 47 'total' => ceil($total / $items_per_page), 48 'current' => $page 49 )) 50 ); 55 51 56 52 57 }} 58 if (!function_exists('nirweb_ticket_edit_ticket')) {function nirweb_ticket_edit_ticket($ticket_id) 59 { 60 global $wpdb; 61 $ticket = $wpdb->get_row("SELECT ticket.* , users.ID , users.display_name,status.*,department.* ,department.name as depname,priority.*,priority.name as proname ,revuser.ID as rev_id,revuser.display_name as rev_name ,posts.ID,posts.post_title as product_name 53 } 54 } 55 if (!function_exists('nirweb_ticket_edit_ticket')) { 56 function nirweb_ticket_edit_ticket($ticket_id) 57 { 58 global $wpdb; 59 $ticket = $wpdb->get_row("SELECT ticket.* , users.ID , users.display_name,status.*,department.* ,department.name as depname,priority.*,priority.name as proname ,revuser.ID as rev_id,revuser.display_name as rev_name ,posts.ID,posts.post_title as product_name 62 60 FROM {$wpdb->prefix}nirweb_ticket_ticket ticket 63 61 LEFT JOIN {$wpdb->prefix}users users … … 74 72 ON priority=priority_id 75 73 where $ticket_id = ticket_id; "); 76 return $ticket; 77 }} 78 if (!function_exists('nirweb_ticket_count_all_ticket_user_fr')) {function nirweb_ticket_count_all_ticket_user_fr(){ 79 $user_id=get_current_user_id(); 80 global $wpdb; 81 $count_all=intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}nirweb_ticket_ticket WHERE id_receiver= $user_id OR sender_id=$user_id ")); 82 echo $count_all; 83 }} 84 if (!function_exists('nirweb_ticket_count_new_ticket_user_fr')) {function nirweb_ticket_count_new_ticket_user_fr(){ 85 $user_id=get_current_user_id(); 74 return $ticket; 75 } 76 } 77 if (!function_exists('nirweb_ticket_count_all_ticket_user_fr')) { 78 function nirweb_ticket_count_all_ticket_user_fr() 79 { 80 $user_id = get_current_user_id(); 81 global $wpdb; 82 $count_all = intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}nirweb_ticket_ticket WHERE id_receiver= $user_id OR sender_id=$user_id ")); 83 echo esc_html($count_all); 84 } 85 } 86 if (!function_exists('nirweb_ticket_count_new_ticket_user_fr')) { 87 function nirweb_ticket_count_new_ticket_user_fr() 88 { 89 $user_id = get_current_user_id(); 86 90 87 global $wpdb;88 $count_all=intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}nirweb_ticket_ticket91 global $wpdb; 92 $count_all = intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}nirweb_ticket_ticket 89 93 WHERE (id_receiver= $user_id OR sender_id=$user_id ) AND status=1")); 90 echo $count_all; 91 }} 94 echo esc_html($count_all); 95 } 96 } 92 97 93 if (!function_exists('nirweb_ticket_count_process_ticket_user_fr')) {function nirweb_ticket_count_process_ticket_user_fr(){ 94 $user_id=get_current_user_id(); 98 if (!function_exists('nirweb_ticket_count_process_ticket_user_fr')) { 99 function nirweb_ticket_count_process_ticket_user_fr() 100 { 101 $user_id = get_current_user_id(); 95 102 96 global $wpdb;97 $count_all=intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}nirweb_ticket_ticket103 global $wpdb; 104 $count_all = intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}nirweb_ticket_ticket 98 105 WHERE (id_receiver= $user_id OR sender_id=$user_id ) AND status=2 ")); 99 echo $count_all; 100 }} 101 if (!function_exists('nirweb_ticket_count_answered_ticket_user_fr')) {function nirweb_ticket_count_answered_ticket_user_fr(){ 102 $user_id=get_current_user_id(); 106 echo esc_html($count_all); 107 } 108 } 109 if (!function_exists('nirweb_ticket_count_answered_ticket_user_fr')) { 110 function nirweb_ticket_count_answered_ticket_user_fr() 111 { 112 $user_id = get_current_user_id(); 103 113 104 global $wpdb;105 $count_all=intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}nirweb_ticket_ticket114 global $wpdb; 115 $count_all = intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}nirweb_ticket_ticket 106 116 WHERE (id_receiver= $user_id OR sender_id=$user_id ) AND status=3")); 107 echo $count_all; 108 }} 109 if (!function_exists('nirweb_ticket_count_closed_ticket_user_fr')) {function nirweb_ticket_count_closed_ticket_user_fr(){ 110 $user_id=get_current_user_id(); 117 echo esc_html($count_all); 118 } 119 } 120 if (!function_exists('nirweb_ticket_count_closed_ticket_user_fr')) { 121 function nirweb_ticket_count_closed_ticket_user_fr() 122 { 123 $user_id = get_current_user_id(); 111 124 112 global $wpdb;113 $count_all=intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}nirweb_ticket_ticket125 global $wpdb; 126 $count_all = intval($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}nirweb_ticket_ticket 114 127 WHERE (id_receiver= $user_id OR sender_id=$user_id ) AND status=4 ")); 115 echo $count_all;116 }128 echo esc_html($count_all); 129 } 117 130 118 131 -
nirweb-support/trunk/inc/user/themes/home.php
r2707344 r2708596 1 <?php 2 include NIRWEB_SUPPORT_INC_USER_FUNCTIONS_TICKET . 'func_u_list_ticket.php';3 include NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_status_and_priority.php';1 <?php 2 include NIRWEB_SUPPORT_INC_USER_FUNCTIONS_TICKET . 'func_u_list_ticket.php'; 3 include NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_status_and_priority.php'; 4 4 $list_ticket = nirweb_ticket_get_list_all_ticket_user(); 5 5 $list_status = nirweb_ticket_get_status(); 6 6 $user = wp_get_current_user(); 7 7 ?> 8 <div class="nirweb_ticket_base wpyar-ticket"> 9 <h3 class="tite_status_tickets_wpyar"><?php echo __('Ticket status', 'nirweb-support') ?></h3> 10 <div class="row_status"> 11 <div class="col_box_status_ticket_wpyar" id="open"> 12 <svg id="svg_open-ticket" viewBox="0 0 48.6 48.6" style="width: 50px"><path fill="#FFF" d="M17.5 14.2l2.4-2.4c5.6 5.6 11.2 11.3 16.8 16.9L34.4 31c-5.6-5.5-11.3-11.2-16.9-16.8z"></path><path fill="#E6E6E6" d="M38.2 28.8l9.4-9.4-4.2-4.2c-2.7 2.6-7.1 2.5-9.7-.2-2.7-2.6-2.8-7-.2-9.7L29.3 1l-9.4 9.4 18.3 18.4z"></path><path fill="#4D4D4D" d="M25.3 32.3c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-5.4-5.4c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3z"></path><path fill="#4D4D4D" d="M48.3 18.6l-4.2-4.2c-.4-.4-1-.4-1.4 0-2.3 2.2-6 2.1-8.2-.2-2.3-2.2-2.4-6-.2-8.3.4-.4.4-1 0-1.4L30 .3l-.2-.1-.2-.1-.2-.1H29.1c-.2 0-.4.1-.5.2l-9.4 9.4-18.9 19c-.4.4-.4 1 0 1.4l4.2 4.2c.4.4 1 .4 1.4 0 2.3-2.2 6.1-2.1 8.3.2 2.3 2.2 2.4 6 .2 8.3-.4.4-.4 1 0 1.4l4.2 4.2c.2.2.5.3.7.3s.5-.1.7-.3l14.8-14.8c.2 0 .3-.1.4-.2l4.2-4.2c.1-.1.1-.2.2-.3l8.7-8.7c.2-.2.3-.5.3-.8 0-.2-.1-.5-.3-.7zm-19-16.2l2.9 2.9c-2.3 3.1-2 7.6.8 10.3 2.8 2.8 7.2 3.1 10.4.9l2.8 2.8-7.5 7.5L21.8 10l7.5-7.6zm-9.4 9.4l16.8 16.9-2.3 2.3-16.9-16.8 2.4-2.4zm-.6 34.4l-2.8-2.8c2.3-3.1 2-7.6-.8-10.3-2.8-2.8-7.2-3.1-10.4-.9l-2.8-2.8 9.8-9.8c0 .1.1.2.2.3l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4c-.1-.1-.2-.1-.3-.2l2.6-2.6L33 32.5l-2.6 2.6c0-.2-.1-.3-.2-.4l-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4c.1.1.3.2.4.2l-9.9 9.9z"></path><circle fill="#FF1A1A" cx="35.2" cy="35.7" r="9.9"></circle><path fill="#FFF" d="M35.2 47.7c-6.6 0-12-5.4-12-12s5.4-12 12-12 12 5.4 12 12-5.4 12-12 12zm0-22c-5.5 0-10 4.5-10 10s4.5 10 10 10 10-4.5 10-10-4.5-10-10-10z"></path><path fill="#FFF" d="M38.8 40.5h-6c-.6 0-1-.4-1-1s.4-1 1-1h5v-5h-5c-.6 0-1-.4-1-1s.4-1 1-1h6c.6 0 1 .4 1 1v7c0 .6-.4 1-1 1z"></path></svg> 13 <p class="title"><?php echo __('Open', 'nirweb-support') ?></p> 14 <p class="number c-red"> 15 <?php nirweb_ticket_count_new_ticket_user_fr ()?> 16 </p> 17 </div> 18 <div class="col_box_status_ticket_wpyar" id="inprogress"> 19 <svg id="svg_doing-ticket" viewBox="0 0 48.6 48.6"style="width: 50px"><g transform="translate(-1031 1558)"><path fill="#FFF" d="M1047.103-1543.742l4.242-4.242 18.385 18.384-4.243 4.243z"></path><path fill="#4D4D4D" d="M1056.3-1525.7c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-5.4-5.4c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3z"></path><path fill="#E6E6E6" d="M1069.2-1529.2l9.4-9.4-4.2-4.2c-2.7 2.6-7.1 2.5-9.7-.2-2.7-2.6-2.8-7-.2-9.7l-4.2-4.3-9.4 9.4 18.3 18.4z"></path><path fill="#4D4D4D" d="M1079.3-1539.4l-4.2-4.2c-.4-.4-1-.4-1.4 0-2.3 2.2-6 2.1-8.2-.2-2.3-2.2-2.4-6-.2-8.3.4-.4.4-1 0-1.4l-4.3-4.2s-.1-.1-.2-.1-.1-.1-.2-.1-.2 0-.3-.1H1060c-.2 0-.4.1-.5.2l-9.4 9.4-18.9 18.9c-.4.4-.4 1 0 1.4l4.2 4.2c.4.4 1 .4 1.4 0 2.3-2.2 6.1-2.1 8.3.2 2.3 2.2 2.4 6 .2 8.3-.4.4-.4 1 0 1.4l4.2 4.2c.2.2.5.3.7.3s.5-.1.7-.3l14.8-14.8c.2 0 .3-.1.4-.2l4.2-4.2c.1-.1.1-.2.2-.3l8.7-8.7c.2-.2.3-.5.3-.8.1-.1 0-.4-.2-.6zm-19-16.2l2.9 2.9c-2.3 3.1-2 7.6.8 10.3 2.8 2.8 7.2 3.1 10.4.9l2.8 2.8-7.5 7.5-16.9-16.9 7.5-7.5zm-9.4 9.4l16.8 16.9-2.3 2.3-16.9-16.9 2.4-2.3zm-.6 34.4l-2.8-2.8c2.3-3.1 2-7.6-.8-10.3-2.8-2.8-7.2-3.1-10.4-.9l-2.8-2.8 9.8-9.8c0 .1.1.2.2.3l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4c-.1-.1-.2-.1-.3-.2l2.6-2.6 16.9 16.9-2.6 2.6c0-.2-.1-.3-.2-.4l-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4c.1.1.3.2.4.2l-10 9.8z"></path><circle fill="#2096FC" cx="1065.2" cy="-1522.3" r="11"></circle><path fill="#FFF" d="M1065.2-1510.3c-6.6 0-12-5.4-12-12s5.4-12 12-12 12 5.4 12 12-5.4 12-12 12zm0-22c-5.5 0-10 4.5-10 10s4.5 10 10 10 10-4.5 10-10-4.5-10-10-10z"></path><path fill="#FFF" d="M1071.3-1520.7h-1.1c-.6 0-1-.4-1-1s.4-1 1-1h1.1c.6 0 1 .4 1 1s-.4 1-1 1zM1060.4-1520.7h-1.1c-.6 0-1-.4-1-1s.4-1 1-1h1.1c.6 0 1 .4 1 1s-.4 1-1 1zM1065.9-1520.7h-1.1c-.6 0-1-.4-1-1s.4-1 1-1h1.1c.6 0 1 .4 1 1s-.4 1-1 1z"></path></g></svg> 20 <p class="title"><?php echo __('Inprogress', 'nirweb-support') ?></p> 21 <p class="number c-blue"><?php nirweb_ticket_count_process_ticket_user_fr ()?></p> 22 </div> 23 <div class="col_box_status_ticket_wpyar" id="closed"> 24 <svg id="svg_close-ticket" viewBox="0 0 48.6 48.6" style="width: 50px"><g transform="translate(-905 1558)"><path fill="#FFF" d="M921.104-1543.743l4.242-4.242 18.385 18.384-4.243 4.243z"></path><path fill="#E6E6E6" d="M943.2-1529.2l9.4-9.4-4.2-4.2c-2.7 2.6-7.1 2.5-9.7-.2-2.7-2.6-2.8-7-.2-9.7l-4.2-4.3-9.4 9.4 18.3 18.4z"></path><path fill="#4D4D4D" d="M930.3-1525.7c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-5.4-5.4c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3z"></path><path fill="#4D4D4D" d="M953.3-1539.4l-4.2-4.2c-.4-.4-1-.4-1.4 0-2.3 2.2-6 2.1-8.2-.2-2.3-2.2-2.4-6-.2-8.3.4-.4.4-1 0-1.4l-4.3-4.2s-.1-.1-.2-.1-.1-.1-.2-.1-.2 0-.3-.1H934c-.2 0-.4.1-.5.2l-9.4 9.4-18.9 18.9c-.4.4-.4 1 0 1.4l4.2 4.2c.4.4 1 .4 1.4 0 2.3-2.2 6.1-2.1 8.3.2 2.3 2.2 2.4 6 .2 8.3-.4.4-.4 1 0 1.4l4.2 4.2c.2.2.5.3.7.3s.5-.1.7-.3l14.8-14.8c.2 0 .3-.1.4-.2l4.2-4.2c.1-.1.1-.2.2-.3l8.7-8.7c.2-.2.3-.5.3-.8.1-.1 0-.4-.2-.6zm-19-16.2l2.9 2.9c-2.3 3.1-2 7.6.8 10.3 2.8 2.8 7.2 3.1 10.4.9l2.8 2.8-7.5 7.5-16.9-16.9 7.5-7.5zm-9.4 9.4l16.8 16.9-2.3 2.3-16.9-16.9 2.4-2.3zm-.6 34.4l-2.8-2.8c2.3-3.1 2-7.6-.8-10.3-2.8-2.8-7.2-3.1-10.4-.9l-2.8-2.8 9.8-9.8c0 .1.1.2.2.3l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4c-.1-.1-.2-.1-.3-.2l2.6-2.6 16.9 16.9-2.6 2.6c0-.2-.1-.3-.2-.4l-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4c.1.1.3.2.4.2l-10 9.8z"></path><circle fill="#2FBE35" cx="940.2" cy="-1522.3" r="11"></circle><path fill="#FFF" d="M940.2-1510.3c-6.6 0-12-5.4-12-12s5.4-12 12-12 12 5.4 12 12-5.4 12-12 12zm0-22c-5.5 0-10 4.5-10 10s4.5 10 10 10 10-4.5 10-10-4.5-10-10-10z"></path><path fill="#FFF" d="M943.8-1517.5h-7c-.6 0-1-.4-1-1v-7c0-.6.4-1 1-1h7c.6 0 1 .4 1 1v7c0 .6-.4 1-1 1zm-6-2h5v-5h-5v5z"></path></g></svg> 25 <p class="title"><?php echo __('Closed', 'nirweb-support') ?></p> 26 <p class="number c-green"><?php nirweb_ticket_count_closed_ticket_user_fr ()?></p> 27 </div> 28 <div class="col_box_status_ticket_wpyar" id="answered"> 29 <svg id="svg_answered-ticket" viewBox="0 0 48.6 48.6" style="width: 50px"><g transform="translate(-1179 1558)"><path fill="#FFF" d="M1195.102-1543.74l4.242-4.243 18.385 18.384-4.243 4.243z"></path><path fill="#E6E6E6" d="M1217.2-1529.2l9.4-9.4-4.2-4.2c-2.7 2.6-7.1 2.5-9.7-.2-2.7-2.6-2.8-7-.2-9.7l-4.2-4.3-9.4 9.4 18.3 18.4z"></path><path fill="#4D4D4D" d="M1204.3-1525.7c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-5.4-5.4c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3z"></path><path fill="#4D4D4D" d="M1227.3-1539.4l-4.2-4.2c-.4-.4-1-.4-1.4 0-2.3 2.2-6 2.1-8.2-.2-2.3-2.2-2.4-6-.2-8.3.4-.4.4-1 0-1.4l-4.3-4.2s-.1-.1-.2-.1-.1-.1-.2-.1-.2 0-.3-.1H1208c-.2 0-.4.1-.5.2l-9.4 9.4-18.9 18.9c-.4.4-.4 1 0 1.4l4.2 4.2c.4.4 1 .4 1.4 0 2.3-2.2 6.1-2.1 8.3.2 2.3 2.2 2.4 6 .2 8.3-.4.4-.4 1 0 1.4l4.2 4.2c.2.2.5.3.7.3s.5-.1.7-.3l14.8-14.8c.2 0 .3-.1.4-.2l4.2-4.2c.1-.1.1-.2.2-.3l8.7-8.7c.2-.2.3-.5.3-.8.1-.1 0-.4-.2-.6zm-19-16.2l2.9 2.9c-2.3 3.1-2 7.6.8 10.3 2.8 2.8 7.2 3.1 10.4.9l2.8 2.8-7.5 7.5-16.9-16.9 7.5-7.5zm-9.4 9.4l16.8 16.9-2.3 2.3-16.9-16.9 2.4-2.3zm-.6 34.4l-2.8-2.8c2.3-3.1 2-7.6-.8-10.3-2.8-2.8-7.2-3.1-10.4-.9l-2.8-2.8 9.8-9.8c0 .1.1.2.2.3l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4c-.1-.1-.2-.1-.3-.2l2.6-2.6 16.9 16.9-2.6 2.6c0-.2-.1-.3-.2-.4l-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4c.1.1.3.2.4.2l-10 9.8z"></path><path fill="#9F3FE5" d="M1213.2-1533.3c6.1 0 11 4.9 11 11s-4.9 11-11 11-11-4.9-11-11 4.9-11 11-11z"></path><path fill="#FFF" d="M1213.2-1510.3c-6.6 0-12-5.4-12-12 0-3.2 1.2-6.2 3.5-8.5s5.3-3.5 8.5-3.5h.1c6.6 0 12 5.4 12 12s-5.5 12-12.1 12zm0-23v1c-2.7 0-5.2 1.1-7.1 2.9-1.9 1.9-2.9 4.4-2.9 7.1 0 5.5 4.5 10 10 10s10-4.5 10-10-4.5-10-10-10v-1z"></path><path fill="#FFF" d="M1212.4-1517.6c-.2 0-.4-.1-.6-.2l-2.9-2.3c-.4-.3-.5-1-.2-1.4.3-.4 1-.5 1.4-.2l2.1 1.7 4.1-5.3c.3-.4 1-.5 1.4-.2.4.3.5 1 .2 1.4l-4.7 6.1c-.2.2-.4.3-.7.4h-.1z"></path></g></svg> 30 <p class="title"><?php echo __('Answered', 'nirweb-support') ?></p> 31 <p class="number c-purple"><?php nirweb_ticket_count_answered_ticket_user_fr ()?></p> 32 </div> 33 <div class="col_box_status_ticket_wpyar" id="all"> 34 <svg id="svg_total-ticket" viewBox="0 0 48.4 48.4" style="width: 50px"><g transform="translate(-2300 -319)"><path fill="#FEA000" d="M2318.241 335.827l3.748-3.747 16.475 16.475-3.748 3.748z"></path><path fill="#4D4D4D" d="M2326.4 352.4c-.3 0-.5-.1-.7-.3l-2.4-2.4c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.4 2.4c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-4.9-4.9c-.3 0-.5-.1-.7-.3l-2.4-2.4c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.4 2.4c.4.4.4 1 0 1.4-.1.2-.4.3-.7.3z"></path><path fill="#E6E6E6" d="M2338.4 348.5l9-9-3.8-3.8c-2.4 2.5-6.4 2.5-8.9.1-2.4-2.5-2.4-6.5.1-8.9l-3.8-3.8-9 9 16.4 16.4z"></path><path fill="#4D4D4D" d="M2348.4 339.5c0-.1 0-.3-.1-.4 0-.1-.1-.2-.2-.3l-3.8-3.8c-.2-.2-.4-.3-.7-.3-.3 0-.5.1-.7.3-.5.5-1.1.9-1.7 1.2h-.2c-.3.1-.5.2-.8.2-.3.1-.7.1-1 .1-1.4 0-2.7-.5-3.7-1.5l-.1-.1c-1-1-1.5-2.4-1.5-3.7 0-1.3.6-2.7 1.6-3.7.2-.2.3-.4.3-.7v-.1c0-.3-.1-.5-.3-.7l-3.8-3.8c-.4-.4-1-.4-1.4 0l-27 27c-.4.4-.4 1 0 1.4l3.8 3.8c.2.2.4.3.7.3.3 0 .5-.1.7-.3 2-2.1 5.4-2.1 7.5-.1 2 2.1 2 5.4-.1 7.5-.2.2-.3.4-.3.7 0 .3.1.5.3.7l3.8 3.8c.2.2.5.3.7.3.3 0 .5-.1.7-.3l14-13.9c.1 0 .3-.1.4-.2l3.7-3.7c.1-.1.1-.2.2-.2l8.6-8.6.1-.1c.1-.1.2-.2.2-.3.1-.2.1-.3.1-.5zm-14.4-3c.8.8 1.8 1.3 2.8 1.7.1 0 .3.1.4.1.2 0 .3.1.5.1.3.1.6.1.9.1h1c.2 0 .4 0 .6-.1.3 0 .5-.1.8-.2.1 0 .2-.1.4-.1.3-.1.7-.2 1-.4.1 0 .1 0 .2-.1.4-.2.7-.4 1.1-.7l1.2 1.2 1.2 1.2-7.5 7.5-15-15 7.5-7.5 2.4 2.4c-1.1 1.4-1.6 3.1-1.5 4.8 0 2 .7 3.7 2 5zm-12-3l15 15-2.3 2.3-15-15 2.3-2.3zm-1.6 31.5l-2.4-2.4c2.2-2.8 2-6.9-.6-9.6-2.6-2.6-6.7-2.7-9.6-.6l-2.4-2.4 9.1-9.1v.1l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4h-.1l2.3-2.3 15 15-2.3 2.3-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4-9 9zM2301.4 347.3c-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l25.4-25.9c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4l-25.4 25.9c-.2.2-.4.3-.7.3z"></path></g></svg> 35 <p class="title"><?php echo __('Total', 'nirweb-support') ?></p> 36 <p class="number c-org"><?php nirweb_ticket_count_all_ticket_user_fr ()?></p> 8 <div class="nirweb_ticket_base wpyar-ticket"> 9 <h3 class="tite_status_tickets_wpyar"><?php echo esc_html__('Ticket status', 'nirweb-support') ?></h3> 10 <div class="row_status"> 11 <div class="col_box_status_ticket_wpyar" id="open"> 12 <svg id="svg_open-ticket" viewBox="0 0 48.6 48.6" style="width: 50px"> 13 <path fill="#FFF" 14 d="M17.5 14.2l2.4-2.4c5.6 5.6 11.2 11.3 16.8 16.9L34.4 31c-5.6-5.5-11.3-11.2-16.9-16.8z"></path> 15 <path fill="#E6E6E6" 16 d="M38.2 28.8l9.4-9.4-4.2-4.2c-2.7 2.6-7.1 2.5-9.7-.2-2.7-2.6-2.8-7-.2-9.7L29.3 1l-9.4 9.4 18.3 18.4z"></path> 17 <path fill="#4D4D4D" 18 d="M25.3 32.3c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-5.4-5.4c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3z"></path> 19 <path fill="#4D4D4D" 20 d="M48.3 18.6l-4.2-4.2c-.4-.4-1-.4-1.4 0-2.3 2.2-6 2.1-8.2-.2-2.3-2.2-2.4-6-.2-8.3.4-.4.4-1 0-1.4L30 .3l-.2-.1-.2-.1-.2-.1H29.1c-.2 0-.4.1-.5.2l-9.4 9.4-18.9 19c-.4.4-.4 1 0 1.4l4.2 4.2c.4.4 1 .4 1.4 0 2.3-2.2 6.1-2.1 8.3.2 2.3 2.2 2.4 6 .2 8.3-.4.4-.4 1 0 1.4l4.2 4.2c.2.2.5.3.7.3s.5-.1.7-.3l14.8-14.8c.2 0 .3-.1.4-.2l4.2-4.2c.1-.1.1-.2.2-.3l8.7-8.7c.2-.2.3-.5.3-.8 0-.2-.1-.5-.3-.7zm-19-16.2l2.9 2.9c-2.3 3.1-2 7.6.8 10.3 2.8 2.8 7.2 3.1 10.4.9l2.8 2.8-7.5 7.5L21.8 10l7.5-7.6zm-9.4 9.4l16.8 16.9-2.3 2.3-16.9-16.8 2.4-2.4zm-.6 34.4l-2.8-2.8c2.3-3.1 2-7.6-.8-10.3-2.8-2.8-7.2-3.1-10.4-.9l-2.8-2.8 9.8-9.8c0 .1.1.2.2.3l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4c-.1-.1-.2-.1-.3-.2l2.6-2.6L33 32.5l-2.6 2.6c0-.2-.1-.3-.2-.4l-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4c.1.1.3.2.4.2l-9.9 9.9z"></path> 21 <circle fill="#FF1A1A" cx="35.2" cy="35.7" r="9.9"></circle> 22 <path fill="#FFF" 23 d="M35.2 47.7c-6.6 0-12-5.4-12-12s5.4-12 12-12 12 5.4 12 12-5.4 12-12 12zm0-22c-5.5 0-10 4.5-10 10s4.5 10 10 10 10-4.5 10-10-4.5-10-10-10z"></path> 24 <path fill="#FFF" 25 d="M38.8 40.5h-6c-.6 0-1-.4-1-1s.4-1 1-1h5v-5h-5c-.6 0-1-.4-1-1s.4-1 1-1h6c.6 0 1 .4 1 1v7c0 .6-.4 1-1 1z"></path> 26 </svg> 27 <p class="title"><?php echo esc_html__('Open', 'nirweb-support') ?></p> 28 <p class="number c-red"> 29 <?php nirweb_ticket_count_new_ticket_user_fr() ?> 30 </p> 37 31 </div> 38 </div> 39 <div class="head_wpyar_tickt"> 40 <h3><?php echo __('List of tickets', 'nirweb-support') ?></h3> 41 <?php if(is_plugin_active( 'wpyar_panel/wpyar_panel.php' )){ ?> 42 <a class=" wpyar-ticket" href="?endp=new-ticket"><?php echo __('New Ticket', 'nirweb-support') ?></a> 32 <div class="col_box_status_ticket_wpyar" id="inprogress"> 33 <svg id="svg_doing-ticket" viewBox="0 0 48.6 48.6" style="width: 50px"> 34 <g transform="translate(-1031 1558)"> 35 <path fill="#FFF" d="M1047.103-1543.742l4.242-4.242 18.385 18.384-4.243 4.243z"></path> 36 <path fill="#4D4D4D" 37 d="M1056.3-1525.7c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-5.4-5.4c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3z"></path> 38 <path fill="#E6E6E6" 39 d="M1069.2-1529.2l9.4-9.4-4.2-4.2c-2.7 2.6-7.1 2.5-9.7-.2-2.7-2.6-2.8-7-.2-9.7l-4.2-4.3-9.4 9.4 18.3 18.4z"></path> 40 <path fill="#4D4D4D" 41 d="M1079.3-1539.4l-4.2-4.2c-.4-.4-1-.4-1.4 0-2.3 2.2-6 2.1-8.2-.2-2.3-2.2-2.4-6-.2-8.3.4-.4.4-1 0-1.4l-4.3-4.2s-.1-.1-.2-.1-.1-.1-.2-.1-.2 0-.3-.1H1060c-.2 0-.4.1-.5.2l-9.4 9.4-18.9 18.9c-.4.4-.4 1 0 1.4l4.2 4.2c.4.4 1 .4 1.4 0 2.3-2.2 6.1-2.1 8.3.2 2.3 2.2 2.4 6 .2 8.3-.4.4-.4 1 0 1.4l4.2 4.2c.2.2.5.3.7.3s.5-.1.7-.3l14.8-14.8c.2 0 .3-.1.4-.2l4.2-4.2c.1-.1.1-.2.2-.3l8.7-8.7c.2-.2.3-.5.3-.8.1-.1 0-.4-.2-.6zm-19-16.2l2.9 2.9c-2.3 3.1-2 7.6.8 10.3 2.8 2.8 7.2 3.1 10.4.9l2.8 2.8-7.5 7.5-16.9-16.9 7.5-7.5zm-9.4 9.4l16.8 16.9-2.3 2.3-16.9-16.9 2.4-2.3zm-.6 34.4l-2.8-2.8c2.3-3.1 2-7.6-.8-10.3-2.8-2.8-7.2-3.1-10.4-.9l-2.8-2.8 9.8-9.8c0 .1.1.2.2.3l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4c-.1-.1-.2-.1-.3-.2l2.6-2.6 16.9 16.9-2.6 2.6c0-.2-.1-.3-.2-.4l-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4c.1.1.3.2.4.2l-10 9.8z"></path> 42 <circle fill="#2096FC" cx="1065.2" cy="-1522.3" r="11"></circle> 43 <path fill="#FFF" 44 d="M1065.2-1510.3c-6.6 0-12-5.4-12-12s5.4-12 12-12 12 5.4 12 12-5.4 12-12 12zm0-22c-5.5 0-10 4.5-10 10s4.5 10 10 10 10-4.5 10-10-4.5-10-10-10z"></path> 45 <path fill="#FFF" 46 d="M1071.3-1520.7h-1.1c-.6 0-1-.4-1-1s.4-1 1-1h1.1c.6 0 1 .4 1 1s-.4 1-1 1zM1060.4-1520.7h-1.1c-.6 0-1-.4-1-1s.4-1 1-1h1.1c.6 0 1 .4 1 1s-.4 1-1 1zM1065.9-1520.7h-1.1c-.6 0-1-.4-1-1s.4-1 1-1h1.1c.6 0 1 .4 1 1s-.4 1-1 1z"></path> 47 </g> 48 </svg> 49 <p class="title"><?php echo esc_html__('Inprogress', 'nirweb-support') ?></p> 50 <p class="number c-blue"><?php nirweb_ticket_count_process_ticket_user_fr() ?></p> 51 </div> 52 <div class="col_box_status_ticket_wpyar" id="closed"> 53 <svg id="svg_close-ticket" viewBox="0 0 48.6 48.6" style="width: 50px"> 54 <g transform="translate(-905 1558)"> 55 <path fill="#FFF" d="M921.104-1543.743l4.242-4.242 18.385 18.384-4.243 4.243z"></path> 56 <path fill="#E6E6E6" 57 d="M943.2-1529.2l9.4-9.4-4.2-4.2c-2.7 2.6-7.1 2.5-9.7-.2-2.7-2.6-2.8-7-.2-9.7l-4.2-4.3-9.4 9.4 18.3 18.4z"></path> 58 <path fill="#4D4D4D" 59 d="M930.3-1525.7c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-5.4-5.4c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3z"></path> 60 <path fill="#4D4D4D" 61 d="M953.3-1539.4l-4.2-4.2c-.4-.4-1-.4-1.4 0-2.3 2.2-6 2.1-8.2-.2-2.3-2.2-2.4-6-.2-8.3.4-.4.4-1 0-1.4l-4.3-4.2s-.1-.1-.2-.1-.1-.1-.2-.1-.2 0-.3-.1H934c-.2 0-.4.1-.5.2l-9.4 9.4-18.9 18.9c-.4.4-.4 1 0 1.4l4.2 4.2c.4.4 1 .4 1.4 0 2.3-2.2 6.1-2.1 8.3.2 2.3 2.2 2.4 6 .2 8.3-.4.4-.4 1 0 1.4l4.2 4.2c.2.2.5.3.7.3s.5-.1.7-.3l14.8-14.8c.2 0 .3-.1.4-.2l4.2-4.2c.1-.1.1-.2.2-.3l8.7-8.7c.2-.2.3-.5.3-.8.1-.1 0-.4-.2-.6zm-19-16.2l2.9 2.9c-2.3 3.1-2 7.6.8 10.3 2.8 2.8 7.2 3.1 10.4.9l2.8 2.8-7.5 7.5-16.9-16.9 7.5-7.5zm-9.4 9.4l16.8 16.9-2.3 2.3-16.9-16.9 2.4-2.3zm-.6 34.4l-2.8-2.8c2.3-3.1 2-7.6-.8-10.3-2.8-2.8-7.2-3.1-10.4-.9l-2.8-2.8 9.8-9.8c0 .1.1.2.2.3l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4c-.1-.1-.2-.1-.3-.2l2.6-2.6 16.9 16.9-2.6 2.6c0-.2-.1-.3-.2-.4l-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4c.1.1.3.2.4.2l-10 9.8z"></path> 62 <circle fill="#2FBE35" cx="940.2" cy="-1522.3" r="11"></circle> 63 <path fill="#FFF" 64 d="M940.2-1510.3c-6.6 0-12-5.4-12-12s5.4-12 12-12 12 5.4 12 12-5.4 12-12 12zm0-22c-5.5 0-10 4.5-10 10s4.5 10 10 10 10-4.5 10-10-4.5-10-10-10z"></path> 65 <path fill="#FFF" 66 d="M943.8-1517.5h-7c-.6 0-1-.4-1-1v-7c0-.6.4-1 1-1h7c.6 0 1 .4 1 1v7c0 .6-.4 1-1 1zm-6-2h5v-5h-5v5z"></path> 67 </g> 68 </svg> 69 <p class="title"><?php echo esc_html__('Closed', 'nirweb-support') ?></p> 70 <p class="number c-green"><?php nirweb_ticket_count_closed_ticket_user_fr() ?></p> 71 </div> 72 <div class="col_box_status_ticket_wpyar" id="answered"> 73 <svg id="svg_answered-ticket" viewBox="0 0 48.6 48.6" style="width: 50px"> 74 <g transform="translate(-1179 1558)"> 75 <path fill="#FFF" d="M1195.102-1543.74l4.242-4.243 18.385 18.384-4.243 4.243z"></path> 76 <path fill="#E6E6E6" 77 d="M1217.2-1529.2l9.4-9.4-4.2-4.2c-2.7 2.6-7.1 2.5-9.7-.2-2.7-2.6-2.8-7-.2-9.7l-4.2-4.3-9.4 9.4 18.3 18.4z"></path> 78 <path fill="#4D4D4D" 79 d="M1204.3-1525.7c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-5.4-5.4c-.3 0-.5-.1-.7-.3l-2.7-2.7c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.7 2.7c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3z"></path> 80 <path fill="#4D4D4D" 81 d="M1227.3-1539.4l-4.2-4.2c-.4-.4-1-.4-1.4 0-2.3 2.2-6 2.1-8.2-.2-2.3-2.2-2.4-6-.2-8.3.4-.4.4-1 0-1.4l-4.3-4.2s-.1-.1-.2-.1-.1-.1-.2-.1-.2 0-.3-.1H1208c-.2 0-.4.1-.5.2l-9.4 9.4-18.9 18.9c-.4.4-.4 1 0 1.4l4.2 4.2c.4.4 1 .4 1.4 0 2.3-2.2 6.1-2.1 8.3.2 2.3 2.2 2.4 6 .2 8.3-.4.4-.4 1 0 1.4l4.2 4.2c.2.2.5.3.7.3s.5-.1.7-.3l14.8-14.8c.2 0 .3-.1.4-.2l4.2-4.2c.1-.1.1-.2.2-.3l8.7-8.7c.2-.2.3-.5.3-.8.1-.1 0-.4-.2-.6zm-19-16.2l2.9 2.9c-2.3 3.1-2 7.6.8 10.3 2.8 2.8 7.2 3.1 10.4.9l2.8 2.8-7.5 7.5-16.9-16.9 7.5-7.5zm-9.4 9.4l16.8 16.9-2.3 2.3-16.9-16.9 2.4-2.3zm-.6 34.4l-2.8-2.8c2.3-3.1 2-7.6-.8-10.3-2.8-2.8-7.2-3.1-10.4-.9l-2.8-2.8 9.8-9.8c0 .1.1.2.2.3l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4c-.1-.1-.2-.1-.3-.2l2.6-2.6 16.9 16.9-2.6 2.6c0-.2-.1-.3-.2-.4l-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4c.1.1.3.2.4.2l-10 9.8z"></path> 82 <path fill="#9F3FE5" 83 d="M1213.2-1533.3c6.1 0 11 4.9 11 11s-4.9 11-11 11-11-4.9-11-11 4.9-11 11-11z"></path> 84 <path fill="#FFF" 85 d="M1213.2-1510.3c-6.6 0-12-5.4-12-12 0-3.2 1.2-6.2 3.5-8.5s5.3-3.5 8.5-3.5h.1c6.6 0 12 5.4 12 12s-5.5 12-12.1 12zm0-23v1c-2.7 0-5.2 1.1-7.1 2.9-1.9 1.9-2.9 4.4-2.9 7.1 0 5.5 4.5 10 10 10s10-4.5 10-10-4.5-10-10-10v-1z"></path> 86 <path fill="#FFF" 87 d="M1212.4-1517.6c-.2 0-.4-.1-.6-.2l-2.9-2.3c-.4-.3-.5-1-.2-1.4.3-.4 1-.5 1.4-.2l2.1 1.7 4.1-5.3c.3-.4 1-.5 1.4-.2.4.3.5 1 .2 1.4l-4.7 6.1c-.2.2-.4.3-.7.4h-.1z"></path> 88 </g> 89 </svg> 90 <p class="title"><?php echo esc_html__('Answered', 'nirweb-support') ?></p> 91 <p class="number c-purple"><?php nirweb_ticket_count_answered_ticket_user_fr() ?></p> 92 </div> 93 <div class="col_box_status_ticket_wpyar" id="all"> 94 <svg id="svg_total-ticket" viewBox="0 0 48.4 48.4" style="width: 50px"> 95 <g transform="translate(-2300 -319)"> 96 <path fill="#FEA000" d="M2318.241 335.827l3.748-3.747 16.475 16.475-3.748 3.748z"></path> 97 <path fill="#4D4D4D" 98 d="M2326.4 352.4c-.3 0-.5-.1-.7-.3l-2.4-2.4c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.4 2.4c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zm-4.9-4.9c-.3 0-.5-.1-.7-.3l-2.4-2.4c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l2.4 2.4c.4.4.4 1 0 1.4-.1.2-.4.3-.7.3z"></path> 99 <path fill="#E6E6E6" 100 d="M2338.4 348.5l9-9-3.8-3.8c-2.4 2.5-6.4 2.5-8.9.1-2.4-2.5-2.4-6.5.1-8.9l-3.8-3.8-9 9 16.4 16.4z"></path> 101 <path fill="#4D4D4D" 102 d="M2348.4 339.5c0-.1 0-.3-.1-.4 0-.1-.1-.2-.2-.3l-3.8-3.8c-.2-.2-.4-.3-.7-.3-.3 0-.5.1-.7.3-.5.5-1.1.9-1.7 1.2h-.2c-.3.1-.5.2-.8.2-.3.1-.7.1-1 .1-1.4 0-2.7-.5-3.7-1.5l-.1-.1c-1-1-1.5-2.4-1.5-3.7 0-1.3.6-2.7 1.6-3.7.2-.2.3-.4.3-.7v-.1c0-.3-.1-.5-.3-.7l-3.8-3.8c-.4-.4-1-.4-1.4 0l-27 27c-.4.4-.4 1 0 1.4l3.8 3.8c.2.2.4.3.7.3.3 0 .5-.1.7-.3 2-2.1 5.4-2.1 7.5-.1 2 2.1 2 5.4-.1 7.5-.2.2-.3.4-.3.7 0 .3.1.5.3.7l3.8 3.8c.2.2.5.3.7.3.3 0 .5-.1.7-.3l14-13.9c.1 0 .3-.1.4-.2l3.7-3.7c.1-.1.1-.2.2-.2l8.6-8.6.1-.1c.1-.1.2-.2.2-.3.1-.2.1-.3.1-.5zm-14.4-3c.8.8 1.8 1.3 2.8 1.7.1 0 .3.1.4.1.2 0 .3.1.5.1.3.1.6.1.9.1h1c.2 0 .4 0 .6-.1.3 0 .5-.1.8-.2.1 0 .2-.1.4-.1.3-.1.7-.2 1-.4.1 0 .1 0 .2-.1.4-.2.7-.4 1.1-.7l1.2 1.2 1.2 1.2-7.5 7.5-15-15 7.5-7.5 2.4 2.4c-1.1 1.4-1.6 3.1-1.5 4.8 0 2 .7 3.7 2 5zm-12-3l15 15-2.3 2.3-15-15 2.3-2.3zm-1.6 31.5l-2.4-2.4c2.2-2.8 2-6.9-.6-9.6-2.6-2.6-6.7-2.7-9.6-.6l-2.4-2.4 9.1-9.1v.1l1.4 1.4c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1.4-1.4h-.1l2.3-2.3 15 15-2.3 2.3-1.4-1.4c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1.4 1.4-9 9zM2301.4 347.3c-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l25.4-25.9c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4l-25.4 25.9c-.2.2-.4.3-.7.3z"></path> 103 </g> 104 </svg> 105 <p class="title"><?php echo esc_html__('Total', 'nirweb-support') ?></p> 106 <p class="number c-org"><?php nirweb_ticket_count_all_ticket_user_fr() ?></p> 107 </div> 108 </div> 109 <div class="head_wpyar_tickt"> 110 <h3><?php echo esc_html__('List of tickets', 'nirweb-support') ?></h3> 111 <?php if (is_plugin_active('wpyar_panel/wpyar_panel.php')) { ?> 112 <a class=" wpyar-ticket" 113 href="?endp=new-ticket"><?php echo esc_html__('New Ticket', 'nirweb-support') ?></a> 43 114 44 <?php }else{ ?>45 <a class=" wpyar-ticket" href="?action=new"><?php echo__('New Ticket', 'nirweb-support') ?></a>115 <?php } else { ?> 116 <a class=" wpyar-ticket" href="?action=new"><?php echo esc_html__('New Ticket', 'nirweb-support') ?></a> 46 117 47 <?php }?> 118 <?php } ?> 119 </div> 120 <di class="ajax_result"> 121 <div class="base_list_ticket_uwpyar"> 122 <ul class="ul_list_ticket_uwpyar"> 123 <?php foreach ($list_ticket[0] as $row) : ?> 124 <li> 125 <a href="?action=reply&id=<?php echo esc_html($row->ticket_id) ?>" 126 class="<?php 127 if ($row->status == 1) { 128 echo 'arbitrator_wpyaru-red'; 129 } 130 if ($row->status == 2) { 131 echo 'arbitrator_wpyaru-blue'; 132 } 133 if ($row->status == 3) { 134 echo 'arbitrator_wpyaru-purple'; 135 } 136 if ($row->status == 4) { 137 echo 'arbitrator_wpyaru-green'; 138 } ?>"> 139 <div class="info_user_time_wpyaru"> 140 <?php echo get_avatar($row->sender_id, 130); ?> 141 <div class="icon_nameUser"> 142 <svg id="svg_username" viewBox="0 0 14.8 17.1" style="width: 17px"> 143 <path d="M10.9 7.3c.6-.8.9-1.7.9-2.8C11.8 2 9.8 0 7.3 0S2.8 2 2.8 4.5c0 1.1.4 2 1 2.8C1.5 8.6 0 11.1 0 13.7c0 2.3 3.7 3.4 7.4 3.4s7.4-1 7.4-3.3c0-2.7-1.5-5.2-3.9-6.5zM7.3 1c2 0 3.5 1.6 3.5 3.5 0 2-1.6 3.5-3.5 3.5-2 0-3.5-1.6-3.5-3.5S5.4 1 7.3 1zm.1 15.1c-3.1 0-6.4-.8-6.4-2.4 0-2.3 1.3-4.5 3.3-5.6.9.6 2 1 3.1 1s2.2-.3 3-1c2 1.1 3.3 3.3 3.3 5.6.1 1.6-3.2 2.4-6.3 2.4z"></path> 144 </svg> 145 <?php echo esc_html($user->display_name); ?> 146 </div> 147 <time> 148 <?php 149 $orig_time = strtotime($row->time_update); 150 $date = strtotime($row->date_qustion); 151 echo esc_html(wp_date('d F', $date)) ?> 152 153 </time> 154 </div> 155 <div class="title_time_ticket"> 156 <p><?php echo esc_html($row->subject) ?></p> 157 <time> 158 <?php 159 $orig_time = strtotime($row->time_update); 160 ago_ticket_nirweb($orig_time) ?> 161 </time> 162 </div> 163 </a> 164 </li> 165 <?php endforeach ?> 166 </ul> 48 167 </div> 49 <di class="ajax_result"> 50 <div class="base_list_ticket_uwpyar"> 51 <ul class="ul_list_ticket_uwpyar"> 52 <?php foreach ($list_ticket[0] as $row) : ?> 53 <li> 54 <a href="?action=reply&id=<?php echo $row->ticket_id ?>" 55 class="<?php 56 if ($row->status == 1) { 57 echo 'arbitrator_wpyaru-red'; 58 } 59 if ($row->status == 2) { 60 echo 'arbitrator_wpyaru-blue'; 61 } 62 if ($row->status == 3) { 63 echo 'arbitrator_wpyaru-purple'; 64 } 65 if ($row->status == 4) { 66 echo 'arbitrator_wpyaru-green'; 67 } ?>" > 68 <div class="info_user_time_wpyaru"> 69 <?php echo get_avatar( $row->sender_id, 130); ?> 70 <div class="icon_nameUser"> 71 <svg id="svg_username" viewBox="0 0 14.8 17.1" style="width: 17px"><path d="M10.9 7.3c.6-.8.9-1.7.9-2.8C11.8 2 9.8 0 7.3 0S2.8 2 2.8 4.5c0 1.1.4 2 1 2.8C1.5 8.6 0 11.1 0 13.7c0 2.3 3.7 3.4 7.4 3.4s7.4-1 7.4-3.3c0-2.7-1.5-5.2-3.9-6.5zM7.3 1c2 0 3.5 1.6 3.5 3.5 0 2-1.6 3.5-3.5 3.5-2 0-3.5-1.6-3.5-3.5S5.4 1 7.3 1zm.1 15.1c-3.1 0-6.4-.8-6.4-2.4 0-2.3 1.3-4.5 3.3-5.6.9.6 2 1 3.1 1s2.2-.3 3-1c2 1.1 3.3 3.3 3.3 5.6.1 1.6-3.2 2.4-6.3 2.4z"></path></svg> 72 <?php echo esc_html($user->display_name); ?> 73 </div> 74 <time> 75 <?php 76 $orig_time = strtotime( $row->time_update); 77 $date = strtotime($row->date_qustion); 78 echo $date = wp_date('d F', $date); ?> 79 80 </time> 81 </div> 82 <div class="title_time_ticket"> 83 <p><?php echo esc_html($row->subject) ?></p> 84 <time> 85 <?php 86 $orig_time = strtotime( $row->time_update); 87 ago_ticket_nirweb($orig_time) ?> 88 </time> 89 </div> 90 </a> 91 </li> 92 <?php endforeach ?> 93 </ul> 168 <div class="pagination_ticket_index"> 169 <?php echo esc_html($list_ticket[1]) ?> 170 </div> 171 </di> 94 172 </div> 95 <div class="pagination_ticket_index">96 <?php echo esc_html($list_ticket[1]) ?>97 </div>98 </di>99 </div> -
nirweb-support/trunk/inc/user/themes/new_ticket.php
r2707344 r2708596 8 8 <div class="top_box_send_ticket"> 9 9 <div class="head_send_ticket_wpyar"> 10 <h4 class="wpyar-ticket"><?php echo __('New Ticket', 'nirweb-support') ?></h4>10 <h4 class="wpyar-ticket"><?php echo esc_html__('New Ticket', 'nirweb-support') ?></h4> 11 11 <?php 12 12 if (is_plugin_active('wpyar_panel/wpyar_panel.php')) { … … 14 14 } else { 15 15 if (wpyar_ticket['select_page_ticket']) { 16 $page = esc_url (get_page_link(wpyar_ticket['select_page_ticket']));16 $page = esc_url_raw(get_page_link(wpyar_ticket['select_page_ticket'])); 17 17 } else { 18 18 $page = get_permalink(get_option('woocommerce_myaccount_page_id')) . 'wpyar-ticket/'; … … 20 20 } 21 21 ?> 22 <a href=" <?php echo $page; ?> "23 class="btn btn_back_wpyt"><?php echo __('Back To List Tickets', 'nirweb-support') ?></a>22 <a href=" <?php echo esc_url_raw($page); ?> " 23 class="btn btn_back_wpyt"><?php echo esc_html__('Back To List Tickets', 'nirweb-support') ?></a> 24 24 </div> 25 25 <div class="content_ticket_send"> … … 35 35 <span class="title_faq_wpyar"><?php echo esc_html($value->question) ?></span> 36 36 </p> 37 <div class="content_faq_wpyar"><?php echo $value->answer?> </div>37 <div class="content_faq_wpyar"><?php echo esc_html($value->answer) ?> </div> 38 38 </li> 39 39 <?php endforeach; ?> … … 43 43 echo "style='display:none !important'"; 44 44 } ?> > 45 <span><?php echo __('I didn\'t find the answer to my question', 'nirweb-support') ?></span>45 <span><?php echo esc_html__('I didn\'t find the answer to my question', 'nirweb-support') ?></span> 46 46 </div> 47 47 </div> … … 55 55 <div class="row_nirweb_ticket_send"> 56 56 <div class="w-50"> 57 <label for="nirweb_ticket_frm_subject_send_ticket_user"><?php echo __('Enter subject please *', 'nirweb-support') ?></label> 58 <input type="text" id="nirweb_ticket_frm_subject_send_ticket_user" 59 name="nirweb_ticket_frm_subject_send_ticket_user"> 57 <label for="nirweb_ticket_frm_subject_send_ticket_user"><?php echo esc_html__('Enter subject please *', 'nirweb-support') ?></label> 58 <input type="text" id="nirweb_ticket_frm_subject_send_ticket_user" name="nirweb_ticket_frm_subject_send_ticket_user"> 60 59 </div> 61 60 <!-- DepartMent--> 62 61 <div class="w-50"> 63 62 <div class="department_form_user_send"> 64 <label for="nirweb_ticket_frm_department_send_ticket_user"><?php echo __('Select department please *', 'nirweb-support') ?></label>63 <label for="nirweb_ticket_frm_department_send_ticket_user"><?php echo esc_html__('Select department please *', 'nirweb-support') ?></label> 65 64 <div class="select_custom_wpyar"> 66 65 <div class="custom_input_wpyar_send_ticket" id="nirweb_ticket_frm_department_send_ticket_user" 67 66 data-id="-1" data-user="0"> 68 <?php echo __('Select department', 'nirweb-support') ?>67 <?php echo esc_html__('Select department', 'nirweb-support') ?> 69 68 </div> 70 69 <i class="fal fa-angle-down"></i> … … 84 83 <div class="row_nirweb_ticket_send"> 85 84 <div class="w-50"> 86 <label for="nirweb_ticket_frm_priority_send_ticket_user"><?php echo __('Priority *', 'nirweb-support') ?></label>85 <label for="nirweb_ticket_frm_priority_send_ticket_user"><?php echo esc_html__('Priority *', 'nirweb-support') ?></label> 87 86 <div class="select_custom_wpyar"> 88 <div class="custom_input_wpyar_send_ticket" id="nirweb_ticket_frm_priority_send_ticket_user" 89 data-id="-1"> 90 <?php echo __('Select priority', 'nirweb-support') ?> 87 <div class="custom_input_wpyar_send_ticket" id="nirweb_ticket_frm_priority_send_ticket_user" data-id="-1"> 88 <?php echo esc_html__('Select priority', 'nirweb-support') ?> 91 89 </div> 92 90 <i class="fal fa-angle-down"></i> 93 91 <ul> 94 <li data-id="1"> <?php echo __('low', 'nirweb-support') ?></li>95 <li data-id="2"> <?php echo __('normal', 'nirweb-support') ?></li>96 <li data-id="3"> <?php echo __('necessary', 'nirweb-support') ?></li>92 <li data-id="1"> <?php echo esc_html__('low', 'nirweb-support') ?></li> 93 <li data-id="2"> <?php echo esc_html__('normal', 'nirweb-support') ?></li> 94 <li data-id="3"> <?php echo esc_html__('necessary', 'nirweb-support') ?></li> 97 95 </ul> 98 96 </div> … … 101 99 <?php if (is_plugin_active('woocommerce/woocommerce.php')){ ?> 102 100 <label for="product_user_wpyar_tixket"> 103 <?php echo __('Product', 'nirweb-support') ?>101 <?php echo esc_html__('Product', 'nirweb-support') ?> 104 102 <?php if (@wpyar_ticket['require_procut_user_wpyar'] == '1') { 105 103 echo ' * '; … … 108 106 <div class="select_custom_wpyar"> 109 107 <div class="custom_input_wpyar_send_ticket" id="product_user_wpyar_tixket" data-id="-1"> 110 <?php echo __('Select Product', 'nirweb-support') ?>108 <?php echo esc_html__('Select Product', 'nirweb-support') ?> 111 109 </div> 112 110 <i class="fal fa-angle-down"></i> … … 128 126 $product_name = $item->get_name(); 129 127 ?> 130 <li data-id="<?php echo $item['product_id']?>">131 <?php echo get_the_title( $item['product_id']) ?>128 <li data-id="<?php echo esc_html($item['product_id']) ?>"> 129 <?php echo esc_html(get_the_title( $item['product_id'])) ?> 132 130 </li> 133 131 <?php } … … 137 135 </div> 138 136 <?php } else if (is_plugin_active('easy-digital-downloads/easy-digital-downloads.php')){ ?> 139 <label> <?php echo __('Product', 'nirweb-support') ?></label>137 <label> <?php echo esc_html__('Product', 'nirweb-support') ?></label> 140 138 <div class="select_custom_wpyar"> 141 139 <div class="custom_input_wpyar_send_ticket" id="product_user_wpyar_tixket" data-id="-1"> 142 <?php echo __('Select Product', 'nirweb-support') ?>140 <?php echo esc_html__('Select Product', 'nirweb-support') ?> 143 141 </div> 144 142 <i class="fal fa-angle-down"></i> … … 156 154 <div class="row_nirweb_ticket_send"> 157 155 <div class="w-100"> 158 <label><?php echo __('Enter Message', 'nirweb-support'); ?></label>156 <label><?php echo esc_html__('Enter Message', 'nirweb-support'); ?></label> 159 157 <textarea id="nirweb_ticket_frm_content_send_ticket_user" 160 158 name="nirweb_ticket_frm_content_send_ticket_user" 161 placeholder="<?php echo __('Enter Message please', 'nirweb-support'); ?>"></textarea>159 placeholder="<?php echo esc_html__('Enter Message please', 'nirweb-support'); ?>"></textarea> 162 160 </div> 163 161 </div> … … 168 166 <span class="remove_file_by_user"><i class="fal fa-times-circle"></i></span> 169 167 <i class="fal fa-arrow-up upicon" style="font-size: 30px;margin-bottom: 10px;"></i> 170 <span class="text_label_main_image"> <?php echo __('Attachment File', 'nirweb-support') ?></span>168 <span class="text_label_main_image"> <?php echo esc_html__('Attachment File', 'nirweb-support') ?></span> 171 169 </label> 172 170 <input type="file" name="main_image" id="main_image" … … 181 179 <div class="double-bounce2"></div> 182 180 </div> 183 <p><?php echo __('Send Request ...', 'nirweb-support') ?></p>181 <p><?php echo esc_html__('Send Request ...', 'nirweb-support') ?></p> 184 182 </div> 185 183 186 184 <button data-fileurl="" type="submit" class="btn btn-primary text-white" 187 185 name="nirweb_ticket_frm_user_send_ticket" id="nirweb_ticket_frm_user_send_ticket"> 188 <?php echo __('Send Ticket', 'nirweb-support') ?>186 <?php echo esc_html__('Send Ticket', 'nirweb-support') ?> 189 187 </button> 190 188 <p class="stasus_send_wpyt"></p> 191 189 </div> 192 190 </form> 193 <?php $accsses_file = str_replace('.', '', trim(wpyar_ticket['mojaz_file_upload_user_wpyar'])); 191 <?php 192 add_action('wp_footer',function (){ 193 $accsses_file = str_replace('.', '', esc_html(trim(wpyar_ticket['mojaz_file_upload_user_wpyar']))); 194 194 $accsses_file = explode(",", trim($accsses_file)); ?> 195 195 <!-- End form--> … … 200 200 switch (ext) { 201 201 <?php foreach ($accsses_file as $file):?> 202 case "<?php echo $file?>":202 case "<?php echo esc_html($file) ?>": 203 203 break; 204 204 <?php endforeach; ?> … … 260 260 alert(wpyarticket.nvalid_file); 261 261 jQuery('.base_loarder').css('display', 'none'); 262 jQuery('.text_label_main_image').html('<?php echo __('Attachment File', 'nirweb-support') ?>');262 jQuery('.text_label_main_image').html('<?php echo esc_html__('Attachment File', 'nirweb-support') ?>'); 263 263 return false; 264 264 } 265 265 jQuery('.base_loarder').css('display', 'none'); 266 alert_success("<?php echo __('Send Ticket Success', 'nirweb-support') ?>");266 alert_success("<?php echo esc_html__('Send Ticket Success', 'nirweb-support') ?>"); 267 267 setTimeout(() => { 268 268 location.reload(); … … 284 284 jQuery('.bg_alert__nirweb').hide(); 285 285 }) 286 287 288 286 jQuery('body').on('click', '.box_alert_nirweb', function (e) { 289 287 e.preventDefault(); … … 317 315 } 318 316 </script> 317 <?php }) 318 ?> 319 319 </div> -
nirweb-support/trunk/inc/user/themes/replay_ticket.php
r2707344 r2708596 1 1 <div class="nirweb_ticket_base"> 2 <?php 3 $ticket_id = sanitize_text_field($_GET['id']); 4 $user_tickets = array(); 5 include NIRWEB_SUPPORT_INC_USER_FUNCTIONS_TICKET . 'func_u_list_ticket.php'; 6 $ticket = nirweb_ticket_get_list_all_ticket_user(); 7 foreach ($ticket as $tts) { 8 if (is_array($tts) || is_object($tts)) { 9 foreach ($tts as $rs) { 10 array_push($user_tickets, $rs->ticket_id); 2 <?php 3 $ticket_id = sanitize_text_field($_GET['id']); 4 $user_tickets = array(); 5 include NIRWEB_SUPPORT_INC_USER_FUNCTIONS_TICKET . 'func_u_list_ticket.php'; 6 $ticket = nirweb_ticket_get_list_all_ticket_user(); 7 foreach ($ticket as $tts) { 8 if (is_array($tts) || is_object($tts)) { 9 foreach ($tts as $rs) { 10 array_push($user_tickets, $rs->ticket_id); 11 } 11 12 } 12 13 } 13 } 14 if (in_array($ticket_id, $user_tickets)) { 15 include NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_status_and_priority.php';16 $info_ticket = nirweb_ticket_edit_ticket($ticket_id);17 include NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_list_answered.php';18 $info_answerd = nirweb_ticket_get_list_answerd(); ?>19 <div class="top_box_back_rep">20 <?php21 if(is_plugin_active('wpyar_panel/wpyar_panel.php' )){22 $page =slug_page.'?endp=nirweb-ticket';23 }else{24 if( wpyar_ticket['select_page_ticket']){25 $page = esc_url( get_page_link( wpyar_ticket['select_page_ticket'] ) );26 }else{27 $page = get_permalink( get_option('woocommerce_myaccount_page_id') ).'wpyar-ticket/';14 if (in_array($ticket_id, $user_tickets)) { 15 include NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_status_and_priority.php'; 16 $info_ticket = nirweb_ticket_edit_ticket($ticket_id); 17 include NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_list_answered.php'; 18 $info_answerd = nirweb_ticket_get_list_answerd(); ?> 19 <div class="top_box_back_rep"> 20 <?php 21 if (is_plugin_active('wpyar_panel/wpyar_panel.php')) { 22 $page = slug_page . '?endp=nirweb-ticket'; 23 } else { 24 if (wpyar_ticket['select_page_ticket']) { 25 $page = esc_url_raw(get_page_link(wpyar_ticket['select_page_ticket'])); 26 } else { 27 $page = get_permalink(get_option('woocommerce_myaccount_page_id')) . 'wpyar-ticket/'; 28 } 28 29 } 29 }30 ?>31 <a href=" <?php echo $page; ?> " class="btn btn_back_wpyt"> <?php echo __('Back To List Tickets', 'nirweb-support') ?> </a>32 </div>33 <div class="edit_ticket_bg">34 < !-~~ Start Base ~~~-->35 <div class="display_content_ticket">30 ?> 31 <a href=" <?php echo esc_url_raw($page); ?> " class="btn btn_back_wpyt"> 32 <?php echo esc_html__('Back To List Tickets', 'nirweb-support') ?> 33 </a> 34 </div> 35 <div class="edit_ticket_bg"> 36 <div class="display_content_ticket"> 36 37 <span> 37 <?php echo __('Subject', 'nirweb-support'); ?>38 <?php echo esc_html__('Subject', 'nirweb-support'); ?> 38 39 <span class="subject_ticket"> <?php echo esc_html($info_ticket->subject) ?></span> 39 40 </span> 40 <span> 41 <?php echo __('Ticket Number', 'nirweb-support'); ?> 42 <?php echo esc_html($ticket_id) ?></span> 43 </div> 44 <div class="info_wpyar_ticket wpyar-ticket"> 45 <!-~~ Start info ticket ~~~--> 46 <div class="box_info_ticket"> 47 <p class="title"><?php echo __('Department' , 'nirweb-support') ?></p> 48 <p class="info dep" user-id="<?php echo esc_html($info_ticket->support_id) ?>"><?php echo esc_html($info_ticket->depname) ?></p> 49 </div> 50 <div class="box_info_ticket"> 51 <p class="title"><?php echo __('Status', 'nirweb-support') ?></p> 52 <p class="info"> <?php echo esc_html($info_ticket->name_status) ?></p> 53 </div> 54 <div class="box_info_ticket"> 55 <p class="title"><?php echo __('Priority', 'nirweb-support') ?></p> 56 <p class="info priority"><?php echo esc_html($info_ticket->proname) ?></p> 57 </div> 58 <?php if ($info_ticket->product_name): ?> 41 <span> 42 <?php echo esc_html__('Ticket Number', 'nirweb-support'); ?> 43 <?php echo esc_html($ticket_id) ?></span> 44 </div> 45 <div class="info_wpyar_ticket wpyar-ticket"> 59 46 <div class="box_info_ticket"> 60 <p class="title"><?php echo __('Product', 'nirweb-support') ?></p> 61 <p class="info priority"><?php echo esc_html($info_ticket->product_name) ?></p> 62 </div> 63 <?php endif; ?> 64 65 </div> 66 </div> 67 68 69 <div class="box_answer_war_wpyar_ticket"> 70 <div class="ticket_question"> 71 <div class="img_avatar_wpyartick"> 72 73 <?php echo get_avatar($info_ticket->sender_id, 100 ) ?> 74 </div> 75 76 <div class="info_answer_box_wpyartick"> 77 <div class="text_message_wpyartick"> 78 <?php echo wpautop( esc_html($info_ticket->content) ) ?> 79 80 <?php if ($info_ticket->file_url): ?> 81 <p class="file_atach_url"> 82 <a href="<?php echo esc_url($info_ticket->file_url) ?>" target="_blank"> 83 <?php echo __('Attachment File', 'nirweb-support') ?> 84 </a> 85 </p> 86 <?php endif; ?> 87 </div> 88 89 <div class="head_answer"> 90 <span class="name"> 91 <?php echo esc_html($info_ticket->display_name); ?> 92 </span> 93 <span class="date"> 94 <?php echo __('Date ', 'nirweb-support') ?> : 95 96 <?php echo wp_date('d F Y', strtotime($info_ticket->date_qustion)) ?> 97 </span> 98 <span class="time"> 99 <?php echo __(' Hour ', 'nirweb-support') ?> 100 <?php echo $date = date('H:i:s', strtotime($info_ticket->date_qustion)); ?> 101 </span> 102 103 </div> 104 105 </div> 106 </div> 107 <div class="list_answerd_in_dash_admin"> 108 <ul class="list_all_answered"> 109 <?php foreach ($info_answerd as $row): 110 111 $user = get_userdata($row->user_id); 112 $role = $user->roles; 113 114 if ((in_array('user_support', $role)) or (in_array('administrator', $role))) { 115 $cls = 'user_support_wpyar'; 116 } else { 117 $cls = ''; 118 } 119 ?> 120 121 <li class="<?php echo $cls ?>"> 122 <div class="img_avatar_wpyartick"> 123 <?php echo get_avatar($row->user_id, 100) ?> 124 </div> 125 126 <div class="info_answer_box_wpyartick"> 127 <div class="text_message_wpyartick"> 128 <?php echo wpautop(sanitize_textarea_field($row->text)) ?> 129 <?php if ($row->attach_url) { ?> 130 <p class="file_atach_url"> 131 <a href="<?php echo esc_url($row->attach_url) ?>" target="_blank"> 132 <?php echo __('Attachment File', 'nirweb-support') ?> 133 </a> 134 </p> 135 <?php } ?> 136 </div> 137 138 139 <div class="head_answer"> 47 <p class="title"><?php echo esc_html__('Department', 'nirweb-support') ?></p> 48 <p class="info dep" 49 user-id="<?php echo esc_html($info_ticket->support_id) ?>"><?php echo esc_html($info_ticket->depname) ?></p> 50 </div> 51 <div class="box_info_ticket"> 52 <p class="title"><?php echo esc_html__('Status', 'nirweb-support') ?></p> 53 <p class="info"> <?php echo esc_html($info_ticket->name_status) ?></p> 54 </div> 55 <div class="box_info_ticket"> 56 <p class="title"><?php echo esc_html__('Priority', 'nirweb-support') ?></p> 57 <p class="info priority"><?php echo esc_html($info_ticket->proname) ?></p> 58 </div> 59 <?php if ($info_ticket->product_name): ?> 60 <div class="box_info_ticket"> 61 <p class="title"><?php echo esc_html__('Product', 'nirweb-support') ?></p> 62 <p class="info priority"><?php echo esc_html($info_ticket->product_name) ?></p> 63 </div> 64 <?php endif; ?> 65 66 </div> 67 </div> 68 <div class="box_answer_war_wpyar_ticket"> 69 <div class="ticket_question"> 70 <div class="img_avatar_wpyartick"> 71 <?php echo get_avatar($info_ticket->sender_id, 100) ?> 72 </div> 73 74 <div class="info_answer_box_wpyartick"> 75 <div class="text_message_wpyartick"> 76 <?php echo wpautop(esc_html($info_ticket->content)) ?> 77 78 <?php if ($info_ticket->file_url): ?> 79 <p class="file_atach_url"> 80 <a href="<?php echo esc_url_raw($info_ticket->file_url) ?>" target="_blank"> 81 <?php echo esc_html__('Attachment File', 'nirweb-support') ?> 82 </a> 83 </p> 84 <?php endif; ?> 85 </div> 86 87 <div class="head_answer"> 88 <span class="name"> 89 <?php echo esc_html($info_ticket->display_name); ?> 90 </span> 91 <span class="date"> 92 <?php echo esc_html__('Date ', 'nirweb-support') ?> : 93 <?php echo esc_html(wp_date('d F Y', strtotime($info_ticket->date_qustion))) ?> 94 </span> 95 <span class="time"> 96 <?php echo esc_html__(' Hour ', 'nirweb-support') ?> 97 <?php echo esc_html(date('H:i:s', strtotime($info_ticket->date_qustion))) ?> 98 </span> 99 </div> 100 </div> 101 </div> 102 <div class="list_answerd_in_dash_admin"> 103 <ul class="list_all_answered"> 104 <?php foreach ($info_answerd as $row): 105 $user = get_userdata($row->user_id); 106 $role = $user->roles; 107 if ((in_array('user_support', $role)) or (in_array('administrator', $role))) { 108 $cls = 'user_support_wpyar'; 109 } else { 110 $cls = ''; 111 } ?> 112 <li class="<?php echo $cls ?>"> 113 <div class="img_avatar_wpyartick"> 114 <?php echo get_avatar($row->user_id, 100) ?> 115 </div> 116 117 <div class="info_answer_box_wpyartick"> 118 <div class="text_message_wpyartick"> 119 <?php echo wpautop(esc_html($row->text)) ?> 120 <?php if ($row->attach_url) { ?> 121 <p class="file_atach_url"> 122 <a href="<?php echo esc_url_raw($row->attach_url) ?>" target="_blank"> 123 <?php echo esc_html__('Attachment File', 'nirweb-support') ?> 124 </a> 125 </p> 126 <?php } ?> 127 </div> 128 129 130 <div class="head_answer"> 140 131 <span class="name"> 141 132 <?php echo esc_html($row->display_name) ?> 142 133 </span> 143 <?php if (in_array('user_support', $role)) { ?> 144 <span class="time"> 145 <?php echo __('Hour', 'nirweb-support') ?> 146 <?php echo $date = date('H:i:s', strtotime($row->time_answer)); ?> 147 </span> 148 <span class="date"> 149 <?php echo __('Date :', 'nirweb-support') ?> : 150 <?php echo wp_date('d F Y', strtotime($row->time_answer)) ?> 151 </span> 152 <?php } else { ?> 153 <span class="date"> 154 <?php echo __('Date :', 'nirweb-support') ?> : 155 <?php echo wp_date('d F Y', strtotime($row->time_answer)) ?> 156 </span> 157 <span class="time"> 158 <?php echo __('Hour', 'nirweb-support') ?> 159 <?php echo $date = date('H:i:s', strtotime($row->time_answer)); ?> 160 </span> 161 <?php } ?> 162 163 </div> 164 134 <?php if (in_array('user_support', $role)) { ?> 135 <span class="time"> 136 <?php echo esc_html__('Hour', 'nirweb-support') ?> 137 <?php echo esc_html(date('H:i:s', strtotime($row->time_answer))); ?> 138 </span> 139 <span class="date"> 140 <?php echo esc_html__('Date :', 'nirweb-support') ?> : 141 <?php echo esc_html(wp_date('d F Y', strtotime($row->time_answer))) ?> 142 </span> 143 <?php } else { ?> 144 <span class="date"> 145 <?php echo esc_html__('Date :', 'nirweb-support') ?> : 146 <?php echo esc_html(wp_date('d F Y', strtotime($row->time_answer))) ?> 147 </span> 148 <span class="time"> 149 <?php echo esc_html__('Hour', 'nirweb-support') ?> 150 <?php echo esc_html(date('H:i:s', strtotime($row->time_answer))); ?> 151 </span> 152 <?php } ?> 153 154 </div> 155 156 </div> 157 158 </li> 159 <?php endforeach ?> 160 </ul> 161 </div> 162 </div> 163 164 <div class="row_wpyt"> 165 <div class="content_answer_user_wpyar_ticket"> 166 <form action="" id="answer_form"> 167 <div class="w-100"> 168 <label><?php echo esc_html__('Message *', 'nirweb-support') ?></label> 169 <textarea id="user_content_answ" name="user_content_answ" 170 placeholder="<?php echo esc_html__('Enter the text of the message Plase', 'nirweb-support') ?>"></textarea> 171 </div> 172 173 <div class="row_wpyar_ticket "> 174 <div class="row_nirweb_ticket_send wpyar_upfile_base"> 175 <div class="upfile_wpyartick"> 176 177 <label for="main_image" class="label_main_image"> 178 <span class="remove_file_by_user"><i class="fal fa-times-circle"></i></span> 179 <i class="fal fa-arrow-up upicon" style="font-size: 30px;margin-bottom: 10px;"></i> 180 <span class="text_label_main_image"> 181 <?php echo esc_html__('Attachment File', 'nirweb-support') ?> 182 </span> 183 </label> 184 <input type="file" name="main_image" id="main_image" 185 accept="<?php 186 echo esc_html(wpyar_ticket['mojaz_file_upload_user_wpyar']) ?>"> 187 188 </div> 189 190 <div id="apf-response"></div> 165 191 </div> 166 192 167 </li> 168 <?php endforeach ?> 169 </ul> 170 </div> 171 </div> 172 173 174 <!-~~~ End info ticket ~~~--> 175 176 <div class="row_wpyt"> 177 <!-~~ start row ~~~--> 178 <div class="content_answer_user_wpyar_ticket"> 179 <form action="" id="answer_form"> 180 <div class="w-100"> 181 <label><?php echo __('Message *', 'nirweb-support') ?></label> 182 <textarea id="user_content_answ" name="user_content_answ" 183 placeholder="<?php echo __('Enter the text of the message Plase', 'nirweb-support') ?>"></textarea> 184 </div> 185 186 <div class="row_wpyar_ticket "> 187 <div class="row_nirweb_ticket_send wpyar_upfile_base"> 188 <div class="upfile_wpyartick"> 189 190 <label for="main_image" class="label_main_image"> 191 <span class="remove_file_by_user"><i class="fal fa-times-circle"></i></span> 192 <i class="fal fa-arrow-up upicon" style="font-size: 30px;margin-bottom: 10px;"></i> 193 <span class="text_label_main_image"> 194 <?php echo __('Attachment File', 'nirweb-support') ?> 195 </span> 196 </label> 197 <input type="file" name="main_image" id="main_image" 198 accept="<?php 199 echo esc_html(wpyar_ticket['mojaz_file_upload_user_wpyar']) ?>"> 200 193 </div> 194 <div class="wpyar-ticket box_btn_send_answer_user"> 195 <div class="base_loarder"> 196 <div class="spinner"> 197 <div class="double-bounce1"></div> 198 <div class="double-bounce2"></div> 199 </div> 200 <p><?php echo esc_html__('Send Request ...', 'nirweb-support') ?></p> 201 201 </div> 202 202 203 <div id="apf-response"></div> 204 </div> 205 206 </div> 207 <div class="wpyar-ticket box_btn_send_answer_user"> 208 <div class="base_loarder"> 209 <div class="spinner"> 210 <div class="double-bounce1"></div> 211 <div class="double-bounce2"></div> 203 <div class="box_btn_send_answer_user"> 204 <input id="closed_answer" name="closed_answer" value="closed_answer" type="checkbox"> 205 <label for="closed_answer"><?php echo esc_html__('Close Ticket', 'nirweb-support') ?></label> 212 206 </div> 213 <p><?php echo __('Send Request ...', 'nirweb-support') ?></p> 214 </div> 215 216 <div class="box_btn_send_answer_user"> 217 <input id="closed_answer" name="closed_answer" value="closed_answer" type="checkbox"> 218 <label for="closed_answer"><?php echo __('Close Ticket', 'nirweb-support') ?></label> 219 </div> 220 221 <button data-id="<?php echo sanitize_text_field($_GET['id']) ?>" class="send_user_answer"><?php echo __('Send Answer', 'nirweb-support') ?></button> 222 </div> 223 224 </form> 225 226 </div> 227 </div> 228 <?php $accsses_file = str_replace('.','',trim( wpyar_ticket['mojaz_file_upload_user_wpyar'])); 229 $accsses_file = explode(",",trim($accsses_file));?> 230 231 <script> 232 jQuery("#main_image").change(function () { 233 var ext = this.value.match(/\.(.+)$/)[1]; 234 switch (ext) { 235 <?php foreach ($accsses_file as $file):?> 236 case "<?php echo $file ?>": 237 <?php endforeach; ?> 238 break; 239 default: 240 alert( wpyarticket.nvalid_file); 241 this.value = ''; 242 } 243 }); 244 jQuery('.send_user_answer').click(function (e) { 245 246 e.preventDefault(); 247 248 jQuery('.base_loarder').css('display', 'flex'); 249 var user_answer = jQuery('#user_content_answ').val(); 250 var tik_id = jQuery(this).attr('data-id'); 251 var id_user = jQuery('.dep').attr('user-id'); 252 var dep_name = jQuery('.dep').text(); 253 var priority_name =jQuery('.priority').text(); 254 var subject = jQuery('.subject_ticket').text(); 255 var closed_answer = jQuery('input[name=closed_answer]:checked').val(); 256 var formData = new FormData(); 257 258 var formData = new FormData(); 259 260 formData.append('updoc', jQuery('input[type=file]')[0].files[0]); 261 formData.append('user_answer', user_answer), 262 formData.append('tik_id', tik_id), 263 formData.append('id_user', id_user), 264 formData.append('dep_name', dep_name), 265 formData.append('subject', subject), 266 formData.append('priority_name', priority_name); 267 if (closed_answer) { 268 formData.append('closed_answer', closed_answer); 269 } 270 if (jQuery('input[type=file]')[0].files[0]) { 271 var size_file = jQuery('input[type=file]')[0].files[0]['size']; 272 var ac_size = <?php echo wpyar_ticket['size_of_file_wpyartik']; ?>000000; 273 274 if (size_file >= ac_size) { 275 jQuery('.text_upload').css('display', 'none') 276 alert(wpyarticket.max_size_file); 277 return false 278 } 279 } 280 281 282 formData.append('action', "user_answer_ticket"); 283 jQuery.ajax({ 284 url: wpyarticket.ajax_url, 285 type: "POST", 286 data: formData, cache: false, 287 processData: false, 288 contentType: false, 289 success: function (response) { 290 if(response =='error_valid_type'){ 291 alert( wpyarticket.nvalid_file); 292 jQuery('.base_loarder').css('display','none'); 293 jQuery('.text_label_main_image').html('<?php echo __('Attachment File', 'nirweb-support') ?>'); 294 return false; 295 } 296 jQuery('.base_loarder').css('display', 'none'); 297 jQuery('#answer_form').trigger('reset'); 298 jQuery('.list_all_answered').html(response) 299 jQuery('.remove_file_by_user').hide(); 300 jQuery('.text_label_main_image').html('<?php echo __('Attachment File', 'nirweb-support') ?>'); 301 window.location.reload(); 302 }, 303 304 }); 305 306 307 }); 308 309 310 </script> 311 312 <?php } else { 313 echo '<p>'.__('You do not have permission to access this ticket', 'nirweb-support').'</p>'; 314 } ?> 207 208 <button data-id="<?php echo esc_html($_GET['id']) ?>" 209 class="send_user_answer"><?php echo esc_html__('Send Answer', 'nirweb-support') ?></button> 210 </div> 211 212 </form> 213 214 </div> 215 </div> 216 <?php add_action('wp_footer',function (){ 217 $accsses_file = str_replace('.', '', trim(wpyar_ticket['mojaz_file_upload_user_wpyar'])); 218 $accsses_file = explode(",", trim($accsses_file)); ?> 219 <script> 220 jQuery("#main_image").change(function () { 221 var ext = this.value.match(/\.(.+)$/)[1]; 222 switch (ext) { 223 <?php foreach ($accsses_file as $file):?> 224 case "<?php echo esc_html($file) ?>": 225 <?php endforeach; ?> 226 break; 227 default: 228 alert(wpyarticket.nvalid_file); 229 this.value = ''; 230 } 231 }); 232 jQuery('.send_user_answer').click(function (e) { 233 e.preventDefault(); 234 jQuery('.base_loarder').css('display', 'flex'); 235 var user_answer = jQuery('#user_content_answ').val(); 236 var tik_id = jQuery(this).attr('data-id'); 237 var id_user = jQuery('.dep').attr('user-id'); 238 var dep_name = jQuery('.dep').text(); 239 var priority_name = jQuery('.priority').text(); 240 var subject = jQuery('.subject_ticket').text(); 241 var closed_answer = jQuery('input[name=closed_answer]:checked').val(); 242 var formData = new FormData(); 243 formData.append('updoc', jQuery('input[type=file]')[0].files[0]); 244 formData.append('user_answer', user_answer), 245 formData.append('tik_id', tik_id), 246 formData.append('id_user', id_user), 247 formData.append('dep_name', dep_name), 248 formData.append('subject', subject), 249 formData.append('priority_name', priority_name); 250 if (closed_answer) { 251 formData.append('closed_answer', closed_answer); 252 } 253 if (jQuery('input[type=file]')[0].files[0]) { 254 var size_file = jQuery('input[type=file]')[0].files[0]['size']; 255 var ac_size = <?php echo wpyar_ticket['size_of_file_wpyartik']; ?>000000; 256 if (size_file >= ac_size) { 257 jQuery('.text_upload').css('display', 'none') 258 alert(wpyarticket.max_size_file); 259 return false 260 } 261 } 262 formData.append('action', "user_answer_ticket"); 263 jQuery.ajax({ 264 url: wpyarticket.ajax_url, 265 type: "POST", 266 data: formData, cache: false, 267 processData: false, 268 contentType: false, 269 success: function (response) { 270 console.log(response); 271 if (response == 'error_valid_type') { 272 alert(wpyarticket.nvalid_file); 273 jQuery('.base_loarder').css('display', 'none'); 274 jQuery('.text_label_main_image').html('<?php echo esc_html__('Attachment File', 'nirweb-support') ?>'); 275 return false; 276 } 277 jQuery('.base_loarder').css('display', 'none'); 278 jQuery('#answer_form').trigger('reset'); 279 jQuery('.list_all_answered').html(response) 280 jQuery('.remove_file_by_user').hide(); 281 jQuery('.text_label_main_image').html('<?php echo esc_html__('Attachment File', 'nirweb-support') ?>'); 282 //window.location.reload(); 283 }, 284 }); 285 }); 286 </script> 287 <?php }); 288 } else { 289 echo '<p>' . esc_html__('You do not have permission to access this ticket', 'nirweb-support') . '</p>'; 290 } ?> 315 291 </div> -
nirweb-support/trunk/nirweb-support.php
r2705518 r2708596 39 39 40 40 register_activation_hook(__FILE__, 'check_active_pro_wpyar_ticket'); 41 41 add_action('wp_enqueue_scripts',function (){ 42 wp_enqueue_script('jquery'); 43 }); 42 44 add_action( 'plugins_loaded',function() { 43 45 load_textdomain( 'nirweb-support', NIRWEB_SUPPORT_TICKET .'languages/nirweb-support-'. get_locale() .'.mo' ); -
nirweb-support/trunk/option/classes/admin-options.class.php
r2705518 r2708596 205 205 'id' => $menu_slug, 206 206 'title' => $menu_icon . esc_attr( $this->args['menu_title'] ), 207 'href' => esc_url ( ( is_network_admin() ) ? network_admin_url( 'admin.php?page='. $menu_slug ) : admin_url( 'admin.php?page='. $menu_slug ) ),207 'href' => esc_url_raw( ( is_network_admin() ) ? network_admin_url( 'admin.php?page='. $menu_slug ) : admin_url( 'admin.php?page='. $menu_slug ) ), 208 208 ) ); 209 209 … … 214 214 'id' => $menu_slug .'-'. $menu_key, 215 215 'title' => $menu_value[0], 216 'href' => esc_url ( ( is_network_admin() ) ? network_admin_url( 'admin.php?page='. $menu_value[2] ) : admin_url( 'admin.php?page='. $menu_value[2] ) ),216 'href' => esc_url_raw( ( is_network_admin() ) ? network_admin_url( 'admin.php?page='. $menu_value[2] ) : admin_url( 'admin.php?page='. $menu_value[2] ) ), 217 217 ) ); 218 218 } -
nirweb-support/trunk/option/classes/setup.class.php
r2705518 r2708596 372 372 // Set url constant 373 373 public static function include_plugin_url( $file ) { 374 return esc_url ( self::$url ) .'/'. ltrim( $file, '/' );374 return esc_url_raw( self::$url ) .'/'. ltrim( $file, '/' ); 375 375 } 376 376 … … 651 651 $query['display'] = 'swap'; 652 652 653 wp_enqueue_style( 'CSFTICKET-google-web-fonts', esc_url ( add_query_arg( $query, '//fonts.googleapis.com/css' ) ), array(), null );653 wp_enqueue_style( 'CSFTICKET-google-web-fonts', esc_url_raw( add_query_arg( $query, '//fonts.googleapis.com/css' ) ), array(), null ); 654 654 655 655 } … … 663 663 } 664 664 665 wp_enqueue_script( 'CSFTICKET-google-web-fonts', esc_url ( '//ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js' ), array(), null );665 wp_enqueue_script( 'CSFTICKET-google-web-fonts', esc_url_raw( '//ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js' ), array(), null ); 666 666 667 667 wp_localize_script( 'CSFTICKET-google-web-fonts', 'WebFontConfig', array( 'google' => array( 'families' => $fonts ) ) ); -
nirweb-support/trunk/option/fields/backup/backup.php
r2705011 r2708596 27 27 echo '<hr />'; 28 28 echo '<textarea readonly="readonly" class="CSFTICKET-export-data">'. esc_attr( json_encode( get_option( $unique ) ) ) .'</textarea>'; 29 echo '<a href="'. esc_url ( $export ) .'" class="button button-primary CSFTICKET-export" target="_blank">'. esc_html__( 'Export & Download', 'CSFTICKET' ) .'</a>';29 echo '<a href="'. esc_url_raw( $export ) .'" class="button button-primary CSFTICKET-export" target="_blank">'. esc_html__( 'Export & Download', 'CSFTICKET' ) .'</a>'; 30 30 echo '<hr />'; 31 31 echo '<button type="submit" name="CSFTICKET_transient[reset]" value="reset" class="button CSFTICKET-warning-primary CSFTICKET-confirm CSFTICKET-reset" data-unique="'. esc_attr( $unique ) .'" data-nonce="'. esc_attr( $nonce ) .'">'. esc_html__( 'Reset', 'CSFTICKET' ) .'</button>'; -
nirweb-support/trunk/option/fields/code_editor/code_editor.php
r2705518 r2708596 45 45 46 46 if ( ! wp_script_is( 'CSFTICKET-codemirror' ) ) { 47 wp_enqueue_script( 'CSFTICKET-codemirror', esc_url ( NIRWEB_SUPPORT_URL_CODESTAR_TICKET.'codemirror.min.js' ), array( 'CSFTICKET' ), $this->version, true );48 wp_enqueue_script( 'CSFTICKET-codemirror-loadmode', esc_url (NIRWEB_SUPPORT_URL_CODESTAR_TICKET.'loadmode.min.js' ), array( 'CSFTICKET-codemirror' ), $this->version, true );47 wp_enqueue_script( 'CSFTICKET-codemirror', esc_url_raw( NIRWEB_SUPPORT_URL_CODESTAR_TICKET.'codemirror.min.js' ), array( 'CSFTICKET' ), $this->version, true ); 48 wp_enqueue_script( 'CSFTICKET-codemirror-loadmode', esc_url_raw(NIRWEB_SUPPORT_URL_CODESTAR_TICKET.'loadmode.min.js' ), array( 'CSFTICKET-codemirror' ), $this->version, true ); 49 49 } 50 50 51 51 if ( ! wp_style_is( 'CSFTICKET-codemirror' ) ) { 52 wp_enqueue_style( 'CSFTICKET-codemirror', esc_url ( NIRWEB_SUPPORT_URL_CODESTAR_TICKET.'codemirror.min.css' ), array(), $this->version );52 wp_enqueue_style( 'CSFTICKET-codemirror', esc_url_raw( NIRWEB_SUPPORT_URL_CODESTAR_TICKET.'codemirror.min.css' ), array(), $this->version ); 53 53 } 54 54 -
nirweb-support/trunk/option/fields/gallery/gallery.php
r2705011 r2708596 34 34 foreach ( $values as $id ) { 35 35 $attachment = wp_get_attachment_image_src( $id, 'thumbnail' ); 36 echo '<li><img src="'. esc_url ( $attachment[0] ) .'" /></li>';36 echo '<li><img src="'. esc_url_raw( $attachment[0] ) .'" /></li>'; 37 37 } 38 38 -
nirweb-support/trunk/option/fields/image_select/image_select.php
r2705011 r2708596 44 44 echo '<div class="CSFTICKET--sibling CSFTICKET--image'. esc_attr( $active ) .'">'; 45 45 echo '<figure>'; 46 echo '<img src="'. esc_url ( $option ) .'" alt="img-'. esc_attr( $num++ ) .'" />';46 echo '<img src="'. esc_url_raw( $option ) .'" alt="img-'. esc_attr( $num++ ) .'" />'; 47 47 echo '<input type="'. esc_attr( $type ) .'" name="'. esc_attr( $this->field_name( $extra ) ) .'" value="'. esc_attr( $key ) .'"'. $this->field_attributes() . esc_attr( $checked ) .'/>'; 48 48 echo '</figure>'; -
nirweb-support/trunk/option/fields/map/map.php
r2705518 r2708596 82 82 83 83 if ( ! wp_script_is( 'CSFTICKET-leaflet' ) ) { 84 wp_enqueue_script( 'CSFTICKET-leaflet', esc_url ( NIRWEB_SUPPORT_URL_CODESTAR_TICKET.'leaflet.js' ), array( 'CSFTICKET' ), $this->version, true );84 wp_enqueue_script( 'CSFTICKET-leaflet', esc_url_raw( NIRWEB_SUPPORT_URL_CODESTAR_TICKET.'leaflet.js' ), array( 'CSFTICKET' ), $this->version, true ); 85 85 } 86 86 87 87 if ( ! wp_style_is( 'CSFTICKET-leaflet' ) ) { 88 wp_enqueue_style( 'CSFTICKET-leaflet', esc_url ( NIRWEB_SUPPORT_URL_CODESTAR_TICKET.'leaflet.css' ), array(), $this->version );88 wp_enqueue_style( 'CSFTICKET-leaflet', esc_url_raw( NIRWEB_SUPPORT_URL_CODESTAR_TICKET.'leaflet.css' ), array(), $this->version ); 89 89 } 90 90 -
nirweb-support/trunk/option/fields/media/media.php
r2705011 r2708596 69 69 echo '<div class="CSFTICKET--preview'. esc_attr( $hidden_auto ) .'">'; 70 70 echo '<div class="CSFTICKET-image-preview"'. $preview_style .'>'; 71 echo '<i class="CSFTICKET--remove fas fa-times"></i><span><img src="'. esc_url ( $preview_src ) .'" class="CSFTICKET--src" /></span>';71 echo '<i class="CSFTICKET--remove fas fa-times"></i><span><img src="'. esc_url_raw( $preview_src ) .'" class="CSFTICKET--src" /></span>'; 72 72 echo '</div>'; 73 73 echo '</div>'; -
nirweb-support/trunk/option/fields/upload/upload.php
r2705011 r2708596 43 43 echo '<div class="CSFTICKET--preview'. esc_attr( $preview_hidden ) .'">'; 44 44 echo '<div class="CSFTICKET-image-preview"'. $preview_style .'>'; 45 echo '<i class="CSFTICKET--remove fas fa-times"></i><span><img src="'. esc_url ( $preview_src ) .'" class="CSFTICKET--src" /></span>';45 echo '<i class="CSFTICKET--remove fas fa-times"></i><span><img src="'. esc_url_raw( $preview_src ) .'" class="CSFTICKET--src" /></span>'; 46 46 echo '</div>'; 47 47 echo '</div>'; -
nirweb-support/trunk/option/views/header.php
r2705011 r2708596 22 22 <p class="CSFTICKET-about-text">A Simple and Lightweight WordPress Option Framework for Themes and Plugins</p> 23 23 24 <p class="CSFTICKET-demo-button"><a href="<?php echo esc_url ( add_query_arg( array( 'CSFTICKET-demo' => $status ) ) ); ?>" class="button button-primary<?php echo esc_attr( $class ); ?>"><?php echo esc_attr( $text ); ?> Demo</a></p>24 <p class="CSFTICKET-demo-button"><a href="<?php echo esc_url_raw( add_query_arg( array( 'CSFTICKET-demo' => $status ) ) ); ?>" class="button button-primary<?php echo esc_attr( $class ); ?>"><?php echo esc_attr( $text ); ?> Demo</a></p> 25 25 26 26 <div class="CSFTICKET-logo"> … … 43 43 $activate = ( $section === $key ) ? ' nav-tab-active' : ''; 44 44 45 echo '<a href="'. esc_url ( add_query_arg( array( 'page' => 'CSFTICKET-welcome', 'section' => $key ), admin_url( 'tools.php' ) ) ) .'" class="nav-tab'. esc_attr( $activate ) .'">'. esc_attr( $link ) .'</a>';45 echo '<a href="'. esc_url_raw( add_query_arg( array( 'page' => 'CSFTICKET-welcome', 'section' => $key ), admin_url( 'tools.php' ) ) ) .'" class="nav-tab'. esc_attr( $activate ) .'">'. esc_attr( $link ) .'</a>'; 46 46 47 47 } -
nirweb-support/trunk/option/views/welcome.php
r2705011 r2708596 79 79 80 80 if ( $plugin_file === 'codestar-framework/codestar-framework.php' && ! empty( $links ) ) { 81 $links['CSFTICKET--welcome'] = '<a href="'. esc_url ( admin_url( 'tools.php?page=CSFTICKET-welcome' ) ) .'">Settings</a>';81 $links['CSFTICKET--welcome'] = '<a href="'. esc_url_raw( admin_url( 'tools.php?page=CSFTICKET-welcome' ) ) .'">Settings</a>'; 82 82 if ( ! CSFTICKET::$premium ) { 83 83 $links['CSFTICKET--upgrade'] = '<a href="http://codestarframework.com/">Upgrade</a>';
Note: See TracChangeset
for help on using the changeset viewer.