/
index.php
executable file
·133 lines (102 loc) · 4.58 KB
/
index.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php
include('php/util/db.php');
include('php/util/common.php');
$q = isset($_REQUEST["page"])?$_REQUEST["page"]:"home" ;
$PAGES_DIR = "./php/pages/";
$conn = init_db();
$page = get_page($conn,$q);
$tabs = get_tabs($conn);
//page - file, name, display_name
$show_ticker = $show_slideshow = ($q == "home");
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="en" />
<meta name="robots" content="all,follow" />
<meta name="author" lang="en" content="All: Satheesh Kumar M [sathyz.wordpress.com]; e-mail: sathyz@gmail.com" />
<meta name="description" content="Rainbow Novelties - specialises in creating custom designed bags for the discerning corporations" />
<meta name="keywords" content="rainbow novelties bags apparels gifts" />
<link rel="icon" type="image/x-icon" href="logo.ico" />
<link rel="stylesheet" media="screen,projection" type="text/css" href="css/reset.css" />
<link rel="stylesheet" media="screen,projection" type="text/css" href="css/main.css" />
<!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="css/main-msie.css" /><![endif]-->
<link rel="stylesheet" media="screen,projection" type="text/css" href="css/style.css" />
<link rel="stylesheet" media="print" type="text/css" href="css/print.css" />
<?php
@include("php/include/{$q}.inc");
?>
<title>Rainbow Novelties <?php if($page['title'])echo "- " . $page['title'];?></title>
</head>
<body>
<div id="main">
<!-- Header -->
<div id="header">
</div> <!-- /header -->
<!-- Tray -->
<div id="tray">
<ul>
<?php
foreach($tabs as $tab){
$url = $tab['external_url']? "'{$tab['external_url']}' target='_blank'":"'index.php?page={$tab['name']}'";
print("<li ".($tab['name']==$page['tab']? "id='tray-active'":""). ">"
."<a href={$url}>{$tab['display_name']}</a>"
."</li>");
}
?>
</ul>
<!-- Search -->
<div id="search" class="box">
<form action="http://www.google.com/search" target="new" method="get">
<div class="box">
<div id="search-input"><label for="txtSearch"><span class="noscreen">Search:</span></label><input type="text" size="30" name="q" value="Search" id="txtSearch"/></div>
<div id="search-submit"><input type="image" src="design/search-submit.gif" value="OK" alt="OK" /></div>
<input type="hidden" name="sitesearch" value="www.rainbownovelties.in"/>
</div>
</form>
</div> <!-- /search -->
<hr class="noscreen" />
</div> <!-- /tray -->
<!-- Promo -->
<div id="col-top"></div>
<div id="col" class="box">
<!-- space for slideshow -->
<?php
$split_page = true;
if($show_slideshow) include("php/pages/slideshow.php");
else $split_page = false; // if not any of the above cases
?>
<div id="col-text" <?php if($split_page) print("class='rpane'")?>>
<?php
if($page['title']){
print("<h2 id='slogan'><span></span>{$page['title']}</h2>");
}
if(!@include($PAGES_DIR.$page['file'])){
echo "Page under construction";
}
// the file is not present...
?>
</div> <!-- /col-text -->
</div> <!-- /col -->
<div id="col-bottom"></div>
<hr class="noscreen" />
<!-- Footer -->
<div id="footer">
<?php
if($show_ticker) include("php/pages/ticker.php");
?>
<p class="f-right">
<?php
$_links = array('privacy', 'disclaimer', 'terms', 'site_map');
foreach($_links as $_link){
print(link_to($conn, $_link)." ");
}
?>
</p>
<p>Copyright © 2009 <strong><a href="index.php?page=home">Rainbow Novelties</a></strong>, All Rights Reserved ®. Site by <a href="http://twitter.com/sathyz" target="_blank">sathyz</a> </p>
</div> <!-- /footer -->
</div> <!-- /main -->
<?php close_db($conn);?>
</body>
</html>