Пример #1
0
/**
 * Call GUI Builder
 */
$gui = new Core_GUI($module);
/**
 * Javascript Generator
 */
$js = new Core_GUI_JS($module);
/**
 * Build Page Header
 */
$gui->getHeader();
/**
 * Build Page Tabs
 */
$gui->getTabs('general');
// Get templates
$templates = parse_ini_file(CONF_TEMPLATES_INI);
// Get current config from database
$dbh = Core_DBH::getDBH();
// Get Database Handle
$sth = $dbh->prepare("\n\tSELECT setting, value\n\tFROM " . DB_PREFIX . "config\n\t;");
$sth->execute();
$current_config = $sth->fetchAll(PDO::FETCH_ASSOC);
foreach ($current_config as $key => $config) {
    $current_config[$config['setting']] = $config['value'];
    unset($current_config[$key]);
}
/**
 * PAGE BODY
 */
Пример #2
0
/**
 * Call GUI Builder
 */
$gui = new Core_GUI($module);
/**
 * Javascript Generator
 */
$js = new Core_GUI_JS($module);
/**
 * Build Page Header
 */
$gui->getHeader();
/**
 * Build Page Tabs
 */
$gui->getTabs('profile');
// Get languages
$languages = parse_ini_file(CONF_LANG_INI);
// Get templates
$templates = parse_ini_file(CONF_TEMPLATES_INI);
// Get profile settings from database
$dbh = Core_DBH::getDBH();
// Get Database Handle
$uid = Core_AuthService::getSessionInfo('ID');
// Get user id
$sth = $dbh->prepare("\n\tSELECT *\n\tFROM " . DB_PREFIX . "user\n\tWHERE user_id = :uid\n;");
$sth->bindParam(':uid', $uid);
$sth->execute();
$profile = $sth->fetchAll(PDO::FETCH_ASSOC);
$profile = $profile[0];
// Lang list as json