Location: PHPKode > projects > Opensheet > opensheet/classes/global.class.php
<?php 
#include ('../functions/base.functions.php');
#
#
#ЧИСТИТЬ КЛАСС !!!
#
#

#ini_set('display_errors',1);
#error_reporting(E_ALL);

include ('users.class.php');
include ('projects.class.php');
include ('drawPage.class.php');
include ('timesheet.class.php');
include ('stats.class.php');
include ('groups.class.php');
include ('tasks.class.php');
#include ('../functions/ldap.inc.php');
db_connect();

class Base {
	
		protected $queue;
		var $row;
		var $answer;
	
	
	protected function dbQueryRow($queue){
		db_connect();
		$result = mysql_query($queue) or die("Invalid query: " . mysql_error());
		$answer = mysql_fetch_row($result);
		return $answer['0'];
		#echo $queue;
		
	}
	
		protected function dbQueryAssoc($query){
		db_connect();
		$result = mysql_query($query) or die("Invalid query: " . mysql_error());
		foreach ($row = mysql_fetch_assoc($result) as $key => $value ) {
				   			$answer[$key]	= $value;
				   	}
				return $answer;
			}
			
			
		protected function dbQuery($queue){
		db_connect();
		 $result = mysql_query($queue) or die("Invalid query: " . mysql_error());
		while ($row = mysql_fetch_assoc($result)){
			 $answer[]= $row;
		}
		return $answer;
	}
		protected function dbExec($queue){
		db_connect();
		 $result = mysql_query($queue) or die("Invalid query: " . mysql_error());
		
	}
		
	
}





class getSetting {
	
		private function dbQuery($queue){
		db_connect();
		$sql = "SELECT setting_value FROM  `settings` WHERE  `setting_name` =  '$queue'";
		$result = mysql_query($sql) or die("Invalid query: " . mysql_error());
		$answer = mysql_fetch_row($result);
		return $answer[0];
		#return $sql;
	}
	
    public function getValue($queue){
    	return $this->dbQuery($queue);
	}
	
	
	
	
	
}






class lang {
		public $month_names = array("0"=>"Декабрь","1" => "Январь","2"=>"Февраль","3"=>"Март","4"=>"Апрель","5"=>"Май","6"=>"Июнь","7"=>"Июль","8"=>"Август","9"=>"Сентябрь","10"=>"Октябрь","11"=>"Ноябрь","12"=>"Декабрь","13" => "Январь");
    	public $words = array (
"lang" => "Язык",
"timesheet" => "Карточка учета рабочего времени",
"date" => "Дата",
"go" => "Ввести",
"prev_month" => "Предыдущий месяц",
"next_month" => "Следующий Месяц",
"br" => "Среднесписочная численность",
"ftee" => "Коэффициен загрузки",
"project" => "Проекты",
"tender" => "Тендеры",
"office" => "Офисная работа",
"off_hours" => "Часы отсутствия",
"overtime" => "Сверхурочная работа",
"index" => "Индекс",
"sign" => "Подпись",
"summ" => "всего",
"reports" => "Отчеты",
"exit" => "Выход",
"setup" => "Настройки",
);
		
		
		public function __construct(){
		   		}

		public function __destruct(){
		unset($this->queue);
	}
	function getNameMonth($dig)	{
		return $this->month_names[$dig];
		
		
		
	}	
	function getMenuWords($key)	{
		return $this->words[$key];
		
		
		
	}		
	


}


?>
Return current item: Opensheet