예제 #1
0
파일: modul.php 프로젝트: laiello/avecms
}
if (!defined('ACP') && isset($_REQUEST['module']) && $_REQUEST['module'] == 'poll' && isset($_REQUEST['action'])) {
    require_once BASE_DIR . '/modules/poll/class.poll.php';
    require_once BASE_DIR . '/modules/poll/funcs/func.rewrite.php';
    $poll = new Poll();
    $tpl_dir = BASE_DIR . '/modules/poll/templates/';
    $lang_file = BASE_DIR . '/modules/poll/lang/' . $_SESSION['user_language'] . '.txt';
    switch ($_REQUEST['action']) {
        case 'result':
            $poll->pollResultShow($tpl_dir, $lang_file, (int) $_REQUEST['pid']);
            break;
        case 'vote':
            $poll->pollVote((int) $_REQUEST['pid']);
            break;
        case 'archive':
            $poll->pollArchiveShow($tpl_dir, $lang_file);
            break;
        case 'form':
            $poll->pollCommentShow($tpl_dir, $lang_file, (int) $_REQUEST['pid'], THEME_FOLDER);
            break;
        case 'comment':
            $poll->pollCommentNew($tpl_dir, $lang_file, (int) $_REQUEST['pid']);
            break;
    }
}
if (defined('ACP') && !empty($_REQUEST['moduleaction'])) {
    require_once BASE_DIR . '/modules/poll/class.poll.php';
    require_once BASE_DIR . '/modules/poll/funcs/func.rewrite.php';
    $poll = new Poll();
    $tpl_dir = BASE_DIR . '/modules/poll/templates/';
    $lang_file = BASE_DIR . '/modules/poll/lang/' . $_SESSION['user_language'] . '.txt';