-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlocation.php
More file actions
183 lines (139 loc) · 4.82 KB
/
location.php
File metadata and controls
183 lines (139 loc) · 4.82 KB
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<?
$strAbsPath = "/home/paulthetutor/paulthetutors.com";
include($strAbsPath . "/includes/pttec_includes.phtml");
put_ptts_header("Location", $strAbsPath, "",($_REQUEST[popup] ? "popup" : ""));
$id = isset($_REQUEST["id"]) ? $_REQUEST["id"] : 1;
$location = get_location( $id );
/**
id of location
address
name
phone_number
description
rate(all the rates are the same)
image_url(300x235)(google maps, use the id of location get the image form images)
map_url(google maps)
map_image_url(saved google maps, use the id of location get the map image from images)
Piedmont
piedmont
4235 Piedmont Avenue, Oakland, CA 94611
Piedmont
(510) 730-0390
We are located on Piedmont Avenue, across from Fenton's Creamery.
NONE
http://www.paulthetutors.com/images/sidewalk.jpg
http://maps.google.com/maps?oi=map&q=4235+Piedmont+Ave,+Oakland,+CA
http://www.paulthetutors.com/images/laf_map.jpg
San Mateo
sanmat
San Mateo
Lafayette
lafayette
Lafayette
**/
//@param $id (String) case sensitive
function get_location( $id ) {
//check if where clause is case sensitive
$query = "SELECT * FROM PT_Locations WHERE id = $id"; //"LIMIT 0,1" ;
$result = runquery( $query );
$query = "SELECT * FROM PT_Rates_Loc WHERE location_id = $id";
$result_rates = runquery($query);
if( !$result ) {
$query = "SELECT * FROM WHERE shortname = 'PT_Locations'";
$result = mysql_query( $query );
}
$location= NULL;
while( $rows = mysql_fetch_array( $result ) ) {
$location = array(
"name" => $rows[ 'name' ],
"address" => $rows[ 'address' ],
"phone" => $rows[ 'phone'],
"city"=> $rows['city'],
"state"=> $rows['state'],
"zip"=> $rows['zip'],
"description" => $rows[ 'description' ],
"map_url" => $rows[ 'map url' ],
"image_url" => $rows[ "image_url" ],
"mapimage_url" => $rows[ "mapimage_url" ],
);
}
while( $rows = mysql_fetch_array( $result_rates ) ) {
if($id !=8) {
$location["rate"] = $rows[ 'rate' ];
}else {
$location["rate"] = "125/hour for in-home with Paul, $70/hour for in-home with other tutor's";
}
return $location;
}
echo "nothing meets the query ".$query;
return false;
}
?>
<link href="includes/css_files/locations.css" rel="stylesheet" type="text/css">
<table align="center" border="0"><tr><td>
<p><span class="loc_image_address">
<?php if($id != 9 && $id != 8) {?>
<a href=" <?= $location["map_url"]?> " target="_blank">
<?php
$mapimage="http://www.paulthetutors.com/images/".$id."_map.png"
?>
<img src="<?=$mapimage?>" width="267" height="267" />
</a>
<br />
<br />
<span class="loc_address">
<a href="<?= $location["map_url"] ?>" target="_blank">Map and Directions</a>
<br />
</span>
</span>
<span class="Head1_Green">Paul the Tutor's - <?= $location["name"] ?> </span><br />
<p>
<?= $location["description"] ?>
</p>
<!-- what todo about this? -->
<p> </p>
<?= $location["address"] ?>
<br>
<!-- <?php var_dump($location) ?> -->
<?= $location["city"].",".$location["state"]." ".$location["zip"] ?>
<br />
<?= $location["phone"] ?>
<?php }else{ ?>
</span>
<span class="Head1_Green" float="left">Paul the Tutor's - <?= $location["name"] ?> </span><br />
<p>
<?= $location["description"] ?>
</p>
<!-- what todo about this? -->
<p> </p>
</span>
<?php if($id==9) {?>
<b>Currently the Berkeley office is not open until it opens
we offer in-home tutoring at in-office rates.</b></p>
<?php }?>
<?php }?>
<ul>
<li><strong>Traditional</strong> Subject Matter Tutoring</li>
<li><strong>Learning Disabilities</strong> Targeted Instruction</li>
<li>General<strong> Cognitive Skill </strong>Development</li>
</ul>
<p> </p>
<p></p>
<p> </p>
<p class="Head3">Rates starting at $<?= $location["rate"] ?>
(<a href="contact.php" target="_blank">contact us for rate details</a>)</p>
<p class="Head3">Find out More (<a href="tutoring.php">get tutoring information</a>)</p>
<p class="Head3">Ready to Get Started? (<a href="contact.php">click here</a>)</p>
<p class="Head3">Contact Us (<a href="contact.php">click here</a>)</p>
<p> </p>
<?php
$image="http://www.paulthetutors.com/images/".$id."_locationimage.png";
?>
<p><img src="<?=$image?>" width="330" height="220" /></p>
<p> </p>
<p> </p>
<p></p>
<p> </p>
</div>
</td></tr></table>
<? put_ptts_footer(); ?>