comparison .cms/mini/frontpage.php @ 0:78edf6b517a0 draft

24.10
author Coffee CMS <info@coffee-cms.ru>
date Fri, 11 Oct 2024 22:40:23 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:78edf6b517a0
1 <main>
2 <?php
3 echo $cms["page"]["text"];
4
5 $date = date( 'Y-m-d H:i:s' );
6 $q = "SELECT * FROM pages WHERE tpl = 'post' AND `created` < '{$date}' ORDER BY id DESC LIMIT 6";
7
8 if ( $res = mysqli_query( $cms["base"], $q ) ) {
9
10 while ( $page = mysqli_fetch_assoc( $res ) ) {
11
12 include( dirname( __FILE__ ) . "/page.teaser.php" );
13
14 }
15
16 }
17 ?>
18 </main>