die; } if (isset($_GET["content"])) { content(); exit; } if (isset($_GET["tabs"])) { tabs(); exit; } if (isset($_GET["policies"])) { policies(); exit; } if (isset($_GET["SearchQuery"])) { SearchQuery(); exit; } if (isset($_GET["policy-id-js"])) { policy_js(); exit; } if (isset($_GET["policy-tab"])) { policy_tab(); exit; } if (isset($_GET["policy1"])) { policy1(); exit; } if (isset($_GET["policy2"])) {
define('_EXEC', true); require_once($_SERVER['DOCUMENT_ROOT'] . '/config.php'); require_once($_SERVER['DOCUMENT_ROOT'] . '/inc/autoload.class.php'); application::getApplication(); application::Import(['mysql', 'model', 'htmldom']); if (!empty($_POST['loadComments'])) { LoadOrigComments($_POST['loadComments']); } if (!empty($_POST['button'])) { switch ($_POST['button']) { case 'search' : SearchQuery($_POST['searchQuery']); } } //Load commnets from original post (AJAX) function LoadOrigComments($post) { $html = file_get_html('http://'.config::$host['service'].'.ru/post/' . $post); foreach ($html->find('.voting, .link_to_comment, .show_tree, .to_parent, .title') as $element) { $element->outertext = ''; } foreach ($html->find('.comments_list') as $element) { $response = $element->innertext; }