Changeset 2703852
- Timestamp:
- 04/03/2022 07:46:54 AM (4 years ago)
- Location:
- nirweb-support/trunk
- Files:
-
- 11 edited
-
assets/css/user-rtl.css (modified) (25 diffs)
-
assets/css/user.css (modified) (6 diffs)
-
core/core.php (modified) (2 diffs)
-
inc/admin/functions/ajax.php (modified) (1 diff)
-
inc/admin/functions/func_answerd_ticket.php (modified) (2 diffs)
-
inc/admin/functions/func_send_ticket.php (modified) (3 diffs)
-
inc/user/functions/filter_ajax_ticket.php (modified) (2 diffs)
-
inc/user/themes/home.php (modified) (2 diffs)
-
inc/user/themes/new_ticket.php (modified) (2 diffs)
-
nirweb-support.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
nirweb-support/trunk/assets/css/user-rtl.css
r2597821 r2703852 27 27 .edit_ticket_bg, .box_answer_war_wpyar_ticket,.row_wpyt{ 28 28 width: 100%; 29 max-width: 1140px !important;30 margin: auto;29 max-width: 1140px !important; 30 margin: auto; 31 31 } 32 32 .swal-modal { … … 41 41 } 42 42 .w-50 { 43 margin:0 2%;width:48%43 margin:0 2%;width:48% 44 44 }.w-100 { 45 width: 100%;46 }45 width: 100%; 46 } 47 47 .swal-button--confirm { 48 48 background-color: #7cd1f9 !important; … … 54 54 } 55 55 .nirweb_ticket_logo{ 56 position:fixed;bottom:0;z-index:99999; }56 position:fixed;bottom:0;z-index:99999; } 57 57 /************* ALERT ****************/ 58 58 .bg_alert__nirweb { … … 222 222 } 223 223 #answered:hover{ 224 background-color:#9f3fe5;224 background-color:#9f3fe5; 225 225 } 226 226 #all:hover{ … … 366 366 color: #b3b3b3; 367 367 } 368 .ar iborder_wpyaru-red {368 .arbitrator_wpyaru-red { 369 369 border-right: solid 3pt #ff0000 !important; 370 370 } 371 .ar iborder_wpyaru-blue {371 .arbitrator_wpyaru-blue { 372 372 border-right: solid 3pt #2096fc !important; 373 373 } 374 .ar iborder_wpyaru-green {374 .arbitrator_wpyaru-green { 375 375 border-right: solid 3pt #2fbe35 !important; 376 376 } 377 .ar iborder_wpyaru-purple {377 .arbitrator_wpyaru-purple { 378 378 border-right: solid 3pt #9f3fe5 !important; 379 379 } … … 568 568 } 569 569 .select_custom_wpyar div{ 570 border: solid 1px #b3b3b3;571 color: #b3b3b3;572 border-radius: 4px;573 width: 100%;574 height: 38px;575 font-size: 14px;576 display: flex;577 align-items: center;578 padding-right: 10px;579 cursor: pointer;570 border: solid 1px #b3b3b3; 571 color: #b3b3b3; 572 border-radius: 4px; 573 width: 100%; 574 height: 38px; 575 font-size: 14px; 576 display: flex; 577 align-items: center; 578 padding-right: 10px; 579 cursor: pointer; 580 580 } 581 581 .select_custom_wpyar i { … … 593 593 .select_custom_wpyar i.top:before{ 594 594 content: "\f106"; 595 -webkit-transition: all .3s ease-in-out;595 -webkit-transition: all .3s ease-in-out; 596 596 -o-transition: all .3s ease-in-out; 597 597 transition: all .3s ease-in-out; … … 604 604 border-radius: 5px; 605 605 border: solid 1px #b3b3b3; 606 overflow:hidden; 607 display:none; 606 display:none; 608 607 z-index: 999; 609 } 610 608 max-height: 250px; 609 overflow: auto; 610 } 611 611 612 .select_custom_wpyar ul li{ 612 613 list-style:none; … … 615 616 } 616 617 617 618 618 619 .select_custom_wpyar ul li:hover{ 619 background:#f6f7f9;620 background:#f6f7f9; 620 621 } 621 622 … … 632 633 #main_image{ 633 634 display:none 634 } 635 } 635 636 .attach_file_wpyar{ 636 637 cursor: pointer; … … 662 663 width: 100%; 663 664 height: 100%; 664 align-items: center;665 align-items: center; 665 666 justify-content: center; 666 667 } … … 750 751 } 751 752 .list_answerd_in_dash_admin{ 752 font-family: inherit !important;753 font-family: inherit !important; 753 754 } 754 755 .text_message_wpyartick{ … … 768 769 } 769 770 .info_answer_box_wpyartick{ 770 width: 80%;771 width: 80%; 771 772 } 772 773 .list_all_answered .head_answer,.ticket_question .head_answer{ … … 788 789 margin-left: 10px; 789 790 } 790 791 791 792 .file_atach_url{ 792 793 border-top:dashed 1px #b3b3b3; … … 810 811 } 811 812 .info_wpyar_ticket{ 812 813 display: flex;814 815 justify-content: space-between;816 817 background: #e8e8e8;818 819 padding: 10px;820 821 border-radius: 8px;813 814 display: flex; 815 816 justify-content: space-between; 817 818 background: #e8e8e8; 819 820 padding: 10px; 821 822 border-radius: 8px; 822 823 } 823 824 .box_info_ticket{ 824 825 width: 24%;826 827 text-align: center;828 829 color: #000;825 826 width: 24%; 827 828 text-align: center; 829 830 color: #000; 830 831 } 831 832 .box_info_ticket .title{ 832 833 margin-bottom: 3px;834 835 font-size: 14px;836 837 font-weight: 500;833 834 margin-bottom: 3px; 835 836 font-size: 14px; 837 838 font-weight: 500; 838 839 } 839 840 .box_info_ticket .info{ 840 841 margin-bottom: 0;842 843 background: #fff;844 845 border-radius: 5px;846 847 padding: 5px;848 849 font-size: 14px;841 842 margin-bottom: 0; 843 844 background: #fff; 845 846 border-radius: 5px; 847 848 padding: 5px; 849 850 font-size: 14px; 850 851 } 851 852 … … 866 867 } 867 868 label[for="closed_answer"] { 868 margin-bottom:0;869 margin-left: 10px;869 margin-bottom:0; 870 margin-left: 10px; 870 871 } 871 872 .box_answer_war_wpyar_ticket{ 872 margin-top: 25px;873 margin-top: 25px; 873 874 padding: 20px; 874 875 box-shadow: 0 0 3px #ccc; … … 882 883 883 884 .list_all_answered li .head_answer .date{ 884 margin: 0 8px;885 margin: 0 8px; 885 886 } 886 887 887 888 .list_all_answered li.user_support_wpyar .text_message_wpyartick{ 888 font-size: 14px;889 font-size: 14px; 889 890 padding: 15px; 890 891 background: #353535; … … 899 900 .list_all_answered li.user_support_wpyar .head_answer{ 900 901 flex-direction: row-reverse; 901 padding-left: 20px;902 padding-left: 20px; 902 903 } 903 904 904 905 905 906 .list_all_answered li.user_support_wpyar .head_answer .name::after{ 906 display:none;907 display:none; 907 908 } 908 909 909 910 .list_all_answered li.user_support_wpyar .head_answer .name::before{ 910 content: "";911 content: ""; 911 912 display: inline-block; 912 913 width: 2px; … … 918 919 margin-left: 0; 919 920 right: 0; 920 921 921 922 922 923 } 923 924 .label_main_image{ 924 display: flex;925 justify-content: center;926 align-items: center;927 flex-direction: column;928 padding: 35px !important;929 border: dashed 1.5pt #696969;930 cursor: pointer;931 text-align: center;932 position: relative;925 display: flex; 926 justify-content: center; 927 align-items: center; 928 flex-direction: column; 929 padding: 35px !important; 930 border: dashed 1.5pt #696969; 931 cursor: pointer; 932 text-align: center; 933 position: relative; 933 934 } 934 935 .top_box_back_rep{ … … 961 962 display:flex; 962 963 align-items: center; 963 position: relative;964 JUSTIFY-CONTENT: SPACE-BETWEEN;965 } 966 967 964 position: relative; 965 JUSTIFY-CONTENT: SPACE-BETWEEN; 966 } 967 968 968 969 /************************************************************* 969 970 #---------------------- Ajax Request Loarder ----------------------# … … 981 982 margin: auto; 982 983 } 983 .spinner {984 .spinner { 984 985 width: 40px; 985 986 height: 40px; … … 992 993 993 994 .double-bounce1, .double-bounce2 { 994 width: 100%;995 height: 100%;996 border-radius: 50%;997 background-color: #333;998 opacity: 0.6;999 position: absolute;1000 top: 0;1001 left: 0;1002 1003 -webkit-animation: sk-bounce 2.0s infinite ease-in-out;1004 animation: sk-bounce 2.0s infinite ease-in-out;995 width: 100%; 996 height: 100%; 997 border-radius: 50%; 998 background-color: #333; 999 opacity: 0.6; 1000 position: absolute; 1001 top: 0; 1002 left: 0; 1003 1004 -webkit-animation: sk-bounce 2.0s infinite ease-in-out; 1005 animation: sk-bounce 2.0s infinite ease-in-out; 1005 1006 } 1006 1007 1007 1008 .double-bounce2 { 1008 -webkit-animation-delay: -1.0s;1009 animation-delay: -1.0s;1009 -webkit-animation-delay: -1.0s; 1010 animation-delay: -1.0s; 1010 1011 } 1011 1012 1012 1013 @-webkit-keyframes sk-bounce { 1013 0%, 100% { -webkit-transform: scale(0.0) }1014 50% { -webkit-transform: scale(1.0) }1014 0%, 100% { -webkit-transform: scale(0.0) } 1015 50% { -webkit-transform: scale(1.0) } 1015 1016 } 1016 1017 1017 1018 @keyframes sk-bounce { 1018 0%, 100% {1019 transform: scale(0.0);1020 -webkit-transform: scale(0.0);1021 } 50% {1022 transform: scale(1.0);1023 -webkit-transform: scale(1.0);1024 }1019 0%, 100% { 1020 transform: scale(0.0); 1021 -webkit-transform: scale(0.0); 1022 } 50% { 1023 transform: scale(1.0); 1024 -webkit-transform: scale(1.0); 1025 } 1025 1026 } 1026 1027 .base_loarder p{ … … 1069 1070 } 1070 1071 .row_nirweb_ticket_send { 1071 flex-direction: column;1072 flex-direction: column; 1072 1073 } 1073 1074 .w-50{ 1074 1075 width:100% !important; 1075 1076 margin-bottom: 15px; 1076 }1077 } 1077 1078 } 1078 1079 … … 1104 1105 1105 1106 @media screen and (max-width:540px){ 1106 .col_box_status_ticket_wpyar { width: 100%;margin-left:0; padding:10px;}1107 1108 .ul_list_ticket_uwpyar li a .info_user_time_wpyaru .icon_nameUser {1107 .col_box_status_ticket_wpyar { width: 100%;margin-left:0; padding:10px;} 1108 1109 .ul_list_ticket_uwpyar li a .info_user_time_wpyaru .icon_nameUser { 1109 1110 font-size: 13px; 1110 1111 height: 100%; … … 1115 1116 } 1116 1117 .ul_list_ticket_uwpyar li a .info_user_time_wpyaru,.ul_list_ticket_uwpyar li .title_time_ticket{ 1117 flex-direction: column; 1118 flex-direction: column; 1118 1119 } 1119 1120 } 1120 1121 1121 1122 @media screen and (max-width:380px){ 1122 .row_status {flex-direction: column;justify-content: center;align-items: center;}1123 .head_wpyar_tickt {margin-top: 15px;flex-direction: column;}1124 .col_box_status_ticket_wpyar p {margin-bottom: 0;}1125 .col_box_status_ticket_wpyar svg {margin-bottom: 0;}1126 } 1123 .row_status {flex-direction: column;justify-content: center;align-items: center;} 1124 .head_wpyar_tickt {margin-top: 15px;flex-direction: column;} 1125 .col_box_status_ticket_wpyar p {margin-bottom: 0;} 1126 .col_box_status_ticket_wpyar svg {margin-bottom: 0;} 1127 } -
nirweb-support/trunk/assets/css/user.css
r2597765 r2703852 238 238 content: ""; 239 239 position: absolute; 240 right: - 1px;240 right: -2px; 241 241 top: 50%; 242 242 height: 34px; … … 297 297 font-weight: 500; 298 298 } 299 .ul_list_ticket_uwpyar li a .info_user_time_wpyaru .icon_nameUser::after { 300 content: "-"; 301 display: inline-block; 302 color: #ccc; 303 margin-left: 10px; 304 } 299 305 .ul_list_ticket_uwpyar li a .info_user_time_wpyaru .icon_nameUser svg { 300 306 fill: gray; … … 336 342 color: #b3b3b3; 337 343 } 338 .ar iborder_wpyaru-red {344 .arbitrator_wpyaru-red { 339 345 border-left: solid 3pt #ff0000 !important; 340 346 } 341 .ar iborder_wpyaru-blue {347 .arbitrator_wpyaru-blue { 342 348 border-right: solid 3pt #2096fc !important; 343 349 } 344 .ar iborder_wpyaru-green {350 .arbitrator_wpyaru-green { 345 351 border-right: solid 3pt #2fbe35 !important; 346 352 } 347 .ar iborder_wpyaru-purple {353 .arbitrator_wpyaru-purple { 348 354 border-right: solid 3pt #9f3fe5 !important; 349 355 } … … 520 526 padding-right: 8px; 521 527 font-weight: 500; 528 display: block; 522 529 } 523 530 .row_nirweb_ticket_send input[type="text"], … … 579 586 border-radius: 5px; 580 587 border: solid 1px #b3b3b3; 581 overflow:hidden; 588 max-height: 250px; 589 overflow: auto; 582 590 display:none; 583 591 z-index: 999; … … 908 916 position: relative; 909 917 } 918 910 919 .top_box_back_rep{ 911 920 display:flex; -
nirweb-support/trunk/core/core.php
r2597765 r2703852 425 425 $wpyarud = get_option('wpyarud_prefix_my_options'); 426 426 $page_name =$wpyarud['page_wpyarud_plugin']; 427 $page =get_bloginfo('url' ).'/'.$page_name.'?page=nirweb-ticket';427 $page =get_bloginfo('url').'/'.get_post_field( 'post_name', op_wpyar_panel['page_wpyarud_plugin']).'?endp=nirweb-ticket'; 428 428 }else{ 429 429 if( wpyar_ticket['select_page_ticket']){ … … 448 448 position: fixed; 449 449 bottom: 0; 450 z-index: 9 9999;450 z-index: 9; 451 451 } 452 452 </style> -
nirweb-support/trunk/inc/admin/functions/ajax.php
r2597765 r2703852 95 95 add_action('wp_ajax_answerd_ticket', 'answerd_ticket'); 96 96 add_action('wp_ajax_nopriv_answerd_ticket', 'answerd_ticket'); 97 if (!function_exists('answerd_ticket') ) {97 if (!function_exists('answerd_ticket') && is_admin( )) { 98 98 function answerd_ticket() 99 99 { -
nirweb-support/trunk/inc/admin/functions/func_answerd_ticket.php
r2597765 r2703852 1 1 <?php 2 2 $ticket_id = sanitize_text_field($_POST['id_form']); 3 if (!function_exists('nirweb_ticket_answer_ticket') ) {3 if (!function_exists('nirweb_ticket_answer_ticket') && is_admin( )) { 4 4 function nirweb_ticket_answer_ticket($ticket_id){ 5 5 $text = preg_replace('/\\\\/', '', wpautop($_POST['content'])); … … 54 54 if (!function_exists('func_list_answer_ajax')) { 55 55 function func_list_answer_ajax($ticket_id){ 56 $t_id = sanitize_text_field($ticket_id); 56 57 global $wpdb; 57 58 $process_answer_list = $wpdb->get_results("SELECT answered.* ,users.ID , users.display_name 58 59 FROM {$wpdb->prefix}nirweb_ticket_ticket_answered answered JOIN {$wpdb->prefix}users users ON user_id=ID 59 WHERE ticket_id=$t icket_id ORDER BY answer_id ASC ");60 WHERE ticket_id=$t_id ORDER BY answer_id ASC "); 60 61 61 62 foreach($process_answer_list as $row): -
nirweb-support/trunk/inc/admin/functions/func_send_ticket.php
r2529767 r2703852 1 1 <?php 2 if (!function_exists('nirweb_ticket_send_ticket') ) {2 if (!function_exists('nirweb_ticket_send_ticket') && is_admin( )) { 3 3 function nirweb_ticket_send_ticket(){ 4 4 $text = preg_replace('/\\\\/', '', sanitize_textarea_field(wpautop($_POST['send_content']))); … … 21 21 ); 22 22 $wpdb->insert($wpdb->prefix.'nirweb_ticket_ticket',$frm_ary_elements); 23 if(sanitize_text_field($_POST['check_mail'])=='true'){ 24 23 if(sanitize_text_field($_POST['check_mail'])=='true'){ 25 24 $lastid = $wpdb->insert_id; 26 25 $recever_name = sanitize_text_field($_POST['receiver_name']); … … 34 33 $subject = sanitize_text_field($_POST['subject']); 35 34 $time = current_time( 'd/m/Y - H:i:s' , time()); 36 37 $htmlContent = wpautop(str_replace('{username}',$recever_name,get_option('nirweb_ticket_perfix')['template_send_ticket_email'])); 35 $htmlContent = wpautop(str_replace('{username}',$recever_name,get_option('nirweb_ticket_perfix')['template_send_ticket_email'])); 38 36 $headers = array('Content-Type: text/html; charset=UTF-8'); 39 37 $body = $htmlContent; 40 41 38 $rres = wp_mail( $to, $subject, $body, $headers ); 42 39 } -
nirweb-support/trunk/inc/user/functions/filter_ajax_ticket.php
r2597765 r2703852 42 42 <a href="?action=reply&id=<?php echo $row->ticket_id ?>" class="<?php 43 43 if (intval($row->status) == 1) { 44 echo 'ar iborder_wpyaru-red';44 echo 'arbitrator_wpyaru-red'; 45 45 } 46 46 if (intval($row->status) == 2) { 47 echo 'ar iborder_wpyaru-blue';47 echo 'arbitrator_wpyaru-blue'; 48 48 } 49 49 if (intval($row->status) == 3) { 50 echo 'ar iborder_wpyaru-purple';50 echo 'arbitrator_wpyaru-purple'; 51 51 } 52 52 if (intval($row->status) == 4) { 53 echo 'ar iborder_wpyaru-green';53 echo 'arbitrator_wpyaru-green'; 54 54 } 55 55 ?>"> … … 102 102 <a href="?action=reply&id=<?php echo $row->ticket_id ?>" class="<?php 103 103 if (intval($row->status) == 1) { 104 echo 'ar iborder_wpyaru-red';104 echo 'arbitrator_wpyaru-red'; 105 105 } 106 106 if (intval($row->status) == 2) { 107 echo 'ar iborder_wpyaru-blue';107 echo 'arbitrator_wpyaru-blue'; 108 108 } 109 109 if (intval($row->status) == 3) { 110 echo 'ar iborder_wpyaru-purple';110 echo 'arbitrator_wpyaru-purple'; 111 111 } 112 112 if (intval($row->status) == 4) { 113 echo 'ar iborder_wpyaru-green';113 echo 'arbitrator_wpyaru-green'; 114 114 } 115 115 ?>"> -
nirweb-support/trunk/inc/user/themes/home.php
r2597765 r2703852 55 55 class="<?php 56 56 if (intval($row->status) == 1) { 57 echo 'ar iborder_wpyaru-red';57 echo 'arbitrator_wpyaru-red'; 58 58 } 59 59 if (intval($row->status) == 2) { 60 echo 'ar iborder_wpyaru-blue';60 echo 'arbitrator_wpyaru-blue'; 61 61 } 62 62 if (intval($row->status) == 3) { 63 echo 'ar iborder_wpyaru-purple';63 echo 'arbitrator_wpyaru-purple'; 64 64 } 65 65 if (intval($row->status) == 4) { 66 echo 'ar iborder_wpyaru-green';66 echo 'arbitrator_wpyaru-green'; 67 67 } 68 68 ?>" > … … 77 77 $orig_time = strtotime( $row->time_update); 78 78 $date = strtotime($row->date_qustion); 79 echo $date = wp_date('d F Y', $date); ?> 80 <?php echo __('Hour', 'nirweb-support') ?> 81 <?php 82 echo $date = date('H:i', strtotime($row->date_qustion)); ?> 79 echo $date = wp_date('d F', $date); ?> 80 83 81 </time> 84 82 </div> -
nirweb-support/trunk/inc/user/themes/new_ticket.php
r2597765 r2703852 1 1 <div class="nirweb_ticket_base"> 2 <?php3 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_status_and_priority.php';4 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_department.php';5 include_once NIRWEB_SUPPORT_INC_USER_FUNCTIONS_TICKET . 'func_faq.php';6 $faq = nirweb_ticket_get_all_faq_user();7 ?>8 <div class="top_box_send_ticket">2 <?php 3 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_status_and_priority.php'; 4 include_once NIRWEB_SUPPORT_INC_ADMIN_FUNCTIONS_TICKET . 'func_department.php'; 5 include_once NIRWEB_SUPPORT_INC_USER_FUNCTIONS_TICKET . 'func_faq.php'; 6 $faq = nirweb_ticket_get_all_faq_user(); 7 ?> 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> 11 <?php 12 if(is_plugin_active('wpyar_panel/wpyar_panel.php' )){ 13 $page =slug_page.'?endp=nirweb-ticket'; 14 }else{ 15 if( wpyar_ticket['select_page_ticket']){ 16 $page = esc_url( get_page_link( wpyar_ticket['select_page_ticket'] ) ); 17 }else{ 18 $page = get_permalink( get_option('woocommerce_myaccount_page_id') ).'wpyar-ticket/'; 10 <h4 class="wpyar-ticket"><?php echo __('New Ticket', 'nirweb-support') ?></h4> 11 <?php 12 if (is_plugin_active('wpyar_panel/wpyar_panel.php')) { 13 $page = slug_page . '?endp=nirweb-ticket'; 14 } else { 15 if (wpyar_ticket['select_page_ticket']) { 16 $page = esc_url(get_page_link(wpyar_ticket['select_page_ticket'])); 17 } else { 18 $page = get_permalink(get_option('woocommerce_myaccount_page_id')) . 'wpyar-ticket/'; 19 } 19 20 } 20 }21 ?>22 <a href=" <?php echo $page; ?> " class="btn btn_back_wpyt"><?php echo __('Back To List Tickets', 'nirweb-support')?></a>23 </div>24 <div class="content_ticket_send">25 <?php echo wpautop(wpyar_ticket['text_top_send_mail']) ?>26 </div>21 ?> 22 <a href=" <?php echo $page; ?> " 23 class="btn btn_back_wpyt"><?php echo __('Back To List Tickets', 'nirweb-support') ?></a> 24 </div> 25 <div class="content_ticket_send"> 26 <?php echo wpautop(wpyar_ticket['text_top_send_mail']) ?> 27 </div> 27 28 <div class="list_of_faq_wpyar"> 28 29 <ul> 29 <?php foreach($faq as $key=>$value):?>30 <li>31 <pclass="li_list_of_faq_wpyar">32 <i></i>33 <span class="number_faq_wpyar"><?php echo $key+1 ?>.</span>34 <span class="title_faq_wpyar"><?php echo $value->question ?></span>35 </p>36 <div class="content_faq_wpyar"><?php echo $value->answer ?> </div>37 </li>30 <?php foreach ($faq as $key => $value): ?> 31 <li> 32 <p class="li_list_of_faq_wpyar"> 33 <i></i> 34 <span class="number_faq_wpyar"><?php echo $key + 1 ?>.</span> 35 <span class="title_faq_wpyar"><?php echo $value->question ?></span> 36 </p> 37 <div class="content_faq_wpyar"><?php echo $value->answer ?> </div> 38 </li> 38 39 <?php endforeach; ?> 39 40 </ul> 40 41 </div> 41 <div class="not_found_answer" <?php if(!$faq){ echo "style='display:none !important'";} ?> > 42 <span><?php echo __('I didn\'t find the answer to my question', 'nirweb-support') ?></span> 42 <div class="not_found_answer" <?php if (!$faq) { 43 echo "style='display:none !important'"; 44 } ?> > 45 <span><?php echo __('I didn\'t find the answer to my question', 'nirweb-support') ?></span> 46 </div> 43 47 </div> 44 </div> 45 <!-- Start Form--> 46 <form class="form__global__ticket_new shadow__wpys" id="send_ticket_form" method="post" 47 enctype="multipart/form-data" <?php if($faq){ echo "style='display:none'";} ?> > 48 <!-- subject row--> 49 <div class="ibenic_upload_message"></div> 50 <div class="row_nirweb_ticket_send"> 51 <div class="w-50"> 52 <label for="nirweb_ticket_frm_subject_send_ticket_user"><?php echo __('Enter subject please *', 'nirweb-support') ?></label> 53 <input type="text" id="nirweb_ticket_frm_subject_send_ticket_user" name="nirweb_ticket_frm_subject_send_ticket_user"> 54 </div> 55 <!-- DepartMent--> 56 <div class="w-50"> 57 <div class="department_form_user_send"> 58 <label for="nirweb_ticket_frm_department_send_ticket_user"><?php echo __('Select department please *', 'nirweb-support') ?></label> 59 <div class="select_custom_wpyar"> 60 <div class="custom_input_wpyar_send_ticket" id="nirweb_ticket_frm_department_send_ticket_user" data-id="-1" data-user="0" > 61 <?php echo __('Select department', 'nirweb-support') ?> 62 </div> 63 <i class="fal fa-angle-down"></i> 64 <ul> 65 <?php 66 $departments = nirweb_ticket_ticket_get_list_department(); 67 foreach ($departments as $department): ?> 68 <li data-user="<?php echo $department->support_id ?>" 69 data-id="<?php echo $department->department_id ?>"><?php echo $department->name ?></li> 70 <?php endforeach; ?> 71 </ul> 72 </div> 73 </div> 74 </div> 75 </div> 76 <!-- priority And Product --> 77 <div class="row_nirweb_ticket_send"> 78 <div class="w-50"> 79 <label for="nirweb_ticket_frm_priority_send_ticket_user"><?php echo __('Priority *', 'nirweb-support')?></label> 80 <div class="select_custom_wpyar"> 81 <div class="custom_input_wpyar_send_ticket" id="nirweb_ticket_frm_priority_send_ticket_user" data-id="-1" > 82 <?php echo __('Select priority', 'nirweb-support')?> 83 </div> 84 <i class="fal fa-angle-down"></i> 85 <ul> 86 <li data-id="1"> <?php echo __('low', 'nirweb-support')?></li> 87 <li data-id="2"> <?php echo __('normal', 'nirweb-support')?></li> 88 <li data-id="3"> <?php echo __('necessary', 'nirweb-support')?></li> 89 </ul> 90 </div> 91 </div> 48 <!-- Start Form--> 49 <form class="form__global__ticket_new shadow__wpys" id="send_ticket_form" method="post" 50 enctype="multipart/form-data" <?php if ($faq) { 51 echo "style='display:none'"; 52 } ?> > 53 <!-- subject row--> 54 <div class="ibenic_upload_message"></div> 55 <div class="row_nirweb_ticket_send"> 92 56 <div class="w-50"> 93 <?php if(is_plugin_active('woocommerce/woocommerce.php')){ ?> 94 <label for="product_user_wpyar_tixket"> 95 <?php echo __('Product', 'nirweb-support')?> 96 <?php if( @wpyar_ticket['require_procut_user_wpyar']=='1'){echo ' * '; } ?> 97 </label> 98 <div class="select_custom_wpyar"> 99 <div class="custom_input_wpyar_send_ticket" id="product_user_wpyar_tixket" data-id="-1" > 100 <?php echo __('Select Product', 'nirweb-support')?> 101 </div> 102 <i class="fal fa-angle-down"></i> 103 <ul> 104 <?php $customer_orders = get_posts( array( 105 'numberposts' => -1, 106 'meta_key' => '_customer_user', 107 'meta_value' => get_current_user_id(), 108 'post_type' => wc_get_order_types(), 109 'post_status' => array_keys( wc_get_order_statuses() ), 110 ) ); 111 if ($customer_orders){ 112 $product_ids = array(); 113 foreach ($customer_orders as $customer_order) { 114 $order = wc_get_order($customer_order->ID); 115 $items = $order->get_items(); 116 foreach ($items as $item) { 117 $product_id = $item->get_product_id(); 118 $product_name = $item->get_name(); 119 ?> 120 <li data-id="<?php echo $product_id ?>"> 121 <?php echo $product_name ?> 122 </li> 123 <?php } 124 } 125 } ?> 126 </ul> 127 </div> 128 <?php } else if (is_plugin_active('easy-digital-downloads/easy-digital-downloads.php')){ ?> 129 <label> <?php echo __('Product', 'nirweb-support')?></label> 130 <div class="select_custom_wpyar"> 131 <div class="custom_input_wpyar_send_ticket" id="product_user_wpyar_tixket" data-id="-1" > 132 <?php echo __('Select Product', 'nirweb-support')?> 133 </div> 134 <i class="fal fa-angle-down"></i> 135 <ul>'; 136 <?php $rep = edd_get_users_purchased_products( $user = get_current_user_id(), $status = 'complete' ); 137 foreach ($rep as $row): 138 echo'<li data-id="'.$row->ID.'">'.$row->post_title.'</option>'; 139 endforeach; 140 echo'</ul></div>'; 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"> 60 </div> 61 <!-- DepartMent--> 62 <div class="w-50"> 63 <div class="department_form_user_send"> 64 <label for="nirweb_ticket_frm_department_send_ticket_user"><?php echo __('Select department please *', 'nirweb-support') ?></label> 65 <div class="select_custom_wpyar"> 66 <div class="custom_input_wpyar_send_ticket" id="nirweb_ticket_frm_department_send_ticket_user" 67 data-id="-1" data-user="0"> 68 <?php echo __('Select department', 'nirweb-support') ?> 69 </div> 70 <i class="fal fa-angle-down"></i> 71 <ul> 72 <?php 73 $departments = nirweb_ticket_ticket_get_list_department(); 74 foreach ($departments as $department): ?> 75 <li data-user="<?php echo $department->support_id ?>" 76 data-id="<?php echo $department->department_id ?>"><?php echo $department->name ?></li> 77 <?php endforeach; ?> 78 </ul> 79 </div> 80 </div> 81 </div> 82 </div> 83 <!-- priority And Product --> 84 <div class="row_nirweb_ticket_send"> 85 <div class="w-50"> 86 <label for="nirweb_ticket_frm_priority_send_ticket_user"><?php echo __('Priority *', 'nirweb-support') ?></label> 87 <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') ?> 91 </div> 92 <i class="fal fa-angle-down"></i> 93 <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> 97 </ul> 98 </div> 99 </div> 100 <div class="w-50"> 101 <?php if (is_plugin_active('woocommerce/woocommerce.php')){ ?> 102 <label for="product_user_wpyar_tixket"> 103 <?php echo __('Product', 'nirweb-support') ?> 104 <?php if (@wpyar_ticket['require_procut_user_wpyar'] == '1') { 105 echo ' * '; 106 } ?> 107 </label> 108 <div class="select_custom_wpyar"> 109 <div class="custom_input_wpyar_send_ticket" id="product_user_wpyar_tixket" data-id="-1"> 110 <?php echo __('Select Product', 'nirweb-support') ?> 111 </div> 112 <i class="fal fa-angle-down"></i> 113 <ul> 114 <?php $customer_orders = get_posts(array( 115 'numberposts' => -1, 116 'meta_key' => '_customer_user', 117 'meta_value' => get_current_user_id(), 118 'post_type' => wc_get_order_types(), 119 'post_status' => array_keys(wc_get_order_statuses()), 120 )); 121 if ($customer_orders) { 122 123 foreach ($customer_orders as $customer_order) { 124 $order = wc_get_order($customer_order->ID); 125 $items = $order->get_items(); 126 foreach ($items as $item) { 127 $product_id = $item->get_product_id(); 128 $product_name = $item->get_name(); 129 ?> 130 <li data-id="<?php echo $item['product_id'] ?>"> 131 <?php echo get_the_title( $item['product_id']) ?> 132 </li> 133 <?php } 134 } 135 } ?> 136 </ul> 137 </div> 138 <?php } else if (is_plugin_active('easy-digital-downloads/easy-digital-downloads.php')){ ?> 139 <label> <?php echo __('Product', 'nirweb-support') ?></label> 140 <div class="select_custom_wpyar"> 141 <div class="custom_input_wpyar_send_ticket" id="product_user_wpyar_tixket" data-id="-1"> 142 <?php echo __('Select Product', 'nirweb-support') ?> 143 </div> 144 <i class="fal fa-angle-down"></i> 145 <ul> 146 <?php $rep = edd_get_users_purchased_products($user = get_current_user_id(), $status = 'complete'); 147 foreach ($rep as $row): 148 echo '<li data-id="' . $row->ID . '">' . $row->post_title . '</li>'; 149 endforeach; 150 echo '</ul></div>'; 151 } ?> 152 </div> 153 </div> 154 155 <!--content message row--> 156 <div class="row_nirweb_ticket_send"> 157 <div class="w-100"> 158 <label><?php echo __('Enter Message', 'nirweb-support'); ?></label> 159 <textarea id="nirweb_ticket_frm_content_send_ticket_user" 160 name="nirweb_ticket_frm_content_send_ticket_user" 161 placeholder="<?php echo __('Enter Message please', 'nirweb-support'); ?>"></textarea> 162 </div> 163 </div> 164 <!------ Upload File -----> 165 <div class="row_nirweb_ticket_send wpyar_upfile_base"> 166 <div class="upfile_wpyartick"> 167 <label for="main_image" class="label_main_image"> 168 <span class="remove_file_by_user"><i class="fal fa-times-circle"></i></span> 169 <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> 171 </label> 172 <input type="file" name="main_image" id="main_image" 173 accept="<?php echo wpyar_ticket['mojaz_file_upload_user_wpyar'] ?>"> 174 </div> 175 </div> 176 <!-- buttons row--> 177 <div class="send_reset_form"> 178 <div class="base_loarder"> 179 <div class="spinner"> 180 <div class="double-bounce1"></div> 181 <div class="double-bounce2"></div> 182 </div> 183 <p><?php echo __('Send Request ...', 'nirweb-support') ?></p> 184 </div> 185 186 <button data-fileurl="" type="submit" class="btn btn-primary text-white" 187 name="nirweb_ticket_frm_user_send_ticket" id="nirweb_ticket_frm_user_send_ticket"> 188 <?php echo __('Send Ticket', 'nirweb-support') ?> 189 </button> 190 <p class="stasus_send_wpyt"></p> 191 </div> 192 </form> 193 <?php $accsses_file = str_replace('.', '', trim(wpyar_ticket['mojaz_file_upload_user_wpyar'])); 194 $accsses_file = explode(",", trim($accsses_file)); ?> 195 <!-- End form--> 196 <script> 197 jQuery('body').on('change', '#main_image', function () { 198 console.log(this.value.match(/\.(.+)$/)[1]); 199 var ext = this.value.match(/\.(.+)$/)[1]; 200 switch (ext) { 201 <?php foreach ($accsses_file as $file):?> 202 case "<?php echo $file ?>": 203 break; 204 <?php endforeach; ?> 205 206 default: 207 alert(wpyarticket.nvalid_file); 208 this.value = ''; 209 } 210 211 }); 212 //-------------------- Request Send ticket 213 jQuery('body').on('click', '#nirweb_ticket_frm_user_send_ticket', function (e) { 214 e.preventDefault(); 215 jQuery('.base_loarder').css('display', 'flex'); 216 var subject = jQuery('#nirweb_ticket_frm_subject_send_ticket_user').val() 217 var department = jQuery('#nirweb_ticket_frm_department_send_ticket_user').attr('data-id'); 218 var dep_name = jQuery('#nirweb_ticket_frm_department_send_ticket_user').text(); 219 var resived_id = jQuery('#nirweb_ticket_frm_department_send_ticket_user ').attr('data-user'); 220 var content = jQuery('#nirweb_ticket_frm_content_send_ticket_user').val(); 221 var priority = jQuery('#nirweb_ticket_frm_priority_send_ticket_user').attr('data-id'); 222 var priority_name = jQuery('#nirweb_ticket_frm_priority_send_ticket_user').text(); 223 var product = jQuery('#product_user_wpyar_tixket').attr('data-id'); 224 var formData = new FormData(); 225 formData.append('updoc', jQuery('input[type=file]')[0].files[0]); 226 formData.append('subject', subject), 227 formData.append('department', department), 228 formData.append('dep_name', dep_name), 229 formData.append('resived_id', resived_id), 230 formData.append('content', content), 231 formData.append('priority', priority), 232 formData.append('priority_name', priority_name), 233 formData.append('product', product); 234 var image_select = jQuery('#main_image').val(); 235 if (image_select) { 236 var size_file = jQuery('input[type=file]')[0].files[0]['size']; 237 var ac_size = <?php echo wpyar_ticket['size_of_file_wpyartik']; ?>000000; 238 if (size_file >= ac_size) { 239 jQuery('.base_loarder').css('display', 'none'); 240 jQuery('.text_upload').css('display', 'none') 241 alert(wpyarticket.max_size_file); 242 return false 243 } 244 } 245 <?php if (@wpyar_ticket['require_procut_user_wpyar'] == '1') { 246 $shart = 'subject && department !=-1 && priority !=-1 && product !=-1 && content'; 247 } else { 248 $shart = 'subject && department !=-1 && priority !=-1 && content'; 141 249 } ?> 142 </div> 143 </div> 144 <!--content message row--> 145 <div class="row_nirweb_ticket_send"> 146 <div class="w-100"> 147 <label><?php echo __('Enter Message', 'nirweb-support'); ?></label> 148 <textarea id="nirweb_ticket_frm_content_send_ticket_user" name="nirweb_ticket_frm_content_send_ticket_user" placeholder="<?php echo __('Enter Message please', 'nirweb-support'); ?>"></textarea> 149 </div> 150 </div> 151 <!------ Upload File -----> 152 <div class="row_nirweb_ticket_send wpyar_upfile_base"> 153 <div class="upfile_wpyartick"> 154 <label for="main_image" class="label_main_image"> 155 <span class="remove_file_by_user"><i class="fal fa-times-circle"></i></span> 156 <i class="fal fa-arrow-up upicon" style="font-size: 30px;margin-bottom: 10px;"></i> 157 <span class="text_label_main_image"> <?php echo __('Attachment File', 'nirweb-support') ?></span> 158 </label> 159 <input type="file" name="main_image" id="main_image" accept="<?php echo wpyar_ticket['mojaz_file_upload_user_wpyar'] ?>"> 160 </div> 161 </div> 162 <!-- buttons row--> 163 <div class="send_reset_form"> 164 <div class="base_loarder"> 165 <div class="spinner"> 166 <div class="double-bounce1"></div> 167 <div class="double-bounce2"></div> 168 </div> 169 <p><?php echo __('Send Request ...', 'nirweb-support') ?></p> 170 </div> 171 172 <button data-fileurl="" type="submit" class="btn btn-primary text-white" name="nirweb_ticket_frm_user_send_ticket" id="nirweb_ticket_frm_user_send_ticket"> 173 <?php echo __('Send Ticket', 'nirweb-support') ?> 174 </button> 175 <p class="stasus_send_wpyt"></p> 176 </div> 177 </form> 178 <?php $accsses_file = str_replace('.','',trim( wpyar_ticket['mojaz_file_upload_user_wpyar'])); 179 $accsses_file = explode(",",trim($accsses_file));?> 180 <!-- End form--> 181 <script> 182 jQuery('body').on('change','#main_image',function () { 183 console.log(this.value.match(/\.(.+)$/)[1]); 184 var ext = this.value.match(/\.(.+)$/)[1]; 185 switch (ext) { 186 <?php foreach ($accsses_file as $file):?> 187 case "<?php echo $file ?>": 188 break; 189 <?php endforeach; ?> 190 191 default: 192 alert( wpyarticket.nvalid_file); 193 this.value = ''; 194 } 195 196 }); 197 //-------------------- Request Send ticket 198 jQuery('body').on('click','#nirweb_ticket_frm_user_send_ticket',function(e){ 199 e.preventDefault(); 200 jQuery('.base_loarder').css('display','flex'); 201 var subject = jQuery('#nirweb_ticket_frm_subject_send_ticket_user').val() 202 var department = jQuery('#nirweb_ticket_frm_department_send_ticket_user').attr('data-id'); 203 var dep_name = jQuery('#nirweb_ticket_frm_department_send_ticket_user').text(); 204 var resived_id = jQuery('#nirweb_ticket_frm_department_send_ticket_user ').attr('data-user'); 205 var content = jQuery('#nirweb_ticket_frm_content_send_ticket_user').val(); 206 var priority = jQuery('#nirweb_ticket_frm_priority_send_ticket_user').attr('data-id'); 207 var priority_name = jQuery('#nirweb_ticket_frm_priority_send_ticket_user').text(); 208 var product = jQuery('#product_user_wpyar_tixket').attr('data-id'); 209 var formData = new FormData(); 210 formData.append('updoc', jQuery('input[type=file]')[0].files[0]); 211 formData.append('subject',subject), 212 formData.append('department',department), 213 formData.append('dep_name',dep_name), 214 formData.append('resived_id',resived_id), 215 formData.append('content',content), 216 formData.append('priority',priority), 217 formData.append('priority_name',priority_name), 218 formData.append('product',product); 219 var image_select = jQuery('#main_image').val(); 220 if (image_select) { 221 var size_file = jQuery('input[type=file]')[0].files[0]['size']; 222 var ac_size = <?php echo wpyar_ticket['size_of_file_wpyartik']; ?>000000; 223 if(size_file >= ac_size){ 224 jQuery('.base_loarder').css('display','none'); 225 jQuery('.text_upload').css('display','none') 226 alert(wpyarticket.max_size_file); 227 return false 228 } 229 } 230 <?php if( @wpyar_ticket['require_procut_user_wpyar']=='1'){ 231 $shart = 'subject && department !=-1 && priority !=-1 && product !=-1 && content'; 232 }else{ 233 $shart= 'subject && department !=-1 && priority !=-1 && content'; 234 } ?> 235 if (<?php echo $shart; ?>) 236 { 237 formData.append('action', "user_send_tiket"); 238 jQuery.ajax({ 239 url: wpyarticket.ajax_url, 240 type: "POST", 241 data:formData,cache: false, 242 processData: false, 243 contentType: false, 244 success: function (response) { 245 if(response =='error_valid_type'){ 246 alert( wpyarticket.nvalid_file); 247 jQuery('.base_loarder').css('display','none'); 248 jQuery('.text_label_main_image').html('<?php echo __('Attachment File', 'nirweb-support') ?>'); 249 return false; 250 } 251 jQuery('.base_loarder').css('display','none'); 252 alert_success("<?php echo __('Send Ticket Success', 'nirweb-support') ?>"); 253 setTimeout(() => { 254 location.reload(); 255 }, 3000); 256 250 if (<?php echo $shart; ?>) { 251 formData.append('action', "user_send_tiket"); 252 jQuery.ajax({ 253 url: wpyarticket.ajax_url, 254 type: "POST", 255 data: formData, cache: false, 256 processData: false, 257 contentType: false, 258 success: function (response) { 259 if (response == 'error_valid_type') { 260 alert(wpyarticket.nvalid_file); 261 jQuery('.base_loarder').css('display', 'none'); 262 jQuery('.text_label_main_image').html('<?php echo __('Attachment File', 'nirweb-support') ?>'); 263 return false; 264 } 265 jQuery('.base_loarder').css('display', 'none'); 266 alert_success("<?php echo __('Send Ticket Success', 'nirweb-support') ?>"); 267 setTimeout(() => { 268 location.reload(); 269 }, 3000); 270 271 return false; 272 }, 273 }) 274 } else { 275 jQuery('.base_loarder').css('display', 'none'); 276 alert(wpyarticket.nes_field); 257 277 return false; 258 } ,278 } 259 279 }) 260 } else{ 261 jQuery('.base_loarder').css('display','none'); 262 alert( wpyarticket.nes_field); 263 return false; 264 } 265 }) 266 jQuery('body').on('click', '.bg_alert__nirweb', function (e) { 267 jQuery(this).hide(); 268 }) 269 jQuery('body').on('click', '.box_alert_nirweb .cancel', function (e) { 270 jQuery('.bg_alert__nirweb').hide(); 271 }) 272 273 274 jQuery('body').on('click', '.box_alert_nirweb', function (e) { 275 e.preventDefault(); 276 e.stopPropagation(); 277 278 }) 279 280 function alert_success(message) { 281 jQuery('body').append( 282 `<div class="bg_alert__nirweb"> 280 jQuery('body').on('click', '.bg_alert__nirweb', function (e) { 281 jQuery(this).hide(); 282 }) 283 jQuery('body').on('click', '.box_alert_nirweb .cancel', function (e) { 284 jQuery('.bg_alert__nirweb').hide(); 285 }) 286 287 288 jQuery('body').on('click', '.box_alert_nirweb', function (e) { 289 e.preventDefault(); 290 e.stopPropagation(); 291 292 }) 293 294 function alert_success(message) { 295 jQuery('body').append( 296 `<div class="bg_alert__nirweb"> 283 297 <div class="box_alert_nirweb"> 284 298 <svg width="60" height="60" enable-background="new 0 2 98 98" version="1.1" viewBox="0 2 98 98" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> … … 300 314 </div> 301 315 </div>` 302 )303 }304 </script>316 ) 317 } 318 </script> 305 319 </div> -
nirweb-support/trunk/nirweb-support.php
r2597765 r2703852 4 4 Description: NirWeb support is a great help desk and support plugin for WordPress with full support of WooCommerce 5 5 Author: nirweb Team 6 Version: 2. 7.96 Version: 2.8.0 7 7 Author URI: https://www.nirweb.ir 8 8 Text Domain: nirweb-support -
nirweb-support/trunk/readme.txt
r2597765 r2703852 3 3 Tags: support, Support Ticket, helpdesk, ticket system 4 4 Requires at least: 5.0 5 Tested up to: 5. 8.15 Tested up to: 5.9.2 6 6 Requires PHP: 7.0 7 Stable tag: 2. 7.97 Stable tag: 2.8.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 84 84 85 85 == Changelog == 86 = 2.8.0= 87 * fixed: some reported bugs 86 88 87 89 = 2.7.9=
Note: See TracChangeset
for help on using the changeset viewer.