Example #1
0
        // U¿ytkownik nie uzupe³ni³ wszystkich pól::form
        $ft->assign('ERROR_MSG', $i18n['index'][1]);
        $ft->parse('ROWS', ".form_login");
    } else {
        $db = new DB_SQL();
        $query = sprintf("\r\n            SELECT \r\n                active \r\n            FROM \r\n                %1\$s \r\n            WHERE \r\n                login = '******' \r\n            AND \r\n                password = '******'", TABLE_USERS, $login, $password);
        $db->query($query);
        if ($db->num_rows()) {
            if ($db->f("active") != "N") {
                // Rejestrujemy zmienne sesyjne
                $_SESSION["login"] = $login;
                $_SESSION["loggedIn"] = TRUE;
                header("Location: main.php");
                break;
            } else {
                // U¿ytkownik nie zaaktywowa³ konta::db
                $ft->assign('ERROR_MSG', $i18n['index'][2]);
                $ft->parse('ROWS', ".form_login");
            }
        } else {
            // Niepoprawne dane wej¶cia<->wyj¶cia::form, db
            $ft->assign('ERROR_MSG', $i18n['index'][3]);
            $ft->parse('ROWS', ".form_login");
        }
    }
} else {
    include "modules/login.php";
}
$ft->parse('MAIN', array("main_loader", "main"));
$ft->FastPrint();
exit;
Example #2
0
        $title = $db->f("title");
        $text = $db->f("text");
        $author = $db->f("author");
        $id = $db->f("id");
        $image = $db->f("image");
        $comments_allow = $db->f("comments_allow");
        // Przypisanie zmiennej $comments
        $comments = $db->f("comments");
        // zmiana formatu wy¶wietlania daty
        $date = coreRssDateConvert($date);
        $pattern = array("&", "<br />", "<", ">");
        $replacement = array(" &amp; ", "&lt;br /&gt;", "&lt;", "&gt;");
        $text = str_replace($pattern, $replacement, $text);
        list_assigned_categories($id);
        if ((bool) $rewrite) {
            $comments_link = sprintf('%s1,%s,2,item.html', $http_root, $id);
            $permanent_link = sprintf('%s1,%s,1,item.html', $http_root, $id);
        } else {
            $comments_link = sprintf('%sindex.php?p=2&amp;id=%s', $http_root, $id);
            $permanent_link = sprintf('%sindex.php?p=1&amp;id=%s', $http_root, $id);
        }
        $ft->assign(array('DATE' => $date, 'TITLE' => $title, 'AUTHOR' => $author, 'PERMALINK' => $permanent_link, 'TEXT' => $text, 'COMMENTS_LINK' => $comments_link, 'DISPLAY_XML' => true));
        $ft->parse('XML_ROW', ".xml_row");
    }
} else {
    $ft->assign('DISPLAY_XML', false);
    $ft->parse('XML_ROW', ".xml_row");
}
$ft->parse('CONTENT', "xml_feed");
$ft->FastPrint('CONTENT');