Plugin Directory

Changeset 3096054


Ignore:
Timestamp:
06/01/2024 12:56:04 PM (21 months ago)
Author:
dipakraval
Message:

1.1.5 launch

Location:
bulk-mail-sender
Files:
99 added
16 edited

Legend:

Unmodified
Added
Removed
  • bulk-mail-sender/trunk/App/BMSIAdmin.php

    r3091711 r3096054  
    7373        if ($pagenow == "admin.php") {
    7474            if (in_array($_GET['page'], ["users", "create_user", "send_mail", "history", "newsletter", "newsletter_category", "bulk_mail_sender", "settings", "templates", "create_template"])) {
    75                 wp_enqueue_style('bms-admin-css', BMSI_DIR_URI . 'assets/css/admin_style.css', '1.1.4');
    76                 wp_enqueue_style('datatables-style', BMSI_DIR_URI . 'assets/css/jquery.dataTables.min.css', '1.1.4');
    77                 wp_enqueue_style('btn-css', BMSI_DIR_URI . 'assets/css/buttons.dataTables.min.css', '1.1.4');
    78                 wp_enqueue_style('filter_toggle', BMSI_DIR_URI . 'assets/css/bootstrap.min.css', '1.1.4');
    79                 wp_enqueue_style('font_awosme_icon', BMSI_DIR_URI . 'assets/css/all.min.css', '1.1.4');
    80                 wp_enqueue_style('chart_style', BMSI_DIR_URI . 'assets/css/apexcharts.min.css', '1.1.4');
    81                 wp_enqueue_style('jquery-confirm', BMSI_DIR_URI . 'assets/css/apexcharts.min.css', '1.1.4');
    82                 wp_enqueue_style('alert-css', BMSI_DIR_URI . 'assets/css/alert_style.css', '1.1.4');
     75                wp_enqueue_style('bms-admin-css', BMSI_DIR_URI . 'assets/css/admin_style.css', '1.1.3');
     76                wp_enqueue_style('datatables-style', BMSI_DIR_URI . 'assets/css/jquery.dataTables.min.css', '1.1.3');
     77                wp_enqueue_style('btn-css', BMSI_DIR_URI . 'assets/css/buttons.dataTables.min.css', '1.1.3');
     78                wp_enqueue_style('filter_toggle', BMSI_DIR_URI . 'assets/css/bootstrap.min.css', '1.1.3');
     79                wp_enqueue_style('font_awosme_icon', BMSI_DIR_URI . 'assets/css/all.min.css', '1.1.3');
     80                wp_enqueue_style('chart_style', BMSI_DIR_URI . 'assets/css/apexcharts.min.css', '1.1.3');
     81                wp_enqueue_style('jquery-confirm', BMSI_DIR_URI . 'assets/css/apexcharts.min.css', '1.1.3');
     82                wp_enqueue_style('alert-css', BMSI_DIR_URI . 'assets/css/alert_style.css', '1.1.3');
    8383                wp_enqueue_style('jquery-te-1.4.0-css', BMSI_DIR_URI . 'assets/css/jquery-te-1.4.0.css', '1.4.0');
    8484                wp_enqueue_script('chart_script', BMSI_DIR_URI . 'assets/js/apexcharts.min.js');
     
    9595                wp_enqueue_script('datatables-script', BMSI_DIR_URI . 'assets/js/jquery.dataTables.min.js', array('jquery'), '1.10.25', true);
    9696                wp_enqueue_script('btn-js', BMSI_DIR_URI . 'assets/js/dataTables.buttons.min.js', array('datatables'), '1.7.1', true);
    97                 wp_enqueue_script('bmsi_admin_js', BMSI_DIR_URI . 'assets/js/admin_script.js', ['jquery'], '1.1.4', true);
     97                wp_enqueue_script('bmsi_admin_js', BMSI_DIR_URI . 'assets/js/admin_script.js', ['jquery'], '1.1.3', true);
    9898                wp_localize_script(
    9999                    'bmsi_admin_js',
     
    127127            'bulk_mail_sender',
    128128            [$this, 'bmsi_main_admin_page'],
    129             'dashicons-chart-pie',
     129            BMSI_DIR_URI . 'assets/images/icon.svg',
    130130            6
    131131        );
     
    427427
    428428
    429             if ($option["cron"] == "true") {
     429            if (isset($option["cron"]) && $option["cron"] == "true") {
    430430                $email_queue = new BMSIEmailQueue;
    431431
     
    447447                $mail_counter++;
    448448            }
    449 
    450449
    451450            $count++;
     
    616615            $message .= $tracking_pixel;
    617616
    618             if ($option["cron"] == "true") {
     617            if (isset($option["cron"]) && $option["cron"] == "true") {
    619618                $email_queue = new BMSIEmailQueue;
    620619
     
    764763        $role = isset($_POST['role']) ? sanitize_text_field($_POST['role']) : "subscriber";
    765764
    766         if ($option["pass"] == "true") {
     765        if (isset($option["pass"]) && $option["pass"] == "true") {
    767766
    768767            $password = wp_generate_password($length = 12, $include_standard_special_chars = false);
     
    936935                            $message .= $tracking_pixel;
    937936
    938                             if ($option["cron"] == "true") {
     937                            if (isset($option["cron"]) && $option["cron"] == "true") {
    939938                                $email_queue = new BMSIEmailQueue;
    940939
     
    10611060        global $wpdb;
    10621061        $table_name = $wpdb->prefix . 'bmsi_news_letters_email';
    1063         $table_news_letters = $wpdb->prefix . 'bmsi_pro_send_mail_details';
     1062        $table_pro_send_email = $wpdb->prefix . 'bmsi_pro_send_mail_details';
    10641063        $table_total_mail = $wpdb->prefix . 'bmsi_total_mail';
    10651064        $tbl_send_mail_details = $wpdb->prefix . 'bmsi_send_mail_details';
     
    10741073
    10751074        $template_name = isset($_POST['template_name']) ? sanitize_text_field($_POST['template_name']) : "";
    1076         $category = isset($_POST['category']) ? sanitize_text_field($_POST['category']) : "";
     1075
     1076        $status = isset($_POST['status']) ? intval($_POST['status']) : "";
    10771077
    10781078        $overall_result = false;
     1079
     1080        $table = $wpdb->prefix . 'bmsi_news_letter_category';
     1081        $table_sub_category = $wpdb->prefix . 'bmsi_news_letter_sub_category';
     1082
     1083        $parent_id = isset($_POST['parentcategory']) ? intval($_POST['parentcategory']) : "";
     1084        $sub_id = isset($_POST['subcategory']) ? intval($_POST['subcategory']) : "";
     1085
     1086        if (!empty($sub_id)) {
     1087            $parent_data = $wpdb->get_results($wpdb->prepare("SELECT parent_category_id FROM $table_sub_category WHERE id = %d", $sub_id));
     1088            $parent_id = $parent_data[0]->parent_category_id;
     1089        }
    10791090
    10801091        if (!empty($template_name)) {
     
    11001111                            $email = $user->email;
    11011112                            $user_id = $user->id;
    1102                             $user_category = $user->category;
     1113                            $user_parent_category = $user->category;
     1114                            $user_sub_category = $user->sub_category;
     1115                            $user_status = $user->status;
    11031116                            $headers = array(
    11041117                                'From: ' . $from_email,
     
    11151128
    11161129                            $insert_detail_data = $wpdb->insert(
    1117                                 $table_news_letters,
     1130                                $table_pro_send_email,
    11181131                                $details_data
    11191132                            );
     
    11301143                            }
    11311144
     1145
    11321146                            $tracking_pixel = '<img src="' . plugins_url('track.php', __FILE__) . '?id=' . $email_id . '" alt="" width="1" height="1" border="0" />';
    11331147                            $message .= $tracking_pixel;
    11341148
    1135                             if ($option["cron"] == "true") {
    1136                                 if ($user_category == $category) {
    1137                                     $email_queue = new BMSIEmailQueue;
    1138 
    1139                                     $result = $email_queue->add_to_email_queue($email, $subject, $message, $headers);
     1149                            if (isset($option["cron"]) && $option["cron"] == "true") {
     1150                                if ($user_parent_category == $parent_id) {
     1151                                    if (!empty($sub_id) && $user_sub_category == $sub_id) {
     1152                                        if ($user_status == $status) {
     1153                                            $email_queue = new BMSIEmailQueue;
     1154
     1155                                            $result = $email_queue->add_to_email_queue($email, $subject, $message, $headers);
     1156                                        } else {
     1157                                            if ($status == "2") {
     1158                                                $email_queue = new BMSIEmailQueue;
     1159
     1160                                                $result = $email_queue->add_to_email_queue($email, $subject, $message, $headers);
     1161                                            }
     1162                                        }
     1163                                    } else {
     1164                                        if ($user_status == $status) {
     1165                                            $email_queue = new BMSIEmailQueue;
     1166
     1167                                            $result = $email_queue->add_to_email_queue($email, $subject, $message, $headers);
     1168                                        } else {
     1169                                            if ($status == "2") {
     1170                                                $email_queue = new BMSIEmailQueue;
     1171
     1172                                                $result = $email_queue->add_to_email_queue($email, $subject, $message, $headers);
     1173                                            }
     1174                                        }
     1175                                    }
    11401176                                } else {
    1141                                     if ($category == "All") {
    1142                                         $email_queue = new BMSIEmailQueue;
    1143 
    1144                                         $result = $email_queue->add_to_email_queue($email, $subject, $message, $headers);
     1177                                   
     1178                                    if ($parent_id == "0") {
     1179                                        if ($user_status == $status) {
     1180                                            $email_queue = new BMSIEmailQueue;
     1181
     1182                                            $result = $email_queue->add_to_email_queue($email, $subject, $message, $headers);
     1183                                        } else {
     1184                                            if ($status == "2") {
     1185                                                $email_queue = new BMSIEmailQueue;
     1186
     1187                                                $result = $email_queue->add_to_email_queue($email, $subject, $message, $headers);
     1188                                            }
     1189                                        }
    11451190                                    }
    11461191                                }
    11471192                            } else {
    1148                                 if ($user_category == $category) {
    1149                                     $result = wp_mail($email, $subject, $message, $headers);
     1193                                if ($user_parent_category == $parent_id) {
     1194                                    if (!empty($sub_id) && $user_sub_category == $sub_id) {
     1195                                        if ($user_status == $status) {
     1196                                            $result = wp_mail($email, $subject, $message, $headers);
     1197                                        } else {
     1198                                            if ($status == "2") {
     1199                                                $result = wp_mail($email, $subject, $message, $headers);
     1200                                            }
     1201                                        }
     1202                                    } else {
     1203                                        if ($user_status == $status) {
     1204                                            $result = wp_mail($email, $subject, $message, $headers);
     1205                                        } else {
     1206                                            if ($status == "2") {
     1207                                                $result = wp_mail($email, $subject, $message, $headers);
     1208                                            }
     1209                                        }
     1210                                    }
    11501211                                } else {
    1151                                     if ($category == "All") {
    1152                                         $result = wp_mail($email, $subject, $message, $headers);
     1212                                    if ($parent_id == "0") {
     1213                                        if ($user_status == $status) {
     1214                                            $result = wp_mail($email, $subject, $message, $headers);
     1215                                        } else {
     1216                                            if ($status == "2") {
     1217                                                $result = wp_mail($email, $subject, $message, $headers);
     1218                                            }
     1219                                        }
    11531220                                    }
    11541221                                }
     
    12751342        $sender_mail = !empty($_POST['sender_id']) ? sanitize_text_field($_POST['sender_id']) : "";
    12761343        $message = !empty($_POST['body']) ? wp_kses_post($_POST['body']) : " ";
    1277         $category = !empty($_POST['category']) ? wp_kses_post($_POST['category']) : " ";
     1344        $category = !empty($_POST['category']) ? sanitize_text_field($_POST['category']) : " ";
     1345        $status = !empty($_POST['status']) ? intval($_POST['status']) : " ";
     1346
     1347        $table = $wpdb->prefix . 'bmsi_news_letter_category';
     1348        $table_sub_category = $wpdb->prefix . 'bmsi_news_letter_sub_category';
     1349
     1350        $parent_id = isset($_POST['parentcategory']) ? intval($_POST['parentcategory']) : "";
     1351        $sub_id = isset($_POST['subcategory']) ? intval($_POST['subcategory']) : "";
     1352
     1353        if (!empty($sub_id)) {
     1354            $parent_data = $wpdb->get_results($wpdb->prepare("SELECT parent_category_id FROM $table_sub_category WHERE id = %d", $sub_id));
     1355            $parent_id = $parent_data[0]->parent_category_id;
     1356        }
    12781357
    12791358        if (!empty($results)) {
     
    12821361                    $email = $user->email;
    12831362                    $user_id = $user->id;
    1284                     $user_category = $user->category;
     1363                    $user_parent_category = $user->category;
     1364                    $user_sub_category = $user->sub_category;
     1365                    $user_status = $user->status;
    12851366                    $headers = array(
    12861367                        'From: ' . $sender . ', <' . $sender_mail . '>',
     
    13151396                    $mail_result = false;
    13161397
    1317                     if ($option["cron"] == "true") {
    1318                         if ($user_category == $category) {
    1319                             $email_queue = new BMSIEmailQueue;
    1320 
    1321                             $mail_result = $email_queue->add_to_email_queue($email, $subject, $message, $headers);
     1398                    if (isset($option["cron"]) && $option["cron"] == "true") {
     1399                        if ($user_parent_category == $parent_id) {
     1400                            if (!empty($sub_id) && $user_sub_category == $sub_id) {
     1401                                if ($user_status == $status) {
     1402                                    $email_queue = new BMSIEmailQueue;
     1403
     1404                                    $mail_result = $email_queue->add_to_email_queue($email, $subject, $message, $headers);
     1405                                } else {
     1406                                    if ($status == "2") {
     1407                                        $email_queue = new BMSIEmailQueue;
     1408
     1409                                        $mail_result = $email_queue->add_to_email_queue($email, $subject, $message, $headers);
     1410                                    }
     1411                                }
     1412                            } else {
     1413                                if ($user_status == $status) {
     1414                                    $email_queue = new BMSIEmailQueue;
     1415
     1416                                    $mail_result = $email_queue->add_to_email_queue($email, $subject, $message, $headers);
     1417                                } else {
     1418                                    if ($status == "2") {
     1419                                        $email_queue = new BMSIEmailQueue;
     1420
     1421                                        $mail_result = $email_queue->add_to_email_queue($email, $subject, $message, $headers);
     1422                                    }
     1423                                }
     1424                            }
    13221425                        } else {
    1323                             if ($category === "All") {
    1324                                 $email_queue = new BMSIEmailQueue;
    1325 
    1326                                 $mail_result = $email_queue->add_to_email_queue($email, $subject, $message, $headers);
     1426                            if ($parent_id == "0") {
     1427                                if ($user_status == $status) {
     1428                                    $email_queue = new BMSIEmailQueue;
     1429
     1430                                    $mail_result = $email_queue->add_to_email_queue($email, $subject, $message, $headers);
     1431                                } else {
     1432                                    if ($status == "2") {
     1433                                        $email_queue = new BMSIEmailQueue;
     1434
     1435                                        $mail_result = $email_queue->add_to_email_queue($email, $subject, $message, $headers);
     1436                                    }
     1437                                }
    13271438                            }
    13281439                        }
    13291440                    } else {
    1330                         if ($user_category == $category) {
    1331 
    1332                             $mail_result = wp_mail($email, $subject, $message, $headers);
     1441                        if ($user_parent_category == $parent_id) {
     1442                            if (!empty($sub_id) && $user_sub_category == $sub_id) {
     1443                                if ($user_status == $status) {
     1444                                    $mail_result = wp_mail($email, $subject, $message, $headers);
     1445                                } else {
     1446                                    if ($status == "2") {
     1447                                        $mail_result = wp_mail($email, $subject, $message, $headers);
     1448                                    }
     1449                                }
     1450                            } else {
     1451                                if ($user_status == $status) {
     1452                                    $mail_result = wp_mail($email, $subject, $message, $headers);
     1453                                } else {
     1454                                    if ($status == "2") {
     1455                                        $mail_result = wp_mail($email, $subject, $message, $headers);
     1456                                    }
     1457                                }
     1458                            }
    13331459                        } else {
    1334                             if ($category === "All") {
    1335 
    1336                                 $mail_result = wp_mail($email, $subject, $message, $headers);
     1460                            if ($parent_id == "0") {
     1461                                if ($user_status == $status) {
     1462                                    $mail_result = wp_mail($email, $subject, $message, $headers);
     1463                                } else {
     1464                                    if ($status == "2") {
     1465                                        $mail_result = wp_mail($email, $subject, $message, $headers);
     1466                                    }
     1467                                }
    13371468                            }
    13381469                        }
  • bulk-mail-sender/trunk/App/BMSIBase.php

    r3091711 r3096054  
    1010    public function bmsi_base_enqueue_scripts()
    1111    {
    12         wp_enqueue_style('bms-base-css', BMSI_DIR_URI . 'assets/css/base_style.css', '1.1.4');
    13         wp_enqueue_script('bms-base-js', BMSI_DIR_URI . 'assets/js/base_script.js', ['jquery'], '1.1.4', true);
     12        wp_enqueue_style('bms-base-css', BMSI_DIR_URI . 'assets/css/base_style.css', '1.1.5');
     13        wp_enqueue_script('bms-base-js', BMSI_DIR_URI . 'assets/js/base_script.js', ['jquery'], '1.1.5', true);
    1414    }
    1515}
  • bulk-mail-sender/trunk/App/BMSIDeactivate.php

    r3091711 r3096054  
    1515    public function bmsi_deactivate_enqueue_scripts()
    1616    {
    17         wp_enqueue_style('bms-feedback-style', BMSI_DIR_URI . 'assets/css/feedback.css', array(), '1.1.4');
    18         wp_enqueue_script('bms-feedback-script', BMSI_DIR_URI . 'assets/js/feedback.js', array('jquery'), '1.1.4', true);
     17        wp_enqueue_style('bms-feedback-style', BMSI_DIR_URI . 'assets/css/feedback.css', array(), '1.1.5');
     18        wp_enqueue_script('bms-feedback-script', BMSI_DIR_URI . 'assets/js/feedback.js', array('jquery'), '1.1.5', true);
    1919        wp_localize_script(
    2020            'bms-feedback-script',
     
    3636        $plugin = sanitize_text_field($_POST['plugin']);
    3737
     38        $reason_key = !empty($_POST['reason_key']) ? sanitize_text_field($_POST['reason_key']) : "";
     39
     40        $message = !empty($_POST['reason_text']) ? sanitize_text_field($_POST['reason_text']) : "";
     41
     42        $api_url = 'https://bulkmail.insixus.com/wp-json/insixus/v1/submission-deactivate-form';
     43        $api_data = array(
     44            'site' => get_site_url(),
     45            'reason' => $reason_key,
     46            'message' => $message,
     47            'extra' => intval(BMSI_PLUGIN_VERSION)
     48        );
     49
     50        $response = wp_remote_post(
     51            $api_url,
     52            array(
     53                'method' => 'POST',
     54                'body' => wp_json_encode($api_data),
     55                'headers' => array(
     56                    'Content-Type' => 'application/json',
     57                ),
     58            )
     59        );
     60
    3861        deactivate_plugins($plugin, true);
    3962
  • bulk-mail-sender/trunk/README.md

    r3091711 r3096054  
    44Requires at least: 5.0
    55Tested up to: 6.4
    6 Stable tag: 1.1.4
     6Stable tag: 1.1.5
    77Requires PHP: 7.0
    88License: GPLv3 or later
     
    2929== Changelog ==
    3030
    31 = 1.1.4 - 22/01/2022
     31= 1.1.5 - 22/01/2022
    3232* Developed This Plugin
  • bulk-mail-sender/trunk/assets/css/admin_style.css

    r3091711 r3096054  
    138138    color: #000;
    139139    cursor: pointer;
     140}
     141
     142.jconfirm-content-pane .jconfirm-content{
     143    margin-bottom: 0 !important;
     144}
     145
     146#additionalOptions .selectcategory{
     147    background: #fff url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E) no-repeat right 5px top 55% !important;
     148    margin: 0px;
     149    border-radius: 11px !important;
     150    border: 2px solid #F8D57E !important;
     151    outline: none !important;
     152    padding: 7px 26px 7px 15px !important;
     153    box-shadow: 0px 0px 5px -3px #000 !important;
     154    font-size: 14px;
     155    max-width: 100%;
     156}
     157
     158.new_letter_add_sub_category .form-contant .firstAndLastName{
     159    grid-template-columns: 100% !important;
    140160}
    141161
  • bulk-mail-sender/trunk/assets/css/feedback.css

    r3091711 r3096054  
    2828    width: 100%;
    2929    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    30     text-align: center;
     30    text-align: left;
    3131    z-index: 10000;
    3232}
     
    3636    font-size: 24px;
    3737    color: #333;
     38    text-align: center;
    3839}
    3940
    40 #bms-feedback-form {
    41     display: flex;
    42     flex-direction: column;
    43     align-items: center;
     41#bms-feedback-content input[type=radio] {
     42    height: 1rem;
     43    margin-bottom: 5px;
    4444}
    4545
    46 #bms-feedback-form textarea {
     46#bms-feedback-content input[type=text] {
     47    display: block;
     48    padding: 5px 16px;
     49    outline: none;
     50    border: 1px solid transparent;
     51    transition: border 400ms ease-in-out, color 400ms ease-in-out;
    4752    width: 100%;
    48     padding: 15px;
    49     border: 1px solid #ddd;
     53    background-color: #fff !important;
     54    color: #000000;
     55    border: 1px solid #eee;
    5056    border-radius: 5px;
    51     font-size: 16px;
    52     resize: none;
    53     margin-bottom: 20px;
    54     box-sizing: border-box;
     57    background: unset;
     58    margin: 0 0 8px 0;
     59}
     60
     61#bms-feedback-content .form-group{
     62    margin-bottom: 8px;
     63}
     64
     65#bms-feedback-content .form-group .form-label {
     66    color: #171c26;
     67    display: inline-block;
     68    font-size: 14px;
     69    margin-bottom: 10px;
     70    font-weight: 500;
     71    line-height: 1.2;
    5572}
    5673
     
    6279
    6380#bms-feedback-form .button-primary {
    64     background: #0073aa;
    65     color: #fff;
     81    padding: 6px 30px;
     82    font-size: 14px;
     83    border: 0;
     84    border-radius: 4px;
     85    display: inline-block;
     86    cursor: pointer;
     87    text-transform: uppercase !important;
     88    transition: background-color 400ms ease-in-out;
     89    font-weight: 600;
     90    margin-bottom: 8px;
     91    margin-top: 8px;
     92    color: #000;
     93    background-color: #F8D57E;
     94}
     95
     96
     97#bms-feedback-content .button-secondary {
     98    background: transparent;
     99    color: #000;
    66100    border: none;
    67101    padding: 10px 20px;
    68102    border-radius: 5px;
    69103    cursor: pointer;
    70     font-size: 16px;
     104    font-size: 25px;
     105    position: absolute;
     106    top: 0;
     107    right: 0;
     108    line-height: 1;
    71109}
    72110
    73 #bms-feedback-form .button-primary:hover {
    74     background: #005177;
     111#bms-feedback-content .button-secondary:focus,
     112#bms-feedback-content .button-primary:focus{
     113    border: none !important;
     114    box-shadow: none !important;
    75115}
    76116
    77 #bms-feedback-form .button-secondary {
    78     background: #d9534f;
    79     color: #fff;
    80     border: none;
    81     padding: 10px 20px;
    82     border-radius: 5px;
    83     cursor: pointer;
    84     font-size: 16px;
     117#bms-feedback-content .button-secondary:focus-visible,
     118#bms-feedback-content .button-primary:focus{
     119    border: none !important;
     120    box-shadow: none !important;
    85121}
    86 
    87 #bms-feedback-form .button-secondary:hover {
    88     background: #c9302c;
    89 }
  • bulk-mail-sender/trunk/assets/js/admin_script.js

    r3091711 r3096054  
    753753
    754754                var template_name = jQuery("#template_name").val();
    755                 var category = jQuery("#Ucategory option:selected").val();
     755                var status = jQuery("#Ustatus option:selected").val();
     756                var parentselectedCategory = '';
     757                var subselectedCategory = '';
     758
     759                parentselectedCategory = jQuery('#Newslettercategory').find('option:selected').filter(function () {
     760                    return jQuery(this).hasClass('level-0');
     761                }).val();
     762
     763                subselectedCategory = jQuery('#Newslettercategory').find('option:selected').filter(function () {
     764                    return jQuery(this).hasClass('level-1');
     765                }).val();
    756766
    757767                jQuery.ajax({
    758                     "url": BMSI_object.ajax_url,
    759                     "type": "POST",
    760                     "data": {
    761                         "action": "BMSI_User_send_mail_template_newsletter",
    762                         "template_name": template_name,
    763                         "category": category,
    764                         "send_mail_user_nonce": BMSI_object.nonce,
     768                    url: BMSI_object.ajax_url,
     769                    type: "POST",
     770                    dataType: "JSON",
     771                    data: {
     772                        action: "BMSI_User_send_mail_template_newsletter",
     773                        template_name: template_name,
     774                        parentcategory: parentselectedCategory,
     775                        subcategory: subselectedCategory,
     776                        status: status,
     777                        send_mail_user_nonce: BMSI_object.nonce,
    765778                    },
    766779                    success: function (response) {
     
    774787                                    btnClass: 'add-button',
    775788                                    action: function () {
    776                                         if (response.status == true) {
     789                                        if (response.status === true) {
    777790                                            window.location.href = BMSI_object.admin_url + "admin.php?page=newsletter";
    778791                                        }
     
    783796                        jQuery(".btn-txt").css("display", "block");
    784797                        jQuery(".spinn").removeClass("add_custome_loader");
    785                         jQuery(".btn-newslettter").removeAttr('disabled');
    786 
    787                     }, error: function (jqXHR, textStatus, errorThrown) {
     798                        jQuery(".btn-send-mail").removeAttr('disabled');
     799                    },
     800                    error: function (jqXHR, textStatus, errorThrown) {
    788801                        if (textStatus === 'timeout') {
    789802                            jQuery.confirm({
     
    796809                                        btnClass: 'add-button',
    797810                                        action: function () {
    798 
    799                                             return
     811                                            return;
    800812                                        }
    801813                                    }
     
    812824                                        btnClass: 'add-button',
    813825                                        action: function () {
    814                                             return
     826                                            return;
    815827                                        }
    816828                                    }
     
    818830                            });
    819831                        }
    820                         jQuery("#tab4 .btn-txt").css("display", "block");
    821                         jQuery("#tab4 .spinn").removeClass("add_custome_loader");
    822                         jQuery(".btn-newslettter").removeAttr('disabled');
    823 
    824                     },
     832                        jQuery(".btn-txt").css("display", "block");
     833                        jQuery(".spinn").removeClass("add_custome_loader");
     834                        jQuery(".btn-send-mail").removeAttr('disabled');
     835                    }
    825836                });
    826837            }
     
    841852                var mail_contant = tinymce.get('bmsi_mail_box').getContent({ format: 'html' });
    842853                var category = jQuery("#category").val();
     854                var Status = jQuery("#Status option:selected").val();
    843855
    844856                jQuery.ajax({
     
    852864                        "body": mail_contant,
    853865                        "category": category,
     866                        "Status": Status,
    854867                        "send_mail_user_nonce": BMSI_object.nonce,
    855868                    },
  • bulk-mail-sender/trunk/assets/js/feedback.js

    r3091711 r3096054  
    1 jQuery(document).ready(function($) {
     1jQuery(document).ready(function ($) {
    22    // Append feedback form HTML to the body
    33    $('body').append(`
    4         <div id="bms-feedback-popup" style="display:none;">
    5             <div id="bms-feedback-overlay"></div>
    6             <div id="bms-feedback-content">
    7                 <h2>We Value Your Feedback</h2>
    8                 <form id="bms-feedback-form">
    9                     <textarea name="feedback" rows="5" cols="50" placeholder="Please provide your feedback..."></textarea>
    10                     <div class="bms-buttons">
    11                         <button type="submit" class="button-primary">Submit Feedback and Deactivate Plugin</button>
    12                         <button type="button" class="button-secondary" id="bms-close-popup">Cancel</button>
    13                     </div>
    14                 </form>
     4    <div id="bms-feedback-popup" style="display:none;">
     5    <div id="bms-feedback-overlay"></div>
     6    <div id="bms-feedback-content">
     7    <button type="button" class="button-secondary" id="bms-close-popup">×</button>
     8        <h2>We Value Your Feedback</h2>
     9        <form id="bms-feedback-form">
     10            <div bis_skin_checked="1">
     11                <h4>Please share why you are deactivating Bulk Mail Sender:</h4>
     12                <div class="form-group mb-2" bis_skin_checked="1">
     13                    <input id="bulk-mail-sender-no_longer_needed" type="radio" name="reason_key" value="no_longer_needed">
     14                    <label for="bulk-mail-sender-no_longer_needed" class="form-label">I no longer need the plugin</label>
     15                </div>
     16                <div class="form-group mb-2" bis_skin_checked="1">
     17                    <input id="bulk-mail-sender-found_a_better_plugin" type="radio" name="reason_key" value="found_a_better_plugin">
     18                    <label for="bulk-mail-sender-found_a_better_plugin" class="form-label">I found a better plugin</label>
     19                    <input type="text" class="reason-text" style="width: 100%" name="reason_found_a_better_plugin" placeholder="Please share which plugin" readonly>
     20                </div>
     21                <div class="form-group mb-2" bis_skin_checked="1">
     22                    <input id="bulk-mail-sender-couldnt_get_the_plugin_to_work" type="radio" name="reason_key" value="couldnt_get_the_plugin_to_work">
     23                    <label for="bulk-mail-sender-couldnt_get_the_plugin_to_work" class="form-label">I couldn't get the plugin to work</label>
     24                </div>
     25                <div class="form-group mb-2" bis_skin_checked="1">
     26                    <input id="bulk-mail-sender-temporary_deactivation" type="radio" name="reason_key" value="temporary_deactivation">
     27                    <label for="bulk-mail-sender-temporary_deactivation" class="form-label">It's a temporary deactivation</label>
     28                </div>
     29                <div class="form-group mb-2" bis_skin_checked="1">
     30                    <input id="bulk-mail-sender-pro_plugin" type="radio" name="reason_key" value="pro_plugin">
     31                    <label for="bulk-mail-sender-pro_plugin" class="form-label">I have bulk main sender Pro</label>
     32                    <div bis_skin_checked="1">Note: bulk main sender is a Mandatory plugin for PRO version to work</div>
     33                </div>
     34                <div class="form-group mb-2" bis_skin_checked="1">
     35                    <input id="bulk-mail-sender-customization_issue" type="radio" name="reason_key" value="customization_issue">
     36                    <label for="bulk-mail-sender-customization_issue" class="form-label">Not able To customize</label>
     37                    <input type="text" class="reason-text" style="width: 100%" name="reason_customization_issue" placeholder="Please share where you need customization" readonly>
     38                </div>
     39                <div class="form-group mb-2" bis_skin_checked="1">
     40                    <input id="bulk-mail-sender-other" type="radio" name="reason_key" value="other">
     41                    <label for="bulk-mail-sender-other" class="form-label">Other</label>
     42                    <input type="text" class="reason-text" style="width: 100%" name="reason_other" placeholder="Please share the reason" readonly>
     43                </div>
    1544            </div>
    16         </div>
     45           
     46            <p id="bms-error-message" style="color:red; display:none;">*Please select a reason for deactivation.</p>
     47            <div class="bms-buttons">
     48                <button type="submit" class="button-primary" id="deactivtion_button"><span id="deactivtion_button_text">Submit & Deactivate</span><span id="Submitting" style="display:none;">Submitting..</span></button>
     49               
     50            </div>
     51        </form>
     52    </div>
     53</div>
    1754    `);
    1855
     56    // Enable corresponding text input when radio button is selected
     57    $('input[type=radio][name=reason_key]').change(function () {
     58        $('input.reason-text').prop('readonly', true).val(''); // Disable all text inputs and clear them
     59        $(this).closest('.form-group').find('input.reason-text').prop('readonly', false); // Enable the related text input
     60    });
     61
    1962    // Show feedback form popup on plugin deactivate
    20     $(document).on('click', '#deactivate-bulk-mail-sender', function(e) {
     63    $(document).on('click', '#deactivate-bulk-mail-sender', function (e) {
    2164        e.preventDefault();
    2265        $('#bms-feedback-popup').fadeIn();
     
    2467
    2568    // Handle feedback form submission
    26     $('#bms-feedback-form').on('submit', function(e) {
     69    $('#bms-feedback-form').on('submit', function (e) {
    2770        e.preventDefault();
    28         var feedback = $(this).find('textarea[name="feedback"]').val();
    29        
    30         $.ajax({
    31             url: bms_ajax.ajax_url,
    32             method: 'POST',
    33             data: {
    34                 action: 'bms_handle_feedback',
    35                 security: bms_ajax.nonce,
    36                 feedback: feedback,
    37                 plugin: bms_ajax.plugin
    38             },
    39             success: function(response) {
    40                 if (response.success) {
    41                     $('#bms-feedback-popup').fadeOut(function() {
    42                         window.location.reload();
    43                     });
     71
     72        var reason_key = $('input[name=reason_key]:checked').val();
     73        if (!reason_key) {
     74            $('#bms-error-message').show();
     75            return;
     76        } else {
     77            $('#bms-error-message').hide();
     78            var reason_text = $('input[name=reason_key]:checked').closest('.form-group').find('input.reason-text').val();
     79
     80            jQuery("#Submitting").show();
     81            jQuery("#deactivtion_button_text").hide();
     82
     83            var button = $('#deactivtion_button');
     84            button.prop('disabled', true);
     85
     86            $.ajax({
     87                url: bms_ajax.ajax_url,
     88                method: 'POST',
     89                data: {
     90                    action: 'bms_handle_feedback',
     91                    security: bms_ajax.nonce,
     92                    reason_key: reason_key,
     93                    reason_text: reason_text || '',
     94                    plugin: bms_ajax.plugin
     95                },
     96                success: function (response) {
     97                    if (response.success) {
     98                        $('#bms-feedback-popup').fadeOut(function () {
     99                            window.location.reload();
     100                        });
     101                    } else {
     102                        $button.prop('disabled', false).removeClass('loading');
     103                    }
     104                },
     105                error: function () {
     106                    $button.prop('disabled', false).removeClass('loading');
    44107                }
    45             }
    46         });
     108            });
     109        }
    47110    });
    48111
    49     $('#bms-feedback-overlay, #bms-close-popup').on('click', function() {
     112    $('#bms-feedback-overlay, #bms-close-popup').on('click', function () {
    50113        $('#bms-feedback-popup').fadeOut();
    51114    });
  • bulk-mail-sender/trunk/bulk_mail_sender.php

    r3091711 r3096054  
    44 * Plugin URI: https://insixus.com/
    55 * Description: Bulk Mail Sender
    6  * Version: 1.1.4
     6 * Version: 1.1.5
    77 * Author: InSixUs InfoTech
    88 * Text Domain: Bulk Mail Sender
     
    1515
    1616defined('ABSPATH') or die('Something went wrong');
     17
     18ini_set('display_errors', 1);
    1719
    1820if (file_exists(dirname(__FILE__) . '/vendor/autoload.php')) {
     
    3032if (!defined('BMSI_DIR_URI')) {
    3133    define('BMSI_DIR_URI', plugin_dir_url(__FILE__));
     34}
     35if (!defined('BMSI_PLUGIN_VERSION')) {
     36    define('BMSI_PLUGIN_VERSION', '1.1.5');
    3237}
    3338
  • bulk-mail-sender/trunk/readme.txt

    r3091711 r3096054  
    44Requires at least: 5.0
    55Tested up to: 6.5
    6 Stable tag: 1.1.4
     6Stable tag:1.1.5
    77Requires PHP: 7.0
    88License: GPLv3 or later
     
    5757* Settings added
    5858* Solve bugs
     59
     60= 1.1.5 - 01/06/2024
     61* Add newsletter subcategory
     62* Solve bugs
  • bulk-mail-sender/trunk/templates/BMSIAddUser.php

    r3091711 r3096054  
    55?>
    66
    7 <?php include "BMSIHeader.php"; ?>
     7<?php
     8
     9include "BMSIHeader.php";
     10
     11?>
    812
    913<div class="col-lg-10">
     
    1317        $nonce = wp_create_nonce('create_user_nonce');
    1418        ?>
    15         <form action="#" method="POST" class="form_data">
    16             <div id="form_data">
    17                 <input type="hidden" id="create_user_nonce" name="create_user_nonce"
    18                     value="<?php echo esc_attr($nonce); ?>" />
    19                 <div class="pt-4"></div>
    20                 <div class="form-contant d-flex flex-column">
    21                     <div
    22                         class="add-new-users d-lg-flex d-md-flex d-sm-flex d-block justify-content-between flex-row align-items-center">
    23                         <div class="title">
    24                             <h1 class="fw-bold" style="font-size: 40px;">Add New User</h1>
    25                         </div>
     19
     20        <?php if (is_bulk_mail_pro_activated()) {
     21            if (get_option('BMIS_Pro_activated')) { ?>
     22
     23                <form action="#" method="POST" class="form_data">
     24                    <div id="form_data">
     25                        <input type="hidden" id="create_user_nonce" name="create_user_nonce"
     26                            value="<?php echo esc_attr($nonce); ?>" />
     27                        <div class="pt-4"></div>
     28                        <div class="form-contant d-flex flex-column">
     29                            <div
     30                                class="add-new-users d-lg-flex d-md-flex d-sm-flex d-block justify-content-between flex-row align-items-center">
     31                                <div class="title">
     32                                    <h1 class="fw-bold" style="font-size: 40px;">Add New User</h1>
     33                                </div>
     34                                <div
     35                                    class="d-flex justify-content-lg-between justify-content-md-between justify-content-sm-between justify-content-start flex-row">
     36                                    <a class="add-button border-0 btn-back"
     37                                        href="<?php printf(esc_html('%sadmin.php?page=users', 'bulk-mail'), esc_html($admin_url)); ?>">Back</a>
     38                                    <button type="submit" name="submit-sub" id="submit"
     39                                        class="add-button fs-16menu border-0 btn_add_user btn-save"><span
     40                                            class="btn-txt">Save</span><i class="fa-solid fa-spinner spinn"></i></button>
     41                                </div>
     42                            </div>
     43                            <div class="firstAndLastName">
     44                                <div>
     45                                    <label for="fname">First Name</label>
     46                                    <input type="text" class="input-groups" name="fname" id="fname"
     47                                        placeholder="Enter User First Name" value="<?php if (!empty($user_names[0])) {
     48                                            printf(esc_html__('%s.', 'bulk-mail'), esc_html($edit_data[0]->email));
     49                                        } ?>" required>
     50                                </div>
     51                                <div>
     52                                    <label for="lname" class="lname">Last Name</label>
     53                                    <input type="text" class="input-groups" name="lname" id="lname"
     54                                        placeholder="Enter User Last Name" value="<?php if (!empty($user_names[1])) {
     55                                            printf(esc_html__('%s.', 'bulk-mail'), esc_html($user_names[1]));
     56                                        } ?>" required>
     57                                </div>
     58                            </div>
     59                            <div class="firstAndLastName">
     60                                <div>
     61                                    <label for="email">Email</label>
     62                                    <input type="email" class="input-groups" name="email" id="email"
     63                                        placeholder="Enter User Email" value="<?php if (!empty($edit_data[0]->email)) {
     64                                            printf(esc_html__('%s.', 'bulk-mail'), esc_html($edit_data[0]->email));
     65                                        } ?>" required>
     66                                </div>
     67                                <div>
     68                                    <label for="mob">Mobile No</label>
     69                                    <input type="number" class="input-groups" name="mob" id="mob"
     70                                        placeholder="Enter User Mobile Number" value="<?php if (!empty($edit_data[0]->mobile)) {
     71                                            printf(esc_html__('%s.', 'bulk-mail'), esc_html($edit_data[0]->mobile));
     72                                        } ?>" required>
     73                                </div>
     74                            </div>
     75
     76                            <div class="firstAndLastName">
     77                                <?php
     78                                $option = get_option("BMSI_User_Options");
     79                                if ($option["pass"] == "false") {
     80                                    ?>
     81                                    <div>
     82
     83                                        <label for="pass">Password</label>
     84                                        <input type="text" class="input-groups" name="pass" id="pass"
     85                                            placeholder="Enter User Password" value="<?php if (!empty($edit_data[0]->pass)) {
     86                                                printf(esc_html__('%s.', 'bulk-mail'), esc_html($edit_data[0]->pass));
     87                                            } ?>" required>
     88                                    </div>
     89
     90                                <?php } ?>
     91                                <div>
     92                                    <label for="role">User Role</label>
     93                                    <?php
     94                                    global $wp_roles;
     95                                    $roles = $wp_roles->get_names();
     96                                    ?>
     97                                    <select name="role" id="role" class="input-groups">
     98                                        <?php
     99                                        foreach ($roles as $key => $role) { ?>
     100                                            <option name="roles" value="<?php echo esc_attr($key); ?>">
     101                                                <?php echo esc_attr($role); ?>
     102                                            </option>
     103                                        <?php } ?>
     104                                    </select>
     105
     106                                </div>
     107
     108                            </div>
     109                            <div class="align-items-end save-button">
     110                                <button type="submit" name="submit-sub" id="submit"
     111                                    class="add-button fs-16menu border-0 btn_add_user btn-save"><span
     112                                        class="btn-txt">Save</span><i class="fa-solid fa-spinner spinn"></i></button>
     113                            </div>
     114                        </div>
     115                    </div>
     116                </form>
     117            <?php } else { ?>
     118                <div class="dashboard-bg-image d-flex justify-content-center align-items-center">
     119                    <div class="dashboard-wrapper">
     120                        <div class="bg-color p-3 rounded-4 mx-5">
     121                            <svg xmlns="http://www.w3.org/2000/svg" width="55" height="55" viewBox="0 0 66 75" fill="none">
     122                                <path
     123                                    d="M58.8933 37.3734H22.9333V22.4884C22.9333 16.7711 27.5298 12.0212 33.2718 11.9635C39.0718 11.9057 43.8133 16.5979 43.8133 22.3584V24.6684C43.8133 26.5886 45.3648 28.1334 47.2933 28.1334H51.9333C53.8618 28.1334 55.4133 26.5886 55.4133 24.6684V22.3584C55.4133 10.231 45.4808 0.37016 33.3008 0.413472C21.1208 0.456785 11.3333 10.4475 11.3333 22.575V37.3734H7.85331C4.01081 37.3734 0.893311 40.4775 0.893311 44.3034V67.4033C0.893311 71.2293 4.01081 74.3333 7.85331 74.3333H58.8933C62.7358 74.3333 65.8533 71.2293 65.8533 67.4033V44.3034C65.8533 40.4775 62.7358 37.3734 58.8933 37.3734ZM39.1733 59.3184C39.1733 62.509 36.5778 65.0933 33.3733 65.0933C30.1688 65.0933 27.5733 62.509 27.5733 59.3184V52.3884C27.5733 49.1977 30.1688 46.6134 33.3733 46.6134C36.5778 46.6134 39.1733 49.1977 39.1733 52.3884V59.3184Z"
     124                                    fill="white" />
     125                            </svg>
     126                        </div>
     127                        <div class="text-center mt-2">
     128                            <p style="margin-bottom:0;">Activate Pro version</p>
     129                            <a
     130                                href="<?php echo esc_url(get_site_url() . '/wp-admin/options-general.php?page=bmsi_pro_settings') ?>">click
     131                                here</a>
     132                        </div>
     133                    </div>
     134                </div>
     135            <?php }
     136        } else { ?>
     137
     138            <form action="#" method="POST" class="form_data">
     139                <div id="form_data">
     140                    <input type="hidden" id="create_user_nonce" name="create_user_nonce"
     141                        value="<?php echo esc_attr($nonce); ?>" />
     142                    <div class="pt-4"></div>
     143                    <div class="form-contant d-flex flex-column">
    26144                        <div
    27                             class="d-flex justify-content-lg-between justify-content-md-between justify-content-sm-between justify-content-start flex-row">
    28                             <a class="add-button border-0 btn-back"
    29                                 href="<?php printf(esc_html('%sadmin.php?page=users', 'bulk-mail'), esc_html($admin_url)); ?>">Back</a>
     145                            class="add-new-users d-lg-flex d-md-flex d-sm-flex d-block justify-content-between flex-row align-items-center">
     146                            <div class="title">
     147                                <h1 class="fw-bold" style="font-size: 40px;">Add New User</h1>
     148                            </div>
     149                            <div
     150                                class="d-flex justify-content-lg-between justify-content-md-between justify-content-sm-between justify-content-start flex-row">
     151                                <a class="add-button border-0 btn-back"
     152                                    href="<?php printf(esc_html('%sadmin.php?page=users', 'bulk-mail'), esc_html($admin_url)); ?>">Back</a>
     153                                <button type="submit" name="submit-sub" id="submit"
     154                                    class="add-button fs-16menu border-0 btn_add_user btn-save"><span
     155                                        class="btn-txt">Save</span><i class="fa-solid fa-spinner spinn"></i></button>
     156                            </div>
     157                        </div>
     158                        <div class="firstAndLastName">
     159                            <div>
     160                                <label for="fname">First Name</label>
     161                                <input type="text" class="input-groups" name="fname" id="fname"
     162                                    placeholder="Enter User First Name" value="<?php if (!empty($user_names[0])) {
     163                                        printf(esc_html__('%s.', 'bulk-mail'), esc_html($edit_data[0]->email));
     164                                    } ?>" required>
     165                            </div>
     166                            <div>
     167                                <label for="lname" class="lname">Last Name</label>
     168                                <input type="text" class="input-groups" name="lname" id="lname"
     169                                    placeholder="Enter User Last Name" value="<?php if (!empty($user_names[1])) {
     170                                        printf(esc_html__('%s.', 'bulk-mail'), esc_html($user_names[1]));
     171                                    } ?>" required>
     172                            </div>
     173                        </div>
     174                        <div class="firstAndLastName">
     175                            <div>
     176                                <label for="email">Email</label>
     177                                <input type="email" class="input-groups" name="email" id="email"
     178                                    placeholder="Enter User Email" value="<?php if (!empty($edit_data[0]->email)) {
     179                                        printf(esc_html__('%s.', 'bulk-mail'), esc_html($edit_data[0]->email));
     180                                    } ?>" required>
     181                            </div>
     182                            <div>
     183                                <label for="mob">Mobile No</label>
     184                                <input type="number" class="input-groups" name="mob" id="mob"
     185                                    placeholder="Enter User Mobile Number" value="<?php if (!empty($edit_data[0]->mobile)) {
     186                                        printf(esc_html__('%s.', 'bulk-mail'), esc_html($edit_data[0]->mobile));
     187                                    } ?>" required>
     188                            </div>
     189                        </div>
     190
     191                        <div class="firstAndLastName">
     192                            <?php
     193                            $option = get_option("BMSI_User_Options");
     194                            if ($option["pass"] == "false") {
     195                                ?>
     196                                <div>
     197
     198                                    <label for="pass">Password</label>
     199                                    <input type="text" class="input-groups" name="pass" id="pass"
     200                                        placeholder="Enter User Password" value="<?php if (!empty($edit_data[0]->pass)) {
     201                                            printf(esc_html__('%s.', 'bulk-mail'), esc_html($edit_data[0]->pass));
     202                                        } ?>" required>
     203                                </div>
     204
     205                            <?php } ?>
     206                            <div>
     207                                <label for="role">User Role</label>
     208                                <?php
     209                                global $wp_roles;
     210                                $roles = $wp_roles->get_names();
     211                                ?>
     212                                <select name="role" id="role" class="input-groups">
     213                                    <?php
     214                                    foreach ($roles as $key => $role) { ?>
     215                                        <option name="roles" value="<?php echo esc_attr($key); ?>">
     216                                            <?php echo esc_attr($role); ?>
     217                                        </option>
     218                                    <?php } ?>
     219                                </select>
     220
     221                            </div>
     222
     223                        </div>
     224                        <div class="align-items-end save-button">
    30225                            <button type="submit" name="submit-sub" id="submit"
    31226                                class="add-button fs-16menu border-0 btn_add_user btn-save"><span
     
    33228                        </div>
    34229                    </div>
    35                     <div class="firstAndLastName">
    36                         <div>
    37                             <label for="fname">First Name</label>
    38                             <input type="text" class="input-groups" name="fname" id="fname"
    39                                 placeholder="Enter User First Name" value="<?php if (!empty($user_names[0])) {
    40                                     printf(esc_html__('%s.', 'bulk-mail'), esc_html($edit_data[0]->email));
    41                                 } ?>" required>
    42                         </div>
    43                         <div>
    44                             <label for="lname" class="lname">Last Name</label>
    45                             <input type="text" class="input-groups" name="lname" id="lname"
    46                                 placeholder="Enter User Last Name" value="<?php if (!empty($user_names[1])) {
    47                                     printf(esc_html__('%s.', 'bulk-mail'), esc_html($user_names[1]));
    48                                 } ?>" required>
    49                         </div>
    50                     </div>
    51                     <div class="firstAndLastName">
    52                         <div>
    53                             <label for="email">Email</label>
    54                             <input type="email" class="input-groups" name="email" id="email"
    55                                 placeholder="Enter User Email" value="<?php if (!empty($edit_data[0]->email)) {
    56                                     printf(esc_html__('%s.', 'bulk-mail'), esc_html($edit_data[0]->email));
    57                                 } ?>" required>
    58                         </div>
    59                         <div>
    60                             <label for="mob">Mobile No</label>
    61                             <input type="number" class="input-groups" name="mob" id="mob"
    62                                 placeholder="Enter User Mobile Number" value="<?php if (!empty($edit_data[0]->mobile)) {
    63                                     printf(esc_html__('%s.', 'bulk-mail'), esc_html($edit_data[0]->mobile));
    64                                 } ?>" required>
    65                         </div>
    66                     </div>
    67 
    68                     <div class="firstAndLastName">
    69                         <?php
    70                         $option = get_option("BMSI_User_Options");
    71                         if ($option["pass"] == "false") {
    72                             ?>
    73                             <div>
    74 
    75                                 <label for="pass">Password</label>
    76                                 <input type="text" class="input-groups" name="pass" id="pass"
    77                                     placeholder="Enter User Password" value="<?php if (!empty($edit_data[0]->pass)) {
    78                                         printf(esc_html__('%s.', 'bulk-mail'), esc_html($edit_data[0]->pass));
    79                                     } ?>" required>
    80                             </div>
    81 
    82                         <?php } ?>
    83                         <div>
    84                             <label for="role">User Role</label>
    85                             <?php
    86                             global $wp_roles;
    87                             $roles = $wp_roles->get_names();
    88                             ?>
    89                             <select name="role" id="role" class="input-groups">
    90                                 <?php
    91                                 foreach ($roles as $key => $role) { ?>
    92                                     <option name="roles" value="<?php echo esc_attr($key); ?>">
    93                                         <?php echo esc_attr($role); ?>
    94                                     </option>
    95                                 <?php } ?>
    96                             </select>
    97 
    98                         </div>
    99 
    100                     </div>
    101                     <div class="align-items-end save-button">
    102                         <button type="submit" name="submit-sub" id="submit"
    103                             class="add-button fs-16menu border-0 btn_add_user btn-save"><span
    104                                 class="btn-txt">Save</span><i class="fa-solid fa-spinner spinn"></i></button>
    105                     </div>
    106230                </div>
    107             </div>
    108         </form>
     231            </form>
     232        <?php } ?>
    109233    </div>
    110234</div>
  • bulk-mail-sender/trunk/templates/BMSIHistory.php

    r3091711 r3096054  
    88
    99<?php include "BMSIHeader.php" ?>
    10 <div class="col-xl-10 col-lg-11 col-md-11 ps-70">
     10<div class="col-xl-10 col-lg-11 col-md-11">
    1111    <div class="pt-4"></div>
    1212
     
    1515    ?>
    1616
    17     <div class="d-flex align-items-center gap-3 title">
    18         <h1 class="fw-bold" style="font-size: 40px;">Histroy</h1>
    19     </div>
    20 
    21     <div class="wrap">
    22         <input type="hidden" name="all_users" value="<?php echo esc_attr($nonce); ?>" />
    23         <div class="table-wrapper">
    24             <?php if (is_bulk_mail_pro_activated() == "true") { ?>
    25                 <select id="type_filter" class="me-2 mb-2">
    26                     <option name="type_filter" value="All">All Type
    27                     </option>
    28                     <option name="type_filter" value="template">Template
    29                     </option>
    30                     <option name="type_filter" value="manual">Manual
    31                     </option>
    32                 </select>
    33 
    34                 <table id="history_pro_template" class="display table">
    35                     <thead>
    36                         <tr>
    37                             <th scope="col" style="text-align:left; padding-left:20px !important;">
    38                                 <?php echo esc_html__("Name", 'bulk-mail'); ?>
    39                             </th>
    40                             <th scope="col" style="text-align:left;">
    41                                 <?php echo esc_html__("Subject", 'bulk-mail'); ?>
    42                             </th>
    43                             <th scope="col" style="text-align:left;">
    44                                 <?php echo esc_html__("type", 'bulk-mail'); ?>
    45                             </th>
    46                             <th scope="col" style="text-align:left;">
    47                                 <?php echo esc_html__("Create Date", 'bulk-mail'); ?>
    48                             </th>
    49                             <th scope="col" style="text-align:left;">
    50                                 <?php echo esc_html__("Read Log", 'bulk-mail'); ?>
    51                             </th>
    52                             <th scope="col" style="text-align:center;">Action</th>
    53                         </tr>
    54                     </thead>
    55                     <tbody>
    56                     </tbody>
    57                 </table>
    58                 <div class="modal fade" id="exampleModal1" tabindex="-1" aria-labelledby="exampleModalLabel"
    59                     aria-hidden="true">
    60                     <div class="modal-dialog mt-5">
    61                         <div class="modal-content h-100 fs-14">
    62                             <div class="modal-header">
    63                                 <h5 class="modal-title fs-14 py-2 px-1" id="exampleModalLabel">Mail History</h5>
    64                                 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
    65                             </div>
    66                             <div class="modal-body">
    67                                 <div class="Body h-100">
    68                                     <div class="manual h-100">
    69                                         <label for="mail_contant">Email Body :-</label><br>
    70                                         <?php
    71                                         $content = "";
    72                                         $editor_id = 'bmsi_mail_box';
    73                                         $editor_name = 'bmsi_mail_box_content';
    74                                         $settings = array(
    75                                             'textarea_rows' => 15,
    76                                             'media_buttons' => true,
    77                                             'quicktags' => array('buttons' => 'h1,h2,h3,h4,h5,h6,strong,em,link,block,del,ins,img,ul,ol,li,code'),
    78                                             'tinymce' => true,
    79                                             'editor_name' => $editor_name,
    80                                         );
    81                                         $headers = array('Content-Type: text/html; charset=UTF-8');
    82                                         wp_editor($content, $editor_id, $settings, $headers);
    83                                         ?>
    84                                         <span class="bmsi_mail_box_error error"></span>
     17    <?php if (is_bulk_mail_pro_activated()) {
     18        if (get_option('BMIS_Pro_activated')) { ?>
     19            <div class="ps-70">
     20
     21                <div class="d-flex align-items-center gap-3 title">
     22                    <h1 class="fw-bold" style="font-size: 40px;">Histroy</h1>
     23                </div>
     24
     25                <div class="wrap">
     26                    <input type="hidden" name="all_users" value="<?php echo esc_attr($nonce); ?>" />
     27                    <div class="table-wrapper">
     28                        <?php if (is_bulk_mail_pro_activated() == "true") { ?>
     29                            <select id="type_filter" class="me-2 mb-2">
     30                                <option name="type_filter" value="All">All Type
     31                                </option>
     32                                <option name="type_filter" value="template">Template
     33                                </option>
     34                                <option name="type_filter" value="manual">Manual
     35                                </option>
     36                            </select>
     37
     38                            <table id="history_pro_template" class="display table">
     39                                <thead>
     40                                    <tr>
     41                                        <th scope="col" style="text-align:left; padding-left:20px !important;">
     42                                            <?php echo esc_html__("Name", 'bulk-mail'); ?>
     43                                        </th>
     44                                        <th scope="col" style="text-align:left;">
     45                                            <?php echo esc_html__("Subject", 'bulk-mail'); ?>
     46                                        </th>
     47                                        <th scope="col" style="text-align:left;">
     48                                            <?php echo esc_html__("type", 'bulk-mail'); ?>
     49                                        </th>
     50                                        <th scope="col" style="text-align:left;">
     51                                            <?php echo esc_html__("Create Date", 'bulk-mail'); ?>
     52                                        </th>
     53                                        <th scope="col" style="text-align:left;">
     54                                            <?php echo esc_html__("Read Log", 'bulk-mail'); ?>
     55                                        </th>
     56                                        <th scope="col" style="text-align:center;">Action</th>
     57                                    </tr>
     58                                </thead>
     59                                <tbody>
     60                                </tbody>
     61                            </table>
     62                            <div class="modal fade" id="exampleModal1" tabindex="-1" aria-labelledby="exampleModalLabel"
     63                                aria-hidden="true">
     64                                <div class="modal-dialog mt-5">
     65                                    <div class="modal-content h-100 fs-14">
     66                                        <div class="modal-header">
     67                                            <h5 class="modal-title fs-14 py-2 px-1" id="exampleModalLabel">Mail History</h5>
     68                                            <button type="button" class="btn-close" data-bs-dismiss="modal"
     69                                                aria-label="Close"></button>
     70                                        </div>
     71                                        <div class="modal-body">
     72                                            <div class="Body h-100">
     73                                                <div class="manual h-100">
     74                                                    <label for="mail_contant">Email Body :-</label><br>
     75                                                    <?php
     76                                                    $content = "";
     77                                                    $editor_id = 'bmsi_mail_box';
     78                                                    $editor_name = 'bmsi_mail_box_content';
     79                                                    $settings = array(
     80                                                        'textarea_rows' => 15,
     81                                                        'media_buttons' => true,
     82                                                        'quicktags' => array('buttons' => 'h1,h2,h3,h4,h5,h6,strong,em,link,block,del,ins,img,ul,ol,li,code'),
     83                                                        'tinymce' => true,
     84                                                        'editor_name' => $editor_name,
     85                                                    );
     86                                                    $headers = array('Content-Type: text/html; charset=UTF-8');
     87                                                    wp_editor($content, $editor_id, $settings, $headers);
     88                                                    ?>
     89                                                    <span class="bmsi_mail_box_error error"></span>
     90                                                </div>
     91                                            </div>
     92                                        </div>
     93                                        <div class="modal-footer">
     94                                            <button type="button" class="fs-14 add-button text-black border-0"
     95                                                data-bs-dismiss="modal">Close</button>
     96                                        </div>
    8597                                    </div>
    8698                                </div>
    8799                            </div>
    88                             <div class="modal-footer">
    89                                 <button type="button" class="fs-14 add-button text-black border-0"
    90                                     data-bs-dismiss="modal">Close</button>
     100                        <?php } else { ?>
     101                            <table id="history_template" class="display table">
     102                                <thead>
     103                                    <tr>
     104                                        <th scope="col" style="text-align:left; padding-left:20px !important;">
     105                                            <?php echo esc_html__("Name", 'bulk-mail'); ?>
     106                                        </th>
     107                                        <th scope="col" style="text-align:left;">
     108                                            <?php echo esc_html__("Subject", 'bulk-mail'); ?>
     109                                        </th>
     110                                        <th scope="col" style="text-align:left;">
     111                                            <?php echo esc_html__("Create Date", 'bulk-mail'); ?>
     112                                        </th>
     113                                        <th scope="col" style="text-align:left;">
     114                                            <?php echo esc_html__("Read Log", 'bulk-mail'); ?>
     115                                        </th>
     116                                        <th scope="col" style="text-align:center;">Action</th>
     117                                    </tr>
     118                                </thead>
     119                                <tbody>
     120                                </tbody>
     121                            </table>
     122                            <div class="modal fade" id="exampleModal1" tabindex="-1" aria-labelledby="exampleModalLabel"
     123                                aria-hidden="true">
     124                                <div class="modal-dialog mt-5">
     125                                    <div class="modal-content  fs-14">
     126                                        <div class="modal-header">
     127                                            <h5 class="modal-title fs-14 py-2 px-1" id="exampleModalLabel">Mail History</h5>
     128                                            <button type="button" class="btn-close" data-bs-dismiss="modal"
     129                                                aria-label="Close"></button>
     130                                        </div>
     131                                        <div class="modal-body">
     132                                            <div class="Body ">
     133                                                <div class="manual ">
     134                                                    <label for="mail_contant">Email Body :-</label><br>
     135                                                    <?php
     136                                                    $content = "";
     137                                                    $editor_id = 'bmsi_mail_box';
     138                                                    $editor_name = 'bmsi_mail_box_content';
     139                                                    $settings = array(
     140                                                        'textarea_rows' => 8,
     141                                                        'media_buttons' => true,
     142                                                        'quicktags' => array('buttons' => 'h1,h2,h3,h4,h5,h6,strong,em,link,block,del,ins,img,ul,ol,li,code'),
     143                                                        'tinymce' => true,
     144                                                        'editor_name' => $editor_name,
     145                                                    );
     146                                                    $headers = array('Content-Type: text/html; charset=UTF-8');
     147                                                    wp_editor($content, $editor_id, $settings, $headers);
     148                                                    ?>
     149                                                    <span class="bmsi_mail_box_error error"></span>
     150                                                </div>
     151                                            </div>
     152                                        </div>
     153                                        <div class="modal-footer">
     154                                            <button type="button" class="fs-14 add-button text-black border-0"
     155                                                data-bs-dismiss="modal">Close</button>
     156                                        </div>
     157                                    </div>
     158                                </div>
     159                            </div>
     160                            <?php
     161
     162                        } ?>
     163                    </div>
     164                </div>
     165
     166            </div>
     167        <?php } else { ?>
     168
     169            <div class="dashboard-bg-image d-flex justify-content-center align-items-center">
     170                <div class="dashboard-wrapper">
     171                    <div class="bg-color p-3 rounded-4 mx-5">
     172                        <svg xmlns="http://www.w3.org/2000/svg" width="55" height="55" viewBox="0 0 66 75" fill="none">
     173                            <path
     174                                d="M58.8933 37.3734H22.9333V22.4884C22.9333 16.7711 27.5298 12.0212 33.2718 11.9635C39.0718 11.9057 43.8133 16.5979 43.8133 22.3584V24.6684C43.8133 26.5886 45.3648 28.1334 47.2933 28.1334H51.9333C53.8618 28.1334 55.4133 26.5886 55.4133 24.6684V22.3584C55.4133 10.231 45.4808 0.37016 33.3008 0.413472C21.1208 0.456785 11.3333 10.4475 11.3333 22.575V37.3734H7.85331C4.01081 37.3734 0.893311 40.4775 0.893311 44.3034V67.4033C0.893311 71.2293 4.01081 74.3333 7.85331 74.3333H58.8933C62.7358 74.3333 65.8533 71.2293 65.8533 67.4033V44.3034C65.8533 40.4775 62.7358 37.3734 58.8933 37.3734ZM39.1733 59.3184C39.1733 62.509 36.5778 65.0933 33.3733 65.0933C30.1688 65.0933 27.5733 62.509 27.5733 59.3184V52.3884C27.5733 49.1977 30.1688 46.6134 33.3733 46.6134C36.5778 46.6134 39.1733 49.1977 39.1733 52.3884V59.3184Z"
     175                                fill="white" />
     176                        </svg>
     177                    </div>
     178                    <div class="text-center mt-2">
     179                        <p style="margin-bottom:0;">Activate Pro version</p>
     180                        <a
     181                            href="<?php echo esc_url(get_site_url() . '/wp-admin/options-general.php?page=bmsi_pro_settings') ?>">click
     182                            here</a>
     183                    </div>
     184                </div>
     185            </div>
     186
     187        <?php }
     188    } else { ?>
     189
     190        <div class="ps-70">
     191            <div class="d-flex align-items-center gap-3 title">
     192                <h1 class="fw-bold" style="font-size: 40px;">Histroy</h1>
     193            </div>
     194
     195            <div class="wrap">
     196                <input type="hidden" name="all_users" value="<?php echo esc_attr($nonce); ?>" />
     197                <div class="table-wrapper">
     198                    <?php if (is_bulk_mail_pro_activated() == "true") { ?>
     199                        <select id="type_filter" class="me-2 mb-2">
     200                            <option name="type_filter" value="All">All Type
     201                            </option>
     202                            <option name="type_filter" value="template">Template
     203                            </option>
     204                            <option name="type_filter" value="manual">Manual
     205                            </option>
     206                        </select>
     207
     208                        <table id="history_pro_template" class="display table">
     209                            <thead>
     210                                <tr>
     211                                    <th scope="col" style="text-align:left; padding-left:20px !important;">
     212                                        <?php echo esc_html__("Name", 'bulk-mail'); ?>
     213                                    </th>
     214                                    <th scope="col" style="text-align:left;">
     215                                        <?php echo esc_html__("Subject", 'bulk-mail'); ?>
     216                                    </th>
     217                                    <th scope="col" style="text-align:left;">
     218                                        <?php echo esc_html__("type", 'bulk-mail'); ?>
     219                                    </th>
     220                                    <th scope="col" style="text-align:left;">
     221                                        <?php echo esc_html__("Create Date", 'bulk-mail'); ?>
     222                                    </th>
     223                                    <th scope="col" style="text-align:left;">
     224                                        <?php echo esc_html__("Read Log", 'bulk-mail'); ?>
     225                                    </th>
     226                                    <th scope="col" style="text-align:center;">Action</th>
     227                                </tr>
     228                            </thead>
     229                            <tbody>
     230                            </tbody>
     231                        </table>
     232                        <div class="modal fade" id="exampleModal1" tabindex="-1" aria-labelledby="exampleModalLabel"
     233                            aria-hidden="true">
     234                            <div class="modal-dialog mt-5">
     235                                <div class="modal-content h-100 fs-14">
     236                                    <div class="modal-header">
     237                                        <h5 class="modal-title fs-14 py-2 px-1" id="exampleModalLabel">Mail History</h5>
     238                                        <button type="button" class="btn-close" data-bs-dismiss="modal"
     239                                            aria-label="Close"></button>
     240                                    </div>
     241                                    <div class="modal-body">
     242                                        <div class="Body h-100">
     243                                            <div class="manual h-100">
     244                                                <label for="mail_contant">Email Body :-</label><br>
     245                                                <?php
     246                                                $content = "";
     247                                                $editor_id = 'bmsi_mail_box';
     248                                                $editor_name = 'bmsi_mail_box_content';
     249                                                $settings = array(
     250                                                    'textarea_rows' => 15,
     251                                                    'media_buttons' => true,
     252                                                    'quicktags' => array('buttons' => 'h1,h2,h3,h4,h5,h6,strong,em,link,block,del,ins,img,ul,ol,li,code'),
     253                                                    'tinymce' => true,
     254                                                    'editor_name' => $editor_name,
     255                                                );
     256                                                $headers = array('Content-Type: text/html; charset=UTF-8');
     257                                                wp_editor($content, $editor_id, $settings, $headers);
     258                                                ?>
     259                                                <span class="bmsi_mail_box_error error"></span>
     260                                            </div>
     261                                        </div>
     262                                    </div>
     263                                    <div class="modal-footer">
     264                                        <button type="button" class="fs-14 add-button text-black border-0"
     265                                            data-bs-dismiss="modal">Close</button>
     266                                    </div>
     267                                </div>
    91268                            </div>
    92269                        </div>
    93                     </div>
    94                 </div>
    95             <?php } else { ?>
    96                 <table id="history_template" class="display table">
    97                     <thead>
    98                         <tr>
    99                             <th scope="col" style="text-align:left; padding-left:20px !important;">
    100                                 <?php echo esc_html__("Name", 'bulk-mail'); ?>
    101                             </th>
    102                             <th scope="col" style="text-align:left;">
    103                                 <?php echo esc_html__("Subject", 'bulk-mail'); ?>
    104                             </th>
    105                             <th scope="col" style="text-align:left;">
    106                                 <?php echo esc_html__("Create Date", 'bulk-mail'); ?>
    107                             </th>
    108                             <th scope="col" style="text-align:left;">
    109                                 <?php echo esc_html__("Read Log", 'bulk-mail'); ?>
    110                             </th>
    111                             <th scope="col" style="text-align:center;">Action</th>
    112                         </tr>
    113                     </thead>
    114                     <tbody>
    115                     </tbody>
    116                 </table>
    117                 <div class="modal fade" id="exampleModal1" tabindex="-1" aria-labelledby="exampleModalLabel"
    118                     aria-hidden="true">
    119                     <div class="modal-dialog mt-5">
    120                         <div class="modal-content  fs-14">
    121                             <div class="modal-header">
    122                                 <h5 class="modal-title fs-14 py-2 px-1" id="exampleModalLabel">Mail History</h5>
    123                                 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
    124                             </div>
    125                             <div class="modal-body">
    126                                 <div class="Body ">
    127                                     <div class="manual ">
    128                                         <label for="mail_contant">Email Body :-</label><br>
    129                                         <?php
    130                                         $content = "";
    131                                         $editor_id = 'bmsi_mail_box';
    132                                         $editor_name = 'bmsi_mail_box_content';
    133                                         $settings = array(
    134                                             'textarea_rows' => 8,
    135                                             'media_buttons' => true,
    136                                             'quicktags' => array('buttons' => 'h1,h2,h3,h4,h5,h6,strong,em,link,block,del,ins,img,ul,ol,li,code'),
    137                                             'tinymce' => true,
    138                                             'editor_name' => $editor_name,
    139                                         );
    140                                         $headers = array('Content-Type: text/html; charset=UTF-8');
    141                                         wp_editor($content, $editor_id, $settings, $headers);
    142                                         ?>
    143                                         <span class="bmsi_mail_box_error error"></span>
     270                    <?php } else { ?>
     271                        <table id="history_template" class="display table">
     272                            <thead>
     273                                <tr>
     274                                    <th scope="col" style="text-align:left; padding-left:20px !important;">
     275                                        <?php echo esc_html__("Name", 'bulk-mail'); ?>
     276                                    </th>
     277                                    <th scope="col" style="text-align:left;">
     278                                        <?php echo esc_html__("Subject", 'bulk-mail'); ?>
     279                                    </th>
     280                                    <th scope="col" style="text-align:left;">
     281                                        <?php echo esc_html__("Create Date", 'bulk-mail'); ?>
     282                                    </th>
     283                                    <th scope="col" style="text-align:left;">
     284                                        <?php echo esc_html__("Read Log", 'bulk-mail'); ?>
     285                                    </th>
     286                                    <th scope="col" style="text-align:center;">Action</th>
     287                                </tr>
     288                            </thead>
     289                            <tbody>
     290                            </tbody>
     291                        </table>
     292                        <div class="modal fade" id="exampleModal1" tabindex="-1" aria-labelledby="exampleModalLabel"
     293                            aria-hidden="true">
     294                            <div class="modal-dialog mt-5">
     295                                <div class="modal-content  fs-14">
     296                                    <div class="modal-header">
     297                                        <h5 class="modal-title fs-14 py-2 px-1" id="exampleModalLabel">Mail History</h5>
     298                                        <button type="button" class="btn-close" data-bs-dismiss="modal"
     299                                            aria-label="Close"></button>
     300                                    </div>
     301                                    <div class="modal-body">
     302                                        <div class="Body ">
     303                                            <div class="manual ">
     304                                                <label for="mail_contant">Email Body :-</label><br>
     305                                                <?php
     306                                                $content = "";
     307                                                $editor_id = 'bmsi_mail_box';
     308                                                $editor_name = 'bmsi_mail_box_content';
     309                                                $settings = array(
     310                                                    'textarea_rows' => 8,
     311                                                    'media_buttons' => true,
     312                                                    'quicktags' => array('buttons' => 'h1,h2,h3,h4,h5,h6,strong,em,link,block,del,ins,img,ul,ol,li,code'),
     313                                                    'tinymce' => true,
     314                                                    'editor_name' => $editor_name,
     315                                                );
     316                                                $headers = array('Content-Type: text/html; charset=UTF-8');
     317                                                wp_editor($content, $editor_id, $settings, $headers);
     318                                                ?>
     319                                                <span class="bmsi_mail_box_error error"></span>
     320                                            </div>
     321                                        </div>
     322                                    </div>
     323                                    <div class="modal-footer">
     324                                        <button type="button" class="fs-14 add-button text-black border-0"
     325                                            data-bs-dismiss="modal">Close</button>
    144326                                    </div>
    145327                                </div>
    146328                            </div>
    147                             <div class="modal-footer">
    148                                 <button type="button" class="fs-14 add-button text-black border-0"
    149                                     data-bs-dismiss="modal">Close</button>
    150                             </div>
    151329                        </div>
    152                     </div>
     330                        <?php
     331                    } ?>
    153332                </div>
    154                 <?php
    155 
    156             } ?>
     333            </div>
    157334        </div>
    158     </div>
     335    <?php } ?>
    159336</div>
    160337
  • bulk-mail-sender/trunk/templates/BMSISendMail.php

    r3091711 r3096054  
    2323        ?>
    2424
    25 
    26 
     25        <?php if(is_bulk_mail_pro_activated()){
     26            if(get_option('BMIS_Pro_activated')){ ?>
    2727        <div class="send_mail_data">
    2828            <input type="hidden" name="send_mail_user_nonce" id="send_mail_user_nonce"
     
    5050                        <label class="manual_option cursor-pointer <?php echo is_bulk_mail_pro_activated() == "true" ? "" : "o-5" ?>">
    5151                            <input type="radio" name="template_radio" checked id="manually" value="manually" <?php echo is_bulk_mail_pro_activated() == "true" ? "" : "disabled" ?>>Manually</label>
    52                         <?php if(is_bulk_mail_pro_activated() != "true") {?>
    53                             <a href="https://bulkmail.insixus.com/" target="_blank" class="link text-decoration-none"><p class="upgrade">Upgrade to pro</p></a>
    54                         <?php } ?>
     52                        <?php if(is_bulk_mail_pro_activated() != "true") {?><a href="https://bulkmail.insixus.com/" target="_blank" class="link text-decoration-none"><p class="upgrade">Upgrade to pro</p></a><?php } ?>
    5553                    </div>
    5654
     
    5856
    5957                <form action="#" method="POST" class="manual_form send_mail_form">
     58
     59                    <?php if(is_bulk_mail_pro_activated() == "true") {
     60
     61                        if (isset($_GET['type']) && $_GET['type'] === 'newslettter') {
     62
     63                            global $wpdb;
     64                            $table_category = $wpdb->prefix . 'bmsi_news_letter_category';
     65                            $table_sub_category = $wpdb->prefix . 'bmsi_news_letter_sub_category';
     66                           
     67                            $parent_categories = $wpdb->get_results("SELECT * FROM $table_category");
     68                           
     69                            $subcategories = $wpdb->get_results("SELECT * FROM $table_sub_category");
     70                           
     71                            $grouped_subcategories = [];
     72                            if (!empty($subcategories)) {
     73                                foreach ($subcategories as $sub) {
     74                                    $grouped_subcategories[$sub->parent_category_id][] = $sub;
     75                                }
     76                            }
     77                           
     78                            if (!empty($parent_categories)) {
     79                                foreach ($parent_categories as $category) {
     80                                    $category->subcategories = isset($grouped_subcategories[$category->id]) ? $grouped_subcategories[$category->id] : [];
     81                                }
     82                            }
     83
     84                        ?>
     85
     86                        <div class="firstAndLastName d-flex flex-row mb-4">
     87
     88                        <div class=" d-flex flex-column w-100">
     89                            <label>NewsLetter Category</label>
     90                            <select name="category" id="category" class="input-groups">
     91                            <option class="level-0" value="0">All
     92                                </option>
     93                                <?php
     94                                foreach ($parent_categories as $category) {
     95                                        if (!empty($category->subcategories)) {
     96                                            echo '<option class="'. esc_attr($category->level) .'" value="' . esc_html($category->id) . '">'. esc_html($category->category_name) .'</option>';
     97                                            foreach ($category->subcategories as $sub_category) {
     98                                                echo '<option class="'. esc_attr($sub_category->level) .'" value="' . esc_attr($sub_category->id) . '">&nbsp;&nbsp;&nbsp;- ' . esc_html($sub_category->sub_category_name) . '</option>';
     99                                            }
     100                                        } else {
     101                                            echo '<option class="'. esc_attr($category->level) .'" value="' . esc_attr($category->id) . '">' . esc_html($category->category_name) . '</option>';
     102                                        }
     103                                } ?>
     104                               
     105                            </select>
     106                        </div>
     107
     108                        <div class=" d-flex flex-column w-100">
     109                            <label>NewsLetter Status</label>
     110                            <select name="status" id="status" class="input-groups">
     111                                <option value="2">All
     112                                </option>
     113                                <option value="1">active
     114                                </option>
     115                                <option value="0">Inactive
     116                                </option>
     117                            </select>
     118                        </div>
     119
     120                        </div>
     121
     122                        <?php }
     123
     124                    }?>
    60125                   
    61126
     
    81146                                </div>
    82147
    83                                 <?php if(is_bulk_mail_pro_activated() == "true") {
    84 
    85                             if (isset($_GET['type']) && $_GET['type'] === 'newslettter') {
    86                        
    87                         global $wpdb;
    88 
    89                         $table_name = $wpdb->prefix . 'bmsi_news_letter_category';
    90 
    91                         $data = $wpdb->get_results($wpdb->prepare("SELECT * FROM %1s",$table_name));
    92                        
    93                         ?>
    94 
    95                         <div class="firstAndLastName mb-4">
    96 
    97                             <div class=" d-flex flex-column">
    98                                 <label>NewsLetter Category</label>
    99                                 <select name="category" id="category" class="input-groups">
    100                                    
    101                                     <?php
    102                                     foreach ($data as $key => $value) {
    103                                         ?>
    104                                         <option value="<?php echo esc_attr($value->category_name); ?>">
    105                                             <?php echo esc_attr($value->category_name); ?>
    106                                         </option>
    107                                     <?php } ?>
    108                                     <option value="All">All
    109                                     </option>
    110                                 </select>
    111                             </div>
    112 
    113                         </div>
    114                    
    115                     <?php }
    116                    
    117                     }?>
     148                               
    118149                    </div>
    119150                    <div class="manual">
     
    147178                        <div class="firstAndLastName">
    148179                            <div class="d-flex">
     180                                <label for="Select_template">Select Template</label>
     181                                <?php
     182                                $args = array(
     183                                    'post_type' => 'BMSI_Pro_Templates',
     184                                    'post_status' => 'publish',
     185                                    'posts_per_page' => -1,
     186                                );
     187
     188                                $query = new \WP_Query($args);
     189
     190                                if ($query->have_posts()) {
     191                                    $disable = true;
     192                                    ?>
     193                                    <select name="template_name" id="template_name" class="input-groups">
     194                                        <?php
     195                                        while ($query->have_posts()) {
     196                                            $query->the_post();
     197                                            $template_name = get_the_title();
     198                                            ?>
     199                                            <option value="<?php echo esc_attr($template_name); ?>">
     200                                                <?php echo esc_attr($template_name); ?>
     201                                            </option>
     202                                        <?php } ?>
     203                                    </select>
     204                                    <?php
     205                                    wp_reset_postdata();
     206                                } else { ?>
     207                                    <p class="mb-0 error">*No Template Found.</p>
     208                                    <a href="<?php printf(esc_html('%sadmin.php?page=create_template&edit=false'), esc_html($admin_url)); ?>" class="fz-14 border-0 text-decoration-none theme-color w-30">Add New Template</a>
     209                                <?php } ?>
     210                            </div>
     211                        </div>
     212
     213                        <?php if(is_bulk_mail_pro_activated() == "true") {
     214                            if (isset($_GET['type']) && $_GET['type'] === 'newslettter') {
     215                                global $wpdb;
     216                                $table_category = $wpdb->prefix . 'bmsi_news_letter_category';
     217                                $table_sub_category = $wpdb->prefix . 'bmsi_news_letter_sub_category';
     218
     219                                $parent_categories = $wpdb->get_results("SELECT * FROM $table_category");
     220                                $subcategories = $wpdb->get_results("SELECT * FROM $table_sub_category");
     221
     222                                $grouped_subcategories = [];
     223                                if (!empty($subcategories)) {
     224                                    foreach ($subcategories as $sub) {
     225                                        $grouped_subcategories[$sub->parent_category_id][] = $sub;
     226                                    }
     227                                }
     228
     229                                if (!empty($parent_categories)) {
     230                                    foreach ($parent_categories as $category) {
     231                                        $category->subcategories = isset($grouped_subcategories[$category->id]) ? $grouped_subcategories[$category->id] : [];
     232                                    }
     233                                }
     234                            ?>
     235
     236                            <div class="firstAndLastName">
     237                                <div class=" d-flex flex-column">
     238                                    <label>NewsLetter Category</label>
     239                                    <select name="category" id="Newslettercategory" class="input-groups">
     240                                        <option class="level-0" value="0">All</option>
     241                                        <?php
     242                                        foreach ($parent_categories as $category) {
     243                                            if (!empty($category->subcategories)) {
     244                                                echo '<option class="'. esc_attr($category->level) .'" value="' . esc_html($category->id) . '">'. esc_html($category->category_name) .'</option>';
     245                                                foreach ($category->subcategories as $sub_category) {
     246                                                    echo '<option class="'. esc_attr($sub_category->level) .'" value="' . esc_attr($sub_category->id) . '">&nbsp;&nbsp;&nbsp;- ' . esc_html($sub_category->sub_category_name) . '</option>';
     247                                                }
     248                                            } else {
     249                                                echo '<option class="'. esc_attr($category->level) .'" value="' . esc_attr($category->id) . '">' . esc_html($category->category_name) . '</option>';
     250                                            }
     251                                        } ?>
     252                                    </select>
     253                                </div>
     254                            </div>
     255                            <div class="firstAndLastName mb-4">
     256                                <div class="d-flex flex-column w-100">
     257                                    <label>NewsLetter Status</label>
     258                                    <select name="Ustatus" id="Ustatus" class="input-groups">
     259                                        <option value="2">All</option>
     260                                        <option value="1">Active</option>
     261                                        <option value="0">Inactive</option>
     262                                    </select>
     263                                </div>
     264                            </div>
     265
     266                            <?php }
     267                        } ?>
     268                    </div>
     269                    <div class="text-end">
     270                        <button type="submit" name="submit" <?php echo ($disable == false) ? "disabled" : "" ?>
     271                            class="add-button mt-4 fs-16 border-0 <?php echo !empty($type) ? esc_html($type) : 'btn-send-mail' ?>"
     272                            id="submit"><span class="btn-txt">Send</span><i class="fa-solid fa-spinner spinn"></i></button>
     273                    </div>
     274                </form>
     275            </div>
     276        </div>
     277    </div>
     278</div>
     279           <?php }else{ ?>
     280            <div class="dashboard-bg-image d-flex justify-content-center align-items-center">
     281                <div class="dashboard-wrapper">
     282                    <div class="bg-color p-3 rounded-4 mx-5">
     283                        <svg xmlns="http://www.w3.org/2000/svg" width="55" height="55" viewBox="0 0 66 75" fill="none">
     284                            <path
     285                                d="M58.8933 37.3734H22.9333V22.4884C22.9333 16.7711 27.5298 12.0212 33.2718 11.9635C39.0718 11.9057 43.8133 16.5979 43.8133 22.3584V24.6684C43.8133 26.5886 45.3648 28.1334 47.2933 28.1334H51.9333C53.8618 28.1334 55.4133 26.5886 55.4133 24.6684V22.3584C55.4133 10.231 45.4808 0.37016 33.3008 0.413472C21.1208 0.456785 11.3333 10.4475 11.3333 22.575V37.3734H7.85331C4.01081 37.3734 0.893311 40.4775 0.893311 44.3034V67.4033C0.893311 71.2293 4.01081 74.3333 7.85331 74.3333H58.8933C62.7358 74.3333 65.8533 71.2293 65.8533 67.4033V44.3034C65.8533 40.4775 62.7358 37.3734 58.8933 37.3734ZM39.1733 59.3184C39.1733 62.509 36.5778 65.0933 33.3733 65.0933C30.1688 65.0933 27.5733 62.509 27.5733 59.3184V52.3884C27.5733 49.1977 30.1688 46.6134 33.3733 46.6134C36.5778 46.6134 39.1733 49.1977 39.1733 52.3884V59.3184Z"
     286                                fill="white" />
     287                        </svg>
     288                    </div>
     289                    <div class="text-center mt-2">
     290                        <p style="margin-bottom:0;">Activate Pro version</p>
     291                        <a href="<?php echo esc_url(get_site_url() . '/wp-admin/options-general.php?page=bmsi_pro_settings') ?>">click
     292                            here</a>
     293                    </div>
     294                </div>
     295            </div>
     296           <?php }
     297        }else{ ?>
     298<div class="send_mail_data">
     299            <input type="hidden" name="send_mail_user_nonce" id="send_mail_user_nonce"
     300                value="<?php echo esc_attr($nonce); ?>" />
     301            <div class="pt-2"></div>
     302            <div class="send_mail_form_contant">
     303                <div class="d-lg-flex d-md-flex d-sm-flex d-block justify-content-between flex-row align-items-center">
     304                    <div class="title">
     305                        <h1 class="fw-bold" style="font-size: 40px;">Send Mails</h1>
     306                    </div>
     307                    <div
     308                        class="mb-lg-0 mb-md-0 mb-sm-0 mb-4 d-flex justify-content-lg-between justify-content-md-between justify-content-sm-between justify-content-start flex-row">
     309                        <button class="add-button border-0"><a class="btn-back"
     310                                href="<?php printf(esc_html('%sadmin.php?page=bulk_mail_sender', 'bulk-mail'), esc_html($admin_url)); ?>">Back</a></button>
     311                        <button class="add-button border-0 <?php echo !empty($type) ? esc_html($type) : 'btn-send-mail' ?>"><span
     312                                class="btn-txt">Send</span><i class="fa-solid fa-spinner spinn"></i></button>
     313                    </div>
     314                </div>
     315
     316                    <div class="btn_radio d-lg-flex d-md-flex d-sm-flex d-block gap-3 align-items-center flex-row mb-4 mt-3 <?php echo is_bulk_mail_pro_activated() == "true" ? "" : "btn_active" ?>">
     317                        <label class="template_radio cursor-pointer <?php echo is_bulk_mail_pro_activated() == "true" ? "" : "o-5" ?>">
     318                            <input type="radio" name="template_radio" id="user_template" value="user_template" <?php echo (is_bulk_mail_pro_activated() == "true") ? "" : "disabled" ?>>Use
     319                            Template
     320                        </label>
     321                        <label class="manual_option cursor-pointer <?php echo is_bulk_mail_pro_activated() == "true" ? "" : "o-5" ?>">
     322                            <input type="radio" name="template_radio" checked id="manually" value="manually" <?php echo is_bulk_mail_pro_activated() == "true" ? "" : "disabled" ?>>Manually</label>
     323                        <?php if(is_bulk_mail_pro_activated() != "true") {?>
     324                            <a href="https://bulkmail.insixus.com/" target="_blank" class="link text-decoration-none"><p class="upgrade">Upgrade to pro</p></a>
     325                        <?php } ?>
     326                    </div>
     327
     328                   
     329
     330                <form action="#" method="POST" class="manual_form send_mail_form">
     331                   
     332
     333                    <div class="subjectAndemailfrom manual mb-4">
     334                        <div class="d-flex">
     335                            <label for="mail_sub">Subject</label>
     336                            <input type="text" name="subject" id="mail_sub" class="mail_sub input-groups"
     337                                placeholder="Enter User Subject" required>
     338                        </div>
     339                        <div class="d-flex">
     340                            <label for="mail_from">Email From Name</label>
     341                            <input type="text" name="mail_from" id="mail_from" class="mail_from input-groups"
     342                                placeholder="Enter Email Form Name" required>
     343
     344                        </div>
     345
     346                    </div>
     347                    <div class="subjectAndemailfrom manual mb-4">
     348                        <div class="emailfrom d-flex">
     349                            <label for="admin_mail">Email From</label>
     350                            <input type="email" name="admin_mail" id="admin_mail" class="admin_mail input-groups"
     351                                placeholder="Enter Email From" required>
     352                                </div>
     353                    </div>
     354                    <div class="manual">
     355                        <label for="mail_contant">Email Body</label><br>
     356                        <?php
     357                        $content = "add some text";
     358                        $editor_id = 'bmsi_mail_box';
     359                        $editor_name = 'bmsi_mail_box_content';
     360                        $settings = array(
     361                            'textarea_rows' => 8,
     362                            'media_buttons' => true,
     363                            'quicktags' => array('buttons' => 'h1,h2,h3,h4,h5,h6,strong,em,link,block,del,ins,img,ul,ol,li,code'),
     364                            'tinymce' => true,
     365                            'editor_name' => $editor_name,
     366                        );
     367                        $headers = array('Content-Type: text/html; charset=UTF-8');
     368                        wp_editor($content, $editor_id, $settings, $headers);
     369                        ?>
     370                        <span class="bmsi_mail_box_error error"></span>
     371                    </div>
     372                    <div class="text-end">
     373                    <button type="submit" name="submit"
     374                        class="add-button fs-16 border-0 <?php echo !empty($type) ? esc_html($type) : 'btn-send-mail' ?>"
     375                        id="submit"><span class="btn-txt">Send</span><i class="fa-solid fa-spinner spinn"></i></button>
     376
     377                </div>
     378
     379                </form>
     380                <form action="#" method="POST" class="use_template_form send_mail_form" style="display: none;">
     381                    <div class="subjectAndemailfrom">
     382                        <div class="firstAndLastName">
     383                            <div class="d-flex">
    149384                            <label for="Select_template">Select Template</label>
    150385                            <?php
     
    182417                            </div>
    183418
    184                         </div>
    185 
    186                         <?php if(is_bulk_mail_pro_activated() == "true") {
    187 
    188 if (isset($_GET['type']) && $_GET['type'] === 'newslettter') {
    189 
    190 global $wpdb;
    191 
    192 $table_name = $wpdb->prefix . 'bmsi_news_letter_category';
    193 
    194 $data = $wpdb->get_results($wpdb->prepare("SELECT * FROM %1s",$table_name));
    195 
    196 ?>
    197 
    198 <div class="firstAndLastName mb-4">
    199 
    200 <div class=" d-flex flex-column">
    201     <label>NewsLetter Category</label>
    202     <select name="Ucategory" id="Ucategory" class="input-groups">
    203        
    204         <?php
    205         foreach ($data as $key => $value) {
    206             ?>
    207             <option name="Ucategory" value="<?php echo esc_attr($value->category_name); ?>">
    208                 <?php echo esc_attr($value->category_name); ?>
    209             </option>
    210         <?php } ?>
    211         <option value="All">All
    212         </option>
    213     </select>
    214 </div>
    215 
    216 </div>
    217 
    218 <?php }
    219 
    220 }?>
    221                    
     419                        </div>             
    222420                    </div>
    223421                    <div class="text-end">
     
    233431    </div>
    234432</div>
     433        <?php }
     434        ?>
     435
     436       
    235437
    236438<?php include "BMSIFooter.php" ?>
  • bulk-mail-sender/trunk/templates/BMSISetting.php

    r3091711 r3096054  
    1818<div class="col-lg-10">
    1919    <div class="pt-4"></div>
    20     <div class="main setting-design">
     20
     21    <?php if(is_bulk_mail_pro_activated()){
     22        if(get_option('BMIS_Pro_activated')){ ?>
     23<div class="main setting-design">
    2124        <div class="d-lg-flex d-md-flex d-sm-flex d-block justify-content-between flex-row align-items-center">
    2225            <div class="title">
     
    179182       
    180183    </div>
     184       <?php }else{ ?>
     185        <div class="dashboard-bg-image d-flex justify-content-center align-items-center">
     186                <div class="dashboard-wrapper">
     187                    <div class="bg-color p-3 rounded-4 mx-5">
     188                        <svg xmlns="http://www.w3.org/2000/svg" width="55" height="55" viewBox="0 0 66 75" fill="none">
     189                            <path
     190                                d="M58.8933 37.3734H22.9333V22.4884C22.9333 16.7711 27.5298 12.0212 33.2718 11.9635C39.0718 11.9057 43.8133 16.5979 43.8133 22.3584V24.6684C43.8133 26.5886 45.3648 28.1334 47.2933 28.1334H51.9333C53.8618 28.1334 55.4133 26.5886 55.4133 24.6684V22.3584C55.4133 10.231 45.4808 0.37016 33.3008 0.413472C21.1208 0.456785 11.3333 10.4475 11.3333 22.575V37.3734H7.85331C4.01081 37.3734 0.893311 40.4775 0.893311 44.3034V67.4033C0.893311 71.2293 4.01081 74.3333 7.85331 74.3333H58.8933C62.7358 74.3333 65.8533 71.2293 65.8533 67.4033V44.3034C65.8533 40.4775 62.7358 37.3734 58.8933 37.3734ZM39.1733 59.3184C39.1733 62.509 36.5778 65.0933 33.3733 65.0933C30.1688 65.0933 27.5733 62.509 27.5733 59.3184V52.3884C27.5733 49.1977 30.1688 46.6134 33.3733 46.6134C36.5778 46.6134 39.1733 49.1977 39.1733 52.3884V59.3184Z"
     191                                fill="white" />
     192                        </svg>
     193                    </div>
     194                    <div class="text-center mt-2">
     195                        <p style="margin-bottom:0;">Activate Pro version</p>
     196                        <a href="<?php echo esc_url(get_site_url() . '/wp-admin/options-general.php?page=bmsi_pro_settings') ?>">click
     197                            here</a>
     198                    </div>
     199                </div>
     200            </div>
     201        <?php }
     202    }else{ ?>
     203
     204
     205    <div class="main setting-design">
     206        <div class="d-lg-flex d-md-flex d-sm-flex d-block justify-content-between flex-row align-items-center">
     207            <div class="title">
     208                <h1 class="fw-bold" style="font-size: 40px;">Settings</h1>
     209            </div>
     210            <div>
     211                <button type="button" class="btn-change add-button text-black border-0" id="btn-change"
     212                    name="btn-change"><span class="btn-txt">Save Change</span><i
     213                        class="fa-solid fa-spinner spinn"></i></button>
     214            </div>
     215        </div>
     216
     217    <div class="tab-titles mb-0">
     218        <p class="tab-links active-link" data-tab="tab1">General</p>
     219        <p class="tab-links" data-tab="tab2">News Letter</p>
     220        <p class="tab-links" data-tab="tab3">Send Mail</p>
     221        <p class="tab-links" data-tab="tab4">SMTP</p>
     222    </div>
     223
     224    <hr>
     225
     226    <div class="tab-contents active-tab" id="tab1">
     227        <div class="d-flex align-items-center justify-content-start gap-2">
     228            <input type="checkbox" name="save_history" id="save_history" <?php echo ($option['permission'] == "true") ? "checked" : "" ?>>
     229            <label for="save_history" class="text-break">Need to save all send mail history?</label>
     230        </div>
     231        <div class="d-flex align-items-center justify-content-start gap-2">
     232            <input type="checkbox" name="auto_pass" id="auto_pass" <?php echo (!empty($option['pass']) && $option['pass'] == "true") ? "checked" : "" ?>>
     233            <label for="auto_pass" class="text-break">Auto genrate User password?</label>
     234        </div>
     235    </div>
     236    <div class="tab-contents" id="tab2">
     237        <div class="firstAndLastName d-block d-lg-flex d-md-flex gap-4">
     238            <div class="d-flex flex-column pb-sm-3 w-100 gap-2">
     239                <label for="save_history" class="text-break">Form Title </label>
     240                <input type="text" class="input-groups" name="save_history" id="form_title"
     241                    value="<?php echo (!empty($option['title'])) ? esc_html($option['title']) : '' ?>">
     242            </div>
     243
     244            <div class="d-flex flex-column w-100 gap-2">
     245                <label for="save_history" class="text-break">Submit Button Text </label>
     246                <input type="text" class="input-groups" name="save_history" id="sub_text"
     247                    value="<?php echo (!empty($option['sub_text'])) ? esc_html($option['sub_text']) : '' ?>">
     248            </div>
     249        </div>
     250    </div>
     251    <div class="tab-contents" id="tab3">
     252    <input type="checkbox" class="" name="use_cron_job" id="use_cron_job" <?php echo (!empty($option['cron']) && esc_html($option['cron']) == "true") ? "checked" : "" ?>>
     253    <label for="use_cron_job" class="text-break">Use cron job for sending an mail?</label>
     254        <div class="mail_note mt-4">
     255            <?php if (!empty($phpPath)) { ?>
     256                <p class="small"><strong>Please Note: </strong>For send mail you would need to setup cron to run
     257                    from
     258                    the server level using the following command:</p>
     259                <p class="mark">* * * * * <?php echo esc_html($phpPath); ?>
     260                    <?php echo BMSI_DIR_PATH . 'cron-handler.php' ?>
     261                </p>
     262            <?php } else { ?>
     263                <a href="https://bulkmail.insixus.com/contact-us/">PHP path not found please contact
     264                    support.</a>
     265            <?php } ?>
     266        </div>
     267    </div>
     268    <div class="tab-contents" id="tab4">
     269    <div class="note">
     270                        <input type="checkbox" class="" name="connect_smtp" id="connect_smtp" <?php echo (!empty($option['smtp_connect']) && esc_html($option['smtp_connect']) == "true") ? "checked" : "" ?>>
     271                        <label for="connect_smtp" class="text-break">Do you Want to Setup SMTP?</label>
     272                        <?php
     273                        $nonce = wp_create_nonce('smtp_nonce');
     274                        ?>
     275                        <form action="#" method="POST" class="smtp_form_data mt-4" style="display:none">
     276                            <div id="form_data">
     277                                <input type="hidden" id="create_user_nonce" name="create_user_nonce"
     278                                    value="<?php echo esc_attr($nonce); ?>" />
     279                                <div class="form-contant-smtp d-flex flex-column">
     280                                    <div class="firstAndLastName">
     281                                        <div class="pb-sm-3">
     282                                            <label for="smtpH">SMTP Host</label>
     283                                            <input type="text" class="input-groups" name="smtpH" id="smtpH"
     284                                                placeholder="Enter SMTP Host"
     285                                                value="<?php echo (!empty($smtp_option['smtpH'])) ? esc_html($smtp_option['smtpH']) : '' ?>"
     286                                                required>
     287                                        </div>
     288                                        <div>
     289                                            <label for="smtpPort" class="smtpPort">SMTP Port</label>
     290                                            <input type="number" class="input-groups" name="smtpPort" id="smtpPort"
     291                                                placeholder="Enter SMTP Port"
     292                                                value="<?php echo (!empty($smtp_option['smtpPort'])) ? esc_html($smtp_option['smtpPort']) : '' ?>"
     293                                                required>
     294                                        </div>
     295                                    </div>
     296
     297                                    <div class="firstAndLastName">
     298                                        <div class="pb-sm-3">
     299                                            <label for="smtpU">SMTP Username</label>
     300                                            <input type="text" class="input-groups" name="smtpU" id="smtpU"
     301                                                placeholder="Enter SMTP Username"
     302                                                value="<?php echo (!empty($smtp_option['smtpU'])) ? esc_html($smtp_option['smtpU']) : '' ?>"
     303                                                required>
     304                                        </div>
     305                                        <div>
     306                                            <label for="smtpPass">SMTP Password</label>
     307                                            <input type="text" class="input-groups" name="smtpPass" id="smtpPass"
     308                                                placeholder="Enter SMTP Password"
     309                                                value="<?php echo (!empty($smtp_option['smtpPass'])) ? esc_html($smtp_option['smtpPass']) : '' ?>"
     310                                                required>
     311                                        </div>
     312
     313                                    </div>
     314
     315                                    <div class="firstAndLastName ">
     316                                        <div class="flex-row align-items-center pb-sm-3">
     317                                            <label for="smtpSecure" style="padding-right:10px;"> SMTP Secure</label>
     318                                            <input type="radio" class="setting_radio" id="none" name="Secure"
     319                                                value="none" <?php echo (!empty($smtp_option['Secure']) && $smtp_option['Secure'] === "none") ? "checked" : '' ?> />
     320                                            <label for="none">none</label>
     321
     322
     323                                            <input type="radio" class="setting_radio" id="SSL" name="Secure" value="SSL"
     324                                                <?php echo (!empty($smtp_option['Secure']) && $smtp_option['Secure'] === "ssl") ? "checked" : '' ?> />
     325                                            <label for="SSL">SSL</label>
     326
     327                                            <input type="radio" class="setting_radio" id="TLS" name="Secure" value="TLS"
     328                                                <?php echo (!empty($smtp_option['Secure']) && $smtp_option['Secure'] === "tls") ? "checked" : '' ?> />
     329                                            <label for="TLS">TLS</label>
     330
     331                                        </div>
     332
     333                                    </div>
     334                                    <div class="firstAndLastName ">
     335                                        <div class="flex-row align-items-center">
     336                                            <div>
     337                                                <label for="smtpSecure" style="padding-right:10px;"> SMTP
     338                                                    Authentication</label>
     339                                            </div>
     340                                            <div class="d-block">
     341                                                <input type="radio" class="setting_radio" id="yes" name="Authentication"
     342                                                    value="true" <?php echo (!empty($smtp_option['Authentication']) && $smtp_option['Authentication'] === "true") ? "checked" : '' ?> />
     343                                                <label for="yes" style="padding-right:10px;">yes</label>
     344
     345
     346                                                <input type="radio" class="setting_radio" id="No" name="Authentication"
     347                                                    value="false" <?php echo (!empty($smtp_option['Authentication']) && $smtp_option['Authentication'] === "false") ? "checked" : '' ?> />
     348                                                <label for="No">No</label>
     349                                            </div>
     350
     351                                        </div>
     352                                    </div>
     353                                    <div class="d-flex w-100 justify-content-end save-button">
     354                                        <button type="submit" name="submit-sub" id="submit"
     355                                            class="add-button fs-16menu border-0 btn-Connect"><span
     356                                                class="btn-txt">Connect</span><i
     357                                                class="fa-solid fa-spinner spinn"></i></button>
     358                                    </div>
     359                                </div>
     360                            </div>
     361                        </form>
     362                    </div>
     363    </div>
     364       
     365    </div>
     366   
     367   <?php } ?>
    181368</div>
    182369<?php include "BMSIFooter.php" ?>
  • bulk-mail-sender/trunk/templates/BMSISidebar.php

    r3091711 r3096054  
    9797                    class="d-flex text-decoration-none align-items-center menu-bg-color">
    9898                    <div class="menu-icon icon-icon">
    99                         <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 16 18" fill="none">
    100                             <path fill-rule="evenodd" clip-rule="evenodd"
    101                                 d="M12 4H8V6H12V4ZM12 7H8V8H12V7ZM7 4H4V8H7V4ZM7 10H12V9H7V10ZM10 12H12V11H10V12ZM12 13H4V14H12V13ZM9 11H4V12H9V11ZM6 9H4V10H6V9ZM15 0H1C0.734784 0 0.48043 0.105357 0.292893 0.292893C0.105357 0.48043 0 0.734784 0 1V17C0 17.2652 0.105357 17.5196 0.292893 17.7071C0.48043 17.8946 0.734784 18 1 18H15C15.2652 18 15.5196 17.8946 15.7071 17.7071C15.8946 17.5196 16 17.2652 16 17V1C16 0.734784 15.8946 0.48043 15.7071 0.292893C15.5196 0.105357 15.2652 0 15 0ZM14 16H2V2H14V16Z"
    102                                 fill="black" />
     99                        <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" class="svg-icon"
     100                            viewBox="0 0 1025 1024" version="1.1">
     101                            <path
     102                                d="M513.009189 73.143171a73.142805 73.142805 0 0 1 30.171407 6.582852l404.479711 192.548434A18.285701 18.285701 0 0 1 951.866018 274.285884a18.285701 18.285701 0 0 1-3.474283 2.011427L543.180596 468.845745a73.142805 73.142805 0 0 1-60.342814 0L78.35807 276.297311A18.285701 18.285701 0 0 1 74.152359 274.285884a18.285701 18.285701 0 0 1 3.474283-2.011427L482.837782 79.726023A73.142805 73.142805 0 0 1 513.009189 73.143171m0-73.142805a143.725612 143.725612 0 0 0-61.622814 13.714276L46.906664 206.080219a73.142805 73.142805 0 0 0 0 136.411331l404.479711 192.365577a145.371325 145.371325 0 0 0 123.245627 0l404.479711-192.365577a73.142805 73.142805 0 0 0 0-136.411331L574.632002 13.714642A143.725612 143.725612 0 0 0 513.009189 0.000366z" />
     103                            <path
     104                                d="M513.009189 773.485528a176.639874 176.639874 0 0 1-79.177087-18.285702L21.306683 550.217116a36.571402 36.571402 0 1 1 32.548548-65.462811l412.525419 204.799854a105.691353 105.691353 0 0 0 93.257077 0l412.525419-204.799854a36.571402 36.571402 0 0 1 32.548548 65.462811l-412.525419 204.799853A176.639874 176.639874 0 0 1 513.009189 773.485528z" />
     105                            <path
     106                                d="M513.009189 1023.999634a179.017015 179.017015 0 0 1-79.177087-18.285701L21.306683 800.731222a36.571402 36.571402 0 1 1 32.548548-65.46281l412.525419 204.799854a105.691353 105.691353 0 0 0 93.257077 0l412.525419-204.799854a36.571402 36.571402 0 0 1 32.548548 65.46281L592.186275 1005.713933A179.017015 179.017015 0 0 1 513.009189 1023.999634z" />
    103107                        </svg>
    104108                    </div>
     
    242246                    class="d-flex text-decoration-none align-items-center menu-bg-color">
    243247                    <div class="menu-icon icon-icon">
    244                         <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 16 18" fill="none">
    245                             <path fill-rule="evenodd" clip-rule="evenodd"
    246                                 d="M12 4H8V6H12V4ZM12 7H8V8H12V7ZM7 4H4V8H7V4ZM7 10H12V9H7V10ZM10 12H12V11H10V12ZM12 13H4V14H12V13ZM9 11H4V12H9V11ZM6 9H4V10H6V9ZM15 0H1C0.734784 0 0.48043 0.105357 0.292893 0.292893C0.105357 0.48043 0 0.734784 0 1V17C0 17.2652 0.105357 17.5196 0.292893 17.7071C0.48043 17.8946 0.734784 18 1 18H15C15.2652 18 15.5196 17.8946 15.7071 17.7071C15.8946 17.5196 16 17.2652 16 17V1C16 0.734784 15.8946 0.48043 15.7071 0.292893C15.5196 0.105357 15.2652 0 15 0ZM14 16H2V2H14V16Z"
    247                                 fill="black" />
     248                        <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" class="svg-icon"
     249                            viewBox="0 0 1025 1024" version="1.1">
     250                            <path
     251                                d="M513.009189 73.143171a73.142805 73.142805 0 0 1 30.171407 6.582852l404.479711 192.548434A18.285701 18.285701 0 0 1 951.866018 274.285884a18.285701 18.285701 0 0 1-3.474283 2.011427L543.180596 468.845745a73.142805 73.142805 0 0 1-60.342814 0L78.35807 276.297311A18.285701 18.285701 0 0 1 74.152359 274.285884a18.285701 18.285701 0 0 1 3.474283-2.011427L482.837782 79.726023A73.142805 73.142805 0 0 1 513.009189 73.143171m0-73.142805a143.725612 143.725612 0 0 0-61.622814 13.714276L46.906664 206.080219a73.142805 73.142805 0 0 0 0 136.411331l404.479711 192.365577a145.371325 145.371325 0 0 0 123.245627 0l404.479711-192.365577a73.142805 73.142805 0 0 0 0-136.411331L574.632002 13.714642A143.725612 143.725612 0 0 0 513.009189 0.000366z" />
     252                            <path
     253                                d="M513.009189 773.485528a176.639874 176.639874 0 0 1-79.177087-18.285702L21.306683 550.217116a36.571402 36.571402 0 1 1 32.548548-65.462811l412.525419 204.799854a105.691353 105.691353 0 0 0 93.257077 0l412.525419-204.799854a36.571402 36.571402 0 0 1 32.548548 65.462811l-412.525419 204.799853A176.639874 176.639874 0 0 1 513.009189 773.485528z" />
     254                            <path
     255                                d="M513.009189 1023.999634a179.017015 179.017015 0 0 1-79.177087-18.285701L21.306683 800.731222a36.571402 36.571402 0 1 1 32.548548-65.46281l412.525419 204.799854a105.691353 105.691353 0 0 0 93.257077 0l412.525419-204.799854a36.571402 36.571402 0 0 1 32.548548 65.46281L592.186275 1005.713933A179.017015 179.017015 0 0 1 513.009189 1023.999634z" />
    248256                        </svg>
    249257                    </div>
     
    380388                    class="d-flex text-decoration-none align-items-center menu-bg-color">
    381389                    <div class="menu-icon icon-icon">
    382                         <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 16 18" fill="none">
    383                             <path fill-rule="evenodd" clip-rule="evenodd"
    384                                 d="M12 4H8V6H12V4ZM12 7H8V8H12V7ZM7 4H4V8H7V4ZM7 10H12V9H7V10ZM10 12H12V11H10V12ZM12 13H4V14H12V13ZM9 11H4V12H9V11ZM6 9H4V10H6V9ZM15 0H1C0.734784 0 0.48043 0.105357 0.292893 0.292893C0.105357 0.48043 0 0.734784 0 1V17C0 17.2652 0.105357 17.5196 0.292893 17.7071C0.48043 17.8946 0.734784 18 1 18H15C15.2652 18 15.5196 17.8946 15.7071 17.7071C15.8946 17.5196 16 17.2652 16 17V1C16 0.734784 15.8946 0.48043 15.7071 0.292893C15.5196 0.105357 15.2652 0 15 0ZM14 16H2V2H14V16Z"
    385                                 fill="black" />
     390                        <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" class="svg-icon"
     391                            viewBox="0 0 1025 1024" version="1.1">
     392                            <path
     393                                d="M513.009189 73.143171a73.142805 73.142805 0 0 1 30.171407 6.582852l404.479711 192.548434A18.285701 18.285701 0 0 1 951.866018 274.285884a18.285701 18.285701 0 0 1-3.474283 2.011427L543.180596 468.845745a73.142805 73.142805 0 0 1-60.342814 0L78.35807 276.297311A18.285701 18.285701 0 0 1 74.152359 274.285884a18.285701 18.285701 0 0 1 3.474283-2.011427L482.837782 79.726023A73.142805 73.142805 0 0 1 513.009189 73.143171m0-73.142805a143.725612 143.725612 0 0 0-61.622814 13.714276L46.906664 206.080219a73.142805 73.142805 0 0 0 0 136.411331l404.479711 192.365577a145.371325 145.371325 0 0 0 123.245627 0l404.479711-192.365577a73.142805 73.142805 0 0 0 0-136.411331L574.632002 13.714642A143.725612 143.725612 0 0 0 513.009189 0.000366z" />
     394                            <path
     395                                d="M513.009189 773.485528a176.639874 176.639874 0 0 1-79.177087-18.285702L21.306683 550.217116a36.571402 36.571402 0 1 1 32.548548-65.462811l412.525419 204.799854a105.691353 105.691353 0 0 0 93.257077 0l412.525419-204.799854a36.571402 36.571402 0 0 1 32.548548 65.462811l-412.525419 204.799853A176.639874 176.639874 0 0 1 513.009189 773.485528z" />
     396                            <path
     397                                d="M513.009189 1023.999634a179.017015 179.017015 0 0 1-79.177087-18.285701L21.306683 800.731222a36.571402 36.571402 0 1 1 32.548548-65.46281l412.525419 204.799854a105.691353 105.691353 0 0 0 93.257077 0l412.525419-204.799854a36.571402 36.571402 0 0 1 32.548548 65.46281L592.186275 1005.713933A179.017015 179.017015 0 0 1 513.009189 1023.999634z" />
    386398                        </svg>
    387399                    </div>
  • bulk-mail-sender/trunk/templates/BMSIUser.php

    r3091711 r3096054  
    88<?php include "BMSIHeader.php"; ?>
    99
    10 <div class="col-xl-10 col-lg-11 col-md-11 ps-70 column-space">
     10<div class="col-xl-10 col-lg-11 col-md-11">
    1111    <div class="pt-4"></div>
    1212
    13     <div class="d-flex align-items-center gap-3 title">
    14         <h1 class="fw-bold" style="font-size: 40px;">Users</h1>
    15         <a href="<?php printf(esc_html('%sadmin.php?page=create_user', 'bulk-mail'), esc_html($admin_url)); ?>"
    16             class="add-button border-0 text-decoration-none text-black">Add New User</a>
    17     </div>
    18 
    19     <div class="wrap">
    20         <input type="hidden" name="all_users" value="all_user_nonce" />
    21         <div class="table-wrapper">
    22             <?php global $wp_roles;
    23             $roles = $wp_roles->get_names();
    24             ?>
    25             <select name="role_filter" id="role_filter">
    26                 <option name="role_filter" value="All">All roles
    27                 </option>
    28                 <?php
    29                 foreach ($roles as $key => $role) { ?>
    30                     <option name="role_filter" value="<?php echo esc_attr($key); ?>">
    31                         <?php echo esc_attr($role); ?>
    32                     </option>
    33                 <?php } ?>
    34             </select>
    35             <table id="get_all_users" class="display">
    36                 <thead>
    37                     <tr>
    38                         <th scope="col" style="text-align:center;">
    39                             <?php echo esc_html__("Id", 'bulk-mail'); ?>
    40                         </th>
    41                         <th scope="col" style="text-align:left;">
    42                             <?php echo esc_html__("Name", 'bulk-mail'); ?>
    43                         </th>
    44                         <th scope="col" style="text-align:left;">
    45                             <?php echo esc_html__("Email", 'bulk-mail'); ?>
    46                         </th>
    47                         <th scope="col" style="text-align:left;">
    48                             <?php echo esc_html__("Mobile", 'bulk-mail'); ?>
    49                         </th>
    50                         <th scope="col" style="text-align:left;">
    51                             <?php echo esc_html__("Role", 'bulk-mail'); ?>
    52                         </th>
    53                         <th scope="col">Action</th>
    54                     </tr>
    55                 </thead>
    56                 <tbody>
    57                 </tbody>
    58             </table>
     13    <?php if (is_bulk_mail_pro_activated()) {
     14        if (get_option('BMIS_Pro_activated')) { ?>
     15            <div class="ps-70 column-space">
     16
     17                <div class="d-flex align-items-center gap-3 title">
     18                    <h1 class="fw-bold" style="font-size: 40px;">Users</h1>
     19                    <a href="<?php printf(esc_html('%sadmin.php?page=create_user', 'bulk-mail'), esc_html($admin_url)); ?>"
     20                        class="add-button border-0 text-decoration-none text-black">Add New User</a>
     21                </div>
     22
     23                <div class="wrap">
     24                    <input type="hidden" name="all_users" value="all_user_nonce" />
     25                    <div class="table-wrapper">
     26                        <?php global $wp_roles;
     27                        $roles = $wp_roles->get_names();
     28                        ?>
     29                        <select name="role_filter" id="role_filter">
     30                            <option name="role_filter" value="All">All roles
     31                            </option>
     32                            <?php
     33                            foreach ($roles as $key => $role) { ?>
     34                                <option name="role_filter" value="<?php echo esc_attr($key); ?>">
     35                                    <?php echo esc_attr($role); ?>
     36                                </option>
     37                            <?php } ?>
     38                        </select>
     39                        <table id="get_all_users" class="display">
     40                            <thead>
     41                                <tr>
     42                                    <th scope="col" style="text-align:center;">
     43                                        <?php echo esc_html__("Id", 'bulk-mail'); ?>
     44                                    </th>
     45                                    <th scope="col" style="text-align:left;">
     46                                        <?php echo esc_html__("Name", 'bulk-mail'); ?>
     47                                    </th>
     48                                    <th scope="col" style="text-align:left;">
     49                                        <?php echo esc_html__("Email", 'bulk-mail'); ?>
     50                                    </th>
     51                                    <th scope="col" style="text-align:left;">
     52                                        <?php echo esc_html__("Mobile", 'bulk-mail'); ?>
     53                                    </th>
     54                                    <th scope="col" style="text-align:left;">
     55                                        <?php echo esc_html__("Role", 'bulk-mail'); ?>
     56                                    </th>
     57                                    <th scope="col">Action</th>
     58                                </tr>
     59                            </thead>
     60                            <tbody>
     61                            </tbody>
     62                        </table>
     63                    </div>
     64                </div>
     65
     66                <div class="modal fade" id="exampleModal1" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
     67                    <div class="modal-dialog mt-5">
     68                        <div class="modal-content fs-14">
     69                            <div class="modal-header">
     70                                <h5 class="modal-title fs-14 py-2 px-1" id="exampleModalLabel">User Information</h5>
     71                                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
     72                            </div>
     73                            <div class="modal-body">
     74                                <div class="id">
     75                                    Id :- <span class="user_id"></span>
     76                                </div><br>
     77                                <div class="name">
     78                                    Name :- <span class="user_name"></span>
     79                                </div><br>
     80                                <div class="email">
     81                                    Email :- <span class="user_email"></span>
     82                                </div><br>
     83                                <div class="mobile">
     84                                    Mobile :- <span class="user_mobile"></span>
     85                                </div><br>
     86                                <div class="role">
     87                                    Role :- <span class="user_role"></span>
     88                                </div>
     89                            </div>
     90                            <div class="modal-footer">
     91                                <button type="button" class="fs-14 add-button text-black border-0"
     92                                    data-bs-dismiss="modal">Close</button>
     93                            </div>
     94                        </div>
     95                    </div>
     96                </div>
     97
     98            </div>
     99        <?php } else { ?>
     100            <div class="dashboard-bg-image d-flex justify-content-center align-items-center">
     101                <div class="dashboard-wrapper">
     102                    <div class="bg-color p-3 rounded-4 mx-5">
     103                        <svg xmlns="http://www.w3.org/2000/svg" width="55" height="55" viewBox="0 0 66 75" fill="none">
     104                            <path
     105                                d="M58.8933 37.3734H22.9333V22.4884C22.9333 16.7711 27.5298 12.0212 33.2718 11.9635C39.0718 11.9057 43.8133 16.5979 43.8133 22.3584V24.6684C43.8133 26.5886 45.3648 28.1334 47.2933 28.1334H51.9333C53.8618 28.1334 55.4133 26.5886 55.4133 24.6684V22.3584C55.4133 10.231 45.4808 0.37016 33.3008 0.413472C21.1208 0.456785 11.3333 10.4475 11.3333 22.575V37.3734H7.85331C4.01081 37.3734 0.893311 40.4775 0.893311 44.3034V67.4033C0.893311 71.2293 4.01081 74.3333 7.85331 74.3333H58.8933C62.7358 74.3333 65.8533 71.2293 65.8533 67.4033V44.3034C65.8533 40.4775 62.7358 37.3734 58.8933 37.3734ZM39.1733 59.3184C39.1733 62.509 36.5778 65.0933 33.3733 65.0933C30.1688 65.0933 27.5733 62.509 27.5733 59.3184V52.3884C27.5733 49.1977 30.1688 46.6134 33.3733 46.6134C36.5778 46.6134 39.1733 49.1977 39.1733 52.3884V59.3184Z"
     106                                fill="white" />
     107                        </svg>
     108                    </div>
     109                    <div class="text-center mt-2">
     110                        <p style="margin-bottom:0;">Activate Pro version</p>
     111                        <a
     112                            href="<?php echo esc_url(get_site_url() . '/wp-admin/options-general.php?page=bmsi_pro_settings') ?>">click
     113                            here</a>
     114                    </div>
     115                </div>
     116            </div>
     117        <?php }
     118    } else { ?>
     119        <div class="ps-70 column-space">
     120
     121            <div class="d-flex align-items-center gap-3 title">
     122                <h1 class="fw-bold" style="font-size: 40px;">Users</h1>
     123                <a href="<?php printf(esc_html('%sadmin.php?page=create_user', 'bulk-mail'), esc_html($admin_url)); ?>"
     124                    class="add-button border-0 text-decoration-none text-black">Add New User</a>
     125            </div>
     126
     127            <div class="wrap">
     128                <input type="hidden" name="all_users" value="all_user_nonce" />
     129                <div class="table-wrapper">
     130                    <?php global $wp_roles;
     131                    $roles = $wp_roles->get_names();
     132                    ?>
     133                    <select name="role_filter" id="role_filter">
     134                        <option name="role_filter" value="All">All roles
     135                        </option>
     136                        <?php
     137                        foreach ($roles as $key => $role) { ?>
     138                            <option name="role_filter" value="<?php echo esc_attr($key); ?>">
     139                                <?php echo esc_attr($role); ?>
     140                            </option>
     141                        <?php } ?>
     142                    </select>
     143                    <table id="get_all_users" class="display">
     144                        <thead>
     145                            <tr>
     146                                <th scope="col" style="text-align:center;">
     147                                    <?php echo esc_html__("Id", 'bulk-mail'); ?>
     148                                </th>
     149                                <th scope="col" style="text-align:left;">
     150                                    <?php echo esc_html__("Name", 'bulk-mail'); ?>
     151                                </th>
     152                                <th scope="col" style="text-align:left;">
     153                                    <?php echo esc_html__("Email", 'bulk-mail'); ?>
     154                                </th>
     155                                <th scope="col" style="text-align:left;">
     156                                    <?php echo esc_html__("Mobile", 'bulk-mail'); ?>
     157                                </th>
     158                                <th scope="col" style="text-align:left;">
     159                                    <?php echo esc_html__("Role", 'bulk-mail'); ?>
     160                                </th>
     161                                <th scope="col">Action</th>
     162                            </tr>
     163                        </thead>
     164                        <tbody>
     165                        </tbody>
     166                    </table>
     167                </div>
     168            </div>
     169
     170            <div class="modal fade" id="exampleModal1" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
     171                <div class="modal-dialog mt-5">
     172                    <div class="modal-content fs-14">
     173                        <div class="modal-header">
     174                            <h5 class="modal-title fs-14 py-2 px-1" id="exampleModalLabel">User Information</h5>
     175                            <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
     176                        </div>
     177                        <div class="modal-body">
     178                            <div class="id">
     179                                Id :- <span class="user_id"></span>
     180                            </div><br>
     181                            <div class="name">
     182                                Name :- <span class="user_name"></span>
     183                            </div><br>
     184                            <div class="email">
     185                                Email :- <span class="user_email"></span>
     186                            </div><br>
     187                            <div class="mobile">
     188                                Mobile :- <span class="user_mobile"></span>
     189                            </div><br>
     190                            <div class="role">
     191                                Role :- <span class="user_role"></span>
     192                            </div>
     193                        </div>
     194                        <div class="modal-footer">
     195                            <button type="button" class="fs-14 add-button text-black border-0"
     196                                data-bs-dismiss="modal">Close</button>
     197                        </div>
     198                    </div>
     199                </div>
     200            </div>
    59201        </div>
    60     </div>
    61 </div>
    62 </div>
    63 
    64 <div class="modal fade" id="exampleModal1" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
    65     <div class="modal-dialog mt-5">
    66         <div class="modal-content fs-14">
    67             <div class="modal-header">
    68                 <h5 class="modal-title fs-14 py-2 px-1" id="exampleModalLabel">User Information</h5>
    69                 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
    70             </div>
    71             <div class="modal-body">
    72                 <div class="id">
    73                     Id :- <span class="user_id"></span>
    74                 </div><br>
    75                 <div class="name">
    76                     Name :- <span class="user_name"></span>
    77                 </div><br>
    78                 <div class="email">
    79                     Email :- <span class="user_email"></span>
    80                 </div><br>
    81                 <div class="mobile">
    82                     Mobile :- <span class="user_mobile"></span>
    83                 </div><br>
    84                 <div class="role">
    85                     Role :- <span class="user_role"></span>
    86                 </div>
    87             </div>
    88             <div class="modal-footer">
    89                 <button type="button" class="fs-14 add-button text-black border-0"
    90                     data-bs-dismiss="modal">Close</button>
    91             </div>
    92         </div>
    93     </div>
    94 </div>
    95 
    96 <?php include "BMSIFooter.php"; ?>
    97 
    98 
    99 </html>
     202
     203    <?php } ?>
     204
     205    <?php include "BMSIFooter.php"; ?>
     206
     207
     208    </html>
Note: See TracChangeset for help on using the changeset viewer.