function licensing_customerscontent_licensing_pnaddsupport_BeforeShow(&$sender) { $licensing_customerscontent_licensing_pnaddsupport_BeforeShow = true; $Component =& $sender; $Container =& CCGetParentContainer($sender); global $licensing_customerscontent; //Compatibility //End licensing_customerscontent_licensing_pnaddsupport_BeforeShow //Custom Code @224-2A29BDB7 // ------------------------- // Write your own code here. //Will only show addsupport button to perpetual license types (7,12) and doesnt have support added $guid = trim(CCGetFromGet("license_guid", "")); if (strlen($guid) > 0) { $products = new Alm\Products(); $params = array(); $params["license_guid"] = $guid; $isPerpetual = $products->licenseIsPerpetual($params); if ($isPerpetual["isPerpetual"] == 1) { $hasSupport = $products->licenseHasSupport($params); if ($hasSupport["hasSupport"] == 1) { $licensing_customerscontent->licensing->pnaddsupport->Visible = false; } else { $licensing_customerscontent->licensing->pnaddsupport->Visible = true; } } else { $licensing_customerscontent->licensing->pnaddsupport->Visible = false; } } else { $licensing_customerscontent->licensing->pnaddsupport->Visible = false; } // ------------------------- //End Custom Code //Close licensing_customerscontent_licensing_pnaddsupport_BeforeShow @51-F7C008AF return $licensing_customerscontent_licensing_pnaddsupport_BeforeShow; }