Example #1
0
// site map definition
require_once KT_DIR . '/config/siteMap.inc';
require_once KT_LIB_DIR . '/session/Session.inc';
require_once KT_LIB_DIR . '/session/control.inc';
require_once KT_LIB_DIR . '/plugins/pluginutil.inc.php';
if ($checkup !== true) {
    // Replace function later
    /* ** Get the page being loaded and load the plugins specific to the page ** */
    $sScriptName = $GLOBALS['_SERVER']['SCRIPT_NAME'];
    $sScript = basename($sScriptName);
    $pos = strpos($sScript, '.');
    $sType = substr($sScript, 0, $pos);
    KTPluginUtil::loadPlugins($sType);
}
if ($checkup !== true) {
    if (KTPluginUtil::pluginIsActive('ktdms.wintools')) {
        $path = KTPluginUtil::getPluginPath('ktdms.wintools');
        require_once $path . 'baobabkeyutil.inc.php';
        $name = BaobabKeyUtil::getName();
        if ($name) {
            $default->versionName = sprintf('%s %s', $default->versionName, $name);
        }
    } else {
        $default->versionName = $default->versionName . ' ' . _kt('(Community Edition)');
    }
}
if (!extension_loaded('mbstring')) {
    require_once KT_LIB_DIR . '/mbstring.inc.php';
}
require_once KT_LIB_DIR . '/templating/kt3template.inc.php';
$GLOBALS['main'] = new KTPage();
Example #2
0
function getKTEdition()
{
    $edition = 'Community|-';
    if (KTPluginUtil::pluginIsActive('ktdms.wintools')) {
        $path = KTPluginUtil::getPluginPath('ktdms.wintools');
        require_once $path . 'baobabkeyutil.inc.php';
        $edition = BaobabKeyUtil::getName();
        // this could be done with regular expressions...
        // Remove the brackets around the name
        $edition = substr($edition, 1);
        $edition = substr($edition, 0, strlen($edition) - 1);
        // Remove the "users"
        $pos = strpos($edition, 'users');
        $edition = $pos === false ? $edition . '|-' : substr($edition, 0, $pos - 1);
        // Replace the , with |
        $edition = str_replace(', ', '|', $edition);
    }
    return $edition;
}