Ejemplo n.º 1
0
/**
 * creates user interfaces
 *
 * @param   string  $sType      interface type
 * @param   array   $aData      user environment
 *
 * @return  void
 */
function fAdmDisplay($sType, $aData = array())
{
    $aValTpl = array('adduser' => 'scr.adm_adduser.tpl', 'not_complete' => 'scr.adm_adduser.tpl', 'input_error' => 'scr.adm_adduser.tpl', 'ok' => 'scr.adm_adduser_ok.tpl');
    $aTpl = array(0 => file_get_contents(TPL_DIR . 'head.tpl'), 30 => file_get_contents(TPL_DIR . $aValTpl[$sType]), 100 => file_get_contents(TPL_DIR . 'footer.tpl'));
    $aLang = parse_ini_file(LANG_DIR . 'admin.' . LANG . '.lang', TRUE);
    $aLang[$sType]['PRE_URL'] = $_SERVER['PHP_SELF'] . '?cmd=adm&sub=ausr';
    $aTpl[0] = fTplReplace($aLang['head'], $aTpl[0]);
    $aTpl[30] = fTplReplace($aLang[$sType], $aTpl[30]);
    $bOk = fTplPrint($aTpl);
    exit;
}
Ejemplo n.º 2
0
/**
 * creates user interfaces
 *
 * @param   void
 *
 * @return  void
 */
function fSpDisplay()
{
    // load templates
    $aTpl = array(0 => file_get_contents(TPL_DIR . 'head.tpl'), 10 => file_get_contents(TPL_DIR . 'scr.menu_head.tpl'), 20 => file_get_contents(TPL_DIR . 'scr.menu_main.tpl'), 30 => file_get_contents(TPL_DIR . 'scr.startpage.tpl'), 100 => file_get_contents(TPL_DIR . 'footer.tpl'));
    // load language environment
    $aLang = parse_ini_file(LANG_DIR . 'startpage' . '.lang', TRUE);
    $aLang['menu'] = parse_ini_file(LANG_DIR . 'menu.' . LANG . '.lang', TRUE);
    // replace template placeholder tags
    $aTpl[0] = fTplReplace($aLang['head'], $aTpl[0]);
    $aTpl[10] = fTplReplace($aLang['menu']['head'], $aTpl[10]);
    $aTpl[20] = fTplReplace($aLang['menu']['main'], $aTpl[20]);
    // output to screen
    $bOk = fTplPrint($aTpl);
    exit;
}
Ejemplo n.º 3
0
/**
 * creates user interfaces
 *
 * @todo    WARNING! this is still a dummy function
 *
 * @param   string  $sType      interface type
 * @param   array   $aData      user environment
 *
 * @return  void
 */
function fPwdDisplay($sType, $aData = array())
{
    $aValTpl = array('pwd_lost' => 'scr.pwdlost.tpl', 'no_input' => 'scr.pwdlost.tpl', 'no_nick' => 'scr.pwdlost.tpl', 'send' => 'scr.pwdlost_sd.tpl');
    $aTpl = array(0 => file_get_contents(TPL_DIR . 'head.tpl'), 30 => file_get_contents(TPL_DIR . $aValTpl[$sType]), 100 => file_get_contents(TPL_DIR . 'footer.tpl'));
    $aLang = parse_ini_file(LANG_DIR . 'pwdlost.' . LANG . '.lang', TRUE);
    $aLang[$sType]['PRE_URL'] = $_SERVER['PHP_SELF'] . '?cmd=pwd';
    $aTpl[0] = fTplReplace($aLang['head'], $aTpl[0]);
    $aTpl[30] = fTplReplace($aLang[$sType], $aTpl[30]);
    $bOk = fTplPrint($aTpl);
    exit;
}