Exemplo n.º 1
0
global $_str;
// check for crack!
if (isset($_GET['page'])) {
    system::count_parametr(4);
    system::isset_numeric($_GET['page']);
} else {
    system::count_parametr(3);
    $_GET['page'] = 1;
}
// добавление новости
if (system::IsPost()) {
    if (!captcha::check_captcha()) {
        //выводим сообщение
        Message::GetMessage(0, v::getI18n('message_error_captcha'));
    } else {
        // пишем в базу
        Forms::MultyInsertForm('guestbook', 0);
        // очищаем POST
        unset($_POST);
        // выводим мообщение
        Message::GetMessage(1, v::getI18n('message_add_comment_to_guestbook'));
    }
}
// check for count gallery at page
guestbook::count_guestbook_at_page();
// get limit
$limit = pager::pager_limit(guestbook::count_guestbook(), GUESTBOOK_AT_PAGE);
// выводим
$_str .= guestbook::get_guestbook($limit, '/frontend/guestbook/list.php');
$_str = array('_str' => $_str, 'title' => $title->get_title(), 'keywords' => $title->get_keywords(), 'description' => $title->get_description(), 'h1' => $title->get_h1());