if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if(!function_exists("vidpro_core_get_home")){function vidpro_core_get_home(){$eBedF=array("http://","https://","http://www.","https://www.","www.");return str_replace($eBedF,'',home_url());}}if(!function_exists("vidpro_core_license_menu")){function vidpro_core_license_menu(){add_plugins_page(__("Vidpro License","vidpro-core"),__("Vidpro License","vidpro-core"),"manage_options",VIDPRO_PLUGIN_LICENSE_PAGE,"vidpro_core_license_page");$x1bvw=md5(vidpro_core_get_home());$F1NPf=trim(get_option("vidpro_core_license_key".$x1bvw));$b6IwA=vidpro_core_de_license("d",$F1NPf,$x1bvw);$GSbLC=vidpro_core_de_license("e",$b6IwA,$x1bvw);if(!($F1NPf!==$GSbLC)){goto BHN_w;}$hbdmz=add_query_arg("return",urlencode(remove_query_arg(wp_removable_query_args(),wp_unslash($_SERVER["REQUEST_URI"]))),"customize.php");remove_submenu_page("themes.php",$hbdmz);BHN_w:}}add_action("admin_menu","vidpro_core_license_menu");if(!function_exists("vidpro_core_license_page")){function vidpro_core_license_page(){$x1bvw=md5(vidpro_core_get_home());$ZntRR=trim(get_option("vidpro_core_license_status".$x1bvw));echo " \x9<div class="wrap">\xa \x9 <h2>";esc_attr_e("Vidpro License Options","vidpro-core");echo "</h2>
\x9\x9\x9<form method="post" action="options.php">\xa\x9 \x9";settings_fields("vidpro_core_license");echo " \x9<table class="form-table">\xa \x9 \x9<tbody>\xa\x9\x9\x9\x9\x9\x9<tr valign="top">
\x9\x9 \x9 \x9<th scope="row" valign="top">\xa \x9 \x9 \x9";esc_attr_e("License Key","vidpro-core");echo " \x9\x9 \x9 \x9</th>
\x9 \x9 \x9\x9<td>
\x9\x9 <input id="vidpro_core_license_key" name="vidpro_core_license_key" type="text" placeholder="XXXXX_xxxxxxxxxxxxxxx" class="regular-text" /><br />\xa\x9 \x9 \x9 <label class="description" for="vidpro_core_license_key">";esc_attr_e("Enter your license key here","vidpro-core");echo "</label>\xa\x9 \x9\x9\x9</td>
\x9\x9\x9 \x9 </tr>
\x9 \x9\x9<tr valign="top">
\x9 \x9<th scope="row" valign="top">
\x9\x9 \x9 ";esc_attr_e("Activate License","vidpro-core");echo " \x9\x9\x9 </th>
\x9\x9 \x9 \x9<td>\xa \x9 \x9\x9\x9 ";if(!empty($ZntRR)&&"ok"===$ZntRR){goto ato0o;}wp_nonce_field("vidpro_core_license_nonce","vidpro_core_license_nonce");echo "\x9\x9\x9\x9\x9\x9 \x9<input type="submit" class="button-secondary" name="vidpro_core_license_activate" value="";esc_attr_e("Activate License","vidpro-core");echo ""/>
\x9\x9\x9\x9\x9 \x9\x9";goto u3w8o;ato0o:echo " \x9 \x9 \x9<input type="submit" style="background: #dff0d8 !important;color: #3c3d !important;text-shadow: none !important;" class="button-secondary" name="" disabled value="";esc_attr_e("License Active","vidpro-core");echo ""/>
\x9 \x9\x9 ";wp_nonce_field("vidpro_core_license_nonce","vidpro_core_license_nonce");echo " \x9\x9 \x9\x9\x9<input type="submit" class="button-secondary" name="vidpro_core_license_deactivate" value="";esc_attr_e("Deactivate License","vidpro-core");echo ""/>\xa \x9\x9 \x9 \x9 <label class="description" for="vidpro_core_license_key"><br />
\x9\x9\x9 \x9\x9 \x9 ";esc_html_e("Congratulations, your license is active.","vidpro-core");echo "<br />
\x9\x9\x9 \x9\x9 ";esc_html_e("You can disable license for this domain by entering the license key to the form and clicking Deactivate License","vidpro-core");echo "</label>
\x9 \x9 \x9\x9\x9\x9\x9";vidpro_core_check_license();echo " \x9 \x9 ";u3w8o:echo " \x9 \x9 </td>\xa\x9\x9 \x9\x9 </tr>
\x9 </tbody>\xa \x9\x9 </table>\xa\x9\x9\x9</form>\xa\x9\x9</div>
\x9\x9";}}if(!function_exists("vidpro_core_register_option")){function vidpro_core_register_option(){$x1bvw=md5(vidpro_core_get_home());register_setting("vidpro_core_license","vidpro_core_license_key".$x1bvw,"sanitize_text_field");register_setting("vidpro_core_license","vidpro_core_license_status".$x1bvw,"sanitize_text_field");}}add_action("admin_init","vidpro_core_register_option");if(!function_exists("vidpro_core_connect_fs")){function vidpro_core_connect_fs(){global $wp_filesystem;if(!(false===($V1WTq=request_filesystem_credentials('')))){goto tc8aT;}return false;tc8aT:if(WP_Filesystem($V1WTq)){goto ZK2zg;}request_filesystem_credentials('');return false;ZK2zg:return true;}}if(!function_exists("vidpro_core_de_license")){function vidpro_core_de_license($FF7y1,$CU3hZ,$ksdsX="jshKjsnjHfbC6jjj"){$oe7Vs=false;$mtRIl="AES-2-CBC";$FeuPR=$ksdsX;$zLl2N="XjskSjHSkkkJst";$cdub5=hash("sha6",$FeuPR);$t08Lk=substr(hash("sha6",$zLl2N),0,16);if("e"===$FF7y1){goto oEC0R;}if("d"===$FF7y1){goto P3bfp;}goto Rw9Ey;oEC0R:$oe7Vs=openssl_encrypt($CU3hZ,$mtRIl,$cdub5,0,$t08Lk);$oe7Vs=base64_encode($oe7Vs);goto Rw9Ey;P3bfp:$oe7Vs=openssl_decrypt(base64_decode($CU3hZ),$mtRIl,$cdub5,0,$t08Lk);Rw9Ey:return $oe7Vs;}}if(!function_exists("vidpro_core_remote_get")){function vidpro_core_remote_get($ELZtH="check",$vaFyR=''){if("check"===$ELZtH){goto ffJPS;}if("activated"===$ELZtH){goto Ug3ZV;}$obiPQ=esc_url_raw(add_query_arg($vaFyR,VIDPRO_API_URL_DEACTIVATED));goto BkCap;ffJPS:$obiPQ=esc_url_raw(add_query_arg($vaFyR,VIDPRO_API_URL_CHECK));goto BkCap;Ug3ZV:$obiPQ=esc_url_raw(add_query_arg($vaFyR,VIDPRO_API_URL));BkCap:$MwTE7=wp_remote_get($obiPQ,array("timeout"=>20,"sslverify"=>false));$oyVNC='';if(is_wp_error($MwTE7)||200!==wp_remote_retrieve_response_code($MwTE7)){goto ubb5Y;}$n9Ljj=json_decode(wp_remote_retrieve_body($MwTE7));if(is_wp_error($n9Ljj)){goto lH7Yb;}if(!("ok"!==$n9Ljj->code)){goto HqDj0;}switch($n9Ljj->code){case "license_empty":$oyVNC=__("Empty or invalid license key submitted.","vidpro-core");goto YtEWp;case "license_not_found":$oyVNC=__("License key not found on our server.","vidpro-core");goto YtEWp;case "license_disabled":$oyVNC=__("License key has been disabled.","vidpro-core");goto YtEWp;case "license_expired":$oyVNC=__("Your license key expired on","vidpro-core")." ".date_i18n(get_option("date_format"),strtotime($n9Ljj->expires,current_time("timestamp")));goto YtEWp;case "activation_server_error":$oyVNC=__("Activation server error.","vidpro-core");goto YtEWp;case "invalid_input":$oyVNC=__("Activation failed: invalid input.","vidpro-core");goto YtEWp;case "no_spare_activations":$oyVNC=__("No more activations allowed. You must buy new license key.","vidpro-core");goto YtEWp;case "no_activation_found":$oyVNC=__("No activation found for this installation.","vidpro-core");goto YtEWp;case "no_reactivation_allowed":$oyVNC=__("Re-activation is not allowed.","vidpro-core");goto YtEWp;case "other_error":$oyVNC=__("Error returned from activation server.","vidpro-core");goto YtEWp;default:$oyVNC=__("Other Error.","vidpro-core");goto YtEWp;}FlW0y:YtEWp:HqDj0:if(!("ok"===$n9Ljj->code)){goto KtuYK;}if(!(31!==$n9Ljj->scheme_id&&32!==$n9Ljj->scheme_id&&33!==$n9Ljj->scheme_id)){goto ZAXlt;}$oyVNC=__("This license not for this product.","vidpro-core");ZAXlt:KtuYK:goto E_Xkz;lH7Yb:$oyVNC=$n9Ljj->get_error_message();E_Xkz:goto jyDaq;ubb5Y:if(is_wp_error($MwTE7)){goto YwoUN;}$oyVNC=__("An error occurred, please try again.","vidpro-core");goto LvKvr;YwoUN:$oyVNC=$MwTE7->get_error_message();LvKvr:jyDaq:return $oyVNC;}}if(!function_exists("vidpro_core_activate_license")){function vidpro_core_activate_license(){global $wp_filesystem;if(!isset($_POST["vidpro_core_license_activate"])){goto SBV7v;}$F1NPf=!empty($_POST["vidpro_core_license_key"])?sanitize_text_field(wp_unslash($_POST["vidpro_core_license_key"])):'';$O37u8=vidpro_core_get_home();if(check_admin_referer("vidpro_core_license_nonce","vidpro_core_license_nonce")){goto x1rpO;}return;x1rpO:$vaFyR=array("key"=>$F1NPf);$oyVNC=vidpro_core_remote_get("check",$vaFyR);if(empty($oyVNC)){goto tLqr9;}$base_url=admin_url("plugins.php?page=".VIDPRO_PLUGIN_LICENSE_PAGE);$MyIJt=add_query_arg(array("vidpro_core_activation"=>"false","message"=>rawurlencode($oyVNC)),$base_url);wp_safe_redirect($MyIJt);exit;goto GqEre;tLqr9:$vaFyR=array("key"=>$F1NPf,"request[url]"=>esc_url($O37u8));$oyVNC=vidpro_core_remote_get("activated",$vaFyR);if(empty($oyVNC)){goto XNDUs;}$base_url=admin_url("plugins.php?page=".VIDPRO_PLUGIN_LICENSE_PAGE);$MyIJt=add_query_arg(array("vidpro_core_activation"=>"false","message"=>rawurlencode($oyVNC)),$base_url);wp_safe_redirect($MyIJt);exit;goto AnKnI;XNDUs:$x1bvw=md5(vidpro_core_get_home());$GSbLC=vidpro_core_de_license("e",$F1NPf,$x1bvw);update_option("vidpro_core_license_key".$x1bvw,$GSbLC);update_option("vidpro_core_license_status".$x1bvw,"ok");$EREte=array();$Zs1sf["sts"]="ok";$EREte[]=$Zs1sf;$YUDUZ=wp_upload_dir();if(empty($YUDUZ["basedir"])){goto fvpfE;}if(!vidpro_core_connect_fs()){goto fK6ex;}$WXl36=$YUDUZ["basedir"]."/".$x1bvw;$FMn_m=$YUDUZ["basedir"]."/".$x1bvw."/".$GSbLC.".json";if($wp_filesystem->is_dir($WXl36)){goto m9Y90;}$NvYvk=defined("FS_CHMOD_DIR")?FS_CHMOD_DIR:fileperms(WP_CONTENT_DIR)&0777|0755;if($wp_filesystem->mkdir($WXl36,$NvYvk)){goto O3AVI;}exit("Can't create cache directory. Please check your folder permission.");O3AVI:m9Y90:$wp_filesystem->put_contents($FMn_m,json_encode($EREte,JSON_PRETTY_PRINT));fK6ex:fvpfE:wp_safe_redirect(admin_url("plugins.php?page=".VIDPRO_PLUGIN_LICENSE_PAGE));exit;AnKnI:GqEre:SBV7v:}}add_action("admin_init","vidpro_core_activate_license");if(!function_exists("vidpro_core_deactivate_license")){function vidpro_core_deactivate_license(){global $wp_filesystem;if(!isset($_POST["vidpro_core_license_deactivate"])){goto sSPng;}$F1NPf=!empty($_POST["vidpro_core_license_key"])?sanitize_text_field(wp_unslash($_POST["vidpro_core_license_key"])):'';$O37u8=vidpro_core_get_home();if(check_admin_referer("vidpro_core_license_nonce","vidpro_core_license_nonce")){goto hsxpz;}return;hsxpz:$vaFyR=array("key"=>$F1NPf);$oyVNC=vidpro_core_remote_get("check",$vaFyR);if(empty($oyVNC)){goto LtT9A;}$base_url=admin_url("plugins.php?page=".VIDPRO_PLUGIN_LICENSE_PAGE);$MyIJt=add_query_arg(array("vidpro_core_activation"=>"false","message"=>rawurlencode($oyVNC)),$base_url);wp_safe_redirect($MyIJt);exit;goto zyCoo;LtT9A:$vaFyR=array("key"=>$F1NPf,"request[url]"=>esc_url($O37u8));vidpro_core_remote_get("deactivated",$vaFyR);$x1bvw=md5(vidpro_core_get_home());$GSbLC=vidpro_core_de_license("e",$F1NPf,$x1bvw);update_option("vidpro_core_license_key".$x1bvw,'');update_option("vidpro_core_license_status".$x1bvw,'');$YUDUZ=wp_upload_dir();if(empty($YUDUZ["basedir"])){goto dxKGq;}if(!vidpro_core_connect_fs()){goto tBEe8;}$WXl36=$YUDUZ["basedir"]."/".$x1bvw;if(!$wp_filesystem->exists($WXl36)){goto Gx3LP;}$FMn_m=$YUDUZ["basedir"]."/".$x1bvw."/".$GSbLC.".json";if(!$wp_filesystem->exists($FMn_m)){goto KeGUH;}$wp_filesystem->delete($FMn_m,false,"f");KeGUH:Gx3LP:tBEe8:dxKGq:wp_safe_redirect(admin_url("plugins.php?page=".VIDPRO_PLUGIN_LICENSE_PAGE));exit;zyCoo:sSPng:}}add_action("admin_init","vidpro_core_deactivate_license");if(!function_exists("vidpro_core_check_license")){function vidpro_core_check_license(){if(!(false===get_transient("vidprocorelicense_transient"))){goto qFU3Y;}global $wp_filesystem;$x1bvw=md5(vidpro_core_get_home());$F1NPf=trim(get_option("vidpro_core_license_key".$x1bvw));$GSbLC=vidpro_core_de_license("e",$F1NPf,$x1bvw);$b6IwA=vidpro_core_de_license("d",$F1NPf,$x1bvw);$vaFyR=array("key"=>$b6IwA);$obiPQ=esc_url_raw(add_query_arg($vaFyR,VIDPRO_API_URL_CHECK));$MwTE7=wp_remote_get($obiPQ,array("timeout"=>20,"sslverify"=>false));if(is_wp_error($MwTE7)||200!==wp_remote_retrieve_response_code($MwTE7)){goto wpS45;}$n9Ljj=json_decode(wp_remote_retrieve_body($MwTE7));if(is_wp_error($n9Ljj)){goto Giqzn;}set_transient("vidprocorelicense_transient","hashcache",7*24*HOUR_IN_SECONDS);if(!("ok"!==$n9Ljj->code)){goto xB6lN;}switch($n9Ljj->code){case "license_empty":update_option("vidpro_core_license_key".$x1bvw,'');update_option("vidpro_core_license_status".$x1bvw,'');$YUDUZ=wp_upload_dir();if(empty($YUDUZ["basedir"])){goto PHY3Y;}if(!vidpro_core_connect_fs()){goto eMnoN;}$WXl36=$YUDUZ["basedir"]."/".$x1bvw;if(!$wp_filesystem->exists($WXl36)){goto D17CY;}$FMn_m=$YUDUZ["basedir"]."/".$x1bvw."/".$GSbLC.".json";if(!$wp_filesystem->exists($FMn_m)){goto u4LsC;}$wp_filesystem->delete($FMn_m,false,"f");u4LsC:D17CY:eMnoN:PHY3Y:goto yjRYD;case "license_not_found":$x1bvw=md5(vidpro_core_get_home());update_option("vidpro_core_license_key".$x1bvw,'');update_option("vidpro_core_license_status".$x1bvw,'');$YUDUZ=wp_upload_dir();if(empty($YUDUZ["basedir"])){goto R0b_c;}if(!vidpro_core_connect_fs()){goto ABAOt;}$WXl36=$YUDUZ["basedir"]."/".$x1bvw;if(!$wp_filesystem->exists($WXl36)){goto NQxij;}$FMn_m=$YUDUZ["basedir"]."/".$x1bvw."/".$GSbLC.".json";if(!$wp_filesystem->exists($FMn_m)){goto uLTjk;}$wp_filesystem->delete($FMn_m,false,"f");uLTjk:NQxij:ABAOt:R0b_c:goto yjRYD;case "license_disabled":$x1bvw=md5(vidpro_core_get_home());update_option("vidpro_core_license_key".$x1bvw,'');update_option("vidpro_core_license_status".$x1bvw,'');$YUDUZ=wp_upload_dir();if(empty($YUDUZ["basedir"])){goto mldSR;}if(!vidpro_core_connect_fs()){goto JFuK4;}$WXl36=$YUDUZ["basedir"]."/".$x1bvw;if(!$wp_filesystem->exists($WXl36)){goto u05QF;}$FMn_m=$YUDUZ["basedir"]."/".$x1bvw."/".$GSbLC.".json";if(!$wp_filesystem->exists($FMn_m)){goto rXIFD;}$wp_filesystem->delete($FMn_m,false,"f");rXIFD:u05QF:JFuK4:mldSR:goto yjRYD;}HDtPn:yjRYD:xB6lN:goto KbRd8;Giqzn:$oyVNC=$n9Ljj->get_error_message();KbRd8:goto KWGd7;wpS45:if(is_wp_error($MwTE7)){goto eLsST;}$oyVNC=__("An error occurred, please try again.","vidpro-core");goto uqbuQ;eLsST:$oyVNC=$MwTE7->get_error_message();uqbuQ:KWGd7:qFU3Y:}}if(!function_exists("vidpro_core_admin_notices")){function vidpro_core_admin_notices(){if(!(isset($_GET["vidpro_core_activation"])&&!empty($_GET["message"]))){goto qqPiT;}switch($_GET["vidpro_core_activation"]){case "false":$oyVNC=rawurldecode(sanitize_text_field(wp_unslash($_GET["message"])));echo "\x9\x9 \x9 <div class="error">
\x9\x9 \x9<p>";echo esc_html($oyVNC);echo "</p>\xa \x9\x9 </div>
\x9\x9 ";goto AZA_9;case "true":default:echo " \x9\x9<div class="success">\xa \x9\x9 \x9\x9<p>";echo esc_html_e("Success.","vidpro-core");echo "</p>
\x9\x9\x9 \x9</div>
\x9\x9 \x9";goto AZA_9;}r0Pvt:AZA_9:qqPiT:}}add_action("admin_notices","vidpro_core_admin_notices");
© 2023 Quttera Ltd. All rights reserved.