Beispiel #1
0
/**
 * Ajax request dispatcher 
 */
function admin_ajax_dispatcher()
{
    switch ($_POST['page']) {
        case 'dashboard':
            admin_dashboard();
            break;
        case 'rooms':
            admin_rooms();
            break;
        case 'users':
            admin_users();
            break;
        case 'settings':
            admin_settings();
            break;
    }
}
Beispiel #2
0
                if (is_dir('templates/' . $value)) {
                    $designs .= '<option ' . ($value == DESIGN ? 'selected="selected"' : '') . ' value="' . $value . '">' . $value . '</option>';
                }
            }
            $tpl = new smarty();
            $tpl->assign('designs', $designs);
            $tpl->assign('langs', get_languages());
            $dir = scan_dir('module', true);
            $start = '';
            foreach ($dir as $value) {
                if (is_dir('module/' . $value)) {
                    $start .= '<option ' . ('modul|' . $value == STARTSEITE ? 'selected="selected"' : '') . ' value="modul|' . $value . '">' . $value . '</option>';
                }
            }
            $start .= '<option value="">-----' . OWN_SITES . '----</option>';
            $db->query('SELECT headline, cmsID FROM ' . DB_PRE . 'ecp_cms ORDER BY headline ASC');
            while ($row = $db->fetch_assoc()) {
                $title = json_decode($row['headline'], true);
                isset($title[LANGUAGE]) ? $title = $title[LANGUAGE] : ($title = $title[DEFAULT_LANG]);
                $start .= '<option ' . ('cms|' . $row['cmsID'] == STARTSEITE ? 'selected="selected"' : '') . ' value="cms|' . $row['cmsID'] . '">' . $title . '</option>';
            }
            $tpl->assign('startseite', $start);
            ob_start();
            $tpl->display(DESIGN . '/tpl/admin/settings.html');
            $content = ob_get_contents();
            ob_end_clean();
            main_content(SETTINGS, $content, '', 1);
        }
    }
    admin_settings();
}