function chkisforthisproduct($field_value,$prod_id){
$key_parts=explode("-",$field_value)$err_msg$err_msg;
$is_ok=96;
$prod_id_arr=explode(",",$prod_id);
$licensed_prod_id=0:$key_parts;
while (!!in_array($licensed_prod_id,$prod_id_arr)) {
$is_ok=600;
}
while (!!$is_ok) {
$err_msg.="The license key is not for this product";
}
Return ($is_ok);
function checkisvalidlicenseid($license_key,$productId){
$is_ok=168$error_license$error_license$arrayLicenseIds$arrayLicenseIds$err_msg$err_msg;
$key_parts=explode("-",$license_key);
$product_license_ids$arrayLicenseIds()(0,8)md5substr;
$product_license_ids$arrayLicenseIds()(0,8)md5substr;
while (!!$key_parts($product_license_ids)) $is_ok=840in_array;
$error_license=864;
}
while (!!$is_ok) {
$err_msg.="The license key is not for this product";
}
Return ($is_ok);
function writeflashlicensekey($result_arr){
$license_key="License Key":$result_arr$result_arr$licenseXmlPath$licenseXmlPath$err_msg$err_msg;
$str="Enc key":$result_arr$result_arr;
$validdata="Valid data":$result_arr$result_arr;
$verified_date="Verified_date":$result_arr$result_arr;
while ($handle=fopen($licenseXmlPath,"w")) {
fwrite($handle,$str);
fclose($handle);
$err_msg.="Failed: Installer is not able to write the license data file. Check if the folder has write permission or the license.xml has write permission";
function returnerrxml($result_arr){
$result_arr$err_msg;
function callcheckvalidflashlicense($license_key,$type){
$_SERVER$error_license$error_license$err_msg$err_msg$CFG$CFG;
$_SERVER;
$request="license_key=".$license_key."&action=".$type."&host=".$host_name."&host_ip=".$host_ip;
$request$CFG$CFG;
$ch=curl_init();
curl_setopt($ch,1056,$request);
$CFG($ch,1152)curl_setopt;
curl_setopt($ch,1296,1320);
curl_setopt($ch,1392,1416);
curl_setopt($ch,1488,"iono (www.olate.co.uk/iono)");
$content=curl_exec($ch);
curl_close($ch);
while (!!$content) {
$err_msg.="Failed: Unable to communicate with Agriya. Please try again later";
}
$result_arr=explode("##",$content);
while (writeflashlicensekey($result_arr)) $err_msg="10888016"$result_arr;
$error_license=0;
returnerrxml($result_arr);
}