-
Notifications
You must be signed in to change notification settings - Fork 1
/
news_print.php
47 lines (32 loc) · 1.23 KB
/
news_print.php
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
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* Allomani E-Store v1.0
*
* @package Allomani.E-Store
* @version 1.0
* @copyright (c) 2006-2018 Allomani , All rights reserved.
* @author Ali Allomani <info@allomani.com>
* @link http://allomani.com
* @license GNU General Public License version 3.0 (GPLv3)
*
*/
include "global.php";
print "<HTML dir=\"$settings[html_dir]\">
<head>
<META http-equiv=Content-Language content=\"$settings[site_pages_lang]\">
<META http-equiv=Content-Type content=\"text/html; charset=$settings[site_pages_encoding]\">
</head>";
$id = intval($id);
$qr = db_query("select * from store_news where id='$id'");
if(db_num($qr)){
$data = db_fetch($qr);
print "<title>$data[title]</title>";
$img_url = get_image($data['img']) ;
$template = get_template('browse_news_print');
$news_date = date("d-m-Y",strtotime($data['date']));
$template = str_replace(array('{id}','{title}','{img}','{content}','{details}','{writer}','{date}'),array("$data[id]","$data[title]","$img_url","$data[content]","$data[details]","$data[writer]","$news_date"),$template);
print "$template";
}else{
print "<center>$phrases[err_wrong_url]</center>";
}
print "</HTML>";