/
generic_locations.php
140 lines (115 loc) · 3.92 KB
/
generic_locations.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
134
135
136
137
138
139
140
<?php
global $var;
/**
Purpose: Code for Joomla menu
Developer: Yogi
Last Updated Date: 27-12-2012
**/
//require('jmenu.php');
/** Code for Joomla menu End **/
include_once('./inc/var.php');
include_once($var->inc_path.'base.php');
_init();
//#DD#
$searchdata = '';
if($_POST['search_rcd']=="Search Places" || $_POST['search_rcd']=="Lugares de la búsqueda") {
$searchdata = trim($_POST['searchvalue']);
}
/*
Code Begin
Result : Listing of locations from CATEGORY ID
Request : Fetching category id from URL
Developer:Rinkal
Last update Date:02-01-2013
*/
$category_id = $_REQUEST['category_id'];
$res=mysql_query("select title from jos_categories where id=".$category_id."");
while($loc_title=mysql_fetch_array($res))
{
$loc_cat_name=$loc_title['title'];
$loc_cat_name=explode(" -", $loc_cat_name);
}
/* code End */
?>
<!DOCTYPE HTML>
<html>
<head>
<title><?php echo $var->site_name.' | '.$loc_cat_name[0]; ?></title>
<link rel="image_src" href="http://<?php echo $_SERVER['HTTP_HOST']?>/partner/<?php echo $_SESSION['partner_folder_name']?>/images/logo/logo.png" />
<meta property="og:image" content="http://<?php echo $_SERVER['HTTP_HOST']?>/partner/<?php echo $_SESSION['partner_folder_name']?>/images/logo/logo.png"/>
<meta property="og:title" content="<?php echo $var->site_name.' | '.$var->page_title; ?>"/>
<meta property="og:description" content="<?php echo strip_tags(m_places_intro()); ?>"/>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="<?php echo $var->keywords; ?>" />
<meta name="description" content="<?php echo $var->metadesc; ?>" />
<meta name="description" content="<?php echo $var->extra_meta; ?>" />
<script>
document.createElement('header');
document.createElement('nav');
document.createElement('section');
document.createElement('article');
document.createElement('aside');
document.createElement('footer');
</script>
<link rel="stylesheet" type="text/css" href="common/templatecolor/<?php echo $_SESSION['style_folder_name'];?>/css/all.css" media="screen" />
<!--[if IE 7]><link rel="stylesheet" type="text/css" href="common/templatecolor/<?php echo $_SESSION['style_folder_name'];?>/css/ie7.css" media="screen" /><![endif]-->
<?php include("ga.php"); ?>
</head>
<body>
<header>
<?php m_header(); ?> <!-- header -->
</header>
<div id="wrapper">
<aside>
<?php m_aside(); ?>
</aside> <!-- left Column -->
<section>
<h2><?php echo $var->site_name; ?> <?php echo $loc_cat_name[0]; ?></h2>
<?php
/* Code added for generic_locations.tpl */
require($var->tpl_path."generic_locations.tpl");
?>
<div class="adThreeHunderd" style="float:left;">
<?php m_show_banner('Website Front Page Feature'); ?>
</div> <!-- adThreeHunderd -->
<!--#DD#-->
<div style="text-align:center;">
<form action="" method="post" name="location_form">
<input type="text" name="searchvalue" value="<?php echo $searchdata; ?>" size="35" style="margin-top:20px;" />
<?php
/* Code added for location_button.tpl */
require($var->tpl_path."location_button.tpl");
?>
</form>
</div>
<!--#DD#-->
<?php
/*
Code Begin
Result : Listing of locations from CATEGORY ID
Request : Fetching category id from URL
Developer:Rinkal
Last update Date:02-01-2013
*/
$rec=mysql_query("select * from jos_categories where (parent_id=".$category_id." OR id=".$category_id.") AND section='com_jevlocations2' and published=1 order by `ordering`") or die(mysql_error());
/*Code End */
while($row=mysql_fetch_array($rec))
{
if (m_location_count($row['title'],false, $searchdata))
{
?>
<div style="float:left;width:720px;display:block;">
<h2><?=$row['title'];?></h2>
<?php m_location_list($row['title'],false, $searchdata); ?>
<br clear="all">
</div>
<?php
}}
?>
</section> <!-- rightColumn -->
</div> <!-- wrapper -->
<footer>
<?php m_footer(); ?> <!-- footer -->
</footer>
</body>
</html>