function allApplicationNames()
 {
     FMWK_require_once('common' . DIRECTORY_SEPARATOR . 'file.inc.php');
     $appsdirs =& $this->appsPaths($real_app);
     $res = array();
     foreach ($appsdirs as $dn) {
         $lst = listFilesFilter($dn, "^app\\..*\\.php\$");
         foreach ($lst as $kf => $vf) {
             $s = substr($kf, 4, strlen($kf) - 8);
             $res[$s] = $s;
             // Only once instance of the same appname
         }
     }
     return $res;
 }
//ini_set('magic_quotes_runtime', 0);
//ini_set('magic_quotes_gpc', 0);
/* Defines */
define('ROOT_DIR', realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR);
/* Include FMWK */
define('FMWK_ROOT_DIR', ROOT_DIR . 'fmwk' . DIRECTORY_SEPARATOR);
define('FMWK_SITE_DIR', ROOT_DIR . 'inc' . DIRECTORY_SEPARATOR . 'site' . DIRECTORY_SEPARATOR);
require_once FMWK_ROOT_DIR . 'inc' . DIRECTORY_SEPARATOR . 'fmwk.inc';
/* Configuration */
include "conf/config.inc";
$_sitecfg =& new SiteConfiguration();
$_sitecfg->set_value('site.baseurl', 'index.php');
$_sitecfg->set_value('site.title', 'SCMlogs');
$_sitecfg->set_value('site.default_application', 'index');
$_sitecfg->set_value('site.passwd', $SCMLOGS['passwd.filename']);
/* WebSite */
FMWK_require_once('auth/AuthHtpasswd.php');
$_siteauth =& new SiteAuthHtpasswd(&$_sitecfg, $_sitecfg->value('site.passwd'));
$_sitemgr =& new SiteManager(&$_sitecfg);
/* Main Application */
include "inc/require.inc";
include "inc/datamanager.inc";
FMWK_site_require_once('apps' . DIRECTORY_SEPARATOR . "scmapp.php");
if (!isset($application)) {
    $application = value_from_POST_GET(FMWK_PARAM_APP, $_sitecfg->value('site.default_application'));
}
$_sitemgr->initialize(&$_siteauth);
$_sitemgr->registerApplication($application);
$_sitemgr->prepareData();
//echo 'No data should be posted before this<br/>';
$_sitemgr->printOutput();
<?php

/* Defines */
define('FMWK_SITE_DIR', realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR);
define('SITE_PARAM_APP', 'app');
define('SITE_PARAM_OP', 'appop');
/* Includes */
require_once '..' . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'fmwk.inc';
/* Configuration */
$_sitecfg =& new SiteConfiguration();
$_sitecfg->set_value('site.baseurl', 'index.php');
$_sitecfg->set_value('site.title', 'Test admin');
$_sitecfg->set_value('site.default_application', 'admin');
/* WebSite */
FMWK_require_once('auth/BasicAuth.php');
$_siteauth =& new BasicAuth(&$_sitecfg);
$_sitemgr =& new SiteManager(&$_sitecfg);
/* Main Application */
if (!isset($application)) {
    $application = value_from_POST_GET(FMWK_PARAM_APP, $_sitecfg->value('site.default_application'));
}
$_sitemgr->initialize(&$_siteauth);
$_sitemgr->registerApplication($application);
$_sitemgr->prepareData();
//echo 'No data should be posted before this<br/>';
$_sitemgr->printOutput();