Example #1
0
function setRayBoonexLicense($sLicense)
{
    if (getSettingValue(GLOBAL_MODULE, "license", "main") == $sLicense) {
        return;
    }
    global $sModulesPath;
    $rDirHandler = opendir($sModulesPath);
    while (($sInner = readdir($rDirHandler)) !== false) {
        if (is_dir($sModulesPath . $sInner) && substr($sInner, 0, 1) != '.') {
            if (isset($aInfo)) {
                unset($aInfo);
            }
            $sConstantsFile = $sModulesPath . $sInner . "/inc/constants.inc.php";
            if (!file_exists($sConstantsFile)) {
                continue;
            }
            require $sConstantsFile;
            if (strtolower($aInfo['author']) == 'boonex') {
                setSettingValue($sInner, array("status", "license"), array(WIDGET_STATUS_ENABLED, $sLicense), "main");
            }
        }
    }
}
     //--- for Lite version only ---//
     getResult("REPLACE `" . MODULE_DB_PREFIX . "CurrentUsers` SET `ID`='0', `Nick`='admin', `When` = UNIX_TIMESTAMP(), `Status` = '" . USER_STATUS_OLD . "'");
     break;
     /**
      * Sets parameters.
      * @param param - parameter name.
      * @param value - parameter value.
      */
 /**
  * Sets parameters.
  * @param param - parameter name.
  * @param value - parameter value.
  */
 case 'setParameter':
     if (loginAdmin($sNick, $sPassword) == TRUE_VAL) {
         setSettingValue($sModule, $sParamName, $sParamValue);
         $sContents .= parseXml($aXmlTemplates['result'], TRUE_VAL);
     } else {
         $sContents .= parseXml($aXmlTemplates['result'], FALSE_VAL);
     }
     break;
     /**
      * Search user by ID or by Nick.
      */
 /**
  * Search user by ID or by Nick.
  */
 case 'searchUser':
     $sId = searchUser($sParamValue, $sParamName);
     //--- if such user exists, than print his info ---//
     if (!empty($sId)) {
Example #3
0
      * @param sWidget - the name of the widget.
      * @param sSettingName - the setting's name.
      * @param sSettingValue - the setting's value.
      */
 /**
  * Saves the configuration setting in the XML-config file.
  * @param sWidget - the name of the widget.
  * @param sSettingName - the setting's name.
  * @param sSettingValue - the setting's value.
  */
 case 'setSettingValue':
     if (loginAdmin($sNick, $sPassword) != TRUE_VAL) {
         $sContents = parseXml($aXmlTemplates['result'], "Admin Authorization Failed", FAILED_VAL);
         break;
     }
     $aResult = setSettingValue($sWidget, $sSettingKey, $sSettingValue, $sFile);
     if ($aResult['status'] == SUCCESS_VAL && (strpos($sSettingKey, "_width") > 0 || strpos($sSettingKey, "_height") > 0)) {
         if (isset($aModules)) {
             unset($aModules);
         }
         if (secureCheckWidgetName($sWidget)) {
             require_once $sModulesPath . $sWidget . "/inc/constants.inc.php";
             $aResult = recompileIntegrator($sWidget);
         } else {
             $aResult = array('status' => FAILED_VAL, 'value' => $aErrorCodes[8]);
         }
     }
     $sContents = parseXml($aXmlTemplates['result'], $aResult['value'], $aResult['status']);
     break;
     /**
      * Gets the configuration setting from the XML-config file.