// config
$aDbConfig['server'] = 'localhost';
$aDbConfig['user'] = 'vaadua';
$aDbConfig['password'] = 'HHkahgxjx1762hsbKHPQPy83u';
$aDbConfig['database'] = 'vaadua';
// class for browsing
class Browser
{
// Data
var $oDbConnection;
var $aKeyz, $sTable, $sKey;
var $aPage;
var $iKeysCount;
// Results
var $iRealPage, $iPageCount, $iRealRecordsPerPage;
// Konstructor
function Browser( $sQuery, $iPageNumber, $iProdsPerPage, $sTable ,$sKey)
{
global $aDbConfig;
// DB Connection
$oDbConnection = mysql_connect($aDbConfig['server'], $aDbConfig['user'], $aDbConfig['password']) or die('DB Error: Connection to server
');
mysql_select_db($aDbConfig['database']) or die('DB Error: Database selection
');
/* Вставка 22.03.2007 */
mysql_query("SET NAMES cp1251");
/* Вставка 22.03.2007 */
$this->sTable = $sTable;
$this->sKey = $sKey;
$oQueryResult = mysql_query($sQuery) or die('DB Error: Keys selection
');
// Keyz Selection
$this->iKeysCount =mysql_num_rows ($oQueryResult);
// Calculations
$iFirstId = (abs($iPageNumber)-1) *$iProdsPerPage;
if($iFirstId >= $this->iKeysCount) $iFirstId = 0;
$iLastId = $iFirstId + $iProdsPerPage;
if($iLastId > $this->iKeysCount) $iLastId = $this->iKeysCount;
// Доп. розрахунки
$this->iRealPage = $iFirstId/$iProdsPerPage+1;
$this->iPageCount = ceil($this->iKeysCount/$iProdsPerPage);
for( $iC = $iFirstId; $iC< $iLastId; $iC++)
{
mysql_data_seek ( $oQueryResult, $iC);
$aRow = mysql_fetch_row($oQueryResult);
$this->aKeyz[] = $aRow[0];
}
if(count($this->aKeyz) > 0)
{
$query = "SELECT * FROM ".($this->sTable)." WHERE ".($this->sKey)." IN(".(implode(" ,", $this->aKeyz)).")";
$oQueryResult = mysql_query($query) or die('DB Error: Page selection
'.$query);
$this->iRealRecordsPerPage =0;
while($aRow = mysql_fetch_array($oQueryResult)) { $this->aPage[] = $aRow; $this->iRealRecordsPerPage++;}
}
else $this->aPage = false;
}
}
?>
$aTypes = array(0 => "",1 => "Община", 2 => "Общество", 3 => "СМИ");
function obl_list( $sListName)
{?>
}
// For compartibility
function draw_tbl0_root($oPage)
{
global $aTypes;
?>
№ | Название | Область | Нас. пункт | Индекс | Адрес | Телефоны | Факс | |||||
Редактировать Добавить |
№ | Название Организации | Область | Нас. пункт | Индекс | Адрес | Телефоны | Факс |
Код | Ключ.Код | Область | Нас. пункт | Община | Объект | Датировка | Адрес ВОВ | Нов. адрес | Площадь | Примечание |
Код | Область | Район | Населенный пункт | Размещение захоронения | Безымянное | Учтенное | Памятник | Координаты | Описание | Дата гибели | Краткая история | Доп. сведения | Номера воинских частей расстреливавших евреев | Организации , в чьем ведении захоронение | Наличие организаций, которые могут установить памятник | Есть ли такие | Адрес, номер телефона организации | Дата заполнения анкеты | Данные человека , заполнившего анкету | Домашний адрес, телефон | Документы, которые были использованы | Данные о других использованных источниках | Посещалось ли ММЗ при заполнении анкеты | Брались ли интервью при заполнении анкеты | Кто интервьюировался, дата и места проведения интервью | Количество погибших | Количество погибших по данным Круглова | ||
// | =$oPage->aPage[$i]["WitnessesR"] | //=$oPage->aPage[$i]["WitnessesAddressR"] | ?>
Code | Region | District | City/Village | The MJB location | MJB without name | Registrated MJB | The MJB is marked by the sign, tombstone, monument | MJB Coordinates | MJB appearance description | The date of destruction | Brief history of event | Additional sources of tragedy event | Numbers of military units who shoot Jews | Organization's name | Organization , that will establish monument on MJB place | Есть ли такие | Address,phone and name chief of organization | Date of filling questionnaire | Data of those who filled questionnaire | Home address , telephone number of that who filled form | Documents that were used | Information about other used documents | Visiting MJB for filling questionnaire | If interviews were taken during the filling passport | Who was interviewed, the date and the place | Amount of which has lost | Amount of which has lost on Kruglov data | ||
// | =$oPage->aPage[$i]["Witnesses"] | //=$oPage->aPage[$i]["WitnessesAddress"] | ?>
Всего по Вашему запросу найдено записей на страницах |
switch($dsource) { case '0': draw_tbl0($oPage); break; case '1': draw_tbl1($oPage); break; case '2': draw_tbl2_russian($oPage); break; case '3': draw_tbl2_english($oPage); break; case '9': draw_tbl0_root($oPage); break; //case '2': draw_tbl2($oPage); break; } ?> |