-
Notifications
You must be signed in to change notification settings - Fork 0
/
showsresult.php
32 lines (30 loc) · 1.21 KB
/
showsresult.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
<?php
session_start();
include_once 'conn.php';
include_once 'library/basefunction.php';
include_once 'lang/envinit.php';
include_once 'templatefunction/Iron.article.php';
include_once 'templatefunction/Iron.column.php';
include_once 'templatefunction/Iron.label.php';
include_once 'templatefunction/Iron.search.php';
$columnid = $_GET["columnid"];
$templatefile = getroot()."/templates/searchresult.html";
if (($columnid != NULL) && ($columnid != ''))
{
$templateid = getcolumnformationBycolumnid($columnid,"searchtemplate");
$templatepath = getresultData(getresult("select * from I_template where id=$templateid"),0,"path");
$templatefile = getroot()."/templates/".$templatepath;
}
//echo $templatefile;
if(!file_exists($templatefile))
die("The template file doesn'n exit!");
$template = file_get_contents($templatefile);
//如果模板被删除
if(!$template)
die("<script type='text/javascript'>alert('The template doesn't exists!')window.location='error.html'</script>");
$template = translatelabel($template);
$template = translateSearchlist($template);
$template = translateArticlelist($template);
$template = translateCommonlabel($template);
echo $template;
?>