php contacts php компании include_once config inc php htmlstart query

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/******************************************************************************/
/* contacts.php */
/* о компании */
/******************************************************************************/
include_once 'config.inc.php';
htmlstart();
query('LOCK TABLES items READ, content READ;');
$result = query(
"SELECT items.id,
content.ru_text, img, imgalign, ru_img_alt, bigimg, ru_bigimg_alt, list_item_id
FROM `content`, `items`
WHERE content.c_type_id=4
AND content.i_id=items.id
AND items.active=1
AND (items.always=1 OR (now()+0 BETWEEN items.start AND items.end))
AND items.p_id=7
ORDER BY items.sort
;");
query('UNLOCK TABLES;');
if (mysql_num_rows($result)) while ($row = mysql_fetch_assoc($result)) $objlist[] = $row;
//dump($objlist);
$tpl = new Smarty;
$tpl -> compile_check = $devel;
$tpl -> debugging = false;
$tpl -> assign('OBJ' , $objlist);
$tpl -> assign('META' , get_meta(7));
$tpl -> assign('NEWS' , get_news_annonce());
$tpl -> assign('PAGE' , 'contacts');
$tpl -> assign('OUTPUT', 'simple.thtml');
$tpl -> display("inner.thtml");
htmlend();
?>