<?php
    define('RINNOVOBOOKINGSERVERPLUGIN', 'https://plugin.webevent.it/');

    define('RINNOVOBOOKINGNOMEPLUGIN', 'Rinnovo Booking');
    define('RINNOVOBOOKINGPREFIX', strtolower('rinnovo_booking'));
    define('RINNOVOBOOKINGPREFIXLOGO', 'plugin_logo.png');

    define('RINNOVOBOOKINGAPI','https://panel.webevent.it/verify-license');
    define('RINNOVOBOOKINGTOKEN','OU6_Ekw2AS5AMNk6Ie])1g3J)B/I!UW0N(4k6/)3$1>qt>?Z');
    
    global $wpdb;
    $table_name = $wpdb->prefix.RINNOVOBOOKINGPREFIX;
    $panel = $wpdb->get_results("SELECT * FROM $table_name WHERE `operazione` = 'panel'");
    define('RINNOVOBOOKINGPANEL', $panel['0']->op_val);

    $staging = $wpdb->get_results("SELECT * FROM $table_name WHERE `operazione` = 'staging'");
    $stagingValue = trim($staging['0']->op_val ?? '');
    define('RINNOVOBOOKINGSTAGING', !empty($stagingValue) ? '/' . $stagingValue : '');

    define('RINNOVOBOOKINGURL', home_url('/') . RINNOVOBOOKINGPANEL);
