Gazelle/sections/questions/index.php

58 lines
1.6 KiB
PHP
Raw Permalink Normal View History

2013-10-13 08:01:01 +00:00
<?
enforce_login();
if (!isset($_REQUEST['action'])) {
if (check_perms('users_mod')) {
include(SERVER_ROOT.'/sections/questions/questions.php');
}
else {
include(SERVER_ROOT.'/sections/questions/ask_question.php');
}
} else {
switch ($_REQUEST['action']) {
case 'take_ask_question':
include(SERVER_ROOT.'/sections/questions/take_ask_question.php');
break;
case 'answer_question':
include(SERVER_ROOT.'/sections/questions/answer_question.php');
break;
case 'take_answer_question':
include(SERVER_ROOT.'/sections/questions/take_answer_question.php');
break;
case 'take_remove_question':
include(SERVER_ROOT.'/sections/questions/take_remove_question.php');
break;
case 'take_remove_answer':
include(SERVER_ROOT.'/sections/questions/take_remove_answer.php');
break;
case 'questions':
include(SERVER_ROOT.'/sections/questions/questions.php');
break;
case 'answers':
include(SERVER_ROOT.'/sections/questions/answers.php');
break;
case 'view_answers':
include(SERVER_ROOT.'/sections/questions/view_answers.php');
break;
2013-10-14 08:00:53 +00:00
case 'popular_questions':
include(SERVER_ROOT.'/sections/questions/popular_questions.php');
break;
case 'ajax_get_answers':
include(SERVER_ROOT.'/sections/questions/ajax_get_answers.php');
break;
case 'take_ignore_question':
include(SERVER_ROOT.'/sections/questions/take_ignore_question.php');
break;
2013-10-21 08:01:00 +00:00
case 'edit':
include(SERVER_ROOT.'/sections/questions/edit.php');
break;
case 'take_edit_answer':
include(SERVER_ROOT.'/sections/questions/take_edit_answer.php');
break;
2013-10-13 08:01:01 +00:00
default:
error(404);
break;
}
}