Example #1
0
    static function doCommentTree($id_node, $parent = NULL, $level = 0)
    {
        if (empty(self::$bufferCommentTree)) {
            self::$bufferCommentTree = self::commentListForArticle($id_node);
        }
        if (!empty(self::$bufferCommentTree[$parent])) {
            foreach (self::$bufferCommentTree[$parent] as $l) {
                self::$bufferOutput .= '<tr>
					<td>
						' . $l['adddate_formated'] . '
					</td>
					<td style="padding-left: ' . $level * 20 . 'px;">
						<b>Meno:</b> ' . htmlspecialchars($l['name']) . '<br />
						<b>Text: </b>' . htmlspecialchars($l['text']) . '
					</td>
					<td>
						';
                if ($l['status'] == 0) {
                    self::$bufferOutput .= '<a href="/admin.php?id_menu_item=' . $_GET['id_menu_item'] . '&id_type_modul=' . $_GET['id_type_modul'] . '&id_modul=' . $_GET['id_modul'] . '&id_comment=' . $l['id_comment'] . '&action=allow#comments">Povoliť</a> |';
                }
                self::$bufferOutput .= '<a href="/admin.php?id_menu_item=' . $_GET['id_menu_item'] . '&id_type_modul=' . $_GET['id_type_modul'] . '&id_modul=' . $_GET['id_modul'] . '&id_comment=' . $l['id_comment'] . '&action=delete#comments">Zmazať</a> |
					<a target="_blank" href="/' . $l['menu_url_identifier'] . '/' . $l['url_identifier'] . '.html">Link</a>
						</td>
					</tr>';
                self::doCommentTree($id_node, $l['id_comment'], $level + 1);
            }
        }
    }
Example #2
0
        case "admin_modules":
            $t = new type_modul();
            $t->showForm();
            break;
        case "log":
            $l = new log();
            $l->showLog();
            break;
        case "file_manager":
            MT::addTemplate(APP_DIR . '/templates/admin/fileManagerIFrame.phtml', 'fileManager');
            break;
        case "groups":
            $a->showGroup();
            break;
        case "newsletter":
            Admin_Newsletter::show();
            break;
        case 'setting':
            $s = new Setting();
            $s->show();
            break;
        case 'comment':
            Admin_Comment::action();
            Admin_Comment::commentList();
            break;
    }
} catch (LogicException $e) {
    MT::addTemplate(APP_DIR . '/templates/admin/error_message.phtml', 'error_message');
    MT::addVar('error_message', 'error', $e->getMessage());
}
MT::render();