Subversion Repositories cheapmusic

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
103 - 1
<?php
2
 
3
/***************************************************************************
4
 *   Copyright (C) 2009-2011 by Geo Varghese(www.seopanel.in)  	           *
5
 *   sendtogeo@gmail.com   												   *
6
 *                                                                         *
7
 *   This program is free software; you can redistribute it and/or modify  *
8
 *   it under the terms of the GNU General Public License as published by  *
9
 *   the Free Software Foundation; either version 2 of the License, or     *
10
 *   (at your option) any later version.                                   *
11
 *                                                                         *
12
 *   This program is distributed in the hope that it will be useful,       *
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
15
 *   GNU General Public License for more details.                          *
16
 *                                                                         *
17
 *   You should have received a copy of the GNU General Public License     *
18
 *   along with this program; if not, write to the                         *
19
 *   Free Software Foundation, Inc.,                                       *
20
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
21
 ***************************************************************************/
22
 
23
/**
24
 * Class defines all details about managing time zones
25
 */
26
class TimeZoneController extends Controller {
27
 
28
	/**
29
	 * function to get all timezones used in the system
30
	 * @param string $where		The condition to filter the timezones
31
	 * @return Array 			Array contains details about timezone
32
	 */
33
	function __getAllTimezones($where=''){
34
		$sql = "select * from timezone";
35
		if (!empty($where)) $sql .= $where;
36
		$sql .= " order by id";
37
		$timezoneList = $this->db->select($sql);
38
		return $timezoneList;
39
	}
40
 
41
 
42
	/**
43
	 * function to get timezone information
44
	 * @param int $timezoneVal	The value of the timezone
45
	 * @param int $timezoneCol	The col name of the timezone
46
	 * @return Array		Contains all details about the  timezone
47
	 */
48
	function __getTimezoneInfo($timezoneVal, $timezoneCol = 'timezone_name') {
49
		$sql = "select * from timezone where $timezoneCol='".addslashes($timezoneVal)."'";
50
		$timezoneInfo = $this->db->select($sql, true);
51
		return $timezoneInfo;
52
	}
53
}
54
?>