commit b5f99417888f61772a36dfdfe534af6a2d809400 Author: admin Date: Tue Mar 29 21:51:22 2011 +0400 Initial commit diff --git a/php/bin/parse_artist.php b/php/bin/parse_artist.php new file mode 100755 index 0000000..2733ee5 --- /dev/null +++ b/php/bin/parse_artist.php @@ -0,0 +1,4 @@ +#!/usr/bin/php +'search', + 'q' => urlencode($this->_query) +)) +*****************************************************************/ + +/** + * Класс для работы с удаленными файлами + * Реализован через библиотеку cURL + * + * @package classes + * @author chez + **/ +class RemoteFile { + + private static $_timeout = 5; // Таймаут ответа от сервера + private static $_headers = array(); // Заголовки для отправки на сервер + + /** + * Отправка запроса и получение ответа от сервера + * Умеет возвращать текст ответа или заголовки + * + * @param string $url URL запроса + * @param bool $headers Флаг: возвращать заголовки, а не текст + * @param array $post_params Массив POST-параметров, если установлен, то метод меняется на POST + * @return string Ответ от сервера + * @author chez + **/ + private static function _exec($url, $headers = false, $post_params = array()) { + if (count($post_params) > 0) { + $p = ''; + foreach ($post_params as $key => $val) { + $p .= '&'. $key .'='. $val; + } + $post_params = substr($p, 1); + } + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_HTTPHEADER, self::$_headers); + if ($headers) { + curl_setopt($ch, CURLOPT_HEADER, 1); + curl_setopt($ch, CURLOPT_NOBODY, 1); + } + if (is_string($post_params)) { + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, $post_params); + } + curl_setopt($ch, CURLOPT_VERBOSE, 1); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, self::$_timeout); + $r = curl_exec($ch); + curl_close($ch); + return $r; + } + + /** + * Получение HTTP-заголовков ответа от сервера + * + * @param string $url URL запроса + * @param array $post_params Массив POST-параметров, если установлен, то метод меняется на POST + * @return array Распарсеный массив заголовков + * @author chez + **/ + public static function getHeaders($url, $post_params = array()) { + $headers = explode("\r\n", self::_exec($url, true)); + $headers_array = array(); + + while(list($i, $header) = each($headers)) { + if (substr($header, 0, 5) == 'HTTP/') { + $header = explode(' ', $header); + $headers_array['http'] = $header[1]; + } elseif ($header != '') { + preg_match('/^([a-z0-9\-]*):\s(.*)$/Ui', $header, $m); + $headers_array[strtolower(str_replace('-', '_', $m[1]))] = $m[2]; + } + } + + return $headers_array; + } + + /** + * Получение ответа от сервера + * + * @param string $url URL запроса + * @param array $post_params Массив POST-параметров, если установлен, то метод меняется на POST + * @return string Тело ответа от сервера + * @author chez + **/ + public static function getData($url, $post_params = array()) { + return self::_exec($url, false, $post_params); + } + + /** + * Запись заголовков, которые будет отправлены вместе с запросом + * + * @param array $headers Индексный массив заголовков + * @return void + * @author chez + **/ + public static function setHeaders($headers) { + self::$_headers = $headers; + } +} \ No newline at end of file diff --git a/php/classes/TrackWeight.class.php b/php/classes/TrackWeight.class.php new file mode 100644 index 0000000..357fb61 --- /dev/null +++ b/php/classes/TrackWeight.class.php @@ -0,0 +1,99 @@ +setTrackData('Blondie', 'Call Me', 210); +$weight_calc->setFiles($files); // Файлы, полученные от парсера +$weight_calc->calculateWeight(); +$files = $weight_calc->getFiles(); +*****************************************************************/ + +/** + * Класс посчета веса файла (коэфициента, определяющего релевантность) + * + * @package classes + * @author chez + **/ +class TrackWeight { + + private $_artist; // Имя исполнителя + private $_track; // Название трека + private $_duration; // Длительность трека в секундах + + private $_files; // Массив файлов для сравнения + + /** + * Задает параметры оригинального трека + * + * @param string $artist Имя исполнителя + * @param string $track Запрос + * @param int $duration Длительность трека в секундах + * @return void + * @author chez + **/ + public function setTrackData($artist, $track, $duration) { + $this->_artist = $artist; + $this->_track = $track; + $this->_duration = $duration; + } + + /** + * Задает массив файлов для сравнения + * + * @param array $files Массив файлов для сравнения + * @return void + * @author chez + **/ + public function setFiles($files) { + $this->_files = $files; + } + + /** + * Возвращает файлы с проставленным весом + * + * @return array $files Массив файлов + * @author chez + **/ + public function getFiles() { + return $this->_files; + } + + /** + * Рассчитывает вес для каждого файла + * + * @return void + * @author chez + **/ + public function calculateWeight() { + foreach ($this->_files as $i => $file) { + $weight = 0; + + if ($file['artist'] == $this->_artist) { + $weight += 10; + } elseif (strpos($file['artist'], $this->_artist) !== false) { + $weight += 5; + } elseif (strpos($file['track'], $this->_artist) !== false) { + $weight += 4; + } + + if ($file['track'] == $this->_track) { + $weight += 10; + } elseif (strpos($file['track'], $this->_track) !== false) { + $weight += 5; + } + + if ($file['duration'] == $this->_duration) { + $weight += 10; + } else { + $delta = abs($file['duration'] - $this->_duration); + if ($delta < 5) { + $weight += (5 - $delta); + } + } + + $this->_files[$i]['weight'] = $weight; + } + } +} \ No newline at end of file diff --git a/php/classes/VkontakeMP3.class.php b/php/classes/VkontakeMP3.class.php new file mode 100644 index 0000000..04a200c --- /dev/null +++ b/php/classes/VkontakeMP3.class.php @@ -0,0 +1,108 @@ + $br && ! $found_br) { + $delta = self::$_bitrates[$i] - $br; + $br_delta = self::$_bitrates[$i] - self::$_bitrates[$i-1]; + if (round($br_delta / 3) > $delta) { + $found_br = self::$_bitrates[$i]; + } else { + $found_br = self::$_bitrates[$i-1]; + } + } elseif ($i == count(self::$_bitrates) - 1 && self::$_bitrates[$i] < $br && ! $found_br) { + $delta = $br - self::$_bitrates[$i]; + if ($delta < 32) { + $found_br = self::$_bitrates[$i]; + } else { + $found_br = $br; + } + } + } + return $found_br; + } + + /** + * Проверяет файлы, рассчитывает битрейт и релевантность + * + * @param array $files Массив файлов для обработки + * @return array Обработанный массив файлов + * @author chez + **/ + public static function check($files) { + + $m = new Match(); + $m->setTrackData('Blondie', 'Call Me', 210); + $m->setFiles($files); + $m->calculateWeight(); + $files = $m->getFiles(); + + uasort($files, function($a, $b){ + return $a['weight'] < $b['weight']; + }); + + foreach ($files as $i => $file) { + $files[$i]['length'] = self::convertDuration($file['duration']); + $files[$i]['bitrate'] = self::calculateBitrate($file['size'], $files[$i]['length']); + } + return $files; + } + + /** + * Чистит строку для максимально точного сравнения + * + * @param string $str Необработанная строка + * @return string Чистая строка + * @author chez + **/ + public static function prepareQuery($str) { + $str = trim($str); + while(strpos($str, ' ') !== false) { + $str = str_replace(' ', ' ', $str); + } + return $str; + } + + /** + * Преобразует длину из формата мм:сс в ссс + * + * @param string $duration Читабельная длина + * @return int Длина в секундах + * @author chez + **/ + public static function convertDuration($duration) { + + } +} \ No newline at end of file diff --git a/php/classes/Vkontakte.class.php b/php/classes/Vkontakte.class.php new file mode 100644 index 0000000..15eac69 --- /dev/null +++ b/php/classes/Vkontakte.class.php @@ -0,0 +1,127 @@ +parse('Blondie - Call Me'); +$files = $weight_calc->getFiles(); +*****************************************************************/ + +/** + * Класс парсинга вконтактика + * + * @package classes + * @author chez + **/ +class Vkontakte { + + private $_cookies; // Куки, ассоциативный массив + private $_query; // Запрос, plain text + + private $_html; // HTML, полученый от вконтактика + private $_files; // Распарсеные массивы с информацией о файле + + /** + * Оболочка парсера + * + * @param string $q Запрос + * @return array Массив с файлами + * @author chez + **/ + public function parse($q) { + $this->_query = $q; + $this->auth(); + $cookie = array(); + foreach ($this->_cookies as $key => $val) { + $cookie[] = $key .'='. $val; + } + RemoteFile::setHeaders(array( + 'Cookie: '. implode('; ', $cookie), + 'Referer: http://vkontakte.ru/audio?album_id=0', + 'X-Requested-With: XMLHttpRequest', + 'Origin: http://vkontakte.ru', + 'Content-Type: application/x-www-form-urlencoded', + 'User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16', + 'Connection: close' + )); + $this->setHtml(RemoteFile::getData('http://vkontakte.ru/audio', array( + 'act' =>'search', + 'al' =>'1', + 'gid' =>'0', + 'id' =>'5728795', + 'offset' =>'0', + 'q' => urlencode($this->_query), + 'sort' =>'2' + ))); + $this->parseHtml(); + return $this->_files; + } + + /** + * Пишет полученый html в член объекта + * + * @param string $html HTML + * @return void + * @author chez + **/ + public function setHtml($html) { + $this->_html = $html; + } + + /** + * Возвращает хранимый html + * + * @return string HTML + * @author chez + **/ + public function getHtml() { + return $this->_html; + } + + /** + * Возвращает хранимый массив файлов + * + * @return array Список файлов + * @author chez + **/ + public function getFiles() { + return $this->_files; + } + + /** + * Проводит авторизацию на вконтактике и получает куки + * Пока костыль, потом нужно будет переписать + * + * @return array Ассоциативный массив с куками + * @author chez + **/ + private function auth() { + $this->_cookies = array( + 'remixchk' => 5, + 'remixsid' => 'c68c4362f62f218a25802bae87201d1bc46fadd0b5c64f71678430c9b63b' + ); + } + + /** + * Разбирает HTML, полученый от вконтактика + * + * @return array Список файлов + * @author chez + **/ + public function parseHtml() { + preg_match_all('/(.*)<\/tr>/Usi', $this->_html, $m); + $files = array(); + foreach ($m[0] as $res) { + preg_match('/(.*)<\/div>.*(.*)<\/a>.*\s-\s(.*)<\/div>/Usi', $res, $m1); + $duration = explode(':', $m1[3]); + $files[] = array( + 'url' => $m1[1], + 'duration' => $duration[0] * 60 + $duration[1], + 'artist' => strip_tags($m1[4]), + 'track' => strip_tags($m1[5]) + ); + } + $this->_files = $files; + } +} \ No newline at end of file diff --git a/php/debug.php b/php/debug.php new file mode 100644 index 0000000..8c0b144 --- /dev/null +++ b/php/debug.php @@ -0,0 +1,15 @@ +setHtml(file_get_contents('dump/html/'. $q .'.html')); +$p->parseHtml(); +$f = $p->getFiles(); + +echo '
';
+print_r($f);
\ No newline at end of file
diff --git a/php/dump/data/Blondie - Call Me.data b/php/dump/data/Blondie - Call Me.data
new file mode 100755
index 0000000..440f62d
--- /dev/null
+++ b/php/dump/data/Blondie - Call Me.data	
@@ -0,0 +1 @@
+a:100:{i:0;a:6:{s:3:"url";s:59:"http://cs4721.vkontakte.ru/u60218145/audio/8f8dac2c5fdf.mp3";s:8:"duration";i:208;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"8340854";s:7:"bitrate";i:320;}i:1;a:6:{s:3:"url";s:58:"http://cs4273.vkontakte.ru/u2618345/audio/bc17124e07df.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"5958597";s:7:"bitrate";i:224;}i:2;a:6:{s:3:"url";s:59:"http://cs4651.vkontakte.ru/u26636445/audio/7f4ad25216f4.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"6813782";s:7:"bitrate";i:256;}i:3;a:6:{s:3:"url";s:59:"http://cs4260.vkontakte.ru/u28642345/audio/71b733d072d3.mp3";s:8:"duration";i:197;s:6:"artist";s:14:"In This Moment";s:5:"track";s:37:"Call Me (Blondie Cover) (Bonus Track)";s:4:"size";s:7:"5654726";s:7:"bitrate";i:224;}i:4;a:6:{s:3:"url";s:59:"http://cs4646.vkontakte.ru/u43940845/audio/65f015f47a7b.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"BLONDIE";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"8500296";s:7:"bitrate";i:320;}i:5;a:6:{s:3:"url";s:58:"http://cs4703.vkontakte.ru/u1632611/audio/7e67aa6cef2a.mp3";s:8:"duration";i:215;s:6:"artist";s:7:"CjR Mix";s:5:"track";s:42:"Call Me Uprising (Blondie vs, Muse mashup)";s:4:"size";s:7:"8819410";s:7:"bitrate";i:0;}i:6;a:6:{s:3:"url";s:58:"http://cs4517.vkontakte.ru/u3902945/audio/1e38f0d3db8c.mp3";s:8:"duration";i:215;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call me";s:4:"size";s:7:"4305536";s:7:"bitrate";i:160;}i:7;a:6:{s:3:"url";s:59:"http://cs4510.vkontakte.ru/u28642345/audio/46218044bc07.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"8493056";s:7:"bitrate";i:320;}i:8;a:6:{s:3:"url";s:59:"http://cs4236.vkontakte.ru/u40744045/audio/d7eca3e31a0f.mp3";s:8:"duration";i:208;s:6:"artist";s:11:"025 Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"6673263";s:7:"bitrate";i:256;}i:9;a:6:{s:3:"url";s:57:"http://cs1544.vkontakte.ru/u186572/audio/2742e6223459.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"6813696";s:7:"bitrate";i:256;}i:10;a:6:{s:3:"url";s:58:"http://cs4626.vkontakte.ru/u7473603/audio/ce38f4b2db6a.mp3";s:8:"duration";i:250;s:6:"artist";s:7:"blondie";s:5:"track";s:35:"call me (the messiah dubstep remix)";s:4:"size";s:8:"10375872";s:7:"bitrate";i:320;}i:11;a:6:{s:3:"url";s:59:"http://cs5008.vkontakte.ru/u66844845/audio/6b20dd53f03b.mp3";s:8:"duration";i:211;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"5106643";s:7:"bitrate";i:192;}i:12;a:6:{s:3:"url";s:59:"http://cs4825.vkontakte.ru/u17709487/audio/c6b014c8e336.mp3";s:8:"duration";i:210;s:6:"artist";s:7:"Blondie";s:5:"track";s:31:"Call Me (2001 Digital Remaster)";s:4:"size";s:7:"5683032";s:7:"bitrate";i:192;}i:13;a:6:{s:3:"url";s:58:"http://cs4401.vkontakte.ru/u1723445/audio/59587e12e446.mp3";s:8:"duration";i:215;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call me";s:4:"size";s:7:"4307072";s:7:"bitrate";i:160;}i:14;a:6:{s:3:"url";s:56:"http://cs4760.vkontakte.ru/u72653/audio/ce8151e1755d.mp3";s:8:"duration";i:197;s:6:"artist";s:14:"In This Moment";s:5:"track";s:37:"Call Me (Blondie Cover) (Bonus Track)";s:4:"size";s:7:"3160914";s:7:"bitrate";i:128;}i:15;a:6:{s:3:"url";s:58:"http://cs4654.vkontakte.ru/u2670319/audio/443e613d37ef.mp3";s:8:"duration";i:486;s:6:"artist";s:7:"Blondie";s:5:"track";s:81:"Call Me (American Gigolo Original Soundtrack - Main Theme, Original Long Version)";s:4:"size";s:8:"19464640";s:7:"bitrate";i:320;}i:16;a:6:{s:3:"url";s:59:"http://cs4355.vkontakte.ru/u40631589/audio/5bf730779c02.mp3";s:8:"duration";i:486;s:6:"artist";s:7:"Blondie";s:5:"track";s:31:"Call Me (Original Long Version)";s:4:"size";s:7:"5841024";s:7:"bitrate";i:96;}i:17;a:6:{s:3:"url";s:58:"http://cs4488.vkontakte.ru/u5094717/audio/3b97de6cf99d.mp3";s:8:"duration";i:207;s:6:"artist";s:15:"Franz Ferdinand";s:5:"track";s:23:"Call Me (Blondie cover)";s:4:"size";s:7:"8349529";s:7:"bitrate";i:320;}i:18;a:6:{s:3:"url";s:59:"http://cs4784.vkontakte.ru/u38304676/audio/0abaa4c419ee.mp3";s:8:"duration";i:198;s:6:"artist";s:14:"In This Moment";s:5:"track";s:23:"Call Me (Blondie Cover)";s:4:"size";s:7:"6422102";s:7:"bitrate";i:256;}i:19;a:6:{s:3:"url";s:57:"http://cs509.vkontakte.ru/u2207059/audio/928d899a47ec.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"6106565";s:7:"bitrate";i:224;}i:20;a:6:{s:3:"url";s:58:"http://cs4248.vkontakte.ru/u1299169/audio/82a7c7ce8c61.mp3";s:8:"duration";i:180;s:6:"artist";s:36:"Nouvelle Vague feat Skye (Morcheeba)";s:5:"track";s:23:"Call Me (Blondie cover)";s:4:"size";s:7:"4413850";s:7:"bitrate";i:192;}i:21;a:6:{s:3:"url";s:58:"http://cs4613.vkontakte.ru/u2249636/audio/a6e72a598e4b.mp3";s:8:"duration";i:190;s:6:"artist";s:27:"Skye Edwards (ex-Morcheeba)";s:5:"track";s:24:"Call Me  (Blondie cover)";s:4:"size";s:7:"7619652";s:7:"bitrate";i:320;}i:22;a:6:{s:3:"url";s:59:"http://cs4615.vkontakte.ru/u40741691/audio/14c772a92f56.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"5149296";s:7:"bitrate";i:192;}i:23;a:6:{s:3:"url";s:59:"http://cs4259.vkontakte.ru/u34859009/audio/a4ab54148f9d.mp3";s:8:"duration";i:146;s:6:"artist";s:15:"Dope Stars Inc.";s:5:"track";s:29:"Call Me (Blondie Cover, Demo)";s:4:"size";s:7:"4685824";s:7:"bitrate";i:256;}i:24;a:6:{s:3:"url";s:58:"http://cs4619.vkontakte.ru/u3573779/audio/d1b37d29e5c7.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"3406589";s:7:"bitrate";i:128;}i:25;a:6:{s:3:"url";s:57:"http://cs4490.vkontakte.ru/u374519/audio/be4381aa8381.mp3";s:8:"duration";i:209;s:6:"artist";s:13:"Lazy Bitches ";s:5:"track";s:23:"Call Me (Blondie cover)";s:4:"size";s:7:"3356256";s:7:"bitrate";i:128;}i:26;a:6:{s:3:"url";s:58:"http://cs4824.vkontakte.ru/u2713270/audio/d01b0730a395.mp3";s:8:"duration";i:218;s:6:"artist";s:34:"Samantha Fox & Sabrina Salerno";s:5:"track";s:23:"Call Me (Blondie Cover)";s:4:"size";s:7:"8741804";s:7:"bitrate";i:320;}i:27;a:6:{s:3:"url";s:59:"http://cs4781.vkontakte.ru/u20803744/audio/07642267cfc7.mp3";s:8:"duration";i:250;s:6:"artist";s:7:"Blondie";s:5:"track";s:35:"Call Me (The Messiah Dubstep Remix)";s:4:"size";s:8:"10375872";s:7:"bitrate";i:320;}i:28;a:6:{s:3:"url";s:59:"http://cs4531.vkontakte.ru/u24199345/audio/f3b7c9d03392.mp3";s:8:"duration";i:211;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"5084083";s:7:"bitrate";i:192;}i:29;a:6:{s:3:"url";s:58:"http://cs4724.vkontakte.ru/u3981949/audio/e5a5767bab6e.mp3";s:8:"duration";i:250;s:6:"artist";s:26:"Blondie (TheMessiah Remix)";s:5:"track";s:7:"Call Me";s:4:"size";s:8:"10146596";s:7:"bitrate";i:320;}i:30;a:6:{s:3:"url";s:59:"http://cs4959.vkontakte.ru/u34845452/audio/9563a9a1d106.mp3";s:8:"duration";i:432;s:6:"artist";s:32:"Samantha Fox vs. Sabrina Solerno";s:5:"track";s:72:"Call Me (Andrea T. Mendoza vs. Tibet Yes Club Mix) (Blondie Cover) (NEW)";s:4:"size";s:8:"17323500";s:7:"bitrate";i:320;}i:31;a:6:{s:3:"url";s:59:"http://cs4700.vkontakte.ru/u13228875/audio/47c249b1b109.mp3";s:8:"duration";i:250;s:6:"artist";s:7:"Blondie";s:5:"track";s:35:"Call Me (The Messiah Dubstep Remix)";s:4:"size";s:8:"10375872";s:7:"bitrate";i:320;}i:32;a:6:{s:3:"url";s:58:"http://cs1117.vkontakte.ru/u4499289/audio/c8bc4e1e9cf8.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:36:"Call Me {Theme from American Gigolo}";s:4:"size";s:7:"5952786";s:7:"bitrate";i:224;}i:33;a:6:{s:3:"url";s:59:"http://cs4961.vkontakte.ru/u32180173/audio/6fb0372af7c2.mp3";s:8:"duration";i:208;s:6:"artist";s:7:"Blondie";s:5:"track";s:22:"Call Me  (Potiche OST)";s:4:"size";s:7:"8340854";s:7:"bitrate";i:320;}i:34;a:6:{s:3:"url";s:58:"http://cs4662.vkontakte.ru/u7103272/audio/026a894f158c.mp3";s:8:"duration";i:146;s:6:"artist";s:15:"Dope Stars Inc.";s:5:"track";s:29:"Call Me (Blondie Cover, Demo)";s:4:"size";s:7:"4685824";s:7:"bitrate";i:256;}i:35;a:6:{s:3:"url";s:58:"http://cs4599.vkontakte.ru/u3497529/audio/58e9d8dedb70.mp3";s:8:"duration";i:206;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"6617904";s:7:"bitrate";i:256;}i:36;a:6:{s:3:"url";s:59:"http://cs4766.vkontakte.ru/u52488231/audio/31a39aff10b5.mp3";s:8:"duration";i:183;s:6:"artist";s:20:"Hollywood, Mon Amour";s:5:"track";s:53:"Call Me (ft. Skye of Morcheeba) [original by Blondie]";s:4:"size";s:7:"5873890";s:7:"bitrate";i:256;}i:37;a:6:{s:3:"url";s:60:"http://cs4903.vkontakte.ru/u101856723/audio/5bbc3665ff04.mp3";s:8:"duration";i:211;s:6:"artist";s:7:"Blondie";s:5:"track";s:32:"Call Me (Forthnet TV Spot Theme)";s:4:"size";s:7:"6161261";s:7:"bitrate";i:224;}i:38;a:6:{s:3:"url";s:58:"http://cs4652.vkontakte.ru/u3554285/audio/206766d3a134.mp3";s:8:"duration";i:215;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call me";s:4:"size";s:7:"4305536";s:7:"bitrate";i:160;}i:39;a:6:{s:3:"url";s:57:"http://cs4764.vkontakte.ru/u311803/audio/ab21bd933896.mp3";s:8:"duration";i:197;s:6:"artist";s:14:"In This Moment";s:5:"track";s:37:"Call Me (Blondie Cover) (Bonus Track)";s:4:"size";s:7:"5654726";s:7:"bitrate";i:224;}i:40;a:6:{s:3:"url";s:59:"http://cs4421.vkontakte.ru/u59949626/audio/a34a72563135.mp3";s:8:"duration";i:215;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call me";s:4:"size";s:7:"4305536";s:7:"bitrate";i:160;}i:41;a:6:{s:3:"url";s:58:"http://cs1748.vkontakte.ru/u5806290/audio/85012e8ee7db.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"3406589";s:7:"bitrate";i:128;}i:42;a:6:{s:3:"url";s:58:"http://cs4518.vkontakte.ru/u1087485/audio/6097ecc91c92.mp3";s:8:"duration";i:183;s:6:"artist";s:20:"Hollywood, Mon Amour";s:5:"track";s:53:"Call Me (ft. Skye of Morcheeba) [original by Blondie]";s:4:"size";s:7:"5873762";s:7:"bitrate";i:256;}i:43;a:6:{s:3:"url";s:59:"http://cs4823.vkontakte.ru/u23025203/audio/2e216b99213d.mp3";s:8:"duration";i:162;s:6:"artist";s:24:"VS 2010 - Blondie / Muse";s:5:"track";s:18:"Call Me / Uprising";s:4:"size";s:7:"6662265";s:7:"bitrate";i:320;}i:44;a:6:{s:3:"url";s:57:"http://cs1749.vkontakte.ru/u165697/audio/67bdd2595e38.mp3";s:8:"duration";i:190;s:6:"artist";s:27:"Skye Edwards [ex Morcheeba]";s:5:"track";s:23:"Call Me (Blondie cover)";s:4:"size";s:7:"7619780";s:7:"bitrate";i:320;}i:45;a:6:{s:3:"url";s:58:"http://cs4601.vkontakte.ru/u7738480/audio/feea8b71ed41.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"5897913";s:7:"bitrate";i:224;}i:46;a:6:{s:3:"url";s:58:"http://cs4406.vkontakte.ru/u3301726/audio/f8199be0edcf.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"3395189";s:7:"bitrate";i:128;}i:47;a:6:{s:3:"url";s:59:"http://cs5007.vkontakte.ru/u93488249/audio/df9b1b440784.mp3";s:8:"duration";i:211;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"5085184";s:7:"bitrate";i:192;}i:48;a:6:{s:3:"url";s:58:"http://cs4716.vkontakte.ru/u3664972/audio/733568f06d73.mp3";s:8:"duration";i:215;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call me";s:4:"size";s:7:"4307072";s:7:"bitrate";i:160;}i:49;a:6:{s:3:"url";s:59:"http://cs4254.vkontakte.ru/u30440050/audio/15741302cc29.mp3";s:8:"duration";i:207;s:6:"artist";s:15:"Franz Ferdinand";s:5:"track";s:23:"Call Me (Blondie Cover)";s:4:"size";s:7:"8349529";s:7:"bitrate";i:320;}i:50;a:6:{s:3:"url";s:58:"http://cs4904.vkontakte.ru/u2317797/audio/7a7601839f3e.mp3";s:8:"duration";i:483;s:6:"artist";s:7:"Blondie";s:5:"track";s:49:"Call Me (Original 12 Mix) (1999 Digital Remaster)";s:4:"size";s:8:"13284545";s:7:"bitrate";i:224;}i:51;a:6:{s:3:"url";s:59:"http://cs4590.vkontakte.ru/u31860450/audio/fa109a68dac4.mp3";s:8:"duration";i:214;s:6:"artist";s:24:"Samantha Fox vs. Sabrina";s:5:"track";s:66:"Call Me (Blondie Cover, Andrea T. Mendoza Vs. Tibet Yes Radio Mix)";s:4:"size";s:7:"6870557";s:7:"bitrate";i:256;}i:52;a:6:{s:3:"url";s:58:"http://cs4829.vkontakte.ru/u3721171/audio/9dba1a3ba980.mp3";s:8:"duration";i:208;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"8340854";s:7:"bitrate";i:320;}i:53;a:6:{s:3:"url";s:59:"http://cs5074.vkontakte.ru/u41150302/audio/955c3951b660.mp3";s:8:"duration";i:211;s:6:"artist";s:11:"The 69 Eyes";s:5:"track";s:23:"Call Me (Blondie cover)";s:4:"size";s:7:"8450048";s:7:"bitrate";i:320;}i:54;a:6:{s:3:"url";s:59:"http://cs4893.vkontakte.ru/u38049267/audio/60763ed55210.mp3";s:8:"duration";i:190;s:6:"artist";s:12:"Skye Edwards";s:5:"track";s:24:"Call Me  (Blondie cover)";s:4:"size";s:7:"7619652";s:7:"bitrate";i:320;}i:55;a:6:{s:3:"url";s:57:"http://cs1636.vkontakte.ru/u320541/audio/2effb2029537.mp3";s:8:"duration";i:226;s:6:"artist";s:4:"Porn";s:5:"track";s:23:"Call Me (Blondie cover)";s:4:"size";s:7:"3625154";s:7:"bitrate";i:128;}i:56;a:6:{s:3:"url";s:58:"http://cs4430.vkontakte.ru/u1965484/audio/78447960272a.mp3";s:8:"duration";i:198;s:6:"artist";s:14:"In This Moment";s:5:"track";s:23:"Call Me (Blondie Cover)";s:4:"size";s:7:"6339456";s:7:"bitrate";i:256;}i:57;a:6:{s:3:"url";s:59:"http://cs4884.vkontakte.ru/u85576103/audio/3517c32483eb.mp3";s:8:"duration";i:162;s:6:"artist";s:9:"VSFS 2010";s:5:"track";s:43:"Finale (Blondie - Call Me, Muse - Uprising)";s:4:"size";s:7:"6662265";s:7:"bitrate";i:320;}i:58;a:6:{s:3:"url";s:59:"http://cs5024.vkontakte.ru/u13368090/audio/4f891f814718.mp3";s:8:"duration";i:206;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"3309817";s:7:"bitrate";i:128;}i:59;a:6:{s:3:"url";s:59:"http://cs5021.vkontakte.ru/u60646299/audio/2771c7fcdaa2.mp3";s:8:"duration";i:214;s:6:"artist";s:24:"Samantha Fox vs. Sabrina";s:5:"track";s:36:"Call Me ( Radio Mix - Blondie Cover)";s:4:"size";s:7:"6870557";s:7:"bitrate";i:256;}i:60;a:6:{s:3:"url";s:57:"http://cs4883.vkontakte.ru/u960482/audio/8cd5f8b44a8e.mp3";s:8:"duration";i:190;s:6:"artist";s:12:"Skye Edwards";s:5:"track";s:24:"Call Me  (Blondie cover)";s:4:"size";s:7:"7619652";s:7:"bitrate";i:320;}i:61;a:6:{s:3:"url";s:58:"http://cs4703.vkontakte.ru/u6149352/audio/6a7794f2306d.mp3";s:8:"duration";i:251;s:6:"artist";s:7:"Blondie";s:5:"track";s:33:"Call Me (The Messiah Dubstep rmx)";s:4:"size";s:7:"8038223";s:7:"bitrate";i:256;}i:62;a:6:{s:3:"url";s:58:"http://cs4253.vkontakte.ru/u3011879/audio/a8094255d0dd.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"5897913";s:7:"bitrate";i:224;}i:63;a:6:{s:3:"url";s:59:"http://cs4590.vkontakte.ru/u31860450/audio/2727e56cac7e.mp3";s:8:"duration";i:190;s:6:"artist";s:27:"Skye Edwards (ex-Morcheeba)";s:5:"track";s:23:"Call Me (Blondie Cover)";s:4:"size";s:7:"7619652";s:7:"bitrate";i:320;}i:64;a:6:{s:3:"url";s:59:"http://cs4594.vkontakte.ru/u33670277/audio/17cbee770ad2.mp3";s:8:"duration";i:250;s:6:"artist";s:7:"Blondie";s:5:"track";s:28:"Call Me  (The Messiah Remix)";s:4:"size";s:8:"10146596";s:7:"bitrate";i:320;}i:65;a:6:{s:3:"url";s:59:"http://cs5016.vkontakte.ru/u16097939/audio/04a510876fb7.mp3";s:8:"duration";i:198;s:6:"artist";s:14:"In This Moment";s:5:"track";s:23:"Call Me (Blondie Cover)";s:4:"size";s:7:"6339456";s:7:"bitrate";i:256;}i:66;a:6:{s:3:"url";s:58:"http://cs4400.vkontakte.ru/u5584439/audio/c0ecd9b49cf2.mp3";s:8:"duration";i:217;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"6247423";s:7:"bitrate";i:224;}i:67;a:6:{s:3:"url";s:60:"http://cs4760.vkontakte.ru/u100730980/audio/8c5a370ceaa4.mp3";s:8:"duration";i:486;s:6:"artist";s:7:"Blondie";s:5:"track";s:44:"Call Me (Original Long Version) [*][Version]";s:4:"size";s:8:"19464640";s:7:"bitrate";i:320;}i:68;a:6:{s:3:"url";s:58:"http://cs5014.vkontakte.ru/u1722874/audio/d9e3570c4878.mp3";s:8:"duration";i:211;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call me";s:4:"size";s:7:"6119843";s:7:"bitrate";i:224;}i:69;a:6:{s:3:"url";s:59:"http://cs4612.vkontakte.ru/u69295711/audio/6212a14823a1.mp3";s:8:"duration";i:198;s:6:"artist";s:14:"In This Moment";s:5:"track";s:23:"Call Me (Blondie Cover)";s:4:"size";s:7:"7963266";s:7:"bitrate";i:320;}i:70;a:6:{s:3:"url";s:59:"http://cs4407.vkontakte.ru/u15288140/audio/36efeb048336.mp3";s:8:"duration";i:197;s:6:"artist";s:14:"In This Moment";s:5:"track";s:37:"Call Me (Blondie Cover) (Bonus Track)";s:4:"size";s:7:"5654726";s:7:"bitrate";i:224;}i:71;a:6:{s:3:"url";s:58:"http://cs4886.vkontakte.ru/u1840867/audio/3cb85707ed4a.mp3";s:8:"duration";i:211;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"8612961";s:7:"bitrate";i:320;}i:72;a:6:{s:3:"url";s:60:"http://cs4953.vkontakte.ru/u109315939/audio/ec212210fdd6.mp3";s:8:"duration";i:198;s:6:"artist";s:14:"In This Moment";s:5:"track";s:23:"Call Me (Blondie Cover)";s:4:"size";s:7:"6339456";s:7:"bitrate";i:256;}i:73;a:6:{s:3:"url";s:58:"http://cs4904.vkontakte.ru/u1072890/audio/dc8f1274bf8d.mp3";s:8:"duration";i:211;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"8476033";s:7:"bitrate";i:320;}i:74;a:6:{s:3:"url";s:58:"http://cs4766.vkontakte.ru/u1030263/audio/3f43eb42beff.mp3";s:8:"duration";i:73;s:6:"artist";s:35:"Call Me Blondie cover by Cadaveria ";s:5:"track";s:23:"   =)";s:4:"size";s:7:"1168851";s:7:"bitrate";i:128;}i:75;a:6:{s:3:"url";s:60:"http://cs5066.vkontakte.ru/u105418284/audio/825b495e4699.mp3";s:8:"duration";i:486;s:6:"artist";s:7:"Blondie";s:5:"track";s:44:"Call Me (Original Long Version) [*][Version]";s:4:"size";s:8:"19464640";s:7:"bitrate";i:320;}i:76;a:6:{s:3:"url";s:58:"http://cs4892.vkontakte.ru/u1258174/audio/7a25eb8acfdb.mp3";s:8:"duration";i:217;s:6:"artist";s:7:"Blondie";s:5:"track";s:18:"Call Me()";s:4:"size";s:7:"3530216";s:7:"bitrate";i:128;}i:77;a:6:{s:3:"url";s:57:"http://cs4242.vkontakte.ru/u181884/audio/619335a3ed7c.mp3";s:8:"duration";i:146;s:6:"artist";s:14:"Dope Stars Inc";s:5:"track";s:89:"Call me(Blondie cover, demo)  !    ,  !";s:4:"size";s:7:"4685824";s:7:"bitrate";i:256;}i:78;a:6:{s:3:"url";s:58:"http://cs4201.vkontakte.ru/u2774385/audio/832778550f21.mp3";s:8:"duration";i:197;s:6:"artist";s:32:"Hard covers of fucking pops part";s:5:"track";s:23:"Call Me (Blondie cover)";s:4:"size";s:7:"3162240";s:7:"bitrate";i:128;}i:79;a:6:{s:3:"url";s:57:"http://cs1086.vkontakte.ru/u661673/audio/faae5342c64e.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"5897913";s:7:"bitrate";i:224;}i:80;a:6:{s:3:"url";s:59:"http://cs4611.vkontakte.ru/u41817259/audio/51f79175baad.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call me";s:4:"size";s:7:"8506816";s:7:"bitrate";i:320;}i:81;a:6:{s:3:"url";s:60:"http://cs4999.vkontakte.ru/u102467630/audio/8ca3e995c039.mp3";s:8:"duration";i:198;s:6:"artist";s:21:"In This Moment (2009)";s:5:"track";s:23:"Call Me (Blondie Cover)";s:4:"size";s:7:"6422102";s:7:"bitrate";i:256;}i:82;a:6:{s:3:"url";s:59:"http://cs4705.vkontakte.ru/u93100882/audio/387b022443eb.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"8510140";s:7:"bitrate";i:320;}i:83;a:6:{s:3:"url";s:59:"http://cs5057.vkontakte.ru/u36569260/audio/826eb7718b87.mp3";s:8:"duration";i:198;s:6:"artist";s:14:"In This Moment";s:5:"track";s:23:"Call Me (Blondie Cover)";s:4:"size";s:7:"6339456";s:7:"bitrate";i:256;}i:84;a:6:{s:3:"url";s:56:"http://cs5013.vkontakte.ru/u27444/audio/d502c609a445.mp3";s:8:"duration";i:213;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"8754800";s:7:"bitrate";i:320;}i:85;a:6:{s:3:"url";s:58:"http://cs4777.vkontakte.ru/u1447760/audio/f5c0ee3aca01.mp3";s:8:"duration";i:366;s:6:"artist";s:24:"Erick Morillo vs Blondie";s:5:"track";s:32:"Call Me (Christian Falero Remix)";s:4:"size";s:7:"8956617";s:7:"bitrate";i:192;}i:86;a:6:{s:3:"url";s:59:"http://cs4341.vkontakte.ru/u16722563/audio/e135ecd2a37a.mp3";s:8:"duration";i:204;s:6:"artist";s:15:"Franz Ferdinand";s:5:"track";s:23:"Call Me (Blondie Cover)";s:4:"size";s:7:"7513607";s:7:"bitrate";i:256;}i:87;a:6:{s:3:"url";s:58:"http://cs1753.vkontakte.ru/u2133012/audio/01ff6d622315.mp3";s:8:"duration";i:215;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call me";s:4:"size";s:7:"4305536";s:7:"bitrate";i:160;}i:88;a:6:{s:3:"url";s:59:"http://cs4875.vkontakte.ru/u83885465/audio/4b7b9198511b.mp3";s:8:"duration";i:208;s:6:"artist";s:7:"Blondie";s:5:"track";s:21:"Call Me( )";s:4:"size";s:7:"8344950";s:7:"bitrate";i:320;}i:89;a:6:{s:3:"url";s:59:"http://cs4757.vkontakte.ru/u53444680/audio/7a543ee7297a.mp3";s:8:"duration";i:215;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call me";s:4:"size";s:7:"4305536";s:7:"bitrate";i:160;}i:90;a:6:{s:3:"url";s:58:"http://cs4538.vkontakte.ru/u6197093/audio/aa16620ab85a.mp3";s:8:"duration";i:183;s:6:"artist";s:20:"Hollywood, Mon Amour";s:5:"track";s:53:"Call Me (ft. Skye of Morcheeba) [original by Blondie]";s:4:"size";s:7:"5873762";s:7:"bitrate";i:256;}i:91;a:6:{s:3:"url";s:58:"http://cs4239.vkontakte.ru/u9833462/audio/320cccd8a077.mp3";s:8:"duration";i:183;s:6:"artist";s:14:"Nouvelle Vague";s:5:"track";s:17:"Call me (Blondie)";s:4:"size";s:7:"5135552";s:7:"bitrate";i:224;}i:92;a:6:{s:3:"url";s:57:"http://cs4875.vkontakte.ru/u716241/audio/c00d9b822901.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"5953626";s:7:"bitrate";i:224;}i:93;a:6:{s:3:"url";s:58:"http://cs4715.vkontakte.ru/u3920093/audio/cef4887e3e14.mp3";s:8:"duration";i:190;s:6:"artist";s:12:"Skye Edwards";s:5:"track";s:24:"Call Me  (Blondie cover)";s:4:"size";s:7:"7619652";s:7:"bitrate";i:320;}i:94;a:6:{s:3:"url";s:56:"http://cs4628.vkontakte.ru/u28171/audio/681eb92289d5.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"8708506";s:7:"bitrate";i:320;}i:95;a:6:{s:3:"url";s:59:"http://cs4205.vkontakte.ru/u27325696/audio/15f6320a68b9.mp3";s:8:"duration";i:208;s:6:"artist";s:20:"Blondie/Debbie Harry";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"6677871";s:7:"bitrate";i:256;}i:96;a:6:{s:3:"url";s:59:"http://cs1703.vkontakte.ru/u20407927/audio/74f0dcdd903f.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"4242248";s:7:"bitrate";i:160;}i:97;a:6:{s:3:"url";s:59:"http://cs4590.vkontakte.ru/u31860450/audio/c2eae92a182e.mp3";s:8:"duration";i:250;s:6:"artist";s:7:"Blondie";s:5:"track";s:35:"Call Me (The Messiah Dubstep Remix)";s:4:"size";s:8:"10146596";s:7:"bitrate";i:320;}i:98;a:6:{s:3:"url";s:58:"http://cs4760.vkontakte.ru/u2606744/audio/58caafdaab55.mp3";s:8:"duration";i:215;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call me";s:4:"size";s:7:"4305536";s:7:"bitrate";i:160;}i:99;a:6:{s:3:"url";s:59:"http://cs5012.vkontakte.ru/u16526329/audio/27fe1597bf59.mp3";s:8:"duration";i:486;s:6:"artist";s:7:"Blondie";s:5:"track";s:31:"Call Me (Original Long Version)";s:4:"size";s:8:"19464640";s:7:"bitrate";i:320;}}
\ No newline at end of file
diff --git a/php/dump/data/Blondie.data b/php/dump/data/Blondie.data
new file mode 100755
index 0000000..1149a92
--- /dev/null
+++ b/php/dump/data/Blondie.data
@@ -0,0 +1,3 @@
+a:100:{i:0;a:6:{s:3:"url";s:58:"http://cs5009.vkontakte.ru/u5866480/audio/63c6e555f18b.mp3";s:8:"duration";i:147;s:6:"artist";s:14:"Florrie Arnold";s:5:"track";s:27:"Sunday Girl (Blondie cover)";s:4:"size";s:7:"3549727";s:7:"bitrate";i:192;}i:1;a:6:{s:3:"url";s:59:"http://cs1657.vkontakte.ru/u11843184/audio/666347509b26.mp3";s:8:"duration";i:215;s:6:"artist";s:7:"Blondie";s:5:"track";s:37:"One Way Or Another (  )";s:4:"size";s:7:"5166208";s:7:"bitrate";i:192;}i:2;a:6:{s:3:"url";s:59:"http://cs4721.vkontakte.ru/u60218145/audio/8f8dac2c5fdf.mp3";s:8:"duration";i:208;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"8340854";s:7:"bitrate";i:320;}i:3;a:6:{s:3:"url";s:58:"http://cs4843.vkontakte.ru/u3637985/audio/c41851c9cb93.mp3";s:8:"duration";i:148;s:6:"artist";s:7:"Florrie";s:5:"track";s:38:"Sunday Girl [Nina Ricci Blondie cover]";s:4:"size";s:7:"2383521";s:7:"bitrate";i:128;}i:4;a:6:{s:3:"url";s:59:"http://cs4111.vkontakte.ru/u12497310/audio/3727dea3a0e4.mp3";s:8:"duration";i:273;s:6:"artist";s:7:"Blondie";s:5:"track";s:39:"Heart of Glass ( GUCCI by GUCCI)";s:4:"size";s:7:"4378624";s:7:"bitrate";i:128;}i:5;a:6:{s:3:"url";s:59:"http://cs4260.vkontakte.ru/u10239274/audio/749626556df8.mp3";s:8:"duration";i:211;s:6:"artist";s:7:"Blondie";s:5:"track";s:67:"One Way Or Another(   "  ")";s:4:"size";s:7:"5078038";s:7:"bitrate";i:192;}i:6;a:6:{s:3:"url";s:67:"http://cs4660.vkont
+4000
+akte.ru/u19486345/audio/8494b778d6eb.mp3";s:8:"duration";i:286;s:6:"artist";s:7:"Blondie";s:5:"track";s:5:"Maria";s:4:"size";i:0;s:7:"bitrate";i:8;}i:7;a:6:{s:3:"url";s:58:"http://cs4256.vkontakte.ru/u5759229/audio/364222ab9323.mp3";s:8:"duration";i:208;s:6:"artist";s:8:"Blondie ";s:5:"track";s:36:" One Way Or Another( )";s:4:"size";s:7:"6230608";s:7:"bitrate";i:224;}i:8;a:6:{s:3:"url";s:57:"http://cs4407.vkontakte.ru/u740645/audio/f3333be51cd2.mp3";s:8:"duration";i:286;s:6:"artist";s:7:"Blondie";s:5:"track";s:11:"Maria !";s:4:"size";s:7:"4583247";s:7:"bitrate";i:128;}i:9;a:6:{s:3:"url";s:59:"http://cs4655.vkontakte.ru/u81252445/audio/1d82e3c0f4a5.mp3";s:8:"duration";i:291;s:6:"artist";s:7:"Blondie";s:5:"track";s:5:"Maria";s:4:"size";s:7:"4658816";s:7:"bitrate";i:128;}i:10;a:6:{s:3:"url";s:58:"http://cs4273.vkontakte.ru/u2618345/audio/bc17124e07df.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"5958597";s:7:"bitrate";i:224;}i:11;a:6:{s:3:"url";s:59:"http://cs4544.vkontakte.ru/u10330745/audio/8b4ef1b3d83d.mp3";s:8:"duration";i:273;s:6:"artist";s:17:"  ";s:5:"track";s:41:"Gucci By Gucci (Blondie - Heart Of Glass)";s:4:"size";s:7:"4380674";s:7:"bitrate";i:128;}i:12;a:6:{s:3:"url";s:59:"http://cs4759.vkontakte.ru/u18645645/audio/4bfa317a7ae1.mp3";s:8:"duration";i:273;s:6:"artist";s:17:"  ";s:5:"track";s:30:"Gucci By Gucci (Blondie - Hear";s:4:"size";s:7:"4384770";s:7:"bitrate";i:128;}i:13;a:6:{s:3:"url";s:59:"http://cs1623.vkontakte.ru/u15760809/audio/32fcbe55b1ed.mp3";s:8:"duration";i:273;s:6:"artist";s:7:"Blondie";s:5:"track";s:14:"Heart of Glass";s:4:"size";s:7:"4378624";s:7:"bitrate";i:128;}i:14;a:6:{s:3:"url";s:58:"http://cs5019.vkontakte.ru/u3660145/audio/ec5c1d38fd39.mp3";s:8:"duration";i:286;s:6:"artist";s:7:"Blondie";s:5:"track";s:5:"Maria";s:4:"size";s:7:"6209288";s:7:"bitrate";i:160;}i:15;a:6:{s:3:"url";s:58:"http://cs4532.vkontakte.ru/u2218245/audio/af75db316b14.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:18:"One Way Or Another";s:4:"size";s:7:"6075746";s:7:"bitrate";i:224;}i:16;a:6:{s:3:"url";s:59:"http://cs4651.vkontakte.ru/u26636445/audio/7f4ad25216f4.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"6813782";s:7:"bitrate";i:256;}i:17;a:6:{s:3:"url";s:59:"http://cs4828.vkontakte.ru/u33941245/audio/45db13cd8542.mp3";s:8:"duration";i:235;s:6:"artist";s:86:" Bueno Clinic vs Yolanda Be Cool Sax Appeal in New York 1950 ( DJ BLondie MashUp 2011 ";s:5:"track";s:3:"...";s:4:"size";s:7:"6548492";s:7:"bitrate";i:224;}i:18;a:6:{s:3:"url";s:56:"http://cs511.vkontakte.ru/u282051/audio/f3176a6ea9e9.mp3";s:8:"duration";i:273;s:6:"artist";s:7:"Blondie";s:5:"track";s:143:"Heart of Glass (Gucci by Gucci:    Gucci.      ,     Gucci)";s:4:"size";s:7:"4378624";s:7:"bitrate";i:128;}i:19;a:6:{s:3:"url";s:59:"http://cs5009.vkontakte.ru/u96691308/audio/743531e4e325.mp3";s:8:"duration";i:209;s:6:"artist";s:37:"   (Coyote Ugly) - 2000";s:5:"track";s:32:"13. Blondie - One Way Or Another";s:4:"size";s:7:"5080837";s:7:"bitrate";i:192;}i:20;a:6:{s:3:"url";s:57:"http://cs4374.vkontakte.ru/u458806/audio/1b3f467c5ff7.mp3";s:8:"duration";i:200;s:6:"artist";s:7:"Blondie";s:5:"track";s:30:"Heart Of Glass (OST Studio 54)";s:4:"size";s:7:"5295240";s:7:"bitrate";i:192;}i:21;a:6:{s:3:"url";s:59:"http://cs4260.vkontakte.ru/u28642345/audio/71b733d072d3.mp3";s:8:"duration";i:197;s:6:"artist";s:14:"In This Moment";s:5:"track";s:37:"Call Me (Blondie Cover) (Bonus Track)";s:4:"size";s:7:"5654726";s:7:"bitrate";i:224;}i:22;a:6:{s:3:"url";s:58:"http://cs4401.vkontakte.ru/u7759145/audio/25602ce050ab.mp3";s:8:"duration";i:258;s:6:"artist";s:7:"Blondie";s:5:"track";s:9:"Good Boys";s:4:"size";s:7:"6210637";s:7:"bitrate";i:192;}i:23;a:6:{s:3:"url";s:58:"http://cs4770.vkontakte.ru/u5269545/audio/4fde7dc8605c.mp3";s:8:"duration";i:273;s:6:"artist";s:7:"Blondie";s:5:"track";s:14:"Heart of Glass";s:4:"size";s:7:"4378624";s:7:"bitrate";i:128;}i:24;a:6:{s:3:"url";s:58:"http://cs1383.vkontakte.ru/u5478193/audio/cb95bb575d40.mp3";s:8:"duration";i:208;s:6:"artist";s:7:"Blondie";s:5:"track";s:36:"One Way Or Another( )";s:4:"size";s:7:"4995906";s:7:"bitrate";i:192;}i:25;a:6:{s:3:"url";s:58:"http://cs4595.vkontakte.ru/u3628970/audio/8330c97e59af.mp3";s:8:"duration";i:191;s:6:"artist";s:7:"Blondie";s:5:"track";s:11:"Sunday Girl";s:4:"size";s:7:"7653158";s:7:"bitrate";i:320;}i:26;a:6:{s:3:"url";s:58:"http://cs4770.vkontakte.ru/u5086021/audio/7472f96ffe13.mp3";s:8:"duration";i:215;s:6:"artist";s:7:"Blondie";s:5:"track";s:18:"One Way Or Another";s:4:"size";s:7:"5166208";s:7:"bitrate";i:192;}i:27;a:6:{s:3:"url";s:59:"http://cs4636.vkontakte.ru/u41844079/audio/9f264301622d.mp3";s:8:"duration";i:216;s:6:"artist";s:24:"Blondie   ";s:5:"track";s:18:"One Way Or Another";s:4:"size";s:7:"6927346";s:7:"bitrate";i:256;}i:28;a:6:{s:3:"url";s:58:"http://cs4769.vkontakte.ru/u7490691/audio/ce269d2670b8.mp3";s:8:"duration";i:200;s:6:"artist";s:9:"Studio 54";s:5:"track";s:24:"Blondie / Heart Of Glass";s:4:"size";s:7:"5295240";s:7:"bitrate";i:192;}i:29;a:6:{s:3:"url";s:59:"http://cs4641.vkontakte.ru/u66121345/audio/f595b46300b0.mp3";s:8:"duration";i:272;s:6:"artist";s:7:"Blondie";s:5:"track";s:14:"Heart Of Glass";s:4:"size";s:7:"8714065";s:7:"bitrate";i:256;}i:30;a:6:{s:3:"url";s:58:"http://cs5065.vkontakte.ru/u2032051/audio/04aa93350cdc.mp3";s:8:"duration";i:286;s:6:"artist";s:7:"Blondie";s:5:"track";s:5:"Maria";s:4:"size";s:7:"6209288";s:7:"bitrate";i:160;}i:31;a:6:{s:3:"url";s:58:"http://cs4291.vkontakte.ru/u1332145/audio/bf9f2cbe4fd4.mp3";s:8:"duration";i:206;s:6:"artist";s:7:"Blondie";s:5:"track";s:18:"One Way Or Another";s:4:"size";s:7:"4964236";s:7:"bitrate";i:192;}i:32;a:6:{s:3:"url";s:59:"http://cs4646.vkontakte.ru/u43940845/audio/65f015f47a7b.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"BLONDIE";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"8500296";s:7:"bitrate";i:320;}i:33;a:6:{s:3:"url";s:59:"http://cs4657.vkontakte.ru/u43132645/audio/8413f7e115bc.mp3";s:8:"duration";i:247;s:6:"artist";s:7:"Blondie";s:5:"track";s:5:"Maria";s:4:"size";s:7:"3958784";s:7:"bitrate";i:128;}i:34;a:6:{s:3:"url";s:59:"http://cs4589.vkontakte.ru/u33719645/audio/6bca591969c4.mp3";s:8:"duration";i:278;s:6:"artist";s:7:"Blondie";s:5:"track";s:6:"Atomic";s:4:"size";s:7:"6691039";s:7:"bitrate";i:192;}i:35;a:6:{s:3:"url";s:59:"http://cs4755.vkontakte.ru/u18925562/audio/e905d73e360b.mp3";s:8:"duration";i:273;s:6:"artist";s:17:"  ";s:5:"track";s:30:"Gucci By Gucci (Blondie - Hear";s:4:"size";s:7:"4384770";s:7:"bitrate";i:128;}i:36;a:6:{s:3:"url";s:60:"http://cs5016.vkontakte.ru/u108325190/audio/7aeab33b684e.mp3";s:8:"duration";i:273;s:6:"artist";s:17:"  ";s:5:"track";s:41:"Gucci By Gucci (Blondie - Heart Of Glass)";s:4:"size";s:7:"4380674";s:7:"bitrate";i:128;}i:37;a:6:{s:3:"url";s:58:"http://cs4775.vkontakte.ru/u2164919/audio/261dc2fa5a00.mp3";s:8:"duration";i:274;s:6:"artist";s:7:"Blondie";s:5:"track";s:38:"Heart Of Glass (OST  )";s:4:"size";s:7:"6586368";s:7:"bitrate";i:192;}i:38;a:6:{s:3:"url";s:58:"http://cs4703.vkontakte.ru/u1632611/audio/7e67aa6cef2a.mp3";s:8:"duration";i:215;s:6:"artist";s:7:"CjR Mix";s:5:"track";s:42:"Call Me Uprising (Blondie vs, Muse mashup)";s:4:"size";s:7:"8819410";s:7:"bitrate";i:0;}i:39;a:6:{s:3:"url";s:59:"http://cs5000.vkontakte.ru/u18720612/audio/81759c6723e3.mp3";s:8:"duration";i:147;s:6:"artist";s:14:"Florrie Arnold";s:5:"track";s:27:"Sunday Girl (Blondie Cover)";s:4:"size";s:7:"2367400";s:7:"bitrate";i:128;}i:40;a:6:{s:3:"url";s:58:"http://cs4959.vkontakte.ru/u3903408/audio/7b592651cf82.mp3";s:8:"duration";i:214;s:6:"artist";s:14:"Nouvelle Vague";s:5:"track";s:24:"Heart Of Glass (Blondie)";s:4:"size";s:7:"5229118";s:7:"bitrate";i:192;}i:41;a:6:{s:3:"url";s:58:"http://cs4517.vkontakte.ru/u3902945/audio/1e38f0d3db8c.mp3";s:8:"duration";i:215;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call me";s:4:"size";s:7:"4305536";s:7:"bitrate";i:160;}i:42;a:6:{s:3:"url";s:59:"http://cs4883.vkontakte.ru/u71473945/audio/90d47d8a49c0.mp3";s:8:"duration";i:208;s:6:"artist";s:7:"Blondie";s:5:"track";s:40:"One Way Or Another,Ost  .";s:4:"size";s:7:"5056742";s:7:"bitrate";i:192;}i:43;a:6:{s:3:"url";s:58:"http://cs1314.vkontakte.ru/u3735583/audio/bcb422a1a6a1.mp3";s:8:"duration";i:278;s:6:"artist";s:7:"Blondie";s:5:"track";s:26:"Atomic (GTA Vice City OST)";s:4:"size";s:7:"6686572";s:7:"bitrate";i:192;}i:44;a:6:{s:3:"url";s:59:"http://cs4657.vkontakte.ru/u43132645/audio/0443c1c0f9c9.mp3";s:8:"duration";i:224;s:6:"artist";s:7:"Blondie";s:5:"track";s:14:"Heart Of Glass";s:4:"size";s:7:"7188480";s:7:"bitrate";i:256;}i:45;a:6:{s:3:"url";s:59:"http://cs4510.vkontakte.ru/u28642345/audio/46218044bc07.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"8493056";s:7:"bitrate";i:320;}i:46;a:6:{s:3:"url";s:57:"http://cs4596.vkontakte.ru/u444624/audio/bd6e48f3102b.mp3";s:8:"duration";i:249;s:6:"artist";s:8:".blondie";s:5:"track";s:14:"heart of glass";s:4:"size";s:7:"9989064";s:7:"bitrate";i:320;}i:47;a:6:{s:3:"url";s:56:"http://cs4824.vkontakte.ru/u19979/audio/d93cb021d4af.mp3";s:8:"duration";i:347;s:6:"artist";s:38:"  (We Own The Night) - 2007";s:5:"track";s:28:"01. Blondie - Heart Of Glass";s:4:"size";s:7:"8083944";s:7:"bitrate";i:192;}i:48;a:6:{s:3:"url";s:59:"http://cs4490.vkontakte.ru/u53499245/audio/6727d147e735.mp3";s:8:"duration";i:248;s:6:"artist";s:7:"Blondie";s:5:"track";s:5:"Maria";s:4:"size";s:7:"4977830";s:7:"bitrate";i:160;}i:49;a:6:{s:3:"url";s:59:"http://cs4236.vkontakte.ru/u40744045/audio/d7eca3e31a0f.mp3";s:8:"duration";i:208;s:6:"artist";s:11:"025 Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"6673263";s:7:"bitrate";i:256;}i:50;a:6:{s:3:"url";s:59:"http://cs5125.vkontakte.ru/u19502508/audio/24ede1eaa309.mp3";s:8:"duration";i:258;s:6:"artist";s:7:"Blondie";s:5:"track";s:19:"Good Boys(20003 .)";s:4:"size";s:8:"10350491";s:7:"bitrate";i:320;}i:51;a:6:{s:3:"url";s:58:"http://cs4756.vkontakte.ru/u2385319/audio/781d7c345f9f.mp3";s:8:"duration";i:183;s:6:"artist";s:7:"Blondie";s:5:"track";s:11:"Sunday Girl";s:4:"size";s:7:"7323776";s:7:"bitrate";i:320;}i:52;a:6:{s:3:"url";s:58:"http://cs4619.vkontakte.ru/u3573779/audio/66c2ef0d73d6.mp3";s:8:"duration";i:211;s:6:"artist";s:7:"Blondie";s:5:"track";s:18:"One Way Or Another";s:4:"size";s:7:"5078038";s:7:"bitrate";i:192;}i:53;a:6:{s:3:"url";s:59:"http://cs4494.vkontakte.ru/u15608899/audio/b087d9ae2992.mp3";s:8:"duration";i:341;s:6:"artist";s:21:"Blondie vs. The Doors";s:5:"track";s:14:"Rapture Riders";s:4:"size";s:7:"7959965";s:7:"bitrate";i:192;}i:54;a:6:{s:3:"url";s:59:"http://cs4958.vkontakte.ru/u33568208/audio/5a714aeb6ca0.mp3";s:8:"duration";i:273;s:6:"artist";s:17:"  ";s:5:"track";s:41:"Gucci By Gucci (Blondie - Heart Of Glass)";s:4:"size";s:7:"4380674";s:7:"bitrate";i:128;}i:55;a:6:{s:3:"url";s:58:"http://cs4195.vkontakte.ru/u4753650/audio/86614c7fb471.mp3";s:8:"duration";i:200;s:6:"artist";s:9:"Studio 54";s:5:"track";s:24:"Blondie / Heart Of Glass";s:4:"size";s:7:"5295240";s:7:"bitrate";i:192;}i:56;a:6:{s:3:"url";s:59:"http://cs4636.vkontakte.ru/u16291818/audio/04ff5d45e47a.mp3";s:8:"duration";i:216;s:6:"artist";s:7:"Blondie";s:5:"track";s:54:"  / " " "" ";s:4:"size";s:7:"6927346";s:7:"bitrate";i:256;}i:57;a:6:{s:3:"url";s:57:"http://cs1544.vkontakte.ru/u186572/audio/2742e6223459.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"6813696";s:7:"bitrate";i:256;}i:58;a:6:{s:3:"url";s:58:"http://cs4626.vkontakte.ru/u7473603/audio/ce38f4b2db6a.mp3";s:8:"duration";i:250;s:6:"artist";s:7:"blondie";s:5:"track";s:35:"call me (the messiah dubstep remix)";s:4:"size";s:8:"10375872";s:7:"bitrate";i:320;}i:59;a:6:{s:3:"url";s:59:"http://cs1632.vkontakte.ru/u12003288/audio/fed22fd8aff5.mp3";s:8:"duration";i:282;s:6:"artist";s:21:"Striptease ()";s:5:"track";s:26:"Blondie - The Tide Is High";s:4:"size";s:7:"6785078";s:7:"bitrate";i:192;}i:60;a:6:{s:3:"url";s:59:"http://cs4954.vkontakte.ru/u66844845/audio/d062390b4fa7.mp3";s:8:"duration";i:249;s:6:"artist";s:7:"Blondie";s:5:"track";s:5:"Maria";s:4:"size";s:7:"5988128";s:7:"bitrate";i:192;}i:61;a:6:{s:3:"url";s:58:"http://cs4587.vkontakte.ru/u7503045/audio/bee99dc65513.mp3";s:8:"duration";i:278;s:6:"artist";s:7:"Blondie";s:5:"track";s:6:"Atomic";s:4:"size";s:8:"11162942";s:7:"bitrate";i:320;}i:62;a:6:{s:3:"url";s:59:"http://cs5119.vkontakte.ru/u83196545/audio/25905150e393.mp3";s:8:"duration";i:286;s:6:"artist";s:7:"Blondie";s:5:"track";s:5:"Maria";s:4:"size";s:7:"6209288";s:7:"bitrate";i:160;}i:63;a:6:{s:3:"url";s:59:"http://cs4490.vkontakte.ru/u53499245/audio/af404d3671f8.mp3";s:8:"duration";i:273;s:6:"artist";s:7:"Blondie";s:5:"track";s:14:"Heart of Glass";s:4:"size";s:7:"4378624";s:7:"bitrate";i:128;}i:64;a:6:{s:3:"url";s:59:"http://cs4776.vkontakte.ru/u13475931/audio/dd13161d81d9.mp3";s:8:"duration";i:200;s:6:"artist";s:28:"C    54";s:5:"track";s:40:"Blondie - Heart Of Glass (OST Studio 54)";s:4:"size";s:7:"5295112";s:7:"bitrate";i:192;}i:65;a:6:{s:3:"url";s:59:"http://cs5008.vkontakte.ru/u66844845/audio/6b20dd53f03b.mp3";s:8:"duration";i:211;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"5106643";s:7:"bitrate";i:192;}i:66;a:6:{s:3:"url";s:59:"http://cs4198.vkontakte.ru/u15073516/audio/e7fe1f4f5472.mp3";s:8:"duration";i:216;s:6:"artist";s:7:"Blondie";s:5:"track";s:41:"ne Way Or Another (OST  )";s:4:"size";s:7:"6927346";s:7:"bitrate";i:256;}i:67;a:6:{s:3:"url";s:59:"http://cs4501.vkontakte.ru/u15135145/audio/555184a142a6.mp3";s:8:"duration";i:202;s:6:"artist";s:10:"";s:5:"track";s:27:"!62.Blondie - Good Boys";s:4:"size";s:7:"6490198";s:7:"bitrate";i:256;}i:68;a:6:{s:3:"url";s:58:"http://cs5016.vkontakte.ru/u8447078/audio/d8ed223cefc6.mp3";s:8:"duration";i:241;s:6:"artist";s:7:"Blondie";s:5:"track";s:9:"Good Boys";s:4:"size";s:7:"7732801";s:7:"bitrate";i:256;}i:69;a:6:{s:3:"url";s:57:"http://cs4263.vkontakte.ru/u366124/audio/e99b27f42a5b.mp3";s:8:"duration";i:286;s:6:"artist";s:7:"Blondie";s:5:"track";s:5:"Maria";s:4:"size";s:7:"6209288";s:7:"bitrate";i:160;}i:70;a:6:{s:3:"url";s:59:"http://cs4762.vkontakte.ru/u26736099/audio/cd5b0b747bc4.mp3";s:8:"duration";i:280;s:6:"artist";s:7:"Blondie";s:5:"track";s:13:"Atomic (1979)";s:4:"size";s:7:"6736000";s:7:"bitrate";i:192;}i:71;a:6:{s:3:"url";s:58:"http://cs4710.vkontakte.ru/u9436079/audio/299a026204d5.mp3";s:8:"duration";i:207;s:6:"artist";s:11:"Coyote Ugly";s:5:"track";s:28:"Blondie - One Way Or Another";s:4:"size";s:7:"4976140";s:7:"bitrate";i:192;}i:72;a:6:{s:3:"url";s:59:"http://cs4353.vkontakte.ru/u16968920/audio/384cf40f2186.mp3";s:8:"duration";i:279;s:6:"artist";s:7:"Blondie";s:5:"track";s:46:"Atomic (......     )";s:4:"size";s:7:"6719247";s:7:"bitrate";i:192;}i:73;a:6:{s:3:"url";s:58:"http://cs4433.vkontakte.ru/u6075745/audio/65e8db468d40.mp3";s:8:"duration";i:273;s:6:"artist";s:7:"Blondie";s:5:"track";s:14:"Heart of Glass";s:4:"size";s:7:"4378624";s:7:"bitrate";i:128;}i:74;a:6:{s:3:"url";s:59:"http://cs4825.vkontakte.ru/u17709487/audio/c6b014c8e336.mp3";s:8:"duration";i:210;s:6:"artist";s:7:"Blondie";s:5:"track";s:31:"Call Me (2001 Digital Remaster)";s:4:"size";s:7:"5683032";s:7:"bitrate";i:192;}i:75;a:6:{s:3:"url";s:58:"http://cs4401.vkontakte.ru/u1723445/audio/59587e12e446.mp3";s:8:"duration";i:215;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call me";s:4:"size";s:7:"4307072";s:7:"bitrate";i:160;}i:76;a:6:{s:3:"url";s:56:"http://cs4760.vkontakte.ru/u72653/audio/ce8151e1755d.mp3";s:8:"duration";i:197;s:6:"artist";s:14:"In This Moment";s:5:"track";s:37:"Call Me (Blondie Cover) (Bonus Track)";s:4:"size";s:7:"3160914";s:7:"bitrate";i:128;}i:77;a:6:{s:3:"url";s:58:"http://cs1698.vkontakte.ru/u2130518/audio/84e79f22f22a.mp3";s:8:"duration";i:277;s:6:"artist";s:13:"Alpha Blondie";s:5:"track";s:34:"SeBe Allah Y'e (Grand Sunlife)";s:4:"size";s:7:"4447469";s:7:"bitrate";i:128;}i:78;a:6:{s:3:"url";s:59:"http://cs4588.vkontakte.ru/u77174366/audio/0c895d56d9bf.mp3";s:8:"duration";i:124;s:6:"artist";s:14:"Florrie Arnold";s:5:"track";s:80:"Sunday Girl (cover Blondie) (Nina Ricci L'Elixir "Enchanted Walk")";s:4:"size";s:7:"1988262";s:7:"bitrate";i:128;}i:79;a:6:{s:3:"url";s:59:"http://cs1382.vkontakte.ru/u10916247/audio/03f0a6ea15e4.mp3";s:8:"duration";i:273;s:6:"artist";s:7:"Blondie";s:5:"track";s:31:"Heart of Glass ost  ";s:4:"size";s:7:"4378624";s:7:"bitrate";i:128;}i:80;a:6:{s:3:"url";s:60:"http://cs4711.vkontakte.ru/u113254745/audio/cfcddc356697.mp3";s:8:"duration";i:286;s:6:"artist";s:7:"Blondie";s:5:"track";s:5:"Maria";s:4:"size";s:7:"6209288";s:7:"bitrate";i:160;}i:81;a:6:{s:3:"url";s:58:"http://cs4520.vkontakte.ru/u3913462/audio/4e06f4d2363a.mp3";s:8:"duration";i:336;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Rapture";s:4:"size";s:7:"8068312";s:7:"bitrate";i:192;}i:82;a:6:{s:3:"url";s:59:"http://cs5124.vkontakte.ru/u98236378/audio/fd37fbccf495.mp3";s:8:"duration";i:273;s:6:"artist";s:7:"blondie";s:5:"track";s:39:"heart of glass ( gucci by gucci)";s:4:"size";s:7:"4378496";s:7:"bitrate";i:128;}i:83;a:6:{s:3:"url";s:59:"http://cs4959.vkontakte.ru/u20879037/audio/1228673d795b.mp3";s:8:"duration";i:148;s:6:"artist";s:14:"FLORRIE ARNOLD";s:5:"track";s:27:"SUNDAY GIRL (BLONDIE COVER)";s:4:"size";s:7:"2805888";s:7:"bitrate";i:144;}i:84;a:6:{s:3:"url";s:58:"http://cs4654.vkontakte.ru/u2670319/audio/443e613d37ef.mp3";s:8:"duration";i:486;s:6:"artist";s:7:"Blondie";s:5:"track";s:81:"Call Me (American Gigolo Original Soundtrack - Main Theme, Original Long Version)";s:4:"size";s:8:"19464640";s:7:"bitrate";i:320;}i:85;a:6:{s:3:"url";s:58:"http://cs1376.vkontakte.ru/u3084320/audio/3a2c75831a8e.mp3";s:8:"duration";i:209;s:6:"artist";s:26:"Blondie ( )";s:5:"track";s:18:"One Way Or Another";s:4:"size";s:7:"3310707";s:7:"bitrate";i:128;}i:86;a:6:{s:3:"url";s:59:"http://cs5011.vkontakte.ru/u10037078/audio/d5f035ae5b7b.mp3";s:8:"duration";i:258;s:6:"artist";s:7:"blondie";s:5:"track";s:9:"good boys";s:4:"size";s:7:"6210637";s:7:"bitrate";i:192;}i:87;a:6:{s:3:"url";s:58:"http://cs4488.vkontakte.ru/u5094717/audio/3b97de6cf99d.mp3";s:8:"duration";i:207;s:6:"artist";s:15:"Franz Ferdinand";s:5:"track";s:23:"Call Me (Blondie cover)";s:4:"size";s:7:"8349529";s:7:"bitrate";i:320;}i:88;a:6:{s:3:"url";s:59:"http://cs4355.vkontakte.ru/u40631589/audio/5bf730779c02.mp3";s:8:"duration";i:486;s:6:"artist";s:7:"Blondie";s:5:"track";s:31:"Call Me (Original Long Version)";s:4:"size";s:7:"5841024";s:7:"bitrate";i:96;}i:89;a:6:{s:3:"url";s:59:"http://cs4428.vkontakte.ru/u18806224/audio/61b46334d1b0.mp3";s:8:"duration";i:216;s:6:"artist";s:11:"Coyote Ugly";s:5:"track";s:28:"Blondie - One Way Or Another";s:4:"size";s:7:"3464133";s:7:"bitrate";i:128;}i:90;a:6:{s:3:"url";s:59:"http://cs4541.vkontakte.ru/u12821879/audio/fe26bc32b5c2.mp3";s:8:"duration";i:215;s:6:"artist";s:7:"Blondie";s:5:"track";s:18:"One day or another";s:4:"size";s:7:"8607868";s:7:"bitrate";i:320;}i:91;a:6:{s:3:"url";s:58:"http://cs4699.vkontakte.ru/u5683834/audio/2becf5e2b607.mp3";s:8:"duration";i:207;s:6:"artist";s:15:"Coyote Ugly OST";s:5:"track";s:28:"Blondie - One way or another";s:4:"size";s:7:"6609303";s:7:"bitrate";i:256;}i:92;a:6:{s:3:"url";s:59:"http://cs4996.vkontakte.ru/u79431770/audio/7b3be3350bd8.mp3";s:8:"duration";i:259;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"No Exit";s:4:"size";s:8:"10366766";s:7:"bitrate";i:320;}i:93;a:6:{s:3:"url";s:58:"http://cs4512.vkontakte.ru/u2977089/audio/a313ed730cc7.mp3";s:8:"duration";i:285;s:6:"artist";s:30:"[OST Sex And The Sity] Blondie";s:5:"track";s:5:"Maria";s:4:"size";s:7:"6868992";s:7:"bitrate";i:192;}i:94;a:6:{s:3:"url";s:58:"http://cs4643.vkontakte.ru/u3017985/audio/8c003cbf73b6.mp3";s:8:"duration";i:273;s:6:"artist";s:7:"Blondie";s:5:"track";s:35:"Heart of Glass (Skins OST,  2)";s:4:"size";s:7:"4376497";s:7:"bitrate";i:128;}i:95;a:6:{s:3:"url";s:59:"http://cs4625.vkontakte.ru/u10537840/audio/bb618af48c6e.mp3";s:8:"duration";i:193;s:6:"artist";s:7:"Blondie";s:5:"track";s:28:"Nothing Is Real But The Girl";s:4:"size";s:7:"3095530";s:7:"bitrate";i:128;}i:96;a:6:{s:3:"url";s:59:"http://cs5008.vkontakte.ru/u66844845/audio/517d08917c89.mp3";s:8:"duration";i:272;s:6:"artist";s:7:"Blondie";s:5:"track";s:14:"Heart Of Glass";s:4:"size";s:7:"6558633";s:7:"bitrate";i:192;}i:97;a:6:{s:3:"url";s:59:"http://cs4784.vkontakte.ru/u38304676/audio/0abaa4c419ee.mp3";s:8:"duration";i:198;s:6:"artist";s:14:"In This Moment";s:5:"track";s:23:"Call Me (Blondie Cover)";s:4:"size";s:7:"6422102";s:7:"bitrate";i:256;}i:98;a:6:{s:3:"url";s:59:"http://cs4784.vkontakte.ru/u64533839/audio/ca11b19e38d8.mp3";s:8:"duration";i:279;s:6:"artist";s:7:"Blondie";s:5:"track";s:26:"Atomic (ost GTA Vice City)";s:4:"size";s:7:"6719247";s:7:"bitrate";i:192;}i:99;a:6:{s:3:"url";s:57:"http://cs509.vkontakte.ru/u2207059/audio/928d899a47ec.mp3";s:8:"duration";i:212;s:6:"artist";s:7:"Blondie";s:5:"track";s:7:"Call Me";s:4:"size";s:7:"6106565";s:7:"bitrate";i:224;}}
\ No newline at end of file
diff --git "a/php/dump/data/Foo Fighters - Ain\\'t It The Life.data" "b/php/dump/data/Foo Fighters - Ain\\'t It The Life.data"
new file mode 100644
index 0000000..217af12
--- /dev/null
+++ "b/php/dump/data/Foo Fighters - Ain\\'t It The Life.data"	
@@ -0,0 +1 @@
+a:81:{i:0;a:6:{s:3:"url";s:57:"http://cs1704.vkontakte.ru/u188736/audio/781dcc5aa786.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It the Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:1;a:6:{s:3:"url";s:58:"http://cs4896.vkontakte.ru/u1599988/audio/5ef6a9d806f0.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6594862";s:7:"bitrate";i:192;}i:2;a:6:{s:3:"url";s:59:"http://cs1596.vkontakte.ru/u11840612/audio/0a5448f4ee75.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:3;a:6:{s:3:"url";s:59:"http://cs4625.vkontakte.ru/u58669797/audio/bc405421b994.mp3";s:8:"duration";i:283;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:37:"Ain't It The Life (Live Acoustic)";s:4:"size";s:8:"11352707";s:7:"bitrate";i:320;}i:4;a:6:{s:3:"url";s:59:"http://cs4431.vkontakte.ru/u16573090/audio/c99200481dc4.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:5;a:6:{s:3:"url";s:59:"http://cs4820.vkontakte.ru/u37866497/audio/530f2467804e.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:8:"10209748";s:7:"bitrate";i:320;}i:6;a:6:{s:3:"url";s:59:"http://cs4261.vkontakte.ru/u19674894/audio/8327e5751b6e.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105461";s:7:"bitrate";i:192;}i:7;a:6:{s:3:"url";s:58:"http://cs4290.vkontakte.ru/u1822162/audio/087f625820fe.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:8:"10209748";s:7:"bitrate";i:320;}i:8;a:6:{s:3:"url";s:59:"http://cs4254.vkontakte.ru/u10301016/audio/6f93a332b701.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105461";s:7:"bitrate";i:192;}i:9;a:6:{s:3:"url";s:59:"http://cs1660.vkontakte.ru/u19533552/audio/9744348b3e2b.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6110093";s:7:"bitrate";i:192;}i:10;a:6:{s:3:"url";s:58:"http://cs1095.vkontakte.ru/u2096240/audio/1ba45fa93292.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:11;a:6:{s:3:"url";s:59:"http://cs4697.vkontakte.ru/u17458294/audio/83367c6e3ef5.mp3";s:8:"duration";i:252;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't it the life";s:4:"size";s:7:"4043882";s:7:"bitrate";i:128;}i:12;a:6:{s:3:"url";N;s:8:"duration";i:0;s:6:"artist";s:0:"";s:5:"track";s:0:"";s:4:"size";i:0;s:7:"bitrate";i:8;}i:13;a:6:{s:3:"url";s:58:"http://cs4272.vkontakte.ru/u2938680/audio/eaf181e31c9c.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105461";s:7:"bitrate";i:192;}i:14;a:6:{s:3:"url";s:59:"http://cs4250.vkontakte.ru/u16778651/audio/29f44bdb8d87.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105461";s:7:"bitrate";i:192;}i:15;a:6:{s:3:"url";s:59:"http://cs4588.vkontakte.ru/u78285734/audio/10e579e34f73.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:16;a:6:{s:3:"url";s:58:"http://cs4539.vkontakte.ru/u1303672/audio/d89626fc4ff0.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:17;a:6:{s:3:"url";s:58:"http://cs4421.vkontakte.ru/u2959634/audio/0ae7f18ee4cf.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:18;a:6:{s:3:"url";s:58:"http://cs4205.vkontakte.ru/u1878115/audio/2cbc3864bdf9.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:8:"10198976";s:7:"bitrate";i:320;}i:19;a:6:{s:3:"url";s:59:"http://cs4198.vkontakte.ru/u14588350/audio/04b9e0912a2c.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6109837";s:7:"bitrate";i:192;}i:20;a:6:{s:3:"url";s:59:"http://cs1619.vkontakte.ru/u18877581/audio/c5d7a35593c9.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:21;a:6:{s:3:"url";s:59:"http://cs4600.vkontakte.ru/u71055377/audio/bf114aa85b70.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6109325";s:7:"bitrate";i:192;}i:22;a:6:{s:3:"url";s:58:"http://cs4594.vkontakte.ru/u4915460/audio/43ed5645b48b.mp3";s:8:"duration";i:256;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6166021";s:7:"bitrate";i:192;}i:23;a:6:{s:3:"url";s:58:"http://cs5118.vkontakte.ru/u8024797/audio/08b00288e45a.mp3";s:8:"duration";i:256;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:17:"Ain`t It the Life";s:4:"size";s:7:"6166021";s:7:"bitrate";i:192;}i:24;a:6:{s:3:"url";s:59:"http://cs4723.vkontakte.ru/u20491910/audio/5de02c60e63e.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It the Life";s:4:"size";s:7:"6117834";s:7:"bitrate";i:192;}i:25;a:6:{s:3:"url";s:58:"http://cs4663.vkontakte.ru/u3619241/audio/58224d99b872.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6109837";s:7:"bitrate";i:192;}i:26;a:6:{s:3:"url";s:59:"http://cs4765.vkontakte.ru/u27949402/audio/3049e99d6292.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:27;a:6:{s:3:"url";s:59:"http://cs4540.vkontakte.ru/u15926122/audio/443fa144aa30.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:28;a:6:{s:3:"url";s:58:"http://cs4242.vkontakte.ru/u6346157/audio/886122cfffc5.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It the Life";s:4:"size";s:7:"6116541";s:7:"bitrate";i:192;}i:29;a:6:{s:3:"url";s:58:"http://cs4235.vkontakte.ru/u4425591/audio/8601d0aa844d.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"8785390";s:7:"bitrate";i:256;}i:30;a:6:{s:3:"url";s:58:"http://cs4260.vkontakte.ru/u2096235/audio/8bb3ab227580.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6594862";s:7:"bitrate";i:192;}i:31;a:6:{s:3:"url";s:58:"http://cs4237.vkontakte.ru/u4893620/audio/08a0b443c0ed.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105461";s:7:"bitrate";i:192;}i:32;a:6:{s:3:"url";s:58:"http://cs4100.vkontakte.ru/u5185072/audio/6059d28b1e20.mp3";s:8:"duration";i:256;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't it the life";s:4:"size";s:7:"6157064";s:7:"bitrate";i:192;}i:33;a:6:{s:3:"url";s:58:"http://cs1596.vkontakte.ru/u5767722/audio/a0fc6d42e6cf.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6119897";s:7:"bitrate";i:192;}i:34;a:6:{s:3:"url";s:58:"http://cs1243.vkontakte.ru/u1019186/audio/5b20c7297895.mp3";s:8:"duration";i:330;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"7943791";s:7:"bitrate";i:192;}i:35;a:6:{s:3:"url";s:59:"http://cs1249.vkontakte.ru/u11362666/audio/ccd39c34af15.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"2482848";s:7:"bitrate";i:80;}i:36;a:6:{s:3:"url";s:58:"http://cs1379.vkontakte.ru/u7357457/audio/b8d211881651.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:37;a:6:{s:3:"url";s:57:"http://cs1275.vkontakte.ru/u504588/audio/cd7cfebf92c2.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:38;a:6:{s:3:"url";s:59:"http://cs5116.vkontakte.ru/u83728716/audio/9958328a6408.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6107136";s:7:"bitrate";i:192;}i:39;a:6:{s:3:"url";s:59:"http://cs4648.vkontakte.ru/u18376175/audio/ffd4abbf5a5a.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105461";s:7:"bitrate";i:192;}i:40;a:6:{s:3:"url";s:59:"http://cs4608.vkontakte.ru/u33381830/audio/781f297d2ea3.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"3059351";s:7:"bitrate";i:96;}i:41;a:6:{s:3:"url";s:59:"http://cs4963.vkontakte.ru/u72309560/audio/c8430a8df135.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It the Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:42;a:6:{s:3:"url";s:59:"http://cs4724.vkontakte.ru/u36382043/audio/11b368de47dc.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105461";s:7:"bitrate";i:192;}i:43;a:6:{s:3:"url";s:57:"http://cs4420.vkontakte.ru/u612088/audio/5f9be958242d.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:17:"Ain`t It The Life";s:4:"size";s:8:"10209748";s:7:"bitrate";i:320;}i:44;a:6:{s:3:"url";s:57:"http://cs4378.vkontakte.ru/u282959/audio/7f0ae64c736c.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:45;a:6:{s:3:"url";s:58:"http://cs4533.vkontakte.ru/u7341726/audio/05eeffa4c890.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6594862";s:7:"bitrate";i:192;}i:46;a:6:{s:3:"url";s:59:"http://cs4547.vkontakte.ru/u35154998/audio/c4de4940a2cf.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6109837";s:7:"bitrate";i:192;}i:47;a:6:{s:3:"url";s:58:"http://cs4510.vkontakte.ru/u7630090/audio/e1697a417c56.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"foo fighters";s:5:"track";s:22:" Ain't It The Life";s:4:"size";s:8:"10209748";s:7:"bitrate";i:320;}i:48;a:6:{s:3:"url";s:57:"http://cs4241.vkontakte.ru/u496530/audio/d26f25181d12.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It the Life";s:4:"size";s:7:"6117114";s:7:"bitrate";i:192;}i:49;a:6:{s:3:"url";s:58:"http://cs4209.vkontakte.ru/u3155505/audio/8e915bd99c13.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:50;a:6:{s:3:"url";s:59:"http://cs4216.vkontakte.ru/u24536801/audio/b17a63c20bed.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6109837";s:7:"bitrate";i:192;}i:51;a:6:{s:3:"url";s:59:"http://cs4099.vkontakte.ru/u18364224/audio/b2143bddcda4.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:52;a:6:{s:3:"url";s:57:"http://cs515.vkontakte.ru/u5447449/audio/c9a2d0224971.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"4066673";s:7:"bitrate";i:128;}i:53;a:6:{s:3:"url";s:56:"http://cs513.vkontakte.ru/u508994/audio/e6dff108e295.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105461";s:7:"bitrate";i:192;}i:54;a:6:{s:3:"url";s:58:"http://cs1712.vkontakte.ru/u2229319/audio/02fbe8eb87a9.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105461";s:7:"bitrate";i:192;}i:55;a:6:{s:3:"url";s:59:"http://cs1755.vkontakte.ru/u11455086/audio/bc1fcb250f69.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105461";s:7:"bitrate";i:192;}i:56;a:6:{s:3:"url";s:58:"http://cs1447.vkontakte.ru/u1019186/audio/5ad74f0dcdd3.mp3";s:8:"duration";i:330;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"7943791";s:7:"bitrate";i:192;}i:57;a:6:{s:3:"url";s:57:"http://cs1446.vkontakte.ru/u629913/audio/5da5a19118ad.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:58;a:6:{s:3:"url";s:58:"http://cs4290.vkontakte.ru/u1822162/audio/087f625820fe.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:8:"10209748";s:7:"bitrate";i:320;}i:59;a:6:{s:3:"url";s:59:"http://cs4780.vkontakte.ru/u16811592/audio/76a690e25ba1.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"8340536";s:7:"bitrate";i:256;}i:60;a:6:{s:3:"url";s:59:"http://cs4886.vkontakte.ru/u10405368/audio/a970b060da59.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:61;a:6:{s:3:"url";s:57:"http://cs4623.vkontakte.ru/u580641/audio/d49ea9780717.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105461";s:7:"bitrate";i:192;}i:62;a:6:{s:3:"url";s:57:"http://cs4638.vkontakte.ru/u432953/audio/a7bf601dca96.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6116684";s:7:"bitrate";i:192;}i:63;a:6:{s:3:"url";s:57:"http://cs4876.vkontakte.ru/u350830/audio/b597a31c5df0.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105741";s:7:"bitrate";i:192;}i:64;a:6:{s:3:"url";s:59:"http://cs4539.vkontakte.ru/u59715510/audio/c78c9915f315.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105461";s:7:"bitrate";i:192;}i:65;a:6:{s:3:"url";s:59:"http://cs4534.vkontakte.ru/u19807015/audio/055b6d92b290.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:66;a:6:{s:3:"url";s:59:"http://cs4490.vkontakte.ru/u22086358/audio/096334423667.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6594862";s:7:"bitrate";i:192;}i:67;a:6:{s:3:"url";s:59:"http://cs4376.vkontakte.ru/u12109002/audio/ea7184930bd1.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6109325";s:7:"bitrate";i:192;}i:68;a:6:{s:3:"url";s:59:"http://cs4241.vkontakte.ru/u29674372/audio/6861e457a0d1.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:69;a:6:{s:3:"url";s:59:"http://cs4243.vkontakte.ru/u11979266/audio/5e5b52afcd9d.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:70;a:6:{s:3:"url";N;s:8:"duration";i:0;s:6:"artist";s:0:"";s:5:"track";s:0:"";s:4:"size";i:0;s:7:"bitrate";i:8;}i:71;a:6:{s:3:"url";s:58:"http://cs1709.vkontakte.ru/u2439578/audio/bb9918bcc947.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6782222";s:7:"bitrate";i:192;}i:72;a:6:{s:3:"url";s:57:"http://cs1750.vkontakte.ru/u958450/audio/12f56d5df220.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:73;a:6:{s:3:"url";s:58:"http://cs1748.vkontakte.ru/u1382218/audio/22f6582f23dd.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:17:"Ain`t it the life";s:4:"size";s:7:"6107136";s:7:"bitrate";i:192;}i:74;a:6:{s:3:"url";s:58:"http://cs1663.vkontakte.ru/u1624344/audio/f036c98fa357.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:75;a:6:{s:3:"url";s:57:"http://cs1625.vkontakte.ru/u915157/audio/8f1d6e667a0c.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It the Life";s:4:"size";s:7:"6117834";s:7:"bitrate";i:192;}i:76;a:6:{s:3:"url";N;s:8:"duration";i:0;s:6:"artist";s:0:"";s:5:"track";s:0:"";s:4:"size";i:0;s:7:"bitrate";i:8;}i:77;a:6:{s:3:"url";s:59:"http://cs1465.vkontakte.ru/u12849447/audio/310a5bc2b3a7.mp3";s:8:"duration";i:330;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"7943791";s:7:"bitrate";i:192;}i:78;a:6:{s:3:"url";s:58:"http://cs1384.vkontakte.ru/u2007987/audio/ce18098a5875.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105461";s:7:"bitrate";i:192;}i:79;a:6:{s:3:"url";s:58:"http://cs1114.vkontakte.ru/u4400438/audio/5d805c903974.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:21:"Ain't It The Life";s:4:"size";s:7:"6105997";s:7:"bitrate";i:192;}i:80;a:6:{s:3:"url";s:58:"http://cs1094.vkontakte.ru/u2043704/audio/4121a2a1a258.mp3";s:8:"duration";i:254;s:6:"artist";s:12:"Foo Fighters";s:5:"track";s:239:"Ain't it the Life                                                                                                                                                                                                            mediagrant.com";s:4:"size";s:7:"6119424";s:7:"bitrate";i:192;}}
\ No newline at end of file
diff --git a/php/dump/data/Jet - Cold Hard Bitch.data b/php/dump/data/Jet - Cold Hard Bitch.data
new file mode 100755
index 0000000..0bde33b
--- /dev/null
+++ b/php/dump/data/Jet - Cold Hard Bitch.data	
@@ -0,0 +1 @@
+a:100:{i:0;a:6:{s:3:"url";s:59:"http://cs4632.vkontakte.ru/u12825062/audio/c12f647b160d.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9743006";s:7:"bitrate";i:320;}i:1;a:6:{s:3:"url";s:58:"http://cs4430.vkontakte.ru/u1038445/audio/ced82dba08f7.mp3";s:8:"duration";i:247;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7930216";s:7:"bitrate";i:256;}i:2;a:6:{s:3:"url";s:59:"http://cs5004.vkontakte.ru/u57199912/audio/804ef22d2f89.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:56:"Cold Hard Bitch (OST She's Out of My League) ⑲";s:4:"size";s:7:"9746928";s:7:"bitrate";i:320;}i:3;a:6:{s:3:"url";s:59:"http://cs4702.vkontakte.ru/u83657719/audio/203444563cc1.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9919593";s:7:"bitrate";i:320;}i:4;a:6:{s:3:"url";s:59:"http://cs4604.vkontakte.ru/u27043360/audio/b6fd5b21663f.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9746928";s:7:"bitrate";i:320;}i:5;a:6:{s:3:"url";s:59:"http://cs4404.vkontakte.ru/u31570864/audio/feeba10359e3.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7296707";s:7:"bitrate";i:224;}i:6;a:6:{s:3:"url";s:58:"http://cs1340.vkontakte.ru/u2848832/audio/0c908ae21297.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5840061";s:7:"bitrate";i:192;}i:7;a:6:{s:3:"url";s:59:"http://cs4887.vkontakte.ru/u35979078/audio/3aaaec40b484.mp3";s:8:"duration";i:184;s:6:"artist";s:22:"Jet (www.Sarzamin.org)";s:5:"track";s:19:"09_ Cold Hard Bitch";s:4:"size";s:7:"7382332";s:7:"bitrate";i:320;}i:8;a:6:{s:3:"url";s:58:"http://cs4641.vkontakte.ru/u4805578/audio/8c151117d4e1.mp3";s:8:"duration";i:244;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5878130";s:7:"bitrate";i:192;}i:9;a:6:{s:3:"url";s:59:"http://cs4598.vkontakte.ru/u15707478/audio/7b2e16c85eec.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5898685";s:7:"bitrate";i:192;}i:10;a:6:{s:3:"url";s:59:"http://cs4828.vkontakte.ru/u17718961/audio/effba2bf1372.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5898685";s:7:"bitrate";i:192;}i:11;a:6:{s:3:"url";s:59:"http://cs5056.vkontakte.ru/u39435480/audio/53649dd50d8c.mp3";s:8:"duration";i:247;s:6:"artist";s:26:"[OST   ] Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7930216";s:7:"bitrate";i:256;}i:12;a:6:{s:3:"url";s:58:"http://cs4651.vkontakte.ru/u3283353/audio/843d941388c8.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"3899392";s:7:"bitrate";i:128;}i:13;a:6:{s:3:"url";s:59:"http://cs5065.vkontakte.ru/u22865514/audio/5455113151ef.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9746928";s:7:"bitrate";i:320;}i:14;a:6:{s:3:"url";s:59:"http://cs5119.vkontakte.ru/u94958921/audio/cc72594c0621.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"3899392";s:7:"bitrate";i:128;}i:15;a:6:{s:3:"url";s:59:"http://cs4755.vkontakte.ru/u27313615/audio/4f9a10926d98.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:43:"Cold Hard Bitch (ost shes out of my league)";s:4:"size";s:7:"9743738";s:7:"bitrate";i:320;}i:16;a:6:{s:3:"url";s:59:"http://cs1444.vkontakte.ru/u10694758/audio/800df6f8fddd.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5843964";s:7:"bitrate";i:192;}i:17;a:6:{s:3:"url";s:59:"http://cs4778.vkontakte.ru/u39339149/audio/d8ed7aa799a9.mp3";s:8:"duration";i:242;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5831657";s:7:"bitrate";i:192;}i:18;a:6:{s:3:"url";s:58:"http://cs4956.vkontakte.ru/u9444952/audio/c60fda9250fa.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9746928";s:7:"bitrate";i:320;}i:19;a:6:{s:3:"url";s:57:"http://cs4891.vkontakte.ru/u749056/audio/9cffa9b48a8a.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9766820";s:7:"bitrate";i:320;}i:20;a:6:{s:3:"url";s:58:"http://cs4997.vkontakte.ru/u9611729/audio/45ba195757a1.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"3970395";s:7:"bitrate";i:128;}i:21;a:6:{s:3:"url";s:59:"http://cs4633.vkontakte.ru/u31379958/audio/e8340d92d690.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5843964";s:7:"bitrate";i:192;}i:22;a:6:{s:3:"url";s:58:"http://cs4237.vkontakte.ru/u2757309/audio/b688241c8853.mp3";s:8:"duration";i:247;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7930216";s:7:"bitrate";i:256;}i:23;a:6:{s:3:"url";s:59:"http://cs5124.vkontakte.ru/u21426696/audio/bffc406e2f2f.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"3899392";s:7:"bitrate";i:128;}i:24;a:6:{s:3:"url";s:58:"http://cs5078.vkontakte.ru/u6025258/audio/21d630325dec.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7120658";s:7:"bitrate";i:224;}i:25;a:6:{s:3:"url";s:59:"http://cs4954.vkontakte.ru/u10495200/audio/d9a92fcc1de5.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9746928";s:7:"bitrate";i:320;}i:26;a:6:{s:3:"url";s:59:"http://cs4884.vkontakte.ru/u24101051/audio/91c8b3ccbf6e.mp3";s:8:"duration";i:247;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7927014";s:7:"bitrate";i:256;}i:27;a:6:{s:3:"url";s:58:"http://cs4659.vkontakte.ru/u4402598/audio/e3b7f978f188.mp3";s:8:"duration";i:242;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"6090761";s:7:"bitrate";i:192;}i:28;a:6:{s:3:"url";s:58:"http://cs1338.vkontakte.ru/u8581125/audio/1f7dba99ab5a.mp3";s:8:"duration";i:245;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9820198";s:7:"bitrate";i:320;}i:29;a:6:{s:3:"url";s:57:"http://cs1338.vkontakte.ru/u452029/audio/4b6582a9bec0.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7120658";s:7:"bitrate";i:224;}i:30;a:6:{s:3:"url";s:59:"http://cs4840.vkontakte.ru/u11011111/audio/9d8588cc692d.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5843964";s:7:"bitrate";i:192;}i:31;a:6:{s:3:"url";s:58:"http://cs5020.vkontakte.ru/u7580938/audio/37094b7224cc.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5839934";s:7:"bitrate";i:192;}i:32;a:6:{s:3:"url";s:59:"http://cs4997.vkontakte.ru/u19575062/audio/697b6fab0295.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"3909414";s:7:"bitrate";i:128;}i:33;a:6:{s:3:"url";s:59:"http://cs4776.vkontakte.ru/u23969382/audio/fdca9eef7aec.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"3916740";s:7:"bitrate";i:128;}i:34;a:6:{s:3:"url";s:57:"http://cs4703.vkontakte.ru/u262724/audio/3f8b245c9805.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"6772104";s:7:"bitrate";i:224;}i:35;a:6:{s:3:"url";s:59:"http://cs4629.vkontakte.ru/u61175306/audio/e9c8ce1f4171.mp3";s:8:"duration";i:247;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7930856";s:7:"bitrate";i:256;}i:36;a:6:{s:3:"url";s:57:"http://cs4430.vkontakte.ru/u333070/audio/79ba1ff6d50f.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5898685";s:7:"bitrate";i:192;}i:37;a:6:{s:3:"url";s:59:"http://cs4423.vkontakte.ru/u29167510/audio/e76417415e3a.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"3916852";s:7:"bitrate";i:128;}i:38;a:6:{s:3:"url";s:58:"http://cs4291.vkontakte.ru/u6091415/audio/dc556f77f56c.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9766820";s:7:"bitrate";i:320;}i:39;a:6:{s:3:"url";s:58:"http://cs4197.vkontakte.ru/u8838990/audio/14c030f7303e.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7120658";s:7:"bitrate";i:224;}i:40;a:6:{s:3:"url";s:59:"http://cs4109.vkontakte.ru/u25479238/audio/2ec3bee0c9d1.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"cold hard bitch";s:4:"size";s:7:"5840318";s:7:"bitrate";i:192;}i:41;a:6:{s:3:"url";s:58:"http://cs1751.vkontakte.ru/u2710188/audio/1387660afbb1.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"3921092";s:7:"bitrate";i:128;}i:42;a:6:{s:3:"url";s:58:"http://cs1628.vkontakte.ru/u7616673/audio/e3912323ef79.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7120658";s:7:"bitrate";i:224;}i:43;a:6:{s:3:"url";s:59:"http://cs4768.vkontakte.ru/u35789401/audio/1546d43c1d87.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"JET";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"8888846";s:7:"bitrate";i:256;}i:44;a:6:{s:3:"url";s:59:"http://cs5065.vkontakte.ru/u13692413/audio/bee8e08f4a9a.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9746928";s:7:"bitrate";i:320;}i:45;a:6:{s:3:"url";s:59:"http://cs4956.vkontakte.ru/u59278907/audio/44b6e5f5ac6c.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9746928";s:7:"bitrate";i:320;}i:46;a:6:{s:3:"url";s:59:"http://cs4617.vkontakte.ru/u49904555/audio/fb2fb980cc77.mp3";s:8:"duration";i:242;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5831657";s:7:"bitrate";i:192;}i:47;a:6:{s:3:"url";s:59:"http://cs4432.vkontakte.ru/u10409323/audio/747c5bb6e34f.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"JET";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"8888846";s:7:"bitrate";i:256;}i:48;a:6:{s:3:"url";s:59:"http://cs4510.vkontakte.ru/u13607025/audio/33c89506a32a.mp3";s:8:"duration";i:242;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5836255";s:7:"bitrate";i:192;}i:49;a:6:{s:3:"url";s:58:"http://cs4494.vkontakte.ru/u2767728/audio/53dfdde27421.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5898685";s:7:"bitrate";i:192;}i:50;a:6:{s:3:"url";s:58:"http://cs4423.vkontakte.ru/u1407118/audio/76c3558ebaff.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold hard bitch";s:4:"size";s:7:"3895296";s:7:"bitrate";i:128;}i:51;a:6:{s:3:"url";s:59:"http://cs4271.vkontakte.ru/u11574485/audio/ba4756e640d4.mp3";s:8:"duration";i:245;s:6:"artist";s:3:"JET";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7884868";s:7:"bitrate";i:256;}i:52;a:6:{s:3:"url";s:59:"http://cs4221.vkontakte.ru/u27660002/audio/57638bccf013.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5838949";s:7:"bitrate";i:192;}i:53;a:6:{s:3:"url";s:58:"http://cs1477.vkontakte.ru/u1814870/audio/c79b7c9b82f8.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5843964";s:7:"bitrate";i:192;}i:54;a:6:{s:3:"url";s:58:"http://cs1054.vkontakte.ru/u2633440/audio/59bb66dede9b.mp3";s:8:"duration";i:272;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"6293692";s:7:"bitrate";i:160;}i:55;a:6:{s:3:"url";s:57:"http://cs4588.vkontakte.ru/u619316/audio/d7380a0b4fc9.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5856588";s:7:"bitrate";i:192;}i:56;a:6:{s:3:"url";s:59:"http://cs5116.vkontakte.ru/u99199932/audio/2cda8a4c15e2.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5898685";s:7:"bitrate";i:192;}i:57;a:6:{s:3:"url";s:59:"http://cs4995.vkontakte.ru/u88791987/audio/aa8a9fe1e797.mp3";s:8:"duration";i:242;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5831657";s:7:"bitrate";i:192;}i:58;a:6:{s:3:"url";s:58:"http://cs5066.vkontakte.ru/u5969821/audio/e51c1dd99c86.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9746928";s:7:"bitrate";i:320;}i:59;a:6:{s:3:"url";s:59:"http://cs4780.vkontakte.ru/u20573158/audio/5fb037ed5bd6.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5898685";s:7:"bitrate";i:192;}i:60;a:6:{s:3:"url";s:59:"http://cs5055.vkontakte.ru/u66951604/audio/4dd476c82534.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9736625";s:7:"bitrate";i:320;}i:61;a:6:{s:3:"url";s:59:"http://cs4586.vkontakte.ru/u59473664/audio/d26e955b7446.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5898685";s:7:"bitrate";i:192;}i:62;a:6:{s:3:"url";s:58:"http://cs4647.vkontakte.ru/u4501671/audio/38c47bde5b50.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7120864";s:7:"bitrate";i:224;}i:63;a:6:{s:3:"url";s:57:"http://cs4292.vkontakte.ru/u269661/audio/2378c1862c29.mp3";s:8:"duration";i:228;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5475440";s:7:"bitrate";i:192;}i:64;a:6:{s:3:"url";s:58:"http://cs4376.vkontakte.ru/u3821514/audio/9bba32c1fe61.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5898685";s:7:"bitrate";i:192;}i:65;a:6:{s:3:"url";s:56:"http://cs4268.vkontakte.ru/u67110/audio/3c1d88a72a74.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"3916740";s:7:"bitrate";i:128;}i:66;a:6:{s:3:"url";s:58:"http://cs1618.vkontakte.ru/u3878548/audio/5af2708b19d3.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5840170";s:7:"bitrate";i:192;}i:67;a:6:{s:3:"url";s:58:"http://cs1629.vkontakte.ru/u6449390/audio/d57124879647.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5855994";s:7:"bitrate";i:192;}i:68;a:6:{s:3:"url";s:57:"http://cs1338.vkontakte.ru/u477789/audio/3f0630026415.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7315811";s:7:"bitrate";i:224;}i:69;a:6:{s:3:"url";s:58:"http://cs4886.vkontakte.ru/u4764532/audio/d72b60fd70be.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7120658";s:7:"bitrate";i:224;}i:70;a:6:{s:3:"url";s:58:"http://cs4695.vkontakte.ru/u5820074/audio/e55a835cfd6c.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5840896";s:7:"bitrate";i:192;}i:71;a:6:{s:3:"url";s:59:"http://cs4898.vkontakte.ru/u16760420/audio/5d5a8a08988f.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"JET";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"8888846";s:7:"bitrate";i:256;}i:72;a:6:{s:3:"url";s:59:"http://cs4830.vkontakte.ru/u36500530/audio/a50b2473aafd.mp3";s:8:"duration";i:242;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5835634";s:7:"bitrate";i:192;}i:73;a:6:{s:3:"url";s:57:"http://cs4876.vkontakte.ru/u918286/audio/8513dcf4c804.mp3";s:8:"duration";i:247;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7930216";s:7:"bitrate";i:256;}i:74;a:6:{s:3:"url";s:58:"http://cs4828.vkontakte.ru/u7128948/audio/ceec36f79e19.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7215433";s:7:"bitrate";i:224;}i:75;a:6:{s:3:"url";s:58:"http://cs4877.vkontakte.ru/u1899253/audio/d41c83f31573.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"3895424";s:7:"bitrate";i:128;}i:76;a:6:{s:3:"url";s:59:"http://cs4637.vkontakte.ru/u46261009/audio/76a38f93d298.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9746928";s:7:"bitrate";i:320;}i:77;a:6:{s:3:"url";s:59:"http://cs4815.vkontakte.ru/u14965436/audio/26cc11901b9c.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5898685";s:7:"bitrate";i:192;}i:78;a:6:{s:3:"url";s:59:"http://cs4822.vkontakte.ru/u15147176/audio/9efd4394e4f5.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"3899392";s:7:"bitrate";i:128;}i:79;a:6:{s:3:"url";s:58:"http://cs4663.vkontakte.ru/u1573899/audio/1400e523932b.mp3";s:8:"duration";i:247;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7930216";s:7:"bitrate";i:256;}i:80;a:6:{s:3:"url";s:59:"http://cs4767.vkontakte.ru/u26212169/audio/c9a07b1fd9d8.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5840170";s:7:"bitrate";i:192;}i:81;a:6:{s:3:"url";s:58:"http://cs4588.vkontakte.ru/u1597871/audio/53ab7fc241e0.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"3894472";s:7:"bitrate";i:128;}i:82;a:6:{s:3:"url";s:58:"http://cs4420.vkontakte.ru/u3111033/audio/ece3570f1331.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"JET";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9738240";s:7:"bitrate";i:320;}i:83;a:6:{s:3:"url";s:58:"http://cs4509.vkontakte.ru/u3396750/audio/91ffcfc72d6c.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9919593";s:7:"bitrate";i:320;}i:84;a:6:{s:3:"url";s:59:"http://cs4353.vkontakte.ru/u20321771/audio/4610d6b455ed.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"3909414";s:7:"bitrate";i:128;}i:85;a:6:{s:3:"url";s:58:"http://cs4197.vkontakte.ru/u8838990/audio/715aaa4ad7b3.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7120658";s:7:"bitrate";i:224;}i:86;a:6:{s:3:"url";s:59:"http://cs4223.vkontakte.ru/u30418144/audio/4b4715ad4201.mp3";s:8:"duration";i:247;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"7930216";s:7:"bitrate";i:256;}i:87;a:6:{s:3:"url";s:57:"http://cs1545.vkontakte.ru/u160854/audio/6b165b3ced2e.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5840170";s:7:"bitrate";i:192;}i:88;a:6:{s:3:"url";s:58:"http://cs1333.vkontakte.ru/u7978037/audio/654fa1ec990b.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"6067702";s:7:"bitrate";i:192;}i:89;a:6:{s:3:"url";s:59:"http://cs4999.vkontakte.ru/u33928259/audio/29c43dc2eddc.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold hard bitch";s:4:"size";s:7:"5843964";s:7:"bitrate";i:192;}i:90;a:6:{s:3:"url";s:58:"http://cs4762.vkontakte.ru/u9793003/audio/1360fee25838.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5898685";s:7:"bitrate";i:192;}i:91;a:6:{s:3:"url";s:58:"http://cs4778.vkontakte.ru/u6335705/audio/a9601e924592.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"JET";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"8888846";s:7:"bitrate";i:256;}i:92;a:6:{s:3:"url";s:59:"http://cs5016.vkontakte.ru/u27590440/audio/0e9adffd3f8b.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9746928";s:7:"bitrate";i:320;}i:93;a:6:{s:3:"url";s:56:"http://cs4769.vkontakte.ru/u34277/audio/8e35e7f7e071.mp3";s:8:"duration";i:272;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"6294204";s:7:"bitrate";i:160;}i:94;a:6:{s:3:"url";s:58:"http://cs4767.vkontakte.ru/u2365578/audio/3e55a55aa799.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5842109";s:7:"bitrate";i:192;}i:95;a:6:{s:3:"url";s:59:"http://cs4767.vkontakte.ru/u25341937/audio/dc590669eeab.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"3926162";s:7:"bitrate";i:128;}i:96;a:6:{s:3:"url";s:59:"http://cs4610.vkontakte.ru/u53097969/audio/4fe9714c5565.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9746928";s:7:"bitrate";i:320;}i:97;a:6:{s:3:"url";s:56:"http://cs4593.vkontakte.ru/u32198/audio/2c63fe3563f0.mp3";s:8:"duration";i:242;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"9724120";s:7:"bitrate";i:320;}i:98;a:6:{s:3:"url";s:59:"http://cs4703.vkontakte.ru/u28829505/audio/6e483d3434f1.mp3";s:8:"duration";i:242;s:6:"artist";s:3:"Jet";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"5831657";s:7:"bitrate";i:192;}i:99;a:6:{s:3:"url";s:59:"http://cs4406.vkontakte.ru/u54715806/audio/13e9298790b9.mp3";s:8:"duration";i:243;s:6:"artist";s:3:"JET";s:5:"track";s:15:"Cold Hard Bitch";s:4:"size";s:7:"8888846";s:7:"bitrate";i:256;}}
\ No newline at end of file
diff --git a/php/dump/data/Jet - Timothy.data b/php/dump/data/Jet - Timothy.data
new file mode 100755
index 0000000..7bc327a
--- /dev/null
+++ b/php/dump/data/Jet - Timothy.data	
@@ -0,0 +1 @@
+a:100:{i:0;a:6:{s:3:"url";s:59:"http://cs4543.vkontakte.ru/u17636245/audio/cc9f031b9633.mp3";s:8:"duration";i:290;s:6:"artist";s:16:"♫Timbaland";s:5:"track";s:34:"Timothy Where You Been (feat. Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:1;a:6:{s:3:"url";s:59:"http://cs5022.vkontakte.ru/u34810758/audio/d84b1d161fb9.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where You Been (feat. Jet)";s:4:"size";s:8:"11688930";s:7:"bitrate";i:320;}i:2;a:6:{s:3:"url";s:58:"http://cs5011.vkontakte.ru/u6352431/audio/ce7824aae933.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:39:"Timothy Where Have You Been (feat. Jet)";s:4:"size";s:8:"11632512";s:7:"bitrate";i:320;}i:3;a:6:{s:3:"url";s:59:"http://cs4656.vkontakte.ru/u10398445/audio/62b96f8b0636.mp3";s:8:"duration";i:290;s:6:"artist";s:11:" Timbaland ";s:5:"track";s:34:"Timothy Where Have You Been w. Jet";s:4:"size";s:7:"9305512";s:7:"bitrate";i:256;}i:4;a:6:{s:3:"url";s:59:"http://cs4833.vkontakte.ru/u50870839/audio/9b2353594b20.mp3";s:8:"duration";i:261;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where You Been (Feat. Jet)";s:4:"size";s:7:"5921638";s:7:"bitrate";i:160;}i:5;a:6:{s:3:"url";s:59:"http://cs4589.vkontakte.ru/u12644025/audio/9c8b9ae138ab.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where Have You Been w. Jet";s:4:"size";s:8:"11631761";s:7:"bitrate";i:320;}i:6;a:6:{s:3:"url";s:59:"http://cs4646.vkontakte.ru/u17636245/audio/10faf5eb33c1.mp3";s:8:"duration";i:290;s:6:"artist";s:19:"Timbaland & Jet";s:5:"track";s:22:"Timothy Where You Been";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:7;a:6:{s:3:"url";s:58:"http://cs4621.vkontakte.ru/u8038599/audio/c033297c86f3.mp3";s:8:"duration";i:290;s:6:"artist";s:34:"Timbaland feat. The Jet & JoJo";s:5:"track";s:27:"Timothy Where Have You Been";s:4:"size";s:7:"9305512";s:7:"bitrate";i:256;}i:8;a:6:{s:3:"url";s:59:"http://cs4997.vkontakte.ru/u19575062/audio/ce9ab553904a.mp3";s:8:"duration";i:270;s:6:"artist";s:3:"Jet";s:5:"track";s:7:"Timothy";s:4:"size";s:7:"4341986";s:7:"bitrate";i:128;}i:9;a:6:{s:3:"url";s:59:"http://cs4897.vkontakte.ru/u36385196/audio/489ae6773dc5.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:10;a:6:{s:3:"url";s:57:"http://cs4778.vkontakte.ru/u778815/audio/40fbc1c942ee.mp3";s:8:"duration";i:270;s:6:"artist";s:3:"Jet";s:5:"track";s:7:"Timothy";s:4:"size";s:7:"6489071";s:7:"bitrate";i:192;}i:11;a:6:{s:3:"url";s:59:"http://cs4597.vkontakte.ru/u86880149/audio/2c83cebb01fa.mp3";s:8:"duration";i:261;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where You Been (Feat. Jet)";s:4:"size";s:7:"5921638";s:7:"bitrate";i:160;}i:12;a:6:{s:3:"url";s:58:"http://cs4500.vkontakte.ru/u3165645/audio/6bf8280f0dc6.mp3";s:8:"duration";i:290;s:6:"artist";s:19:"Timbaland feat. Jet";s:5:"track";s:22:"Timothy Where You Been";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:13;a:6:{s:3:"url";s:58:"http://cs4634.vkontakte.ru/u9740646/audio/0c8c91d6ab81.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:61:"Timothy Where You Been (featuring Jet) ( Shock Value 2 -2009)";s:4:"size";s:7:"7713656";s:7:"bitrate";i:192;}i:14;a:6:{s:3:"url";s:57:"http://cs1336.vkontakte.ru/u220657/audio/fca05d116846.mp3";s:8:"duration";i:270;s:6:"artist";s:3:"Jet";s:5:"track";s:7:"Timothy";s:4:"size";s:7:"4341986";s:7:"bitrate";i:128;}i:15;a:6:{s:3:"url";s:59:"http://cs4525.vkontakte.ru/u20742458/audio/dda52441655d.mp3";s:8:"duration";i:290;s:6:"artist";s:17:"Timbaland ft. Jet";s:5:"track";s:44:"Timothy Where You Been (Shock Value II 2009)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:16;a:6:{s:3:"url";s:59:"http://cs5006.vkontakte.ru/u15982768/audio/a68cc9ddb8c1.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where You Been (Feat. Jet)";s:4:"size";s:7:"8036957";s:7:"bitrate";i:224;}i:17;a:6:{s:3:"url";s:59:"http://cs4663.vkontakte.ru/u43242404/audio/beac33f4398d.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:18;a:6:{s:3:"url";s:58:"http://cs4775.vkontakte.ru/u3356008/audio/2f11a965c780.mp3";s:8:"duration";i:290;s:6:"artist";s:19:"Timbaland feat. Jet";s:5:"track";s:28:"Timothy Where Have You Been ";s:4:"size";s:8:"11632070";s:7:"bitrate";i:320;}i:19;a:6:{s:3:"url";s:58:"http://cs4877.vkontakte.ru/u6422029/audio/11598b660a5a.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where You Been (feat. Jet)";s:4:"size";s:7:"7767303";s:7:"bitrate";i:192;}i:20;a:6:{s:3:"url";s:58:"http://cs4608.vkontakte.ru/u6369295/audio/99dd76483d47.mp3";s:8:"duration";i:292;s:6:"artist";s:20:"Timbaland (with Jet)";s:5:"track";s:34:"Timothy Where Have You Been (2009)";s:4:"size";s:7:"9368137";s:7:"bitrate";i:256;}i:21;a:6:{s:3:"url";s:59:"http://cs4895.vkontakte.ru/u77870754/audio/7f4337e3c2f0.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:33:"Timothy Where You Been (With Jet)";s:4:"size";s:8:"11631761";s:7:"bitrate";i:320;}i:22;a:6:{s:3:"url";s:59:"http://cs4434.vkontakte.ru/u16122812/audio/a2449de9a3e2.mp3";s:8:"duration";i:270;s:6:"artist";s:3:"Jet";s:5:"track";s:7:"Timothy";s:4:"size";s:7:"6511577";s:7:"bitrate";i:192;}i:23;a:6:{s:3:"url";s:59:"http://cs4997.vkontakte.ru/u19575062/audio/ce9ab553904a.mp3";s:8:"duration";i:270;s:6:"artist";s:3:"Jet";s:5:"track";s:46:"Timothy(      )";s:4:"size";s:7:"4341986";s:7:"bitrate";i:128;}i:24;a:6:{s:3:"url";s:58:"http://cs4499.vkontakte.ru/u2705819/audio/2b7b3974f35f.mp3";s:8:"duration";i:270;s:6:"artist";s:3:"Jet";s:5:"track";s:7:"Timothy";s:4:"size";s:7:"6489152";s:7:"bitrate";i:192;}i:25;a:6:{s:3:"url";s:59:"http://cs5024.vkontakte.ru/u17793470/audio/8b812daaea95.mp3";s:8:"duration";i:270;s:6:"artist";s:3:"Jet";s:5:"track";s:7:"Timothy";s:4:"size";s:7:"4341986";s:7:"bitrate";i:128;}i:26;a:6:{s:3:"url";s:59:"http://cs4646.vkontakte.ru/u17636245/audio/10faf5eb33c1.mp3";s:8:"duration";i:290;s:6:"artist";s:3:"Jet";s:5:"track";s:29:"Timothy (Where have You Been)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:27;a:6:{s:3:"url";s:59:"http://cs4720.vkontakte.ru/u62300406/audio/e9e840a5eda0.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:28;a:6:{s:3:"url";s:58:"http://cs4834.vkontakte.ru/u5651047/audio/630a22a30f4b.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where You Been (feat. Jet)";s:4:"size";s:8:"11630003";s:7:"bitrate";i:320;}i:29;a:6:{s:3:"url";s:58:"http://cs4771.vkontakte.ru/u2824626/audio/78c7ea82f3e4.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7782309";s:7:"bitrate";i:192;}i:30;a:6:{s:3:"url";s:58:"http://cs4639.vkontakte.ru/u3977851/audio/de9b1caf805f.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where Have You Been w. Jet";s:4:"size";s:7:"9777728";s:7:"bitrate";i:256;}i:31;a:6:{s:3:"url";s:58:"http://cs4263.vkontakte.ru/u4529820/audio/dbb02759c628.mp3";s:8:"duration";i:270;s:6:"artist";s:3:"Jet";s:5:"track";s:7:"Timothy";s:4:"size";s:7:"5404878";s:7:"bitrate";i:160;}i:32;a:6:{s:3:"url";s:59:"http://cs4722.vkontakte.ru/u16677540/audio/30b9ef05e273.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7712513";s:7:"bitrate";i:192;}i:33;a:6:{s:3:"url";s:58:"http://cs4623.vkontakte.ru/u4947633/audio/af3ebdcf580e.mp3";s:8:"duration";i:261;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where You Been (Feat. Jet)";s:4:"size";s:7:"5921638";s:7:"bitrate";i:160;}i:34;a:6:{s:3:"url";s:59:"http://cs4723.vkontakte.ru/u59670684/audio/89e8b59f45d2.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:35;a:6:{s:3:"url";s:58:"http://cs4639.vkontakte.ru/u2122458/audio/7bb1a7bed801.mp3";s:8:"duration";i:270;s:6:"artist";s:3:"Jet";s:5:"track";s:7:"Timothy";s:4:"size";s:7:"6520433";s:7:"bitrate";i:192;}i:36;a:6:{s:3:"url";s:59:"http://cs4588.vkontakte.ru/u53427638/audio/b48d3b8becf9.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:37;a:6:{s:3:"url";s:57:"http://cs4606.vkontakte.ru/u907799/audio/f0cb13935f21.mp3";s:8:"duration";i:290;s:6:"artist";s:19:"Timbaland Feat. Jet";s:5:"track";s:33:"Timothy Where You Been (2oO9).mp3";s:4:"size";s:7:"5660094";s:7:"bitrate";i:144;}i:38;a:6:{s:3:"url";s:59:"http://cs4720.vkontakte.ru/u16661641/audio/80a24a0c6a52.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:39;a:6:{s:3:"url";s:59:"http://cs4512.vkontakte.ru/u61453277/audio/64304033db3f.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where You Been (feat. Jet)";s:4:"size";s:7:"9965703";s:7:"bitrate";i:256;}i:40;a:6:{s:3:"url";s:59:"http://cs4518.vkontakte.ru/u57668735/audio/b06415e4137c.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:41;a:6:{s:3:"url";s:58:"http://cs4372.vkontakte.ru/u2233047/audio/6f329eb2bbe5.mp3";s:8:"duration";i:290;s:6:"artist";s:19:"Timbaland & Jet";s:5:"track";s:22:"Timothy Where You Been";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:42;a:6:{s:3:"url";s:59:"http://cs4431.vkontakte.ru/u15916473/audio/8d7eccdb7779.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:61:"Timothy Where You Been (featuring Jet) ( Shock Value 2 -2009)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:43;a:6:{s:3:"url";s:59:"http://cs4535.vkontakte.ru/u22693023/audio/dcfe0f9c5884.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7753728";s:7:"bitrate";i:192;}i:44;a:6:{s:3:"url";s:57:"http://cs4353.vkontakte.ru/u605577/audio/f2fccfb437ac.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where You Been (feat. Jet)";s:4:"size";s:7:"7714797";s:7:"bitrate";i:192;}i:45;a:6:{s:3:"url";s:57:"http://cs4832.vkontakte.ru/u625046/audio/3f5f6a6dc091.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where Have You Been w. Jet";s:4:"size";s:8:"11632070";s:7:"bitrate";i:320;}i:46;a:6:{s:3:"url";s:59:"http://cs5007.vkontakte.ru/u83059255/audio/a9887bafe23f.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:47;a:6:{s:3:"url";s:58:"http://cs4815.vkontakte.ru/u2729225/audio/bb1df89c0ae8.mp3";s:8:"duration";i:290;s:6:"artist";s:19:"Timbaland Feat. Jet";s:5:"track";s:22:"Timothy Where You Been";s:4:"size";s:7:"7712385";s:7:"bitrate";i:192;}i:48;a:6:{s:3:"url";s:59:"http://cs4713.vkontakte.ru/u87378972/audio/7fdf65032e2d.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"6987939";s:7:"bitrate";i:192;}i:49;a:6:{s:3:"url";s:59:"http://cs4900.vkontakte.ru/u46889970/audio/2528b2e0680e.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713870";s:7:"bitrate";i:192;}i:50;a:6:{s:3:"url";s:58:"http://cs4627.vkontakte.ru/u2009313/audio/f29103f962db.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where Have You Been w. Jet";s:4:"size";s:8:"11632070";s:7:"bitrate";i:320;}i:51;a:6:{s:3:"url";s:58:"http://cs4758.vkontakte.ru/u3350817/audio/a7994475f952.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7780581";s:7:"bitrate";i:192;}i:52;a:6:{s:3:"url";s:58:"http://cs4643.vkontakte.ru/u5011043/audio/be95ad19ef6f.mp3";s:8:"duration";i:290;s:6:"artist";s:17:"Timbaland ft. Jet";s:5:"track";s:22:"Timothy Where You Been";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:53;a:6:{s:3:"url";s:59:"http://cs4756.vkontakte.ru/u20514770/audio/0b8249f4a927.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where Have You Been w. Jet";s:4:"size";s:7:"9495232";s:7:"bitrate";i:256;}i:54;a:6:{s:3:"url";s:59:"http://cs4489.vkontakte.ru/u17437050/audio/168bfdcfce87.mp3";s:8:"duration";i:291;s:6:"artist";s:19:"Timbaland & Jet";s:5:"track";s:29:"Timothy (Where Have You Been)";s:4:"size";s:7:"9410954";s:7:"bitrate";i:256;}i:55;a:6:{s:3:"url";s:59:"http://cs4624.vkontakte.ru/u11742661/audio/3ef1ecd3481b.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:56;a:6:{s:3:"url";s:59:"http://cs4609.vkontakte.ru/u19065947/audio/e2de1f2a6b04.mp3";s:8:"duration";i:290;s:6:"artist";s:19:"Timbaland feat. Jet";s:5:"track";s:22:"Timothy Where You Been";s:4:"size";s:7:"7772160";s:7:"bitrate";i:192;}i:57;a:6:{s:3:"url";s:59:"http://cs4546.vkontakte.ru/u32560085/audio/cd2b0bb2a93b.mp3";s:8:"duration";i:290;s:6:"artist";s:19:"Timbaland feat. Jet";s:5:"track";s:22:"Timothy Where You Been";s:4:"size";s:7:"7772160";s:7:"bitrate";i:192;}i:58;a:6:{s:3:"url";s:58:"http://cs4661.vkontakte.ru/u9122466/audio/1b76ed19510e.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where You Been (Feat. Jet)";s:4:"size";s:7:"8036957";s:7:"bitrate";i:224;}i:59;a:6:{s:3:"url";s:59:"http://cs4518.vkontakte.ru/u35743986/audio/926818f06054.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:32:"Timothy Where You Been (Ft. Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:60;a:6:{s:3:"url";s:58:"http://cs4710.vkontakte.ru/u7889910/audio/9b42b4afc37b.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where Have You Been w. Jet";s:4:"size";s:8:"11632070";s:7:"bitrate";i:320;}i:61;a:6:{s:3:"url";s:59:"http://cs4955.vkontakte.ru/u13315469/audio/dab16fd821c0.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where Have You Been w. Jet";s:4:"size";s:8:"11632070";s:7:"bitrate";i:320;}i:62;a:6:{s:3:"url";s:59:"http://cs4591.vkontakte.ru/u92003885/audio/a391c616ed60.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where Have You Been w. Jet";s:4:"size";s:8:"11631761";s:7:"bitrate";i:320;}i:63;a:6:{s:3:"url";s:58:"http://cs5004.vkontakte.ru/u2256653/audio/1becc1ae27c2.mp3";s:8:"duration";i:290;s:6:"artist";s:17:"Timbaland ft. Jet";s:5:"track";s:22:"Timothy Where You Been";s:4:"size";s:7:"7772160";s:7:"bitrate";i:192;}i:64;a:6:{s:3:"url";s:59:"http://cs4614.vkontakte.ru/u72122339/audio/6dc30ae2c23f.mp3";s:8:"duration";i:272;s:6:"artist";s:3:"Jet";s:5:"track";s:7:"Timothy";s:4:"size";s:7:"4362240";s:7:"bitrate";i:128;}i:65;a:6:{s:3:"url";s:59:"http://cs4961.vkontakte.ru/u44767726/audio/3ca717b1e008.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:66;a:6:{s:3:"url";s:59:"http://cs4606.vkontakte.ru/u34186289/audio/d0deb222fa1e.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:67;a:6:{s:3:"url";s:59:"http://cs5007.vkontakte.ru/u65400908/audio/e30742637583.mp3";s:8:"duration";i:290;s:6:"artist";s:19:"Timbaland feat. Jet";s:5:"track";s:22:"Timothy Where You Been";s:4:"size";s:7:"7772160";s:7:"bitrate";i:192;}i:68;a:6:{s:3:"url";s:59:"http://cs4781.vkontakte.ru/u35139418/audio/d66f6c4876a5.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7753728";s:7:"bitrate";i:192;}i:69;a:6:{s:3:"url";s:59:"http://cs4647.vkontakte.ru/u17471388/audio/11db7416dc02.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where Have You Been w. Jet";s:4:"size";s:7:"9777728";s:7:"bitrate";i:256;}i:70;a:6:{s:3:"url";s:59:"http://cs4512.vkontakte.ru/u61453277/audio/64304033db3f.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:35:"Timothy Where You Been (feat. Jet)";s:4:"size";s:7:"9965703";s:7:"bitrate";i:256;}i:71;a:6:{s:3:"url";s:59:"http://cs4723.vkontakte.ru/u59670684/audio/89e8b59f45d2.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:72;a:6:{s:3:"url";s:59:"http://cs4514.vkontakte.ru/u31953442/audio/9e3a7ce26881.mp3";s:8:"duration";i:290;s:6:"artist";s:19:"Timbaland feat. Jet";s:5:"track";s:22:"Timothy Where You Been";s:4:"size";s:7:"7772160";s:7:"bitrate";i:192;}i:73;a:6:{s:3:"url";s:59:"http://cs4500.vkontakte.ru/u22890920/audio/8af2b9923ac2.mp3";s:8:"duration";i:290;s:6:"artist";s:19:"Timbaland feat. Jet";s:5:"track";s:22:"Timothy Where You Been";s:4:"size";s:7:"7903537";s:7:"bitrate";i:192;}i:74;a:6:{s:3:"url";s:59:"http://cs4607.vkontakte.ru/u19907081/audio/79b07f04a9f0.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:75;a:6:{s:3:"url";s:58:"http://cs4623.vkontakte.ru/u6571171/audio/7ab183bb2828.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:76;a:6:{s:3:"url";s:59:"http://cs4523.vkontakte.ru/u10037439/audio/b21ad1f1c1c0.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:77;a:6:{s:3:"url";s:59:"http://cs4492.vkontakte.ru/u36760203/audio/cd4289d73b4a.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:32:"Timothy Where You Been (Ft. Jet)";s:4:"size";s:7:"7782115";s:7:"bitrate";i:192;}i:78;a:6:{s:3:"url";s:59:"http://cs4518.vkontakte.ru/u35743986/audio/926818f06054.mp3";s:8:"duration";i:290;s:6:"artist";s:17:"Timbaland Ft. Jet";s:5:"track";s:23:"Timothy Where You Been ";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:79;a:6:{s:3:"url";s:59:"http://cs4635.vkontakte.ru/u13893416/audio/c83697a3118a.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:80;a:6:{s:3:"url";s:59:"http://cs4526.vkontakte.ru/u11833882/audio/49abb718c313.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7753728";s:7:"bitrate";i:192;}i:81;a:6:{s:3:"url";s:59:"http://cs4490.vkontakte.ru/u18840447/audio/b7d2f2abeb6f.mp3";s:8:"duration";i:290;s:6:"artist";s:19:"Timbaland Feat. Jet";s:5:"track";s:29:"Timothy Where You Been (2oO9)";s:4:"size";s:7:"5660094";s:7:"bitrate";i:144;}i:82;a:6:{s:3:"url";s:57:"http://cs4262.vkontakte.ru/u160549/audio/8e22e6c95fc7.mp3";s:8:"duration";i:270;s:6:"artist";s:3:"Jet";s:5:"track";s:7:"Timothy";s:4:"size";s:7:"6483968";s:7:"bitrate";i:192;}i:83;a:6:{s:3:"url";N;s:8:"duration";i:0;s:6:"artist";s:0:"";s:5:"track";s:0:"";s:4:"size";i:0;s:7:"bitrate";i:8;}i:84;a:6:{s:3:"url";s:60:"http://cs4959.vkontakte.ru/u109787560/audio/e0b603312efd.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:85;a:6:{s:3:"url";s:59:"http://cs4955.vkontakte.ru/u23707835/audio/27f1ef9b599a.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7740170";s:7:"bitrate";i:192;}i:86;a:6:{s:3:"url";s:59:"http://cs4997.vkontakte.ru/u19575062/audio/ce9ab553904a.mp3";s:8:"duration";i:270;s:6:"artist";s:3:"Jet";s:5:"track";s:7:"Timothy";s:4:"size";s:7:"4341986";s:7:"bitrate";i:128;}i:87;a:6:{s:3:"url";s:58:"http://cs4710.vkontakte.ru/u7889910/audio/c56e88a1587c.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where Have You Been w. Jet";s:4:"size";s:8:"11632070";s:7:"bitrate";i:320;}i:88;a:6:{s:3:"url";s:58:"http://cs4710.vkontakte.ru/u7889910/audio/d8c5f02dbbc9.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where Have You Been w. Jet";s:4:"size";s:8:"11632070";s:7:"bitrate";i:320;}i:89;a:6:{s:3:"url";s:58:"http://cs4710.vkontakte.ru/u7889910/audio/f19cf5f5da7b.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where Have You Been w. Jet";s:4:"size";s:8:"11632070";s:7:"bitrate";i:320;}i:90;a:6:{s:3:"url";s:58:"http://cs4705.vkontakte.ru/u1940669/audio/4e0d73f36ecb.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:91;a:6:{s:3:"url";s:58:"http://cs4701.vkontakte.ru/u1623784/audio/f699dca9c305.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:34:"Timothy Where Have You Been w. Jet";s:4:"size";s:8:"11649886";s:7:"bitrate";i:320;}i:92;a:6:{s:3:"url";s:57:"http://cs5079.vkontakte.ru/u813339/audio/92c340fd7edf.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:93;a:6:{s:3:"url";s:59:"http://cs5009.vkontakte.ru/u77924746/audio/a10945adfb92.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:94;a:6:{s:3:"url";s:59:"http://cs4663.vkontakte.ru/u74247174/audio/0494c6e4db25.mp3";s:8:"duration";i:290;s:6:"artist";s:19:"Timbaland feat. Jet";s:5:"track";s:22:"Timothy Where You Been";s:4:"size";s:8:"11692979";s:7:"bitrate";i:320;}i:95;a:6:{s:3:"url";s:59:"http://cs4663.vkontakte.ru/u74247174/audio/0494c6e4db25.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:8:"11692979";s:7:"bitrate";i:320;}i:96;a:6:{s:3:"url";s:58:"http://cs4653.vkontakte.ru/u8781114/audio/cd9f1bf3a57b.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:97;a:6:{s:3:"url";s:59:"http://cs5018.vkontakte.ru/u21675454/audio/5b71cdc0cd5a.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:98;a:6:{s:3:"url";s:59:"http://cs5011.vkontakte.ru/u60728369/audio/a822e53fb924.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}i:99;a:6:{s:3:"url";s:59:"http://cs4605.vkontakte.ru/u67543933/audio/06fca47e1ec2.mp3";s:8:"duration";i:290;s:6:"artist";s:9:"Timbaland";s:5:"track";s:38:"Timothy Where You Been (featuring Jet)";s:4:"size";s:7:"7713784";s:7:"bitrate";i:192;}}
\ No newline at end of file
diff --git a/php/dump/html/Blondie - Call Me.html b/php/dump/html/Blondie - Call Me.html
new file mode 100755
index 0000000..53b0fbd
--- /dev/null
+++ b/php/dump/html/Blondie - Call Me.html	
@@ -0,0 +1,3825 @@
+HTTP/1.1 200 OK
+Server: nginx/0.7.59
+Date: Wed, 23 Mar 2011 03:01:01 GMT
+Content-Type: text/plain; charset=windows-1251
+Transfer-Encoding: chunked
+Connection: close
+X-Powered-By: PHP/5.2.6-1+lenny4
+Pragma: no-cache
+Cache-control: no-store
+Vary: Accept-Encoding
+
+3edc
+2317audio.css,audio.js029660
+
+
+ + + + + + +
+
+ +
+
3:28
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:17
+
In This Moment - Call Me (Blondie Cover) (Bonus Track)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
BLONDIE - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:35
+
CjR Mix - Call Me Uprising (Blondie vs, Muse mashup)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:35
+
Blondie - Call me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:28
+
025 Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:10
+
blondie - call me (the messiah dubstep remix)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:31
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:30
+
Blondie - Call Me (2001 Digital Remaster)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:35
+
Blondie - Call me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:17
+
In This Moment - Call Me (Blondie Cover) (Bonus Track)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
8:06
+
Blondie - Call Me (American Gigolo Original Soundtrack - Main Theme, Original Long Version)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
8:06
+
Blondie - Call Me (Original Long Version)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:27
+
Franz Ferdinand - Call Me (Blondie cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:18
+
In This Moment - Call Me (Blondie Cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:00
+
Nouvelle Vague feat Skye (Morcheeba) - Call Me (Blondie cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:10
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
2:26
+
Dope Stars Inc. - Call Me (Blondie Cover, Demo)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:29
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:38
+
Samantha Fox & Sabrina Salerno - Call Me (Blondie Cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:10
+
Blondie - Call Me (The Messiah Dubstep Remix)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:31
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:10
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
7:12
+
Samantha Fox vs. Sabrina Solerno - Call Me (Andrea T. Mendoza vs. Tibet Yes Club Mix) (Blondie Cover) (NEW)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:10
+
Blondie - Call Me (The Messiah Dubstep Remix)
+
+
+ +2b5ab +
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:28
+
Blondie - Call Me (Potiche OST)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
2:26
+
Dope Stars Inc. - Call Me (Blondie Cover, Demo)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:26
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:03
+
Hollywood, Mon Amour - Call Me (ft. Skye of Morcheeba) [original by Blondie]
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:31
+
Blondie - Call Me (Forthnet TV Spot Theme)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:35
+
Blondie - Call me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:17
+
In This Moment - Call Me (Blondie Cover) (Bonus Track)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:35
+
Blondie - Call me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:03
+
Hollywood, Mon Amour - Call Me (ft. Skye of Morcheeba) [original by Blondie]
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
2:42
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:10
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:31
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:35
+
Blondie - Call me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:27
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
8:03
+
Blondie - Call Me (Original 12 Mix) (1999 Digital Remaster)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:34
+
Samantha Fox vs. Sabrina - Call Me (Blondie Cover, Andrea T. Mendoza Vs. Tibet Yes Radio Mix)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:28
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:31
+
The 69 Eyes - Call Me (Blondie cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:10
+
Skye Edwards - Call Me (Blondie cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:46
+
Porn - Call Me (Blondie cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:18
+
In This Moment - Call Me (Blondie Cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
2:42
+
VSFS 2010 - Finale (Blondie - Call Me, Muse - Uprising)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:26
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:34
+
Samantha Fox vs. Sabrina - Call Me ( Radio Mix - Blondie Cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:10
+
Skye Edwards - Call Me (Blondie cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:11
+
Blondie - Call Me (The Messiah Dubstep rmx)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:10
+
Skye Edwards (ex-Morcheeba) - Call Me (Blondie Cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:10
+
Blondie - Call Me (The Messiah Remix)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:18
+
In This Moment - Call Me (Blondie Cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:37
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
8:06
+
Blondie - Call Me (Original Long Version) [*][Version]
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:31
+
Blondie - Call me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:18
+
In This Moment - Call Me (Blondie Cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:17
+
In This Moment - Call Me (Blondie Cover) (Bonus Track)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:31
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:18
+
In This Moment - Call Me (Blondie Cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:31
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
1:13
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
8:06
+
Blondie - Call Me (Original Long Version) [*][Version]
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:37
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
2:26
+
Dope Stars Inc - Call me(Blondie cover, demo) ! , !
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:17
+
Hard covers of fucking pops part - Call Me (Blondie cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
Blondie - Call me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:18
+
In This Moment (2009) - Call Me (Blondie Cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:18
+
In This Moment - Call Me (Blondie Cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:33
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
6:06
+
Erick Morillo vs Blondie - Call Me (Christian Falero Remix)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:24
+
Franz Ferdinand - Call Me (Blondie Cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:35
+
Blondie - Call me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:28
+
Blondie - Call Me( )
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:35
+
Blondie - Call me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:03
+
Hollywood, Mon Amour - Call Me (ft. Skye of Morcheeba) [original by Blondie]
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:03
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:10
+
Skye Edwards - Call Me (Blondie cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:28
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:10
+
Blondie - Call Me (The Messiah Dubstep Remix)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:35
+
Blondie - Call me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
8:06
+
Blondie - Call Me (Original Long Version)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{"searchOffset":100,"has_more":1,"searchCount":"2732"} +0 + diff --git a/php/dump/html/Blondie.html b/php/dump/html/Blondie.html new file mode 100755 index 0000000..4ae48b5 --- /dev/null +++ b/php/dump/html/Blondie.html @@ -0,0 +1,3825 @@ +HTTP/1.1 200 OK +Server: nginx/0.7.59 +Date: Wed, 23 Mar 2011 15:19:45 GMT +Content-Type: text/plain; charset=windows-1251 +Transfer-Encoding: chunked +Connection: close +X-Powered-By: PHP/5.2.6-1+lenny9 +Pragma: no-cache +Cache-control: no-store +Vary: Accept-Encoding + +3edc +2329audio.css,audio.js029770
+
+
+ + + + + + +
+
+ +
+
2:27
+
Florrie Arnold - Sunday Girl (Blondie cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:35
+
Blondie - One Way Or Another ( )
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:28
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
2:28
+
Florrie - Sunday Girl [Nina Ricci Blondie cover]
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:33
+
Blondie - Heart of Glass ( GUCCI by GUCCI)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:31
+
Blondie - One Way Or Another( " ")
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:46
+
Blondie - Maria
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:28
+
Blondie - One Way Or Another( )
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:46
+
Blondie - Maria !
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:51
+
Blondie - Maria
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:33
+
- Gucci By Gucci (Blondie - Heart Of Glass)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:33
+
- Gucci By Gucci (Blondie - Hear
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:33
+
Blondie - Heart of Glass
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:46
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
Blondie - One Way Or Another
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:55
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:33
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:29
+
(Coyote Ugly) - 2000 - 13. Blondie - One Way Or Another
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:20
+
Blondie - Heart Of Glass (OST Studio 54)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:17
+
In This Moment - Call Me (Blondie Cover) (Bonus Track)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:18
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:33
+
Blondie - Heart of Glass
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:28
+
Blondie - One Way Or Another( )
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:11
+
Blondie - Sunday Girl
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:35
+
Blondie - One Way Or Another
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:36
+
Blondie - One Way Or Another
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:20
+
Studio 54 - Blondie / Heart Of Glass
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:32
+
Blondie - Heart Of Glass
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:46
+
Blondie - Maria
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:26
+
Blondie - One Way Or Another
+
+
+
+
+ + + + + +
+
+
+
+
+
+ +2aa02 +
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
BLONDIE - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:07
+
Blondie - Maria
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:38
+
Blondie - Atomic
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:33
+
- Gucci By Gucci (Blondie - Hear
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:33
+
- Gucci By Gucci (Blondie - Heart Of Glass)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:34
+
Blondie - Heart Of Glass (OST )
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:35
+
CjR Mix - Call Me Uprising (Blondie vs, Muse mashup)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
2:27
+
Florrie Arnold - Sunday Girl (Blondie Cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:34
+
Nouvelle Vague - Heart Of Glass (Blondie)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:35
+
Blondie - Call me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:28
+
Blondie - One Way Or Another,Ost .
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:38
+
Blondie - Atomic (GTA Vice City OST)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:44
+
Blondie - Heart Of Glass
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:09
+
.blondie - heart of glass
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
5:47
+
(We Own The Night) - 2007 - 01. Blondie - Heart Of Glass
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:08
+
Blondie - Maria
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:28
+
025 Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:18
+
Blondie - Good Boys(20003 .)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:03
+
Blondie - Sunday Girl
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:31
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
5:41
+
Blondie vs. The Doors - Rapture Riders
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:33
+
- Gucci By Gucci (Blondie - Heart Of Glass)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:20
+
Studio 54 - Blondie / Heart Of Glass
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:36
+
Blondie - / " " ""
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:10
+
blondie - call me (the messiah dubstep remix)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:42
+
Striptease () - Blondie - The Tide Is High
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:09
+
Blondie - Maria
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:38
+
Blondie - Atomic
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:46
+
Blondie - Maria
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:33
+
Blondie - Heart of Glass
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:20
+
C 54 - Blondie - Heart Of Glass (OST Studio 54)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:31
+
Blondie - Call Me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:36
+
Blondie - ne Way Or Another (OST )
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:22
+
- !62.Blondie - Good Boys
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:01
+
Blondie - Good Boys
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:46
+
Blondie - Maria
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:40
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:27
+
Coyote Ugly - Blondie - One Way Or Another
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:39
+
Blondie - Atomic (...... )
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:33
+
Blondie - Heart of Glass
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:30
+
Blondie - Call Me (2001 Digital Remaster)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:35
+
Blondie - Call me
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:17
+
In This Moment - Call Me (Blondie Cover) (Bonus Track)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:37
+
Alpha Blondie - SeBe Allah Y'e (Grand Sunlife)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
2:04
+
Florrie Arnold - Sunday Girl (cover Blondie) (Nina Ricci L'Elixir "Enchanted Walk")
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:33
+
Blondie - Heart of Glass ost
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:46
+
Blondie - Maria
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
5:36
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:33
+
blondie - heart of glass ( gucci by gucci)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
2:28
+
FLORRIE ARNOLD - SUNDAY GIRL (BLONDIE COVER)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
8:06
+
Blondie - Call Me (American Gigolo Original Soundtrack - Main Theme, Original Long Version)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:29
+
Blondie ( ) - One Way Or Another
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:18
+
blondie - good boys
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:27
+
Franz Ferdinand - Call Me (Blondie cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
8:06
+
Blondie - Call Me (Original Long Version)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:36
+
Coyote Ugly - Blondie - One Way Or Another
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:35
+
Blondie - One day or another
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:27
+
Coyote Ugly OST - Blondie - One way or another
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:19
+
Blondie - No Exit
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:45
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:33
+
Blondie - Heart of Glass (Skins OST, 2)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:13
+
Blondie - Nothing Is Real But The Girl
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:32
+
Blondie - Heart Of Glass
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:18
+
In This Moment - Call Me (Blondie Cover)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:39
+
Blondie - Atomic (ost GTA Vice City)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:32
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{"searchOffset":100,"has_more":1,"searchCount":"22562"} +0 + diff --git "a/php/dump/html/Foo Fighters - Ain\\'t It The Life.html" "b/php/dump/html/Foo Fighters - Ain\\'t It The Life.html" new file mode 100644 index 0000000..66a4603 --- /dev/null +++ "b/php/dump/html/Foo Fighters - Ain\\'t It The Life.html" @@ -0,0 +1,3102 @@ +HTTP/1.1 200 OK +Server: nginx/0.7.59 +Date: Thu, 24 Mar 2011 20:23:56 GMT +Content-Type: text/plain; charset=windows-1251 +Transfer-Encoding: chunked +Connection: close +X-Powered-By: PHP/5.2.0-8+etch13 +Pragma: no-cache +Cache-control: no-store + +3f06 +2363audio.css,audio.js030120
+
+
+ + + + + + +
+
+ +
+
4:14
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:43
+
Foo Fighters - Ain't It The Life (Live Acoustic)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:12
+
Foo Fighters - Ain't it the life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + +
+
+
+
+
+ + + + +
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:16
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:16
+
Foo Fighters - Ain`t It the Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It the Life
+
+
+
+
+ + + + + +
+
+
+
+ +4000 +
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It the Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:16
+
Foo Fighters - Ain't it the life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
5:30
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It the Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain`t It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
foo fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It the Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
5:30
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
+
Foo Fighters - Ain't it the life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain`t it the life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It the Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
+
Foo fighters - Ain't it The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
5:30
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't It The Life
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:14
+
Foo Fighters - Ain't it the Life mediagrant.com
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{"searchOffset":100,"has_more":0,"searchCount":"84"} +0 + diff --git a/php/dump/html/Jet - Cold Hard Bitch.html b/php/dump/html/Jet - Cold Hard Bitch.html new file mode 100755 index 0000000..6e9c86f --- /dev/null +++ b/php/dump/html/Jet - Cold Hard Bitch.html @@ -0,0 +1,3825 @@ +HTTP/1.1 200 OK +Server: nginx/0.7.59 +Date: Wed, 23 Mar 2011 03:23:41 GMT +Content-Type: text/plain; charset=windows-1251 +Transfer-Encoding: chunked +Connection: close +X-Powered-By: PHP/5.2.6-1+lenny3 +Pragma: no-cache +Cache-control: no-store +Vary: Accept-Encoding + +3edc +2317audio.css,audio.js029660
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:07
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch (OST She's Out of My League) ⑲
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:04
+
Jet (www.Sarzamin.org) - 09_ Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:04
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:07
+
[OST ] Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch (ost shes out of my league)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:02
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:07
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
< +4000 +/a> + +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:07
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:02
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:05
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:07
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - cold hard bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
JET - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:02
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
JET - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:02
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold hard bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:05
+
JET - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:32
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:02
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
3:48
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
JET - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:02
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:07
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:07
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
JET - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:07
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold hard bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
JET - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:32
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:02
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:02
+
Jet - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:03
+
JET - Cold Hard Bitch
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{"searchOffset":100,"has_more":1,"searchCount":"359"} +0 + diff --git a/php/dump/html/Jet - Timothy.html b/php/dump/html/Jet - Timothy.html new file mode 100755 index 0000000..391824a --- /dev/null +++ b/php/dump/html/Jet - Timothy.html @@ -0,0 +1,3825 @@ +HTTP/1.1 200 OK +Server: nginx/0.7.59 +Date: Wed, 23 Mar 2011 03:39:33 GMT +Content-Type: text/plain; charset=windows-1251 +Transfer-Encoding: chunked +Connection: close +X-Powered-By: PHP/5.2.6-1+lenny3 +Pragma: no-cache +Cache-control: no-store +Vary: Accept-Encoding + +3edc +2317audio.css,audio.js029660
+
+
+ + + + + + +
+
+ +
+
4:50
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (feat. Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where Have You Been w. Jet
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:21
+
Timbaland - Timothy Where You Been (Feat. Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where Have You Been w. Jet
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland & Jet - Timothy Where You Been
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland feat. The Jet & JoJo - Timothy Where Have You Been
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:30
+
Jet - Timothy
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:30
+
Jet - Timothy
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:21
+
Timbaland - Timothy Where You Been (Feat. Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland feat. Jet - Timothy Where You Been
+
+
+
+
+4000 + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet) ( Shock Value 2 -2009)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:30
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland ft. Jet - Timothy Where You Been (Shock Value II 2009)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (Feat. Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland feat. Jet - Timothy Where Have You Been
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+ +4000 +
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (feat. Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:52
+
Timbaland (with Jet) - Timothy Where Have You Been (2009)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (With Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:30
+
Jet - Timothy
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:30
+
Jet - Timothy( )
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:30
+
Jet - Timothy
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:30
+
Jet - Timothy
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Jet - Timothy (Where have You Been)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (feat. Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where Have You Been w. Jet
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:30
+
Jet - Timothy
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:21
+
Timbaland - Timothy Where You Been (Feat. Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:30
+
Jet - Timothy
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland Feat. Jet - Timothy Where You Been (2oO9).mp3
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (feat. Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland & Jet - Timothy Where You Been
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet) ( Shock Value 2 -2009)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (feat. Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where Have You Been w. Jet
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland Feat. Jet - Timothy Where You Been
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where Have You Been w. Jet
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland ft. Jet - Timothy Where You Been
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where Have You Been w. Jet
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:51
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland feat. Jet - Timothy Where You Been
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland feat. Jet - Timothy Where You Been
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (Feat. Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (Ft. Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where Have You Been w. Jet
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where Have You Been w. Jet
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where Have You Been w. Jet
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland ft. Jet - Timothy Where You Been
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:32
+
Jet - Timothy
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland feat. Jet - Timothy Where You Been
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where Have You Been w. Jet
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (feat. Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+ +
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland feat. Jet - Timothy Where You Been
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland feat. Jet - Timothy Where You Been
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (Ft. Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland Ft. Jet - Timothy Where You Been
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland Feat. Jet - Timothy Where You Been (2oO9)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:30
+
Jet - Timothy
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
+
Jet - Timothy
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:30
+
Jet - Timothy
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where Have You Been w. Jet
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where Have You Been w. Jet
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where Have You Been w. Jet
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where Have You Been w. Jet
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland feat. Jet - Timothy Where You Been
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+ +
+
4:50
+
Timbaland - Timothy Where You Been (featuring Jet)
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{"searchOffset":100,"has_more":1,"searchCount":"225"} +0 + diff --git a/php/favicon.ico b/php/favicon.ico new file mode 100644 index 0000000..273bb04 Binary files /dev/null and b/php/favicon.ico differ diff --git a/php/index.php b/php/index.php new file mode 100644 index 0000000..4665b12 --- /dev/null +++ b/php/index.php @@ -0,0 +1,73 @@ + strtotime($b['year']); +}); + +$artist['albums'] = array(); +while(list( $i, $rg ) = each($release_groups)) { + $t_list = array(); + $b_list = array(); + $tracks = array(); + $bonus = array(); + + $r = current($rg['releases']); + if (count($r['tracks']) > 0) { + while(list( $j, $t ) = each($r['tracks'])) if ($t['name'] != '[silence]') { + $t_list[] = strtolower($t['name']); + $tracks[] = array('id' => $t['id'], 'name' => $t['name'], 'duration' => round($t['length'] / 1000)); + } + + while(list( $j, $r ) = each($rg['releases'])) { + while(list( $k, $t ) = each($r['tracks'])) if ($t['name'] != '[silence]') { + if (!in_array(strtolower($t['name']), $t_list) && !in_array(strtolower($t['name']), $b_list)) { + $bonus[] = array('id' => $t['id'], 'name' => $t['name'], 'duration' => round($t['length'] / 1000)); + $b_list[] = strtolower($t['name']); + } + } + } + } + + $artist['albums'][] = array( + 'name' => $rg['name'], + 'year' => $rg['year'], + 'tracks' => $tracks, + 'bonus' => $bonus + ); +} + + +include 'tpl/index.php'; diff --git a/php/pgadmin/CREDITS b/php/pgadmin/CREDITS new file mode 100644 index 0000000..77f50fb --- /dev/null +++ b/php/pgadmin/CREDITS @@ -0,0 +1,105 @@ +CREDITS +------- + +Project Administration & Major Projects + +- Robert Treat +- Jehan-Guillaume (ioguix) De Rorthais + +Translators + +- Kuo Chaoyi (Chinese Utf8) +- Angelo Rigo (Brazilan Portuguese) +- Chan Min Wai (Chinese) +- He Wei Ping (Chinese) +- Chih-Hsin Lee (Trad. Chinese) +- Hugo Jonker (Dutch) +- Pascal Peyre (French) +- Guillaume Lelarge (French) +- ioguix (French) +- H. Etzel, Markus Bertheau (German) +- Kalef (Italian) +- Tadashi Jokagi (Japanese) +- Rafal Slubowski (Polish) +- Alexander Khodorisky (Russian) +- Martin Marqus (Spanish) +- Andrej Misovic (Slovak) +- Devrim Gunduz (Turkish) +- Libor Vanek (Czech) +- Marek Cernock (Czech) +- Stefan Malmqvist (Swedish) +- Nicola Soranzo (Italian) +- Petri Jooste (Afrikaans) +- Sulyok Pter (Hungarian) +- Zaki Almuallim (Arabic) +- Erdenemandal Bat-Erdene (Mongolian) +- Alex Rootoff (Ukrainian) +- Jonatan (Hebrew) +- Alin Vaida (Romanian) +- Arne Eckmann (Danish) +- Francisco Cabrita (Portuguese) +- Bernat Pegueroles (Catalan) +- Fernando Wendt (Brazilan Portuguese) +- Adamantios Diamantidis (Greek) +- Marek ernock (Czech) +- Alexey Baturin (Russian UTF8) +- Adrin Chaves Fernndez (Galician) + +Look & Feel + +- Davey (CSS) +- ioguix (Cappuccino theme) +- Tomasz Pala (Gotar theme) + +Contributors + +- Dan Wilson +- Christopher Kings-Lynne +- Felix Meinhold +- Jean-Michel Poure +- Rafal Slubowski +- Brett Toolin +- Mark Gibson (Pop-up SQL window) +- Nicola Soranzo +- Oliver Meyer & Sven Kiera (Table icons link to browse table) +- Bryan Encina (SQL window improvements, bug fixes, admin) +- Dan Boren (Object comments) +- Adrian Nida (Fix time outs) +- Russell Smith +- Guillaume Lelarge +- Ian Barwick +- Javier Carlos +- Eric Kinolik +- John Jawed +- Karl O. Pinc +- Tomasz Pala +- Ivan Zolotukhin +- Kristoffer `spq` Janke +- Leonardo Augusto Sapiras (Improve phpPgAdmin ergonomy during the GSoC 2010, with ioguix as mentor) + +Third Party Libraries + +- Highlight.php (Jacob D. Cohen of rafb.net) +- XLoadTree2 (Erik Arvidsson & Emil A Eklund of webfx.eae.net) +- jQuery (http://jquery.com/) + +Corporate Sponsors + +Project resources: + +- Sourceforge.net - Hosting, source package provider, Bug and Feature request tracker, hosting mailing lists (and ex code repository) +- github.com - Official GIT repository hosting +- Kattare Internet (http://www.kattare.com/) - Hosting the demo server + +Ongoing contributors: + +- Omniti ( http://omniti.com/ ) - sponsors developpment as Robert Treat employer +- Dalibo ( http://dalibo.com ) - sponsors developpment as Jehan-Guillaume (ioguix) de Rorthais employer + +Feature contributors: + +- SpikeSource (www.spikesource.com) - Slony support +- Google Summer of Code (http://code.google.com/soc/2006/pgsql/appinfo.html?csaid=DB096D908B948D89) - phpPgAdmin Improvements +- Google Summer of Code (http://code.google.com/soc/2007/postgres/appinfo.html?csaid=E89B3D5E2DC4170A) - Full Text Search in PostgreSQL GUI Tools +- Google Summer of Code (http://code.google.com/p/google-summer-of-code-2010-postgresql/we_dont_have_the_complete_link_yet) - Improve phpPgAdmin ergonomy + diff --git a/php/pgadmin/DEVELOPERS b/php/pgadmin/DEVELOPERS new file mode 100644 index 0000000..448919f --- /dev/null +++ b/php/pgadmin/DEVELOPERS @@ -0,0 +1,163 @@ +DEVELOPER INFO +-------------- + +phpPgAdmin is Free/Open Source software, so you're invited to contribute to it. +Many great features have been written by other people and you too can help to +make phpPgAdmin a better tool. + +If you're planning to contribute source code, please read the following +information: + +The following method is preferred for new developers: + - fetch the current CVS tree over anonymous CVS: + + cvs -d :pserver:anonymous@phppgadmin.cvs.sourceforge.net:/cvsroot/phppgadmin login + [Password: ] simply press the Enter key! + + cvs -z3 -d :pserver:anonymous@phppgadmin.cvs.sourceforge.net:/cvsroot/phppgadmin co -d phpPgAdmin webdb + [This will create a new sub-directory named phpPgAdmin] + + - Add your stuff + - Send us the file(s) you've modified or send us a patch (preferred). To + generate a patch, in your 'phpPgAdmin' directory do: + + cvs diff -c > file.txt + + Then, just send us 'file.txt' . + +Please note that submitting code is considered a transfer of copyright to the +phpPgAdmin project. + +Write access to the CVS tree is granted only to developers who have already +contributed something useful to phpPgAdmin. If you're interested in that, +please contact us. +These project developers can access the CVS tree via SSH: + + export CVS_RSH=ssh + +Login once with + + ssh developername@phppgadmin.cvs.sourceforge.net + +to create required user directories on the server. Then fetch the current CVS +tree: + + cvs -z3 -d developername@phppgadmin.cvs.sourceforge.net:/cvsroot/phppgadmin co -d phpPgAdmin webdb + +For further information, refer to: + + http://sourceforge.net/projects/phppgadmin + + +TIPS FOR DEVELOPERS +------------------- + +When you submit code to phpPgAdmin, we do expect it to adhere to the existing +coding standards in the source. So, instead of using your personal favourite +code layout style, please format it to look like surrounding code. +In general, we want the code to be portable, standard compliant (e.g. to W3C +(X)HTML and CSS) and independent of specific configurations of PHP, the web +server, PostgreSQL or the user browser. We also try to support as many versions +as possible of these applications. + +Test your code properly! For example, if you are developing a feature to create +domains, try naming your domain all of the following: + + * " + * ' + * \ + * words with spaces + *


+ +If you are adding a new class function, be sure to use the "clean", +"fieldClean", "arrayClean" and "fieldArrayClean" functions to properly escape +odd characters in user input. Examine existing functions that do similar +things to yours to get yours right. + +When writing data to the display, you should always urlencode() variables in +HREFs and htmlspecialchars() variables in forms. Rather than use action="" +attributes in HTML form elements use action="thisformname.php". This +ensures that browsers remove query strings when expanding the given +relative URL into a full URL. + +When working on database classes, always schema qualifing your SQL where it is +possible with the current schema ($data->_schema) for pg73+ classes. Then don't +forget to write your method for older classes which doesn't suppport schemas. + +When working with CVS, always make sure to do a 'cvs update' both before you +start; so you have the latest code to work with; and also again before you +create your patch; to minimize the chance of having conflicts. + +COMMON VARIABLES +---------------- + +$data - A data connection to the current or default database. +$misc - Contains miscellaneous functions. eg. printing headers & footers, etc. +$lang - Global array containing translated strings. The strings in this array + have already been converted to HTML, so you should not + htmlspecialchars() them. +$conf - Global array of configuration options. + +WORKING WITH RECORDSETS +----------------------- + +phpPgAdmin uses the ADODB database library for all its database access. We have +also written our own wrapper around the ADODB library to make it more object +oriented (ADODB_base.pclass). + +This is the general form for looping over a recordset: + +$rs = $class->getResults(); +if (is_object($rs) && $rs->recordCount() > 0) { + while (!$rs->EOF) { + echo $rs->fields['field']; + $rs->moveNext(); + } +} +else echo "No results."; + +UPDATING LANGUAGE FILES FOR THE MONO-LINGUAL +-------------------------------------------- + +If you need to add or modify language strings for a new feature, the preferred +method is: + +* cd into lang/ subdirectory +* modify english.php file only! +* run "make english" (this will recode the english.php file, and place an + updated copy in lang/recode/) + +If you've done it correctly, when you create your patch, it should only have +diffs of lang/english.php and lang/recode/english.php files. For more +information on how the language system works, please see the TRANSLATORS file. + + +UNDERSTANDING THE WORK/BRANCH/TAG/RELEASE PROCESS +------------------------------------------------- + +All new work for phpPgAdmin is done against the CVS HEAD branch. When we feel +we are ready to do a new release, we create a branch (ex. REL_4-1). This +becomes the stable branch for all future 4.1.x releases, and any bugfixes needed +for 4.1 would go in that branch. + +When we release a new revision, we tag that at release time (REL_4-1-1), so a +checkout of any tag should give you the same files that downloading the release +would have given you. As a general rule, we do not introduce new features into +existing stable branches, only bugfixes and language updates. This means if you +want to work on new features, you should be working against CVS HEAD. +Eventually we will call for another release, and that will be branched (REL_4-2) +and the cycle will start over. + +On occasion we have created out-of-band branches, typically labeled as DEV_foo. +These were used for temporary, concurrent development of large features, and +should not be used by other developers. When development of those features is +completed, the branches get merged in as appropriate, so no further development +should occur on those branches. + +GETTING HELP +------------ + +We prefer most discussion of development to take place on the phpPgAdmin +mailing list, so that discussions can be archived and be searchable. +However, if you are into IRC, a couple of us hang out on #phppgadmin on +freenode, and occasionally discuss things there. diff --git a/php/pgadmin/FAQ b/php/pgadmin/FAQ new file mode 100644 index 0000000..8f1ae6c --- /dev/null +++ b/php/pgadmin/FAQ @@ -0,0 +1,217 @@ +phpPgAdmin Frequently Asked Questions +------------------------------------- + +Installation errors +------------------- + +Q: I've installed phpPgAdmin but when I try to use it I get an error message + telling me that I have not compiled proper database support into my + PHP installation. + +A: This means that you have not properly compiled Postgres support into + your PHP. The correct configure flag to use is '--with-pgsql'. Read the + PHP manual and website for more help with this. + + Postgres support can be also compiled into PHP as a dynamic extension, + so if you have precompiled version (Linux RPM, or Windows binary), there + are still chances, that only thing you should do is to enable loading it + automagically. + + It can be done by editing your php.ini file (under Windows, usually in + C:\WINDOWS or C:\WINNT, under Linux /etc/php.ini) and uncommenting this + line: + + ;extension=php_pgsql.dll ;under Windows + ;extension=pgsql.so ;under Linux + + so it would look like that: + + extension=php_pgsql.dll ;under Windows + extension=pgsql.so ;under Linux + + In Linux distributions based on Red Hat or Fedora, PHP extensions are + automatically configured in /etc/php.d/pgsql.ini, simply install the + php-pgsql package. + + See http://www.php.net/manual/en/pgsql.setup.php for more information + on setting up Postgres support in PHP. + +Q: I get a warning like this when using phpPgAdmin on Windows: + + "Warning: session_start() [function.session-start]: + open(/tmp\sess_5a401ef1e67fb7a176a95236116fe348, O_RDWR) failed" + +A: You need to edit your PHP.INI file (usually in c:\windows) and change this + line: + + session.save_path = "/tmp" + + to: + + session.save_path = "c:\windows\temp" + + And make sure that the folder c:\windows\temp actually exists. + + +Login errors +------------ + +Q: I always get "Login failed" even though I'm _sure_ I'm using the right + username and password. + +A: There are a number of reasons why you might not be able to connect, typically + having nothing to do with phpPgAdmin itself. First check the Postgres log + on your server, it should contain a FATAL error message detailing the exact + reason why the login is failing. You will probably need to either adjust the + username or password, add LOGIN permissions to the role, or adjust your + pg_hba.conf file in your Postgres data dir; so follow the directions laid + out in the FATAL message. + + If you do not have any FATAL error messages, and you have verified that you + are looking at the properly configured logfile, then this means you are not + connecting to your database. If you are connecting via TCP/IP sockets (for + example if you have installed phpPgAdmin on a different computer than your + database) make sure that Postgres is accepting connection over TCP/IP. On + older versions of Postgres, you need to change this line in your + postgresql.conf file: + + #tcpip_socket = false + + to: + + tcpip_socket = true + + on newer versions of Postgres, this setting has been replaced by the + listen_addresses setting, so you will need to change that setting instead + (likely changing it to "*"). Be sure to restart Postgres after changing + either of these settings! + + If that still doesn't get you connected, then there is likely something + interfering between PHP and Postgres. Check to make sure that you don't have + a firewall preventing connectivity, or that you don't have some other + security setup (ie. SELinux policy) that prevents PHP from connecting. + +Q: For some users I get a "Login disallowed for security" message. + +A: Logins via phpPgAdmin with no password or certain usernames (pgsql, + postgres, root, administrator) are denied by default. Before changing this + behaviour (setting $conf['extra_login_security'] to false in the + config.inc.php file) please read the Postgres documentation about client + authentication and understand how to change Postgres's pg_hba.conf to + enable passworded local connections. + +Q: I can use any password to log in! + +A: Postgres, by default, runs in trust mode. That means that it doesn't + ask for passwords for local connections. We highly recommend that you + edit your pg_hba.conf file, and change the login type to 'md5'. Note + that if you change the 'local' login type to 'md5', then you might need + to enter a password to start Postgres. Get around this by using a + .pgpass file - explained in the Postgres documentation. + + +Other errors +------------ + +Q: When I enter non-ASCII data into the database via a form, it's inserted + as hexadecimal or Ӓ format! + +A: You have not created your database in the correct encoding. This problem + will occur when you try to enter an umlaut into an SQL_ASCII database, or + SJIS Japanese into an EUC-JP database, etc. + +Q: When I drop and re-create a table with the same name, it fails. + +A: You need to drop the sequence attached to the SERIAL column of the table + as well. Postgres 7.3 and above do this automatically. If you have + upgraded to Postgres 7.3 from an earlier version, you need to run the + contrib/adddepend script to record all dependencies. + +Q: When browsing a table, the 'edit' and 'delete' links do not appear. + +A: In order, phpPgAdmin will prefer the following as unique row identifiers: + + 1. Primary keys + 2. Unique keys (cannot be parital or expressional indexes) + 3. OID column (will require a sequential scan to update, unless you + index the OID column) + + Furthermore, any NULL values in the unique index will mean that that row + will be uneditable. Also, since OIDs can become duplicated in a table, + phpPgAdmin will alter the row, and then check to ensure that exactly one + row has been modified - otherwise rollback will occur. + + +Questions on dumps +------------------ + +Q: What happened to the database dump feature? + +A: You need to configure phpPgAdmin (in the config.inc.php file) to point + to the location of the pg_dump and pg_dumpall utilities on your web server. + Once you have done that, the database export feature will appear. + +Q: I would like to use the pg_dump integration for database and table + dumps on Windows. How do I get pg_dump.exe on Windows? + +A: To get the pg_dump utilities on Windows, you need to install Postgres 8.0 + or higher (we recommend the latest release) for Windows, available for + download from the + Postgres web site. + Once you have installed that, set the pg_dump and pg_dumpall locations + in the config.inc.php file to + 'C:\\Program Files\\Postgres\\8.0\\bin\\pg_dump.exe' and + 'C:\\Program Files\\Postgres\\8.0\\bin\\pg_dumpall.exe', or wherever you + installed them. + +Q: Why can't I reload the SQL script I dumped in the SQL window? + +A: The following limitations currently exist in SQL script execution: + + * Only uploaded SQL scripts can contain COPY commands and for + this to work, you must have PHP 4.2 or higher. + + * 'psql' commands such as '\connect' will not work at all. + + * Multiline SQL statements will not work, eg: + + CREATE TABLE example ( + a INTEGER + ); + + * You cannot change the current database or current user during + the execution of the script. + + We do intend to work on some of these limitations in the future, but + some of them are Postgres restrictions and we recommend using the + 'psql' utility to restore your full SQL dumps. + + +Other questions +--------------- + +Q: When inserting a row, what does the 'Value' or 'Expression' box mean? + +A: Choosing 'Expression' means that you can use functions, operators, other + field names, etc. in your value - you need to properly quote any literal + values yourself. 'Value' on the other hand, means that no matter what you + enter as the value, it will be inserted as-is into the database. + +Q: Why is there never any information on the 'Info' page of a table? + +A: The Info page will show you what other tables have foreign keys to the + current table and some data from the Postgres statistics collector. + In older versions of Postgres, the stats collector is not enabled by default. + To enable it, look in your postgresql.conf file for the stats_* options. + Just make them all 'true' and restart Postgres. + +Q: Why can't I download data from queries executed in the SQL window? + +A: You need to check the 'Paginate results' option to allow downloads. + +Q: I would like to help out with the development of phpPgAdmin. How should I + proceed? + +A: We really would like your help! Please read the DEVELOPERS and TRANSLATORS + files. + diff --git a/php/pgadmin/HISTORY b/php/pgadmin/HISTORY new file mode 100644 index 0000000..08a42c5 --- /dev/null +++ b/php/pgadmin/HISTORY @@ -0,0 +1,794 @@ +phpPgAdmin History +------------------ + +Version 5.0.2 +------------- + +Released: 3rd January 2011 + +Some bug fixes. + +* Fix a css typo & error in cappuccino theme +* Fix #3139003 "Autocomplete doesn't insert value", report and patch by Aleksander Machniak +* Fix bad inheritance between pg83 -> pg instead of pg83 -> pg84 in the database access classes. This bug was breaking some functionnalities with 8.3 +* Fix a lot of nonstandard escaped string in the database access classes + +Version 5.0.1 +------------- + +Released: 14th December 2010 + +Minor bug fix and update version. + +* Fix #3124417 "Wrong german translation", reported by schnoesel +* Fix (officialy) a bug where non-super user roles cannot check ownership on objects +* Add forgotten Galician language to the target "all" of lang/Makefile +* Update jQuery library to current stable 1.4.4 +* remove useless date from the topbar informations. + This was the only place that did PHP 5.3 complain about bad timezone configuration + (a non-PPA related warning). As it was a totaly useless information, we decide to + remove it. + + +Version 5.0 +----------- + +Released: 29th November 2010 + +Features +* Support for PostgreSQL 8.4 and 9.0 +* Support for database level collation for 8.4+ +* Support for schema level export +* Add ability to alter schema ownership +* Clean up domain support and improve interface +* Add support for commenting on functions +* Allow user to rename role/users and set new passwords at the same time +* Greatly enhanced Full-Text-Search capabilities (ioguix, Loomis_K) +* Overhauled Selenium Test suite to support multiple database versions +* Optimized application graphics (Limo Driver) +* Support for Column Level Privileges +* Allow users to specify a template database at database creation time +* Support killing processes +* Add ability to create indexes concurrently +* Much better support of autovacuum configuration +* Add an admin page for table level +* Refactored autocompletion: + * fix support for cross-schema objects + * support multi-field FK + * support for pagination of values in the auto-complete list +* Allow user to logicaly group their server under custom named node in the browser tree +* New themes (Cappuccino and Gotar) and a theme switcher on the introduction page +* Auto refresh Locks page +* Auto refresh Processes page +* Link in the bottom of the page to go to top of page +* Browsing on Foreign Keys (When browsing a table, clicking on a FK value, jump to the PK row) + + +Bugs +* Fix problems with query tracking on overly long queries +* Ensure pg_dump paths are valid +* Fix multiple bugs about quoting and escaping database objects names with special chars +* Fix multiple bugs in the browser tree +* Fix multiple bugs on the SQL and script file import form +* One security fix about code injection +* Don't allow inserting on a table without fields +* Some fix about commenting databases +* removed deprecated functions from PHP 5.3 +* Lot of code cleanup +* Many other small minor bugs found on our way +* Fix the operator property page + +Translations +* Czech (Marek Cernocky) +* Greek (Adamantios Diamantidis) +* Brazillian Portuguese (Fernando Wendt) +* Galician (Adrin Chaves Fernndez) + +Incompatabilities +* No longer support PHP < 5.0 +* No longer support Postgres < 7.4 + + +Version 4.2 +----------- + +Features +* Add Analyze to Table Level Actions (ioguix) +* Add support for multiple actions on main pages (ioguix, Robert Treat) +* Added favicon for Mozilla and a backwards compatible version for IE. +* Allow browsers to save different usernames and passwords for different servers. +* Pagination selection available for reports +* You can configure reports db, schema and table names +* Add support for creating a table using an exsting one (ioguix) +* Auto-expand a node in the tree browser if there are no other nodes (Tomasz Pala) +* Add column about fields constraints type + links in table properties page (ioguix) +* Support for built-in Full Text Search (Ivan Zolotukhin) +* Add alter name, owner & comment on views (ioguix) +* Add column about called procedure + links to their definition in the triggers + properties page (ioguix) +* Add Support for Enum type creation (ioguix,xzilla) +* Add alter name, owner, comment and properties for sequences (ioguix) +* Add function costing options (xzilla) +* Add alter owner & schema on function (xzilla) +* Add a popup window for the session requests history (karl, ioguix) +* Add alter table, view, sequence schema (ioguix) + +Bugs +* Fix inability to assign a field type/domain of a different schema +* Can't edit a report and set its comment to empty +* Fix PHP5 Strict mode complaints +* Fix IN/NOT IN to accept text input lists 'a','b' +* Fix bytea doesn't display as NULL when NULL +* Schema qualifing every object to avoid non wanted behaviour about users' rights + and schema_path +* Remove shared credentials when logging out of single server, to prevent automatic re-login +* Improved SSL connection handling, fix problems with connections from older php builds +* Fix bug with long role name truncation +* Fix bug with DELETE FROM when dropping a row (spq) +* Fix problems when deleteing PUBLIC schema +* Fix several bugs in aggregate support +* Improve autocompletion support +* Tighten up use of global scope variables + +Translations +* utf traditional chinese (Kuo Chaoyi) +* utf simplified chinese (Kuo Chaoyi) +* Italian (Nicola Soranzo) +* Catalan (Bernat Pegueroles) +* French (ioguix) +* German (Albe Laurenz, spq) +* Japanese (Tadashi Jokagi) +* Hungarian (Sulyok Peti) + +Version 4.1.3 +------------- + +Bugs +* Eliminate use of $_SERVER['PHP_SELF']. This fixes a regression in 4.1.2 for + non-mainstream locales (including SQL_ASCII) +* Validate client supplied server against entries in config.inc.php +* Fix undefined variable when altering a field in a table on PostgreSQL < 8.0 + +Version 4.1.2 +------------- + +Bugs +* Fix inability to assign a field type/domain of a different schema +* Fix PHP5 Strict mode complaints +* Fix IN/NOT IN to accept text input lists 'a','b'. +* Fix bytea doesn't display as NULL when NULL +* Fix bug in view creation wizard +* Fix XSS vulnerability: + http://www.securityfocus.com/bid/24115/ + Escape HTML special characters before using $_SERVER['PHP_SELF'] + +Version 4.1.1 +------------- + +Bugs +* Fix problem where failed update would report as duplicate update error and + fail to return edit screen +* Fix error when using $conf[owned_only] on 8.1 & 8.2 +* Fix error displaying schema names for parents of inherited tables +* Clean up non-standard escape warnings for PostgreSQL 8.2 +* Fix improper text quoting for droping roles and aggregates +* Fix bug when dumping mixed case table names in PostgreSQL 8.2 + +Version 4.1 +----------- + +Features +* New icons by Niko , from the graphics repository on pgFoundry. +* Added icons to bread crumb trail and tabs. +* Send encrypted passwords over the wire wherever possible. +* Alter sequence, nextval and setval (Guillaume) +* Auto-select 'WITHOUT OIDS' if 'default_with_oids' setting is false (Guillaume) +* Autovacuum configuration support (Robert Treat) +* Basic ROLE support (Chris Kings-Lynne, Javier Carlos) +* Add support for SSL connections (Eric Kinolik) +* Display content of pg_locks view (Javier Carlos) +* Add labels for checkboxes/radio buttons for improved usability (Guillaume) +* Display Prepared Transactions (Javier Carlos) +* Re-enable table browsing from tree icons (ioguix) +* Add Support For IN/OUT Parameters (John Jawed) +* Add column level information into the tree browser (ioguix) +* Promote column level interaction into its own page (ioguix) +* Add automatic lookup of foreign key values in insert/update fields (John Jawed) +* Add ability to create/drop/alter custom aggregates (Javier Carlos) +* Add enable/disable trigger (John Jawed) +* Add global comments for databases and tablespaces + +Translations +* Catalan from Bernat +* Romanian from Alin Vaida + +Version 4.0 +----------- + +Features +* Slony replication support (Thanks to sponsorship from SpikeSource) +* Allow current database to be at the top +* Allow base URL of PostgreSQL documentation to be configured +* Allow variable size textarea when editing values (Juergen Weigert) +* Allow SQL script upload to parse arbitrary SQL, including multiline + SQL statements. Improve output to show every command as its executed + and SELECT results. +* Add rudimentary support for PostgreSQL 8.1 and 8.2 +* primary key and unique key at table creation (Andreas Huber) +* Add row|statement level options to create trigger for >= 7.4 (Robert Treat) +* Allow altering name (for >= 7.4) and owner (for >= 8.0) of a database (Bryan Encina) +* Allow login to several servers simultaneously +* Rearrange frame layout to suit multi-server support +* New browser tree with dynamically loading branches + (Using XLoadTree2 from http://webfx.eae.net/) +* Allow language change from the intro page at any time +* Avoid getting and setting encoding queries if possible +* Avoid version query in PHP 5 / PostgreSQL 7.4+ +* Avoid query for superuser status in PHP 5 / PostgreSQL 7.4+ +* Put PostgreSQL 7.4+ in read only mode for pagination of results + to avoid executing selects that have write side effects. +* Allow re-using username and password for all servers - saves re-entering + username and password for every server in a pool. +* Make default language 'auto' indicating auto detect. If a language is + deliberately specifed, then that will always be used and no detection will + occur. +* ADOdb library updated to version 4.65 + +Bugs +* Tree Icons are displayed middle instead of top +* Ensure login frame is always at top level (Russell Smith) +* Fix non-ASCII characters inserted in Unicode databases as HTML entities with + non-UTF8 web servers (Markus Bertheau) +* Fix export to work with release candidates and beta releases as well as finals + (Russell Smith) +* Fix port selection for local connections +* Fix timeouts on long running operations (Adrian Nida) +* Allow Multiline character and character varying editing and inserting +* Add automatic browser language selection for all languages +* Stop duplicate insert on re-POST of data +* Fix bug with exporting schema for servers < 7.3 +* Fix opclasses on 7.2 and below +* Fix listing of opaque functions in 7.2 +* Actually fix PHP 4.4.0's new strict references + +Translations +* Japanese from Tadashi Jokagi +* Danish from Arne Eckmann +* Arabic from Zaki +* Romanian from Alin +* Afrikaans from Petri +* Polish from Rafal (utf-8 encoding) +* Slovak from Andrej +* German from Markus +* Spanish From Martin +* Hungarian from Sulyok +* Turkish from Devrim + +Version 3.5.6 +------------- + +Bugs +* Actually fix PHP 4.4.0's new strict references + +Version 3.5.5 +------------- + +Bugs +* Fix for PHP 4.4.0's new strict references +* Small improvement to Opera browser detection in the tree +* Fix listing of opaque functions in 7.2 +* Fix listing of opclasses and functions pre 7.3 + +Version 3.5.4 +------------- + +Bugs +* Fix security hole in include() of language file: + http://secunia.com/advisories/15941/ + Check now requires that the language filename be in the list + of known allowed filenames. +* Fix that functions returning cstring were not being listed +* Make parsing of PostgreSQL 1-dimensional arrays correct. Makes + named function parameter use more reliable. +* Fix downloading of the results of multiline queries. + +Version 3.5.3 +------------- + +Bugs +* Fix using schema enabled dump on non-schema enabled backend +* Don't try setting no timeout when in safe mode +* Reload browser after executing arbitrary SQL +* Fix browser in RTL languages +* Fix inability to drop database using the drop link +* Fix last internal oid value for PostgreSQL 8.0 +* Fix (again) dumping on v8 for windows, exclude dumping some objects. + +Translations +* Portuguese from Francisco + +Version 3.5.2 +------------- + +Bugs +* Fix export to work with release candidates and beta releases as well as finals + (Russell Smith) +* Fix port selection for local connections (Russell Smith) +* Fix timeouts on long running operations (Adrian Nida) +* Allow Multiline character and character varying editing and inserting +* Do browser language detection for all languages + +Translations +* Japanese from Tadashi +* Danish from Arne + +Version 3.5.1 +------------- + +Bugs +* Support 8.0beta5 schema tablespace changes +* Help link fixes +* Estimated row count in 7.0 and 7.1 fixes +* Priviliges nav fix +* Function privileges fix +* Search path fix +* pg_dump on win32 8.0 native fix + +Translations +* Romanian from Alin +* Italian updates from Nicola + +Version 3.5 +----------- + +Features +* Context-sensitive online help system +* Use language preferencies from browser (Markus Bertheau, Nicola Soranzo) +* Tablespace support for 8.0 +* Support cancelling backend processes in 8.0 +* Allow setting privileges on databases +* Allow setting schema search path in SQL window +* Allow filtering find results by object type +* Show function arguments in find results +* Support 8.0's named function arguments +* "Sticky" navigation. phpPgAdmin will now remember while tab you are + looking at (eg. 'Indexes') when you change which table you are viewing. +* New fast navigation bar. A breadcrumb style navigation bar for fast + jumping between areas. +* Much improved grant/revoke feature +* Allow creating and viewing composite types +* pg_dumpall integration. Now you can download the entire cluster via + phpPgAdmin. +* Show line numbers when viewing functions +* Syntax highlighting for PL/SQL, PL/PgSQL, PL/PHP, PL/Ruby, PL/Java, + PL/J, PL/Python and PL/Perl functions, thanks to Jacob D. Cohen's + BSD-licensed highlighting code on rafb.net +* Add page navigation links at the bottom as well as the top of the page + when browsing results. +* Support for 8.0's alter column type +* Support for 8.0's add columns with defaults and not null + +Translations +* Romanian from Alin +* Arabic from Zaki +* Japanese from Tadashi +* Spanish from Robert & Martin +* Mongolian from Erdenemandal +* Ukrainian from Alex Rootoff +* Hebrew from jonatan +* Hungarian from Sulyok +* French from Pascal +* Afrikaans from Petri +* Turkish from Devrim +* Slovak from Andrej +* German from Markus +* Italian from Nicola +* Polish from Rafal + +Bugs +* Fix that non-Auto mode import didn't work (Adrian Nida) +* Fix inability to drop constraints when using a non-english translation +* Work around MSIE's failure to handle downloads in SSL mode +* Allow insert, update, delete, references and trigger to be granted + and revoked on views. + +Version 3.4.1 +------------- + +Bugs +* Fix export of mixed case tables pre 7.4 +* Fix table export problems pre 7.3 +* Fix join clause created by view wizard for pre 7.3 +* Fix reindex of mixed case indexes +* Show domains in type lists in appropriate places +* Fix for multiline CDATA parsing in XML import +* Fix missing _schema notice in reports + +Version 3.4 +----------- + +Features +* Add CACHE and CYCLE parameters in sequence creation +* View, add, edit and delete comments on tables, views, schemas, + aggregates, conversions, operators, functions, types, + opclasses, sequences and columns (Dan Boren & ChrisKL) +* Add config file option for turning off the display of comments +* Allow creating array columns in tables +* Allow adding array columns to tables +* Allow creating domains with type length and arrays +* Show domain base type and comment in domains list +* Allow import of CSV, Tabbed and XML data. "Auto" mode chooses + import mode based on the file extension. +* Allow upload and execution of _basic_ SQL scripts +* More admin features available: vacuum, analyze, cluster all and reindex + (with all options) (Bryan Encina) +* Fix SQL popup window to reload when the database is changed so + that the correct page encoding is used. +* Create view wizard (Bryan Encina) +* Allow specification of MATCH, DEFERRABLE and INITIALLY DEFERRED on + foreign keys. +* Automatically uncheck the NULL checkbox when data is typed in the value + field while editing data. +* Show query runtime when executing arbitrary SQL +* Allow renaming functions when backend supports it +* Views are now more like tables. They are listed in the browser, + you can view the virtual columns of the view and its column defaults. + Columns in view can also be renamed and have defaults set. +* Allow viewing, dropping and creation of rules on views. +* Support for 8.0-dev ALTER COLUMN TYPE, adding of SERIAL and BIGSERIAL + columns, adding NOT NULL columns and adding columns with defaults. + +Bugs +* Fix pg_dump output for PostgreSQL 7.0.x and 7.1.x +* In 7.4 pg_dump, specify schema when dumping tables +* Fix bug in displaying array types in 7.0.x +* Fix bug where views appeared as tables in 7.0.x search results +* Fix bug where find object SQL on < 7.2 was broken +* Fix Find for domain constraints +* Fix popup SQL window so that two different phpPgAdmin instances should + not want to use the same pop-up. +* Fix create table if you don't supply as many fields as you originally + specified. +* Fix schema support for views + +Translations +* Trad. Chinese from Chih-Hsin Lee +* Italian from Nicola +* Spanish from Martin +* Slovak from Andrej +* German from Markus +* Turkish from Devrim +* Hungarian from Sulyok +* French from Pascal +* Polish from Rafal +* Russian from Alex + +Version 3.3.1 +------------- + +Bugs +* Fix table stats for <= 7.2 + +Translations +* Spanish from Martin + +Version 3.3 +----------- + +Features +* Database dump feature, which uses pg_dump +* Large speed improvements by reducing number of database + connections and using external style sheet. +* SQL pop-up window now defaults to the current database +* Display aggregates and operator classes +* Integration with the PostgreSQL statistics collector. See + table and index performance and usage information. +* Display user session defaults for PostgreSQL >= 7.3 +* Rename user feature for PostgreSQL >= 7.4 +* Create functions returning arrays and table types +* Allow editing Select results by oid +* Allow pagination of queries entered in the SQL box +* Allow EXPLAIN ANALYZE of SQL queries (in both SQL boxes) +* Default cursor conveniently in SQL box and Find + +Bugs +* Object browser fixed for databases with no schemas +* Properly detect that reports database is missing +* Fix for alter column on PostgreSQL 7.1 +* phpPgAdmin now works without '.' in the include_path +* Can now remove expire dates on user accounts +* Properties of mixed case named views work in 7.4 + +Translations +* Spanish from Martin Marques +* Japanese from Tadashi Jokagi +* Swedish from Stefan Malmqvist +* Slovak from Andrej Misovik +* Hungarian from Sulyok Peter +* Trad. Chinese from Chih-Hsin Lee +* Italian from Nicola Soranzo +* Afrikaans from Petri Jooste +* Turkish from Devrim Gunduz +* German from Markus Bertheau +* Czech from Libor Vanek +* Russian from Alex Khodorivsky + +Version 3.2.1 +------------- + +Bugs +* Trailing newline problem in chinese-sim translation fixed + +Translations +* French from Pascal +* Russian from Step + +Version 3.2 +----------- + +Features +* PostgreSQL 8.0 CVS support +* Option to dump table structure, data or structure and data +* Set datestyle and extra_float_digits when dumping data +* Results of table browse, table select, view browsing and report browsing + can now ALL be sorted by column +* Result rows of table selects can now be edited and deleted +* Extra login security to prevent logging into servers as postgres and + no password - a VERY common newbie error. +* Cluster indexes and indexed constraints (with analyze) +* Display clustered status of indexes and indexed constraints +* Table info - shows tables that reference the table, parent tables, + and child tables. +* Choice of operator when performing a Select +* 'Select All' feature of table selects now available on view + selects. +* Removed any trace of MySQL support +* Show casts +* Show conversions +* Show languages +* Make table icon link to browse table +* New show_advanced option that allows the hiding or display of + "advanced" objects such as conversions, types, operators, casts and + languages. +* Find Object feature can now find conversions, languages, domains, + constraints, indexes, rules and triggers. +* Better language Makefile for translators +* The SQL box now remembers your query when you click 'Back'. + +Bugs +* Added legal DOCTYPE +* Allow creating foreign keys to tables not in current schema +* Always add brackets around CHECK () constraints +* Never display an index in both Indexes and Constraints +* BIGSERIAL missing from PostgreSQL 7.2 +* Types lengths (eg. varchar(255)) weren't being displayed properly + in PostgreSQL 7.0.x +* Resetting sequence on 7.1+ now restarts at 1, not 2 +* Remove deprecated column default 'now' from SQL script +* Properly escape pg_ in internal queries + +Translations +* Afrikaans from Petri Jooste +* Hungarian from Sulyok Pter +* German update from Markus Bertheau +* Trad. Chinese from Chih-Hsin Lee +* Hungarian from Peti +* Spanish update from Martin Marques +* Slovak update from Andrej Misovic +* Turkish update from Devrim +* Swedish update from Stefan +* Italian update from Nicola + +Version 3.1 +----------- + +Bug Fixes: +* Table browsing for 7.4 fixed +* Synch script for translators disabled due to bugginess. If you want + to use it, just comment out the warning lines from the script itself. +* Change HTML download to XHTML and make it a 100% conforming document, with DTD +* Alter XML format to allow future features + +Translations: +* Trad. Chinese +* Dutch +* Spanish +* Swedish +* Turkish +* French +* Japanese + +Version 3.1-rc-1 +---------------- + +Bug Fixes +* Table browsing for != 7.3 +* SQL window improvements +* Translation improvements + +Version 3.1-beta-1 +------------------ + +Features: +* Add first & last links to nav. Double number of pages shown. +* Allow granting privileges WITH GRANT OPTION for 7.4 +* Allow revoking GRANT OPTION with CASCADE option for 7.4 +* Display new PostgreSQL 7.4 grant options and grantor in privileges +* Find object feature +* Support for domains in 7.3 and domain constraints and alter domain in 7.4 +* Add/drop users to/from groups +* Alter (rename) triggers +* Pop-up SQL window from Mark Gibson +* Superusers can always see all databases +* Default database encoding for languages +* Convert our images to PNG format +* Allow creating tables WITHOUT OIDS +* Show boolean values as TRUE or FALSE when viewing data +* Allow renaming table and changing table owner +* Refresh feature on table browse +* Support better formatted view dumps in 7.4 +* When browsing data, numeric types are aligned right +* Ability to create unique and partial indexes +* View and edit table comments +* Changed XML format significantly. Now doesn't use field names as + tag names, outputs column type information, and is in correct XML format! +* Save result sets as views and reports in most cases +* Download the results of selects and reports +* Tick all box on Select feature +* Export in HTML format +* Allow listing of operators +* Add a robots.txt file to prevent search engine indexation +* Can now safely edit row based on OID. Guards are in place against duplicate OIDs. +* Works properly if you have cookies disabled + +Bug Fixes: +* Lots of NULL value in table dump fixes (XML format changed slightly) +* Boolean default values and general boolean field handling fixes +* Support zero column tables +* Correctly display the contents of bytea fields +* Consider information_schema to be a system object +* Remember fields if index creation fails +* Fix saving and loading function volatility +* Don't list domains under types +* Lots of reports fixes (titles, page reloads, etc.) +* Selecting for NULL values in Select feature + +Translations: +* Italian translation update from Nicola Soranzo +* German update from Markus Bertheau +* Spanish update from Martin Marques +* Trad. Chinese update from Chih-Hsin Lee +* Russian update from Step +* Slovak update from Andrej +* Polish update from Rafal +* Swedish translation from Stefan Malqvist +* Turkish update from Devrim Gunduz +* German update from Markus Bertheau +* Traditional Chinese update from Chih-Hsin Lee +* Spanish update from Martin + +Version 3.0.1 +------------- + +Bug Fixes +* Lots of NULL value in table dump fixes (XML format changed slightly) +* Support zero column tables +* Correctly display the contents of bytea fields +* Error in ADODB_base.php +* Fix saving and loading function volatility +* Don't list domains under types + +Version 3.0 +----------- + +* German update from Markus Bertheau +* Russian update from Alexander Khodorivsky + +Version 3.0-rc-2 +---------------- + +* Slovak update from Andrej Misovic +* Japanese update from Tadashi Jokagi +* Added 'defaultdb' per-connection variable + for installations where connection to template1 + is disabled. +* Removed uses of call time pass by reference, + since it is a deprecated feature of PHP. + +Version 3.0-rc-1 +---------------- + +* Fix drop database reload browser bug +* Look & Feel upgrade from Davey +* Value & expression on edit row +* Chinese update from Chih-Hsin Lee +* Fixed support for functions and sequences + containing bizarre characters + +Version 3.0-beta-1 +------------------- + +* Cascade drop on columns and constraints +* Czech translation +* Preserve spaces when displaying data +* Greatly improved PostgreSQL 7.2, 7.1 and 7.0 support +* Italian translation +* Show database version in top bar +* Many features useful for PostgreSQL hosting: + - Hide reports + - Filter for owned reports + - Hide admin for non-super users + - Easy for a user to change their own password + - Enforceable minimum password length +* Switched to PEAR's HTML_TreeMenu to avoid license issue +* Function editor can handle setof functions, and all + function properties for volatility, etc. +* Manage permissions on functions +* Massive table browsing improvements: + - Sort ascending and descending by clicking + on field name + - Trim long strings. Use 'expand' and 'collapse' to + see full strings or trimmed strings. +* Revoke on objects. Grant or revoke to multiple groups + and users at once. +* Brazilian Portuguese translation from Angelo Rigo + +Version 3.0.0-dev-4 +------------------- + +* Sort on a column when browsing a table +* Slovak translation +* Turkish translation +* German translation +* Reload browser after create/drop of database, schemas and tables +* Select on views +* Add foreign key constraint, with actions +* Cascade drop on all objects + +Version 3.0.0-dev-3 +------------------- + +* French translation +* Russian translations +* Japanese translations +* Trigger definitions +* ADODB upgrade +* Allow editing of non-null unique + +Version 3.0.0-dev-2 +------------------- + +* Language files now use an array of strings +* Almost complete Chinese translation +* Create sequence +* Create trigger +* Create index +* Add check constraint +* Lots of small fixes +* Add column + +Version 3.0.0-dev-1 +------------------- + +* Renamed to phpPgAdmin from WebDB +* Heaps of other stuff + +Version 0.6 - 24-Dec-2002 +------------------------- + +* Support short_tags off +* Fix browsing tables, pagination, etc. +* Fix all error handling +* Fix problems with apostrophes in database, usernames or passwords + +Version 0.5 - 20-Dec-2002 +------------------------- + +* Initial public release +* Still many problems making it unsuitable for production. + +Version 0.1 - Early 2002 +------------------------ + +* Initial development version + diff --git a/php/pgadmin/INSTALL b/php/pgadmin/INSTALL new file mode 100644 index 0000000..75d6e33 --- /dev/null +++ b/php/pgadmin/INSTALL @@ -0,0 +1,80 @@ +phpPgAdmin Installation Guide +----------------------------- + +1. Unpack your download + + If you've downloaded a tar.gz package, execute from a terminal: + + gunzip phpPgAdmin-*.tar.gz + tar -xvf phpPgAdmin-*.tar + + Else, if you've downloaded a tar.bz2 package, execute from a terminal: + + bunzip2 phpPgAdmin-*.tar.bz2 + tar -xvf phpPgAdmin-*.tar + + Else, if you've downloaded a zip package, execute from a terminal: + + unzip phpPgAdmin-*.zip + +2. Configure phpPgAdmin + + edit phpPgAdmin/conf/config.inc.php + + If you mess up the configuration file, you can recover it from the + config.inc.php-dist file. + +3. Set up the reports database. + + If you want to enable reports (which are a useful feature) then go to + the 'sql' subdirectory and view the SQL script for your database. It + will contain instructions on how to set up the reports database. + +4. If you run your PHP installation in safe mode, in order that the database + dump feature can work correctly, you need to set the 'safe_mode_allowed_env_vars' + php.ini variable to include the PGPASSWORD and PGUSER environmental variables + and the safe_mode_exec_dir to include /usr/bin (or wherever the pg_dump + binaries are found). + + eg. safe_mode_allowed_env_vars = PHP_,PG + safe_mode_exec_dir = /usr/bin + + Given that you usually don't want to allow everything in /usr/bin to + be executed, you might want to copy the pg_dump and pg_dumpall utilities + to a directory by themselves. + + Also, you will need to ensure that your 'pg_dump' and 'pg_dumpall' utilities + are executable by the PHP process, if you want dump support in phpPgAdmin. + + Lastly, if you run phpPgAdmin in safe mode, very long running imports, + exports and transactions may time out and be aborted. + +5. Enable the statistics collector in PostgreSQL. phpPgAdmin will display + table and index performance and usage statistics if you have enabled the + PostgreSQL statistics collector. To enable the collector, uncomment the + following lines in your postgresql.conf and enable them: + + stats_start_collector = true + stats_command_string = true + stats_block_level = true + stats_row_level = true + +6. Browse to the phpPgAdmin installation using a web browser. You might + need cookies enabled for phpPgAdmin to work. + +7. IMPORTANT - SECURITY + + PostgreSQL by default does not require you to use a password to log in. + We STRONGLY recomment that you enable md5 passwords for local connections + in your pg_hba.conf, and set a password for the default superuser account. + + Due to the large number of phpPgAdmin installations that have not set + passwords on local connections, there is now a configuration file + option called 'extra_login_security', which is TRUE by default. While + this option is enabled, you will be unable to log in to phpPgAdmin as + the 'root', 'administrator', 'pgsql' or 'postgres' users and empty passwords + will not work. + + Once you are certain you have properly secured your database server, you + can then disable 'extra_login_security' so that you can log in as your + database administrator using the administrator password. diff --git a/php/pgadmin/LICENSE b/php/pgadmin/LICENSE new file mode 100644 index 0000000..d2efe07 --- /dev/null +++ b/php/pgadmin/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2002, 2003, 2004, 2005 The phpPgAdmin Project + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License +for more details. + diff --git a/php/pgadmin/TODO b/php/pgadmin/TODO new file mode 100644 index 0000000..ae12813 --- /dev/null +++ b/php/pgadmin/TODO @@ -0,0 +1,241 @@ +PHPPGADMIN TODO LIST FOR DEVELOPERS +----------------------------------- + +phpPgAdmin is an open source project which means that if you see something on +this list that you would like to implement, just send us a patch. You can find +our project page here: + + http://sourceforge.net/projects/phppgadmin/ + +An item is marked 'claimed' when a username in brackets is put after the TODO +item. If you want to work a claimed item, please contact the developers list. + +An item is marked with a '-' if it has been completed. + +Cluster +------- +* Allow reading of postgresql.conf and pg_hba.conf per pg_read_file() in 8.1 +* Support pg_reload_conf(), pg_rotate_logfile() 8.1 commands +* Add support for default db to connect to on login page (we had several users complaining about that lately) + + +Export +------ + +* Switch to SPARQL format: + http://www.w3.org/TR/2005/WD-rdf-sparql-XMLres-20050801/ + + Actually...SQL/XML is maybe better. + +Import +------ + +* Allow import of data via compressed (bzip/gzip/zip) files + +Users +----- + +* user variables (eg. ALTER USER SET .. TO ...) + + +Groups +------ + + +Roles +----- + + +Permissions +----------- + +* Grant ... on all tables, views, ... to user, group, public + + +Databases +--------- + +* Add alter database variables +* Add database stats +* REASSIGN OWNED & DROP OWNED support for 8.2+ + - http://www.postgresql.org/docs/8.2/interactive/sql-reassign-owned.html + - http://www.postgresql.org/docs/8.2/interactive/sql-drop-owned.html + + +Schemas +------- + + +Large Objects +------------- + +* Add support for large objects + (review patch from Dmitry Koterov https://github.com/DmitryKoterov/phppgadmin/commit/3072e666bd2b291feb91823b41f1fdb8ec7f492d ) + +Tables +------ + +* Rewrite WITHOUT OIDs with more natural WITH OIDS +* Allow FKs during create table (Jawed) +* When adding a column or creating a table, prevent size on non-size types (eg. integer(2)). You can find these by looking at format_type in the postgresql source code. +* Add WITH storage_parameter option to create table [8.2] +* Add last vacuum and analyze information from statistics tables [8.2] +* Restrict operators (from $selectOps array) to appropriate types (ie. no LIKE for int4 fields) +* Alter column should handle types with implicit cast types distinctly from those requiring a USING clause +* Where ENUM types are an option, restrict choice to enum values [8.3] + +Columns +------- + +* Add column constraints during creation and altering of columns + + +Views +----- + +* Support temporary views per 8.1? +* Support updateable views, see http://gerrybthunkings.blogspot.com/2010/01/how-should-postgresql-pgadmin-iii-deal.html + +Sequences +--------- + + +Functions +--------- + +* Remove options for OUT/INOUT params in older servers +* Clean up javascript html spec warnings +* GUC settings [8.3] +* Default param values + +Indexes +------- + +* Support 8.1 Reindex System commands +* Expressional indexes +* Create Index Asc/Desc, Nulls First/Last [8.3] + + +Types +----- + +* Suppres psuedo-type options in type list for creating composite types. (done ?) + + +Operators +--------- + +* Create +* Create/Alter/Drop Operator Family + + +Operator Classes +---------------- + +* Create + + +Triggers +-------- + +* Allow functions from other schemas. +* Support replica trigger modes (8.3) + + +Aggregates +---------- + +* Allow for multi-column aggregates [8.2] +* Rewrite the aggregate edition page ! It is using input tetxt everywhere presently, even for owner and schéma ! + + +Languages +--------- + +* Drop +* Create +* Alter owner [8.3] +* Alter name [8.3] + + +Domains +------- + +* Alter DOMAIN SET SCHEMA support + +Conversions +----------- + +* Properties +* Drop +* Create + + +Casts +----- + +* Properties +* Drop +* Create + + +Full Text Search (8.3) +---------------------- + +* Create/Alter/Drop parser +* Alter Owner + + +Miscellaneous +------------- + +* Audit for PHP 5.3.x compatability +* Support 8.1 standard compliant strings (E'') +* Support per-database connection limits per 8.1 +* Put a 'What's blocking this query' on Processes view +* Show prepared statements on database view [8.2] +* Show cursors on database view [8.2] +* Show NOTICES on queries in SQL window/file +* Printable view of things +* Show comments for all objects (Dan Boren) +* Allow setting/dropping comments for all objects (Dan Boren) +* Show owner for all objects +* Allow changing owner for objects that have this feature [7.4+ generally] +* Add CASCADE option to Truncate [8.2] +* Add ONLY option to Truncate [8.4] +* Add information about synch tool to TRANSLATORS +* Translated FAQ +* Pull FAQ/HISTORY/CREDITS/etc... from CVS for website. +* Add support for csvlogs [8.3] +* Add executed file scripts in history + +Exotic +------ + +* Support contrib/tsearch2 for easy full text indexes +* Pivot reports (ADODB has a feature for this) +* Parameterized reports (use prepared queries) +* Full web accessability conformance + +Principles +---------- + +* register_globals off support +* maximum error_reporting support - enforces code quality, reduces bugs and + improves security +* PHP 5.0 features used +* No HTML font, colour, layout tags. Use CSS for everything +* One day we should make it all XHTML +* everything properly escaped - prevent sql injection and cross-site scripting + probs +* Support Postgres 7.4 and upwards +* psql -E is a cool way of seeing how to do schema queries +* Checking out older versions of describe.c in src/bin/psql in the postgres + distro is a good way of seeing how to query older versions of postgres for + schema information +* Put functions in the highest class possible. For instance, simple selects + should be in Postgres, whereas something that works for < 8.2 should be in the + 8.1 class. This will minimise bugs and duplicated code. +* Adhere to current coding standards +* Avoid using global variables if possible + diff --git a/php/pgadmin/TRANSLATORS b/php/pgadmin/TRANSLATORS new file mode 100644 index 0000000..f4bffe6 --- /dev/null +++ b/php/pgadmin/TRANSLATORS @@ -0,0 +1,84 @@ +Translator Info +--------------- + +If you like phpPgAdmin, then why not translate it into your native language? + +Translation is slightly complicated in phpPgAdmin compared to other PHP +software, since we support viewing database encodings that are different to +your language encoding. + +Also, there are quite a large number of strings to be translated. Partial +translations are better than no translations at all, and a rough guide is that +the strings are in the order from most important to least important in the +language file. You can ask the developers list if you don't know what a +certain string means. + +To translate messages, you will need to install GNU Recode on your computer. + +GNU Recode: http://www.gnu.org/software/recode/recode.html + +Your favourite OS should have a GNU Recode package available. (See bottom for +details.) + +Once you have Recode installed, these are the steps to creating a new +translation: + +1. Go to the lang/ subdirectory + +2. Copy english.php to yourlanguage.php + +3. Update the comment at the top of the file. Put yourself as the language + maintainer. Edit the 'applang' variable and put your language's name in it, + in your language. + + Edit the 'appcharset' variable and put in the name of the encoding for your + language. + +4. Go through as much of the rest of the file as you wish, replacing the + English strings with strings in your native language. + +At this point, you can send the yourlanguage.php file to us and we will take +care of testing and recoding the translation. Please only do that if you +find the rest of these steps too difficult. + +5. Edit the Makefile in the lang/ directory and add an entry for your new + language. Note that the parameter for Recode is "yourcharset..HTML". + +6. Run the Makefile by typing 'make yourlanguage'. A recoded language file + will appear in the lang/recoded/ directory. If the recoding fails, then + fix the error in your language file and try again. + +7. The HTML encoded language file is what phpPgAdmin actually uses to display + localised strings. Have a look at the recoded file to see how the HTML + encoding works. By encoding your language like this, we can display your + language's characters as well as the characters of the language in your + database. + +8. To add your language to phpPgAdmin, edit the lang/translations.php file + and add your language to the $appLangFiles array. + You must include the HTML encoded version of your language's name. You can + get this from the recoded version of your translated strings file. + Also, add your language to the $availableLanguages array for + browser auto detection. + +9. Send your contribution to us. We need the lib.inc.php entry as well as the + yourlanguage.php file in lang/. We don't need the recoded file as we can + recode it ourselves before committing it. Email to the developers list: + phppgadmin-devel@lists.sourceforge.net + +10. Thank you for your contribution! You have just made phpPgAdmin accessible + to thousands more users! + +11. There exists a tool named 'langcheck' in the lang/ directory. To run it, + just type 'php langcheck '. It will give you a report about + which strings are missing from your language file and which need to be + deleted. + +Appendix A: Ways to Get Recode +------------------------------ + +* FreeBSD: cd /usr/ports/converters/recode; make install clean +* BSD: ftp.gnu.org/gnu/recode/ +* Red Hat: rpm -Uvh recode-3.6-6.i386.rpm +* Debian: Available via apt-get +* Win32: http://unxutils.sourceforge.net diff --git a/php/pgadmin/admin.php b/php/pgadmin/admin.php new file mode 100644 index 0000000..ef2c90f --- /dev/null +++ b/php/pgadmin/admin.php @@ -0,0 +1,741 @@ +printTrail('schema'); + $misc->printTitle($lang['strclusterindex'], 'pg.index.cluster'); + + echo "
\n"; + foreach($_REQUEST['ma'] as $v) { + $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES)); + echo "

", sprintf($lang['strconfclustertable'], $misc->printVal($a['table'])), "

\n"; + echo "\n"; + } + } // END if multi cluster + else { + $misc->printTrail($type); + $misc->printTitle($lang['strclusterindex'], 'pg.index.cluster'); + + echo "\n"; + + if ($type == 'table') { + echo "

", sprintf($lang['strconfclustertable'], $misc->printVal($_REQUEST['object'])), "

\n"; + echo "\n"; + } + else { + echo "

", sprintf($lang['strconfclusterdatabase'], $misc->printVal($_REQUEST['object'])), "

\n"; + echo "\n"; + } + } + echo "\n"; + + echo $misc->form; + + echo "\n"; //TODO + echo "\n"; + echo "
\n"; + } // END single cluster + else { + //If multi table cluster + if ($type == 'table') { // cluster one or more table + if (is_array($_REQUEST['table'])) { + $msg=''; + foreach($_REQUEST['table'] as $o) { + $status = $data->clusterIndex($o); + if ($status == 0) + $msg.= sprintf('%s: %s
', htmlentities($o), $lang['strclusteredgood']); + else { + doDefault($type, sprintf('%s%s: %s
', $msg, htmlentities($o), $lang['strclusteredbad'])); + return; + } + } + // Everything went fine, back to the Default page.... + doDefault($msg); + } + else { + $status = $data->clusterIndex($_REQUEST['object']); + if ($status == 0) { + doAdmin($type, $lang['strclusteredgood']); + } + else + doAdmin($type, $lang['strclusteredbad']); + } + } + else { // Cluster all tables in database + $status = $data->clusterIndex(); + if ($status == 0) { + doAdmin($type, $lang['strclusteredgood']); + } + else + doAdmin($type, $lang['strclusteredbad']); + } + } + } + + /** + * Show confirmation of reindex and perform reindex + */ + function doReindex($type, $confirm=false) { + global $script, $data, $misc, $lang, $_reload_browser; + + if (($type == 'table') && empty($_REQUEST['table']) && empty($_REQUEST['ma'])) { + doDefault($lang['strspecifytabletoreindex']); + return; + } + + if ($confirm) { + if (isset($_REQUEST['ma'])) { + $misc->printTrail('schema'); + $misc->printTitle($lang['strreindex'], 'pg.reindex'); + + echo "
\n"; + foreach($_REQUEST['ma'] as $v) { + $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES)); + echo "

", sprintf($lang['strconfreindextable'], $misc->printVal($a['table'])), "

\n"; + echo "\n"; + } + } // END if multi reindex + else { + $misc->printTrail($type); + $misc->printTitle($lang['strreindex'], 'pg.reindex'); + + echo "\n"; + + if ($type == 'table') { + echo "

", sprintf($lang['strconfreindextable'], $misc->printVal($_REQUEST['object'])), "

\n"; + echo "\n"; + } + else { + echo "

", sprintf($lang['strconfreindexdatabase'], $misc->printVal($_REQUEST['object'])), "

\n"; + echo "\n"; + } + } + echo "\n"; + + if ($data->hasForceReindex()) + echo "

\n"; + + echo $misc->form; + + echo "\n"; //TODO + echo "\n"; + echo "
\n"; + } // END single reindex + else { + //If multi table reindex + if (($type == 'table') && is_array($_REQUEST['table'])) { + $msg=''; + foreach($_REQUEST['table'] as $o) { + $status = $data->reindex(strtoupper($type), $o, isset($_REQUEST['reindex_force'])); + if ($status == 0) + $msg.= sprintf('%s: %s
', htmlentities($o), $lang['strreindexgood']); + else { + doDefault($type, sprintf('%s%s: %s
', $msg, htmlentities($o), $lang['strreindexbad'])); + return; + } + } + // Everything went fine, back to the Default page.... + $_reload_browser = true; + doDefault($msg); + } + else { + $status = $data->reindex(strtoupper($type), $_REQUEST['object'], isset($_REQUEST['reindex_force'])); + if ($status == 0) { + $_reload_browser = true; + doAdmin($type, $lang['strreindexgood']); + } + else + doAdmin($type, $lang['strreindexbad']); + } + } + } + + /** + * Show confirmation of analyze and perform analyze + */ + function doAnalyze($type, $confirm=false) { + global $script, $data, $misc, $lang, $_reload_browser; + + if (($type == 'table') && empty($_REQUEST['table']) && empty($_REQUEST['ma'])) { + doDefault($lang['strspecifytabletoanalyze']); + return; + } + + if ($confirm) { + if (isset($_REQUEST['ma'])) { + $misc->printTrail('schema'); + $misc->printTitle($lang['stranalyze'], 'pg.analyze'); + + echo "
\n"; + foreach($_REQUEST['ma'] as $v) { + $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES)); + echo "

", sprintf($lang['strconfanalyzetable'], $misc->printVal($a['table'])), "

\n"; + echo "\n"; + } + } // END if multi analyze + else { + $misc->printTrail($type); + $misc->printTitle($lang['stranalyze'], 'pg.analyze'); + + echo "\n"; + + if ($type == 'table') { + echo "

", sprintf($lang['strconfanalyzetable'], $misc->printVal($_REQUEST['object'])), "

\n"; + echo "\n"; + } + else { + echo "

", sprintf($lang['strconfanalyzedatabase'], $misc->printVal($_REQUEST['object'])), "

\n"; + echo "\n"; + } + } + echo "\n"; + echo $misc->form; + + echo "\n"; //TODO + echo "\n"; + echo "
\n"; + } // END single analyze + else { + //If multi table analyze + if (($type == 'table') && is_array($_REQUEST['table'])) { + $msg=''; + foreach($_REQUEST['table'] as $o) { + $status = $data->analyzeDB($o); + if ($status == 0) + $msg.= sprintf('%s: %s
', htmlentities($o), $lang['stranalyzegood']); + else { + doDefault($type, sprintf('%s%s: %s
', $msg, htmlentities($o), $lang['stranalyzebad'])); + return; + } + } + // Everything went fine, back to the Default page.... + $_reload_browser = true; + doDefault($msg); + } + else { + //we must pass table here. When empty, analyze the whole db + $status = $data->analyzeDB($_REQUEST['table']); + if ($status == 0) { + $_reload_browser = true; + doAdmin($type, $lang['stranalyzegood']); + } + else + doAdmin($type, $lang['stranalyzebad']); + } + } + } + + /** + * Show confirmation of vacuum and perform actual vacuum + */ + function doVacuum($type, $confirm = false) { + global $script, $data, $misc, $lang, $_reload_browser; + + if (($type == 'table') && empty($_REQUEST['table']) && empty($_REQUEST['ma'])) { + doDefault($lang['strspecifytabletovacuum']); + return; + } + + if ($confirm) { + if (isset($_REQUEST['ma'])) { + $misc->printTrail('schema'); + $misc->printTitle($lang['strvacuum'], 'pg.vacuum'); + + echo "
\n"; + foreach($_REQUEST['ma'] as $v) { + $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES)); + echo "

", sprintf($lang['strconfvacuumtable'], $misc->printVal($a['table'])), "

\n"; + echo "\n"; + } + } // END if multi vacuum + else { + $misc->printTrail($type); + $misc->printTitle($lang['strvacuum'], 'pg.vacuum'); + + echo "\n"; + + if ($type == 'table') { + echo "

", sprintf($lang['strconfvacuumtable'], $misc->printVal($_REQUEST['object'])), "

\n"; + echo "\n"; + } + else { + echo "

", sprintf($lang['strconfvacuumdatabase'], $misc->printVal($_REQUEST['object'])), "

\n"; + echo "\n"; + } + } + echo "\n"; + echo $misc->form; + echo "

\n"; + echo "

\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + } // END single vacuum + else { + //If multi drop + if (is_array($_REQUEST['table'])) { + $msg=''; + foreach($_REQUEST['table'] as $t) { + $status = $data->vacuumDB($t, isset($_REQUEST['vacuum_analyze']), isset($_REQUEST['vacuum_full']), isset($_REQUEST['vacuum_freeze'])); + if ($status == 0) + $msg.= sprintf('%s: %s
', htmlentities($t), $lang['strvacuumgood']); + else { + doDefault($type, sprintf('%s%s: %s
', $msg, htmlentities($t), $lang['strvacuumbad'])); + return; + } + } + // Everything went fine, back to the Default page.... + $_reload_browser = true; + doDefault($msg); + } + else { + //we must pass table here. When empty, vacuum the whole db + $status = $data->vacuumDB($_REQUEST['table'], isset($_REQUEST['vacuum_analyze']), isset($_REQUEST['vacuum_full']), isset($_REQUEST['vacuum_freeze'])); + if ($status == 0) { + $_reload_browser = true; + doAdmin($type, $lang['strvacuumgood']); + } + else + doAdmin($type, $lang['strvacuumbad']); + } + } + } + + /** + * Add or Edit autovacuum params and save them + */ + function doEditAutovacuum($type, $confirm, $msg='') { + global $script, $data, $misc, $lang; + + if (empty($_REQUEST['table'])) { + doAdmin($type, '', $lang['strspecifyeditvacuumtable']); + return; + } + + $script = ($type == 'database')? 'database.php' : 'tables.php'; + + if ($confirm) { + $misc->printTrail($type); + $misc->printTitle(sprintf($lang['streditvacuumtable'], $misc->printVal($_REQUEST['table']))); + $misc->printMsg(sprintf($msg, $misc->printVal($_REQUEST['table']))); + + if (empty($_REQUEST['table'])) { + doAdmin($type, '', $lang['strspecifyeditvacuumtable']); + return; + } + + $old_val = $data->getTableAutovacuum($_REQUEST['table']); + $defaults = $data->getAutovacuum(); + $old_val = $old_val->fields; + + if (isset($old_val['autovacuum_enabled']) and ($old_val['autovacuum_enabled'] == 'off')) { + $enabled = ''; + $disabled = 'checked="checked"'; + } + else { + $enabled = 'checked="checked"'; + $disabled = ''; + } + + if (!isset($old_val['autovacuum_vacuum_threshold'])) $old_val['autovacuum_vacuum_threshold'] = ''; + if (!isset($old_val['autovacuum_vacuum_scale_factor'])) $old_val['autovacuum_vacuum_scale_factor'] = ''; + if (!isset($old_val['autovacuum_analyze_threshold'])) $old_val['autovacuum_analyze_threshold'] = ''; + if (!isset($old_val['autovacuum_analyze_scale_factor'])) $old_val['autovacuum_analyze_scale_factor'] = ''; + if (!isset($old_val['autovacuum_vacuum_cost_delay'])) $old_val['autovacuum_vacuum_cost_delay'] = ''; + if (!isset($old_val['autovacuum_vacuum_cost_limit'])) $old_val['autovacuum_vacuum_cost_limit'] = ''; + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + + echo "
\n
\n\n"; + echo "\t\n"; + echo "\n"; + echo "\t\n"; + echo "\n"; + echo "\n"; + echo "\t\n"; + echo "\n"; + echo "\n"; + echo "\t\n"; + echo "\n"; + echo "\n"; + echo "\t\n"; + echo "\n"; + echo "\n"; + echo "\t\n"; + echo "\n"; + echo "\n"; + echo "\t\n"; + echo "\n"; + echo "\n"; + echo "\t\n"; + echo "\n"; + echo "\n"; + echo "
 {$lang['strnewvalues']}{$lang['strdefaultvalues']}
{$lang['strenable']}\n"; + echo "\n"; + echo "{$defaults['autovacuum']}
{$lang['strvacuumbasethreshold']}{$defaults['autovacuum_vacuum_threshold']}
{$lang['strvacuumscalefactor']}{$defaults['autovacuum_vacuum_scale_factor']}
{$lang['stranalybasethreshold']}{$defaults['autovacuum_analyze_threshold']}
{$lang['stranalyzescalefactor']}{$defaults['autovacuum_analyze_scale_factor']}
{$lang['strvacuumcostdelay']}{$defaults['autovacuum_vacuum_cost_delay']}
{$lang['strvacuumcostlimit']}{$defaults['autovacuum_vacuum_cost_limit']}
\n"; + echo "
"; + echo "
"; + echo "\n"; + echo "

\n"; + + echo "
\n"; + } + else { + $status = $data->saveAutovacuum($_REQUEST['table'], $_POST['autovacuum_enabled'], $_POST['autovacuum_vacuum_threshold'], + $_POST['autovacuum_vacuum_scale_factor'], $_POST['autovacuum_analyze_threshold'], $_POST['autovacuum_analyze_scale_factor'], + $_POST['autovacuum_vacuum_cost_delay'], $_POST['autovacuum_vacuum_cost_limit']); + + if ($status == 0) + doAdmin($type, '', sprintf($lang['strsetvacuumtablesaved'], $_REQUEST['table'])); + else + doEditAutovacuum($type, true, $lang['strsetvacuumtablefail']); + } + } + + /** + * confirm drop autovacuum params for a table and drop it + */ + function doDropAutovacuum($type, $confirm) { + global $script, $data, $misc, $lang; + + if (empty($_REQUEST['table'])) { + doAdmin($type, '', $lang['strspecifydelvacuumtable']); + return; + } + + if ($confirm) { + $misc->printTrail($type); + $misc->printTabs($type,'admin'); + + $script = ($type == 'database')? 'database.php' : 'tables.php'; + + printf("

{$lang['strdelvacuumtable']}

\n", + $misc->printVal("\"{$_GET['schema']}"."{$_GET['table']}\"")); + + echo "
\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "
\n"; + } + else { + + $status = $data->dropAutovacuum($_POST['table']); + + if ($status == 0) { + doAdmin($type, '', sprintf($lang['strvacuumtablereset'], $misc->printVal($_POST['table']))); + } + else + doAdmin($type, '', sprintf($lang['strdelvacuumtablefail'], $misc->printVal($_POST['table']))); + } + } + + /** + * database/table administration and tuning tasks + * + * $Id: admin.php + */ + + function doAdmin($type, $msg = '') { + global $script, $data, $misc, $lang; + + $misc->printTrail($type); + $misc->printTabs($type,'admin'); + $misc->printMsg($msg); + + if ($type == 'database') + printf("

{$lang['stradminondatabase']}

\n", $misc->printVal($_REQUEST['object'])); + else + printf("

{$lang['stradminontable']}

\n", $misc->printVal($_REQUEST['object'])); + + echo "\n"; + echo "\n"; + echo "\n"; + echo ""; + echo ""; + if ($data->hasRecluster()){ + echo ""; + } + echo ""; + echo ""; + + // Vacuum + echo "\n"; + echo "\n"; + + // Analyze + echo "\n"; + + // Cluster + if ($data->hasRecluster()){ + $disabled = ''; + echo "\n"; + } + + // Reindex + echo "\n"; + echo "\n"; + echo "
"; + $misc->printHelp($lang['strvacuum'],'pg.admin.vacuum').""; + $misc->printHelp($lang['stranalyze'],'pg.admin.analyze'); + echo ""; + $misc->printHelp($lang['strclusterindex'],'pg.index.cluster'); + echo ""; + $misc->printHelp($lang['strreindex'],'pg.index.reindex'); + echo "
\n"; + echo "
\n"; + + echo "

\n"; + echo $misc->form; + if ($type == 'table') { + echo "\n"; + echo "\n"; + } + echo "

\n"; + echo "
\n"; + echo "
\n"; + echo "
\n"; + echo "

\n"; + echo $misc->form; + if ($type == 'table') { + echo "\n"; + echo "\n"; + } + echo "

\n"; + echo "
\n"; + echo "
\n"; + echo "
\n"; + echo $misc->form; + if ($type == 'table') { + echo "\n"; + echo "\n"; + if (!$data->alreadyClustered($_REQUEST['object'])) { + $disabled = 'disabled="disabled" '; + echo "{$lang['strnoclusteravailable']}
"; + } + } + echo "

\n"; + echo "

\n"; + echo "
\n"; + echo "
\n"; + echo "
\n"; + echo "

\n"; + echo $misc->form; + if ($type == 'table') { + echo "\n"; + echo "\n"; + } + echo "

\n"; + echo "
\n"; + echo "
\n"; + + // Autovacuum + if($data->hasAutovacuum()) { + // get defaults values for autovacuum + $defaults = $data->getAutovacuum(); + // Fetch the autovacuum properties from the database or table if != '' + if ($type == 'table') $autovac = $data->getTableAutovacuum($_REQUEST['table']); + else $autovac = $data->getTableAutovacuum(); + + echo "

{$lang['strvacuumpertable']}

"; + echo '

' . (($defaults['autovacuum'] == 'on') ? $lang['strturnedon'] : $lang['strturnedoff'] ) . '

'; + echo "

{$lang['strnotdefaultinred']}

"; + + function enlight($f, $p) { + if ( isset($f[$p[0]]) and ($f[$p[0]] != $p[1])) + return "". htmlspecialchars($f[$p[0]]) .""; + return htmlspecialchars($p[1]); + } + + $columns = array( + 'namespace' => array( + 'title' => $lang['strschema'], + 'field' => field('nspname'), + 'url' => "redirect.php?subject=schema&{$misc->href}&", + 'vars' => array('schema' => 'nspname'), + ), + 'relname' => array( + 'title' => $lang['strtable'], + 'field' => field('relname'), + 'url' => "redirect.php?subject=table&{$misc->href}&", + 'vars' => array('table' => 'relname', 'schema' => 'nspname'), + ), + 'autovacuum_enabled' => array( + 'title' => $lang['strenabled'], + 'field' => callback('enlight', array('autovacuum_enabled', $defaults['autovacuum'])), + 'type' => 'verbatim' + ), + 'autovacuum_vacuum_threshold' => array( + 'title' => $lang['strvacuumbasethreshold'], + 'field' => callback('enlight', array('autovacuum_vacuum_threshold', $defaults['autovacuum_vacuum_threshold'])), + 'type' => 'verbatim' + ), + 'autovacuum_vacuum_scale_factor' => array( + 'title' => $lang['strvacuumscalefactor'], + 'field' => callback('enlight', array('autovacuum_vacuum_scale_factor', $defaults['autovacuum_vacuum_scale_factor'])), + 'type' => 'verbatim' + ), + 'autovacuum_analyze_threshold' => array( + 'title' => $lang['stranalybasethreshold'], + 'field' => callback('enlight', array('autovacuum_analyze_threshold', $defaults['autovacuum_analyze_threshold'])), + 'type' => 'verbatim' + ), + 'autovacuum_analyze_scale_factor' => array( + 'title' => $lang['stranalyzescalefactor'], + 'field' => callback('enlight', array('autovacuum_analyze_scale_factor', $defaults['autovacuum_analyze_scale_factor'])), + 'type' => 'verbatim' + ), + 'autovacuum_vacuum_cost_delay' => array( + 'title' => $lang['strvacuumcostdelay'], + 'field' => concat(callback('enlight', array('autovacuum_vacuum_cost_delay', $defaults['autovacuum_vacuum_cost_delay'])), 'ms'), + 'type' => 'verbatim' + ), + 'autovacuum_vacuum_cost_limit' => array( + 'title' => $lang['strvacuumcostlimit'], + 'field' => callback('enlight', array('autovacuum_vacuum_cost_limit', $defaults['autovacuum_vacuum_cost_limit'])), + 'type' => 'verbatim' + ), + ); + + // Maybe we need to check permissions here? + $columns['actions'] = array('title' => $lang['stractions']); + + $actions = array( + 'edit' => array( + 'title' => $lang['stredit'], + 'url' => "{$script}?action=confeditautovac&{$misc->href}&subject={$type}&", + 'vars' => array( + 'schema' => 'nspname', + 'table' => 'relname' + ) + ), + 'delete' => array( + 'title' => $lang['strdelete'], + 'url' => "{$script}?action=confdelautovac&{$misc->href}&subject={$type}&", + 'vars' => array( + 'schema' => 'nspname', + 'table' => 'relname' + ) + ) + ); + + if ($type == 'table') { + unset($actions['edit']['vars']['schema'], + $actions['delete']['vars']['schema'], + $columns['namespace'], + $columns['relname'] + ); + } + + $misc->printTable($autovac, $columns, $actions, $lang['strnovacuumconf']); + + if (($type == 'table') and ($autovac->recordCount() == 0)) { + echo "
"; + echo "href}&table=", htmlspecialchars($_REQUEST['table']) + ,"\">{$lang['straddvacuumtable']}"; + } + } + } + + function adminActions($action, $type) { + global $script; + + if ($type == 'database') { + $_REQUEST['object'] = $_REQUEST['database']; + $script = 'database.php'; + } + else { + // $_REQUEST['table'] is no set if we are in the schema page + $_REQUEST['object'] = (isset($_REQUEST['table']) ? $_REQUEST['table']:''); + $script = 'tables.php'; + } + + switch ($action) { + case 'confirm_cluster': + doCluster($type, true); + break; + case 'confirm_reindex': + doReindex($type, true); + break; + case 'confirm_analyze': + doAnalyze($type, true); + break; + case 'confirm_vacuum': + doVacuum($type, true); + break; + case 'cluster': + if (isset($_POST['cluster'])) doCluster($type); + // if multi-action from table canceled: back to the schema default page + else if (($type == 'table') && is_array($_REQUEST['object']) ) doDefault(); + else doAdmin($type); + break; + case 'reindex': + if (isset($_POST['reindex'])) doReindex($type); + // if multi-action from table canceled: back to the schema default page + else if (($type == 'table') && is_array($_REQUEST['object']) ) doDefault(); + else doAdmin($type); + break; + case 'analyze': + if (isset($_POST['analyze'])) doAnalyze($type); + // if multi-action from table canceled: back to the schema default page + else if (($type == 'table') && is_array($_REQUEST['object']) ) doDefault(); + else doAdmin($type); + break; + case 'vacuum': + if (isset($_POST['vacuum'])) doVacuum($type); + // if multi-action from table canceled: back to the schema default page + else if (($type == 'table') && is_array($_REQUEST['object']) ) doDefault(); + else doAdmin($type); + break; + case 'admin': + doAdmin($type); + break; + case 'confeditautovac': + doEditAutovacuum($type, true); + break; + case 'confdelautovac': + doDropAutovacuum($type, true); + break; + case 'confaddautovac': + doAddAutovacuum(true); + break; + case 'editautovac': + if (isset($_POST['save'])) doEditAutovacuum($type, false); + else doAdmin($type); + break; + case 'delautovac': + doDropAutovacuum($type, false); + break; + default: + return false; + } + return true; + } + +?> diff --git a/php/pgadmin/aggregates.php b/php/pgadmin/aggregates.php new file mode 100644 index 0000000..3f55f29 --- /dev/null +++ b/php/pgadmin/aggregates.php @@ -0,0 +1,384 @@ +createAggregate($_REQUEST['name'], $_REQUEST['basetype'], $_REQUEST['sfunc'], $_REQUEST['stype'], + $_REQUEST['ffunc'], $_REQUEST['initcond'], $_REQUEST['sortop'], $_REQUEST['aggrcomment']); + + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['straggrcreated']); + } + else { + doCreate($lang['straggrcreatedbad']); + } + } + + /** + * Displays a screen for create a new aggregate function + */ + function doCreate($msg = '') { + global $data, $misc; + global $lang; + + if (!isset($_REQUEST['name'])) $_REQUEST['name'] = ''; + if (!isset($_REQUEST['basetype'])) $_REQUEST['basetype'] = ''; + if (!isset($_REQUEST['sfunc'])) $_REQUEST['sfunc'] = ''; + if (!isset($_REQUEST['stype'])) $_REQUEST['stype'] = ''; + if (!isset($_REQUEST['ffunc'])) $_REQUEST['ffunc'] = ''; + if (!isset($_REQUEST['initcond'])) $_REQUEST['initcond'] = ''; + if (!isset($_REQUEST['sortop'])) $_REQUEST['sortop'] = ''; + if (!isset($_REQUEST['aggrcomment'])) $_REQUEST['aggrcomment'] = ''; + + $misc->printTrail('schema'); + $misc->printTitle($lang['strcreateaggregate'], 'pg.aggregate.create'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + echo "
{$lang['strname']}_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['name']), "\" />
{$lang['straggrbasetype']}_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['basetype']), "\" />
{$lang['straggrsfunc']}_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['sfunc']), "\" />
{$lang['straggrstype']}_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['stype']), "\" />
{$lang['straggrffunc']}_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['ffunc']), "\" />
{$lang['straggrinitcond']}_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['initcond']), "\" />
{$lang['straggrsortop']}_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['sortop']), "\" />
{$lang['strcomment']}
\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + + /** + * Function to save after altering an aggregate + */ + function doSaveAlter() { + global $data, $lang; + + // Check inputs + if (trim($_REQUEST['aggrname']) == '') { + doAlter($lang['straggrneedsname']); + return; + } + + $status = $data->alterAggregate($_REQUEST['aggrname'], $_REQUEST['aggrtype'], $_REQUEST['aggrowner'], + $_REQUEST['aggrschema'], $_REQUEST['aggrcomment'], $_REQUEST['newaggrname'], $_REQUEST['newaggrowner'], + $_REQUEST['newaggrschema'], $_REQUEST['newaggrcomment']); + if ($status == 0) + doDefault($lang['straggraltered']); + else { + doAlter($lang['straggralteredbad']); + return; + } + } + + + /** + * Function to allow editing an aggregate function + */ + function doAlter($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('aggregate'); + $misc->printTitle($lang['stralter'], 'pg.aggregate.alter'); + $misc->printMsg($msg); + + echo "
\n"; + $aggrdata = $data->getAggregate($_REQUEST['aggrname'], $_REQUEST['aggrtype']); + if($aggrdata->recordCount() > 0 ) { + // Output table header + echo "\n"; + echo "\t\n\t\t"; + echo ""; + echo "\n\t\n"; + + // Display aggregate's name, owner and schema + echo "\t\n\t\t"; + echo ""; + echo "\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "
{$lang['strname']}{$lang['strowner']}{$lang['strschema']}
fields['usename']), "\" />
{$lang['strcomment']}
\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "fields['usename']), "\" />\n"; + echo "\n"; + echo "fields['aggrcomment']), "\" />\n"; + echo "\n"; + echo "

\n"; + } else { + echo "

{$lang['strnodata']}

\n"; + echo "

\n"; + } + echo "
\n"; + } + + /** + * Show confirmation of drop and perform actual drop of the aggregate function selected + */ + function doDrop($confirm) { + global $data, $misc; + global $lang, $_reload_browser; + + if ($confirm) { + $misc->printTrail('aggregate'); + $misc->printTitle($lang['strdrop'], 'pg.aggregate.drop'); + + echo "

", sprintf($lang['strconfdropaggregate'], htmlspecialchars($_REQUEST['aggrname'])), "

\n"; + + echo "
\n"; + echo "

\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + $status = $data->dropAggregate($_POST['aggrname'], $_POST['aggrtype'], isset($_POST['cascade'])); + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['straggregatedropped']); + } + else + doDefault($lang['straggregatedroppedbad']); + } + } + + /** + * Show the properties of an aggregate + */ + function doProperties($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('aggregate'); + $misc->printTitle($lang['strproperties'],'pg.aggregate'); + $misc->printMsg($msg); + + $aggrdata = $data->getAggregate($_REQUEST['aggrname'], $_REQUEST['aggrtype']); + + if($aggrdata->recordCount() > 0 ) { + // Display aggregate's info + echo "\n"; + echo "\n\t\n"; + echo "\t\n\n"; + echo "\n\t\n"; + echo "\t\n\n"; + echo "\n\t\n"; + echo "\t\n\n"; + echo "\n\t\n"; + echo "\t\n\n"; + echo "\n\t\n"; + echo "\t\n\n"; + echo "\n\t\n"; + echo "\t\n\n"; + if($data->hasAggregateSortOp()) { + echo "\n\t\n"; + echo "\t\n\n"; + } + echo "\n\t\n"; + echo "\t\n\n"; + echo "\n\t\n"; + echo "\t\n\n"; + echo "
{$lang['strname']}", htmlspecialchars($_REQUEST['aggrname']), "
{$lang['straggrbasetype']}", htmlspecialchars($_REQUEST['aggrtype']), "
{$lang['straggrsfunc']}", htmlspecialchars($aggrdata->fields['aggtransfn']), "
{$lang['straggrstype']}", htmlspecialchars($aggrdata->fields['aggstype']), "
{$lang['straggrffunc']}", htmlspecialchars($aggrdata->fields['aggfinalfn']), "
{$lang['straggrinitcond']}", htmlspecialchars($aggrdata->fields['agginitval']), "
{$lang['straggrsortop']}", htmlspecialchars($aggrdata->fields['aggsortop']), "
{$lang['strowner']}", htmlspecialchars($aggrdata->fields['usename']), "
{$lang['strcomment']}", $misc->printVal($aggrdata->fields['aggrcomment']), "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + + echo "\n"; + } + + + /** + * Show default list of aggregate functions in the database + */ + function doDefault($msg = '') { + global $data, $conf, $misc; + global $lang; + + $misc->printTrail('schema'); + $misc->printTabs('schema', 'aggregates'); + $misc->printMsg($msg); + + $aggregates = $data->getAggregates(); + + $columns = array( + 'aggrname' => array( + 'title' => $lang['strname'], + 'field' => field('proname'), + 'url' => "redirect.php?subject=aggregate&action=properties&{$misc->href}&", + 'vars' => array('aggrname' => 'proname', 'aggrtype' => 'proargtypes'), + ), + 'aggrtype' => array( + 'title' => $lang['strtype'], + 'field' => field('proargtypes'), + ), + 'aggrtransfn' => array( + 'title' => $lang['straggrsfunc'], + 'field' => field('aggtransfn'), + ), + 'owner' => array( + 'title' => $lang['strowner'], + 'field' => field('usename'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('aggrcomment'), + ), + ); + + $actions = array( + 'alter' => array( + 'title' => $lang['stralter'], + 'url' => "aggregates.php?action=alter&{$misc->href}&", + 'vars' => array('aggrname' => 'proname', 'aggrtype' => 'proargtypes'), + ), + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "aggregates.php?action=confirm_drop&{$misc->href}&", + 'vars' => array('aggrname' => 'proname', 'aggrtype' => 'proargtypes'), + ) + ); + + if (!$data->hasAlterAggregate()) unset($actions['alter']); + $misc->printTable($aggregates, $columns, $actions, $lang['strnoaggregates']); + + echo "

href}\">{$lang['strcreateaggregate']}

\n"; + } + + /** + * Generate XML for the browser tree. + */ + function doTree() { + global $misc, $data; + + $aggregates = $data->getAggregates(); + + $proto = concat(field('proname'), ' (', field('proargtypes'), ')'); + $reqvars = $misc->getRequestVars('aggregate'); + + $attrs = array( + 'text' => $proto, + 'icon' => 'Aggregate', + 'toolTip' => field('aggcomment'), + 'action' => url('redirect.php', + $reqvars, + array( + 'action' => 'properties', + 'aggrname' => field('proname'), + 'aggrtype' => field('proargtypes') + ) + ) + ); + + $misc->printTreeXML($aggregates, $attrs); + exit; + } + + if ($action == 'tree') doTree(); + + $misc->printHeader($lang['straggregates']); + $misc->printBody(); + + switch ($action) { + case 'create': + doCreate(); + break; + case 'save_create': + if (isset($_POST['cancel'])) doDefault(); + else doSaveCreate(); + break; + case 'alter': + doAlter(); + break; + case 'save_alter': + if (isset($_POST['alter'])) doSaveAlter(); + else doProperties(); + break; + case 'drop': + if (isset($_POST['drop'])) doDrop(false); + else doDefault(); + break; + case 'confirm_drop': + doDrop(true); + break; + default: + doDefault(); + break; + case 'properties': + doProperties(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/ajax-ac-insert.php b/php/pgadmin/ajax-ac-insert.php new file mode 100644 index 0000000..49144a9 --- /dev/null +++ b/php/pgadmin/ajax-ac-insert.php @@ -0,0 +1,86 @@ + $v) { + $fkeynames[$k] = html_entity_decode($v, ENT_QUOTES); + } + + $keyspos = array_combine($fkeynames, $_POST['keys']); + + $f_schema = html_entity_decode($_POST['f_schema'], ENT_QUOTES); + $data->fieldClean($f_schema); + $f_table = html_entity_decode($_POST['f_table'], ENT_QUOTES); + $data->fieldClean($f_table); + $f_attname = $fkeynames[$_POST['fattpos'][0]]; + $data->fieldClean($f_attname); + + $q = "SELECT * + FROM \"{$f_schema}\".\"{$f_table}\" + WHERE \"{$f_attname}\"::text LIKE '{$_POST['fvalue']}%' + ORDER BY \"{$f_attname}\" LIMIT 12 {$offset};"; + + $res = $data->selectSet($q); + + if (!$res->EOF) { + echo ""; + echo ''; + foreach (array_keys($res->fields) as $h) { + echo ''; + + } + echo "\n"; + $i=0; + while ((!$res->EOF) && ($i < 11)) { + echo ""; + foreach ($res->fields as $n => $v) { + if (in_array($n, $fkeynames)) + echo ""; + else + echo ""; + } + echo "\n"; + $i++; + $res->moveNext(); + } + echo "
'; + + if (in_array($h, $fkeynames)) + echo '[referenced key]'; + + echo htmlentities($h), '
",htmlentities($v), "", htmlentities($v), "
\n"; + + $page_tests=''; + + $js = ""; + } + else { + printf("

{$lang['strnofkref']}

", "\"{$_POST['f_schema']}\".\"{$_POST['f_table']}\".\"{$fkeynames[$_POST['fattpos']]}\""); + + if ($_POST['offset']) + echo "Prev <<"; + } +?> diff --git a/php/pgadmin/all_db.php b/php/pgadmin/all_db.php new file mode 100644 index 0000000..d074714 --- /dev/null +++ b/php/pgadmin/all_db.php @@ -0,0 +1,501 @@ +printTrail('database'); + $misc->printTitle($lang['stralter'], 'pg.database.alter'); + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + $server_info = $misc->getServerInfo(); + + if ($data->hasAlterDatabaseOwner() && $data->isSuperUser($server_info['username'])) { + // Fetch all users + + $rs = $data->getDatabaseOwner($_REQUEST['alterdatabase']); + $owner = isset($rs->fields['usename']) ? $rs->fields['usename'] : ''; + $users = $data->getUsers(); + + echo "\n"; + echo "\n"; + } + if ($data->hasSharedComments()){ + $rs = $data->getDatabaseComment($_REQUEST['alterdatabase']); + $comment = isset($rs->fields['description']) ? $rs->fields['description'] : ''; + echo "\n"; + echo "\n"; + } + echo "
{$lang['strname']}"; + echo "_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['alterdatabase']), "\" />
{$lang['strowner']}
{$lang['strcomment']}"; + echo "
\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + if (!isset($_POST['owner'])) $_POST['owner'] = ''; + if (!isset($_POST['dbcomment'])) $_POST['dbcomment'] = ''; + if ($data->alterDatabase($_POST['oldname'], $_POST['newname'], $_POST['owner'], $_POST['dbcomment']) == 0) { + $_reload_browser = true; + doDefault($lang['strdatabasealtered']); + } + else + doDefault($lang['strdatabasealteredbad']); + } + } + + /** + * Show confirmation of drop and perform actual drop + */ + function doDrop($confirm) { + global $data, $misc; + global $lang, $_reload_drop_database; + + if (empty($_REQUEST['dropdatabase']) && empty($_REQUEST['ma'])) { + doDefault($lang['strspecifydatabasetodrop']); + exit(); + } + + if ($confirm) { + + $misc->printTrail('database'); + $misc->printTitle($lang['strdrop'], 'pg.database.drop'); + + echo "
\n"; + //If multi drop + if (isset($_REQUEST['ma'])) { + + foreach($_REQUEST['ma'] as $v) { + $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES)); + echo "

", sprintf($lang['strconfdropdatabase'], $misc->printVal($a['database'])), "

\n"; + printf('', htmlspecialchars($a['database'])); + } + + } else { + echo "

", sprintf($lang['strconfdropdatabase'], $misc->printVal($_REQUEST['dropdatabase'])), "

\n"; + echo "\n"; + }// END if multi drop + + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "
\n"; + } // END confirm + else { + //If multi drop + if (is_array($_REQUEST['dropdatabase'])) { + $msg = ''; + foreach($_REQUEST['dropdatabase'] as $d) { + $status = $data->dropDatabase($d); + if ($status == 0) + $msg.= sprintf('%s: %s
', htmlentities($d), $lang['strdatabasedropped']); + else { + doDefault(sprintf('%s%s: %s
', $msg, htmlentities($d), $lang['strdatabasedroppedbad'])); + return; + } + }// Everything went fine, back to Default page... + $_reload_drop_database = true; + doDefault($msg); + } else { + $status = $data->dropDatabase($_POST['dropdatabase']); + if ($status == 0) { + $_reload_drop_database = true; + doDefault($lang['strdatabasedropped']); + } + else + doDefault($lang['strdatabasedroppedbad']); + } + }//END DROP + }// END FUNCTION + + + /** + * Displays a screen where they can enter a new database + */ + function doCreate($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('server'); + $misc->printTitle($lang['strcreatedatabase'], 'pg.database.create'); + $misc->printMsg($msg); + + if (!isset($_POST['formName'])) $_POST['formName'] = ''; + // Default encoding is that in language file + if (!isset($_POST['formEncoding'])) { + if (isset($lang['appdbencoding'])) + $_POST['formEncoding'] = $lang['appdbencoding']; + else + $_POST['formEncoding'] = ''; + } + if (!isset($_POST['formTemplate'])) $_POST['formTemplate'] = 'template1'; + if (!isset($_POST['formSpc'])) $_POST['formSpc'] = ''; + if (!isset($_POST['formComment'])) $_POST['formComment'] = ''; + + // Fetch a list of databases in the cluster + $templatedbs = $data->getDatabases(false); + + // Fetch all tablespaces from the database + if ($data->hasTablespaces()) $tablespaces = $data->getTablespaces(); + + echo "
\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + // ENCODING + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + if ($data->hasDatabaseCollation()) { + if (!isset($_POST['formCollate'])) $_POST['formCollate'] = ''; + if (!isset($_POST['formCType'])) $_POST['formCType'] = ''; + + // LC_COLLATE + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + // LC_CTYPE + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + } + + // Tablespace (if there are any) + if ($data->hasTablespaces() && $tablespaces->recordCount() > 0) { + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + } + + // Comments (if available) + if ($data->hasSharedComments()) { + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + } + + echo "
{$lang['strname']}_maxNameLen}\" value=\"", + htmlspecialchars($_POST['formName']), "\" />
{$lang['strtemplatedb']}\n"; + echo "\t\t\t\n"; + echo "\t\t
{$lang['strencoding']}\n"; + echo "\t\t\t\n"; + echo "\t\t
{$lang['strcollation']}\n"; + echo "\t\t\t\n"; + echo "\t\t
{$lang['strctype']}\n"; + echo "\t\t\t\n"; + echo "\t\t
{$lang['strtablespace']}\n\t\t\t\n\t\t
{$lang['strcomment']}
\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + + /** + * Actually creates the new view in the database + */ + function doSaveCreate() { + global $data, $lang, $_reload_browser; + + // Default tablespace to null if it isn't set + if (!isset($_POST['formSpc'])) $_POST['formSpc'] = null; + + // Default comment to blank if it isn't set + if (!isset($_POST['formComment'])) $_POST['formComment'] = null; + + // Default collate to blank if it isn't set + if (!isset($_POST['formCollate'])) $_POST['formCollate'] = null; + + // Default ctype to blank if it isn't set + if (!isset($_POST['formCType'])) $_POST['formCType'] = null; + + // Check that they've given a name and a definition + if ($_POST['formName'] == '') doCreate($lang['strdatabaseneedsname']); + else { + $status = $data->createDatabase($_POST['formName'], $_POST['formEncoding'], $_POST['formSpc'], + $_POST['formComment'], $_POST['formTemplate'], $_POST['formCollate'], $_POST['formCType']); + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['strdatabasecreated']); + } + else + doCreate($lang['strdatabasecreatedbad']); + } + } + + /** + * Displays options for cluster download + */ + function doExport($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('server'); + $misc->printTabs('server','export'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\n"; + // Data only + echo "\n"; + echo "\n\n"; + echo "\n\n"; + // Structure only + echo "\n"; + echo "\n\n"; + // Structure and data + echo "\n"; + echo "\n\n"; + echo "\n\n"; + echo "\n\n"; + echo "
{$lang['strformat']}{$lang['stroptions']}
"; + echo "{$lang['strformat']}\n"; + echo "\n
"; + echo "{$lang['strformat']}\n"; + echo "\n
\n"; + + echo "

{$lang['stroptions']}

\n"; + echo "

\n"; + echo "

\n"; + + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "

\n"; + echo "
\n"; + } + + /** + * Show default list of databases in the server + */ + function doDefault($msg = '') { + global $data, $conf, $misc; + global $lang; + + $misc->printTrail('server'); + $misc->printTabs('server','databases'); + $misc->printMsg($msg); + + $databases = $data->getDatabases(); + + $columns = array( + 'database' => array( + 'title' => $lang['strdatabase'], + 'field' => field('datname'), + 'url' => "redirect.php?subject=database&{$misc->href}&", + 'vars' => array('database' => 'datname'), + ), + 'owner' => array( + 'title' => $lang['strowner'], + 'field' => field('datowner'), + ), + 'encoding' => array( + 'title' => $lang['strencoding'], + 'field' => field('datencoding'), + ), + 'lc_collate' => array( + 'title' => $lang['strcollation'], + 'field' => field('datcollate'), + ), + 'lc_ctype' => array( + 'title' => $lang['strctype'], + 'field' => field('datctype'), + ), + 'tablespace' => array( + 'title' => $lang['strtablespace'], + 'field' => field('tablespace'), + ), + 'dbsize' => array( + 'title' => $lang['strsize'], + 'field' => field('dbsize'), + 'type' => 'prettysize', + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('datcomment'), + ), + ); + + $actions = array( + 'multiactions' => array( + 'keycols' => array('database' => 'datname'), + 'url' => 'all_db.php', + 'default' => null, + ), + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "all_db.php?action=confirm_drop&subject=database&{$misc->href}&", + 'vars' => array('dropdatabase' => 'datname'), + 'multiaction' => 'confirm_drop', + ), + 'privileges' => array( + 'title' => $lang['strprivileges'], + 'url' => "privileges.php?subject=database&{$misc->href}&", + 'vars' => array('database' => 'datname'), + ) + ); + if ($data->hasAlterDatabase() ) { + $actions['alter'] = array( + 'title' => $lang['stralter'], + 'url' => "all_db.php?action=confirm_alter&subject=database&{$misc->href}&", + 'vars' => array('alterdatabase' => 'datname') + ); + } + + if (!$data->hasTablespaces()) unset($columns['tablespace']); + if (!$data->hasServerAdminFuncs()) unset($columns['dbsize']); + if (!$data->hasDatabaseCollation()) unset($columns['lc_collate'], $columns['lc_ctype']); + if (!isset($data->privlist['database'])) unset($actions['privileges']); + + $misc->printTable($databases, $columns, $actions, $lang['strnodatabases']); + + echo "

href}\">{$lang['strcreatedatabase']}

\n"; + + } + + function doTree() { + global $misc, $data, $lang; + + $databases = $data->getDatabases(); + + $reqvars = $misc->getRequestVars('database'); + + $attrs = array( + 'text' => field('datname'), + 'icon' => 'Database', + 'toolTip'=> field('datcomment'), + 'action' => url('redirect.php', + $reqvars, + array('database' => field('datname')) + ), + 'branch' => url('database.php', + $reqvars, + array( + 'action' => 'tree', + 'database' => field('datname') + ) + ), + ); + + $misc->printTreeXML($databases, $attrs); + exit; + } + + if ($action == 'tree') doTree(); + + $misc->printHeader($lang['strdatabases']); + $misc->printBody(); + + switch ($action) { + case 'export': + doExport(); + break; + case 'save_create': + if (isset($_POST['cancel'])) doDefault(); + else doSaveCreate(); + break; + case 'create': + doCreate(); + break; + case 'drop': + if (isset($_REQUEST['drop'])) doDrop(false); + else doDefault(); + break; + case 'confirm_drop': + doDrop(true); + break; + case 'alter': + if (isset($_POST['oldname']) && isset($_POST['newname']) && !isset($_POST['cancel']) ) doAlter(false); + else doDefault(); + break; + case 'confirm_alter': + doAlter(true); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/browser.php b/php/pgadmin/browser.php new file mode 100644 index 0000000..f3e0912 --- /dev/null +++ b/php/pgadmin/browser.php @@ -0,0 +1,87 @@ +printHeader('', ' + + + '); + + $misc->printBody('browser'); + echo "
\n"; +?> + + +
<?php echo $lang['strrefresh']; ?>
+ + +\n"; + $misc->printFooter(); + +?> diff --git a/php/pgadmin/build_tests.php b/php/pgadmin/build_tests.php new file mode 100644 index 0000000..d4de296 --- /dev/null +++ b/php/pgadmin/build_tests.php @@ -0,0 +1,107 @@ +#!/usr/bin/php + + + Test suite for PPA + \n"); + fclose($fd); + + /* Loop on the servers given in the conf/config.inc.conf file */ + foreach ($conf['servers'] as $server) { + // Is this server in our list of configured servers? + if (!in_array($server['desc'],$test_servers)) + continue; + + /* connect to the server to get its version + * and test its feature along the tests */ + $_c = new Connection($server['host'], + $server['port'], + $server['sslmode'], + $super_user[$server['desc']], + $super_pass[$server['desc']], + $server['defaultdb'] + ); + + $_type = $data = null; + if (! $_c->conn->isConnected()) + die ("Connection to {$server['desc']} failed !\n"); + else { + if (($_type = $_c->getDriver($platform)) === null) { + die( printf($lang['strpostgresqlversionnotsupported'], $postgresqlMinVer)); + } + /* create the database handler we are going to use in the tests creator scripts */ + include_once('./classes/database/' . $_type . '.php'); + $data = new $_type($_c->conn); + $data->platform = $_c->platform; + } + + fprintf(STDERR, "Connected to %s...\n", $server['desc']); + + if (!is_dir("{$test_static_dir}/{$server['desc']}")) + mkdir("{$test_static_dir}/{$server['desc']}"); + + $fd = opendir($test_src_dir); + $files = array(); + while ($file = readdir($fd)) + if (($file != '.') && ($file != '..')) + $files[] = $file; + sort($files); + /* include the tests creator scripts here + * in the order you want them executed. + * Each script append itself to the TestSuite.html file. + **/ + foreach ($files as $testgroupfile) + require("{$test_src_dir}/{$testgroupfile}"); + } + + /* close the TestSuite.html file */ + $fd = fopen($testsuite_file, 'a'); + fprintf($fd, ""); + fclose($fd); + + /* Tests ready to be runned on all your configured servers !!!! */ +?> diff --git a/php/pgadmin/casts.php b/php/pgadmin/casts.php new file mode 100644 index 0000000..835d110 --- /dev/null +++ b/php/pgadmin/casts.php @@ -0,0 +1,103 @@ +printTrail('database'); + $misc->printTabs('database','casts'); + $misc->printMsg($msg); + + $casts = $data->getCasts(); + + $columns = array( + 'source_type' => array( + 'title' => $lang['strsourcetype'], + 'field' => field('castsource'), + ), + 'target_type' => array( + 'title' => $lang['strtargettype'], + 'field' => field('casttarget'), + ), + 'function' => array( + 'title' => $lang['strfunction'], + 'field' => field('castfunc'), + 'params'=> array('null' => $lang['strbinarycompat']), + ), + 'implicit' => array( + 'title' => $lang['strimplicit'], + 'field' => field('castcontext'), + 'type' => 'callback', + 'params'=> array('function' => 'renderCastContext', 'align' => 'center'), + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('castcomment'), + ), + ); + + $actions = array(); + + $misc->printTable($casts, $columns, $actions, $lang['strnocasts']); + } + + /** + * Generate XML for the browser tree. + */ + function doTree() { + global $misc, $data; + + $casts = $data->getCasts(); + + $proto = concat(field('castsource'), ' AS ', field('casttarget')); + + $attrs = array( + 'text' => $proto, + 'icon' => 'Cast' + ); + + $misc->printTreeXML($casts, $attrs); + exit; + } + + if ($action == 'tree') doTree(); + + $misc->printHeader($lang['strcasts']); + $misc->printBody(); + + switch ($action) { + case 'tree': + doTree(); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/classes/ArrayRecordSet.php b/php/pgadmin/classes/ArrayRecordSet.php new file mode 100644 index 0000000..b2a3754 --- /dev/null +++ b/php/pgadmin/classes/ArrayRecordSet.php @@ -0,0 +1,32 @@ +_array = $data; + $this->_count = count($this->_array); + $this->fields = reset($this->_array); + if ($this->fields === false) $this->EOF = true; + } + + function recordCount() { + return $this->_count; + } + + function moveNext() { + $this->fields = next($this->_array); + if ($this->fields === false) $this->EOF = true; + } +} + +?> diff --git a/php/pgadmin/classes/Gui.php b/php/pgadmin/classes/Gui.php new file mode 100644 index 0000000..859f30a --- /dev/null +++ b/php/pgadmin/classes/Gui.php @@ -0,0 +1,48 @@ + Value + * @param $szName string to specify the name of the form element + * @param (optional) $bBlankEntry bool to specify whether or not we want a blank selection + * @param (optional) $szDefault string to specify the default VALUE selected + * @param (optional) $bMultiple bool to specify whether or not we want a multi select combo box + * @param (optional) $iSize int to specify the size IF a multi select combo + * @return string with the generated HTML select box + */ + function printCombo(&$arrOptions, $szName, $bBlankEntry = true, $szDefault = '', $bMultiple = false, $iSize = 10) { + $htmlOut = ''; + if ($bMultiple) // If multiple select combo + $htmlOut .= "\n"; + if ($bBlankEntry) + $htmlOut .= "\n"; + + foreach ($arrOptions AS $curKey => $curVal) { + $curVal = htmlspecialchars($curVal); + $curKey = htmlspecialchars($curKey); + if ($curVal == $szDefault) { + $htmlOut .= "\n"; + } + else { + $htmlOut .= "\n"; + } + } + $htmlOut .= "\n"; + + return $htmlOut; + } + } +?> diff --git a/php/pgadmin/classes/Misc.php b/php/pgadmin/classes/Misc.php new file mode 100644 index 0000000..fcfa6ec --- /dev/null +++ b/php/pgadmin/classes/Misc.php @@ -0,0 +1,2259 @@ +getServerInfo(); + return !empty($info[$all ? 'pg_dumpall_path' : 'pg_dump_path']); + } + + /** + * Sets the href tracking variable + */ + function setHREF() { + $this->href = $this->getHREF(); + } + + /** + * Get a href query string, excluding objects below the given object type (inclusive) + */ + function getHREF($exclude_from = null) { + $href = ''; + if (isset($_REQUEST['server']) && $exclude_from != 'server') { + $href .= 'server=' . urlencode($_REQUEST['server']); + if (isset($_REQUEST['database']) && $exclude_from != 'database') { + $href .= '&database=' . urlencode($_REQUEST['database']); + if (isset($_REQUEST['schema']) && $exclude_from != 'schema') { + $href .= '&schema=' . urlencode($_REQUEST['schema']); + } + } + } + return $href; + } + + /** + * Sets the form tracking variable + */ + function setForm() { + $this->form = ''; + if (isset($_REQUEST['server'])) { + $this->form .= "\n"; + if (isset($_REQUEST['database'])) { + $this->form .= "\n"; + if (isset($_REQUEST['schema'])) { + $this->form .= "\n"; + } + } + } + } + + /** + * Render a value into HTML using formatting rules specified + * by a type name and parameters. + * + * @param $str The string to change + * + * @param $type Field type (optional), this may be an internal PostgreSQL type, or: + * yesno - same as bool, but renders as 'Yes' or 'No'. + * pre - render in a
 block.
+		 *			nbsp     - replace all spaces with  's
+		 *			verbatim - render exactly as supplied, no escaping what-so-ever.
+		 *			callback - render using a callback function supplied in the 'function' param.
+		 *
+		 * @param $params Type parameters (optional), known parameters:
+		 *			null     - string to display if $str is null, or set to TRUE to use a default 'NULL' string,
+		 *			           otherwise nothing is rendered.
+		 *			clip     - if true, clip the value to a fixed length, and append an ellipsis...
+		 *			cliplen  - the maximum length when clip is enabled (defaults to $conf['max_chars'])
+		 *			ellipsis - the string to append to a clipped value (defaults to $lang['strellipsis'])
+		 *			tag      - an HTML element name to surround the value.
+		 *			class    - a class attribute to apply to any surrounding HTML element.
+		 *			align    - an align attribute ('left','right','center' etc.)
+		 *			true     - (type='bool') the representation of true.
+		 *			false    - (type='bool') the representation of false.
+		 *			function - (type='callback') a function name, accepts args ($str, $params) and returns a rendering.
+		 *			lineno   - prefix each line with a line number.
+		 *			map      - an associative array.
+		 *
+		 * @return The HTML rendered value
+		 */
+		function printVal($str, $type = null, $params = array()) {
+			global $lang, $conf, $data;
+
+			// Shortcircuit for a NULL value
+			if (is_null($str))
+				return isset($params['null'])
+						? ($params['null'] === true ? 'NULL' : $params['null'])
+						: '';
+
+			if (isset($params['map']) && isset($params['map'][$str])) $str = $params['map'][$str];
+
+			// Clip the value if the 'clip' parameter is true.
+			if (isset($params['clip']) && $params['clip'] === true) {
+				$maxlen = isset($params['cliplen']) && is_integer($params['cliplen']) ? $params['cliplen'] : $conf['max_chars'];
+				$ellipsis = isset($params['ellipsis']) ? $params['ellipsis'] : $lang['strellipsis'];
+				if (strlen($str) > $maxlen) {
+					$str = substr($str, 0, $maxlen-1) . $ellipsis;
+				}
+			}
+
+			$out = '';
+
+			switch ($type) {
+				case 'int2':
+				case 'int4':
+				case 'int8':
+				case 'float4':
+				case 'float8':
+				case 'money':
+				case 'numeric':
+				case 'oid':
+				case 'xid':
+				case 'cid':
+				case 'tid':
+					$align = 'right';
+					$out = nl2br(htmlspecialchars($str));
+					break;
+				case 'yesno':
+					if (!isset($params['true'])) $params['true'] = $lang['stryes'];
+					if (!isset($params['false'])) $params['false'] = $lang['strno'];
+					// No break - fall through to boolean case.
+				case 'bool':
+				case 'boolean':
+					if (is_bool($str)) $str = $str ? 't' : 'f';
+					switch ($str) {
+						case 't':
+							$out = (isset($params['true']) ? $params['true'] : $lang['strtrue']);
+							$align = 'center';
+							break;
+						case 'f':
+							$out = (isset($params['false']) ? $params['false'] : $lang['strfalse']);
+							$align = 'center';
+							break;
+						default:
+							$out = htmlspecialchars($str);
+					}
+					break;
+				case 'bytea':
+					$tag = 'div';
+					$class = 'pre';
+					$out = $data->escapeBytea($str);
+					break;
+				case 'errormsg':
+					$tag = 'pre';
+					$class = 'error';
+					$out = htmlspecialchars($str);
+					break;
+				case 'pre':
+					$tag = 'pre';
+					$out = htmlspecialchars($str);
+					break;
+				case 'prenoescape':
+					$tag = 'pre';
+					$out = $str;
+					break;
+				case 'nbsp':
+					$out = nl2br(str_replace(' ', ' ', htmlspecialchars($str)));
+					break;
+				case 'verbatim':
+					$out = $str;
+					break;
+				case 'callback':
+					$out = $params['function']($str, $params);
+					break;
+				case 'prettysize':
+					if ($str == -1) 
+						$out = $lang['strnoaccess'];
+					else
+					{
+						$limit = 10 * 1024;
+						$mult = 1;
+						if ($str < $limit * $mult)
+							$out = $str.' '.$lang['strbytes'];
+						else
+						{
+							$mult *= 1024;
+							if ($str < $limit * $mult)
+								$out = floor(($str + $mult / 2) / $mult).' '.$lang['strkb'];
+							else
+							{
+								$mult *= 1024;
+								if ($str < $limit * $mult)
+									$out = floor(($str + $mult / 2) / $mult).' '.$lang['strmb'];
+								else
+								{
+									$mult *= 1024;
+									if ($str < $limit * $mult)
+										$out = floor(($str + $mult / 2) / $mult).' '.$lang['strgb'];
+									else
+									{
+										$mult *= 1024;
+										if ($str < $limit * $mult)
+											$out = floor(($str + $mult / 2) / $mult).' '.$lang['strtb'];
+									}
+								}
+							}
+						}
+					}
+					break;
+				case 'slonystatus':
+					switch ($str) {
+					case 'insync':
+						$out = $lang['strhealthy'];
+						break;
+					case 'outofsync':
+						$out = $lang['stroutofsync'];
+						break;
+					default:
+						$out = $lang['strunknown'];
+					}
+					break;
+				default:
+					// If the string contains at least one instance of >1 space in a row, a tab
+					// character, a space at the start of a line, or a space at the start of
+					// the whole string then render within a pre-formatted element (
).
+					if (preg_match('/(^ |  |\t|\n )/m', $str)) {
+						$tag = 'pre';
+						$class = 'data';
+						$out = htmlspecialchars($str);
+					} else {
+						$out = nl2br(htmlspecialchars($str));
+					}
+			}
+
+			if (isset($params['class'])) $class = $params['class'];
+			if (isset($params['align'])) $align = $params['align'];
+
+			if (!isset($tag) && (isset($class) || isset($align))) $tag = 'div';
+
+			if (isset($tag)) {
+				$alignattr = isset($align) ? " style=\"text-align: {$align}\"" : '';
+				$classattr = isset($class) ? " class=\"{$class}\"" : '';
+				$out = "<{$tag}{$alignattr}{$classattr}>{$out}";
+			}
+
+			// Add line numbers if 'lineno' param is true
+			if (isset($params['lineno']) && $params['lineno'] === true) {
+				$lines = explode("\n", $str);
+				$num = count($lines);
+				if ($num > 0) {
+					$temp = "\n
";
+					for ($i = 1; $i <= $num; $i++) {
+						$temp .= $i . "\n";
+					}
+					$temp .= "
{$out}
\n"; + $out = $temp; + } + unset($lines); + } + + return $out; + } + + /** + * A function to recursively strip slashes. Used to + * enforce magic_quotes_gpc being off. + * @param &var The variable to strip + */ + function stripVar(&$var) { + if (is_array($var)) { + foreach($var as $k => $v) { + $this->stripVar($var[$k]); + + /* magic_quotes_gpc escape keys as well ...*/ + if (is_string($k)) { + $ek = stripslashes($k); + if ($ek !== $k) { + $var[$ek] = $var[$k]; + unset($var[$k]); + } + } + } + } + else + $var = stripslashes($var); + } + + /** + * Print out the page heading and help link + * @param $title Title, already escaped + * @param $help (optional) The identifier for the help link + */ + function printTitle($title, $help = null) { + global $data, $lang; + + echo "

"; + $this->printHelp($title, $help); + echo "

\n"; + } + + /** + * Print out a message + * @param $msg The message to print + */ + function printMsg($msg) { + if ($msg != '') echo "

{$msg}

\n"; + } + + /** + * Creates a database accessor + */ + function getDatabaseAccessor($database, $server_id = null) { + global $lang, $conf, $misc, $_connection; + + $server_info = $this->getServerInfo($server_id); + + // Perform extra security checks if this config option is set + if ($conf['extra_login_security']) { + // Disallowed logins if extra_login_security is enabled. + // These must be lowercase. + $bad_usernames = array('pgsql', 'postgres', 'root', 'administrator'); + + $username = strtolower($server_info['username']); + + if ($server_info['password'] == '' || in_array($username, $bad_usernames)) { + unset($_SESSION['webdbLogin'][$_REQUEST['server']]); + $msg = $lang['strlogindisallowed']; + include('./login.php'); + exit; + } + } + + // Create the connection object and make the connection + $_connection = new Connection( + $server_info['host'], + $server_info['port'], + $server_info['sslmode'], + $server_info['username'], + $server_info['password'], + $database + ); + + // Get the name of the database driver we need to use. + // The description of the server is returned in $platform. + $_type = $_connection->getDriver($platform); + if ($_type === null) { + printf($lang['strpostgresqlversionnotsupported'], $postgresqlMinVer); + exit; + } + $this->setServerInfo('platform', $platform, $server_id); + $this->setServerInfo('pgVersion', $_connection->conn->pgVersion, $server_id); + + // Create a database wrapper class for easy manipulation of the + // connection. + include_once('./classes/database/' . $_type . '.php'); + $data = new $_type($_connection->conn); + $data->platform = $_connection->platform; + + return $data; + } + + + /** + * Prints the page header. If global variable $_no_output is + * set then no header is drawn. + * @param $title The title of the page + * @param $script script tag + */ + function printHeader($title = '', $script = null, $frameset = false) { + global $appName, $lang, $_no_output, $conf; + + if (!isset($_no_output)) { + header("Content-Type: text/html; charset=" . $lang['appcharset']); + // Send XHTML headers, or regular XHTML strict headers + echo "\n"; + if ($frameset == true) { + echo "\n"; + } else if (isset($conf['use_xhtml_strict']) && $conf['use_xhtml_strict']) { + echo "\n"; + } else { + echo "\n"; + } + echo "\n"; + + echo "\n"; + echo "\n"; + // Theme + echo "\n"; + echo "\n"; + echo "\n"; + echo "", htmlspecialchars($appName); + if ($title != '') echo " - {$title}"; + echo "\n"; + + if ($script) echo "{$script}\n"; + echo "\n"; + } + } + + /** + * Prints the page footer + * @param $doBody True to output body tag, false otherwise + */ + function printFooter($doBody = true) { + global $_reload_browser, $_reload_drop_database; + global $lang, $_no_bottom_link; + + if ($doBody) { + if (isset($_reload_browser)) $this->printReload(false); + elseif (isset($_reload_drop_database)) $this->printReload(true); + if (!isset($_no_bottom_link)) + echo "".$lang['strgotoppage'].""; + + echo "\n"; + } + echo "\n"; + } + + /** + * Prints the page body. + * @param $doBody True to output body tag, false otherwise + * @param $bodyClass - name of body class + */ + function printBody($bodyClass = '', $doBody = true ) { + global $_no_output; + + if (!isset($_no_output)) { + if ($doBody) { + $bodyClass = htmlspecialchars($bodyClass); + echo "\n"; + } + } + } + + /** + * Outputs JavaScript code that will reload the browser + * @param $database True if dropping a database, false otherwise + */ + function printReload($database) { + echo "\n"; + } + + /** + * Display navigation tabs + * @param $tabs An associative array of tabs definitions, see printNav() for an example. + * @param $activetab The name of the tab to be highlighted. + */ + function printTabs($tabs, $activetab) { + global $misc, $conf, $data, $lang; + + if (is_string($tabs)) { + $_SESSION['webdbLastTab'][$tabs] = $activetab; + $tabs = $this->getNavTabs($tabs); + } + + echo "\n"; + #echo "
\n"; + + # FIXME: don't count hidden tabs + $width = (int)(100 / count($tabs)).'%'; + + foreach ($tabs as $tab_id => $tab) { + $active = ($tab_id == $activetab) ? ' active' : ''; + + if (!isset($tab['hide']) || $tab['hide'] !== true) { + + $tablink = "printActionUrl($tab, $_REQUEST, 'href') . ">"; + + if (isset($tab['icon']) && $icon = $this->icon($tab['icon'])) + $tablink .= "\"{$tab['title']}\""; + + $tablink .= "{$tab['title']}"; + + echo "
\n"; + #echo "\n"; + } + } + + echo "
"; + #echo ""; + + if (isset($tab['help'])) + $this->printHelp($tablink, $tab['help']); + else + echo $tablink; + + echo "
\n"; + #echo "
\n"; + } + + /** + * Retrieve the tab info for a specific tab bar. + * @param $section The name of the tab bar. + */ + function getNavTabs($section) { + global $data, $lang, $conf, $slony; + + $hide_advanced = ($conf['show_advanced'] === false); + + switch ($section) { + case 'root': + return array ( + 'intro' => array ( + 'title' => $lang['strintroduction'], + 'url' => "intro.php", + 'icon' => 'Introduction', + ), + 'servers' => array ( + 'title' => $lang['strservers'], + 'url' => "servers.php", + 'icon' => 'Servers', + ), + ); + + case 'server': + case 'report': + $server_info = $this->getServerInfo(); + $hide_users = !$data->isSuperUser($server_info['username']); + $tmp = array ( + 'databases' => array ( + 'title' => $lang['strdatabases'], + 'url' => 'all_db.php', + 'urlvars' => array('subject' => 'server'), + 'help' => 'pg.database', + 'icon' => 'Databases', + ) + ); + if ($data->hasRoles()) { + $tmp = array_merge($tmp, array( + 'roles' => array ( + 'title' => $lang['strroles'], + 'url' => 'roles.php', + 'urlvars' => array('subject' => 'server'), + 'hide' => $hide_users, + 'help' => 'pg.role', + 'icon' => 'Roles', + ) + )); + } + else { + $tmp = array_merge($tmp, array( + 'users' => array ( + 'title' => $lang['strusers'], + 'url' => 'users.php', + 'urlvars' => array('subject' => 'server'), + 'hide' => $hide_users, + 'help' => 'pg.user', + 'icon' => 'Users', + ), + 'groups' => array ( + 'title' => $lang['strgroups'], + 'url' => 'groups.php', + 'urlvars' => array('subject' => 'server'), + 'hide' => $hide_users, + 'help' => 'pg.group', + 'icon' => 'UserGroups', + ) + )); + } + + $tmp = array_merge($tmp, array( + 'account' => array ( + 'title' => $lang['straccount'], + 'url' => $data->hasRoles() ? 'roles.php' : 'users.php', + 'urlvars' => array('subject' => 'server', 'action' => 'account'), + 'hide' => !$hide_users, + 'help' => 'pg.role', + 'icon' => 'User', + ), + 'tablespaces' => array ( + 'title' => $lang['strtablespaces'], + 'url' => 'tablespaces.php', + 'urlvars' => array('subject' => 'server'), + 'hide' => (!$data->hasTablespaces()), + 'help' => 'pg.tablespace', + 'icon' => 'Tablespaces', + ), + 'export' => array ( + 'title' => $lang['strexport'], + 'url' => 'all_db.php', + 'urlvars' => array('subject' => 'server', 'action' => 'export'), + 'hide' => (!$this->isDumpEnabled()), + 'icon' => 'Export', + ), + 'reports' => array ( + 'title' => $lang['strreports'], + 'url' => 'reports.php', + 'urlvars' => array('subject' => 'server'), + 'hide' => !$conf['show_reports'], + 'icon' => 'Reports', + ), + )); + return $tmp; + break; + case 'database': + $tabs = array ( + 'schemas' => array ( + 'title' => $lang['strschemas'], + 'url' => 'schemas.php', + 'urlvars' => array('subject' => 'database'), + 'help' => 'pg.schema', + 'icon' => 'Schemas', + ), + 'sql' => array ( + 'title' => $lang['strsql'], + 'url' => 'database.php', + 'urlvars' => array('subject' => 'database', 'action' => 'sql', 'new' => 1), + 'help' => 'pg.sql', + 'tree' => false, + 'icon' => 'SqlEditor' + ), + 'find' => array ( + 'title' => $lang['strfind'], + 'url' => 'database.php', + 'urlvars' => array('subject' => 'database', 'action' => 'find'), + 'tree' => false, + 'icon' => 'Search' + ), + 'variables' => array ( + 'title' => $lang['strvariables'], + 'url' => 'database.php', + 'urlvars' => array('subject' => 'database', 'action' => 'variables'), + 'help' => 'pg.variable', + 'tree' => false, + 'icon' => 'Variables', + ), + 'processes' => array ( + 'title' => $lang['strprocesses'], + 'url' => 'database.php', + 'urlvars' => array('subject' => 'database', 'action' => 'processes'), + 'help' => 'pg.process', + 'tree' => false, + 'icon' => 'Processes', + ), + 'locks' => array ( + 'title' => $lang['strlocks'], + 'url' => 'database.php', + 'urlvars' => array('subject' => 'database', 'action' => 'locks'), + 'help' => 'pg.locks', + 'tree' => false, + 'icon' => 'Key', + ), + 'admin' => array ( + 'title' => $lang['stradmin'], + 'url' => 'database.php', + 'urlvars' => array('subject' => 'database', 'action' => 'admin'), + 'tree' => false, + 'icon' => 'Admin', + ), + 'privileges' => array ( + 'title' => $lang['strprivileges'], + 'url' => 'privileges.php', + 'urlvars' => array('subject' => 'database'), + 'hide' => (!isset($data->privlist['database'])), + 'help' => 'pg.privilege', + 'tree' => false, + 'icon' => 'Privileges', + ), + 'languages' => array ( + 'title' => $lang['strlanguages'], + 'url' => 'languages.php', + 'urlvars' => array('subject' => 'database'), + 'hide' => $hide_advanced, + 'help' => 'pg.language', + 'icon' => 'Languages', + ), + 'casts' => array ( + 'title' => $lang['strcasts'], + 'url' => 'casts.php', + 'urlvars' => array('subject' => 'database'), + 'hide' => ($hide_advanced), + 'help' => 'pg.cast', + 'icon' => 'Casts', + ), + 'slony' => array ( + 'title' => 'Slony', + 'url' => 'plugin_slony.php', + 'urlvars' => array('subject' => 'database', 'action' => 'clusters_properties'), + 'hide' => !isset($slony), + 'help' => '', + 'icon' => 'Replication', + ), + 'export' => array ( + 'title' => $lang['strexport'], + 'url' => 'database.php', + 'urlvars' => array('subject' => 'database', 'action' => 'export'), + 'hide' => (!$this->isDumpEnabled()), + 'tree' => false, + 'icon' => 'Export', + ), + ); + return $tabs; + + case 'schema': + $tabs = array ( + 'tables' => array ( + 'title' => $lang['strtables'], + 'url' => 'tables.php', + 'urlvars' => array('subject' => 'schema'), + 'help' => 'pg.table', + 'icon' => 'Tables', + ), + 'views' => array ( + 'title' => $lang['strviews'], + 'url' => 'views.php', + 'urlvars' => array('subject' => 'schema'), + 'help' => 'pg.view', + 'icon' => 'Views', + ), + 'sequences' => array ( + 'title' => $lang['strsequences'], + 'url' => 'sequences.php', + 'urlvars' => array('subject' => 'schema'), + 'help' => 'pg.sequence', + 'icon' => 'Sequences', + ), + 'functions' => array ( + 'title' => $lang['strfunctions'], + 'url' => 'functions.php', + 'urlvars' => array('subject' => 'schema'), + 'help' => 'pg.function', + 'icon' => 'Functions', + ), + 'fulltext' => array ( + 'title' => $lang['strfulltext'], + 'url' => 'fulltext.php', + 'urlvars' => array('subject' => 'schema'), + 'help' => 'pg.fts', + 'tree' => true, + 'icon' => 'Fts', + ), + 'domains' => array ( + 'title' => $lang['strdomains'], + 'url' => 'domains.php', + 'urlvars' => array('subject' => 'schema'), + 'help' => 'pg.domain', + 'icon' => 'Domains', + ), + 'aggregates' => array ( + 'title' => $lang['straggregates'], + 'url' => 'aggregates.php', + 'urlvars' => array('subject' => 'schema'), + 'hide' => $hide_advanced, + 'help' => 'pg.aggregate', + 'icon' => 'Aggregates', + ), + 'types' => array ( + 'title' => $lang['strtypes'], + 'url' => 'types.php', + 'urlvars' => array('subject' => 'schema'), + 'hide' => $hide_advanced, + 'help' => 'pg.type', + 'icon' => 'Types', + ), + 'operators' => array ( + 'title' => $lang['stroperators'], + 'url' => 'operators.php', + 'urlvars' => array('subject' => 'schema'), + 'hide' => $hide_advanced, + 'help' => 'pg.operator', + 'icon' => 'Operators', + ), + 'opclasses' => array ( + 'title' => $lang['stropclasses'], + 'url' => 'opclasses.php', + 'urlvars' => array('subject' => 'schema'), + 'hide' => $hide_advanced, + 'help' => 'pg.opclass', + 'icon' => 'OperatorClasses', + ), + 'conversions' => array ( + 'title' => $lang['strconversions'], + 'url' => 'conversions.php', + 'urlvars' => array('subject' => 'schema'), + 'hide' => $hide_advanced, + 'help' => 'pg.conversion', + 'icon' => 'Conversions', + ), + 'privileges' => array ( + 'title' => $lang['strprivileges'], + 'url' => 'privileges.php', + 'urlvars' => array('subject' => 'schema'), + 'help' => 'pg.privilege', + 'tree' => false, + 'icon' => 'Privileges', + ), + 'export' => array ( + 'title' => $lang['strexport'], + 'url' => 'schemas.php', + 'urlvars' => array('subject' => 'schema', 'action' => 'export'), + 'hide' => (!$this->isDumpEnabled()), + 'tree' => false, + 'icon' => 'Export', + ), + ); + if (!$data->hasFTS()) unset($tabs['fulltext']); + return $tabs; + + case 'table': + return array ( + 'columns' => array ( + 'title' => $lang['strcolumns'], + 'url' => 'tblproperties.php', + 'urlvars' => array('subject' => 'table', 'table' => field('table')), + 'icon' => 'Columns', + 'branch'=> true, + ), + 'indexes' => array ( + 'title' => $lang['strindexes'], + 'url' => 'indexes.php', + 'urlvars' => array('subject' => 'table', 'table' => field('table')), + 'help' => 'pg.index', + 'icon' => 'Indexes', + 'branch'=> true, + ), + 'constraints' => array ( + 'title' => $lang['strconstraints'], + 'url' => 'constraints.php', + 'urlvars' => array('subject' => 'table', 'table' => field('table')), + 'help' => 'pg.constraint', + 'icon' => 'Constraints', + 'branch'=> true, + ), + 'triggers' => array ( + 'title' => $lang['strtriggers'], + 'url' => 'triggers.php', + 'urlvars' => array('subject' => 'table', 'table' => field('table')), + 'help' => 'pg.trigger', + 'icon' => 'Triggers', + 'branch'=> true, + ), + 'rules' => array ( + 'title' => $lang['strrules'], + 'url' => 'rules.php', + 'urlvars' => array('subject' => 'table', 'table' => field('table')), + 'help' => 'pg.rule', + 'icon' => 'Rules', + 'branch'=> true, + ), + 'admin' => array ( + 'title' => $lang['stradmin'], + 'url' => 'tables.php', + 'urlvars' => array('subject' => 'table', 'table' => field('table'), 'action' => 'admin'), + 'icon' => 'Admin', + ), + 'info' => array ( + 'title' => $lang['strinfo'], + 'url' => 'info.php', + 'urlvars' => array('subject' => 'table', 'table' => field('table')), + 'icon' => 'Statistics', + ), + 'privileges' => array ( + 'title' => $lang['strprivileges'], + 'url' => 'privileges.php', + 'urlvars' => array('subject' => 'table', 'table' => field('table')), + 'help' => 'pg.privilege', + 'icon' => 'Privileges', + ), + 'import' => array ( + 'title' => $lang['strimport'], + 'url' => 'tblproperties.php', + 'urlvars' => array('subject' => 'table', 'table' => field('table'), 'action' => 'import'), + 'icon' => 'Import', + 'hide' => false, + ), + 'export' => array ( + 'title' => $lang['strexport'], + 'url' => 'tblproperties.php', + 'urlvars' => array('subject' => 'table', 'table' => field('table'), 'action' => 'export'), + 'icon' => 'Export', + 'hide' => false, + ), + ); + + case 'view': + return array ( + 'columns' => array ( + 'title' => $lang['strcolumns'], + 'url' => 'viewproperties.php', + 'urlvars' => array('subject' => 'view', 'view' => field('view')), + 'icon' => 'Columns', + 'branch'=> true, + ), + 'definition' => array ( + 'title' => $lang['strdefinition'], + 'url' => 'viewproperties.php', + 'urlvars' => array('subject' => 'view', 'view' => field('view'), 'action' => 'definition'), + 'icon' => 'Definition' + ), + 'rules' => array ( + 'title' => $lang['strrules'], + 'url' => 'rules.php', + 'urlvars' => array('subject' => 'view', 'view' => field('view')), + 'help' => 'pg.rule', + 'icon' => 'Rules', + 'branch'=> true, + ), + 'privileges' => array ( + 'title' => $lang['strprivileges'], + 'url' => 'privileges.php', + 'urlvars' => array('subject' => 'view', 'view' => field('view')), + 'help' => 'pg.privilege', + 'icon' => 'Privileges', + ), + 'export' => array ( + 'title' => $lang['strexport'], + 'url' => 'viewproperties.php', + 'urlvars' => array('subject' => 'view', 'view' => field('view'), 'action' => 'export'), + 'icon' => 'Export', + 'hide' => false, + ), + ); + + case 'function': + return array ( + 'definition' => array ( + 'title' => $lang['strdefinition'], + 'url' => 'functions.php', + 'urlvars' => array( + 'subject' => 'function', + 'function' => field('function'), + 'function_oid' => field('function_oid'), + 'action' => 'properties', + ), + 'icon' => 'Definition', + ), + 'privileges' => array ( + 'title' => $lang['strprivileges'], + 'url' => 'privileges.php', + 'urlvars' => array( + 'subject' => 'function', + 'function' => field('function'), + 'function_oid' => field('function_oid'), + ), + 'icon' => 'Privileges', + ), + ); + + case 'aggregate': + return array ( + 'definition' => array ( + 'title' => $lang['strdefinition'], + 'url' => 'aggregates.php', + 'urlvars' => array( + 'subject' => 'aggregate', + 'aggrname' => field('aggrname'), + 'aggrtype' => field('aggrtype'), + 'action' => 'properties', + ), + 'icon' => 'Definition', + ), + ); + + case 'role': + return array ( + 'definition' => array ( + 'title' => $lang['strdefinition'], + 'url' => 'roles.php', + 'urlvars' => array( + 'subject' => 'role', + 'rolename' => field('rolename'), + 'action' => 'properties', + ), + 'icon' => 'Definition', + ), + ); + + case 'popup': + return array ( + 'sql' => array ( + 'title' => $lang['strsql'], + 'url' => 'sqledit.php', + 'urlvars' => array('subject' => 'schema', 'action' => 'sql'), + 'help' => 'pg.sql', + 'icon' => 'SqlEditor', + ), + 'find' => array ( + 'title' => $lang['strfind'], + 'url' => 'sqledit.php', + 'urlvars' => array('subject' => 'schema', 'action' => 'find'), + 'icon' => 'Search', + ), + ); + + case 'slony_cluster': + return array ( + 'properties' => array ( + 'title' => $lang['strproperties'], + 'url' => 'plugin_slony.php', + 'urlvars' => array( + 'subject' => 'slony_cluster', + 'action' => 'cluster_properties', + 'slony_cluster' => field('slony_cluster') + ), + 'help' => '', + 'tree' => false, + 'icon' => 'Cluster', + ), + 'nodes' => array ( + 'title' => $lang['strnodes'], + 'url' => 'plugin_slony.php', + 'urlvars' => array( + 'subject' => 'slony_cluster', + 'action' => 'nodes_properties', + 'slony_cluster' => field('slony_cluster') + ), + 'branch' => 'nodes', + 'help' => '', + 'icon' => 'Nodes', + ), + 'sets' => array ( + 'title' => $lang['strrepsets'], + 'url' => 'plugin_slony.php', + 'urlvars' => array( + 'subject' => 'slony_cluster', + 'action' => 'sets_properties', + 'slony_cluster' => field('slony_cluster') + ), + 'branch' => 'sets', + 'help' => '', + 'icon' => 'ReplicationSets', + ), + ); + + case 'column': + return array( + 'properties' => array ( + 'title' => $lang['strcolprop'], + 'url' => 'colproperties.php', + 'urlvars' => array( + 'subject' => 'column', + 'table' => field('table'), + 'column' => field('column') + ), + 'icon' => 'Column' + ), + 'privileges' => array ( + 'title' => $lang['strprivileges'], + 'url' => 'privileges.php', + 'urlvars' => array( + 'subject' => 'column', + 'table' => field('table'), + 'column' => field('column') + ), + 'help' => 'pg.privilege', + 'icon' => 'Privileges', + ) + ); + + case 'fulltext': + return array ( + 'ftsconfigs' => array ( + 'title' => $lang['strftstabconfigs'], + 'url' => 'fulltext.php', + 'urlvars' => array('subject' => 'schema'), + 'hide' => !$data->hasFTS(), + 'help' => 'pg.ftscfg', + 'tree' => true, + 'icon' => 'FtsCfg', + ), + 'ftsdicts' => array ( + 'title' => $lang['strftstabdicts'], + 'url' => 'fulltext.php', + 'urlvars' => array('subject' => 'schema', 'action' => 'viewdicts'), + 'hide' => !$data->hasFTS(), + 'help' => 'pg.ftsdict', + 'tree' => true, + 'icon' => 'FtsDict', + ), + 'ftsparsers' => array ( + 'title' => $lang['strftstabparsers'], + 'url' => 'fulltext.php', + 'urlvars' => array('subject' => 'schema', 'action' => 'viewparsers'), + 'hide' => !$data->hasFTS(), + 'help' => 'pg.ftsparser', + 'tree' => true, + 'icon' => 'FtsParser', + ), + ); + + default: + return array(); + } + } + + /** + * Get the URL for the last active tab of a particular tab bar. + */ + function getLastTabURL($section) { + global $data; + + $tabs = $this->getNavTabs($section); + + if (isset($_SESSION['webdbLastTab'][$section]) && isset($tabs[$_SESSION['webdbLastTab'][$section]])) + $tab = $tabs[$_SESSION['webdbLastTab'][$section]]; + else + $tab = reset($tabs); + + return isset($tab['url']) ? $tab : null; + } + + function printTopbar() { + global $lang, $conf, $appName, $appVersion, $appLangFiles; + + $server_info = $this->getServerInfo(); + + echo "
"; + + if (isset($_REQUEST['server'])) { + $sql_url = "sqledit.php?{$this->href}&action="; + $sql_window_id = htmlspecialchars('sqledit:'.$_REQUEST['server']); + $history_url = "history.php?{$this->href}&action=pophistory"; + $history_window_id = htmlspecialchars('history:'.$_REQUEST['server']); + $logout_shared = isset($_SESSION['sharedUsername']) ? + ' onclick="return confirm(\''. $lang['strconfdropcred']. '\')"': + ''; + + echo ""; + } +/* + echo ""; +*/ + echo "
"; + + if ($server_info && isset($server_info['platform']) && isset($server_info['username'])) { + echo sprintf($lang['strtopbar'], + ''.htmlspecialchars($server_info['platform']).'', + ''.htmlspecialchars((empty($server_info['host'])) ? 'localhost':$server_info['host']).'', + ''.htmlspecialchars($server_info['port']).'', + ''.htmlspecialchars($server_info['username']).''); + } else { + echo "$appName $appVersion"; + } + + echo ""; + echo "\n"; + echo ""; + + echo "
\n"; + echo "\n"; + foreach ($_GET as $key => $val) { + if ($key == 'language') continue; + echo "\n"; + } + echo "
\n"; + + echo "
\n"; + } + + /** + * Display a bread crumb trail. + */ + function printTrail($trail = array()) { + global $lang; + + $this->printTopbar(); + + if (is_string($trail)) { + $trail = $this->getTrail($trail); + } + + echo "
"; + + foreach ($trail as $crumb) { + echo ""; + } + + echo "
"; + $crumblink = "printVal($crumb['url'], 'nbsp') . '"'; + + if (isset($crumb['title'])) + $crumblink .= " title=\"{$crumb['title']}\""; + + $crumblink .= ">"; + + if (isset($crumb['title'])) + $iconalt = $crumb['title']; + else + $iconalt = 'Database Root'; + + if (isset($crumb['icon']) && $icon = $this->icon($crumb['icon'])) + $crumblink .= "\"{$iconalt}\""; + + $crumblink .= "" . htmlspecialchars($crumb['text']) . ""; + + if (isset($crumb['help'])) + $this->printHelp($crumblink, $crumb['help']); + else + echo $crumblink; + + echo "{$lang['strseparator']}"; + echo "
\n"; + } + + /** + * Create a bread crumb trail of the object hierarchy. + * @param $object The type of object at the end of the trail. + */ + function getTrail($subject = null) { + global $lang, $conf, $data, $appName; + + $trail = array(); + $vars = ''; + $done = false; + + $trail['root'] = array( + 'text' => $appName, + 'url' => 'redirect.php?subject=root', + 'icon' => 'Introduction' + ); + + if ($subject == 'root') $done = true; + + if (!$done) { + $vars = 'server='.urlencode($_REQUEST['server']).'&'; + $server_info = $this->getServerInfo(); + $trail['server'] = array( + 'title' => $lang['strserver'], + 'text' => $server_info['desc'], + 'url' => "redirect.php?subject=server&{$vars}", + 'help' => 'pg.server', + 'icon' => 'Server' + ); + } + if ($subject == 'server') $done = true; + + if (isset($_REQUEST['report']) && !$done) { + $vars .= 'report='.urlencode($_REQUEST['report']).'&'; + $trail['report'] = array( + 'title' => $lang['strreport'], + 'text' => $_REQUEST['report'], + 'url' => "reports.php?subject=report&{$vars}", + 'icon' => 'Report' + ); + } + + if (isset($_REQUEST['database']) && !$done) { + $vars .= 'database='.urlencode($_REQUEST['database']).'&'; + $trail['database'] = array( + 'title' => $lang['strdatabase'], + 'text' => $_REQUEST['database'], + 'url' => "redirect.php?subject=database&{$vars}", + 'help' => 'pg.database', + 'icon' => 'Database' + ); + } elseif (isset($_REQUEST['rolename']) && !$done) { + $vars .= "subject=role&action=properties&rolename=".urlencode($_REQUEST['rolename']); + $trail['role'] = array( + 'title' => $lang['strrole'], + 'text' => $_REQUEST['rolename'], + 'url' => "redirect.php?{$vars}", + 'help' => 'pg.role', + 'icon' => 'Roles' + ); + } + if ($subject == 'database' || $subject == 'role' || $subject == 'report') $done = true; + + if (isset($_REQUEST['schema']) && !$done) { + $vars .= 'schema='.urlencode($_REQUEST['schema']).'&'; + $trail['schema'] = array( + 'title' => $lang['strschema'], + 'text' => $_REQUEST['schema'], + 'url' => "redirect.php?subject=schema&{$vars}", + 'help' => 'pg.schema', + 'icon' => 'Schema' + ); + } + if ($subject == 'schema') $done = true; + + if (isset($_REQUEST['slony_cluster']) && !$done) { + $vars .= 'slony_cluster='.urlencode($_REQUEST['slony_cluster']).'&'; + $trail['slony_cluster'] = array( + 'title' => 'Slony Cluster', + 'text' => $_REQUEST['slony_cluster'], + 'url' => "redirect.php?subject=slony_cluster&{$vars}", + 'help' => 'sl.cluster', + 'icon' => 'Cluster' + ); + } + if ($subject == 'slony_cluster') $done = true; + + if (isset($_REQUEST['table']) && !$done) { + $vars .= "table=".urlencode($_REQUEST['table']); + $trail['table'] = array( + 'title' => $lang['strtable'], + 'text' => $_REQUEST['table'], + 'url' => "redirect.php?subject=table&{$vars}", + 'help' => 'pg.table', + 'icon' => 'Table' + ); + } elseif (isset($_REQUEST['view']) && !$done) { + $vars .= "view=".urlencode($_REQUEST['view']); + $trail['view'] = array( + 'title' => $lang['strview'], + 'text' => $_REQUEST['view'], + 'url' => "redirect.php?subject=view&{$vars}", + 'help' => 'pg.view', + 'icon' => 'View' + ); + } elseif (isset($_REQUEST['ftscfg']) && !$done) { + $vars .= "action=viewconfig&ftscfg=".urlencode($_REQUEST['ftscfg']); + $trail['ftscfg'] = array( + 'title' => $lang['strftsconfig'], + 'text' => $_REQUEST['ftscfg'], + 'url' => "fulltext.php?{$vars}", + 'help' => 'pg.ftscfg.example', + 'icon' => 'Fts' + ); + } + if ($subject == 'table' || $subject == 'view' || $subject == 'ftscfg') $done = true; + + if (!$done && !is_null($subject)) { + switch ($subject) { + case 'function': + $vars .= "{$subject}_oid=".urlencode($_REQUEST[$subject.'_oid']).'&'; + $vars .= "subject={$subject}&{$subject}=".urlencode($_REQUEST[$subject]); + $trail[$subject] = array( + 'title' => $lang['str'.$subject], + 'text' => $_REQUEST[$subject], + 'url' => "redirect.php?{$vars}", + 'help' => 'pg.function', + 'icon' => 'Function' + ); + break; + case 'aggregate': + $vars .= "subject=aggregate&action=properties&aggrname=".urlencode($_REQUEST['aggrname']); + $vars .= "&aggrtype=".urlencode($_REQUEST['aggrtype']); + $trail[$subject] = array( + 'title' => $lang['straggregate'], + 'text' => $_REQUEST['aggrname'], + 'url' => "redirect.php?{$vars}", + 'help' => 'pg.aggregate', + 'icon' => 'Aggregate' + ); + break; + case 'slony_node': + $vars .= 'no_id='.urlencode($_REQUEST['no_id']).'&no_name='.urlencode($_REQUEST['no_name']); + $trail[$subject] = array( + 'title' => 'Slony Node', + 'text' => $_REQUEST['no_name'], + 'url' => "redirect.php?{$vars}", + 'help' => 'sl.'.$subject, + 'icon' => 'Node' + ); + break; + case 'slony_set': + $vars .= "{$subject}_id=".urlencode($_REQUEST[$subject]).'&'; + $vars .= "subject={$subject}&{$subject}=".urlencode($_REQUEST[$subject]); + $trail[$subject] = array( + 'title' => $lang['str'.$subject], + 'text' => $_REQUEST[$subject], + 'url' => "redirect.php?{$vars}", + 'help' => 'sl.'.$subject, + 'icon' => 'AvailableReplicationSet' + ); + break; + case 'column': + $vars .= "&column=". urlencode($_REQUEST['column']) ."&subject=column"; + $trail['column'] = array ( + 'title' => $lang['strcolumn'], + 'text' => $_REQUEST['column'], + 'icon' => 'Column', + 'url' => "redirect.php?{$vars}" + ); + break; + default: + if (isset($_REQUEST[$subject])) { + switch ($subject) { + case 'domain': $icon = 'Domain'; break; + case 'sequence': $icon = 'Sequence'; break; + case 'type': $icon = 'Type'; break; + case 'operator': $icon = 'Operator'; break; + default: $icon = null; break; + } + $trail[$subject] = array( + 'title' => $lang['str'.$subject], + 'text' => $_REQUEST[$subject], + 'help' => 'pg.'.$subject, + 'icon' => $icon, + ); + } + } + } + + return $trail; + } + + /** + * Do multi-page navigation. Displays the prev, next and page options. + * @param $page the page currently viewed + * @param $pages the maximum number of pages + * @param $url the url to refer to with the page number inserted + * @param $max_width the number of pages to make available at any one time (default = 20) + */ + function printPages($page, $pages, $url, $max_width = 20) { + global $lang; + + $window = 10; + + if ($page < 0 || $page > $pages) return; + if ($pages < 0) return; + if ($max_width <= 0) return; + + if ($pages > 1) { + echo "

\n"; + if ($page != 1) { + $temp = str_replace('%s', 1, $url); + echo "{$lang['strfirst']}\n"; + $temp = str_replace('%s', $page - 1, $url); + echo "{$lang['strprev']}\n"; + } + + if ($page <= $window) { + $min_page = 1; + $max_page = min(2 * $window, $pages); + } + elseif ($page > $window && $pages >= $page + $window) { + $min_page = ($page - $window) + 1; + $max_page = $page + $window; + } + else { + $min_page = ($page - (2 * $window - ($pages - $page))) + 1; + $max_page = $pages; + } + + // Make sure min_page is always at least 1 + // and max_page is never greater than $pages + $min_page = max($min_page, 1); + $max_page = min($max_page, $pages); + + for ($i = $min_page; $i <= $max_page; $i++) { + $temp = str_replace('%s', $i, $url); + if ($i != $page) echo "$i\n"; + else echo "$i\n"; + } + if ($page != $pages) { + $temp = str_replace('%s', $page + 1, $url); + echo "{$lang['strnext']}\n"; + $temp = str_replace('%s', $pages, $url); + echo "{$lang['strlast']}\n"; + } + echo "

\n"; + } + } + + /** + * Displays link to the context help. + * @param $str - the string that the context help is related to (already escaped) + * @param $help - help section identifier + */ + function printHelp($str, $help) { + global $lang, $data; + + echo $str; + if ($help) { + echo "{$lang['strhelpicon']}"; + } + } + + /** + * Outputs JavaScript to set default focus + * @param $object eg. forms[0].username + */ + function setFocus($object) { + echo "\n"; + } + + /** + * Outputs JavaScript to set the name of the browser window. + * @param $name the window name + * @param $addServer if true (default) then the server id is + * attached to the name. + */ + function setWindowName($name, $addServer = true) { + echo "\n"; + } + + /** + * Converts a PHP.INI size variable to bytes. Taken from publically available + * function by Chris DeRose, here: http://www.php.net/manual/en/configuration.directives.php#ini.file-uploads + * @param $strIniSize The PHP.INI variable + * @return size in bytes, false on failure + */ + function inisizeToBytes($strIniSize) { + // This function will take the string value of an ini 'size' parameter, + // and return a double (64-bit float) representing the number of bytes + // that the parameter represents. Or false if $strIniSize is unparseable. + $a_IniParts = array(); + + if (!is_string($strIniSize)) + return false; + + if (!preg_match ('/^(\d+)([bkm]*)$/i', $strIniSize,$a_IniParts)) + return false; + + $nSize = (double) $a_IniParts[1]; + $strUnit = strtolower($a_IniParts[2]); + + switch($strUnit) { + case 'm': + return ($nSize * (double) 1048576); + case 'k': + return ($nSize * (double) 1024); + case 'b': + default: + return $nSize; + } + } + + /** + * Display a URL given an action associative array. + * @param $action An associative array of the follow properties: + * 'url' => The first part of the URL (before the ?) + * 'urlvars' => Associative array of (URL variable => field name) + * these are appended to the URL + * 'urlfn' => Function to apply to URL before display + * @param $fields Field data from which 'urlfield' and 'vars' are obtained. + * @param $attr If supplied then the URL will be quoted and prefixed with + * '$attr='. + */ + function printActionUrl(&$action, &$fields, $attr = null) { + $url = value($action['url'], $fields); + + if ($url === false) return ''; + + if (!empty($action['urlvars'])) { + $urlvars = value($action['urlvars'], $fields); + } else { + $urlvars = array(); + } + + if (isset($urlvars['subject'])) { + $subject = value($urlvars['subject'], $fields); + if (isset($_REQUEST['server']) && $subject != 'root') { + $urlvars['server'] = $_REQUEST['server']; + if (isset($_REQUEST['database']) && $subject != 'server') { + $urlvars['database'] = $_REQUEST['database']; + if (isset($_REQUEST['schema']) && $subject != 'database') { + $urlvars['schema'] = $_REQUEST['schema']; + } + } + } + } + + $sep = '?'; + foreach ($urlvars as $var => $varfield) { + $url .= $sep . value_url($var, $fields) . '=' . value_url($varfield, $fields); + $sep = '&'; + } + + $url = htmlentities($url); + + if ($attr !== null && $url != '') + return ' '.$attr.'="'.$url.'"'; + else + return $url; + } + + function getRequestVars($subject = '') { + $v = array(); + if (!empty($subject)) + $v['subject'] = $subject; + if (isset($_REQUEST['server']) && $subject != 'root') { + $v['server'] = $_REQUEST['server']; + if (isset($_REQUEST['database']) && $subject != 'server') { + $v['database'] = $_REQUEST['database']; + if (isset($_REQUEST['schema']) && $subject != 'database') { + $v['schema'] = $_REQUEST['schema']; + } + } + } + return $v; + } + + function printUrlVars(&$vars, &$fields) { + foreach ($vars as $var => $varfield) { + echo "{$var}=", urlencode($fields[$varfield]), "&"; + } + } + + /** + * Display a table of data. + * @param $tabledata A set of data to be formatted, as returned by $data->getDatabases() etc. + * @param $columns An associative array of columns to be displayed: + * $columns = array( + * column_id => array( + * 'title' => Column heading, + * 'field' => Field name for $tabledata->fields[...], + * 'help' => Help page for this column, + * ), ... + * ); + * @param $actions Actions that can be performed on each object: + * $actions = array( + * * multi action support + * * parameters are serialized for each entries and given in $_REQUEST['ma'] + * 'multiactions' => array( + * 'keycols' => Associative array of (URL variable => field name), // fields included in the form + * 'url' => URL submission, + * 'default' => Default selected action in the form. + * if null, an empty action is added & selected + * ), + * * actions * + * action_id => array( + * 'title' => Action heading, + * 'url' => Static part of URL. Often we rely + * relative urls, usually the page itself (not '' !), or just a query string, + * 'vars' => Associative array of (URL variable => field name), + * 'multiaction' => Name of the action to execute. + * Add this action to the multi action form + * ), ... + * ); + * @param $nodata (optional) Message to display if data set is empty. + * @param $pre_fn (optional) Name of a function to call for each row, + * it will be passed two params: $rowdata and $actions, + * it may be used to derive new fields or modify actions. + * It can return an array of actions specific to the row, + * or if nothing is returned then the standard actions are used. + * (see tblproperties.php and constraints.php for examples) + * The function must not must not store urls because + * they are relative and won't work out of context. + */ + function printTable(&$tabledata, &$columns, &$actions, $nodata = null, $pre_fn = null) { + global $data, $conf, $misc, $lang; + + if ($has_ma = isset($actions['multiactions'])) + $ma = $actions['multiactions']; + unset($actions['multiactions']); + + if ($tabledata->recordCount() > 0) { + + // Remove the 'comment' column if they have been disabled + if (!$conf['show_comments']) { + unset($columns['comment']); + } + + if (isset($columns['comment'])) { + // Uncomment this for clipped comments. + // TODO: This should be a user option. + //$columns['comment']['params']['clip'] = true; + } + + if ($has_ma) { + echo "\n"; + echo "
\n"; + if (isset($ma['vars'])) + foreach ($ma['vars'] as $k => $v) + echo ""; + } + + echo "\n"; + echo "\n"; + // Display column headings + if ($has_ma) echo ""; + foreach ($columns as $column_id => $column) { + switch ($column_id) { + case 'actions': + if (sizeof($actions) > 0) echo "\n"; + break; + default: + echo "\n"; + break; + } + } + echo "\n"; + + // Display table rows + $i = 0; + while (!$tabledata->EOF) { + $id = ($i % 2) + 1; + + unset($alt_actions); + if (!is_null($pre_fn)) $alt_actions = $pre_fn($tabledata, $actions); + if (!isset($alt_actions)) $alt_actions =& $actions; + + echo "\n"; + if ($has_ma) { + foreach ($ma['keycols'] as $k => $v) + $a[$k] = $tabledata->fields[$v]; + echo "\n"; + } + + foreach ($columns as $column_id => $column) { + + // Apply default values for missing parameters + if (isset($column['url']) && !isset($column['vars'])) $column['vars'] = array(); + + switch ($column_id) { + case 'actions': + foreach ($alt_actions as $action) { + if (isset($action['disable']) && $action['disable'] === true) { + echo "\n"; + } else { + echo "\n"; + } + } + break; + default: + echo "\n"; + break; + } + } + echo "\n"; + + $tabledata->moveNext(); + $i++; + } + echo "
{$column['title']}"; + if (isset($column['help'])) + $this->printHelp($column['title'], $column['help']); + else + echo $column['title']; + echo "
"; + echo ""; + echo ""; + echo "printUrlVars($action['vars'], $tabledata->fields); + if (isset($action['target'])) + echo "\" target=\"{$action['target']}"; + echo "\">{$action['title']}"; + $val = value($column['field'], $tabledata->fields); + if (!is_null($val)) { + if (isset($column['url'])) { + echo "printUrlVars($column['vars'], $tabledata->fields); + echo "\">"; + } + $type = isset($column['type']) ? $column['type'] : null; + $params = isset($column['params']) ? $column['params'] : array(); + echo $misc->printVal($val, $type, $params); + if (isset($column['url'])) echo ""; + } + + echo "
\n"; + + // Multi action table footer w/ options & [un]check'em all + if ($has_ma) { + // if default is not set or doesn't exist, set it to null + if (!isset($ma['default']) || !isset($actions[$ma['default']])) + $ma['default'] = null; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
{$lang['stractionsonmultiplelines']}
"; + echo "{$lang['strselectall']} / "; + echo "{$lang['strunselectall']} ---> \n"; + echo "\t\n"; + echo "\n"; + echo $misc->form; + echo "
\n"; + echo '
'; + }; + + return true; + } else { + if (!is_null($nodata)) { + echo "

{$nodata}

\n"; + } + return false; + } + } + + /** Produce XML data for the browser tree + * @param $treedata A set of records to populate the tree. + * @param $attrs Attributes for tree items + * 'text' - the text for the tree node + * 'icon' - an icon for node + * 'openIcon' - an alternative icon when the node is expanded + * 'toolTip' - tool tip text for the node + * 'action' - URL to visit when single clicking the node + * 'iconAction' - URL to visit when single clicking the icon node + * 'branch' - URL for child nodes (tree XML) + * 'expand' - the action to return XML for the subtree + * 'nodata' - message to display when node has no children + * 'nohead' - suppress headers and opening tag + * 'nofoot' - suppress closing tag + */ + function printTreeXML(&$treedata, &$attrs) { + global $conf, $lang; + + if (!isset($attrs['nohead']) || $attrs['nohead'] === false) { + header("Content-Type: text/xml"); + header("Cache-Control: no-cache"); + + echo "\n"; + + echo "\n"; + } + + if ($treedata->recordCount() > 0) { + while (!$treedata->EOF) { + $rec =& $treedata->fields; + + echo "icon(value($attrs['icon'], $rec)); + echo value_xml_attr('icon', $icon, $rec); + echo value_xml_attr('iconaction', $attrs['iconAction'], $rec); + + if (!empty($attrs['openicon'])) { + $icon = $this->icon(value($attrs['openIcon'], $rec)); + } + echo value_xml_attr('openicon', $icon, $rec); + + echo value_xml_attr('tooltip', $attrs['toolTip'], $rec); + + echo " />\n"; + + $treedata->moveNext(); + } + } else { + $msg = isset($attrs['nodata']) ? $attrs['nodata'] : $lang['strnoobjects']; + echo "icon('ObjectNotFound'), "\" />\n"; + } + + if (!isset($attrs['nofoot']) || $attrs['nofoot'] === false) { + echo "\n"; + } + } + + function adjustTabsForTree(&$tabs) { + include_once('./classes/ArrayRecordSet.php'); + + foreach ($tabs as $i => $tab) { + if ((isset($tab['hide']) && $tab['hide'] === true) || (isset($tab['tree']) && $tab['tree'] === false)) { + unset($tabs[$i]); + } + } + return new ArrayRecordSet($tabs); + } + + function icon($icon) { + global $conf; + $path = "images/themes/{$conf['theme']}/{$icon}"; + if (file_exists($path.'.png')) return $path.'.png'; + if (file_exists($path.'.gif')) return $path.'.gif'; + $path = "images/themes/default/{$icon}"; + if (file_exists($path.'.png')) return $path.'.png'; + if (file_exists($path.'.gif')) return $path.'.gif'; + return ''; + } + + /** + * Function to escape command line parameters + * @param $str The string to escape + * @return The escaped string + */ + function escapeShellArg($str) { + global $data, $lang; + + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + // Due to annoying PHP bugs, shell arguments cannot be escaped + // (command simply fails), so we cannot allow complex objects + // to be dumped. + if (preg_match('/^[_.[:alnum:]]+$/', $str)) + return $str; + else { + echo $lang['strcannotdumponwindows']; + exit; + } + } + else + return escapeshellarg($str); + } + + /** + * Function to escape command line programs + * @param $str The string to escape + * @return The escaped string + */ + function escapeShellCmd($str) { + global $data; + + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $data->fieldClean($str); + return '"' . $str . '"'; + } + else + return escapeshellcmd($str); + } + + /** + * Get list of servers' groups if existing in the conf + * @return a recordset of servers' groups + */ + function getServersGroups() { + global $conf, $lang; + $grps = array(); + + foreach ($conf['srv_groups'] as $i => $group) { + $grps[$i] = array( + 'id' => $i, + 'desc' => $group['desc'], + ); + } + + $grps['all'] = array( + 'id' => 'all', + 'desc' => $lang['strallservers'], + ); + + include_once('./classes/ArrayRecordSet.php'); + return new ArrayRecordSet($grps); + } + + + /** + * Get list of servers + * @param $recordset return as RecordSet suitable for printTable if true, + * otherwise just return an array. + * @param $group a group name to filter the returned servers using $conf[srv_groups] + */ + function getServers($recordset = false, $group = false) { + global $conf; + + $logins = isset($_SESSION['webdbLogin']) && is_array($_SESSION['webdbLogin']) ? $_SESSION['webdbLogin'] : array(); + $srvs = array(); + + if (($group !== false) and ($group !== 'all')) + $group = array_fill_keys(explode(',', $conf['srv_groups'][$group]['servers']), 1); + + foreach($conf['servers'] as $idx => $info) { + $server_id = $info['host'].':'.$info['port'].':'.$info['sslmode']; + if (($group === false) + or (isset($group[$idx])) + or ($group === 'all') + ) { + $server_id = $info['host'].':'.$info['port'].':'.$info['sslmode']; + + if (isset($logins[$server_id])) $srvs[$server_id] = $logins[$server_id]; + else $srvs[$server_id] = $info; + + $srvs[$server_id]['id'] = $server_id; + } + } + + function _cmp_desc($a, $b) { + return strcmp($a['desc'], $b['desc']); + } + uasort($srvs, '_cmp_desc'); + + if ($recordset) { + include_once('./classes/ArrayRecordSet.php'); + return new ArrayRecordSet($srvs); + } + return $srvs; + } + + /** + * Validate and retrieve information on a server. + * If the parameter isn't supplied then the currently + * connected server is returned. + * @param $server_id A server identifier (host:port) + * @return An associative array of server properties + */ + function getServerInfo($server_id = null) { + global $conf, $_reload_browser, $lang; + + if ($server_id === null && isset($_REQUEST['server'])) + $server_id = $_REQUEST['server']; + + // Check for the server in the logged-in list + if (isset($_SESSION['webdbLogin'][$server_id])) + return $_SESSION['webdbLogin'][$server_id]; + + // Otherwise, look for it in the conf file + foreach($conf['servers'] as $idx => $info) { + if ($server_id == $info['host'].':'.$info['port'].':'.$info['sslmode']) { + // Automatically use shared credentials if available + if (!isset($info['username']) && isset($_SESSION['sharedUsername'])) { + $info['username'] = $_SESSION['sharedUsername']; + $info['password'] = $_SESSION['sharedPassword']; + $_reload_browser = true; + $this->setServerInfo(null, $info, $server_id); + } + + return $info; + } + } + + if ($server_id === null){ + return null; + } else { + // Unable to find a matching server, are we being hacked? + echo $lang['strinvalidserverparam']; + exit; + } + } + + /** + * Set server information. + * @param $key parameter name to set, or null to replace all + * params with the assoc-array in $value. + * @param $value the new value, or null to unset the parameter + * @param $server_id the server identifier, or null for current + * server. + */ + function setServerInfo($key, $value, $server_id = null) + { + if ($server_id === null && isset($_REQUEST['server'])) + $server_id = $_REQUEST['server']; + + if ($key === null) { + if ($value === null) + unset($_SESSION['webdbLogin'][$server_id]); + else + $_SESSION['webdbLogin'][$server_id] = $value; + } else { + if ($value === null) + unset($_SESSION['webdbLogin'][$server_id][$key]); + else + $_SESSION['webdbLogin'][$server_id][$key] = $value; + } + } + + /** + * Set the current schema + * @param $schema The schema name + * @return 0 on success + * @return $data->seSchema() on error + */ + function setCurrentSchema($schema) { + global $data; + + $status = $data->setSchema($schema); + if($status != 0) + return $status; + + $_REQUEST['schema'] = $schema; + $this->setHREF(); + return 0; + } + + /** + * Save the given SQL script in the history + * of the database and server. + * @param $script the SQL script to save. + */ + function saveScriptHistory($script) { + list($usec, $sec) = explode(' ', microtime()); + $time = ((float)$usec + (float)$sec); + $_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']]["$time"] = array( + 'query' => $script, + 'paginate' => (!isset($_REQUEST['paginate'])? 'f':'t'), + 'queryid' => $time, + ); + } + + /* + * Output dropdown list to select server and + * databases form the popups windows. + * @param $onchange Javascript action to take when selections change. + */ + function printConnection($onchange) { + global $data, $lang, $misc; + + echo "
\n"; + echo ""; + echo ": \n\n"; + + // Get the list of all databases + $databases = $data->getDatabases(); + + if ($databases->recordCount() > 0) { + + echo "\n"; + } + else { + $server_info = $misc->getServerInfo(); + echo "\n"; + } + + echo "
\n"; + } + + /** + * returns an array representing FKs definition for a table, sorted by fields + * or by constraint. + * @param $table The table to retrieve FK contraints from + * @returns the array of FK definition: + * array( + * 'byconstr' => array( + * constrain id => array( + * confrelid => foreign relation oid + * f_schema => foreign schema name + * f_table => foreign table name + * pattnums => array of parent's fields nums + * pattnames => array of parent's fields names + * fattnames => array of foreign attributes names + * ) + * ), + * 'byfield' => array( + * attribute num => array (constraint id, ...) + * ), + * 'code' => HTML/js code to include in the page for auto-completion + * ) + **/ + function getAutocompleteFKProperties($table) { + global $data; + + $fksprops = array( + 'byconstr' => array(), + 'byfield' => array(), + 'code' => '' + ); + + $constrs = $data->getConstraintsWithFields($table); + + if (!$constrs->EOF) { + $conrelid = $constrs->fields['conrelid']; + while(!$constrs->EOF) { + if ($constrs->fields['contype'] == 'f') { + if (!isset($fksprops['byconstr'][$constrs->fields['conid']])) { + $fksprops['byconstr'][$constrs->fields['conid']] = array ( + 'confrelid' => $constrs->fields['confrelid'], + 'f_table' => $constrs->fields['f_table'], + 'f_schema' => $constrs->fields['f_schema'], + 'pattnums' => array(), + 'pattnames' => array(), + 'fattnames' => array() + ); + } + + $fksprops['byconstr'][$constrs->fields['conid']]['pattnums'][] = $constrs->fields['p_attnum']; + $fksprops['byconstr'][$constrs->fields['conid']]['pattnames'][] = $constrs->fields['p_field']; + $fksprops['byconstr'][$constrs->fields['conid']]['fattnames'][] = $constrs->fields['f_field']; + + if (!isset($fksprops['byfield'][$constrs->fields['p_attnum']])) + $fksprops['byfield'][$constrs->fields['p_attnum']] = array(); + $fksprops['byfield'][$constrs->fields['p_attnum']][] = $constrs->fields['conid']; + } + $constrs->moveNext(); + } + + $fksprops['code'] = "\n"; + + $fksprops['code'] .= '
'; + $fksprops['code'] .= '
'; + $fksprops['code'] .= ''; + $fksprops['code'] .= ''; + } + + else /* we have no foreign keys on this table */ + return false; + + return $fksprops; + } + } +?> diff --git a/php/pgadmin/classes/Reports.php b/php/pgadmin/classes/Reports.php new file mode 100644 index 0000000..0688f35 --- /dev/null +++ b/php/pgadmin/classes/Reports.php @@ -0,0 +1,139 @@ +reports_db = $conf['reports_db']; + } + if (isset($conf['reports_schema'])) { + $this->reports_schema = $conf['reports_schema']; + } + if (isset($conf['reports_table'])) { + $this->reports_table = $conf['reports_table']; + } + + // Check to see if the reports database exists + $rs = $data->getDatabase($this->reports_db); + if ($rs->recordCount() != 1) $status = -1; + else { + // Create a new database access object. + $this->driver = $misc->getDatabaseAccessor($this->reports_db); + // Reports database should have been created in public schema + $this->driver->setSchema($this->reports_schema); + $status = 0; + } + } + + /** + * Finds all reports + * @return A recordset + */ + function getReports() { + global $conf, $misc; + // Filter for owned reports if necessary + if ($conf['owned_reports_only']) { + $server_info = $misc->getServerInfo(); + $filter['created_by'] = $server_info['username']; + $ops = array('created_by' => '='); + } + else $filter = $ops = array(); + + $sql = $this->driver->getSelectSQL($this->reports_table, + array('report_id', 'report_name', 'db_name', 'date_created', 'created_by', 'descr', 'report_sql', 'paginate'), + $filter, $ops, array('db_name' => 'asc', 'report_name' => 'asc')); + + return $this->driver->selectSet($sql); + } + + /** + * Finds a particular report + * @param $report_id The ID of the report to find + * @return A recordset + */ + function getReport($report_id) { + $sql = $this->driver->getSelectSQL($this->reports_table, + array('report_id', 'report_name', 'db_name', 'date_created', 'created_by', 'descr', 'report_sql', 'paginate'), + array('report_id' => $report_id), array('report_id' => '='), array()); + + return $this->driver->selectSet($sql); + } + + /** + * Creates a report + * @param $report_name The name of the report + * @param $db_name The name of the database + * @param $descr The comment on the report + * @param $report_sql The SQL for the report + * @param $paginate The report should be paginated + * @return 0 success + */ + function createReport($report_name, $db_name, $descr, $report_sql, $paginate) { + global $misc; + $server_info = $misc->getServerInfo(); + $temp = array( + 'report_name' => $report_name, + 'db_name' => $db_name, + 'created_by' => $server_info['username'], + 'report_sql' => $report_sql, + 'paginate' => $paginate ? 'true' : 'false', + ); + if ($descr != '') $temp['descr'] = $descr; + + return $this->driver->insert($this->reports_table, $temp); + } + + /** + * Alters a report + * @param $report_id The ID of the report + * @param $report_name The name of the report + * @param $db_name The name of the database + * @param $descr The comment on the report + * @param $report_sql The SQL for the report + * @param $paginate The report should be paginated + * @return 0 success + */ + function alterReport($report_id, $report_name, $db_name, $descr, $report_sql, $paginate) { + global $misc; + $server_info = $misc->getServerInfo(); + $temp = array( + 'report_name' => $report_name, + 'db_name' => $db_name, + 'created_by' => $server_info['username'], + 'report_sql' => $report_sql, + 'paginate' => $paginate ? 'true' : 'false', + 'descr' => $descr + ); + + return $this->driver->update($this->reports_table, $temp, + array('report_id' => $report_id)); + } + + /** + * Drops a report + * @param $report_id The ID of the report to drop + * @return 0 success + */ + function dropReport($report_id) { + return $this->driver->delete($this->reports_table, array('report_id' => $report_id)); + } + + } +?> diff --git a/php/pgadmin/classes/class.select.php b/php/pgadmin/classes/class.select.php new file mode 100644 index 0000000..057c8d6 --- /dev/null +++ b/php/pgadmin/classes/class.select.php @@ -0,0 +1,217 @@ +_element = $this->is_element(); + + } + + function set_style($style) { + $this->set_attribute('style', $style); + } + + function set_class($class) { + $this->set_attribute('class', $class); + } + + + function is_element() { + return + str_replace('xhtml_', '', strtolower(get_class($this))); + } + + /** + * Private function generates xhtml + * @access private + */ + function _html() { + $this->_htmlcode = "<"; + foreach ($this->_attributeCollection as $attribute => $value) { + if (!empty($value)) $this->_htmlcode .= " {$attribute}=\"{$value}\""; + } + $this->_htmlcode .= "/>"; + + return $this->_htmlcode; + } + + /** + * Returns xhtml code + * + */ + function fetch() { + return $this->_html(); + } + /** + * Echoes xhtml + * + */ + function show() { + echo $this->fetch(); + } + + function set_attribute($attr, $value) { + $this->_attributes[$attr] = $value; + } + + +} + +/** +* XHtmlElement +* +* Used to generate Xhtml-Code for xhtml elements +* that can contain child elements +* +* +*/ +class XHtmlElement extends XHtmlSimpleElement { + var $_text = null; + var $_htmlcode = ""; + var $_siblings = array(); + + function XHtmlElement($text = null) { + XHtmlSimpleElement::XHtmlSimpleElement(); + + if ($text) $this->set_text($text); + } + + /* + * Adds an xhtml child to element + * + * @param XHtmlElement The element to become a child of element + */ + function add(&$object) { + array_push($this->_siblings, $object); + } + + + /* + * The CDATA section of Element + * + * @param string Text + */ + function set_text($text) { + if ($text) $this->_text = htmlspecialchars($text); + } + + function fetch() { + return $this->_html(); + } + + + function _html() { + + $this->_htmlcode = "<{$this->_element}"; + foreach ($this->_attributes as $attribute =>$value) { + if (!empty($value)) $this->_htmlcode .= " {$attribute} =\"{$value}\""; + } + $this->_htmlcode .= ">"; + + + if ($this->_text) { + $this->_htmlcode .= $this->_text; + } + + foreach ($this->_siblings as $obj) { + $this->_htmlcode .= $obj->fetch(); + } + + $this->_htmlcode .= "_element}>"; + + return $this->_htmlcode; + } + + /* + * Returns siblings of Element + * + */ + function get_siblings() { + return $this->_siblings; + } + + function has_siblings() { + return (count($this->_siblings) != 0); + } +} + +class XHTML_Button extends XHtmlElement { + function XHTML_Button ($name, $text = null) { + parent::XHtmlElement(); + + $this->set_attribute("name", $name); + + if ($text) $this->set_text($text); + } +} + + +class XHTML_Option extends XHtmlElement { + function XHTML_Option($text, $value = null) { + XHtmlElement::XHtmlElement(null); + $this->set_text($text); + } +} + + +class XHTML_Select extends XHTMLElement { + var $_data; + + function XHTML_Select ($name, $multiple = false, $size = null) { + XHtmlElement::XHtmlElement(); + + $this->set_attribute("name", $name); + if ($multiple) $this->set_attribute("multiple","multiple"); + if ($size) $this->set_attribute("size",$size); + + + } + + function set_data(&$data, $delim = ",") { + switch (gettype($data)) { + case "string": + $this->_data = explode($delim, $data); + break; + case "array": + $this->_data = $data; + break; + + default: + break; + } + } + + function fetch() { + if (isset($this->_data) && $this->_data) { + foreach ($this->_data as $value) { $this->add(new XHTML_Option($value)); } + } + return parent::fetch(); + } + +} + + +?> diff --git a/php/pgadmin/classes/database/ADODB_base.php b/php/pgadmin/classes/database/ADODB_base.php new file mode 100644 index 0000000..816d693 --- /dev/null +++ b/php/pgadmin/classes/database/ADODB_base.php @@ -0,0 +1,359 @@ +conn = $conn; + } + + /** + * Turns on or off query debugging + * @param $debug True to turn on debugging, false otherwise + */ + function setDebug($debug) { + $this->conn->debug = $debug; + } + + /** + * Cleans (escapes) a string + * @param $str The string to clean, by reference + * @return The cleaned string + */ + function clean(&$str) { + $str = addslashes($str); + return $str; + } + + /** + * Cleans (escapes) an object name (eg. table, field) + * @param $str The string to clean, by reference + * @return The cleaned string + */ + function fieldClean(&$str) { + $str = str_replace('"', '""', $str); + return $str; + } + + /** + * Cleans (escapes) an array + * @param $arr The array to clean, by reference + * @return The cleaned array + */ + function arrayClean(&$arr) { + reset($arr); + while(list($k, $v) = each($arr)) + $arr[$k] = addslashes($v); + return $arr; + } + + /** + * Executes a query on the underlying connection + * @param $sql The SQL query to execute + * @return A recordset + */ + function execute($sql) { + // Execute the statement + $rs = $this->conn->Execute($sql); + + // If failure, return error value + return $this->conn->ErrorNo(); + } + + /** + * Closes the connection the database class + * relies on. + */ + function close() { + $this->conn->close(); + } + + /** + * Retrieves a ResultSet from a query + * @param $sql The SQL statement to be executed + * @return A recordset + */ + function selectSet($sql) { + // Execute the statement + $rs = $this->conn->Execute($sql); + + if (!$rs) return $this->conn->ErrorNo(); + + return $rs; + } + + /** + * Retrieves a single value from a query + * + * @@ assumes that the query will return only one row - returns field value in the first row + * + * @param $sql The SQL statement to be executed + * @param $field The field name to be returned + * @return A single field value + * @return -1 No rows were found + */ + function selectField($sql, $field) { + // Execute the statement + $rs = $this->conn->Execute($sql); + + // If failure, or no rows returned, return error value + if (!$rs) return $this->conn->ErrorNo(); + elseif ($rs->RecordCount() == 0) return -1; + + return $rs->fields[$field]; + } + + /** + * Delete from the database + * @param $table The name of the table + * @param $conditions (array) A map of field names to conditions + * @param $schema (optional) The table's schema + * @return 0 success + * @return -1 on referential integrity violation + * @return -2 on no rows deleted + */ + function delete($table, $conditions, $schema = '') { + $this->fieldClean($table); + + reset($conditions); + + if (!empty($schema)) { + $this->fieldClean($schema); + $schema = "\"{$schema}\"."; + } + + // Build clause + $sql = ''; + while(list($key, $value) = each($conditions)) { + $this->clean($key); + $this->clean($value); + if ($sql) $sql .= " AND \"{$key}\"='{$value}'"; + else $sql = "DELETE FROM {$schema}\"{$table}\" WHERE \"{$key}\"='{$value}'"; + } + + // Check for failures + if (!$this->conn->Execute($sql)) { + // Check for referential integrity failure + if (stristr($this->conn->ErrorMsg(), 'referential')) + return -1; + } + + // Check for no rows modified + if ($this->conn->Affected_Rows() == 0) return -2; + + return $this->conn->ErrorNo(); + } + + /** + * Insert a set of values into the database + * @param $table The table to insert into + * @param $vars (array) A mapping of the field names to the values to be inserted + * @return 0 success + * @return -1 if a unique constraint is violated + * @return -2 if a referential constraint is violated + */ + function insert($table, $vars) { + $this->fieldClean($table); + + // Build clause + if (sizeof($vars) > 0) { + $fields = ''; + $values = ''; + foreach($vars as $key => $value) { + $this->clean($key); + $this->clean($value); + + if ($fields) $fields .= ", \"{$key}\""; + else $fields = "INSERT INTO \"{$table}\" (\"{$key}\""; + + if ($values) $values .= ", '{$value}'"; + else $values = ") VALUES ('{$value}'"; + } + $sql = $fields . $values . ')'; + } + + // Check for failures + if (!$this->conn->Execute($sql)) { + // Check for unique constraint failure + if (stristr($this->conn->ErrorMsg(), 'unique')) + return -1; + // Check for referential integrity failure + elseif (stristr($this->conn->ErrorMsg(), 'referential')) + return -2; + } + + return $this->conn->ErrorNo(); + } + + /** + * Update a row in the database + * @param $table The table that is to be updated + * @param $vars (array) A mapping of the field names to the values to be updated + * @param $where (array) A mapping of field names to values for the where clause + * @param $nulls (array, optional) An array of fields to be set null + * @return 0 success + * @return -1 if a unique constraint is violated + * @return -2 if a referential constraint is violated + * @return -3 on no rows deleted + */ + function update($table, $vars, $where, $nulls = array()) { + $this->fieldClean($table); + + $setClause = ''; + $whereClause = ''; + + // Populate the syntax arrays + reset($vars); + while(list($key, $value) = each($vars)) { + $this->fieldClean($key); + $this->clean($value); + if ($setClause) $setClause .= ", \"{$key}\"='{$value}'"; + else $setClause = "UPDATE \"{$table}\" SET \"{$key}\"='{$value}'"; + } + + reset($nulls); + while(list(, $value) = each($nulls)) { + $this->fieldClean($value); + if ($setClause) $setClause .= ", \"{$value}\"=NULL"; + else $setClause = "UPDATE \"{$table}\" SET \"{$value}\"=NULL"; + } + + reset($where); + while(list($key, $value) = each($where)) { + $this->fieldClean($key); + $this->clean($value); + if ($whereClause) $whereClause .= " AND \"{$key}\"='{$value}'"; + else $whereClause = " WHERE \"{$key}\"='{$value}'"; + } + + // Check for failures + if (!$this->conn->Execute($setClause . $whereClause)) { + // Check for unique constraint failure + if (stristr($this->conn->ErrorMsg(), 'unique')) + return -1; + // Check for referential integrity failure + elseif (stristr($this->conn->ErrorMsg(), 'referential')) + return -2; + } + + // Check for no rows modified + if ($this->conn->Affected_Rows() == 0) return -3; + + return $this->conn->ErrorNo(); + } + + /** + * Begin a transaction + * @return 0 success + */ + function beginTransaction() { + return !$this->conn->BeginTrans(); + } + + /** + * End a transaction + * @return 0 success + */ + function endTransaction() { + return !$this->conn->CommitTrans(); + } + + /** + * Roll back a transaction + * @return 0 success + */ + function rollbackTransaction() { + return !$this->conn->RollbackTrans(); + } + + /** + * Get the backend platform + * @return The backend platform + */ + function getPlatform() { + //return $this->conn->platform; + return "UNKNOWN"; + } + + // Type conversion routines + + /** + * Change the value of a parameter to database representation depending on whether it evaluates to true or false + * @param $parameter the parameter + */ + function dbBool(&$parameter) { + return $parameter; + } + + /** + * Change a parameter from database representation to a boolean, (others evaluate to false) + * @param $parameter the parameter + */ + function phpBool($parameter) { + return $parameter; + } + + /** + * Change a db array into a PHP array + * @param $arr String representing the DB array + * @return A PHP array + */ + function phpArray($dbarr) { + // Take off the first and last characters (the braces) + $arr = substr($dbarr, 1, strlen($dbarr) - 2); + + // Pick out array entries by carefully parsing. This is necessary in order + // to cope with double quotes and commas, etc. + $elements = array(); + $i = $j = 0; + $in_quotes = false; + while ($i < strlen($arr)) { + // If current char is a double quote and it's not escaped, then + // enter quoted bit + $char = substr($arr, $i, 1); + if ($char == '"' && ($i == 0 || substr($arr, $i - 1, 1) != '\\')) + $in_quotes = !$in_quotes; + elseif ($char == ',' && !$in_quotes) { + // Add text so far to the array + $elements[] = substr($arr, $j, $i - $j); + $j = $i + 1; + } + $i++; + } + // Add final text to the array + $elements[] = substr($arr, $j); + + // Do one further loop over the elements array to remote double quoting + // and escaping of double quotes and backslashes + for ($i = 0; $i < sizeof($elements); $i++) { + $v = $elements[$i]; + if (strpos($v, '"') === 0) { + $v = substr($v, 1, strlen($v) - 2); + $v = str_replace('\\"', '"', $v); + $v = str_replace('\\\\', '\\', $v); + $elements[$i] = $v; + } + } + + return $elements; + } +} + +?> diff --git a/php/pgadmin/classes/database/Connection.php b/php/pgadmin/classes/database/Connection.php new file mode 100644 index 0000000..f98871b --- /dev/null +++ b/php/pgadmin/classes/database/Connection.php @@ -0,0 +1,115 @@ +conn = &ADONewConnection('postgres7'); + $this->conn->setFetchMode($fetchMode); + + // Ignore host if null + if ($host === null || $host == '') + if ($port !== null && $port != '') + $pghost = ':'.$port; + else + $pghost = ''; + else + $pghost = "{$host}:{$port}"; + + // Add sslmode to $pghost as needed + if (($sslmode == 'disable') || ($sslmode == 'allow') || ($sslmode == 'prefer') || ($sslmode == 'require')) { + $pghost .= ':'.$sslmode; + } elseif ($sslmode == 'legacy') { + $pghost .= ' requiressl=1'; + } + + $this->conn->connect($pghost, $user, $password, $database); + } + + /** + * Gets the name of the correct database driver to use. As a side effect, + * sets the platform. + * @param (return-by-ref) $description A description of the database and version + * @return The class name of the driver eg. Postgres84 + * @return null if version is < 7.4 + * @return -3 Database-specific failure + */ + function getDriver(&$description) { + // If we're on a recent enough PHP 5, and against PostgreSQL 7.4 or + // higher, we don't need to query for the version. This gives a great + // speed up. + if (function_exists('pg_version')) { + $v = pg_version($this->conn->_connectionID); + if (isset($v['server'])) $version = $v['server']; + } + + // If we didn't manage to get the version without a query, query... + if (!isset($version)) { + $adodb = new ADODB_base($this->conn); + + $sql = "SELECT VERSION() AS version"; + $field = $adodb->selectField($sql, 'version'); + + // Check the platform, if it's mingw, set it + if (preg_match('/ mingw /i', $field)) + $this->platform = 'MINGW'; + + $params = explode(' ', $field); + if (!isset($params[1])) return -3; + + $version = $params[1]; // eg. 8.4.4 + } + + $description = "PostgreSQL {$version}"; + + // Detect version and choose appropriate database driver + switch (substr($version,0,3)) { + case '8.4': return 'Postgres'; break; + case '8.3': return 'Postgres83'; break; + case '8.2': return 'Postgres82'; break; + case '8.1': return 'Postgres81'; break; + case '8.0': + case '7.5': return 'Postgres80'; break; + case '7.4': return 'Postgres74'; break; + } + + /* All <7.4 versions are not supported */ + // if major version is 7 or less and wasn't catch in the + // switch/case block, we have an unsupported version. + if ((int)substr($version, 0, 1) < 8) + return null; + + // If unknown version, then default to latest driver + return 'Postgres'; + + } + + /** + * Get the last error in the connection + * @return Error string + */ + function getLastError() { + if (function_exists('pg_errormessage')) + return pg_errormessage($this->conn->_connectionID); + else + return pg_last_error($this->conn->_connectionID); + } +} + +?> diff --git a/php/pgadmin/classes/database/Postgres.php b/php/pgadmin/classes/database/Postgres.php new file mode 100644 index 0000000..3ce50e9 --- /dev/null +++ b/php/pgadmin/classes/database/Postgres.php @@ -0,0 +1,8034 @@ + 'BIG5', + 'EUC_CN' => 'GB2312', + 'EUC_JP' => 'EUC-JP', + 'EUC_KR' => 'EUC-KR', + 'EUC_TW' => 'EUC-TW', + 'GB18030' => 'GB18030', + 'GBK' => 'GB2312', + 'ISO_8859_5' => 'ISO-8859-5', + 'ISO_8859_6' => 'ISO-8859-6', + 'ISO_8859_7' => 'ISO-8859-7', + 'ISO_8859_8' => 'ISO-8859-8', + 'JOHAB' => 'CP1361', + 'KOI8' => 'KOI8-R', + 'LATIN1' => 'ISO-8859-1', + 'LATIN2' => 'ISO-8859-2', + 'LATIN3' => 'ISO-8859-3', + 'LATIN4' => 'ISO-8859-4', + 'LATIN5' => 'ISO-8859-9', + 'LATIN6' => 'ISO-8859-10', + 'LATIN7' => 'ISO-8859-13', + 'LATIN8' => 'ISO-8859-14', + 'LATIN9' => 'ISO-8859-15', + 'LATIN10' => 'ISO-8859-16', + 'SJIS' => 'SHIFT_JIS', + 'SQL_ASCII' => 'US-ASCII', + 'UHC' => 'WIN949', + 'UTF8' => 'UTF-8', + 'WIN866' => 'CP866', + 'WIN874' => 'CP874', + 'WIN1250' => 'CP1250', + 'WIN1251' => 'CP1251', + 'WIN1252' => 'CP1252', + 'WIN1256' => 'CP1256', + 'WIN1258' => 'CP1258' + ); + var $defaultprops = array('', '', ''); + // Extra "magic" types. BIGSERIAL was added in PostgreSQL 7.2. + var $extraTypes = array('SERIAL', 'BIGSERIAL'); + // Foreign key stuff. First element MUST be the default. + var $fkactions = array('NO ACTION', 'RESTRICT', 'CASCADE', 'SET NULL', 'SET DEFAULT'); + var $fkdeferrable = array('NOT DEFERRABLE', 'DEFERRABLE'); + var $fkinitial = array('INITIALLY IMMEDIATE', 'INITIALLY DEFERRED'); + var $fkmatches = array('MATCH SIMPLE', 'MATCH FULL'); + // Function properties + var $funcprops = array( array('', 'VOLATILE', 'IMMUTABLE', 'STABLE'), + array('', 'CALLED ON NULL INPUT', 'RETURNS NULL ON NULL INPUT'), + array('', 'SECURITY INVOKER', 'SECURITY DEFINER')); + // Default help URL + var $help_base; + // Help sub pages + var $help_page; + // Name of id column + var $id = 'oid'; + // Supported join operations for use with view wizard + var $joinOps = array('INNER JOIN' => 'INNER JOIN', 'LEFT JOIN' => 'LEFT JOIN', 'RIGHT JOIN' => 'RIGHT JOIN', 'FULL JOIN' => 'FULL JOIN'); + // Map of internal language name to syntax highlighting name + var $langmap = array( + 'sql' => 'SQL', + 'plpgsql' => 'SQL', + 'php' => 'PHP', + 'phpu' => 'PHP', + 'plphp' => 'PHP', + 'plphpu' => 'PHP', + 'perl' => 'Perl', + 'perlu' => 'Perl', + 'plperl' => 'Perl', + 'plperlu' => 'Perl', + 'java' => 'Java', + 'javau' => 'Java', + 'pljava' => 'Java', + 'pljavau' => 'Java', + 'plj' => 'Java', + 'plju' => 'Java', + 'python' => 'Python', + 'pythonu' => 'Python', + 'plpython' => 'Python', + 'plpythonu' => 'Python', + 'ruby' => 'Ruby', + 'rubyu' => 'Ruby', + 'plruby' => 'Ruby', + 'plrubyu' => 'Ruby' + ); + // Predefined size types + var $predefined_size_types = array('abstime','aclitem','bigserial','boolean','bytea','cid','cidr','circle','date','float4','float8','gtsvector','inet','int2','int4','int8','macaddr','money','oid','path','polygon','refcursor','regclass','regoper','regoperator','regproc','regprocedure','regtype','reltime','serial','smgr','text','tid','tinterval','tsquery','tsvector','varbit','void','xid'); + // List of all legal privileges that can be applied to different types + // of objects. + var $privlist = array( + 'table' => array('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'REFERENCES', 'TRIGGER', 'ALL PRIVILEGES'), + 'view' => array('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'REFERENCES', 'TRIGGER', 'ALL PRIVILEGES'), + 'sequence' => array('SELECT', 'UPDATE', 'ALL PRIVILEGES'), + 'database' => array('CREATE', 'TEMPORARY', 'CONNECT', 'ALL PRIVILEGES'), + 'function' => array('EXECUTE', 'ALL PRIVILEGES'), + 'language' => array('USAGE', 'ALL PRIVILEGES'), + 'schema' => array('CREATE', 'USAGE', 'ALL PRIVILEGES'), + 'tablespace' => array('CREATE', 'ALL PRIVILEGES'), + 'column' => array('SELECT', 'INSERT', 'UPDATE', 'REFERENCES','ALL PRIVILEGES') + ); + // List of characters in acl lists and the privileges they + // refer to. + var $privmap = array( + 'r' => 'SELECT', + 'w' => 'UPDATE', + 'a' => 'INSERT', + 'd' => 'DELETE', + 'D' => 'TRUNCATE', + 'R' => 'RULE', + 'x' => 'REFERENCES', + 't' => 'TRIGGER', + 'X' => 'EXECUTE', + 'U' => 'USAGE', + 'C' => 'CREATE', + 'T' => 'TEMPORARY', + 'c' => 'CONNECT' + ); + // Rule action types + var $rule_events = array('SELECT', 'INSERT', 'UPDATE', 'DELETE'); + // Select operators + var $selectOps = array('=' => 'i', '!=' => 'i', '<' => 'i', '>' => 'i', '<=' => 'i', '>=' => 'i', + '<<' => 'i', '>>' => 'i', '<<=' => 'i', '>>=' => 'i', + 'LIKE' => 'i', 'NOT LIKE' => 'i', 'ILIKE' => 'i', 'NOT ILIKE' => 'i', 'SIMILAR TO' => 'i', + 'NOT SIMILAR TO' => 'i', '~' => 'i', '!~' => 'i', '~*' => 'i', '!~*' => 'i', + 'IS NULL' => 'p', 'IS NOT NULL' => 'p', 'IN' => 'x', 'NOT IN' => 'x', + '@@' => 'i', '@@@' => 'i', '@>' => 'i', '<@' => 'i', + '@@ to_tsquery' => 't', '@@@ to_tsquery' => 't', '@> to_tsquery' => 't', '<@ to_tsquery' => 't', + '@@ plainto_tsquery' => 't', '@@@ plainto_tsquery' => 't', '@> plainto_tsquery' => 't', '<@ plainto_tsquery' => 't'); + // Array of allowed trigger events + var $triggerEvents= array('INSERT', 'UPDATE', 'DELETE', 'INSERT OR UPDATE', 'INSERT OR DELETE', + 'DELETE OR UPDATE', 'INSERT OR DELETE OR UPDATE'); + // When to execute the trigger + var $triggerExecTimes = array('BEFORE', 'AFTER'); + // How often to execute the trigger + var $triggerFrequency = array('ROW','STATEMENT'); + // Array of allowed type alignments + var $typAligns = array('char', 'int2', 'int4', 'double'); + // The default type alignment + var $typAlignDef = 'int4'; + // Default index type + var $typIndexDef = 'BTREE'; + // Array of allowed index types + var $typIndexes = array('BTREE', 'RTREE', 'GIST', 'GIN', 'HASH'); + // Array of allowed type storage attributes + var $typStorages = array('plain', 'external', 'extended', 'main'); + // The default type storage + var $typStorageDef = 'plain'; + + /** + * Constructor + * @param $conn The database connection + */ + function Postgres($conn) { + $this->ADODB_base($conn); + } + + // Formatting functions + + /** + * Cleans (escapes) a string + * @param $str The string to clean, by reference + * @return The cleaned string + */ + function clean(&$str) { + if ($str === null) return null; + $str = str_replace("\r\n","\n",$str); + if (function_exists('pg_escape_string')) + $str = pg_escape_string($str); + else + $str = addslashes($str); + return $str; + } + + /** + * Cleans (escapes) an object name (eg. table, field) + * @param $str The string to clean, by reference + * @return The cleaned string + */ + function fieldClean(&$str) { + if ($str === null) return null; + $str = str_replace('"', '""', $str); + return $str; + } + + /** + * Cleans (escapes) an array of field names + * @param $arr The array to clean, by reference + * @return The cleaned array + */ + function fieldArrayClean(&$arr) { + foreach ($arr as $k => $v) { + if ($v === null) continue; + $arr[$k] = str_replace('"', '""', $v); + } + return $arr; + } + + /** + * Cleans (escapes) an array + * @param $arr The array to clean, by reference + * @return The cleaned array + */ + function arrayClean(&$arr) { + foreach ($arr as $k => $v) { + if ($v === null) continue; + if (function_exists('pg_escape_string')) + $arr[$k] = pg_escape_string($v); + else + $arr[$k] = addslashes($v); + } + return $arr; + } + + /** + * Escapes bytea data for display on the screen + * @param $data The bytea data + * @return Data formatted for on-screen display + */ + function escapeBytea($data) { + if (function_exists('pg_escape_bytea')) + return stripslashes(pg_escape_bytea($data)); + else { + $translations = array('\\a' => '\\007', '\\b' => '\\010', '\\t' => '\\011', '\\n' => '\\012', '\\v' => '\\013', '\\f' => '\\014', '\\r' => '\\015'); + return strtr(addCSlashes($data, "\0..\37\177..\377"), $translations); + } + } + + /** + * Outputs the HTML code for a particular field + * @param $name The name to give the field + * @param $value The value of the field. Note this could be 'numeric(7,2)' sort of thing... + * @param $type The database type of the field + * @param $extras An array of attributes name as key and attributes' values as value + */ + function printField($name, $value, $type, $extras = array()) { + global $lang; + + // Determine actions string + $extra_str = ''; + foreach ($extras as $k => $v) { + $extra_str .= " {$k}=\"" . htmlspecialchars($v) . "\""; + } + + switch (substr($type,0,9)) { + case 'bool': + case 'boolean': + if ($value !== null && $value == '') $value = null; + elseif ($value == 'true') $value = 't'; + elseif ($value == 'false') $value = 'f'; + + // If value is null, 't' or 'f'... + if ($value === null || $value == 't' || $value == 'f') { + echo "\n"; + } + else { + echo "\n"; + } + break; + case 'bytea': + case 'bytea[]': + $value = $this->escapeBytea($value); + case 'text': + case 'text[]': + case 'xml': + case 'xml[]': + $n = substr_count($value, "\n"); + $n = $n < 5 ? 5 : $n; + $n = $n > 20 ? 20 : $n; + echo "\n"; + break; + case 'character': + case 'character[]': + $n = substr_count($value, "\n"); + $n = $n < 5 ? 5 : $n; + $n = $n > 20 ? 20 : $n; + echo "\n"; + break; + default: + echo "\n"; + break; + } + } + + /** + * Formats a value or expression for sql purposes + * @param $type The type of the field + * @param $format VALUE or EXPRESSION + * @param $value The actual value entered in the field. Can be NULL + * @return The suitably quoted and escaped value. + */ + function formatValue($type, $format, $value) { + switch ($type) { + case 'bool': + case 'boolean': + if ($value == 't') + return 'TRUE'; + elseif ($value == 'f') + return 'FALSE'; + elseif ($value == '') + return 'NULL'; + else + return $value; + break; + default: + // Checking variable fields is difficult as there might be a size + // attribute... + if (strpos($type, 'time') === 0) { + // Assume it's one of the time types... + if ($value == '') return "''"; + elseif (strcasecmp($value, 'CURRENT_TIMESTAMP') == 0 + || strcasecmp($value, 'CURRENT_TIME') == 0 + || strcasecmp($value, 'CURRENT_DATE') == 0 + || strcasecmp($value, 'LOCALTIME') == 0 + || strcasecmp($value, 'LOCALTIMESTAMP') == 0) { + return $value; + } + elseif ($format == 'EXPRESSION') + return $value; + else { + $this->clean($value); + return "'{$value}'"; + } + } + else { + if ($format == 'VALUE') { + $this->clean($value); + return "'{$value}'"; + } + return $value; + } + } + } + + /** + * Formats a type correctly for display. Postgres 7.0 had no 'format_type' + * built-in function, and hence we need to do it manually. + * @param $typname The name of the type + * @param $typmod The contents of the typmod field + */ + function formatType($typname, $typmod) { + // This is a specific constant in the 7.0 source + $varhdrsz = 4; + + // If the first character is an underscore, it's an array type + $is_array = false; + if (substr($typname, 0, 1) == '_') { + $is_array = true; + $typname = substr($typname, 1); + } + + // Show lengths on bpchar and varchar + if ($typname == 'bpchar') { + $len = $typmod - $varhdrsz; + $temp = 'character'; + if ($len > 1) + $temp .= "({$len})"; + } + elseif ($typname == 'varchar') { + $temp = 'character varying'; + if ($typmod != -1) + $temp .= "(" . ($typmod - $varhdrsz) . ")"; + } + elseif ($typname == 'numeric') { + $temp = 'numeric'; + if ($typmod != -1) { + $tmp_typmod = $typmod - $varhdrsz; + $precision = ($tmp_typmod >> 16) & 0xffff; + $scale = $tmp_typmod & 0xffff; + $temp .= "({$precision}, {$scale})"; + } + } + else $temp = $typname; + + // Add array qualifier if it's an array + if ($is_array) $temp .= '[]'; + + return $temp; + } + + // Help functions + + /** + * Fetch a URL (or array of URLs) for a given help page. + */ + function getHelp($help) { + $this->getHelpPages(); + + if (isset($this->help_page[$help])) { + if (is_array($this->help_page[$help])) { + $urls = array(); + foreach ($this->help_page[$help] as $link) { + $urls[] = $this->help_base . $link; + } + return $urls; + } else + return $this->help_base . $this->help_page[$help]; + } else + return null; + } + + function getHelpPages() { + include_once('./help/PostgresDoc90.php'); + return $this->help_page; + } + + // Database functions + + /** + * Return all information about a particular database + * @param $database The name of the database to retrieve + * @return The database info + */ + function getDatabase($database) { + $this->clean($database); + $sql = "SELECT * FROM pg_database WHERE datname='{$database}'"; + return $this->selectSet($sql); + } + + /** + * Return all database available on the server + * @param $currentdatabase database name that should be on top of the resultset + * + * @return A list of databases, sorted alphabetically + */ + function getDatabases($currentdatabase = NULL) { + global $conf, $misc; + + $server_info = $misc->getServerInfo(); + + if (isset($conf['owned_only']) && $conf['owned_only'] && !$this->isSuperUser($server_info['username'])) { + $username = $server_info['username']; + $this->clean($username); + $clause = " AND pr.rolname='{$username}'"; + } + else $clause = ''; + + if ($currentdatabase != NULL) { + $this->clean($currentdatabase); + $orderby = "ORDER BY pdb.datname = '{$currentdatabase}' DESC, pdb.datname"; + } + else + $orderby = "ORDER BY pdb.datname"; + + if (!$conf['show_system']) + $where = ' AND NOT pdb.datistemplate'; + else + $where = ' AND pdb.datallowconn'; + + $sql = " + SELECT pdb.datname AS datname, pr.rolname AS datowner, pg_encoding_to_char(encoding) AS datencoding, + (SELECT description FROM pg_catalog.pg_shdescription pd WHERE pdb.oid=pd.objoid) AS datcomment, + (SELECT spcname FROM pg_catalog.pg_tablespace pt WHERE pt.oid=pdb.dattablespace) AS tablespace, + CASE WHEN pg_catalog.has_database_privilege(current_user, pdb.oid, 'CONNECT') + THEN pg_catalog.pg_database_size(pdb.oid) + ELSE -1 -- set this magic value, which we will convert to no access later + END as dbsize, pdb.datcollate, pdb.datctype + FROM pg_catalog.pg_database pdb + LEFT JOIN pg_catalog.pg_roles pr ON (pdb.datdba = pr.oid) + WHERE true + {$where} + {$clause} + {$orderby}"; + + return $this->selectSet($sql); + } + + /** + * Return the database comment of a db from the shared description table + * @param string $database the name of the database to get the comment for + * @return recordset of the db comment info + */ + function getDatabaseComment($database) { + $this->clean($database); + $sql = "SELECT description FROM pg_catalog.pg_database JOIN pg_catalog.pg_shdescription ON (oid=objoid) WHERE pg_database.datname = '{$database}' "; + return $this->selectSet($sql); + } + + /** + * Return the database owner of a db + * @param string $database the name of the database to get the owner for + * @return recordset of the db owner info + */ + function getDatabaseOwner($database) { + $this->clean($database); + $sql = "SELECT usename FROM pg_user, pg_database WHERE pg_user.usesysid = pg_database.datdba AND pg_database.datname = '{$database}' "; + return $this->selectSet($sql); + } + + /** + * Returns the current database encoding + * @return The encoding. eg. SQL_ASCII, UTF-8, etc. + */ + function getDatabaseEncoding() { + // Try to avoid a query if at all possible (5) + if (function_exists('pg_parameter_status')) { + $encoding = pg_parameter_status($this->conn->_connectionID, 'server_encoding'); + if ($encoding !== false) return $encoding; + } + + $sql = "SELECT getdatabaseencoding() AS encoding"; + + return $this->selectField($sql, 'encoding'); + } + + /** + * Returns the current default_with_oids setting + * @return default_with_oids setting + */ + function getDefaultWithOid() { + // Try to avoid a query if at all possible (5) + if (function_exists('pg_parameter_status')) { + $default = pg_parameter_status($this->conn->_connectionID, 'default_with_oids'); + if ($default !== false) return $default; + } + + $sql = "SHOW default_with_oids"; + + return $this->selectField($sql, 'default_with_oids'); + } + + /** + * Creates a database + * @param $database The name of the database to create + * @param $encoding Encoding of the database + * @param $tablespace (optional) The tablespace name + * @return 0 success + * @return -1 tablespace error + * @return -2 comment error + */ + function createDatabase($database, $encoding, $tablespace = '', $comment = '', $template = 'template1', + $lc_collate = '', $lc_ctype = '') + { + $this->fieldClean($database); + $this->clean($encoding); + $this->fieldClean($tablespace); + $this->fieldClean($template); + $this->clean($lc_collate); + $this->clean($lc_ctype); + + $sql = "CREATE DATABASE \"{$database}\" WITH TEMPLATE=\"{$template}\""; + + if ($encoding != '') $sql .= " ENCODING='{$encoding}'"; + if ($lc_collate != '') $sql .= " LC_COLLATE='{$lc_collate}'"; + if ($lc_ctype != '') $sql .= " LC_CTYPE='{$lc_ctype}'"; + + if ($tablespace != '' && $this->hasTablespaces()) $sql .= " TABLESPACE \"{$tablespace}\""; + + $status = $this->execute($sql); + if ($status != 0) return -1; + + if ($comment != '' && $this->hasSharedComments()) { + $status = $this->setComment('DATABASE',$database,'',$comment); + if ($status != 0) return -2; + } + + return 0; + } + + /** + * Renames a database, note that this operation cannot be + * performed on a database that is currently being connected to + * @param string $oldName name of database to rename + * @param string $newName new name of database + * @return int 0 on success + */ + function alterDatabaseRename($oldName, $newName) { + $this->fieldClean($oldName); + $this->fieldClean($newName); + + if ($oldName != $newName) { + $sql = "ALTER DATABASE \"{$oldName}\" RENAME TO \"{$newName}\""; + return $this->execute($sql); + } + else //just return success, we're not going to do anything + return 0; + } + + /** + * Drops a database + * @param $database The name of the database to drop + * @return 0 success + */ + function dropDatabase($database) { + $this->fieldClean($database); + $sql = "DROP DATABASE \"{$database}\""; + return $this->execute($sql); + } + + /** + * Changes ownership of a database + * This can only be done by a superuser or the owner of the database + * @param string $dbName database to change ownership of + * @param string $newOwner user that will own the database + * @return int 0 on success + */ + function alterDatabaseOwner($dbName, $newOwner) { + $this->fieldClean($dbName); + $this->fieldClean($newOwner); + + $sql = "ALTER DATABASE \"{$dbName}\" OWNER TO \"{$newOwner}\""; + return $this->execute($sql); + } + + /** + * Alters a database + * the multiple return vals are for postgres 8+ which support more functionality in alter database + * @param $dbName The name of the database + * @param $newName new name for the database + * @param $newOwner The new owner for the database + * @return 0 success + * @return -1 transaction error + * @return -2 owner error + * @return -3 rename error + * @return -4 comment error + */ + function alterDatabase($dbName, $newName, $newOwner = '', $comment = '') { + + $status = $this->beginTransaction(); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + if ($dbName != $newName) { + $status = $this->alterDatabaseRename($dbName, $newName); + if ($status != 0) { + $this->rollbackTransaction(); + return -3; + } + $dbName = $newName; + } + + if ($newOwner != '') { + $status = $this->alterDatabaseOwner($newName, $newOwner); + if ($status != 0) { + $this->rollbackTransaction(); + return -2; + } + } + + $this->fieldClean($dbName); + $status = $this->setComment('DATABASE', $dbName, '', $comment); + if ($status != 0) { + $this->rollbackTransaction(); + return -4; + } + return $this->endTransaction(); + } + + /** + * Returns prepared transactions information + * @param $database (optional) Find only prepared transactions executed in a specific database + * @return A recordset + */ + function getPreparedXacts($database = null) { + if ($database === null) + $sql = "SELECT * FROM pg_prepared_xacts"; + else { + $this->clean($database); + $sql = "SELECT transaction, gid, prepared, owner FROM pg_prepared_xacts + WHERE database='{$database}' ORDER BY owner"; + } + + return $this->selectSet($sql); + } + + /** + * Searches all system catalogs to find objects that match a certain name. + * @param $term The search term + * @param $filter The object type to restrict to ('' means no restriction) + * @return A recordset + */ + function findObject($term, $filter) { + global $conf; + + /*about escaping: + * SET standard_conforming_string is not available before 8.2 + * So we must use PostgreSQL specific notation :/ + * E'' notation is not available before 8.1 + * $$ is available since 8.0 + * Nothing specific from 7.4 + **/ + + // Escape search term for ILIKE match + $this->clean($term); + $this->clean($filter); + $term = str_replace('_', '\_', $term); + $term = str_replace('%', '\%', $term); + + // Exclude system relations if necessary + if (!$conf['show_system']) { + // XXX: The mention of information_schema here is in the wrong place, but + // it's the quickest fix to exclude the info schema from 7.4 + $where = " AND pn.nspname NOT LIKE \$_PATERN_\$pg\_%\$_PATERN_\$ AND pn.nspname != 'information_schema'"; + $lan_where = "AND pl.lanispl"; + } + else { + $where = ''; + $lan_where = ''; + } + + // Apply outer filter + $sql = ''; + if ($filter != '') { + $sql = "SELECT * FROM ("; + } + + $term = "\$_PATERN_\$%{$term}%\$_PATERN_\$"; + + $sql .= " + SELECT 'SCHEMA' AS type, oid, NULL AS schemaname, NULL AS relname, nspname AS name + FROM pg_catalog.pg_namespace pn WHERE nspname ILIKE {$term} {$where} + UNION ALL + SELECT CASE WHEN relkind='r' THEN 'TABLE' WHEN relkind='v' THEN 'VIEW' WHEN relkind='S' THEN 'SEQUENCE' END, pc.oid, + pn.nspname, NULL, pc.relname FROM pg_catalog.pg_class pc, pg_catalog.pg_namespace pn + WHERE pc.relnamespace=pn.oid AND relkind IN ('r', 'v', 'S') AND relname ILIKE {$term} {$where} + UNION ALL + SELECT CASE WHEN pc.relkind='r' THEN 'COLUMNTABLE' ELSE 'COLUMNVIEW' END, NULL, pn.nspname, pc.relname, pa.attname FROM pg_catalog.pg_class pc, pg_catalog.pg_namespace pn, + pg_catalog.pg_attribute pa WHERE pc.relnamespace=pn.oid AND pc.oid=pa.attrelid + AND pa.attname ILIKE {$term} AND pa.attnum > 0 AND NOT pa.attisdropped AND pc.relkind IN ('r', 'v') {$where} + UNION ALL + SELECT 'FUNCTION', pp.oid, pn.nspname, NULL, pp.proname || '(' || pg_catalog.oidvectortypes(pp.proargtypes) || ')' FROM pg_catalog.pg_proc pp, pg_catalog.pg_namespace pn + WHERE pp.pronamespace=pn.oid AND NOT pp.proisagg AND pp.proname ILIKE {$term} {$where} + UNION ALL + SELECT 'INDEX', NULL, pn.nspname, pc.relname, pc2.relname FROM pg_catalog.pg_class pc, pg_catalog.pg_namespace pn, + pg_catalog.pg_index pi, pg_catalog.pg_class pc2 WHERE pc.relnamespace=pn.oid AND pc.oid=pi.indrelid + AND pi.indexrelid=pc2.oid + AND NOT EXISTS ( + SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c + ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) + WHERE d.classid = pc2.tableoid AND d.objid = pc2.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p') + ) + AND pc2.relname ILIKE {$term} {$where} + UNION ALL + SELECT 'CONSTRAINTTABLE', NULL, pn.nspname, pc.relname, pc2.conname FROM pg_catalog.pg_class pc, pg_catalog.pg_namespace pn, + pg_catalog.pg_constraint pc2 WHERE pc.relnamespace=pn.oid AND pc.oid=pc2.conrelid AND pc2.conrelid != 0 + AND CASE WHEN pc2.contype IN ('f', 'c') THEN TRUE ELSE NOT EXISTS ( + SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c + ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) + WHERE d.classid = pc2.tableoid AND d.objid = pc2.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p') + ) END + AND pc2.conname ILIKE {$term} {$where} + UNION ALL + SELECT 'CONSTRAINTDOMAIN', pt.oid, pn.nspname, pt.typname, pc.conname FROM pg_catalog.pg_type pt, pg_catalog.pg_namespace pn, + pg_catalog.pg_constraint pc WHERE pt.typnamespace=pn.oid AND pt.oid=pc.contypid AND pc.contypid != 0 + AND pc.conname ILIKE {$term} {$where} + UNION ALL + SELECT 'TRIGGER', NULL, pn.nspname, pc.relname, pt.tgname FROM pg_catalog.pg_class pc, pg_catalog.pg_namespace pn, + pg_catalog.pg_trigger pt WHERE pc.relnamespace=pn.oid AND pc.oid=pt.tgrelid + AND ( pt.tgconstraint = 0 OR NOT EXISTS + (SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c + ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) + WHERE d.classid = pt.tableoid AND d.objid = pt.oid AND d.deptype = 'i' AND c.contype = 'f')) + AND pt.tgname ILIKE {$term} {$where} + UNION ALL + SELECT 'RULETABLE', NULL, pn.nspname AS schemaname, c.relname AS tablename, r.rulename FROM pg_catalog.pg_rewrite r + JOIN pg_catalog.pg_class c ON c.oid = r.ev_class + LEFT JOIN pg_catalog.pg_namespace pn ON pn.oid = c.relnamespace + WHERE c.relkind='r' AND r.rulename != '_RETURN' AND r.rulename ILIKE {$term} {$where} + UNION ALL + SELECT 'RULEVIEW', NULL, pn.nspname AS schemaname, c.relname AS tablename, r.rulename FROM pg_catalog.pg_rewrite r + JOIN pg_catalog.pg_class c ON c.oid = r.ev_class + LEFT JOIN pg_catalog.pg_namespace pn ON pn.oid = c.relnamespace + WHERE c.relkind='v' AND r.rulename != '_RETURN' AND r.rulename ILIKE {$term} {$where} + "; + + // Add advanced objects if show_advanced is set + if ($conf['show_advanced']) { + $sql .= " + UNION ALL + SELECT CASE WHEN pt.typtype='d' THEN 'DOMAIN' ELSE 'TYPE' END, pt.oid, pn.nspname, NULL, + pt.typname FROM pg_catalog.pg_type pt, pg_catalog.pg_namespace pn + WHERE pt.typnamespace=pn.oid AND typname ILIKE {$term} + AND (pt.typrelid = 0 OR (SELECT c.relkind = 'c' FROM pg_catalog.pg_class c WHERE c.oid = pt.typrelid)) + {$where} + UNION ALL + SELECT 'OPERATOR', po.oid, pn.nspname, NULL, po.oprname FROM pg_catalog.pg_operator po, pg_catalog.pg_namespace pn + WHERE po.oprnamespace=pn.oid AND oprname ILIKE {$term} {$where} + UNION ALL + SELECT 'CONVERSION', pc.oid, pn.nspname, NULL, pc.conname FROM pg_catalog.pg_conversion pc, + pg_catalog.pg_namespace pn WHERE pc.connamespace=pn.oid AND conname ILIKE {$term} {$where} + UNION ALL + SELECT 'LANGUAGE', pl.oid, NULL, NULL, pl.lanname FROM pg_catalog.pg_language pl + WHERE lanname ILIKE {$term} {$lan_where} + UNION ALL + SELECT DISTINCT ON (p.proname) 'AGGREGATE', p.oid, pn.nspname, NULL, p.proname FROM pg_catalog.pg_proc p + LEFT JOIN pg_catalog.pg_namespace pn ON p.pronamespace=pn.oid + WHERE p.proisagg AND p.proname ILIKE {$term} {$where} + UNION ALL + SELECT DISTINCT ON (po.opcname) 'OPCLASS', po.oid, pn.nspname, NULL, po.opcname FROM pg_catalog.pg_opclass po, + pg_catalog.pg_namespace pn WHERE po.opcnamespace=pn.oid + AND po.opcname ILIKE {$term} {$where} + "; + } + // Otherwise just add domains + else { + $sql .= " + UNION ALL + SELECT 'DOMAIN', pt.oid, pn.nspname, NULL, + pt.typname FROM pg_catalog.pg_type pt, pg_catalog.pg_namespace pn + WHERE pt.typnamespace=pn.oid AND pt.typtype='d' AND typname ILIKE {$term} + AND (pt.typrelid = 0 OR (SELECT c.relkind = 'c' FROM pg_catalog.pg_class c WHERE c.oid = pt.typrelid)) + {$where} + "; + } + + if ($filter != '') { + // We use like to make RULE, CONSTRAINT and COLUMN searches work + $sql .= ") AS sub WHERE type LIKE '{$filter}%' "; + } + + $sql .= "ORDER BY type, schemaname, relname, name"; + + return $this->selectSet($sql); + } + + /** + * Returns all available variable information. + * @return A recordset + */ + function getVariables() { + $sql = "SHOW ALL"; + + return $this->selectSet($sql); + } + + // Schema functons + + /** + * Return all schemas in the current database. + * @return All schemas, sorted alphabetically + */ + function getSchemas() { + global $conf, $slony; + + if (!$conf['show_system']) { + $where = "WHERE nspname NOT LIKE 'pg@_%' ESCAPE '@' AND nspname != 'information_schema'"; + if (isset($slony) && $slony->isEnabled()) { + $temp = $slony->slony_schema; + $this->clean($temp); + $where .= " AND nspname != '{$temp}'"; + } + + } + else $where = "WHERE nspname !~ '^pg_t(emp_[0-9]+|oast)$'"; + $sql = " + SELECT pn.nspname, pu.rolname AS nspowner, + pg_catalog.obj_description(pn.oid, 'pg_namespace') AS nspcomment + FROM pg_catalog.pg_namespace pn + LEFT JOIN pg_catalog.pg_roles pu ON (pn.nspowner = pu.oid) + {$where} + ORDER BY nspname"; + + return $this->selectSet($sql); + } + + /** + * Return all information relating to a schema + * @param $schema The name of the schema + * @return Schema information + */ + function getSchemaByName($schema) { + $this->clean($schema); + $sql = " + SELECT nspname, nspowner, r.rolname AS ownername, nspacl, + pg_catalog.obj_description(pn.oid, 'pg_namespace') as nspcomment + FROM pg_catalog.pg_namespace pn + LEFT JOIN pg_roles as r ON pn.nspowner = r.oid + WHERE nspname='{$schema}'"; + return $this->selectSet($sql); + } + + /** + * Sets the current working schema. Will also set Class variable. + * @param $schema The the name of the schema to work in + * @return 0 success + */ + function setSchema($schema) { + // Get the current schema search path, including 'pg_catalog'. + $search_path = $this->getSearchPath(); + // Prepend $schema to search path + array_unshift($search_path, $schema); + $status = $this->setSearchPath($search_path); + if ($status == 0) { + $this->_schema = $schema; + return 0; + } + else return $status; + } + + /** + * Sets the current schema search path + * @param $paths An array of schemas in required search order + * @return 0 success + * @return -1 Array not passed + * @return -2 Array must contain at least one item + */ + function setSearchPath($paths) { + if (!is_array($paths)) return -1; + elseif (sizeof($paths) == 0) return -2; + elseif (sizeof($paths) == 1 && $paths[0] == '') { + // Need to handle empty paths in some cases + $paths[0] = 'pg_catalog'; + } + + // Loop over all the paths to check that none are empty + $temp = array(); + foreach ($paths as $schema) { + if ($schema != '') $temp[] = $schema; + } + $this->fieldArrayClean($temp); + + $sql = 'SET SEARCH_PATH TO "' . implode('","', $temp) . '"'; + + return $this->execute($sql); + } + + /** + * Creates a new schema. + * @param $schemaname The name of the schema to create + * @param $authorization (optional) The username to create the schema for. + * @param $comment (optional) If omitted, defaults to nothing + * @return 0 success + */ + function createSchema($schemaname, $authorization = '', $comment = '') { + $this->fieldClean($schemaname); + $this->fieldClean($authorization); + + $sql = "CREATE SCHEMA \"{$schemaname}\""; + if ($authorization != '') $sql .= " AUTHORIZATION \"{$authorization}\""; + + if ($comment != '') { + $status = $this->beginTransaction(); + if ($status != 0) return -1; + } + + // Create the new schema + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + // Set the comment + if ($comment != '') { + $status = $this->setComment('SCHEMA', $schemaname, '', $comment); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + return $this->endTransaction(); + } + + return 0; + } + + /** + * Updates a schema. + * @param $schemaname The name of the schema to drop + * @param $comment The new comment for this schema + * @param $owner The new owner for this schema + * @return 0 success + */ + function updateSchema($schemaname, $comment, $name, $owner) { + $this->fieldClean($schemaname); + $this->fieldClean($name); + $this->fieldClean($owner); + + $status = $this->beginTransaction(); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + $status = $this->setComment('SCHEMA', $schemaname, '', $comment); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + $schema_rs = $this->getSchemaByName($schemaname); + /* Only if the owner change */ + if ($schema_rs->fields['ownername'] != $owner) { + $sql = "ALTER SCHEMA \"{$schemaname}\" OWNER TO \"{$owner}\""; + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + } + + // Only if the name has changed + if ($name != $schemaname) { + $sql = "ALTER SCHEMA \"{$schemaname}\" RENAME TO \"{$name}\""; + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + } + + return $this->endTransaction(); + } + + /** + * Drops a schema. + * @param $schemaname The name of the schema to drop + * @param $cascade True to cascade drop, false to restrict + * @return 0 success + */ + function dropSchema($schemaname, $cascade) { + $this->fieldClean($schemaname); + + $sql = "DROP SCHEMA \"{$schemaname}\""; + if ($cascade) $sql .= " CASCADE"; + + return $this->execute($sql); + } + + /** + * Return the current schema search path + * @return Array of schema names + */ + function getSearchPath() { + $sql = 'SELECT current_schemas(false) AS search_path'; + + return $this->phpArray($this->selectField($sql, 'search_path')); + } + + // Table functions + + /** + * Checks to see whether or not a table has a unique id column + * @param $table The table name + * @return True if it has a unique id, false otherwise + * @return null error + **/ + function hasObjectID($table) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + $sql = "SELECT relhasoids FROM pg_catalog.pg_class WHERE relname='{$table}' + AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname='{$c_schema}')"; + + $rs = $this->selectSet($sql); + if ($rs->recordCount() != 1) return null; + else { + $rs->fields['relhasoids'] = $this->phpBool($rs->fields['relhasoids']); + return $rs->fields['relhasoids']; + } + } + + /** + * Returns table information + * @param $table The name of the table + * @return A recordset + */ + function getTable($table) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + $sql = " + SELECT + c.relname, n.nspname, u.usename AS relowner, + pg_catalog.obj_description(c.oid, 'pg_class') AS relcomment, + (SELECT spcname FROM pg_catalog.pg_tablespace pt WHERE pt.oid=c.reltablespace) AS tablespace + FROM pg_catalog.pg_class c + LEFT JOIN pg_catalog.pg_user u ON u.usesysid = c.relowner + LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace + WHERE c.relkind = 'r' + AND n.nspname = '{$c_schema}' + AND n.oid = c.relnamespace + AND c.relname = '{$table}'"; + + return $this->selectSet($sql); + } + + /** + * Return all tables in current database (and schema) + * @param $all True to fetch all tables, false for just in current schema + * @return All tables, sorted alphabetically + */ + function getTables($all = false) { + $c_schema = $this->_schema; + $this->clean($c_schema); + if ($all) { + // Exclude pg_catalog and information_schema tables + $sql = "SELECT schemaname AS nspname, tablename AS relname, tableowner AS relowner + FROM pg_catalog.pg_tables + WHERE schemaname NOT IN ('pg_catalog', 'information_schema', 'pg_toast') + ORDER BY schemaname, tablename"; + } else { + $sql = "SELECT c.relname, pg_catalog.pg_get_userbyid(c.relowner) AS relowner, + pg_catalog.obj_description(c.oid, 'pg_class') AS relcomment, + reltuples::bigint, + (SELECT spcname FROM pg_catalog.pg_tablespace pt WHERE pt.oid=c.reltablespace) AS tablespace + FROM pg_catalog.pg_class c + LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace + WHERE c.relkind = 'r' + AND nspname='{$c_schema}' + ORDER BY c.relname"; + } + + return $this->selectSet($sql); + } + + /** + * Retrieve the attribute definition of a table + * @param $table The name of the table + * @param $field (optional) The name of a field to return + * @return All attributes in order + */ + function getTableAttributes($table, $field = '') { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + $this->clean($field); + + if ($field == '') { + // This query is made much more complex by the addition of the 'attisserial' field. + // The subquery to get that field checks to see if there is an internally dependent + // sequence on the field. + $sql = " + SELECT + a.attname, a.attnum, + pg_catalog.format_type(a.atttypid, a.atttypmod) as type, + a.atttypmod, + a.attnotnull, a.atthasdef, pg_catalog.pg_get_expr(adef.adbin, adef.adrelid, true) as adsrc, + a.attstattarget, a.attstorage, t.typstorage, + ( + SELECT 1 FROM pg_catalog.pg_depend pd, pg_catalog.pg_class pc + WHERE pd.objid=pc.oid + AND pd.classid=pc.tableoid + AND pd.refclassid=pc.tableoid + AND pd.refobjid=a.attrelid + AND pd.refobjsubid=a.attnum + AND pd.deptype='i' + AND pc.relkind='S' + ) IS NOT NULL AS attisserial, + pg_catalog.col_description(a.attrelid, a.attnum) AS comment + FROM + pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_attrdef adef + ON a.attrelid=adef.adrelid + AND a.attnum=adef.adnum + LEFT JOIN pg_catalog.pg_type t ON a.atttypid=t.oid + WHERE + a.attrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='{$table}' + AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE + nspname = '{$c_schema}')) + AND a.attnum > 0 AND NOT a.attisdropped + ORDER BY a.attnum"; + } + else { + $sql = " + SELECT + a.attname, a.attnum, + pg_catalog.format_type(a.atttypid, a.atttypmod) as type, + pg_catalog.format_type(a.atttypid, NULL) as base_type, + a.atttypmod, + a.attnotnull, a.atthasdef, pg_catalog.pg_get_expr(adef.adbin, adef.adrelid, true) as adsrc, + a.attstattarget, a.attstorage, t.typstorage, + pg_catalog.col_description(a.attrelid, a.attnum) AS comment + FROM + pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_attrdef adef + ON a.attrelid=adef.adrelid + AND a.attnum=adef.adnum + LEFT JOIN pg_catalog.pg_type t ON a.atttypid=t.oid + WHERE + a.attrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='{$table}' + AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE + nspname = '{$c_schema}')) + AND a.attname = '{$field}'"; + } + + return $this->selectSet($sql); + } + + /** + * Finds the names and schemas of parent tables (in order) + * @param $table The table to find the parents for + * @return A recordset + */ + function getTableParents($table) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + $sql = " + SELECT + pn.nspname, relname + FROM + pg_catalog.pg_class pc, pg_catalog.pg_inherits pi, pg_catalog.pg_namespace pn + WHERE + pc.oid=pi.inhparent + AND pc.relnamespace=pn.oid + AND pi.inhrelid = (SELECT oid from pg_catalog.pg_class WHERE relname='{$table}' + AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname = '{$c_schema}')) + ORDER BY + pi.inhseqno + "; + + return $this->selectSet($sql); + } + + /** + * Finds the names and schemas of child tables + * @param $table The table to find the children for + * @return A recordset + */ + function getTableChildren($table) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + $sql = " + SELECT + pn.nspname, relname + FROM + pg_catalog.pg_class pc, pg_catalog.pg_inherits pi, pg_catalog.pg_namespace pn + WHERE + pc.oid=pi.inhrelid + AND pc.relnamespace=pn.oid + AND pi.inhparent = (SELECT oid from pg_catalog.pg_class WHERE relname='{$table}' + AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname = '{$c_schema}')) + "; + + return $this->selectSet($sql); + } + + /** + * Returns the SQL definition for the table. + * @pre MUST be run within a transaction + * @param $table The table to define + * @param $clean True to issue drop command, false otherwise + * @return A string containing the formatted SQL code + * @return null On error + */ + function getTableDefPrefix($table, $clean = false) { + // Fetch table + $t = $this->getTable($table); + if (!is_object($t) || $t->recordCount() != 1) { + $this->rollbackTransaction(); + return null; + } + $this->fieldClean($t->fields['relname']); + $this->fieldClean($t->fields['nspname']); + + // Fetch attributes + $atts = $this->getTableAttributes($table); + if (!is_object($atts)) { + $this->rollbackTransaction(); + return null; + } + + // Fetch constraints + $cons = $this->getConstraints($table); + if (!is_object($cons)) { + $this->rollbackTransaction(); + return null; + } + + // Output a reconnect command to create the table as the correct user + $sql = $this->getChangeUserSQL($t->fields['relowner']) . "\n\n"; + + // Set schema search path + $sql .= "SET search_path = \"{$t->fields['nspname']}\", pg_catalog;\n\n"; + + // Begin CREATE TABLE definition + $sql .= "-- Definition\n\n"; + // DROP TABLE must be fully qualified in case a table with the same name exists + // in pg_catalog. + if (!$clean) $sql .= "-- "; + $sql .= "DROP TABLE "; + $sql .= "\"{$t->fields['nspname']}\".\"{$t->fields['relname']}\";\n"; + $sql .= "CREATE TABLE \"{$t->fields['nspname']}\".\"{$t->fields['relname']}\" (\n"; + + // Output all table columns + $col_comments_sql = ''; // Accumulate comments on columns + $num = $atts->recordCount() + $cons->recordCount(); + $i = 1; + while (!$atts->EOF) { + $this->fieldClean($atts->fields['attname']); + $sql .= " \"{$atts->fields['attname']}\""; + // Dump SERIAL and BIGSERIAL columns correctly + if ($this->phpBool($atts->fields['attisserial']) && + ($atts->fields['type'] == 'integer' || $atts->fields['type'] == 'bigint')) { + if ($atts->fields['type'] == 'integer') + $sql .= " SERIAL"; + else + $sql .= " BIGSERIAL"; + } + else { + $sql .= " " . $this->formatType($atts->fields['type'], $atts->fields['atttypmod']); + + // Add NOT NULL if necessary + if ($this->phpBool($atts->fields['attnotnull'])) + $sql .= " NOT NULL"; + // Add default if necessary + if ($atts->fields['adsrc'] !== null) + $sql .= " DEFAULT {$atts->fields['adsrc']}"; + } + + // Output comma or not + if ($i < $num) $sql .= ",\n"; + else $sql .= "\n"; + + // Does this column have a comment? + if ($atts->fields['comment'] !== null) { + $this->clean($atts->fields['comment']); + $col_comments_sql .= "COMMENT ON COLUMN \"{$t->fields['relname']}\".\"{$atts->fields['attname']}\" IS '{$atts->fields['comment']}';\n"; + } + + $atts->moveNext(); + $i++; + } + // Output all table constraints + while (!$cons->EOF) { + $this->fieldClean($cons->fields['conname']); + $sql .= " CONSTRAINT \"{$cons->fields['conname']}\" "; + // Nasty hack to support pre-7.4 PostgreSQL + if ($cons->fields['consrc'] !== null) + $sql .= $cons->fields['consrc']; + else { + switch ($cons->fields['contype']) { + case 'p': + $keys = $this->getAttributeNames($table, explode(' ', $cons->fields['indkey'])); + $sql .= "PRIMARY KEY (" . join(',', $keys) . ")"; + break; + case 'u': + $keys = $this->getAttributeNames($table, explode(' ', $cons->fields['indkey'])); + $sql .= "UNIQUE (" . join(',', $keys) . ")"; + break; + default: + // Unrecognised constraint + $this->rollbackTransaction(); + return null; + } + } + + // Output comma or not + if ($i < $num) $sql .= ",\n"; + else $sql .= "\n"; + + $cons->moveNext(); + $i++; + } + + $sql .= ")"; + + // @@@@ DUMP CLUSTERING INFORMATION + + // Inherits + /* + * XXX: This is currently commented out as handling inheritance isn't this simple. + * You also need to make sure you don't dump inherited columns and defaults, as well + * as inherited NOT NULL and CHECK constraints. So for the time being, we just do + * not claim to support inheritance. + $parents = $this->getTableParents($table); + if ($parents->recordCount() > 0) { + $sql .= " INHERITS ("; + while (!$parents->EOF) { + $this->fieldClean($parents->fields['relname']); + // Qualify the parent table if it's in another schema + if ($parents->fields['schemaname'] != $this->_schema) { + $this->fieldClean($parents->fields['schemaname']); + $sql .= "\"{$parents->fields['schemaname']}\"."; + } + $sql .= "\"{$parents->fields['relname']}\""; + + $parents->moveNext(); + if (!$parents->EOF) $sql .= ', '; + } + $sql .= ")"; + } + */ + + // Handle WITHOUT OIDS + if ($this->hasObjectID($table)) + $sql .= " WITH OIDS"; + else + $sql .= " WITHOUT OIDS"; + + $sql .= ";\n"; + + // Column storage and statistics + $atts->moveFirst(); + $first = true; + while (!$atts->EOF) { + $this->fieldClean($atts->fields['attname']); + // Statistics first + if ($atts->fields['attstattarget'] >= 0) { + if ($first) { + $sql .= "\n"; + $first = false; + } + $sql .= "ALTER TABLE ONLY \"{$t->fields['nspname']}\".\"{$t->fields['relname']}\" ALTER COLUMN \"{$atts->fields['attname']}\" SET STATISTICS {$atts->fields['attstattarget']};\n"; + } + // Then storage + if ($atts->fields['attstorage'] != $atts->fields['typstorage']) { + switch ($atts->fields['attstorage']) { + case 'p': + $storage = 'PLAIN'; + break; + case 'e': + $storage = 'EXTERNAL'; + break; + case 'm': + $storage = 'MAIN'; + break; + case 'x': + $storage = 'EXTENDED'; + break; + default: + // Unknown storage type + $this->rollbackTransaction(); + return null; + } + $sql .= "ALTER TABLE ONLY \"{$t->fields['nspname']}\".\"{$t->fields['relname']}\" ALTER COLUMN \"{$atts->fields['attname']}\" SET STORAGE {$storage};\n"; + } + + $atts->moveNext(); + } + + // Comment + if ($t->fields['relcomment'] !== null) { + $this->clean($t->fields['relcomment']); + $sql .= "\n-- Comment\n\n"; + $sql .= "COMMENT ON TABLE \"{$t->fields['nspname']}\".\"{$t->fields['relname']}\" IS '{$t->fields['relcomment']}';\n"; + } + + // Add comments on columns, if any + if ($col_comments_sql != '') $sql .= $col_comments_sql; + + // Privileges + $privs = $this->getPrivileges($table, 'table'); + if (!is_array($privs)) { + $this->rollbackTransaction(); + return null; + } + + if (sizeof($privs) > 0) { + $sql .= "\n-- Privileges\n\n"; + /* + * Always start with REVOKE ALL FROM PUBLIC, so that we don't have to + * wire-in knowledge about the default public privileges for different + * kinds of objects. + */ + $sql .= "REVOKE ALL ON TABLE \"{$t->fields['nspname']}\".\"{$t->fields['relname']}\" FROM PUBLIC;\n"; + foreach ($privs as $v) { + // Get non-GRANT OPTION privs + $nongrant = array_diff($v[2], $v[4]); + + // Skip empty or owner ACEs + if (sizeof($v[2]) == 0 || ($v[0] == 'user' && $v[1] == $t->fields['relowner'])) continue; + + // Change user if necessary + if ($this->hasGrantOption() && $v[3] != $t->fields['relowner']) { + $grantor = $v[3]; + $this->clean($grantor); + $sql .= "SET SESSION AUTHORIZATION '{$grantor}';\n"; + } + + // Output privileges with no GRANT OPTION + $sql .= "GRANT " . join(', ', $nongrant) . " ON TABLE \"{$t->fields['relname']}\" TO "; + switch ($v[0]) { + case 'public': + $sql .= "PUBLIC;\n"; + break; + case 'user': + $this->fieldClean($v[1]); + $sql .= "\"{$v[1]}\";\n"; + break; + case 'group': + $this->fieldClean($v[1]); + $sql .= "GROUP \"{$v[1]}\";\n"; + break; + default: + // Unknown privilege type - fail + $this->rollbackTransaction(); + return null; + } + + // Reset user if necessary + if ($this->hasGrantOption() && $v[3] != $t->fields['relowner']) { + $sql .= "RESET SESSION AUTHORIZATION;\n"; + } + + // Output privileges with GRANT OPTION + + // Skip empty or owner ACEs + if (!$this->hasGrantOption() || sizeof($v[4]) == 0) continue; + + // Change user if necessary + if ($this->hasGrantOption() && $v[3] != $t->fields['relowner']) { + $grantor = $v[3]; + $this->clean($grantor); + $sql .= "SET SESSION AUTHORIZATION '{$grantor}';\n"; + } + + $sql .= "GRANT " . join(', ', $v[4]) . " ON \"{$t->fields['relname']}\" TO "; + switch ($v[0]) { + case 'public': + $sql .= "PUBLIC"; + break; + case 'user': + $this->fieldClean($v[1]); + $sql .= "\"{$v[1]}\""; + break; + case 'group': + $this->fieldClean($v[1]); + $sql .= "GROUP \"{$v[1]}\""; + break; + default: + // Unknown privilege type - fail + return null; + } + $sql .= " WITH GRANT OPTION;\n"; + + // Reset user if necessary + if ($this->hasGrantOption() && $v[3] != $t->fields['relowner']) { + $sql .= "RESET SESSION AUTHORIZATION;\n"; + } + + } + } + + // Add a newline to separate data that follows (if any) + $sql .= "\n"; + + return $sql; + } + + /** + * Returns extra table definition information that is most usefully + * dumped after the table contents for speed and efficiency reasons + * @param $table The table to define + * @return A string containing the formatted SQL code + * @return null On error + */ + function getTableDefSuffix($table) { + $sql = ''; + + // Indexes + $indexes = $this->getIndexes($table); + if (!is_object($indexes)) { + $this->rollbackTransaction(); + return null; + } + + if ($indexes->recordCount() > 0) { + $sql .= "\n-- Indexes\n\n"; + while (!$indexes->EOF) { + $sql .= $indexes->fields['inddef'] . ";\n"; + + $indexes->moveNext(); + } + } + + // Triggers + $triggers = $this->getTriggers($table); + if (!is_object($triggers)) { + $this->rollbackTransaction(); + return null; + } + + if ($triggers->recordCount() > 0) { + $sql .= "\n-- Triggers\n\n"; + while (!$triggers->EOF) { + // Nasty hack to support pre-7.4 PostgreSQL + if ($triggers->fields['tgdef'] !== null) + $sql .= $triggers->fields['tgdef']; + else + $sql .= $this->getTriggerDef($triggers->fields); + + $sql .= ";\n"; + + $triggers->moveNext(); + } + } + + // Rules + $rules = $this->getRules($table); + if (!is_object($rules)) { + $this->rollbackTransaction(); + return null; + } + + if ($rules->recordCount() > 0) { + $sql .= "\n-- Rules\n\n"; + while (!$rules->EOF) { + $sql .= $rules->fields['definition'] . "\n"; + + $rules->moveNext(); + } + } + + return $sql; + } + + /** + * Creates a new table in the database + * @param $name The name of the table + * @param $fields The number of fields + * @param $field An array of field names + * @param $type An array of field types + * @param $array An array of '' or '[]' for each type if it's an array or not + * @param $length An array of field lengths + * @param $notnull An array of not null + * @param $default An array of default values + * @param $withoutoids True if WITHOUT OIDS, false otherwise + * @param $colcomment An array of comments + * @param $comment Table comment + * @param $tablespace The tablespace name ('' means none/default) + * @param $uniquekey An Array indicating the fields that are unique (those indexes that are set) + * @param $primarykey An Array indicating the field used for the primarykey (those indexes that are set) + * @return 0 success + * @return -1 no fields supplied + */ + function createTable($name, $fields, $field, $type, $array, $length, $notnull, + $default, $withoutoids, $colcomment, $tblcomment, $tablespace, + $uniquekey, $primarykey) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($name); + + $status = $this->beginTransaction(); + if ($status != 0) return -1; + + $found = false; + $first = true; + $comment_sql = ''; //Accumulate comments for the columns + $sql = "CREATE TABLE \"{$f_schema}\".\"{$name}\" ("; + for ($i = 0; $i < $fields; $i++) { + $this->fieldClean($field[$i]); + $this->clean($type[$i]); + $this->clean($length[$i]); + $this->clean($colcomment[$i]); + + // Skip blank columns - for user convenience + if ($field[$i] == '' || $type[$i] == '') continue; + // If not the first column, add a comma + if (!$first) $sql .= ", "; + else $first = false; + + switch ($type[$i]) { + // Have to account for weird placing of length for with/without + // time zone types + case 'timestamp with time zone': + case 'timestamp without time zone': + $qual = substr($type[$i], 9); + $sql .= "\"{$field[$i]}\" timestamp"; + if ($length[$i] != '') $sql .= "({$length[$i]})"; + $sql .= $qual; + break; + case 'time with time zone': + case 'time without time zone': + $qual = substr($type[$i], 4); + $sql .= "\"{$field[$i]}\" time"; + if ($length[$i] != '') $sql .= "({$length[$i]})"; + $sql .= $qual; + break; + default: + $sql .= "\"{$field[$i]}\" {$type[$i]}"; + if ($length[$i] != '') $sql .= "({$length[$i]})"; + } + // Add array qualifier if necessary + if ($array[$i] == '[]') $sql .= '[]'; + // Add other qualifiers + if (!isset($primarykey[$i])) { + if (isset($uniquekey[$i])) $sql .= " UNIQUE"; + if (isset($notnull[$i])) $sql .= " NOT NULL"; + } + if ($default[$i] != '') $sql .= " DEFAULT {$default[$i]}"; + + if ($colcomment[$i] != '') $comment_sql .= "COMMENT ON COLUMN \"{$name}\".\"{$field[$i]}\" IS '{$colcomment[$i]}';\n"; + + $found = true; + } + + if (!$found) return -1; + + // PRIMARY KEY + $primarykeycolumns = array(); + for ($i = 0; $i < $fields; $i++) { + if (isset($primarykey[$i])) { + $primarykeycolumns[] = "\"{$field[$i]}\""; + } + } + if (count($primarykeycolumns) > 0) { + $sql .= ", PRIMARY KEY (" . implode(", ", $primarykeycolumns) . ")"; + } + + $sql .= ")"; + + // WITHOUT OIDS + if ($withoutoids) + $sql .= ' WITHOUT OIDS'; + else + $sql .= ' WITH OIDS'; + + // Tablespace + if ($this->hasTablespaces() && $tablespace != '') { + $this->fieldClean($tablespace); + $sql .= " TABLESPACE \"{$tablespace}\""; + } + + $status = $this->execute($sql); + if ($status) { + $this->rollbackTransaction(); + return -1; + } + + if ($tblcomment != '') { + $status = $this->setComment('TABLE', '', $name, $tblcomment, true); + if ($status) { + $this->rollbackTransaction(); + return -1; + } + } + + if ($comment_sql != '') { + $status = $this->execute($comment_sql); + if ($status) { + $this->rollbackTransaction(); + return -1; + } + } + return $this->endTransaction(); + } + + /** + * Creates a new table in the database copying attribs and other properties from another table + * @param $name The name of the table + * @param $like an array giving the schema ans the name of the table from which attribs are copying from: + * array( + * 'table' => table name, + * 'schema' => the schema name, + * ) + * @param $defaults if true, copy the defaults values as well + * @param $constraints if true, copy the constraints as well (CHECK on table & attr) + * @param $tablespace The tablespace name ('' means none/default) + */ + function createTableLike($name, $like, $defaults = false, $constraints = false, $idx = false, $tablespace = '') { + + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($name); + $this->fieldClean($like['schema']); + $this->fieldClean($like['table']); + $like = "\"{$like['schema']}\".\"{$like['table']}\""; + + $status = $this->beginTransaction(); + if ($status != 0) return -1; + + $sql = "CREATE TABLE \"{$f_schema}\".\"{$name}\" (LIKE {$like}"; + + if ($defaults) $sql .= " INCLUDING DEFAULTS"; + if ($this->hasCreateTableLikeWithConstraints() && $constraints) $sql .= " INCLUDING CONSTRAINTS"; + if ($this->hasCreateTableLikeWithIndexes() && $idx) $sql .= " INCLUDING INDEXES"; + + $sql .= ")"; + + if ($this->hasTablespaces() && $tablespace != '') { + $this->fieldClean($tablespace); + $sql .= " TABLESPACE \"{$tablespace}\""; + } + + $status = $this->execute($sql); + if ($status) { + $this->rollbackTransaction(); + return -1; + } + + return $this->endTransaction(); + } + + /** + * Alter a table's name + * /!\ this function is called from _alterTable which take care of escaping fields + * @param $tblrs The table RecordSet returned by getTable() + * @param $name The new table's name + * @return 0 success + */ + function alterTableName($tblrs, $name = null) { + /* vars cleaned in _alterTable */ + // Rename (only if name has changed) + if (!empty($name) && ($name != $tblrs->fields['relname'])) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + + $sql = "ALTER TABLE \"{$f_schema}\".\"{$tblrs->fields['relname']}\" RENAME TO \"{$name}\""; + $status = $this->execute($sql); + if ($status == 0) + $tblrs->fields['relname'] = $name; + else + return $status; + } + return 0; + } + + /** + * Alter a table's owner + * /!\ this function is called from _alterTable which take care of escaping fields + * @param $tblrs The table RecordSet returned by getTable() + * @param $name The new table's owner + * @return 0 success + */ + function alterTableOwner($tblrs, $owner = null) { + /* vars cleaned in _alterTable */ + if (!empty($owner) && ($tblrs->fields['relowner'] != $owner)) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + // If owner has been changed, then do the alteration. We are + // careful to avoid this generally as changing owner is a + // superuser only function. + $sql = "ALTER TABLE \"{$f_schema}\".\"{$tblrs->fields['relname']}\" OWNER TO \"{$owner}\""; + + return $this->execute($sql); + } + return 0; + } + + /** + * Alter a table's tablespace + * /!\ this function is called from _alterTable which take care of escaping fields + * @param $tblrs The table RecordSet returned by getTable() + * @param $name The new table's tablespace + * @return 0 success + */ + function alterTableTablespace($tblrs, $tablespace = null) { + /* vars cleaned in _alterTable */ + if (!empty($tablespace) && ($tblrs->fields['tablespace'] != $tablespace)) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + + // If tablespace has been changed, then do the alteration. We + // don't want to do this unnecessarily. + $sql = "ALTER TABLE \"{$f_schema}\".\"{$tblrs->fields['relname']}\" SET TABLESPACE \"{$tablespace}\""; + + return $this->execute($sql); + } + return 0; + } + + /** + * Alter a table's schema + * /!\ this function is called from _alterTable which take care of escaping fields + * @param $tblrs The table RecordSet returned by getTable() + * @param $name The new table's schema + * @return 0 success + */ + function alterTableSchema($tblrs, $schema = null) { + /* vars cleaned in _alterTable */ + if (!empty($schema) && ($tblrs->fields['nspname'] != $schema)) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + // If tablespace has been changed, then do the alteration. We + // don't want to do this unnecessarily. + $sql = "ALTER TABLE \"{$f_schema}\".\"{$tblrs->fields['relname']}\" SET SCHEMA \"{$schema}\""; + + return $this->execute($sql); + } + return 0; + } + + /** + * Protected method which alter a table + * SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION + * @param $tblrs The table recordSet returned by getTable() + * @param $name The new name for the table + * @param $owner The new owner for the table + * @param $schema The new schema for the table + * @param $comment The comment on the table + * @param $tablespace The new tablespace for the table ('' means leave as is) + * @return 0 success + * @return -3 rename error + * @return -4 comment error + * @return -5 owner error + * @return -6 tablespace error + * @return -7 schema error + */ + protected + function _alterTable($tblrs, $name, $owner, $schema, $comment, $tablespace) { + + $this->fieldArrayClean($tblrs->fields); + + // Comment + $status = $this->setComment('TABLE', '', $tblrs->fields['relname'], $comment); + if ($status != 0) return -4; + + // Owner + $this->fieldClean($owner); + $status = $this->alterTableOwner($tblrs, $owner); + if ($status != 0) return -5; + + // Tablespace + $this->fieldClean($tablespace); + $status = $this->alterTableTablespace($tblrs, $tablespace); + if ($status != 0) return -6; + + // Rename + $this->fieldClean($name); + $status = $this->alterTableName($tblrs, $name); + if ($status != 0) return -3; + + // Schema + $this->fieldClean($schema); + $status = $this->alterTableSchema($tblrs, $schema); + if ($status != 0) return -7; + + return 0; + } + + /** + * Alter table properties + * @param $table The name of the table + * @param $name The new name for the table + * @param $owner The new owner for the table + * @param $schema The new schema for the table + * @param $comment The comment on the table + * @param $tablespace The new tablespace for the table ('' means leave as is) + * @return 0 success + * @return -1 transaction error + * @return -2 get existing table error + * @return $this->_alterTable error code + */ + function alterTable($table, $name, $owner, $schema, $comment, $tablespace) { + + $data = $this->getTable($table); + + if ($data->recordCount() != 1) + return -2; + + $status = $this->beginTransaction(); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + $status = $this->_alterTable($data, $name, $owner, $schema, $comment, $tablespace); + + if ($status != 0) { + $this->rollbackTransaction(); + return $status; + } + + return $this->endTransaction(); + } + + /** + * Returns the SQL for changing the current user + * @param $user The user to change to + * @return The SQL + */ + function getChangeUserSQL($user) { + $this->clean($user); + return "SET SESSION AUTHORIZATION '{$user}';"; + } + + /** + * Given an array of attnums and a relation, returns an array mapping + * attribute number to attribute name. + * @param $table The table to get attributes for + * @param $atts An array of attribute numbers + * @return An array mapping attnum to attname + * @return -1 $atts must be an array + * @return -2 wrong number of attributes found + */ + function getAttributeNames($table, $atts) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + $this->arrayClean($atts); + + if (!is_array($atts)) return -1; + + if (sizeof($atts) == 0) return array(); + + $sql = "SELECT attnum, attname FROM pg_catalog.pg_attribute WHERE + attrelid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='{$table}' AND + relnamespace=(SELECT oid FROM pg_catalog.pg_namespace WHERE nspname='{$c_schema}')) + AND attnum IN ('" . join("','", $atts) . "')"; + + $rs = $this->selectSet($sql); + if ($rs->recordCount() != sizeof($atts)) { + return -2; + } + else { + $temp = array(); + while (!$rs->EOF) { + $temp[$rs->fields['attnum']] = $rs->fields['attname']; + $rs->moveNext(); + } + return $temp; + } + } + + /** + * Empties a table in the database + * @param $table The table to be emptied + * @return 0 success + */ + function emptyTable($table) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + + $sql = "DELETE FROM \"{$f_schema}\".\"{$table}\""; + + return $this->execute($sql); + } + + /** + * Removes a table from the database + * @param $table The table to drop + * @param $cascade True to cascade drop, false to restrict + * @return 0 success + */ + function dropTable($table, $cascade) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + + $sql = "DROP TABLE \"{$f_schema}\".\"{$table}\""; + if ($cascade) $sql .= " CASCADE"; + + return $this->execute($sql); + } + + /** + * Add a new column to a table + * @param $table The table to add to + * @param $column The name of the new column + * @param $type The type of the column + * @param $array True if array type, false otherwise + * @param $notnull True if NOT NULL, false otherwise + * @param $default The default for the column. '' for none. + * @param $length The optional size of the column (ie. 30 for varchar(30)) + * @return 0 success + */ + function addColumn($table, $column, $type, $array, $length, $notnull, $default, $comment) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + $this->fieldClean($column); + $this->clean($type); + $this->clean($length); + + if ($length == '') + $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" ADD COLUMN \"{$column}\" {$type}"; + else { + switch ($type) { + // Have to account for weird placing of length for with/without + // time zone types + case 'timestamp with time zone': + case 'timestamp without time zone': + $qual = substr($type, 9); + $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" ADD COLUMN \"{$column}\" timestamp({$length}){$qual}"; + break; + case 'time with time zone': + case 'time without time zone': + $qual = substr($type, 4); + $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" ADD COLUMN \"{$column}\" time({$length}){$qual}"; + break; + default: + $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" ADD COLUMN \"{$column}\" {$type}({$length})"; + } + } + + // Add array qualifier, if requested + if ($array) $sql .= '[]'; + + // If we have advanced column adding, add the extra qualifiers + if ($this->hasCreateFieldWithConstraints()) { + // NOT NULL clause + if ($notnull) $sql .= ' NOT NULL'; + + // DEFAULT clause + if ($default != '') $sql .= ' DEFAULT ' . $default; + } + + $status = $this->beginTransaction(); + if ($status != 0) return -1; + + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + $status = $this->setComment('COLUMN', $column, $table, $comment); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + return $this->endTransaction(); + } + + /** + * Alters a column in a table + * @param $table The table in which the column resides + * @param $column The column to alter + * @param $name The new name for the column + * @param $notnull (boolean) True if not null, false otherwise + * @param $oldnotnull (boolean) True if column is already not null, false otherwise + * @param $default The new default for the column + * @param $olddefault The old default for the column + * @param $type The new type for the column + * @param $array True if array type, false otherwise + * @param $length The optional size of the column (ie. 30 for varchar(30)) + * @param $oldtype The old type for the column + * @param $comment Comment for the column + * @return 0 success + * @return -1 batch alteration failed + * @return -4 rename column error + * @return -5 comment error + * @return -6 transaction error + */ + function alterColumn($table, $column, $name, $notnull, $oldnotnull, $default, $olddefault, + $type, $length, $array, $oldtype, $comment) + { + // Begin transaction + $status = $this->beginTransaction(); + if ($status != 0) { + $this->rollbackTransaction(); + return -6; + } + + // Rename the column, if it has been changed + if ($column != $name) { + $status = $this->renameColumn($table, $column, $name); + if ($status != 0) { + $this->rollbackTransaction(); + return -4; + } + } + + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($name); + $this->fieldClean($table); + $this->fieldClean($column); + + $toAlter = array(); + // Create the command for changing nullability + if ($notnull != $oldnotnull) { + $toAlter[] = "ALTER COLUMN \"{$name}\" ". (($notnull) ? 'SET' : 'DROP') . " NOT NULL"; + } + + // Add default, if it has changed + if ($default != $olddefault) { + if ($default == '') { + $toAlter[] = "ALTER COLUMN \"{$name}\" DROP DEFAULT"; + } + else { + $toAlter[] = "ALTER COLUMN \"{$name}\" SET DEFAULT {$default}"; + } + } + + // Add type, if it has changed + if ($length == '') + $ftype = $type; + else { + switch ($type) { + // Have to account for weird placing of length for with/without + // time zone types + case 'timestamp with time zone': + case 'timestamp without time zone': + $qual = substr($type, 9); + $ftype = "timestamp({$length}){$qual}"; + break; + case 'time with time zone': + case 'time without time zone': + $qual = substr($type, 4); + $ftype = "time({$length}){$qual}"; + break; + default: + $ftype = "{$type}({$length})"; + } + } + + // Add array qualifier, if requested + if ($array) $ftype .= '[]'; + + if ($ftype != $oldtype) { + $toAlter[] = "ALTER COLUMN \"{$name}\" TYPE {$ftype}"; + } + + // Attempt to process the batch alteration, if anything has been changed + if (!empty($toAlter)) { + // Initialise an empty SQL string + $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" " + . implode(',', $toAlter); + + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + } + + // Update the comment on the column + $status = $this->setComment('COLUMN', $name, $table, $comment); + if ($status != 0) { + $this->rollbackTransaction(); + return -5; + } + + return $this->endTransaction(); + } + + /** + * Renames a column in a table + * @param $table The table containing the column to be renamed + * @param $column The column to be renamed + * @param $newName The new name for the column + * @return 0 success + */ + function renameColumn($table, $column, $newName) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + $this->fieldClean($column); + $this->fieldClean($newName); + + $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" RENAME COLUMN \"{$column}\" TO \"{$newName}\""; + + return $this->execute($sql); + } + + /** + * Sets default value of a column + * @param $table The table from which to drop + * @param $column The column name to set + * @param $default The new default value + * @return 0 success + */ + function setColumnDefault($table, $column, $default) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + $this->fieldClean($column); + + $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" ALTER COLUMN \"{$column}\" SET DEFAULT {$default}"; + + return $this->execute($sql); + } + + /** + * Sets whether or not a column can contain NULLs + * @param $table The table that contains the column + * @param $column The column to alter + * @param $state True to set null, false to set not null + * @return 0 success + */ + function setColumnNull($table, $column, $state) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + $this->fieldClean($column); + + $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" ALTER COLUMN \"{$column}\" " . (($state) ? 'DROP' : 'SET') . " NOT NULL"; + + return $this->execute($sql); + } + + /** + * Drops a column from a table + * @param $table The table from which to drop a column + * @param $column The column to be dropped + * @param $cascade True to cascade drop, false to restrict + * @return 0 success + */ + function dropColumn($table, $column, $cascade) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + $this->fieldClean($column); + + $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" DROP COLUMN \"{$column}\""; + if ($cascade) $sql .= " CASCADE"; + + return $this->execute($sql); + } + + /** + * Drops default value of a column + * @param $table The table from which to drop + * @param $column The column name to drop default + * @return 0 success + */ + function dropColumnDefault($table, $column) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + $this->fieldClean($column); + + $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" ALTER COLUMN \"{$column}\" DROP DEFAULT"; + + return $this->execute($sql); + } + + /** + * Sets up the data object for a dump. eg. Starts the appropriate + * transaction, sets variables, etc. + * @return 0 success + */ + function beginDump() { + // Begin serializable transaction (to dump consistent data) + $status = $this->beginTransaction(); + if ($status != 0) return -1; + + // Set serializable + $sql = "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE"; + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + // Set datestyle to ISO + $sql = "SET DATESTYLE = ISO"; + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + // Set extra_float_digits to 2 + $sql = "SET extra_float_digits TO 2"; + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + return 0; + } + + /** + * Ends the data object for a dump. + * @return 0 success + */ + function endDump() { + return $this->endTransaction(); + } + + /** + * Returns a recordset of all columns in a relation. Used for data export. + * @@ Note: Really needs to use a cursor + * @param $relation The name of a relation + * @return A recordset on success + * @return -1 Failed to set datestyle + */ + function dumpRelation($relation, $oids) { + $this->fieldClean($relation); + + // Actually retrieve the rows + if ($oids) $oid_str = $this->id . ', '; + else $oid_str = ''; + + return $this->selectSet("SELECT {$oid_str}* FROM \"{$relation}\""); + } + + /** + * Returns all available autovacuum per table information. + * @param $table if given, return autovacuum info for the given table or return all informations for all table + * + * @return A recordset + */ + function getTableAutovacuum($table='') { + + $sql = ''; + + if ($table !== '') { + $this->clean($table); + $c_schema = $this->_schema; + $this->clean($c_schema); + + $sql = "SELECT c.oid, nspname, relname, pg_catalog.array_to_string(reloptions, E',') AS reloptions + FROM pg_class c + LEFT JOIN pg_namespace n ON n.oid = c.relnamespace + WHERE c.relkind = 'r'::\"char\" + AND n.nspname NOT IN ('pg_catalog','information_schema') + AND c.reloptions IS NOT NULL + AND c.relname = '{$table}' AND n.nspname = '{$c_schema}' + ORDER BY nspname, relname"; + } + else { + $sql = "SELECT c.oid, nspname, relname, pg_catalog.array_to_string(reloptions, E',') AS reloptions + FROM pg_class c + LEFT JOIN pg_namespace n ON n.oid = c.relnamespace + WHERE c.relkind = 'r'::\"char\" + AND n.nspname NOT IN ('pg_catalog','information_schema') + AND c.reloptions IS NOT NULL + ORDER BY nspname, relname"; + + } + + /* tmp var to parse the results */ + $_autovacs = $this->selectSet($sql); + + /* result aray to return as RS */ + $autovacs = array(); + while (!$_autovacs->EOF) { + $_ = array( + 'nspname' => $_autovacs->fields['nspname'], + 'relname' => $_autovacs->fields['relname'] + ); + + foreach (explode(',', $_autovacs->fields['reloptions']) AS $var) { + list($o, $v) = explode('=', $var); + $_[$o] = $v; + } + + $autovacs[] = $_; + + $_autovacs->moveNext(); + } + + include_once('./classes/ArrayRecordSet.php'); + return new ArrayRecordSet($autovacs); + } + + // Row functions + + /** + * Get the fields for uniquely identifying a row in a table + * @param $table The table for which to retrieve the identifier + * @return An array mapping attribute number to attribute name, empty for no identifiers + * @return -1 error + */ + function getRowIdentifier($table) { + $oldtable = $table; + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + $status = $this->beginTransaction(); + if ($status != 0) return -1; + + // Get the first primary or unique index (sorting primary keys first) that + // is NOT a partial index. + $sql = " + SELECT indrelid, indkey + FROM pg_catalog.pg_index + WHERE indisunique AND indrelid=( + SELECT oid FROM pg_catalog.pg_class + WHERE relname='{$table}' AND relnamespace=( + SELECT oid FROM pg_catalog.pg_namespace + WHERE nspname='{$c_schema}' + ) + ) AND indpred IS NULL AND indexprs IS NULL + ORDER BY indisprimary DESC LIMIT 1"; + $rs = $this->selectSet($sql); + + // If none, check for an OID column. Even though OIDs can be duplicated, the edit and delete row + // functions check that they're only modiying a single row. Otherwise, return empty array. + if ($rs->recordCount() == 0) { + // Check for OID column + $temp = array(); + if ($this->hasObjectID($table)) { + $temp = array('oid'); + } + $this->endTransaction(); + return $temp; + } + // Otherwise find the names of the keys + else { + $attnames = $this->getAttributeNames($oldtable, explode(' ', $rs->fields['indkey'])); + if (!is_array($attnames)) { + $this->rollbackTransaction(); + return -1; + } + else { + $this->endTransaction(); + return $attnames; + } + } + } + + /** + * Adds a new row to a table + * @param $table The table in which to insert + * @param $fields Array of given field in values + * @param $values Array of new values for the row + * @param $nulls An array mapping column => something if it is to be null + * @param $format An array of the data type (VALUE or EXPRESSION) + * @param $types An array of field types + * @return 0 success + * @return -1 invalid parameters + */ + function insertRow($table, $fields, $values, $nulls, $format, $types) { + + if (!is_array($fields) || !is_array($values) || !is_array($nulls) + || !is_array($format) || !is_array($types) + || (count($fields) != count($values)) + ) { + return -1; + } + else { + // Build clause + if (count($values) > 0) { + // Escape all field names + $fields = array_map(array('Postgres','fieldClean'), $fields); + $f_schema = $this->_schema; + $this->fieldClean($table); + $this->fieldClean($f_schema); + + $sql = ''; + foreach($values as $i => $value) { + + // Handle NULL values + if (isset($nulls[$i])) + $sql .= ',NULL'; + else + $sql .= ',' . $this->formatValue($types[$i], $format[$i], $value); + } + + $sql = "INSERT INTO \"{$f_schema}\".\"{$table}\" (\"". implode('","', $fields) ."\") + VALUES (". substr($sql, 1) .")"; + + return $this->execute($sql); + } + } + + return -1; + } + + /** + * Updates a row in a table + * @param $table The table in which to update + * @param $vars An array mapping new values for the row + * @param $nulls An array mapping column => something if it is to be null + * @param $format An array of the data type (VALUE or EXPRESSION) + * @param $types An array of field types + * @param $keyarr An array mapping column => value to update + * @return 0 success + * @return -1 invalid parameters + */ + function editRow($table, $vars, $nulls, $format, $types, $keyarr) { + if (!is_array($vars) || !is_array($nulls) || !is_array($format) || !is_array($types)) + return -1; + else { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + + // Build clause + if (sizeof($vars) > 0) { + + foreach($vars as $key => $value) { + $this->fieldClean($key); + + // Handle NULL values + if (isset($nulls[$key])) $tmp = 'NULL'; + else $tmp = $this->formatValue($types[$key], $format[$key], $value); + + if (isset($sql)) $sql .= ", \"{$key}\"={$tmp}"; + else $sql = "UPDATE \"{$f_schema}\".\"{$table}\" SET \"{$key}\"={$tmp}"; + } + $first = true; + foreach ($keyarr as $k => $v) { + $this->fieldClean($k); + $this->clean($v); + if ($first) { + $sql .= " WHERE \"{$k}\"='{$v}'"; + $first = false; + } + else $sql .= " AND \"{$k}\"='{$v}'"; + } + } + + // Begin transaction. We do this so that we can ensure only one row is + // edited + $status = $this->beginTransaction(); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + $status = $this->execute($sql); + if ($status != 0) { // update failed + $this->rollbackTransaction(); + return -1; + } elseif ($this->conn->Affected_Rows() != 1) { // more than one row could be updated + $this->rollbackTransaction(); + return -2; + } + + // End transaction + return $this->endTransaction(); + } + } + + /** + * Delete a row from a table + * @param $table The table from which to delete + * @param $key An array mapping column => value to delete + * @return 0 success + */ + function deleteRow($table, $key, $schema=false) { + if (!is_array($key)) return -1; + else { + // Begin transaction. We do this so that we can ensure only one row is + // deleted + $status = $this->beginTransaction(); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + if ($schema === false) $schema = $this->_schema; + + $status = $this->delete($table, $key, $schema); + if ($status != 0 || $this->conn->Affected_Rows() != 1) { + $this->rollbackTransaction(); + return -2; + } + + // End transaction + return $this->endTransaction(); + } + } + + // Sequence functions + + /** + * Returns properties of a single sequence + * @param $sequence Sequence name + * @return A recordset + */ + function getSequence($sequence) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $c_sequence = $sequence; + $this->fieldClean($sequence); + $this->clean($c_sequence); + + $sql = " + SELECT c.relname AS seqname, s.*, + pg_catalog.obj_description(s.tableoid, 'pg_class') AS seqcomment, + u.usename AS seqowner, n.nspname + FROM \"{$sequence}\" AS s, pg_catalog.pg_class c, pg_catalog.pg_user u, pg_catalog.pg_namespace n + WHERE c.relowner=u.usesysid AND c.relnamespace=n.oid + AND c.relname = '{$c_sequence}' AND c.relkind = 'S' AND n.nspname='{$c_schema}' + AND n.oid = c.relnamespace"; + + return $this->selectSet( $sql ); + } + + /** + * Returns all sequences in the current database + * @return A recordset + */ + function getSequences($all = false) { + if ($all) { + // Exclude pg_catalog and information_schema tables + $sql = "SELECT n.nspname, c.relname AS seqname, u.usename AS seqowner + FROM pg_catalog.pg_class c, pg_catalog.pg_user u, pg_catalog.pg_namespace n + WHERE c.relowner=u.usesysid AND c.relnamespace=n.oid + AND c.relkind = 'S' + AND n.nspname NOT IN ('pg_catalog', 'information_schema', 'pg_toast') + ORDER BY nspname, seqname"; + } else { + $c_schema = $this->_schema; + $this->clean($c_schema); + $sql = "SELECT c.relname AS seqname, u.usename AS seqowner, pg_catalog.obj_description(c.oid, 'pg_class') AS seqcomment, + (SELECT spcname FROM pg_catalog.pg_tablespace pt WHERE pt.oid=c.reltablespace) AS tablespace + FROM pg_catalog.pg_class c, pg_catalog.pg_user u, pg_catalog.pg_namespace n + WHERE c.relowner=u.usesysid AND c.relnamespace=n.oid + AND c.relkind = 'S' AND n.nspname='{$c_schema}' ORDER BY seqname"; + } + + return $this->selectSet( $sql ); + } + + /** + * Execute nextval on a given sequence + * @param $sequence Sequence name + * @return 0 success + * @return -1 sequence not found + */ + function nextvalSequence($sequence) { + /* This double-cleaning is deliberate */ + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->clean($f_schema); + $this->fieldClean($sequence); + $this->clean($sequence); + + $sql = "SELECT pg_catalog.NEXTVAL('\"{$f_schema}\".\"{$sequence}\"')"; + + return $this->execute($sql); + } + + /** + * Execute setval on a given sequence + * @param $sequence Sequence name + * @param $nextvalue The next value + * @return 0 success + * @return -1 sequence not found + */ + function setvalSequence($sequence, $nextvalue) { + /* This double-cleaning is deliberate */ + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->clean($f_schema); + $this->fieldClean($sequence); + $this->clean($sequence); + $this->clean($nextvalue); + + $sql = "SELECT pg_catalog.SETVAL('\"{$f_schema}\".\"{$sequence}\"', '{$nextvalue}')"; + + return $this->execute($sql); + } + + /** + * Restart a given sequence to its start value + * @param $sequence Sequence name + * @return 0 success + * @return -1 sequence not found + */ + function restartSequence($sequence) { + + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($sequence); + + $sql = "ALTER SEQUENCE \"{$f_schema}\".\"{$sequence}\" RESTART;"; + + return $this->execute($sql); + } + + /** + * Resets a given sequence to min value of sequence + * @param $sequence Sequence name + * @return 0 success + * @return -1 sequence not found + */ + function resetSequence($sequence) { + // Get the minimum value of the sequence + $seq = $this->getSequence($sequence); + if ($seq->recordCount() != 1) return -1; + $minvalue = $seq->fields['min_value']; + + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + /* This double-cleaning is deliberate */ + $this->fieldClean($sequence); + $this->clean($sequence); + + $sql = "SELECT pg_catalog.SETVAL('\"{$f_schema}\".\"{$sequence}\"', {$minvalue})"; + + return $this->execute($sql); + } + + /** + * Creates a new sequence + * @param $sequence Sequence name + * @param $increment The increment + * @param $minvalue The min value + * @param $maxvalue The max value + * @param $startvalue The starting value + * @param $cachevalue The cache value + * @param $cycledvalue True if cycled, false otherwise + * @return 0 success + */ + function createSequence($sequence, $increment, $minvalue, $maxvalue, + $startvalue, $cachevalue, $cycledvalue) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($sequence); + $this->clean($increment); + $this->clean($minvalue); + $this->clean($maxvalue); + $this->clean($startvalue); + $this->clean($cachevalue); + + $sql = "CREATE SEQUENCE \"{$f_schema}\".\"{$sequence}\""; + if ($increment != '') $sql .= " INCREMENT {$increment}"; + if ($minvalue != '') $sql .= " MINVALUE {$minvalue}"; + if ($maxvalue != '') $sql .= " MAXVALUE {$maxvalue}"; + if ($startvalue != '') $sql .= " START {$startvalue}"; + if ($cachevalue != '') $sql .= " CACHE {$cachevalue}"; + if ($cycledvalue) $sql .= " CYCLE"; + + return $this->execute($sql); + } + + /** + * Rename a sequence + * @param $seqrs The sequence RecordSet returned by getSequence() + * @param $name The new name for the sequence + * @return 0 success + */ + function alterSequenceName($seqrs, $name) { + /* vars are cleaned in _alterSequence */ + if (!empty($name) && ($seqrs->fields['seqname'] != $name)) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $sql = "ALTER SEQUENCE \"{$f_schema}\".\"{$seqrs->fields['seqname']}\" RENAME TO \"{$name}\""; + $status = $this->execute($sql); + if ($status == 0) + $seqrs->fields['seqname'] = $name; + else + return $status; + } + return 0; + } + + /** + * Alter a sequence's owner + * @param $seqrs The sequence RecordSet returned by getSequence() + * @param $name The new owner for the sequence + * @return 0 success + */ + function alterSequenceOwner($seqrs, $owner) { + // If owner has been changed, then do the alteration. We are + // careful to avoid this generally as changing owner is a + // superuser only function. + /* vars are cleaned in _alterSequence */ + if (!empty($owner) && ($seqrs->fields['seqowner'] != $owner)) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $sql = "ALTER SEQUENCE \"{$f_schema}\".\"{$seqrs->fields['seqname']}\" OWNER TO \"{$owner}\""; + return $this->execute($sql); + } + return 0; + } + + /** + * Alter a sequence's schema + * @param $seqrs The sequence RecordSet returned by getSequence() + * @param $name The new schema for the sequence + * @return 0 success + */ + function alterSequenceSchema($seqrs, $schema) { + /* vars are cleaned in _alterSequence */ + if (!empty($schema) && ($seqrs->fields['nspname'] != $schema)) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $sql = "ALTER SEQUENCE \"{$f_schema}\".\"{$seqrs->fields['seqname']}\" SET SCHEMA {$schema}"; + return $this->execute($sql); + } + return 0; + } + + /** + * Alter a sequence's properties + * @param $seqrs The sequence RecordSet returned by getSequence() + * @param $increment The sequence incremental value + * @param $minvalue The sequence minimum value + * @param $maxvalue The sequence maximum value + * @param $restartvalue The sequence current value + * @param $cachevalue The sequence cache value + * @param $cycledvalue Sequence can cycle ? + * @param $startvalue The sequence start value when issueing a restart + * @return 0 success + */ + function alterSequenceProps($seqrs, $increment, $minvalue, $maxvalue, + $restartvalue, $cachevalue, $cycledvalue, $startvalue) { + + $sql = ''; + /* vars are cleaned in _alterSequence */ + if (!empty($increment) && ($increment != $seqrs->fields['increment_by'])) $sql .= " INCREMENT {$increment}"; + if (!empty($minvalue) && ($minvalue != $seqrs->fields['min_value'])) $sql .= " MINVALUE {$minvalue}"; + if (!empty($maxvalue) && ($maxvalue != $seqrs->fields['max_value'])) $sql .= " MAXVALUE {$maxvalue}"; + if (!empty($restartvalue) && ($restartvalue != $seqrs->fields['last_value'])) $sql .= " RESTART {$restartvalue}"; + if (!empty($cachevalue) && ($cachevalue != $seqrs->fields['cache_value'])) $sql .= " CACHE {$cachevalue}"; + if (!empty($startvalue) && ($startvalue != $seqrs->fields['start_value'])) $sql .= " START {$startvalue}"; + // toggle cycle yes/no + if (!is_null($cycledvalue)) $sql .= (!$cycledvalue ? ' NO ' : '') . " CYCLE"; + if ($sql != '') { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $sql = "ALTER SEQUENCE \"{$f_schema}\".\"{$seqrs->fields['seqname']}\" {$sql}"; + return $this->execute($sql); + } + return 0; + } + + /** + * Protected method which alter a sequence + * SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION + * @param $seqrs The sequence recordSet returned by getSequence() + * @param $name The new name for the sequence + * @param $comment The comment on the sequence + * @param $owner The new owner for the sequence + * @param $schema The new schema for the sequence + * @param $increment The increment + * @param $minvalue The min value + * @param $maxvalue The max value + * @param $restartvalue The starting value + * @param $cachevalue The cache value + * @param $cycledvalue True if cycled, false otherwise + * @param $startvalue The sequence start value when issueing a restart + * @return 0 success + * @return -3 rename error + * @return -4 comment error + * @return -5 owner error + * @return -6 get sequence props error + * @return -7 schema error + */ + protected + function _alterSequence($seqrs, $name, $comment, $owner, $schema, $increment, + $minvalue, $maxvalue, $restartvalue, $cachevalue, $cycledvalue, $startvalue) { + + $this->fieldArrayClean($seqrs->fields); + + // Comment + $status = $this->setComment('SEQUENCE', $seqrs->fields['seqname'], '', $comment); + if ($status != 0) + return -4; + + // Owner + $this->fieldClean($owner); + $status = $this->alterSequenceOwner($seqrs, $owner); + if ($status != 0) + return -5; + + // Props + $this->clean($increment); + $this->clean($minvalue); + $this->clean($maxvalue); + $this->clean($restartvalue); + $this->clean($cachevalue); + $this->clean($cycledvalue); + $this->clean($startvalue); + $status = $this->alterSequenceProps($seqrs, $increment, $minvalue, + $maxvalue, $restartvalue, $cachevalue, $cycledvalue, $startvalue); + if ($status != 0) + return -6; + + // Rename + $this->fieldClean($name); + $status = $this->alterSequenceName($seqrs, $name); + if ($status != 0) + return -3; + + // Schema + $this->clean($schema); + $status = $this->alterSequenceSchema($seqrs, $schema); + if ($status != 0) + return -7; + + return 0; + } + + /** + * Alters a sequence + * @param $sequence The name of the sequence + * @param $name The new name for the sequence + * @param $comment The comment on the sequence + * @param $owner The new owner for the sequence + * @param $schema The new schema for the sequence + * @param $increment The increment + * @param $minvalue The min value + * @param $maxvalue The max value + * @param $restartvalue The starting value + * @param $cachevalue The cache value + * @param $cycledvalue True if cycled, false otherwise + * @param $startvalue The sequence start value when issueing a restart + * @return 0 success + * @return -1 transaction error + * @return -2 get existing sequence error + * @return $this->_alterSequence error code + */ + function alterSequence($sequence, $name, $comment, $owner=null, $schema=null, $increment=null, + $minvalue=null, $maxvalue=null, $restartvalue=null, $cachevalue=null, $cycledvalue=null, $startvalue=null) { + + $this->fieldClean($sequence); + + $data = $this->getSequence($sequence); + + if ($data->recordCount() != 1) + return -2; + + $status = $this->beginTransaction(); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + $status = $this->_alterSequence($data, $name, $comment, $owner, $schema, $increment, + $minvalue, $maxvalue, $restartvalue, $cachevalue, $cycledvalue, $startvalue); + + if ($status != 0) { + $this->rollbackTransaction(); + return $status; + } + + return $this->endTransaction(); + } + + /** + * Drops a given sequence + * @param $sequence Sequence name + * @param $cascade True to cascade drop, false to restrict + * @return 0 success + */ + function dropSequence($sequence, $cascade) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($sequence); + + $sql = "DROP SEQUENCE \"{$f_schema}\".\"{$sequence}\""; + if ($cascade) $sql .= " CASCADE"; + + return $this->execute($sql); + } + + // View functions + + /** + * Returns all details for a particular view + * @param $view The name of the view to retrieve + * @return View info + */ + function getView($view) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($view); + + $sql = " + SELECT c.relname, n.nspname, pg_catalog.pg_get_userbyid(c.relowner) AS relowner, + pg_catalog.pg_get_viewdef(c.oid, true) AS vwdefinition, + pg_catalog.obj_description(c.oid, 'pg_class') AS relcomment + FROM pg_catalog.pg_class c + LEFT JOIN pg_catalog.pg_namespace n ON (n.oid = c.relnamespace) + WHERE (c.relname = '{$view}') AND n.nspname='{$c_schema}'"; + + return $this->selectSet($sql); + } + + /** + * Returns a list of all views in the database + * @return All views + */ + function getViews() { + $c_schema = $this->_schema; + $this->clean($c_schema); + $sql = " + SELECT c.relname, pg_catalog.pg_get_userbyid(c.relowner) AS relowner, + pg_catalog.obj_description(c.oid, 'pg_class') AS relcomment + FROM pg_catalog.pg_class c + LEFT JOIN pg_catalog.pg_namespace n ON (n.oid = c.relnamespace) + WHERE (n.nspname='{$c_schema}') AND (c.relkind = 'v'::\"char\") + ORDER BY relname"; + + return $this->selectSet($sql); + } + + /** + * Updates a view. + * @param $viewname The name fo the view to update + * @param $definition The new definition for the view + * @return 0 success + * @return -1 transaction error + * @return -2 drop view error + * @return -3 create view error + */ + function setView($viewname, $definition,$comment) { + return $this->createView($viewname, $definition, true, $comment); + } + + /** + * Creates a new view. + * @param $viewname The name of the view to create + * @param $definition The definition for the new view + * @param $replace True to replace the view, false otherwise + * @return 0 success + */ + function createView($viewname, $definition, $replace, $comment) { + $status = $this->beginTransaction(); + if ($status != 0) return -1; + + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($viewname); + + // Note: $definition not cleaned + + $sql = "CREATE "; + if ($replace) $sql .= "OR REPLACE "; + $sql .= "VIEW \"{$f_schema}\".\"{$viewname}\" AS {$definition}"; + + $status = $this->execute($sql); + if ($status) { + $this->rollbackTransaction(); + return -1; + } + + if ($comment != '') { + $status = $this->setComment('VIEW', $viewname, '', $comment); + if ($status) { + $this->rollbackTransaction(); + return -1; + } + } + + return $this->endTransaction(); + } + + /** + * Rename a view + * @param $vwrs The view recordSet returned by getView() + * @param $name The new view's name + * @return 0 success + */ + function alterViewName($vwrs, $name) { + // Rename (only if name has changed) + /* $vwrs and $name are cleaned in _alterView */ + if (!empty($name) && ($name != $vwrs->fields['relname'])) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $sql = "ALTER VIEW \"{$f_schema}\".\"{$vwrs->fields['relname']}\" RENAME TO \"{$name}\""; + $status = $this->execute($sql); + if ($status == 0) + $vwrs->fields['relname'] = $name; + else + return $status; + } + return 0; + } + + /** + * Alter a view's owner + * @param $vwrs The view recordSet returned by getView() + * @param $name The new view's owner + * @return 0 success + */ + function alterViewOwner($vwrs, $owner = null) { + /* $vwrs and $owner are cleaned in _alterView */ + if ((!empty($owner)) && ($vwrs->fields['relowner'] != $owner)) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + // If owner has been changed, then do the alteration. We are + // careful to avoid this generally as changing owner is a + // superuser only function. + $sql = "ALTER TABLE \"{$f_schema}\".\"{$vwrs->fields['relname']}\" OWNER TO \"{$owner}\""; + return $this->execute($sql); + } + return 0; + } + + /** + * Alter a view's schema + * @param $vwrs The view recordSet returned by getView() + * @param $name The new view's schema + * @return 0 success + */ + function alterViewSchema($vwrs, $schema) { + /* $vwrs and $schema are cleaned in _alterView */ + if (!empty($schema) && ($vwrs->fields['nspname'] != $schema)) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + // If tablespace has been changed, then do the alteration. We + // don't want to do this unnecessarily. + $sql = "ALTER TABLE \"{$f_schema}\".\"{$vwrs->fields['relname']}\" SET SCHEMA \"{$schema}\""; + return $this->execute($sql); + } + return 0; + } + + /** + * Protected method which alter a view + * SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION + * @param $vwrs The view recordSet returned by getView() + * @param $name The new name for the view + * @param $owner The new owner for the view + * @param $comment The comment on the view + * @return 0 success + * @return -3 rename error + * @return -4 comment error + * @return -5 owner error + * @return -6 schema error + */ + protected + function _alterView($vwrs, $name, $owner, $schema, $comment) { + + $this->fieldArrayClean($vwrs->fields); + + // Comment + if ($this->setComment('VIEW', $vwrs->fields['relname'], '', $comment) != 0) + return -4; + + // Owner + $this->fieldClean($owner); + $status = $this->alterViewOwner($vwrs, $owner); + if ($status != 0) return -5; + + // Rename + $this->fieldClean($name); + $status = $this->alterViewName($vwrs, $name); + if ($status != 0) return -3; + + // Schema + $this->fieldClean($schema); + $status = $this->alterViewSchema($vwrs, $schema); + if ($status != 0) return -6; + + return 0; + } + + /** + * Alter view properties + * @param $view The name of the view + * @param $name The new name for the view + * @param $owner The new owner for the view + * @param $schema The new schema for the view + * @param $comment The comment on the view + * @return 0 success + * @return -1 transaction error + * @return -2 get existing view error + * @return $this->_alterView error code + */ + function alterView($view, $name, $owner, $schema, $comment) { + + $data = $this->getView($view); + if ($data->recordCount() != 1) + return -2; + + $status = $this->beginTransaction(); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + $status = $this->_alterView($data, $name, $owner, $schema, $comment); + + if ($status != 0) { + $this->rollbackTransaction(); + return $status; + } + + return $this->endTransaction(); + } + + /** + * Drops a view. + * @param $viewname The name of the view to drop + * @param $cascade True to cascade drop, false to restrict + * @return 0 success + */ + function dropView($viewname, $cascade) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($viewname); + + $sql = "DROP VIEW \"{$f_schema}\".\"{$viewname}\""; + if ($cascade) $sql .= " CASCADE"; + + return $this->execute($sql); + } + + // Index functions + + /** + * Grabs a list of indexes for a table + * @param $table The name of a table whose indexes to retrieve + * @param $unique Only get unique/pk indexes + * @return A recordset + */ + function getIndexes($table = '', $unique = false) { + $this->clean($table); + + $sql = " + SELECT c2.relname AS indname, i.indisprimary, i.indisunique, i.indisclustered, + pg_catalog.pg_get_indexdef(i.indexrelid, 0, true) AS inddef + FROM pg_catalog.pg_class c, pg_catalog.pg_class c2, pg_catalog.pg_index i + WHERE c.relname = '{$table}' AND pg_catalog.pg_table_is_visible(c.oid) + AND c.oid = i.indrelid AND i.indexrelid = c2.oid + "; + if ($unique) $sql .= " AND i.indisunique "; + $sql .= " ORDER BY c2.relname"; + + return $this->selectSet($sql); + } + + /** + * test if a table has been clustered on an index + * @param $table The table to test + * + * @return true if the table has been already clustered + */ + function alreadyClustered($table) { + + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + $sql = "SELECT i.indisclustered + FROM pg_catalog.pg_class c, pg_catalog.pg_index i + WHERE c.relname = '{$table}' + AND c.oid = i.indrelid AND i.indisclustered + AND c.relnamespace = (SELECT oid FROM pg_catalog.pg_namespace + WHERE nspname='{$c_schema}') + "; + + $v = $this->selectSet($sql); + + if ($v->recordCount() == 0) + return false; + + return true; + } + + /** + * Creates an index + * @param $name The index name + * @param $table The table on which to add the index + * @param $columns An array of columns that form the index + * or a string expression for a functional index + * @param $type The index type + * @param $unique True if unique, false otherwise + * @param $where Index predicate ('' for none) + * @param $tablespace The tablespaces ('' means none/default) + * @return 0 success + */ + function createIndex($name, $table, $columns, $type, $unique, $where, $tablespace, $concurrently) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($name); + $this->fieldClean($table); + + $sql = "CREATE"; + if ($unique) $sql .= " UNIQUE"; + $sql .= " INDEX"; + if ($concurrently) $sql .= " CONCURRENTLY"; + $sql .= " \"{$name}\" ON \"{$f_schema}\".\"{$table}\" USING {$type} "; + + if (is_array($columns)) { + $this->arrayClean($columns); + $sql .= "(\"" . implode('","', $columns) . "\")"; + } else { + $sql .= "(" . $columns .")"; + } + + // Tablespace + if ($this->hasTablespaces() && $tablespace != '') { + $this->fieldClean($tablespace); + $sql .= " TABLESPACE \"{$tablespace}\""; + } + + // Predicate + if (trim($where) != '') { + $sql .= " WHERE ({$where})"; + } + + return $this->execute($sql); + } + + /** + * Removes an index from the database + * @param $index The index to drop + * @param $cascade True to cascade drop, false to restrict + * @return 0 success + */ + function dropIndex($index, $cascade) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($index); + + $sql = "DROP INDEX \"{$f_schema}\".\"{$index}\""; + if ($cascade) $sql .= " CASCADE"; + + return $this->execute($sql); + } + + /** + * Rebuild indexes + * @param $type 'DATABASE' or 'TABLE' or 'INDEX' + * @param $name The name of the specific database, table, or index to be reindexed + * @param $force If true, recreates indexes forcedly in PostgreSQL 7.0-7.1, forces rebuild of system indexes in 7.2-7.3, ignored in >=7.4 + */ + function reindex($type, $name, $force = false) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($name); + switch($type) { + case 'DATABASE': + $sql = "REINDEX {$type} \"{$name}\""; + if ($force) $sql .= ' FORCE'; + break; + case 'TABLE': + case 'INDEX': + $sql = "REINDEX {$type} \"{$f_schema}\".\"{$name}\""; + if ($force) $sql .= ' FORCE'; + break; + default: + return -1; + } + + return $this->execute($sql); + } + + /** + * Clusters an index + * @param $index The name of the index + * @param $table The table the index is on + * @return 0 success + */ + function clusterIndex($table='', $index='') { + + $sql = 'CLUSTER'; + + // We don't bother with a transaction here, as there's no point rolling + // back an expensive cluster if a cheap analyze fails for whatever reason + + if (!empty($table)) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + $sql .= " \"{$f_schema}\".\"{$table}\""; + + if (!empty($index)) { + $this->fieldClean($index); + $sql .= " USING \"{$index}\""; + } + } + + return $this->execute($sql); + } + + // Constraint functions + + /** + * Returns a list of all constraints on a table + * @param $table The table to find rules for + * @return A recordset + */ + function getConstraints($table) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + // This SQL is greatly complicated by the need to retrieve + // index clustering information for primary and unique constraints + $sql = "SELECT + pc.conname, + pg_catalog.pg_get_constraintdef(pc.oid, true) AS consrc, + pc.contype, + CASE WHEN pc.contype='u' OR pc.contype='p' THEN ( + SELECT + indisclustered + FROM + pg_catalog.pg_depend pd, + pg_catalog.pg_class pl, + pg_catalog.pg_index pi + WHERE + pd.refclassid=pc.tableoid + AND pd.refobjid=pc.oid + AND pd.objid=pl.oid + AND pl.oid=pi.indexrelid + ) ELSE + NULL + END AS indisclustered + FROM + pg_catalog.pg_constraint pc + WHERE + pc.conrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='{$table}' + AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace + WHERE nspname='{$c_schema}')) + ORDER BY + 1 + "; + + return $this->selectSet($sql); + } + + /** + * Returns a list of all constraints on a table, + * including constraint name, definition, related col and referenced namespace, + * table and col if needed + * @param $table the table where we are looking for fk + * @return a recordset + */ + function getConstraintsWithFields($table) { + + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + // get the max number of col used in a constraint for the table + $sql = "SELECT DISTINCT + max(SUBSTRING(array_dims(c.conkey) FROM \$patern\$^\\[.*:(.*)\\]$\$patern\$)) as nb + FROM pg_catalog.pg_constraint AS c + JOIN pg_catalog.pg_class AS r ON (c.conrelid=r.oid) + JOIN pg_catalog.pg_namespace AS ns ON (r.relnamespace=ns.oid) + WHERE + r.relname = '{$table}' AND ns.nspname='{$c_schema}'"; + + $rs = $this->selectSet($sql); + + if ($rs->EOF) $max_col = 0; + else $max_col = $rs->fields['nb']; + + $sql = ' + SELECT + c.oid AS conid, c.contype, c.conname, pg_catalog.pg_get_constraintdef(c.oid, true) AS consrc, + ns1.nspname as p_schema, r1.relname as p_table, ns2.nspname as f_schema, + r2.relname as f_table, f1.attname as p_field, f1.attnum AS p_attnum, f2.attname as f_field, + f2.attnum AS f_attnum, pg_catalog.obj_description(c.oid, \'pg_constraint\') AS constcomment, + c.conrelid, c.confrelid + FROM + pg_catalog.pg_constraint AS c + JOIN pg_catalog.pg_class AS r1 ON (c.conrelid=r1.oid) + JOIN pg_catalog.pg_attribute AS f1 ON (f1.attrelid=r1.oid AND (f1.attnum=c.conkey[1]'; + for ($i = 2; $i <= $rs->fields['nb']; $i++) { + $sql.= " OR f1.attnum=c.conkey[$i]"; + } + $sql.= ')) + JOIN pg_catalog.pg_namespace AS ns1 ON r1.relnamespace=ns1.oid + LEFT JOIN ( + pg_catalog.pg_class AS r2 JOIN pg_catalog.pg_namespace AS ns2 ON (r2.relnamespace=ns2.oid) + ) ON (c.confrelid=r2.oid) + LEFT JOIN pg_catalog.pg_attribute AS f2 ON + (f2.attrelid=r2.oid AND ((c.confkey[1]=f2.attnum AND c.conkey[1]=f1.attnum)'; + for ($i = 2; $i <= $rs->fields['nb']; $i++) + $sql.= " OR (c.confkey[$i]=f2.attnum AND c.conkey[$i]=f1.attnum)"; + + $sql .= sprintf(")) + WHERE + r1.relname = '%s' AND ns1.nspname='%s' + ORDER BY 1", $table, $c_schema); + + return $this->selectSet($sql); + } + + /** + * Adds a primary key constraint to a table + * @param $table The table to which to add the primery key + * @param $fields (array) An array of fields over which to add the primary key + * @param $name (optional) The name to give the key, otherwise default name is assigned + * @param $tablespace (optional) The tablespace for the schema, '' indicates default. + * @return 0 success + * @return -1 no fields given + */ + function addPrimaryKey($table, $fields, $name = '', $tablespace = '') { + if (!is_array($fields) || sizeof($fields) == 0) return -1; + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + $this->fieldArrayClean($fields); + $this->fieldClean($name); + $this->fieldClean($tablespace); + + $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" ADD "; + if ($name != '') $sql .= "CONSTRAINT \"{$name}\" "; + $sql .= "PRIMARY KEY (\"" . join('","', $fields) . "\")"; + + if ($tablespace != '' && $this->hasTablespaces()) + $sql .= " USING INDEX TABLESPACE \"{$tablespace}\""; + + return $this->execute($sql); + } + + /** + * Adds a unique constraint to a table + * @param $table The table to which to add the unique key + * @param $fields (array) An array of fields over which to add the unique key + * @param $name (optional) The name to give the key, otherwise default name is assigned + * @param $tablespace (optional) The tablespace for the schema, '' indicates default. + * @return 0 success + * @return -1 no fields given + */ + function addUniqueKey($table, $fields, $name = '', $tablespace = '') { + if (!is_array($fields) || sizeof($fields) == 0) return -1; + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + $this->fieldArrayClean($fields); + $this->fieldClean($name); + $this->fieldClean($tablespace); + + $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" ADD "; + if ($name != '') $sql .= "CONSTRAINT \"{$name}\" "; + $sql .= "UNIQUE (\"" . join('","', $fields) . "\")"; + + if ($tablespace != '' && $this->hasTablespaces()) + $sql .= " USING INDEX TABLESPACE \"{$tablespace}\""; + + return $this->execute($sql); + } + + /** + * Adds a check constraint to a table + * @param $table The table to which to add the check + * @param $definition The definition of the check + * @param $name (optional) The name to give the check, otherwise default name is assigned + * @return 0 success + */ + function addCheckConstraint($table, $definition, $name = '') { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + $this->fieldClean($name); + // @@ How the heck do you clean a definition??? + + $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" ADD "; + if ($name != '') $sql .= "CONSTRAINT \"{$name}\" "; + $sql .= "CHECK ({$definition})"; + + return $this->execute($sql); + } + + /** + * Drops a check constraint from a table + * @param $table The table from which to drop the check + * @param $name The name of the check to be dropped + * @return 0 success + * @return -2 transaction error + * @return -3 lock error + * @return -4 check drop error + */ + function dropCheckConstraint($table, $name) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $c_schema = $this->_schema; + $this->clean($c_schema); + $c_table = $table; + $this->fieldClean($table); + $this->clean($c_table); + $this->clean($name); + + // Begin transaction + $status = $this->beginTransaction(); + if ($status != 0) return -2; + + // Properly lock the table + $sql = "LOCK TABLE \"{$f_schema}\".\"{$table}\" IN ACCESS EXCLUSIVE MODE"; + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -3; + } + + // Delete the check constraint + $sql = "DELETE FROM pg_relcheck WHERE rcrelid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='{$c_table}' + AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE + nspname = '{$c_schema}')) AND rcname='{$name}'"; + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -4; + } + + // Update the pg_class catalog to reflect the new number of checks + $sql = "UPDATE pg_class SET relchecks=(SELECT COUNT(*) FROM pg_relcheck WHERE + rcrelid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='{$c_table}' + AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE + nspname = '{$c_schema}'))) + WHERE relname='{$c_table}'"; + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -4; + } + + // Otherwise, close the transaction + return $this->endTransaction(); + } + + /** + * Adds a foreign key constraint to a table + * @param $targschema The schema that houses the target table to which to add the foreign key + * @param $targtable The table to which to add the foreign key + * @param $target The table that contains the target columns + * @param $sfields (array) An array of source fields over which to add the foreign key + * @param $tfields (array) An array of target fields over which to add the foreign key + * @param $upd_action The action for updates (eg. RESTRICT) + * @param $del_action The action for deletes (eg. RESTRICT) + * @param $match The match type (eg. MATCH FULL) + * @param $deferrable The deferrability (eg. NOT DEFERRABLE) + * @param $intially The initial deferrability (eg. INITIALLY IMMEDIATE) + * @param $name (optional) The name to give the key, otherwise default name is assigned + * @return 0 success + * @return -1 no fields given + */ + function addForeignKey($table, $targschema, $targtable, $sfields, $tfields, $upd_action, $del_action, + $match, $deferrable, $initially, $name = '') { + if (!is_array($sfields) || sizeof($sfields) == 0 || + !is_array($tfields) || sizeof($tfields) == 0) return -1; + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + $this->fieldClean($targschema); + $this->fieldClean($targtable); + $this->fieldArrayClean($sfields); + $this->fieldArrayClean($tfields); + $this->fieldClean($name); + + $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" ADD "; + if ($name != '') $sql .= "CONSTRAINT \"{$name}\" "; + $sql .= "FOREIGN KEY (\"" . join('","', $sfields) . "\") "; + // Target table needs to be fully qualified + $sql .= "REFERENCES \"{$targschema}\".\"{$targtable}\"(\"" . join('","', $tfields) . "\") "; + if ($match != $this->fkmatches[0]) $sql .= " {$match}"; + if ($upd_action != $this->fkactions[0]) $sql .= " ON UPDATE {$upd_action}"; + if ($del_action != $this->fkactions[0]) $sql .= " ON DELETE {$del_action}"; + if ($deferrable != $this->fkdeferrable[0]) $sql .= " {$deferrable}"; + if ($initially != $this->fkinitial[0]) $sql .= " {$initially}"; + + return $this->execute($sql); + } + + /** + * Removes a constraint from a relation + * @param $constraint The constraint to drop + * @param $relation The relation from which to drop + * @param $type The type of constraint (c, f, u or p) + * @param $cascade True to cascade drop, false to restrict + * @return 0 success + */ + function dropConstraint($constraint, $relation, $type, $cascade) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($constraint); + $this->fieldClean($relation); + + $sql = "ALTER TABLE \"{$f_schema}\".\"{$relation}\" DROP CONSTRAINT \"{$constraint}\""; + if ($cascade) $sql .= " CASCADE"; + + return $this->execute($sql); + } + + /** + * A function for getting all columns linked by foreign keys given a group of tables + * @param $tables multi dimensional assoc array that holds schema and table name + * @return A recordset of linked tables and columns + * @return -1 $tables isn't an array + */ + function getLinkingKeys($tables) { + if (!is_array($tables)) return -1; + + $this->clean($tables[0]['tablename']); + $this->clean($tables[0]['schemaname']); + $tables_list = "'{$tables[0]['tablename']}'"; + $schema_list = "'{$tables[0]['schemaname']}'"; + $schema_tables_list = "'{$tables[0]['schemaname']}.{$tables[0]['tablename']}'"; + + for ($i = 1; $i < sizeof($tables); $i++) { + $this->clean($tables[$i]['tablename']); + $this->clean($tables[$i]['schemaname']); + $tables_list .= ", '{$tables[$i]['tablename']}'"; + $schema_list .= ", '{$tables[$i]['schemaname']}'"; + $schema_tables_list .= ", '{$tables[$i]['schemaname']}.{$tables[$i]['tablename']}'"; + } + + $maxDimension = 1; + + $sql = " + SELECT DISTINCT + array_dims(pc.conkey) AS arr_dim, + pgc1.relname AS p_table + FROM + pg_catalog.pg_constraint AS pc, + pg_catalog.pg_class AS pgc1 + WHERE + pc.contype = 'f' + AND (pc.conrelid = pgc1.relfilenode OR pc.confrelid = pgc1.relfilenode) + AND pgc1.relname IN ($tables_list) + "; + + //parse our output to find the highest dimension of foreign keys since pc.conkey is stored in an array + $rs = $this->selectSet($sql); + while (!$rs->EOF) { + $arrData = explode(':', $rs->fields['arr_dim']); + $tmpDimension = intval(substr($arrData[1], 0, strlen($arrData[1] - 1))); + $maxDimension = $tmpDimension > $maxDimension ? $tmpDimension : $maxDimension; + $rs->MoveNext(); + } + + //we know the highest index for foreign keys that conkey goes up to, expand for us in an IN query + $cons_str = '( (pfield.attnum = conkey[1] AND cfield.attnum = confkey[1]) '; + for ($i = 2; $i <= $maxDimension; $i++) { + $cons_str .= "OR (pfield.attnum = conkey[{$i}] AND cfield.attnum = confkey[{$i}]) "; + } + $cons_str .= ') '; + + $sql = " + SELECT + pgc1.relname AS p_table, + pgc2.relname AS f_table, + pfield.attname AS p_field, + cfield.attname AS f_field, + pgns1.nspname AS p_schema, + pgns2.nspname AS f_schema + FROM + pg_catalog.pg_constraint AS pc, + pg_catalog.pg_class AS pgc1, + pg_catalog.pg_class AS pgc2, + pg_catalog.pg_attribute AS pfield, + pg_catalog.pg_attribute AS cfield, + (SELECT oid AS ns_id, nspname FROM pg_catalog.pg_namespace WHERE nspname IN ($schema_list) ) AS pgns1, + (SELECT oid AS ns_id, nspname FROM pg_catalog.pg_namespace WHERE nspname IN ($schema_list) ) AS pgns2 + WHERE + pc.contype = 'f' + AND pgc1.relnamespace = pgns1.ns_id + AND pgc2.relnamespace = pgns2.ns_id + AND pc.conrelid = pgc1.relfilenode + AND pc.confrelid = pgc2.relfilenode + AND pfield.attrelid = pc.conrelid + AND cfield.attrelid = pc.confrelid + AND $cons_str + AND pgns1.nspname || '.' || pgc1.relname IN ($schema_tables_list) + AND pgns2.nspname || '.' || pgc2.relname IN ($schema_tables_list) + "; + return $this->selectSet($sql); + } + + /** + * Finds the foreign keys that refer to the specified table + * @param $table The table to find referrers for + * @return A recordset + */ + function getReferrers($table) { + $this->clean($table); + + $status = $this->beginTransaction(); + if ($status != 0) return -1; + + $c_schema = $this->_schema; + $this->clean($c_schema); + + $sql = " + SELECT + pn.nspname, + pl.relname, + pc.conname, + pg_catalog.pg_get_constraintdef(pc.oid) AS consrc + FROM + pg_catalog.pg_constraint pc, + pg_catalog.pg_namespace pn, + pg_catalog.pg_class pl + WHERE + pc.connamespace = pn.oid + AND pc.conrelid = pl.oid + AND pc.contype = 'f' + AND confrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='{$table}' + AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace + WHERE nspname='{$c_schema}')) + ORDER BY 1,2,3 + "; + + return $this->selectSet($sql); + } + + // Domain functions + + /** + * Gets all information for a single domain + * @param $domain The name of the domain to fetch + * @return A recordset + */ + function getDomain($domain) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($domain); + + $sql = " + SELECT + t.typname AS domname, + pg_catalog.format_type(t.typbasetype, t.typtypmod) AS domtype, + t.typnotnull AS domnotnull, + t.typdefault AS domdef, + pg_catalog.pg_get_userbyid(t.typowner) AS domowner, + pg_catalog.obj_description(t.oid, 'pg_type') AS domcomment + FROM + pg_catalog.pg_type t + WHERE + t.typtype = 'd' + AND t.typname = '{$domain}' + AND t.typnamespace = (SELECT oid FROM pg_catalog.pg_namespace + WHERE nspname = '{$c_schema}')"; + + return $this->selectSet($sql); + } + + /** + * Return all domains in current schema. Excludes domain constraints. + * @return All tables, sorted alphabetically + */ + function getDomains() { + $c_schema = $this->_schema; + $this->clean($c_schema); + + $sql = " + SELECT + t.typname AS domname, + pg_catalog.format_type(t.typbasetype, t.typtypmod) AS domtype, + t.typnotnull AS domnotnull, + t.typdefault AS domdef, + pg_catalog.pg_get_userbyid(t.typowner) AS domowner, + pg_catalog.obj_description(t.oid, 'pg_type') AS domcomment + FROM + pg_catalog.pg_type t + WHERE + t.typtype = 'd' + AND t.typnamespace = (SELECT oid FROM pg_catalog.pg_namespace + WHERE nspname='{$c_schema}') + ORDER BY t.typname"; + + return $this->selectSet($sql); + } + + /** + * Get domain constraints + * @param $domain The name of the domain whose constraints to fetch + * @return A recordset + */ + function getDomainConstraints($domain) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($domain); + + $sql = " + SELECT + conname, + contype, + pg_catalog.pg_get_constraintdef(oid, true) AS consrc + FROM + pg_catalog.pg_constraint + WHERE + contypid = ( + SELECT oid FROM pg_catalog.pg_type + WHERE typname='{$domain}' + AND typnamespace = ( + SELECT oid FROM pg_catalog.pg_namespace + WHERE nspname = '{$c_schema}') + ) + ORDER BY conname"; + + return $this->selectSet($sql); + } + + /** + * Creates a domain + * @param $domain The name of the domain to create + * @param $type The base type for the domain + * @param $length Optional type length + * @param $array True for array type, false otherwise + * @param $notnull True for NOT NULL, false otherwise + * @param $default Default value for domain + * @param $check A CHECK constraint if there is one + * @return 0 success + */ + function createDomain($domain, $type, $length, $array, $notnull, $default, $check) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($domain); + + $sql = "CREATE DOMAIN \"{$f_schema}\".\"{$domain}\" AS "; + + if ($length == '') + $sql .= $type; + else { + switch ($type) { + // Have to account for weird placing of length for with/without + // time zone types + case 'timestamp with time zone': + case 'timestamp without time zone': + $qual = substr($type, 9); + $sql .= "timestamp({$length}){$qual}"; + break; + case 'time with time zone': + case 'time without time zone': + $qual = substr($type, 4); + $sql .= "time({$length}){$qual}"; + break; + default: + $sql .= "{$type}({$length})"; + } + } + + // Add array qualifier, if requested + if ($array) $sql .= '[]'; + + if ($notnull) $sql .= ' NOT NULL'; + if ($default != '') $sql .= " DEFAULT {$default}"; + if ($this->hasDomainConstraints() && $check != '') $sql .= " CHECK ({$check})"; + + return $this->execute($sql); + } + + /** + * Alters a domain + * @param $domain The domain to alter + * @param $domdefault The domain default + * @param $domnotnull True for NOT NULL, false otherwise + * @param $domowner The domain owner + * @return 0 success + * @return -1 transaction error + * @return -2 default error + * @return -3 not null error + * @return -4 owner error + */ + function alterDomain($domain, $domdefault, $domnotnull, $domowner) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($domain); + $this->fieldClean($domowner); + + $status = $this->beginTransaction(); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + // Default + if ($domdefault == '') + $sql = "ALTER DOMAIN \"{$f_schema}\".\"{$domain}\" DROP DEFAULT"; + else + $sql = "ALTER DOMAIN \"{$f_schema}\".\"{$domain}\" SET DEFAULT {$domdefault}"; + + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -2; + } + + // NOT NULL + if ($domnotnull) + $sql = "ALTER DOMAIN \"{$f_schema}\".\"{$domain}\" SET NOT NULL"; + else + $sql = "ALTER DOMAIN \"{$f_schema}\".\"{$domain}\" DROP NOT NULL"; + + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -3; + } + + // Owner + $sql = "ALTER DOMAIN \"{$f_schema}\".\"{$domain}\" OWNER TO \"{$domowner}\""; + + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -4; + } + + return $this->endTransaction(); + } + + /** + * Drops a domain. + * @param $domain The name of the domain to drop + * @param $cascade True to cascade drop, false to restrict + * @return 0 success + */ + function dropDomain($domain, $cascade) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($domain); + + $sql = "DROP DOMAIN \"{$f_schema}\".\"{$domain}\""; + if ($cascade) $sql .= " CASCADE"; + + return $this->execute($sql); + } + + /** + * Adds a check constraint to a domain + * @param $domain The domain to which to add the check + * @param $definition The definition of the check + * @param $name (optional) The name to give the check, otherwise default name is assigned + * @return 0 success + */ + function addDomainCheckConstraint($domain, $definition, $name = '') { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($domain); + $this->fieldClean($name); + + $sql = "ALTER DOMAIN \"{$f_schema}\".\"{$domain}\" ADD "; + if ($name != '') $sql .= "CONSTRAINT \"{$name}\" "; + $sql .= "CHECK ({$definition})"; + + return $this->execute($sql); + } + + /** + * Drops a domain constraint + * @param $domain The domain from which to remove the constraint + * @param $constraint The constraint to remove + * @param $cascade True to cascade, false otherwise + * @return 0 success + */ + function dropDomainConstraint($domain, $constraint, $cascade) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($domain); + $this->fieldClean($constraint); + + $sql = "ALTER DOMAIN \"{$f_schema}\".\"{$domain}\" DROP CONSTRAINT \"{$constraint}\""; + if ($cascade) $sql .= " CASCADE"; + + return $this->execute($sql); + } + + // Function functions + + /** + * Returns all details for a particular function + * @param $func The name of the function to retrieve + * @return Function info + */ + function getFunction($function_oid) { + $this->clean($function_oid); + + $sql = " + SELECT + pc.oid AS prooid, proname, pg_catalog.pg_get_userbyid(proowner) AS proowner, + nspname as proschema, lanname as prolanguage, procost, prorows, + pg_catalog.format_type(prorettype, NULL) as proresult, prosrc, + probin, proretset, proisstrict, provolatile, prosecdef, + pg_catalog.oidvectortypes(pc.proargtypes) AS proarguments, + proargnames AS proargnames, + pg_catalog.obj_description(pc.oid, 'pg_proc') AS procomment, + proconfig + FROM + pg_catalog.pg_proc pc, pg_catalog.pg_language pl, + pg_catalog.pg_namespace pn + WHERE + pc.oid = '{$function_oid}'::oid AND pc.prolang = pl.oid + AND pc.pronamespace = pn.oid + "; + + return $this->selectSet($sql); + } + + /** + * Returns a list of all functions in the database + * @param $all If true, will find all available functions, if false just those in search path + * @param $type If not null, will find all functions with return value = type + * + * @return All functions + */ + function getFunctions($all = false, $type = null) { + if ($all) { + $where = 'pg_catalog.pg_function_is_visible(p.oid)'; + $distinct = 'DISTINCT ON (p.proname)'; + + if ($type) { + $where .= " AND p.prorettype = (select oid from pg_catalog.pg_type p where p.typname = 'trigger') "; + } + } + else { + $c_schema = $this->_schema; + $this->clean($c_schema); + $where = "n.nspname = '{$c_schema}'"; + $distinct = ''; + } + + $sql = " + SELECT + {$distinct} + p.oid AS prooid, + p.proname, + p.proretset, + pg_catalog.format_type(p.prorettype, NULL) AS proresult, + pg_catalog.oidvectortypes(p.proargtypes) AS proarguments, + pl.lanname AS prolanguage, + pg_catalog.obj_description(p.oid, 'pg_proc') AS procomment, + p.proname || ' (' || pg_catalog.oidvectortypes(p.proargtypes) || ')' AS proproto, + CASE WHEN p.proretset THEN 'setof ' ELSE '' END || pg_catalog.format_type(p.prorettype, NULL) AS proreturns, + u.usename AS proowner + FROM pg_catalog.pg_proc p + INNER JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace + INNER JOIN pg_catalog.pg_language pl ON pl.oid = p.prolang + LEFT JOIN pg_catalog.pg_user u ON u.usesysid = p.proowner + WHERE NOT p.proisagg + AND {$where} + ORDER BY p.proname, proresult + "; + + return $this->selectSet($sql); + } + + /** + * Returns an array containing a function's properties + * @param $f The array of data for the function + * @return An array containing the properties + */ + function getFunctionProperties($f) { + $temp = array(); + + // Volatility + if ($f['provolatile'] == 'v') + $temp[] = 'VOLATILE'; + elseif ($f['provolatile'] == 'i') + $temp[] = 'IMMUTABLE'; + elseif ($f['provolatile'] == 's') + $temp[] = 'STABLE'; + else + return -1; + + // Null handling + $f['proisstrict'] = $this->phpBool($f['proisstrict']); + if ($f['proisstrict']) + $temp[] = 'RETURNS NULL ON NULL INPUT'; + else + $temp[] = 'CALLED ON NULL INPUT'; + + // Security + $f['prosecdef'] = $this->phpBool($f['prosecdef']); + if ($f['prosecdef']) + $temp[] = 'SECURITY DEFINER'; + else + $temp[] = 'SECURITY INVOKER'; + + return $temp; + } + + /** + * Updates (replaces) a function. + * @param $function_oid The OID of the function + * @param $funcname The name of the function to create + * @param $newname The new name for the function + * @param $args The array of argument types + * @param $returns The return type + * @param $definition The definition for the new function + * @param $language The language the function is written for + * @param $flags An array of optional flags + * @param $setof True if returns a set, false otherwise + * @param $comment The comment on the function + * @return 0 success + * @return -1 transaction error + * @return -3 create function error + * @return -4 comment error + * @return -5 rename function error + * @return -6 alter owner error + * @return -7 alter schema error + */ + function setFunction($function_oid, $funcname, $newname, $args, $returns, $definition, $language, $flags, $setof, $funcown, $newown, $funcschema, $newschema, $cost, $rows, $comment) { + // Begin a transaction + $status = $this->beginTransaction(); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + // Replace the existing function + $status = $this->createFunction($funcname, $args, $returns, $definition, $language, $flags, $setof, $cost, $rows, $comment, true); + if ($status != 0) { + $this->rollbackTransaction(); + return $status; + } + + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + + // Rename the function, if necessary + $this->fieldClean($newname); + /* $funcname is escaped in createFunction */ + if ($funcname != $newname) { + $sql = "ALTER FUNCTION \"{$f_schema}\".\"{$funcname}\"({$args}) RENAME TO \"{$newname}\""; + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -5; + } + + $funcname = $newname; + } + + // Alter the owner, if necessary + if ($this->hasFunctionAlterOwner()) { + $this->fieldClean($newown); + if ($funcown != $newown) { + $sql = "ALTER FUNCTION \"{$f_schema}\".\"{$funcname}\"({$args}) OWNER TO \"{$newown}\""; + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -6; + } + } + + } + + // Alter the schema, if necessary + if ($this->hasFunctionAlterSchema()) { + $this->fieldClean($newschema); + /* $funcschema is escaped in createFunction */ + if ($funcschema != $newschema) { + $sql = "ALTER FUNCTION \"{$f_schema}\".\"{$funcname}\"({$args}) SET SCHEMA \"{$newschema}\""; + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -7; + } + } + } + + return $this->endTransaction(); + } + + /** + * Creates a new function. + * @param $funcname The name of the function to create + * @param $args A comma separated string of types + * @param $returns The return type + * @param $definition The definition for the new function + * @param $language The language the function is written for + * @param $flags An array of optional flags + * @param $setof True if it returns a set, false otherwise + * @param $rows number of rows planner should estimate will be returned + * @param $cost cost the planner should use in the function execution step + * @param $comment Comment for the function + * @param $replace (optional) True if OR REPLACE, false for normal + * @return 0 success + * @return -3 create function failed + * @return -4 set comment failed + */ + function createFunction($funcname, $args, $returns, $definition, $language, $flags, $setof, $cost, $rows, $comment, $replace = false) { + + // Begin a transaction + $status = $this->beginTransaction(); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + $this->fieldClean($funcname); + $this->clean($args); + $this->fieldClean($language); + $this->arrayClean($flags); + $this->clean($cost); + $this->clean($rows); + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + + $sql = "CREATE"; + if ($replace) $sql .= " OR REPLACE"; + $sql .= " FUNCTION \"{$f_schema}\".\"{$funcname}\" ("; + + if ($args != '') + $sql .= $args; + + // For some reason, the returns field cannot have quotes... + $sql .= ") RETURNS "; + if ($setof) $sql .= "SETOF "; + $sql .= "{$returns} AS "; + + if (is_array($definition)) { + $this->arrayClean($definition); + $sql .= "'" . $definition[0] . "'"; + if ($definition[1]) { + $sql .= ",'" . $definition[1] . "'"; + } + } else { + $this->clean($definition); + $sql .= "'" . $definition . "'"; + } + + $sql .= " LANGUAGE \"{$language}\""; + + // Add costs + if (!empty($cost)) + $sql .= " COST {$cost}"; + + if ($rows <> 0 ){ + $sql .= " ROWS {$rows}"; + } + + // Add flags + foreach ($flags as $v) { + // Skip default flags + if ($v == '') continue; + else $sql .= "\n{$v}"; + } + + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -3; + } + + /* set the comment */ + $status = $this->setComment('FUNCTION', "\"{$funcname}\"({$args})", null, $comment); + if ($status != 0) { + $this->rollbackTransaction(); + return -4; + } + + return $this->endTransaction(); + } + + /** + * Drops a function. + * @param $function_oid The OID of the function to drop + * @param $cascade True to cascade drop, false to restrict + * @return 0 success + */ + function dropFunction($function_oid, $cascade) { + // Function comes in with $object as function OID + $fn = $this->getFunction($function_oid); + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($fn->fields['proname']); + + $sql = "DROP FUNCTION \"{$f_schema}\".\"{$fn->fields['proname']}\"({$fn->fields['proarguments']})"; + if ($cascade) $sql .= " CASCADE"; + + return $this->execute($sql); + } + + // Type functions + + /** + * Returns all details for a particular type + * @param $typname The name of the view to retrieve + * @return Type info + */ + function getType($typname) { + $this->clean($typname); + + $sql = "SELECT typtype, typbyval, typname, typinput AS typin, typoutput AS typout, typlen, typalign + FROM pg_type WHERE typname='{$typname}'"; + + return $this->selectSet($sql); + } + + /** + * Returns a list of all types in the database + * @param $all If true, will find all available types, if false just those in search path + * @param $tabletypes If true, will include table types + * @param $domains If true, will include domains + * @return A recordet + */ + function getTypes($all = false, $tabletypes = false, $domains = false) { + if ($all) + $where = '1 = 1'; + else { + $c_schema = $this->_schema; + $this->clean($c_schema); + $where = "n.nspname = '{$c_schema}'"; + } + // Never show system table types + $where2 = "AND c.relnamespace NOT IN (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname LIKE 'pg@_%' ESCAPE '@')"; + + // Create type filter + $tqry = "'c'"; + if ($tabletypes) + $tqry .= ", 'r', 'v'"; + + // Create domain filter + if (!$domains) + $where .= " AND t.typtype != 'd'"; + + $sql = "SELECT + t.typname AS basename, + pg_catalog.format_type(t.oid, NULL) AS typname, + pu.usename AS typowner, + t.typtype, + pg_catalog.obj_description(t.oid, 'pg_type') AS typcomment + FROM (pg_catalog.pg_type t + LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace) + LEFT JOIN pg_catalog.pg_user pu ON t.typowner = pu.usesysid + WHERE (t.typrelid = 0 OR (SELECT c.relkind IN ({$tqry}) FROM pg_catalog.pg_class c WHERE c.oid = t.typrelid {$where2})) + AND t.typname !~ '^_' + AND {$where} + ORDER BY typname + "; + + return $this->selectSet($sql); + } + + /** + * Creates a new type + * @param ... + * @return 0 success + */ + function createType($typname, $typin, $typout, $typlen, $typdef, + $typelem, $typdelim, $typbyval, $typalign, $typstorage) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($typname); + $this->fieldClean($typin); + $this->fieldClean($typout); + + $sql = " + CREATE TYPE \"{$f_schema}\".\"{$typname}\" ( + INPUT = \"{$typin}\", + OUTPUT = \"{$typout}\", + INTERNALLENGTH = {$typlen}"; + if ($typdef != '') $sql .= ", DEFAULT = {$typdef}"; + if ($typelem != '') $sql .= ", ELEMENT = {$typelem}"; + if ($typdelim != '') $sql .= ", DELIMITER = {$typdelim}"; + if ($typbyval) $sql .= ", PASSEDBYVALUE, "; + if ($typalign != '') $sql .= ", ALIGNMENT = {$typalign}"; + if ($typstorage != '') $sql .= ", STORAGE = {$typstorage}"; + + $sql .= ")"; + + return $this->execute($sql); + } + + /** + * Drops a type. + * @param $typname The name of the type to drop + * @param $cascade True to cascade drop, false to restrict + * @return 0 success + */ + function dropType($typname, $cascade) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($typname); + + $sql = "DROP TYPE \"{$f_schema}\".\"{$typname}\""; + if ($cascade) $sql .= " CASCADE"; + + return $this->execute($sql); + } + + /** + * Creates a new enum type in the database + * @param $name The name of the type + * @param $values An array of values + * @param $typcomment Type comment + * @return 0 success + * @return -1 transaction error + * @return -2 no values supplied + */ + function createEnumType($name, $values, $typcomment) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($name); + + if (empty($values)) return -2; + + $status = $this->beginTransaction(); + if ($status != 0) return -1; + + $values = array_unique($values); + + $nbval = count($values); + + for ($i = 0; $i < $nbval; $i++) + $this->clean($values[$i]); + + $sql = "CREATE TYPE \"{$f_schema}\".\"{$name}\" AS ENUM ('"; + $sql.= implode("','", $values); + $sql .= "')"; + + $status = $this->execute($sql); + if ($status) { + $this->rollbackTransaction(); + return -1; + } + + if ($typcomment != '') { + $status = $this->setComment('TYPE', $name, '', $typcomment, true); + if ($status) { + $this->rollbackTransaction(); + return -1; + } + } + + return $this->endTransaction(); + + } + + /** + * Get defined values for a given enum + * @return A recordset + */ + function getEnumValues($name) { + $this->clean($name); + + $sql = "SELECT enumlabel AS enumval + FROM pg_catalog.pg_type t JOIN pg_catalog.pg_enum e ON (t.oid=e.enumtypid) + WHERE t.typname = '{$name}' ORDER BY e.oid"; + return $this->selectSet($sql); + } + + /** + * Creates a new composite type in the database + * @param $name The name of the type + * @param $fields The number of fields + * @param $field An array of field names + * @param $type An array of field types + * @param $array An array of '' or '[]' for each type if it's an array or not + * @param $length An array of field lengths + * @param $colcomment An array of comments + * @param $typcomment Type comment + * @return 0 success + * @return -1 no fields supplied + */ + function createCompositeType($name, $fields, $field, $type, $array, $length, $colcomment, $typcomment) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($name); + + $status = $this->beginTransaction(); + if ($status != 0) return -1; + + $found = false; + $first = true; + $comment_sql = ''; // Accumulate comments for the columns + $sql = "CREATE TYPE \"{$f_schema}\".\"{$name}\" AS ("; + for ($i = 0; $i < $fields; $i++) { + $this->fieldClean($field[$i]); + $this->clean($type[$i]); + $this->clean($length[$i]); + $this->clean($colcomment[$i]); + + // Skip blank columns - for user convenience + if ($field[$i] == '' || $type[$i] == '') continue; + // If not the first column, add a comma + if (!$first) $sql .= ", "; + else $first = false; + + switch ($type[$i]) { + // Have to account for weird placing of length for with/without + // time zone types + case 'timestamp with time zone': + case 'timestamp without time zone': + $qual = substr($type[$i], 9); + $sql .= "\"{$field[$i]}\" timestamp"; + if ($length[$i] != '') $sql .= "({$length[$i]})"; + $sql .= $qual; + break; + case 'time with time zone': + case 'time without time zone': + $qual = substr($type[$i], 4); + $sql .= "\"{$field[$i]}\" time"; + if ($length[$i] != '') $sql .= "({$length[$i]})"; + $sql .= $qual; + break; + default: + $sql .= "\"{$field[$i]}\" {$type[$i]}"; + if ($length[$i] != '') $sql .= "({$length[$i]})"; + } + // Add array qualifier if necessary + if ($array[$i] == '[]') $sql .= '[]'; + + if ($colcomment[$i] != '') $comment_sql .= "COMMENT ON COLUMN \"{$f_schema}\".\"{$name}\".\"{$field[$i]}\" IS '{$colcomment[$i]}';\n"; + + $found = true; + } + + if (!$found) return -1; + + $sql .= ")"; + + $status = $this->execute($sql); + if ($status) { + $this->rollbackTransaction(); + return -1; + } + + if ($typcomment != '') { + $status = $this->setComment('TYPE', $name, '', $typcomment, true); + if ($status) { + $this->rollbackTransaction(); + return -1; + } + } + + if ($comment_sql != '') { + $status = $this->execute($comment_sql); + if ($status) { + $this->rollbackTransaction(); + return -1; + } + } + return $this->endTransaction(); + } + + /** + * Returns a list of all casts in the database + * @return All casts + */ + function getCasts() { + global $conf; + + if ($conf['show_system']) + $where = ''; + else + $where = ' + AND n1.nspname NOT LIKE $$pg\_%$$ + AND n2.nspname NOT LIKE $$pg\_%$$ + AND n3.nspname NOT LIKE $$pg\_%$$ + '; + + $sql = " + SELECT + c.castsource::pg_catalog.regtype AS castsource, + c.casttarget::pg_catalog.regtype AS casttarget, + CASE WHEN c.castfunc=0 THEN NULL + ELSE c.castfunc::pg_catalog.regprocedure END AS castfunc, + c.castcontext, + obj_description(c.oid, 'pg_cast') as castcomment + FROM + (pg_catalog.pg_cast c LEFT JOIN pg_catalog.pg_proc p ON c.castfunc=p.oid JOIN pg_catalog.pg_namespace n3 ON p.pronamespace=n3.oid), + pg_catalog.pg_type t1, + pg_catalog.pg_type t2, + pg_catalog.pg_namespace n1, + pg_catalog.pg_namespace n2 + WHERE + c.castsource=t1.oid + AND c.casttarget=t2.oid + AND t1.typnamespace=n1.oid + AND t2.typnamespace=n2.oid + {$where} + ORDER BY 1, 2 + "; + + return $this->selectSet($sql); + } + + /** + * Returns a list of all conversions in the database + * @return All conversions + */ + function getConversions() { + $c_schema = $this->_schema; + $this->clean($c_schema); + $sql = " + SELECT + c.conname, + pg_catalog.pg_encoding_to_char(c.conforencoding) AS conforencoding, + pg_catalog.pg_encoding_to_char(c.contoencoding) AS contoencoding, + c.condefault, + pg_catalog.obj_description(c.oid, 'pg_conversion') AS concomment + FROM pg_catalog.pg_conversion c, pg_catalog.pg_namespace n + WHERE n.oid = c.connamespace + AND n.nspname='{$c_schema}' + ORDER BY 1; + "; + + return $this->selectSet($sql); + } + + // Rule functions + + /** + * Returns a list of all rules on a table OR view + * @param $table The table to find rules for + * @return A recordset + */ + function getRules($table) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + $sql = " + SELECT * + FROM pg_catalog.pg_rules + WHERE + schemaname='{$c_schema}' AND tablename='{$table}' + ORDER BY rulename + "; + + return $this->selectSet($sql); + } + + /** + * Edits a rule on a table OR view + * @param $name The name of the new rule + * @param $event SELECT, INSERT, UPDATE or DELETE + * @param $table Table on which to create the rule + * @param $where When to execute the rule, '' indicates always + * @param $instead True if an INSTEAD rule, false otherwise + * @param $type NOTHING for a do nothing rule, SOMETHING to use given action + * @param $action The action to take + * @return 0 success + * @return -1 invalid event + */ + function setRule($name, $event, $table, $where, $instead, $type, $action) { + return $this->createRule($name, $event, $table, $where, $instead, $type, $action, true); + } + + /** + * Creates a rule + * @param $name The name of the new rule + * @param $event SELECT, INSERT, UPDATE or DELETE + * @param $table Table on which to create the rule + * @param $where When to execute the rule, '' indicates always + * @param $instead True if an INSTEAD rule, false otherwise + * @param $type NOTHING for a do nothing rule, SOMETHING to use given action + * @param $action The action to take + * @param $replace (optional) True to replace existing rule, false otherwise + * @return 0 success + * @return -1 invalid event + */ + function createRule($name, $event, $table, $where, $instead, $type, $action, $replace = false) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($name); + $this->fieldClean($table); + if (!in_array($event, $this->rule_events)) return -1; + + $sql = "CREATE"; + if ($replace) $sql .= " OR REPLACE"; + $sql .= " RULE \"{$name}\" AS ON {$event} TO \"{$f_schema}\".\"{$table}\""; + // Can't escape WHERE clause + if ($where != '') $sql .= " WHERE {$where}"; + $sql .= " DO"; + if ($instead) $sql .= " INSTEAD"; + if ($type == 'NOTHING') + $sql .= " NOTHING"; + else $sql .= " ({$action})"; + + return $this->execute($sql); + } + + /** + * Removes a rule from a table OR view + * @param $rule The rule to drop + * @param $relation The relation from which to drop + * @param $cascade True to cascade drop, false to restrict + * @return 0 success + */ + function dropRule($rule, $relation, $cascade) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($rule); + $this->fieldClean($relation); + + $sql = "DROP RULE \"{$rule}\" ON \"{$f_schema}\".\"{$relation}\""; + if ($cascade) $sql .= " CASCADE"; + + return $this->execute($sql); + } + + // Trigger functions + + /** + * Grabs a single trigger + * @param $table The name of a table whose triggers to retrieve + * @param $trigger The name of the trigger to retrieve + * @return A recordset + */ + function getTrigger($table, $trigger) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + $this->clean($trigger); + + $sql = " + SELECT * FROM pg_catalog.pg_trigger t, pg_catalog.pg_class c + WHERE t.tgrelid=c.oid AND c.relname='{$table}' AND t.tgname='{$trigger}' + AND c.relnamespace=( + SELECT oid FROM pg_catalog.pg_namespace + WHERE nspname='{$c_schema}')"; + + return $this->selectSet($sql); + } + + /** + * Grabs a list of triggers on a table + * @param $table The name of a table whose triggers to retrieve + * @return A recordset + */ + function getTriggers($table = '') { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + $sql = "SELECT + t.tgname, pg_catalog.pg_get_triggerdef(t.oid) AS tgdef, + CASE WHEN t.tgenabled = 'D' THEN FALSE ELSE TRUE END AS tgenabled, p.oid AS prooid, + p.proname || ' (' || pg_catalog.oidvectortypes(p.proargtypes) || ')' AS proproto, + ns.nspname AS pronamespace + FROM pg_catalog.pg_trigger t, pg_catalog.pg_proc p, pg_catalog.pg_namespace ns + WHERE t.tgrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='{$table}' + AND relnamespace=(SELECT oid FROM pg_catalog.pg_namespace WHERE nspname='{$c_schema}')) + AND ( tgconstraint = 0 OR NOT EXISTS + (SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c + ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) + WHERE d.classid = t.tableoid AND d.objid = t.oid AND d.deptype = 'i' AND c.contype = 'f')) + AND p.oid=t.tgfoid + AND p.pronamespace = ns.oid"; + + return $this->selectSet($sql); + } + + /** + * A helper function for getTriggers that translates + * an array of attribute numbers to an array of field names. + * @param $trigger An array containing fields from the trigger table + * @return The trigger definition string + */ + function getTriggerDef($trigger) { + + $this->fieldArrayClean($trigger); + // Constants to figure out tgtype + if (!defined('TRIGGER_TYPE_ROW')) define ('TRIGGER_TYPE_ROW', (1 << 0)); + if (!defined('TRIGGER_TYPE_BEFORE')) define ('TRIGGER_TYPE_BEFORE', (1 << 1)); + if (!defined('TRIGGER_TYPE_INSERT')) define ('TRIGGER_TYPE_INSERT', (1 << 2)); + if (!defined('TRIGGER_TYPE_DELETE')) define ('TRIGGER_TYPE_DELETE', (1 << 3)); + if (!defined('TRIGGER_TYPE_UPDATE')) define ('TRIGGER_TYPE_UPDATE', (1 << 4)); + + $trigger['tgisconstraint'] = $this->phpBool($trigger['tgisconstraint']); + $trigger['tgdeferrable'] = $this->phpBool($trigger['tgdeferrable']); + $trigger['tginitdeferred'] = $this->phpBool($trigger['tginitdeferred']); + + // Constraint trigger or normal trigger + if ($trigger['tgisconstraint']) + $tgdef = 'CREATE CONSTRAINT TRIGGER '; + else + $tgdef = 'CREATE TRIGGER '; + + $tgdef .= "\"{$trigger['tgname']}\" "; + + // Trigger type + $findx = 0; + if (($trigger['tgtype'] & TRIGGER_TYPE_BEFORE) == TRIGGER_TYPE_BEFORE) + $tgdef .= 'BEFORE'; + else + $tgdef .= 'AFTER'; + + if (($trigger['tgtype'] & TRIGGER_TYPE_INSERT) == TRIGGER_TYPE_INSERT) { + $tgdef .= ' INSERT'; + $findx++; + } + if (($trigger['tgtype'] & TRIGGER_TYPE_DELETE) == TRIGGER_TYPE_DELETE) { + if ($findx > 0) + $tgdef .= ' OR DELETE'; + else { + $tgdef .= ' DELETE'; + $findx++; + } + } + if (($trigger['tgtype'] & TRIGGER_TYPE_UPDATE) == TRIGGER_TYPE_UPDATE) { + if ($findx > 0) + $tgdef .= ' OR UPDATE'; + else + $tgdef .= ' UPDATE'; + } + + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + // Table name + $tgdef .= " ON \"{$f_schema}\".\"{$trigger['relname']}\" "; + + // Deferrability + if ($trigger['tgisconstraint']) { + if ($trigger['tgconstrrelid'] != 0) { + // Assume constrelname is not null + $tgdef .= " FROM \"{$trigger['tgconstrrelname']}\" "; + } + if (!$trigger['tgdeferrable']) + $tgdef .= 'NOT '; + $tgdef .= 'DEFERRABLE INITIALLY '; + if ($trigger['tginitdeferred']) + $tgdef .= 'DEFERRED '; + else + $tgdef .= 'IMMEDIATE '; + } + + // Row or statement + if ($trigger['tgtype'] & TRIGGER_TYPE_ROW == TRIGGER_TYPE_ROW) + $tgdef .= 'FOR EACH ROW '; + else + $tgdef .= 'FOR EACH STATEMENT '; + + // Execute procedure + $tgdef .= "EXECUTE PROCEDURE \"{$trigger['tgfname']}\"("; + + // Parameters + // Escape null characters + $v = addCSlashes($trigger['tgargs'], "\0"); + // Split on escaped null characters + $params = explode('\\000', $v); + for ($findx = 0; $findx < $trigger['tgnargs']; $findx++) { + $param = "'" . str_replace('\'', '\\\'', $params[$findx]) . "'"; + $tgdef .= $param; + if ($findx < ($trigger['tgnargs'] - 1)) + $tgdef .= ', '; + } + + // Finish it off + $tgdef .= ')'; + + return $tgdef; + } + + /** + * Returns a list of all functions that can be used in triggers + */ + function getTriggerFunctions() { + return $this->getFunctions(true, 'trigger'); + } + + /** + * Creates a trigger + * @param $tgname The name of the trigger to create + * @param $table The name of the table + * @param $tgproc The function to execute + * @param $tgtime BEFORE or AFTER + * @param $tgevent Event + * @param $tgargs The function arguments + * @return 0 success + */ + function createTrigger($tgname, $table, $tgproc, $tgtime, $tgevent, $tgfrequency, $tgargs) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($tgname); + $this->fieldClean($table); + $this->fieldClean($tgproc); + + /* No Statement Level Triggers in PostgreSQL (by now) */ + $sql = "CREATE TRIGGER \"{$tgname}\" {$tgtime} + {$tgevent} ON \"{$f_schema}\".\"{$table}\" + FOR EACH {$tgfrequency} EXECUTE PROCEDURE \"{$tgproc}\"({$tgargs})"; + + return $this->execute($sql); + } + + /** + * Alters a trigger + * @param $table The name of the table containing the trigger + * @param $trigger The name of the trigger to alter + * @param $name The new name for the trigger + * @return 0 success + */ + function alterTrigger($table, $trigger, $name) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + $this->fieldClean($trigger); + $this->fieldClean($name); + + $sql = "ALTER TRIGGER \"{$trigger}\" ON \"{$f_schema}\".\"{$table}\" RENAME TO \"{$name}\""; + + return $this->execute($sql); + } + + /** + * Drops a trigger + * @param $tgname The name of the trigger to drop + * @param $table The table from which to drop the trigger + * @param $cascade True to cascade drop, false to restrict + * @return 0 success + */ + function dropTrigger($tgname, $table, $cascade) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($tgname); + $this->fieldClean($table); + + $sql = "DROP TRIGGER \"{$tgname}\" ON \"{$f_schema}\".\"{$table}\""; + if ($cascade) $sql .= " CASCADE"; + + return $this->execute($sql); + } + + /** + * Enables a trigger + * @param $tgname The name of the trigger to enable + * @param $table The table in which to enable the trigger + * @return 0 success + */ + function enableTrigger($tgname, $table) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($tgname); + $this->fieldClean($table); + + $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" ENABLE TRIGGER \"{$tgname}\""; + + return $this->execute($sql); + } + + /** + * Disables a trigger + * @param $tgname The name of the trigger to disable + * @param $table The table in which to disable the trigger + * @return 0 success + */ + function disableTrigger($tgname, $table) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($tgname); + $this->fieldClean($table); + + $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" DISABLE TRIGGER \"{$tgname}\""; + + return $this->execute($sql); + } + + // Operator functions + + /** + * Returns a list of all operators in the database + * @return All operators + */ + function getOperators() { + $c_schema = $this->_schema; + $this->clean($c_schema); + // We stick with the subselects here, as you cannot ORDER BY a regtype + $sql = " + SELECT + po.oid, po.oprname, + (SELECT pg_catalog.format_type(oid, NULL) FROM pg_catalog.pg_type pt WHERE pt.oid=po.oprleft) AS oprleftname, + (SELECT pg_catalog.format_type(oid, NULL) FROM pg_catalog.pg_type pt WHERE pt.oid=po.oprright) AS oprrightname, + po.oprresult::pg_catalog.regtype AS resultname, + pg_catalog.obj_description(po.oid, 'pg_operator') AS oprcomment + FROM + pg_catalog.pg_operator po + WHERE + po.oprnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname='{$c_schema}') + ORDER BY + po.oprname, oprleftname, oprrightname + "; + + return $this->selectSet($sql); + } + + /** + * Returns all details for a particular operator + * @param $operator_oid The oid of the operator + * @return Function info + */ + function getOperator($operator_oid) { + $this->clean($operator_oid); + + $sql = " + SELECT + po.oid, po.oprname, + oprleft::pg_catalog.regtype AS oprleftname, + oprright::pg_catalog.regtype AS oprrightname, + oprresult::pg_catalog.regtype AS resultname, + po.oprcanhash, + oprcanmerge, + oprcom::pg_catalog.regoperator AS oprcom, + oprnegate::pg_catalog.regoperator AS oprnegate, + po.oprcode::pg_catalog.regproc AS oprcode, + po.oprrest::pg_catalog.regproc AS oprrest, + po.oprjoin::pg_catalog.regproc AS oprjoin + FROM + pg_catalog.pg_operator po + WHERE + po.oid='{$operator_oid}' + "; + + return $this->selectSet($sql); + } + + /** + * Drops an operator + * @param $operator_oid The OID of the operator to drop + * @param $cascade True to cascade drop, false to restrict + * @return 0 success + */ + function dropOperator($operator_oid, $cascade) { + // Function comes in with $object as operator OID + $opr = $this->getOperator($operator_oid); + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($opr->fields['oprname']); + + $sql = "DROP OPERATOR \"{$f_schema}\".{$opr->fields['oprname']} ("; + // Quoting or formatting here??? + if ($opr->fields['oprleftname'] !== null) $sql .= $opr->fields['oprleftname'] . ', '; + else $sql .= "NONE, "; + if ($opr->fields['oprrightname'] !== null) $sql .= $opr->fields['oprrightname'] . ')'; + else $sql .= "NONE)"; + + if ($cascade) $sql .= " CASCADE"; + + return $this->execute($sql); + } + + // Operator Class functions + + /** + * Gets all opclasses + * + * @return A recordset + */ + + function getOpClasses() { + $c_schema = $this->_schema; + $this->clean($c_schema); + $sql = " + SELECT + pa.amname, po.opcname, + po.opcintype::pg_catalog.regtype AS opcintype, + po.opcdefault, + pg_catalog.obj_description(po.oid, 'pg_opclass') AS opccomment + FROM + pg_catalog.pg_opclass po, pg_catalog.pg_am pa, pg_catalog.pg_namespace pn + WHERE + po.opcmethod=pa.oid + AND po.opcnamespace=pn.oid + AND pn.nspname='{$c_schema}' + ORDER BY 1,2 + "; + + return $this->selectSet($sql); + } + + // FTS functions + + /** + * Creates a new FTS configuration. + * @param string $cfgname The name of the FTS configuration to create + * @param string $parser The parser to be used in new FTS configuration + * @param string $locale Locale of the FTS configuration + * @param string $template The existing FTS configuration to be used as template for the new one + * @param string $withmap Should we copy whole map of existing FTS configuration to the new one + * @param string $makeDefault Should this configuration be the default for locale given + * @param string $comment If omitted, defaults to nothing + * + * @return 0 success + */ + function createFtsConfiguration($cfgname, $parser = '', $template = '', $comment = '') { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($cfgname); + + $sql = "CREATE TEXT SEARCH CONFIGURATION \"{$f_schema}\".\"{$cfgname}\" ("; + if ($parser != '') { + $this->fieldClean($parser['schema']); + $this->fieldClean($parser['parser']); + $parser = "\"{$parser['schema']}\".\"{$parser['parser']}\""; + $sql .= " PARSER = {$parser}"; + } + if ($template != '') { + $this->fieldClean($template['schema']); + $this->fieldClean($template['name']); + $sql .= " COPY = \"{$template['schema']}\".\"{$template['name']}\""; + } + $sql .= ")"; + + if ($comment != '') { + $status = $this->beginTransaction(); + if ($status != 0) return -1; + } + + // Create the FTS configuration + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + // Set the comment + if ($comment != '') { + $status = $this->setComment('TEXT SEARCH CONFIGURATION', $cfgname, '', $comment); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + return $this->endTransaction(); + } + + return 0; + } + + /** + * Returns available FTS configurations + * @param $all if false, returns schema qualified FTS confs + * + * @return A recordset + */ + function getFtsConfigurations($all = true) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $sql = " + SELECT + n.nspname as schema, + c.cfgname as name, + pg_catalog.obj_description(c.oid, 'pg_ts_config') as comment + FROM + pg_catalog.pg_ts_config c + JOIN pg_catalog.pg_namespace n ON n.oid = c.cfgnamespace + WHERE + pg_catalog.pg_ts_config_is_visible(c.oid)"; + + if (!$all) + $sql.= " AND n.nspname='{$c_schema}'\n"; + + $sql.= "ORDER BY name"; + + return $this->selectSet($sql); + } + + /** + * Return all information related to a FTS configuration + * @param $ftscfg The name of the FTS configuration + * + * @return FTS configuration information + */ + function getFtsConfigurationByName($ftscfg) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($ftscfg); + $sql = " + SELECT + n.nspname as schema, + c.cfgname as name, + p.prsname as parser, + c.cfgparser as parser_id, + pg_catalog.obj_description(c.oid, 'pg_ts_config') as comment + FROM pg_catalog.pg_ts_config c + LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.cfgnamespace + LEFT JOIN pg_catalog.pg_ts_parser p ON p.oid = c.cfgparser + WHERE pg_catalog.pg_ts_config_is_visible(c.oid) + AND c.cfgname = '{$ftscfg}' + AND n.nspname='{$c_schema}'"; + + return $this->selectSet($sql); + } + + /** + * Returns the map of FTS configuration given + * (list of mappings (tokens) and their processing dictionaries) + * @param string $ftscfg Name of the FTS configuration + * + * @return RecordSet + */ + function getFtsConfigurationMap($ftscfg) { + + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->fieldClean($ftscfg); + + $oidSet = $this->selectSet("SELECT c.oid + FROM pg_catalog.pg_ts_config AS c + LEFT JOIN pg_catalog.pg_namespace n ON (n.oid = c.cfgnamespace) + WHERE c.cfgname = '{$ftscfg}' + AND n.nspname='{$c_schema}'"); + + $oid = $oidSet->fields['oid']; + + $sql = " + SELECT + (SELECT t.alias FROM pg_catalog.ts_token_type(c.cfgparser) AS t WHERE t.tokid = m.maptokentype) AS name, + (SELECT t.description FROM pg_catalog.ts_token_type(c.cfgparser) AS t WHERE t.tokid = m.maptokentype) AS description, + c.cfgname AS cfgname, n.nspname ||'.'|| d.dictname as dictionaries + FROM + pg_catalog.pg_ts_config AS c, pg_catalog.pg_ts_config_map AS m, pg_catalog.pg_ts_dict d, + pg_catalog.pg_namespace n + WHERE + c.oid = {$oid} + AND m.mapcfg = c.oid + AND m.mapdict = d.oid + AND d.dictnamespace = n.oid + ORDER BY name + "; + return $this->selectSet($sql); + } + + /** + * Returns FTS parsers available + * @param $all if false, return only Parsers from the current schema + * + * @return RecordSet + */ + function getFtsParsers($all = true) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $sql = " + SELECT + n.nspname as schema, + p.prsname as name, + pg_catalog.obj_description(p.oid, 'pg_ts_parser') as comment + FROM pg_catalog.pg_ts_parser p + LEFT JOIN pg_catalog.pg_namespace n ON (n.oid = p.prsnamespace) + WHERE pg_catalog.pg_ts_parser_is_visible(p.oid)"; + + if (!$all) + $sql.= " AND n.nspname='{$c_schema}'\n"; + + $sql.= "ORDER BY name"; + + return $this->selectSet($sql); + } + + /** + * Returns FTS dictionaries available + * @param $all if false, return only Dics from the current schema + * + * @returns RecordSet + */ + function getFtsDictionaries($all = true) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $sql = " + SELECT + n.nspname as schema, d.dictname as name, + pg_catalog.obj_description(d.oid, 'pg_ts_dict') as comment + FROM pg_catalog.pg_ts_dict d + LEFT JOIN pg_catalog.pg_namespace n ON n.oid = d.dictnamespace + WHERE pg_catalog.pg_ts_dict_is_visible(d.oid)"; + + if (!$all) + $sql.= " AND n.nspname='{$c_schema}'\n"; + + $sql.= "ORDER BY name;"; + + return $this->selectSet($sql); + } + + /** + * Returns all FTS dictionary templates available + */ + function getFtsDictionaryTemplates() { + + $sql = " + SELECT + n.nspname as schema, + t.tmplname as name, + ( SELECT COALESCE(np.nspname, '(null)')::pg_catalog.text || '.' || p.proname + FROM pg_catalog.pg_proc p + LEFT JOIN pg_catalog.pg_namespace np ON np.oid = p.pronamespace + WHERE t.tmplinit = p.oid ) AS init, + ( SELECT COALESCE(np.nspname, '(null)')::pg_catalog.text || '.' || p.proname + FROM pg_catalog.pg_proc p + LEFT JOIN pg_catalog.pg_namespace np ON np.oid = p.pronamespace + WHERE t.tmpllexize = p.oid ) AS lexize, + pg_catalog.obj_description(t.oid, 'pg_ts_template') as comment + FROM pg_catalog.pg_ts_template t + LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.tmplnamespace + WHERE pg_catalog.pg_ts_template_is_visible(t.oid) + ORDER BY name;"; + + return $this->selectSet($sql); + } + + /** + * Drops FTS coniguration + * @param $ftscfg The configuration's name + * @param $cascade Cascade to dependenced objects + * + * @return 0 on success + */ + function dropFtsConfiguration($ftscfg, $cascade) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($ftscfg); + + $sql = "DROP TEXT SEARCH CONFIGURATION \"{$f_schema}\".\"{$ftscfg}\""; + if ($cascade) $sql .= ' CASCADE'; + + return $this->execute($sql); + } + + /** + * Drops FTS dictionary + * @param $ftsdict The dico's name + * @param $cascade Cascade to dependenced objects + * + * @todo Support of dictionary templates dropping + * @return 0 on success + */ + function dropFtsDictionary($ftsdict, $cascade) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($ftsdict); + + $sql = "DROP TEXT SEARCH DICTIONARY"; + $sql .= " \"{$f_schema}\".\"{$ftsdict}\""; + if ($cascade) $sql .= ' CASCADE'; + + return $this->execute($sql); + } + + /** + * Alters FTS configuration + * @param $cfgname The conf's name + * @param $comment A comment on for the conf + * @param $name The new conf name + * + * @return 0 on success + */ + function updateFtsConfiguration($cfgname, $comment, $name) { + + $status = $this->beginTransaction(); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + $this->fieldClean($cfgname); + + $status = $this->setComment('TEXT SEARCH CONFIGURATION', $cfgname, '', $comment); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + // Only if the name has changed + if ($name != $cfgname) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($name); + + $sql = "ALTER TEXT SEARCH CONFIGURATION \"{$f_schema}\".\"{$cfgname}\" RENAME TO \"{$name}\""; + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + } + + return $this->endTransaction(); + } + + /** + * Creates a new FTS dictionary or FTS dictionary template. + * @param string $dictname The name of the FTS dictionary to create + * @param boolean $isTemplate Flag whether we create usual dictionary or dictionary template + * @param string $template The existing FTS dictionary to be used as template for the new one + * @param string $lexize The name of the function, which does transformation of input word + * @param string $init The name of the function, which initializes dictionary + * @param string $option Usually, it stores various options required for the dictionary + * @param string $comment If omitted, defaults to nothing + * + * @return 0 success + */ + function createFtsDictionary($dictname, $isTemplate = false, $template = '', $lexize = '', + $init = '', $option = '', $comment = '') { + + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($dictname); + $this->fieldClean($template); + $this->fieldClean($lexize); + $this->fieldClean($init); + $this->fieldClean($option); + + $sql = "CREATE TEXT SEARCH"; + if ($isTemplate) { + $sql .= " TEMPLATE \"{$f_schema}\".\"{$dictname}\" ("; + if ($lexize != '') $sql .= " LEXIZE = {$lexize}"; + if ($init != '') $sql .= ", INIT = {$init}"; + $sql .= ")"; + $whatToComment = 'TEXT SEARCH TEMPLATE'; + } else { + $sql .= " DICTIONARY \"{$f_schema}\".\"{$dictname}\" ("; + if ($template != '') { + $this->fieldClean($template['schema']); + $this->fieldClean($template['name']); + $template = "\"{$template['schema']}\".\"{$template['name']}\""; + + $sql .= " TEMPLATE = {$template}"; + } + if ($option != '') $sql .= ", {$option}"; + $sql .= ")"; + $whatToComment = 'TEXT SEARCH DICTIONARY'; + } + + /* if comment, begin a transaction to + * run both commands */ + if ($comment != '') { + $status = $this->beginTransaction(); + if ($status != 0) return -1; + } + + // Create the FTS dictionary + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + // Set the comment + if ($comment != '') { + $status = $this->setComment($whatToComment, $dictname, '', $comment); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + } + + return $this->endTransaction(); + } + + /** + * Alters FTS dictionary or dictionary template + * @param $dictname The dico's name + * @param $comment The comment + * @param $name The new dico's name + * + * @return 0 on success + */ + function updateFtsDictionary($dictname, $comment, $name) { + + $status = $this->beginTransaction(); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + $this->fieldClean($dictname); + $status = $this->setComment('TEXT SEARCH DICTIONARY', $dictname, '', $comment); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + // Only if the name has changed + if ($name != $dictname) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($name); + + $sql = "ALTER TEXT SEARCH DICTIONARY \"{$f_schema}\".\"{$dictname}\" RENAME TO \"{$name}\""; + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + } + + return $this->endTransaction(); + } + + /** + * Return all information relating to a FTS dictionary + * @param $ftsdict The name of the FTS dictionary + * + * @return RecordSet of FTS dictionary information + */ + function getFtsDictionaryByName($ftsdict) { + + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($ftsdict); + + $sql = "SELECT + n.nspname as schema, + d.dictname as name, + ( SELECT COALESCE(nt.nspname, '(null)')::pg_catalog.text || '.' || t.tmplname FROM + pg_catalog.pg_ts_template t + LEFT JOIN pg_catalog.pg_namespace nt ON nt.oid = t.tmplnamespace + WHERE d.dicttemplate = t.oid ) AS template, + d.dictinitoption as init, + pg_catalog.obj_description(d.oid, 'pg_ts_dict') as comment + FROM pg_catalog.pg_ts_dict d + LEFT JOIN pg_catalog.pg_namespace n ON n.oid = d.dictnamespace + WHERE d.dictname = '{$ftsdict}' + AND pg_catalog.pg_ts_dict_is_visible(d.oid) + AND n.nspname='{$c_schema}' + ORDER BY name"; + + return $this->selectSet($sql); + } + + /** + * Creates/updates/deletes FTS mapping. + * @param string $cfgname The name of the FTS configuration to alter + * @param array $mapping Array of tokens' names + * @param string $action What to do with the mapping: add, alter or drop + * @param string $dictname Dictionary that will process tokens given or null in case of drop action + * + * @return 0 success + */ + function changeFtsMapping($ftscfg, $mapping, $action, $dictname = null) { + + if (count($mapping) > 0) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($ftscfg); + $this->fieldClean($dictname); + $this->arrayClean($mapping); + + switch ($action) { + case 'alter': + $whatToDo = "ALTER"; + break; + case 'drop': + $whatToDo = "DROP"; + break; + default: + $whatToDo = "ADD"; + break; + } + + $sql = "ALTER TEXT SEARCH CONFIGURATION \"{$f_schema}\".\"{$ftscfg}\" {$whatToDo} MAPPING FOR "; + $sql .= implode(",", $mapping); + if ($action != 'drop' && !empty($dictname)) { + $sql .= " WITH {$dictname}"; + } + + return $this->execute($sql); + } + else { + return -1; + } + } + + /** + * Return all information related to a given FTS configuration's mapping + * @param $ftscfg The name of the FTS configuration + * @param $mapping The name of the mapping + * + * @return FTS configuration information + */ + function getFtsMappingByName($ftscfg, $mapping) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($ftscfg); + $this->clean($mapping); + + $oidSet = $this->selectSet("SELECT c.oid, cfgparser + FROM pg_catalog.pg_ts_config AS c + LEFT JOIN pg_catalog.pg_namespace AS n ON n.oid = c.cfgnamespace + WHERE c.cfgname = '{$ftscfg}' + AND n.nspname='{$c_schema}'"); + + $oid = $oidSet->fields['oid']; + $cfgparser = $oidSet->fields['cfgparser']; + + $tokenIdSet = $this->selectSet("SELECT tokid + FROM pg_catalog.ts_token_type({$cfgparser}) + WHERE alias = '{$mapping}'"); + + $tokid = $tokenIdSet->fields['tokid']; + + $sql = "SELECT + (SELECT t.alias FROM pg_catalog.ts_token_type(c.cfgparser) AS t WHERE t.tokid = m.maptokentype) AS name, + d.dictname as dictionaries + FROM pg_catalog.pg_ts_config AS c, pg_catalog.pg_ts_config_map AS m, pg_catalog.pg_ts_dict d + WHERE c.oid = {$oid} AND m.mapcfg = c.oid AND m.maptokentype = {$tokid} AND m.mapdict = d.oid + LIMIT 1;"; + + return $this->selectSet($sql); + } + + /** + * Return list of FTS mappings possible for given parser + * (specified by given configuration since configuration can only have 1 parser) + * @param $ftscfg The config's name that use the parser + * + * @return 0 on success + */ + function getFtsMappings($ftscfg) { + + $cfg = $this->getFtsConfigurationByName($ftscfg); + + $sql = "SELECT alias AS name, description + FROM pg_catalog.ts_token_type({$cfg->fields['parser_id']}) + ORDER BY name"; + + return $this->selectSet($sql); + } + + // Language functions + + /** + * Gets all languages + * @param $all True to get all languages, regardless of show_system + * @return A recordset + */ + function getLanguages($all = false) { + global $conf; + + if ($conf['show_system'] || $all) + $where = ''; + else + $where = 'WHERE lanispl'; + + $sql = " + SELECT + lanname, lanpltrusted, + lanplcallfoid::pg_catalog.regproc AS lanplcallf + FROM + pg_catalog.pg_language + {$where} + ORDER BY lanname + "; + + return $this->selectSet($sql); + } + + // Aggregate functions + + /** + * Creates a new aggregate in the database + * @param $name The name of the aggregate + * @param $basetype The input data type of the aggregate + * @param $sfunc The name of the state transition function for the aggregate + * @param $stype The data type for the aggregate's state value + * @param $ffunc The name of the final function for the aggregate + * @param $initcond The initial setting for the state value + * @param $sortop The sort operator for the aggregate + * @param $comment Aggregate comment + * @return 0 success + * @return -1 error + */ + function createAggregate($name, $basetype, $sfunc, $stype, $ffunc, $initcond, $sortop, $comment) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($name); + $this->fieldClean($basetype); + $this->fieldClean($sfunc); + $this->fieldClean($stype); + $this->fieldClean($ffunc); + $this->fieldClean($initcond); + $this->fieldClean($sortop); + + $this->beginTransaction(); + + $sql = "CREATE AGGREGATE \"{$f_schema}\".\"{$name}\" (BASETYPE = \"{$basetype}\", SFUNC = \"{$sfunc}\", STYPE = \"{$stype}\""; + if(trim($ffunc) != '') $sql .= ", FINALFUNC = \"{$ffunc}\""; + if(trim($initcond) != '') $sql .= ", INITCOND = \"{$initcond}\""; + if(trim($sortop) != '') $sql .= ", SORTOP = \"{$sortop}\""; + $sql .= ")"; + + $status = $this->execute($sql); + if ($status) { + $this->rollbackTransaction(); + return -1; + } + + if (trim($comment) != '') { + $status = $this->setComment('AGGREGATE', $name, '', $comment, $basetype); + if ($status) { + $this->rollbackTransaction(); + return -1; + } + } + + return $this->endTransaction(); + } + + /** + * Renames an aggregate function + * @param $aggrname The actual name of the aggregate + * @param $aggrtype The actual input data type of the aggregate + * @param $newaggrname The new name of the aggregate + * @return 0 success + */ + function renameAggregate($aggrschema, $aggrname, $aggrtype, $newaggrname) { + /* this function is called from alterAggregate where params are cleaned */ + $sql = "ALTER AGGREGATE \"{$aggrschema}\"" . '.' . "\"{$aggrname}\" (\"{$aggrtype}\") RENAME TO \"{$newaggrname}\""; + return $this->execute($sql); + } + + /** + * Removes an aggregate function from the database + * @param $aggrname The name of the aggregate + * @param $aggrtype The input data type of the aggregate + * @param $cascade True to cascade drop, false to restrict + * @return 0 success + */ + function dropAggregate($aggrname, $aggrtype, $cascade) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($aggrname); + $this->fieldClean($aggrtype); + + $sql = "DROP AGGREGATE \"{$f_schema}\".\"{$aggrname}\" (\"{$aggrtype}\")"; + if ($cascade) $sql .= " CASCADE"; + + return $this->execute($sql); + } + + /** + * Gets all information for an aggregate + * @param $name The name of the aggregate + * @param $basetype The input data type of the aggregate + * @return A recordset + */ + function getAggregate($name, $basetype) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->fieldclean($name); + $this->fieldclean($basetype); + + $sql = " + SELECT p.proname, CASE p.proargtypes[0] + WHEN 'pg_catalog.\"any\"'::pg_catalog.regtype THEN NULL + ELSE pg_catalog.format_type(p.proargtypes[0], NULL) END AS proargtypes, + a.aggtransfn, format_type(a.aggtranstype, NULL) AS aggstype, a.aggfinalfn, + a.agginitval, a.aggsortop, u.usename, pg_catalog.obj_description(p.oid, 'pg_proc') AS aggrcomment + FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n, pg_catalog.pg_user u, pg_catalog.pg_aggregate a + WHERE n.oid = p.pronamespace AND p.proowner=u.usesysid AND p.oid=a.aggfnoid + AND p.proisagg AND n.nspname='{$c_schema}' + AND p.proname='" . $name . "' + AND CASE p.proargtypes[0] + WHEN 'pg_catalog.\"any\"'::pg_catalog.regtype THEN '' + ELSE pg_catalog.format_type(p.proargtypes[0], NULL) + END ='" . $basetype . "'"; + + return $this->selectSet($sql); + } + + /** + * Gets all aggregates + * @return A recordset + */ + function getAggregates() { + $c_schema = $this->_schema; + $this->clean($c_schema); + $sql = "SELECT p.proname, CASE p.proargtypes[0] WHEN 'pg_catalog.\"any\"'::pg_catalog.regtype THEN NULL ELSE + pg_catalog.format_type(p.proargtypes[0], NULL) END AS proargtypes, a.aggtransfn, u.usename, + pg_catalog.obj_description(p.oid, 'pg_proc') AS aggrcomment + FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n, pg_catalog.pg_user u, pg_catalog.pg_aggregate a + WHERE n.oid = p.pronamespace AND p.proowner=u.usesysid AND p.oid=a.aggfnoid + AND p.proisagg AND n.nspname='{$c_schema}' ORDER BY 1, 2"; + + return $this->selectSet($sql); + } + + /** + * Changes the owner of an aggregate function + * @param $aggrname The name of the aggregate + * @param $aggrtype The input data type of the aggregate + * @param $newaggrowner The new owner of the aggregate + * @return 0 success + */ + function changeAggregateOwner($aggrname, $aggrtype, $newaggrowner) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($aggrname); + $this->fieldClean($newaggrowner); + $sql = "ALTER AGGREGATE \"{$f_schema}\".\"{$aggrname}\" (\"{$aggrtype}\") OWNER TO \"{$newaggrowner}\""; + return $this->execute($sql); + } + + /** + * Changes the schema of an aggregate function + * @param $aggrname The name of the aggregate + * @param $aggrtype The input data type of the aggregate + * @param $newaggrschema The new schema for the aggregate + * @return 0 success + */ + function changeAggregateSchema($aggrname, $aggrtype, $newaggrschema) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($aggrname); + $this->fieldClean($newaggrschema); + $sql = "ALTER AGGREGATE \"{$f_schema}\".\"{$aggrname}\" (\"{$aggrtype}\") SET SCHEMA \"{$newaggrschema}\""; + return $this->execute($sql); + } + + /** + * Alters an aggregate + * @param $aggrname The actual name of the aggregate + * @param $aggrtype The actual input data type of the aggregate + * @param $aggrowner The actual owner of the aggregate + * @param $aggrschema The actual schema the aggregate belongs to + * @param $aggrcomment The actual comment for the aggregate + * @param $newaggrname The new name of the aggregate + * @param $newaggrowner The new owner of the aggregate + * @param $newaggrschema The new schema where the aggregate will belong to + * @param $newaggrcomment The new comment for the aggregate + * @return 0 success + * @return -1 change owner error + * @return -2 change comment error + * @return -3 change schema error + * @return -4 change name error + */ + function alterAggregate($aggrname, $aggrtype, $aggrowner, $aggrschema, $aggrcomment, $newaggrname, $newaggrowner, $newaggrschema, $newaggrcomment) { + // Clean fields + $this->fieldClean($aggrname); + $this->fieldClean($aggrtype); + $this->fieldClean($aggrowner); + $this->fieldClean($aggrschema); + $this->fieldClean($newaggrname); + $this->fieldClean($newaggrowner); + $this->fieldClean($newaggrschema); + + $this->beginTransaction(); + + // Change the owner, if it has changed + if($aggrowner != $newaggrowner) { + $status = $this->changeAggregateOwner($aggrname, $aggrtype, $newaggrowner); + if($status != 0) { + $this->rollbackTransaction(); + return -1; + } + } + + // Set the comment, if it has changed + if($aggrcomment != $newaggrcomment) { + $status = $this->setComment('AGGREGATE', $aggrname, '', $newaggrcomment, $aggrtype); + if ($status) { + $this->rollbackTransaction(); + return -2; + } + } + + // Change the schema, if it has changed + if($aggrschema != $newaggrschema) { + $status = $this->changeAggregateSchema($aggrname, $aggrtype, $newaggrschema); + if($status != 0) { + $this->rollbackTransaction(); + return -3; + } + } + + // Rename the aggregate, if it has changed + if($aggrname != $newaggrname) { + $status = $this->renameAggregate($newaggrschema, $aggrname, $aggrtype, $newaggrname); + if($status != 0) { + $this->rollbackTransaction(); + return -4; + } + } + + return $this->endTransaction(); + } + + // Role, User/Group functions + + /** + * Returns all roles in the database cluster + * @param $rolename (optional) The role name to exclude from the select + * @return All roles + */ + function getRoles($rolename = '') { + $sql = ' + SELECT rolname, rolsuper, rolcreatedb, rolcreaterole, rolinherit, + rolcanlogin, rolconnlimit, rolvaliduntil, rolconfig + FROM pg_catalog.pg_roles'; + if($rolename) $sql .= " WHERE rolname!='{$rolename}'"; + $sql .= ' ORDER BY rolname'; + + return $this->selectSet($sql); + } + + /** + * Returns information about a single role + * @param $rolename The name of the role to retrieve + * @return The role's data + */ + function getRole($rolename) { + $this->clean($rolename); + + $sql = " + SELECT rolname, rolsuper, rolcreatedb, rolcreaterole, rolinherit, + rolcanlogin, rolconnlimit, rolvaliduntil, rolconfig + FROM pg_catalog.pg_roles WHERE rolname='{$rolename}'"; + + return $this->selectSet($sql); + } + + /** + * Grants membership in a role + * @param $role The name of the target role + * @param $rolename The name of the role that will belong to the target role + * @param $admin (optional) Flag to grant the admin option + * @return 0 success + */ + function grantRole($role, $rolename, $admin=0) { + $this->fieldClean($role); + $this->fieldClean($rolename); + + $sql = "GRANT \"{$role}\" TO \"{$rolename}\""; + if($admin == 1) $sql .= ' WITH ADMIN OPTION'; + + return $this->execute($sql); + } + + /** + * Revokes membership in a role + * @param $role The name of the target role + * @param $rolename The name of the role that will not belong to the target role + * @param $admin (optional) Flag to revoke only the admin option + * @param $type (optional) Type of revoke: RESTRICT | CASCADE + * @return 0 success + */ + function revokeRole($role, $rolename, $admin = 0, $type = 'RESTRICT') { + $this->fieldClean($role); + $this->fieldClean($rolename); + + $sql = "REVOKE "; + if($admin == 1) $sql .= 'ADMIN OPTION FOR '; + $sql .= "\"{$role}\" FROM \"{$rolename}\" {$type}"; + + return $this->execute($sql); + } + + /** + * Returns all users in the database cluster + * @return All users + */ + function getUsers() { + $sql = "SELECT usename, usesuper, usecreatedb, valuntil AS useexpires, useconfig + FROM pg_user + ORDER BY usename"; + + return $this->selectSet($sql); + } + + /** + * Returns information about a single user + * @param $username The username of the user to retrieve + * @return The user's data + */ + function getUser($username) { + $this->clean($username); + + $sql = "SELECT usename, usesuper, usecreatedb, valuntil AS useexpires, useconfig + FROM pg_user + WHERE usename='{$username}'"; + + return $this->selectSet($sql); + } + + /** + * Creates a new role + * @param $rolename The name of the role to create + * @param $password A password for the role + * @param $superuser Boolean whether or not the role is a superuser + * @param $createdb Boolean whether or not the role can create databases + * @param $createrole Boolean whether or not the role can create other roles + * @param $inherits Boolean whether or not the role inherits the privileges from parent roles + * @param $login Boolean whether or not the role will be allowed to login + * @param $connlimit Number of concurrent connections the role can make + * @param $expiry String Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire + * @param $memberof (array) Roles to which the new role will be immediately added as a new member + * @param $members (array) Roles which are automatically added as members of the new role + * @param $adminmembers (array) Roles which are automatically added as admin members of the new role + * @return 0 success + */ + function createRole($rolename, $password, $superuser, $createdb, $createrole, $inherits, $login, $connlimit, $expiry, $memberof, $members, $adminmembers) { + $enc = $this->_encryptPassword($rolename, $password); + $this->fieldClean($rolename); + $this->clean($enc); + $this->clean($connlimit); + $this->clean($expiry); + $this->fieldArrayClean($memberof); + $this->fieldArrayClean($members); + $this->fieldArrayClean($adminmembers); + + $sql = "CREATE ROLE \"{$rolename}\""; + if ($password != '') $sql .= " WITH ENCRYPTED PASSWORD '{$enc}'"; + $sql .= ($superuser) ? ' SUPERUSER' : ' NOSUPERUSER'; + $sql .= ($createdb) ? ' CREATEDB' : ' NOCREATEDB'; + $sql .= ($createrole) ? ' CREATEROLE' : ' NOCREATEROLE'; + $sql .= ($inherits) ? ' INHERIT' : ' NOINHERIT'; + $sql .= ($login) ? ' LOGIN' : ' NOLOGIN'; + if ($connlimit != '') $sql .= " CONNECTION LIMIT {$connlimit}"; else $sql .= ' CONNECTION LIMIT -1'; + if ($expiry != '') $sql .= " VALID UNTIL '{$expiry}'"; else $sql .= " VALID UNTIL 'infinity'"; + if (is_array($memberof) && sizeof($memberof) > 0) $sql .= ' IN ROLE "' . join('", "', $memberof) . '"'; + if (is_array($members) && sizeof($members) > 0) $sql .= ' ROLE "' . join('", "', $members) . '"'; + if (is_array($adminmembers) && sizeof($adminmembers) > 0) $sql .= ' ADMIN "' . join('", "', $adminmembers) . '"'; + + return $this->execute($sql); + } + + /** + * Adjusts a role's info + * @param $rolename The name of the role to adjust + * @param $password A password for the role + * @param $superuser Boolean whether or not the role is a superuser + * @param $createdb Boolean whether or not the role can create databases + * @param $createrole Boolean whether or not the role can create other roles + * @param $inherits Boolean whether or not the role inherits the privileges from parent roles + * @param $login Boolean whether or not the role will be allowed to login + * @param $connlimit Number of concurrent connections the role can make + * @param $expiry string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire + * @param $memberof (array) Roles to which the role will be immediately added as a new member + * @param $members (array) Roles which are automatically added as members of the role + * @param $adminmembers (array) Roles which are automatically added as admin members of the role + * @param $memberofold (array) Original roles whose the role belongs to + * @param $membersold (array) Original roles that are members of the role + * @param $adminmembersold (array) Original roles that are admin members of the role + * @return 0 success + */ + function setRole($rolename, $password, $superuser, $createdb, $createrole, $inherits, $login, $connlimit, $expiry, $memberof, $members, $adminmembers, $memberofold, $membersold, $adminmembersold) { + $enc = $this->_encryptPassword($rolename, $password); + $this->fieldClean($rolename); + $this->clean($enc); + $this->clean($connlimit); + $this->clean($expiry); + $this->fieldArrayClean($memberof); + $this->fieldArrayClean($members); + $this->fieldArrayClean($adminmembers); + + $sql = "ALTER ROLE \"{$rolename}\""; + if ($password != '') $sql .= " WITH ENCRYPTED PASSWORD '{$enc}'"; + $sql .= ($superuser) ? ' SUPERUSER' : ' NOSUPERUSER'; + $sql .= ($createdb) ? ' CREATEDB' : ' NOCREATEDB'; + $sql .= ($createrole) ? ' CREATEROLE' : ' NOCREATEROLE'; + $sql .= ($inherits) ? ' INHERIT' : ' NOINHERIT'; + $sql .= ($login) ? ' LOGIN' : ' NOLOGIN'; + if ($connlimit != '') $sql .= " CONNECTION LIMIT {$connlimit}"; else $sql .= ' CONNECTION LIMIT -1'; + if ($expiry != '') $sql .= " VALID UNTIL '{$expiry}'"; else $sql .= " VALID UNTIL 'infinity'"; + + $status = $this->execute($sql); + + if ($status != 0) return -1; + + //memberof + $old = explode(',', $memberofold); + foreach ($memberof as $m) { + if (!in_array($m, $old)) { + $status = $this->grantRole($m, $rolename); + if ($status != 0) return -1; + } + } + if($memberofold) + { + foreach ($old as $o) { + if (!in_array($o, $memberof)) { + $status = $this->revokeRole($o, $rolename, 0, 'CASCADE'); + if ($status != 0) return -1; + } + } + } + + //members + $old = explode(',', $membersold); + foreach ($members as $m) { + if (!in_array($m, $old)) { + $status = $this->grantRole($rolename, $m); + if ($status != 0) return -1; + } + } + if($membersold) + { + foreach ($old as $o) { + if (!in_array($o, $members)) { + $status = $this->revokeRole($rolename, $o, 0, 'CASCADE'); + if ($status != 0) return -1; + } + } + } + + //adminmembers + $old = explode(',', $adminmembersold); + foreach ($adminmembers as $m) { + if (!in_array($m, $old)) { + $status = $this->grantRole($rolename, $m, 1); + if ($status != 0) return -1; + } + } + if($adminmembersold) + { + foreach ($old as $o) { + if (!in_array($o, $adminmembers)) { + $status = $this->revokeRole($rolename, $o, 1, 'CASCADE'); + if ($status != 0) return -1; + } + } + } + + return $status; + } + + /** + * Renames a role + * @param $rolename The name of the role to rename + * @param $newrolename The new name of the role + * @return 0 success + */ + function renameRole($rolename, $newrolename){ + $this->fieldClean($rolename); + $this->fieldClean($newrolename); + + $sql = "ALTER ROLE \"{$rolename}\" RENAME TO \"{$newrolename}\""; + + return $this->execute($sql); + } + + /** + * Adjusts a role's info and renames it + * @param $rolename The name of the role to adjust + * @param $password A password for the role + * @param $superuser Boolean whether or not the role is a superuser + * @param $createdb Boolean whether or not the role can create databases + * @param $createrole Boolean whether or not the role can create other roles + * @param $inherits Boolean whether or not the role inherits the privileges from parent roles + * @param $login Boolean whether or not the role will be allowed to login + * @param $connlimit Number of concurrent connections the role can make + * @param $expiry string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire + * @param $memberof (array) Roles to which the role will be immediately added as a new member + * @param $members (array) Roles which are automatically added as members of the role + * @param $adminmembers (array) Roles which are automatically added as admin members of the role + * @param $memberofold (array) Original roles whose the role belongs to + * @param $membersold (array) Original roles that are members of the role + * @param $adminmembersold (array) Original roles that are admin members of the role + * @param $newrolename The new name of the role + * @return 0 success + * @return -1 transaction error + * @return -2 set role attributes error + * @return -3 rename error + */ + function setRenameRole($rolename, $password, $superuser, $createdb, $createrole, + $inherits, $login, $connlimit, $expiry, $memberof, $members, $adminmembers, + $memberofold, $membersold, $adminmembersold, $newrolename) { + + $status = $this->beginTransaction(); + if ($status != 0) return -1; + + if ($rolename != $newrolename){ + $status = $this->renameRole($rolename, $newrolename); + if ($status != 0) { + $this->rollbackTransaction(); + return -3; + } + $rolename = $newrolename; + } + + $status = $this->setRole($rolename, $password, $superuser, $createdb, $createrole, $inherits, $login, $connlimit, $expiry, $memberof, $members, $adminmembers, $memberofold, $membersold, $adminmembersold); + if ($status != 0) { + $this->rollbackTransaction(); + return -2; + } + + return $this->endTransaction(); + } + + /** + * Removes a role + * @param $rolename The name of the role to drop + * @return 0 success + */ + function dropRole($rolename) { + $this->fieldClean($rolename); + + $sql = "DROP ROLE \"{$rolename}\""; + + return $this->execute($sql); + } + + /** + * Creates a new user + * @param $username The username of the user to create + * @param $password A password for the user + * @param $createdb boolean Whether or not the user can create databases + * @param $createuser boolean Whether or not the user can create other users + * @param $expiry string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire + * @param $group (array) The groups to create the user in + * @return 0 success + */ + function createUser($username, $password, $createdb, $createuser, $expiry, $groups) { + $enc = $this->_encryptPassword($username, $password); + $this->fieldClean($username); + $this->clean($enc); + $this->clean($expiry); + $this->fieldArrayClean($groups); + + $sql = "CREATE USER \"{$username}\""; + if ($password != '') $sql .= " WITH ENCRYPTED PASSWORD '{$enc}'"; + $sql .= ($createdb) ? ' CREATEDB' : ' NOCREATEDB'; + $sql .= ($createuser) ? ' CREATEUSER' : ' NOCREATEUSER'; + if (is_array($groups) && sizeof($groups) > 0) $sql .= " IN GROUP \"" . join('", "', $groups) . "\""; + if ($expiry != '') $sql .= " VALID UNTIL '{$expiry}'"; + else $sql .= " VALID UNTIL 'infinity'"; + + return $this->execute($sql); + } + + /** + * Renames a user + * @param $username The username of the user to rename + * @param $newname The new name of the user + * @return 0 success + */ + function renameUser($username, $newname){ + $this->fieldClean($username); + $this->fieldClean($newname); + + $sql = "ALTER USER \"{$username}\" RENAME TO \"{$newname}\""; + + return $this->execute($sql); + } + + /** + * Adjusts a user's info + * @param $username The username of the user to modify + * @param $password A new password for the user + * @param $createdb boolean Whether or not the user can create databases + * @param $createuser boolean Whether or not the user can create other users + * @param $expiry string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire. + * @return 0 success + */ + function setUser($username, $password, $createdb, $createuser, $expiry) { + $enc = $this->_encryptPassword($username, $password); + $this->fieldClean($username); + $this->clean($enc); + $this->clean($expiry); + + $sql = "ALTER USER \"{$username}\""; + if ($password != '') $sql .= " WITH ENCRYPTED PASSWORD '{$enc}'"; + $sql .= ($createdb) ? ' CREATEDB' : ' NOCREATEDB'; + $sql .= ($createuser) ? ' CREATEUSER' : ' NOCREATEUSER'; + if ($expiry != '') $sql .= " VALID UNTIL '{$expiry}'"; + else $sql .= " VALID UNTIL 'infinity'"; + + return $this->execute($sql); + } + + /** + * Adjusts a user's info and renames the user + * @param $username The username of the user to modify + * @param $password A new password for the user + * @param $createdb boolean Whether or not the user can create databases + * @param $createuser boolean Whether or not the user can create other users + * @param $expiry string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire. + * @param $newname The new name of the user + * @return 0 success + * @return -1 transaction error + * @return -2 set user attributes error + * @return -3 rename error + */ + function setRenameUser($username, $password, $createdb, $createuser, $expiry, $newname) { + $status = $this->beginTransaction(); + if ($status != 0) return -1; + + if ($username != $newname){ + $status = $this->renameUser($username, $newname); + if ($status != 0) { + $this->rollbackTransaction(); + return -3; + } + $username = $newname; + } + + $status = $this->setUser($username, $password, $createdb, $createuser, $expiry); + if ($status != 0) { + $this->rollbackTransaction(); + return -2; + } + + return $this->endTransaction(); + } + + /** + * Removes a user + * @param $username The username of the user to drop + * @return 0 success + */ + function dropUser($username) { + $this->fieldClean($username); + + $sql = "DROP USER \"{$username}\""; + + return $this->execute($sql); + } + + /** + * Determines whether or not a user is a super user + * @param $username The username of the user + * @return True if is a super user, false otherwise + */ + function isSuperUser($username) { + $this->clean($username); + + if (function_exists('pg_parameter_status')) { + $val = pg_parameter_status($this->conn->_connectionID, 'is_superuser'); + if ($val !== false) return $val == 'on'; + } + + $sql = "SELECT usesuper FROM pg_user WHERE usename='{$username}'"; + + $usesuper = $this->selectField($sql, 'usesuper'); + if ($usesuper == -1) return false; + else return $usesuper == 't'; + } + + /** + * Changes a role's password + * @param $rolename The role name + * @param $password The new password + * @return 0 success + */ + function changePassword($rolename, $password) { + $enc = $this->_encryptPassword($rolename, $password); + $this->fieldClean($rolename); + $this->clean($enc); + + $sql = "ALTER ROLE \"{$rolename}\" WITH ENCRYPTED PASSWORD '{$enc}'"; + + return $this->execute($sql); + } + + /** + * Adds a group member + * @param $groname The name of the group + * @param $user The name of the user to add to the group + * @return 0 success + */ + function addGroupMember($groname, $user) { + $this->fieldClean($groname); + $this->fieldClean($user); + + $sql = "ALTER GROUP \"{$groname}\" ADD USER \"{$user}\""; + + return $this->execute($sql); + } + + /** + * Returns all role names which the role belongs to + * @param $rolename The role name + * @return All role names + */ + function getMemberOf($rolename) { + $this->clean($rolename); + + $sql = " + SELECT rolname FROM pg_catalog.pg_roles R, pg_auth_members M + WHERE R.oid=M.roleid + AND member IN ( + SELECT oid FROM pg_catalog.pg_roles + WHERE rolname='{$rolename}') + ORDER BY rolname"; + + return $this->selectSet($sql); + } + + /** + * Returns all role names that are members of a role + * @param $rolename The role name + * @param $admin (optional) Find only admin members + * @return All role names + */ + function getMembers($rolename, $admin = 'f') { + $this->clean($rolename); + + $sql = " + SELECT rolname FROM pg_catalog.pg_roles R, pg_auth_members M + WHERE R.oid=M.member AND admin_option='{$admin}' + AND roleid IN (SELECT oid FROM pg_catalog.pg_roles + WHERE rolname='{$rolename}') + ORDER BY rolname"; + + return $this->selectSet($sql); + } + + /** + * Removes a group member + * @param $groname The name of the group + * @param $user The name of the user to remove from the group + * @return 0 success + */ + function dropGroupMember($groname, $user) { + $this->fieldClean($groname); + $this->fieldClean($user); + + $sql = "ALTER GROUP \"{$groname}\" DROP USER \"{$user}\""; + + return $this->execute($sql); + } + + /** + * Return users in a specific group + * @param $groname The name of the group + * @return All users in the group + */ + function getGroup($groname) { + $this->clean($groname); + + $sql = " + SELECT s.usename FROM pg_catalog.pg_user s, pg_catalog.pg_group g + WHERE g.groname='{$groname}' AND s.usesysid = ANY (g.grolist) + ORDER BY s.usename"; + + return $this->selectSet($sql); + } + + /** + * Returns all groups in the database cluser + * @return All groups + */ + function getGroups() { + $sql = "SELECT groname FROM pg_group ORDER BY groname"; + + return $this->selectSet($sql); + } + + /** + * Creates a new group + * @param $groname The name of the group + * @param $users An array of users to add to the group + * @return 0 success + */ + function createGroup($groname, $users) { + $this->fieldClean($groname); + + $sql = "CREATE GROUP \"{$groname}\""; + + if (is_array($users) && sizeof($users) > 0) { + $this->fieldArrayClean($users); + $sql .= ' WITH USER "' . join('", "', $users) . '"'; + } + + return $this->execute($sql); + } + + /** + * Removes a group + * @param $groname The name of the group to drop + * @return 0 success + */ + function dropGroup($groname) { + $this->fieldClean($groname); + + $sql = "DROP GROUP \"{$groname}\""; + + return $this->execute($sql); + } + + /** + * Internal function used for parsing ACLs + * @param $acl The ACL to parse (of type aclitem[]) + * @return Privileges array + */ + function _parseACL($acl) { + // Take off the first and last characters (the braces) + $acl = substr($acl, 1, strlen($acl) - 2); + + // Pick out individual ACE's by carefully parsing. This is necessary in order + // to cope with usernames and stuff that contain commas + $aces = array(); + $i = $j = 0; + $in_quotes = false; + while ($i < strlen($acl)) { + // If current char is a double quote and it's not escaped, then + // enter quoted bit + $char = substr($acl, $i, 1); + if ($char == '"' && ($i == 0 || substr($acl, $i - 1, 1) != '\\')) + $in_quotes = !$in_quotes; + elseif ($char == ',' && !$in_quotes) { + // Add text so far to the array + $aces[] = substr($acl, $j, $i - $j); + $j = $i + 1; + } + $i++; + } + // Add final text to the array + $aces[] = substr($acl, $j); + + // Create the array to be returned + $temp = array(); + + // For each ACE, generate an entry in $temp + foreach ($aces as $v) { + + // If the ACE begins with a double quote, strip them off both ends + // and unescape backslashes and double quotes + $unquote = false; + if (strpos($v, '"') === 0) { + $v = substr($v, 1, strlen($v) - 2); + $v = str_replace('\\"', '"', $v); + $v = str_replace('\\\\', '\\', $v); + } + + // Figure out type of ACE (public, user or group) + if (strpos($v, '=') === 0) + $atype = 'public'; + else if ($this->hasRoles()) { + $atype = 'role'; + } + else if (strpos($v, 'group ') === 0) { + $atype = 'group'; + // Tear off 'group' prefix + $v = substr($v, 6); + } + else + $atype = 'user'; + + // Break on unquoted equals sign... + $i = 0; + $in_quotes = false; + $entity = null; + $chars = null; + while ($i < strlen($v)) { + // If current char is a double quote and it's not escaped, then + // enter quoted bit + $char = substr($v, $i, 1); + $next_char = substr($v, $i + 1, 1); + if ($char == '"' && ($i == 0 || $next_char != '"')) { + $in_quotes = !$in_quotes; + } + // Skip over escaped double quotes + elseif ($char == '"' && $next_char == '"') { + $i++; + } + elseif ($char == '=' && !$in_quotes) { + // Split on current equals sign + $entity = substr($v, 0, $i); + $chars = substr($v, $i + 1); + break; + } + $i++; + } + + // Check for quoting on entity name, and unescape if necessary + if (strpos($entity, '"') === 0) { + $entity = substr($entity, 1, strlen($entity) - 2); + $entity = str_replace('""', '"', $entity); + } + + // New row to be added to $temp + // (type, grantee, privileges, grantor, grant option? + $row = array($atype, $entity, array(), '', array()); + + // Loop over chars and add privs to $row + for ($i = 0; $i < strlen($chars); $i++) { + // Append to row's privs list the string representing + // the privilege + $char = substr($chars, $i, 1); + if ($char == '*') + $row[4][] = $this->privmap[substr($chars, $i - 1, 1)]; + elseif ($char == '/') { + $grantor = substr($chars, $i + 1); + // Check for quoting + if (strpos($grantor, '"') === 0) { + $grantor = substr($grantor, 1, strlen($grantor) - 2); + $grantor = str_replace('""', '"', $grantor); + } + $row[3] = $grantor; + break; + } + else { + if (!isset($this->privmap[$char])) + return -3; + else + $row[2][] = $this->privmap[$char]; + } + } + + // Append row to temp + $temp[] = $row; + } + + return $temp; + } + + /** + * Grabs an array of users and their privileges for an object, + * given its type. + * @param $object The name of the object whose privileges are to be retrieved + * @param $type The type of the object (eg. database, schema, relation, function or language) + * @param $table Optional, column's table if type = column + * @return Privileges array + * @return -1 invalid type + * @return -2 object not found + * @return -3 unknown privilege type + */ + function getPrivileges($object, $type, $table = null) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($object); + + switch ($type) { + case 'column': + $this->clean($table); + $sql = " + SELECT E'{' || pg_catalog.array_to_string(attacl, E',') || E'}' as acl + FROM pg_catalog.pg_attribute a + LEFT JOIN pg_catalog.pg_class c ON (a.attrelid = c.oid) + LEFT JOIN pg_catalog.pg_namespace n ON (c.relnamespace=n.oid) + WHERE n.nspname='{$c_schema}' + AND c.relname='{$table}' + AND a.attname='{$object}'"; + break; + case 'table': + case 'view': + case 'sequence': + $sql = " + SELECT relacl AS acl FROM pg_catalog.pg_class + WHERE relname='{$object}' + AND relnamespace=(SELECT oid FROM pg_catalog.pg_namespace + WHERE nspname='{$c_schema}')"; + break; + case 'database': + $sql = "SELECT datacl AS acl FROM pg_catalog.pg_database WHERE datname='{$object}'"; + break; + case 'function': + // Since we fetch functions by oid, they are already constrained to + // the current schema. + $sql = "SELECT proacl AS acl FROM pg_catalog.pg_proc WHERE oid='{$object}'"; + break; + case 'language': + $sql = "SELECT lanacl AS acl FROM pg_catalog.pg_language WHERE lanname='{$object}'"; + break; + case 'schema': + $sql = "SELECT nspacl AS acl FROM pg_catalog.pg_namespace WHERE nspname='{$object}'"; + break; + case 'tablespace': + $sql = "SELECT spcacl AS acl FROM pg_catalog.pg_tablespace WHERE spcname='{$object}'"; + break; + default: + return -1; + } + + // Fetch the ACL for object + $acl = $this->selectField($sql, 'acl'); + if ($acl == -1) return -2; + elseif ($acl == '' || $acl == null) return array(); + else return $this->_parseACL($acl); + } + + /** + * Grants a privilege to a user, group or public + * @param $mode 'GRANT' or 'REVOKE'; + * @param $type The type of object + * @param $object The name of the object + * @param $public True to grant to public, false otherwise + * @param $usernames The array of usernames to grant privs to. + * @param $groupnames The array of group names to grant privs to. + * @param $privileges The array of privileges to grant (eg. ('SELECT', 'ALL PRIVILEGES', etc.) ) + * @param $grantoption True if has grant option, false otherwise + * @param $cascade True for cascade revoke, false otherwise + * @param $table the column's table if type=column + * @return 0 success + * @return -1 invalid type + * @return -2 invalid entity + * @return -3 invalid privileges + * @return -4 not granting to anything + * @return -4 invalid mode + */ + function setPrivileges($mode, $type, $object, $public, $usernames, $groupnames, + $privileges, $grantoption, $cascade, $table + ) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldArrayClean($usernames); + $this->fieldArrayClean($groupnames); + + // Input checking + if (!is_array($privileges) || sizeof($privileges) == 0) return -3; + if (!is_array($usernames) || !is_array($groupnames) || + (!$public && sizeof($usernames) == 0 && sizeof($groupnames) == 0)) return -4; + if ($mode != 'GRANT' && $mode != 'REVOKE') return -5; + + $sql = $mode; + + // Grant option + if ($this->hasGrantOption() && $mode == 'REVOKE' && $grantoption) { + $sql .= ' GRANT OPTION FOR'; + } + + if (in_array('ALL PRIVILEGES', $privileges)) { + $sql .= ' ALL PRIVILEGES'; + } + else { + if ($type == 'column') { + $this->fieldClean($object); + $sql .= ' ' . join(" (\"{$object}\"), ", $privileges); + } + else { + $sql .= ' ' . join(', ', $privileges); + } + } + + switch ($type) { + case 'column': + $sql .= " (\"{$object}\")"; + $object = $table; + case 'table': + case 'view': + case 'sequence': + $this->fieldClean($object); + $sql .= " ON \"{$f_schema}\".\"{$object}\""; + break; + case 'database': + $this->fieldClean($object); + $sql .= " ON DATABASE \"{$object}\""; + break; + case 'function': + // Function comes in with $object as function OID + $fn = $this->getFunction($object); + $this->fieldClean($fn->fields['proname']); + $sql .= " ON FUNCTION \"{$f_schema}\".\"{$fn->fields['proname']}\"({$fn->fields['proarguments']})"; + break; + case 'language': + $this->fieldClean($object); + $sql .= " ON LANGUAGE \"{$object}\""; + break; + case 'schema': + $this->fieldClean($object); + $sql .= " ON SCHEMA \"{$object}\""; + break; + case 'tablespace': + $this->fieldClean($object); + $sql .= " ON TABLESPACE \"{$object}\""; + break; + default: + return -1; + } + + // Dump PUBLIC + $first = true; + $sql .= ($mode == 'GRANT') ? ' TO ' : ' FROM '; + if ($public) { + $sql .= 'PUBLIC'; + $first = false; + } + // Dump users + foreach ($usernames as $v) { + if ($first) { + $sql .= "\"{$v}\""; + $first = false; + } + else { + $sql .= ", \"{$v}\""; + } + } + // Dump groups + foreach ($groupnames as $v) { + if ($first) { + $sql .= "GROUP \"{$v}\""; + $first = false; + } + else { + $sql .= ", GROUP \"{$v}\""; + } + } + + // Grant option + if ($this->hasGrantOption() && $mode == 'GRANT' && $grantoption) { + $sql .= ' WITH GRANT OPTION'; + } + + // Cascade revoke + if ($this->hasGrantOption() && $mode == 'REVOKE' && $cascade) { + $sql .= ' CASCADE'; + } + + return $this->execute($sql); + } + + /** + * Helper function that computes encypted PostgreSQL passwords + * @param $username The username + * @param $password The password + */ + function _encryptPassword($username, $password) { + return 'md5' . md5($password . $username); + } + + // Tablespace functions + + /** + * Retrieves information for all tablespaces + * @param $all Include all tablespaces (necessary when moving objects back to the default space) + * @return A recordset + */ + function getTablespaces($all = false) { + global $conf; + + $sql = "SELECT spcname, pg_catalog.pg_get_userbyid(spcowner) AS spcowner, spclocation, + (SELECT description FROM pg_catalog.pg_shdescription pd WHERE pg_tablespace.oid=pd.objoid) AS spccomment + FROM pg_catalog.pg_tablespace"; + + if (!$conf['show_system'] && !$all) { + $sql .= ' WHERE spcname NOT LIKE $$pg\_%$$'; + } + + $sql .= " ORDER BY spcname"; + + return $this->selectSet($sql); + } + + /** + * Retrieves a tablespace's information + * @return A recordset + */ + function getTablespace($spcname) { + $this->clean($spcname); + + $sql = "SELECT spcname, pg_catalog.pg_get_userbyid(spcowner) AS spcowner, spclocation, + (SELECT description FROM pg_catalog.pg_shdescription pd WHERE pg_tablespace.oid=pd.objoid) AS spccomment + FROM pg_catalog.pg_tablespace WHERE spcname='{$spcname}'"; + + return $this->selectSet($sql); + } + + /** + * Creates a tablespace + * @param $spcname The name of the tablespace to create + * @param $spcowner The owner of the tablespace. '' for current + * @param $spcloc The directory in which to create the tablespace + * @return 0 success + */ + function createTablespace($spcname, $spcowner, $spcloc, $comment='') { + $this->fieldClean($spcname); + $this->clean($spcloc); + + $sql = "CREATE TABLESPACE \"{$spcname}\""; + + if ($spcowner != '') { + $this->fieldClean($spcowner); + $sql .= " OWNER \"{$spcowner}\""; + } + + $sql .= " LOCATION '{$spcloc}'"; + + $status = $this->execute($sql); + if ($status != 0) return -1; + + if ($comment != '' && $this->hasSharedComments()) { + $status = $this->setComment('TABLESPACE',$spcname,'',$comment); + if ($status != 0) return -2; + } + + return 0; + } + + /** + * Alters a tablespace + * @param $spcname The name of the tablespace + * @param $name The new name for the tablespace + * @param $owner The new owner for the tablespace + * @return 0 success + * @return -1 transaction error + * @return -2 owner error + * @return -3 rename error + * @return -4 comment error + */ + function alterTablespace($spcname, $name, $owner, $comment='') { + $this->fieldClean($spcname); + $this->fieldClean($name); + $this->fieldClean($owner); + + // Begin transaction + $status = $this->beginTransaction(); + if ($status != 0) return -1; + + // Owner + $sql = "ALTER TABLESPACE \"{$spcname}\" OWNER TO \"{$owner}\""; + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -2; + } + + // Rename (only if name has changed) + if ($name != $spcname) { + $sql = "ALTER TABLESPACE \"{$spcname}\" RENAME TO \"{$name}\""; + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -3; + } + } + + // Set comment if it has changed + if (trim($comment) != '' && $this->hasSharedComments()) { + $status = $this->setComment('TABLESPACE',$spcname,'',$comment); + if ($status != 0) return -4; + } + + return $this->endTransaction(); + } + + /** + * Drops a tablespace + * @param $spcname The name of the domain to drop + * @return 0 success + */ + function dropTablespace($spcname) { + $this->fieldClean($spcname); + + $sql = "DROP TABLESPACE \"{$spcname}\""; + + return $this->execute($sql); + } + + // Administration functions + + /** + * Analyze a database + * @param $table (optional) The table to analyze + */ + function analyzeDB($table = '') { + if ($table != '') { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + + $sql = "ANALYZE \"{$f_schema}\".\"{$table}\""; + } + else + $sql = "ANALYZE"; + + return $this->execute($sql); + } + + /** + * Vacuums a database + * @param $table The table to vacuum + * @param $analyze If true, also does analyze + * @param $full If true, selects "full" vacuum + * @param $freeze If true, selects aggressive "freezing" of tuples + */ + function vacuumDB($table = '', $analyze = false, $full = false, $freeze = false) { + + $sql = "VACUUM"; + if ($full) $sql .= " FULL"; + if ($freeze) $sql .= " FREEZE"; + if ($analyze) $sql .= " ANALYZE"; + if ($table != '') { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + $sql .= " \"{$f_schema}\".\"{$table}\""; + } + + return $this->execute($sql); + } + + /** + * Returns all autovacuum global configuration + * @return associative array array( param => value, ...) + */ + function getAutovacuum() { + + $_defaults = $this->selectSet("SELECT name, setting + FROM pg_catalog.pg_settings + WHERE + name = 'autovacuum' + OR name = 'autovacuum_vacuum_threshold' + OR name = 'autovacuum_vacuum_scale_factor' + OR name = 'autovacuum_analyze_threshold' + OR name = 'autovacuum_analyze_scale_factor' + OR name = 'autovacuum_vacuum_cost_delay' + OR name = 'autovacuum_vacuum_cost_limit' + OR name = 'vacuum_freeze_min_age' + OR name = 'autovacuum_freeze_max_age' + " + ); + + $ret = array(); + while (!$_defaults->EOF) { + $ret[$_defaults->fields['name']] = $_defaults->fields['setting']; + $_defaults->moveNext(); + } + + return $ret; + } + + /** + * Returns all available autovacuum per table information. + * @return A recordset + */ + function saveAutovacuum($table, $vacenabled, $vacthreshold, $vacscalefactor, $anathresold, + $anascalefactor, $vaccostdelay, $vaccostlimit) + { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + + $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" SET ("; + + if (!empty($vacenabled)) { + $this->clean($vacenabled); + $params[] = "autovacuum_enabled='{$vacenabled}'"; + } + if (!empty($vacthreshold)) { + $this->clean($vacthreshold); + $params[] = "autovacuum_vacuum_threshold='{$vacthreshold}'"; + } + if (!empty($vacscalefactor)) { + $this->clean($vacscalefactor); + $params[] = "autovacuum_vacuum_scale_factor='{$vacscalefactor}'"; + } + if (!empty($anathresold)) { + $this->clean($anathresold); + $params[] = "autovacuum_analyze_threshold='{$anathresold}'"; + } + if (!empty($anascalefactor)) { + $this->clean($anascalefactor); + $params[] = "autovacuum_analyze_scale_factor='{$anascalefactor}'"; + } + if (!empty($vaccostdelay)) { + $this->clean($vaccostdelay); + $params[] = "autovacuum_vacuum_cost_delay='{$vaccostdelay}'"; + } + if (!empty($vaccostlimit)) { + $this->clean($vaccostlimit); + $params[] = "autovacuum_vacuum_cost_limit='{$vaccostlimit}'"; + } + + $sql = $sql . implode(',', $params) . ');'; + + return $this->execute($sql); + } + + function dropAutovacuum($table) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + + return $this->execute(" + ALTER TABLE \"{$f_schema}\".\"{$table}\" RESET (autovacuum_enabled, autovacuum_vacuum_threshold, + autovacuum_vacuum_scale_factor, autovacuum_analyze_threshold, autovacuum_analyze_scale_factor, + autovacuum_vacuum_cost_delay, autovacuum_vacuum_cost_limit + );" + ); + } + + /** + * Returns all available process information. + * @param $database (optional) Find only connections to specified database + * @return A recordset + */ + function getProcesses($database = null) { + if ($database === null) + $sql = "SELECT * FROM pg_catalog.pg_stat_activity ORDER BY datname, usename, procpid"; + else { + $this->clean($database); + $sql = " + SELECT * FROM pg_catalog.pg_stat_activity + WHERE datname='{$database}' ORDER BY usename, procpid"; + } + + return $this->selectSet($sql); + } + + /** + * Returns table locks information in the current database + * @return A recordset + */ + + function getLocks() { + global $conf; + + if (!$conf['show_system']) + $where = 'AND pn.nspname NOT LIKE $$pg\_%$$'; + else + $where = "AND nspname !~ '^pg_t(emp_[0-9]+|oast)$'"; + + $sql = " + SELECT + pn.nspname, pc.relname AS tablename, pl.pid, pl.mode, pl.granted, pl.virtualtransaction, + (select transactionid from pg_catalog.pg_locks l2 where l2.locktype='transactionid' + and l2.mode='ExclusiveLock' and l2.virtualtransaction=pl.virtualtransaction) as transaction + FROM + pg_catalog.pg_locks pl, + pg_catalog.pg_class pc, + pg_catalog.pg_namespace pn + WHERE + pl.relation = pc.oid AND pc.relnamespace=pn.oid + {$where} + ORDER BY pid,nspname,tablename"; + + return $this->selectSet($sql); + } + + /** + * Sends a cancel or kill command to a process + * @param $pid The ID of the backend process + * @param $signal 'CANCEL' + * @return 0 success + * @return -1 invalid signal type + */ + function sendSignal($pid, $signal) { + // Clean + $pid = (int)$pid; + + if ($signal == 'CANCEL') + $sql = "SELECT pg_catalog.pg_cancel_backend({$pid}) AS val"; + elseif ($signal == 'KILL') + $sql = "SELECT pg_catalog.pg_terminate_backend({$pid}) AS val"; + else + return -1; + + + // Execute the query + $val = $this->selectField($sql, 'val'); + + if ($val === 'f') return -1; + elseif ($val === 't') return 0; + else return -1; + } + + // Misc functions + + /** + * Sets the comment for an object in the database + * @pre All parameters must already be cleaned + * @param $obj_type One of 'TABLE' | 'COLUMN' | 'VIEW' | 'SCHEMA' | 'SEQUENCE' | 'TYPE' | 'FUNCTION' | 'AGGREGATE' + * @param $obj_name The name of the object for which to attach a comment. + * @param $table Name of table that $obj_name belongs to. Ignored unless $obj_type is 'TABLE' or 'COLUMN'. + * @param $comment The comment to add. + * @return 0 success + */ + function setComment($obj_type, $obj_name, $table, $comment, $basetype = NULL) { + $sql = "COMMENT ON {$obj_type} " ; + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->clean($comment); // Passing in an already cleaned comment will lead to double escaped data + // So, while counter-intuitive, it is important to not clean comments before + // calling setComment. We will clean it here instead. +/* + $this->fieldClean($table); + $this->fieldClean($obj_name); +*/ + + switch ($obj_type) { + case 'TABLE': + $sql .= "\"{$f_schema}\".\"{$table}\" IS "; + break; + case 'COLUMN': + $sql .= "\"{$f_schema}\".\"{$table}\".\"{$obj_name}\" IS "; + break; + case 'SEQUENCE': + case 'VIEW': + case 'TEXT SEARCH CONFIGURATION': + case 'TEXT SEARCH DICTIONARY': + case 'TEXT SEARCH TEMPLATE': + case 'TEXT SEARCH PARSER': + case 'TYPE': + $sql .= "\"{$f_schema}\"."; + case 'DATABASE': + case 'ROLE': + case 'SCHEMA': + case 'TABLESPACE': + $sql .= "\"{$obj_name}\" IS "; + break; + case 'FUNCTION': + $sql .= "\"{$f_schema}\".{$obj_name} IS "; + break; + case 'AGGREGATE': + $sql .= "\"{$f_schema}\".\"{$obj_name}\" (\"{$basetype}\") IS "; + break; + default: + // Unknown object type + return -1; + } + + if ($comment != '') + $sql .= "'{$comment}';"; + else + $sql .= 'NULL;'; + + return $this->execute($sql); + + } + + /** + * Sets the client encoding + * @param $encoding The encoding to for the client + * @return 0 success + */ + function setClientEncoding($encoding) { + $this->clean($encoding); + + $sql = "SET CLIENT_ENCODING TO '{$encoding}'"; + + return $this->execute($sql); + } + + /** + * A private helper method for executeScript that advances the + * character by 1. In psql this is careful to take into account + * multibyte languages, but we don't at the moment, so this function + * is someone redundant, since it will always advance by 1 + * @param &$i The current character position in the line + * @param &$prevlen Length of previous character (ie. 1) + * @param &$thislen Length of current character (ie. 1) + */ + private + function advance_1(&$i, &$prevlen, &$thislen) { + $prevlen = $thislen; + $i += $thislen; + $thislen = 1; + } + + /** + * Private helper method to detect a valid $foo$ quote delimiter at + * the start of the parameter dquote + * @return True if valid, false otherwise + */ + private + function valid_dolquote($dquote) { + // XXX: support multibyte + return (preg_match('/^[$][$]/', $dquote) || preg_match('/^[$][_[:alpha:]][_[:alnum:]]*[$]/', $dquote)); + } + + /** + * Executes an SQL script as a series of SQL statements. Returns + * the result of the final step. This is a very complicated lexer + * based on the REL7_4_STABLE src/bin/psql/mainloop.c lexer in + * the PostgreSQL source code. + * XXX: It does not handle multibyte languages properly. + * @param $name Entry in $_FILES to use + * @param $callback (optional) Callback function to call with each query, + its result and line number. + * @return True for general success, false on any failure. + */ + function executeScript($name, $callback = null) { + global $data; + + // This whole function isn't very encapsulated, but hey... + $conn = $data->conn->_connectionID; + if (!is_uploaded_file($_FILES[$name]['tmp_name'])) return false; + + $fd = fopen($_FILES[$name]['tmp_name'], 'r'); + if (!$fd) return false; + + // Build up each SQL statement, they can be multiline + $query_buf = null; + $query_start = 0; + $in_quote = 0; + $in_xcomment = 0; + $bslash_count = 0; + $dol_quote = null; + $paren_level = 0; + $len = 0; + $i = 0; + $prevlen = 0; + $thislen = 0; + $lineno = 0; + + // Loop over each line in the file + while (!feof($fd)) { + $line = fgets($fd); + $lineno++; + + // Nothing left on line? Then ignore... + if (trim($line) == '') continue; + + $len = strlen($line); + $query_start = 0; + + /* + * Parse line, looking for command separators. + * + * The current character is at line[i], the prior character at line[i + * - prevlen], the next character at line[i + thislen]. + */ + $prevlen = 0; + $thislen = ($len > 0) ? 1 : 0; + + for ($i = 0; $i < $len; $this->advance_1($i, $prevlen, $thislen)) { + + /* was the previous character a backslash? */ + if ($i > 0 && substr($line, $i - $prevlen, 1) == '\\') + $bslash_count++; + else + $bslash_count = 0; + + /* + * It is important to place the in_* test routines before the + * in_* detection routines. i.e. we have to test if we are in + * a quote before testing for comments. + */ + + /* in quote? */ + if ($in_quote !== 0) + { + /* + * end of quote if matching non-backslashed character. + * backslashes don't count for double quotes, though. + */ + if (substr($line, $i, 1) == $in_quote && + ($bslash_count % 2 == 0 || $in_quote == '"')) + $in_quote = 0; + } + + /* in or end of $foo$ type quote? */ + else if ($dol_quote) { + if (strncmp(substr($line, $i), $dol_quote, strlen($dol_quote)) == 0) { + $this->advance_1($i, $prevlen, $thislen); + while(substr($line, $i, 1) != '$') + $this->advance_1($i, $prevlen, $thislen); + $dol_quote = null; + } + } + + /* start of extended comment? */ + else if (substr($line, $i, 2) == '/*') + { + $in_xcomment++; + if ($in_xcomment == 1) + $this->advance_1($i, $prevlen, $thislen); + } + + /* in or end of extended comment? */ + else if ($in_xcomment) + { + if (substr($line, $i, 2) == '*/' && !--$in_xcomment) + $this->advance_1($i, $prevlen, $thislen); + } + + /* start of quote? */ + else if (substr($line, $i, 1) == '\'' || substr($line, $i, 1) == '"') { + $in_quote = substr($line, $i, 1); + } + + /* + * start of $foo$ type quote? + */ + else if (!$dol_quote && $this->valid_dolquote(substr($line, $i))) { + $dol_end = strpos(substr($line, $i + 1), '$'); + $dol_quote = substr($line, $i, $dol_end + 1); + $this->advance_1($i, $prevlen, $thislen); + while (substr($line, $i, 1) != '$') { + $this->advance_1($i, $prevlen, $thislen); + } + + } + + /* single-line comment? truncate line */ + else if (substr($line, $i, 2) == '--') + { + $line = substr($line, 0, $i); /* remove comment */ + break; + } + + /* count nested parentheses */ + else if (substr($line, $i, 1) == '(') { + $paren_level++; + } + + else if (substr($line, $i, 1) == ')' && $paren_level > 0) { + $paren_level--; + } + + /* semicolon? then send query */ + else if (substr($line, $i, 1) == ';' && !$bslash_count && !$paren_level) + { + $subline = substr(substr($line, 0, $i), $query_start); + /* is there anything else on the line? */ + if (strspn($subline, " \t\n\r") != strlen($subline)) + { + /* + * insert a cosmetic newline, if this is not the first + * line in the buffer + */ + if (strlen($query_buf) > 0) + $query_buf .= "\n"; + /* append the line to the query buffer */ + $query_buf .= $subline; + $query_buf .= ';'; + + // Execute the query (supporting 4.1.x PHP...). PHP cannot execute + // empty queries, unlike libpq + if (function_exists('pg_query')) + $res = @pg_query($conn, $query_buf); + else + $res = @pg_exec($conn, $query_buf); + // Call the callback function for display + if ($callback !== null) $callback($query_buf, $res, $lineno); + // Check for COPY request + if (pg_result_status($res) == 4) { // 4 == PGSQL_COPY_FROM + while (!feof($fd)) { + $copy = fgets($fd, 32768); + $lineno++; + pg_put_line($conn, $copy); + if ($copy == "\\.\n" || $copy == "\\.\r\n") { + pg_end_copy($conn); + break; + } + } + } + } + + $query_buf = null; + $query_start = $i + $thislen; + } + + /* + * keyword or identifier? + * We grab the whole string so that we don't + * mistakenly see $foo$ inside an identifier as the start + * of a dollar quote. + */ + // XXX: multibyte here + else if (preg_match('/^[_[:alpha:]]$/', substr($line, $i, 1))) { + $sub = substr($line, $i, $thislen); + while (preg_match('/^[\$_A-Za-z0-9]$/', $sub)) { + /* keep going while we still have identifier chars */ + $this->advance_1($i, $prevlen, $thislen); + $sub = substr($line, $i, $thislen); + } + // Since we're now over the next character to be examined, it is necessary + // to move back one space. + $i-=$prevlen; + } + } // end for + + /* Put the rest of the line in the query buffer. */ + $subline = substr($line, $query_start); + if ($in_quote || $dol_quote || strspn($subline, " \t\n\r") != strlen($subline)) + { + if (strlen($query_buf) > 0) + $query_buf .= "\n"; + $query_buf .= $subline; + } + + $line = null; + + } // end while + + /* + * Process query at the end of file without a semicolon, so long as + * it's non-empty. + */ + if (strlen($query_buf) > 0 && strspn($query_buf, " \t\n\r") != strlen($query_buf)) + { + // Execute the query (supporting 4.1.x PHP...) + if (function_exists('pg_query')) + $res = @pg_query($conn, $query_buf); + else + $res = @pg_exec($conn, $query_buf); + // Call the callback function for display + if ($callback !== null) $callback($query_buf, $res, $lineno); + // Check for COPY request + if (pg_result_status($res) == 4) { // 4 == PGSQL_COPY_FROM + while (!feof($fd)) { + $copy = fgets($fd, 32768); + $lineno++; + pg_put_line($conn, $copy); + if ($copy == "\\.\n" || $copy == "\\.\r\n") { + pg_end_copy($conn); + break; + } + } + } + } + + fclose($fd); + + return true; + } + + /** + * Generates the SQL for the 'select' function + * @param $table The table from which to select + * @param $show An array of columns to show. Empty array means all columns. + * @param $values An array mapping columns to values + * @param $ops An array of the operators to use + * @param $orderby (optional) An array of column numbers or names (one based) + * mapped to sort direction (asc or desc or '' or null) to order by + * @return The SQL query + */ + function getSelectSQL($table, $show, $values, $ops, $orderby = array()) { + $this->fieldArrayClean($show); + + // If an empty array is passed in, then show all columns + if (sizeof($show) == 0) { + if ($this->hasObjectID($table)) + $sql = "SELECT \"{$this->id}\", * FROM "; + else + $sql = "SELECT * FROM "; + } + else { + // Add oid column automatically to results for editing purposes + if (!in_array($this->id, $show) && $this->hasObjectID($table)) + $sql = "SELECT \"{$this->id}\", \""; + else + $sql = "SELECT \""; + + $sql .= join('","', $show) . "\" FROM "; + } + + $this->fieldClean($table); + + if (isset($_REQUEST['schema'])) { + $f_schema = $_REQUEST['schema']; + $this->fieldClean($f_schema); + $sql .= "\"{$f_schema}\"."; + } + $sql .= "\"{$table}\""; + + // If we have values specified, add them to the WHERE clause + $first = true; + if (is_array($values) && sizeof($values) > 0) { + foreach ($values as $k => $v) { + if ($v != '' || $this->selectOps[$ops[$k]] == 'p') { + $this->fieldClean($k); + if ($first) { + $sql .= " WHERE "; + $first = false; + } else { + $sql .= " AND "; + } + // Different query format depending on operator type + switch ($this->selectOps[$ops[$k]]) { + case 'i': + // Only clean the field for the inline case + // this is because (x), subqueries need to + // to allow 'a','b' as input. + $this->clean($v); + $sql .= "\"{$k}\" {$ops[$k]} '{$v}'"; + break; + case 'p': + $sql .= "\"{$k}\" {$ops[$k]}"; + break; + case 'x': + $sql .= "\"{$k}\" {$ops[$k]} ({$v})"; + break; + case 't': + $sql .= "\"{$k}\" {$ops[$k]}('{$v}')"; + break; + default: + // Shouldn't happen + } + } + } + } + + // ORDER BY + if (is_array($orderby) && sizeof($orderby) > 0) { + $sql .= " ORDER BY "; + $first = true; + foreach ($orderby as $k => $v) { + if ($first) $first = false; + else $sql .= ', '; + if (preg_match('/^[0-9]+$/', $k)) { + $sql .= $k; + } + else { + $this->fieldClean($k); + $sql .= '"' . $k . '"'; + } + if (strtoupper($v) == 'DESC') $sql .= " DESC"; + } + } + + return $sql; + } + + /** + * Returns a recordset of all columns in a query. Supports paging. + * @param $type Either 'QUERY' if it is an SQL query, or 'TABLE' if it is a table identifier, + * or 'SELECT" if it's a select query + * @param $table The base table of the query. NULL for no table. + * @param $query The query that is being executed. NULL for no query. + * @param $sortkey The column number to sort by, or '' or null for no sorting + * @param $sortdir The direction in which to sort the specified column ('asc' or 'desc') + * @param $page The page of the relation to retrieve + * @param $page_size The number of rows per page + * @param &$max_pages (return-by-ref) The max number of pages in the relation + * @return A recordset on success + * @return -1 transaction error + * @return -2 counting error + * @return -3 page or page_size invalid + * @return -4 unknown type + * @return -5 failed setting transaction read only + */ + function browseQuery($type, $table, $query, $sortkey, $sortdir, $page, $page_size, &$max_pages) { + // Check that we're not going to divide by zero + if (!is_numeric($page_size) || $page_size != (int)$page_size || $page_size <= 0) return -3; + + // If $type is TABLE, then generate the query + switch ($type) { + case 'TABLE': + if (preg_match('/^[0-9]+$/', $sortkey) && $sortkey > 0) $orderby = array($sortkey => $sortdir); + else $orderby = array(); + $query = $this->getSelectSQL($table, array(), array(), array(), $orderby); + break; + case 'QUERY': + case 'SELECT': + // Trim query + $query = trim($query); + // Trim off trailing semi-colon if there is one + if (substr($query, strlen($query) - 1, 1) == ';') + $query = substr($query, 0, strlen($query) - 1); + break; + default: + return -4; + } + + // Generate count query + $count = "SELECT COUNT(*) AS total FROM ($query) AS sub"; + + // Open a transaction + $status = $this->beginTransaction(); + if ($status != 0) return -1; + + // If backend supports read only queries, then specify read only mode + // to avoid side effects from repeating queries that do writes. + if ($this->hasReadOnlyQueries()) { + $status = $this->execute("SET TRANSACTION READ ONLY"); + if ($status != 0) { + $this->rollbackTransaction(); + return -5; + } + } + + + // Count the number of rows + $total = $this->browseQueryCount($query, $count); + if ($total < 0) { + $this->rollbackTransaction(); + return -2; + } + + // Calculate max pages + $max_pages = ceil($total / $page_size); + + // Check that page is less than or equal to max pages + if (!is_numeric($page) || $page != (int)$page || $page > $max_pages || $page < 1) { + $this->rollbackTransaction(); + return -3; + } + + // Set fetch mode to NUM so that duplicate field names are properly returned + // for non-table queries. Since the SELECT feature only allows selecting one + // table, duplicate fields shouldn't appear. + if ($type == 'QUERY') $this->conn->setFetchMode(ADODB_FETCH_NUM); + + // Figure out ORDER BY. Sort key is always the column number (based from one) + // of the column to order by. Only need to do this for non-TABLE queries + if ($type != 'TABLE' && preg_match('/^[0-9]+$/', $sortkey) && $sortkey > 0) { + $orderby = " ORDER BY {$sortkey}"; + // Add sort order + if ($sortdir == 'desc') + $orderby .= ' DESC'; + else + $orderby .= ' ASC'; + } + else $orderby = ''; + + // Actually retrieve the rows, with offset and limit + $rs = $this->selectSet("SELECT * FROM ({$query}) AS sub {$orderby} LIMIT {$page_size} OFFSET " . ($page - 1) * $page_size); + $status = $this->endTransaction(); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + return $rs; + } + + /** + * Finds the number of rows that would be returned by a + * query. + * @param $query The SQL query + * @param $count The count query + * @return The count of rows + * @return -1 error + */ + function browseQueryCount($query, $count) { + return $this->selectField($count, 'total'); + } + + /** + * Returns a recordset of all columns in a table + * @param $table The name of a table + * @param $key The associative array holding the key to retrieve + * @return A recordset + */ + function browseRow($table, $key) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + + $sql = "SELECT * FROM \"{$f_schema}\".\"{$table}\""; + if (is_array($key) && sizeof($key) > 0) { + $sql .= " WHERE true"; + foreach ($key as $k => $v) { + $this->fieldClean($k); + $this->clean($v); + $sql .= " AND \"{$k}\"='{$v}'"; + } + } + + return $this->selectSet($sql); + } + + // Type conversion routines + + /** + * Change the value of a parameter to 't' or 'f' depending on whether it evaluates to true or false + * @param $parameter the parameter + */ + function dbBool(&$parameter) { + if ($parameter) $parameter = 't'; + else $parameter = 'f'; + + return $parameter; + } + + /** + * Change a parameter from 't' or 'f' to a boolean, (others evaluate to false) + * @param $parameter the parameter + */ + function phpBool($parameter) { + $parameter = ($parameter == 't'); + return $parameter; + } + + // interfaces Statistics collector functions + + /** + * Fetches statistics for a database + * @param $database The database to fetch stats for + * @return A recordset + */ + function getStatsDatabase($database) { + $this->clean($database); + + $sql = "SELECT * FROM pg_stat_database WHERE datname='{$database}'"; + + return $this->selectSet($sql); + } + + /** + * Fetches tuple statistics for a table + * @param $table The table to fetch stats for + * @return A recordset + */ + function getStatsTableTuples($table) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + $sql = "SELECT * FROM pg_stat_all_tables + WHERE schemaname='{$c_schema}' AND relname='{$table}'"; + + return $this->selectSet($sql); + } + + /** + * Fetches I/0 statistics for a table + * @param $table The table to fetch stats for + * @return A recordset + */ + function getStatsTableIO($table) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + $sql = "SELECT * FROM pg_statio_all_tables + WHERE schemaname='{$c_schema}' AND relname='{$table}'"; + + return $this->selectSet($sql); + } + + /** + * Fetches tuple statistics for all indexes on a table + * @param $table The table to fetch index stats for + * @return A recordset + */ + function getStatsIndexTuples($table) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + $sql = "SELECT * FROM pg_stat_all_indexes + WHERE schemaname='{$c_schema}' AND relname='{$table}' ORDER BY indexrelname"; + + return $this->selectSet($sql); + } + + /** + * Fetches I/0 statistics for all indexes on a table + * @param $table The table to fetch index stats for + * @return A recordset + */ + function getStatsIndexIO($table) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + $sql = "SELECT * FROM pg_statio_all_indexes + WHERE schemaname='{$c_schema}' AND relname='{$table}' + ORDER BY indexrelname"; + + return $this->selectSet($sql); + } + + // Capabilities + + function hasAggregateSortOp() { return true; } + function hasAlterAggregate() { return true; } + function hasAlterColumnType() { return true; } + function hasAlterDatabaseOwner() { return true; } + function hasAlterDatabaseRename() { return true; } + function hasAlterSchema() { return true; } + function hasAlterSchemaOwner() { return true; } + function hasAlterSequenceSchema() { return true; } + function hasAlterSequenceStart() { return true; } + function hasAlterTableSchema() { return true; } + function hasAutovacuum() { return true; } + function hasCreateTableLike() { return true; } + function hasCreateTableLikeWithConstraints() { return true; } + function hasCreateTableLikeWithIndexes() { return true; } + function hasCreateFieldWithConstraints() { return true; } + function hasDisableTriggers() { return true; } + function hasAlterDomains() { return true; } + function hasDomainConstraints() { return true; } + function hasEnumTypes() { return true; } + function hasFTS() { return true; } + function hasFunctionAlterOwner() { return true; } + function hasFunctionAlterSchema() { return true; } + function hasFunctionCosting() { return true; } + function hasFunctionGUC() { return true; } + function hasGrantOption() { return true; } + function hasNamedParams() { return true; } + function hasPrepare() { return true; } + function hasPreparedXacts() { return true; } + function hasReadOnlyQueries() { return true; } + function hasRecluster() { return true; } + function hasRoles() { return true; } + function hasServerAdminFuncs() { return true; } + function hasSharedComments() { return true; } + function hasQueryCancel() { return true; } + function hasTablespaces() { return true; } + function hasUserRename() { return true; } + function hasVirtualTransactionId() { return true; } + function hasAlterDatabase() { return $this->hasAlterDatabaseRename(); } + function hasDatabaseCollation() { return true; } + function hasMagicTypes() { return true; } + function hasQueryKill() { return true; } + function hasConcurrentIndexBuild() { return true; } + function hasForceReindex() { return false; } + +} +?> diff --git a/php/pgadmin/classes/database/Postgres74.php b/php/pgadmin/classes/database/Postgres74.php new file mode 100644 index 0000000..c4f2c28 --- /dev/null +++ b/php/pgadmin/classes/database/Postgres74.php @@ -0,0 +1,627 @@ + array('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'RULE', 'REFERENCES', 'TRIGGER', 'ALL PRIVILEGES'), + 'view' => array('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'RULE', 'REFERENCES', 'TRIGGER', 'ALL PRIVILEGES'), + 'sequence' => array('SELECT', 'UPDATE', 'ALL PRIVILEGES'), + 'database' => array('CREATE', 'TEMPORARY', 'ALL PRIVILEGES'), + 'function' => array('EXECUTE', 'ALL PRIVILEGES'), + 'language' => array('USAGE', 'ALL PRIVILEGES'), + 'schema' => array('CREATE', 'USAGE', 'ALL PRIVILEGES') + ); + + + /** + * Constructor + * @param $conn The database connection + */ + function Postgres74($conn) { + $this->Postgres80($conn); + } + + // Help functions + + function getHelpPages() { + include_once('./help/PostgresDoc74.php'); + return $this->help_page; + } + + // Database functions + + /** + * Alters a database + * the multiple return vals are for postgres 8+ which support more functionality in alter database + * @param $dbName The name of the database + * @param $newName new name for the database + * @param $newOwner The new owner for the database + * @return 0 success + * @return -1 transaction error + * @return -2 owner error + * @return -3 rename error + */ + function alterDatabase($dbName, $newName, $newOwner = '', $comment = '') { + //ignore $newowner, not supported pre 8.0 + //ignore $comment, not supported pre 8.2 + $this->clean($dbName); + $this->clean($newName); + + $status = $this->alterDatabaseRename($dbName, $newName); + if ($status != 0) return -3; + else return 0; + } + + /** + * Return all database available on the server + * @return A list of databases, sorted alphabetically + */ + function getDatabases($currentdatabase = NULL) { + global $conf, $misc; + + $server_info = $misc->getServerInfo(); + + if (isset($conf['owned_only']) && $conf['owned_only'] && !$this->isSuperUser($server_info['username'])) { + $username = $server_info['username']; + $this->clean($username); + $clause = " AND pu.usename='{$username}'"; + } + else $clause = ''; + + if ($currentdatabase != NULL) { + $this->clean($currentdatabase); + $orderby = "ORDER BY pdb.datname = '{$currentdatabase}' DESC, pdb.datname"; + } + else + $orderby = "ORDER BY pdb.datname"; + + if (!$conf['show_system']) + $where = ' AND NOT pdb.datistemplate'; + else + $where = ' AND pdb.datallowconn'; + + $sql = "SELECT pdb.datname AS datname, pu.usename AS datowner, pg_encoding_to_char(encoding) AS datencoding, + (SELECT description FROM pg_description pd WHERE pdb.oid=pd.objoid) AS datcomment + FROM pg_database pdb, pg_user pu + WHERE pdb.datdba = pu.usesysid + {$where} + {$clause} + {$orderby}"; + + return $this->selectSet($sql); + } + + /** + * Searches all system catalogs to find objects that match a certain name. + * @param $term The search term + * @param $filter The object type to restrict to ('' means no restriction) + * @return A recordset + */ + function findObject($term, $filter) { + global $conf; + + /*about escaping: + * SET standard_conforming_string is not available before 8.2 + * So we must use PostgreSQL specific notation :/ + * E'' notation is not available before 8.1 + * $$ is available since 8.0 + * Nothing specific from 7.4 + **/ + + // Escape search term for ILIKE match + $term = str_replace('_', '\\_', $term); + $term = str_replace('%', '\\%', $term); + $this->clean($term); + $this->clean($filter); + + // Exclude system relations if necessary + if (!$conf['show_system']) { + // XXX: The mention of information_schema here is in the wrong place, but + // it's the quickest fix to exclude the info schema from 7.4 + $where = " AND pn.nspname NOT LIKE 'pg\\\\_%' AND pn.nspname != 'information_schema'"; + $lan_where = "AND pl.lanispl"; + } + else { + $where = ''; + $lan_where = ''; + } + + // Apply outer filter + $sql = ''; + if ($filter != '') { + $sql = "SELECT * FROM ("; + } + + $sql .= " + SELECT 'SCHEMA' AS type, oid, NULL AS schemaname, NULL AS relname, nspname AS name + FROM pg_catalog.pg_namespace pn WHERE nspname ILIKE '%{$term}%' {$where} + UNION ALL + SELECT CASE WHEN relkind='r' THEN 'TABLE' WHEN relkind='v' THEN 'VIEW' WHEN relkind='S' THEN 'SEQUENCE' END, pc.oid, + pn.nspname, NULL, pc.relname FROM pg_catalog.pg_class pc, pg_catalog.pg_namespace pn + WHERE pc.relnamespace=pn.oid AND relkind IN ('r', 'v', 'S') AND relname ILIKE '%{$term}%' {$where} + UNION ALL + SELECT CASE WHEN pc.relkind='r' THEN 'COLUMNTABLE' ELSE 'COLUMNVIEW' END, NULL, pn.nspname, pc.relname, pa.attname FROM pg_catalog.pg_class pc, pg_catalog.pg_namespace pn, + pg_catalog.pg_attribute pa WHERE pc.relnamespace=pn.oid AND pc.oid=pa.attrelid + AND pa.attname ILIKE '%{$term}%' AND pa.attnum > 0 AND NOT pa.attisdropped AND pc.relkind IN ('r', 'v') {$where} + UNION ALL + SELECT 'FUNCTION', pp.oid, pn.nspname, NULL, pp.proname || '(' || pg_catalog.oidvectortypes(pp.proargtypes) || ')' FROM pg_catalog.pg_proc pp, pg_catalog.pg_namespace pn + WHERE pp.pronamespace=pn.oid AND NOT pp.proisagg AND pp.proname ILIKE '%{$term}%' {$where} + UNION ALL + SELECT 'INDEX', NULL, pn.nspname, pc.relname, pc2.relname FROM pg_catalog.pg_class pc, pg_catalog.pg_namespace pn, + pg_catalog.pg_index pi, pg_catalog.pg_class pc2 WHERE pc.relnamespace=pn.oid AND pc.oid=pi.indrelid + AND pi.indexrelid=pc2.oid + AND NOT EXISTS ( + SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c + ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) + WHERE d.classid = pc2.tableoid AND d.objid = pc2.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p') + ) + AND pc2.relname ILIKE '%{$term}%' {$where} + UNION ALL + SELECT 'CONSTRAINTTABLE', NULL, pn.nspname, pc.relname, pc2.conname FROM pg_catalog.pg_class pc, pg_catalog.pg_namespace pn, + pg_catalog.pg_constraint pc2 WHERE pc.relnamespace=pn.oid AND pc.oid=pc2.conrelid AND pc2.conrelid != 0 + AND CASE WHEN pc2.contype IN ('f', 'c') THEN TRUE ELSE NOT EXISTS ( + SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c + ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) + WHERE d.classid = pc2.tableoid AND d.objid = pc2.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p') + ) END + AND pc2.conname ILIKE '%{$term}%' {$where} + UNION ALL + SELECT 'CONSTRAINTDOMAIN', pt.oid, pn.nspname, pt.typname, pc.conname FROM pg_catalog.pg_type pt, pg_catalog.pg_namespace pn, + pg_catalog.pg_constraint pc WHERE pt.typnamespace=pn.oid AND pt.oid=pc.contypid AND pc.contypid != 0 + AND pc.conname ILIKE '%{$term}%' {$where} + UNION ALL + SELECT 'TRIGGER', NULL, pn.nspname, pc.relname, pt.tgname FROM pg_catalog.pg_class pc, pg_catalog.pg_namespace pn, + pg_catalog.pg_trigger pt WHERE pc.relnamespace=pn.oid AND pc.oid=pt.tgrelid + AND ( pt.tgisconstraint = 'f' OR NOT EXISTS + (SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c + ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) + WHERE d.classid = pt.tableoid AND d.objid = pt.oid AND d.deptype = 'i' AND c.contype = 'f')) + AND pt.tgname ILIKE '%{$term}%' {$where} + UNION ALL + SELECT 'RULETABLE', NULL, pn.nspname AS schemaname, c.relname AS tablename, r.rulename FROM pg_catalog.pg_rewrite r + JOIN pg_catalog.pg_class c ON c.oid = r.ev_class + LEFT JOIN pg_catalog.pg_namespace pn ON pn.oid = c.relnamespace + WHERE c.relkind='r' AND r.rulename != '_RETURN' AND r.rulename ILIKE '%{$term}%' {$where} + UNION ALL + SELECT 'RULEVIEW', NULL, pn.nspname AS schemaname, c.relname AS tablename, r.rulename FROM pg_catalog.pg_rewrite r + JOIN pg_catalog.pg_class c ON c.oid = r.ev_class + LEFT JOIN pg_catalog.pg_namespace pn ON pn.oid = c.relnamespace + WHERE c.relkind='v' AND r.rulename != '_RETURN' AND r.rulename ILIKE '%{$term}%' {$where} + "; + + // Add advanced objects if show_advanced is set + if ($conf['show_advanced']) { + $sql .= " + UNION ALL + SELECT CASE WHEN pt.typtype='d' THEN 'DOMAIN' ELSE 'TYPE' END, pt.oid, pn.nspname, NULL, + pt.typname FROM pg_catalog.pg_type pt, pg_catalog.pg_namespace pn + WHERE pt.typnamespace=pn.oid AND typname ILIKE '%{$term}%' + AND (pt.typrelid = 0 OR (SELECT c.relkind = 'c' FROM pg_catalog.pg_class c WHERE c.oid = pt.typrelid)) + {$where} + UNION ALL + SELECT 'OPERATOR', po.oid, pn.nspname, NULL, po.oprname FROM pg_catalog.pg_operator po, pg_catalog.pg_namespace pn + WHERE po.oprnamespace=pn.oid AND oprname ILIKE '%{$term}%' {$where} + UNION ALL + SELECT 'CONVERSION', pc.oid, pn.nspname, NULL, pc.conname FROM pg_catalog.pg_conversion pc, + pg_catalog.pg_namespace pn WHERE pc.connamespace=pn.oid AND conname ILIKE '%{$term}%' {$where} + UNION ALL + SELECT 'LANGUAGE', pl.oid, NULL, NULL, pl.lanname FROM pg_catalog.pg_language pl + WHERE lanname ILIKE '%{$term}%' {$lan_where} + UNION ALL + SELECT DISTINCT ON (p.proname) 'AGGREGATE', p.oid, pn.nspname, NULL, p.proname FROM pg_catalog.pg_proc p + LEFT JOIN pg_catalog.pg_namespace pn ON p.pronamespace=pn.oid + WHERE p.proisagg AND p.proname ILIKE '%{$term}%' {$where} + UNION ALL + SELECT DISTINCT ON (po.opcname) 'OPCLASS', po.oid, pn.nspname, NULL, po.opcname FROM pg_catalog.pg_opclass po, + pg_catalog.pg_namespace pn WHERE po.opcnamespace=pn.oid + AND po.opcname ILIKE '%{$term}%' {$where} + "; + } + // Otherwise just add domains + else { + $sql .= " + UNION ALL + SELECT 'DOMAIN', pt.oid, pn.nspname, NULL, + pt.typname FROM pg_catalog.pg_type pt, pg_catalog.pg_namespace pn + WHERE pt.typnamespace=pn.oid AND pt.typtype='d' AND typname ILIKE '%{$term}%' + AND (pt.typrelid = 0 OR (SELECT c.relkind = 'c' FROM pg_catalog.pg_class c WHERE c.oid = pt.typrelid)) + {$where} + "; + } + + if ($filter != '') { + // We use like to make RULE, CONSTRAINT and COLUMN searches work + $sql .= ") AS sub WHERE type LIKE '{$filter}%' "; + } + + $sql .= "ORDER BY type, schemaname, relname, name"; + + return $this->selectSet($sql); + } + + // Database functions + + /** + * Returns table locks information in the current database + * @return A recordset + */ + function getLocks() { + global $conf; + + if (!$conf['show_system']) + $where = "AND pn.nspname NOT LIKE 'pg\\\\_%'"; + else + $where = "AND nspname !~ '^pg_t(emp_[0-9]+|oast)$'"; + + $sql = "SELECT pn.nspname, pc.relname AS tablename, pl.transaction, pl.pid, pl.mode, pl.granted + FROM pg_catalog.pg_locks pl, pg_catalog.pg_class pc, pg_catalog.pg_namespace pn + WHERE pl.relation = pc.oid AND pc.relnamespace=pn.oid {$where} + ORDER BY nspname,tablename"; + + return $this->selectSet($sql); + } + + // Table functions + + /** + * Protected method which alter a table + * SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION + * @param $tblrs The table recordSet returned by getTable() + * @param $name The new name for the table + * @param $owner The new owner for the table + * @param $schema The new schema for the table + * @param $comment The comment on the table + * @param $tablespace The new tablespace for the table ('' means leave as is) + * @return 0 success + * @return -3 rename error + * @return -4 comment error + * @return -5 owner error + */ + protected + function _alterTable($tblrs, $name, $owner, $schema, $comment, $tablespace) { + + /* $schema and tablespace not supported in pg74- */ + $this->fieldArrayClean($tblrs->fields); + + // Comment + $status = $this->setComment('TABLE', '', $tblrs->fields['relname'], $comment); + if ($status != 0) return -4; + + // Owner + $this->fieldClean($owner); + $status = $this->alterTableOwner($tblrs, $owner); + if ($status != 0) return -5; + + // Rename + $this->fieldClean($name); + $status = $this->alterTableName($tblrs, $name); + if ($status != 0) return -3; + + return 0; + } + + /** + * Alters a column in a table OR view + * @param $table The table in which the column resides + * @param $column The column to alter + * @param $name The new name for the column + * @param $notnull (boolean) True if not null, false otherwise + * @param $oldnotnull (boolean) True if column is already not null, false otherwise + * @param $default The new default for the column + * @param $olddefault The old default for the column + * @param $type The new type for the column + * @param $array True if array type, false otherwise + * @param $length The optional size of the column (ie. 30 for varchar(30)) + * @param $oldtype The old type for the column + * @param $comment Comment for the column + * @return 0 success + * @return -2 set not null error + * @return -3 set default error + * @return -4 rename column error + * @return -5 comment error + * @return -6 transaction error + */ + function alterColumn($table, $column, $name, $notnull, $oldnotnull, $default, $olddefault, + $type, $length, $array, $oldtype, $comment) + { + $status = $this->beginTransaction(); + if ($status != 0) return -1; + + // @@ NEED TO HANDLE "NESTED" TRANSACTION HERE + if ($notnull != $oldnotnull) { + $status = $this->setColumnNull($table, $column, !$notnull); + if ($status != 0) { + $this->rollbackTransaction(); + return -2; + } + } + + // Set default, if it has changed + if ($default != $olddefault) { + if ($default == '') + $status = $this->dropColumnDefault($table, $column); + else + $status = $this->setColumnDefault($table, $column, $default); + + if ($status != 0) { + $this->rollbackTransaction(); + return -3; + } + } + + // Rename the column, if it has been changed + if ($column != $name) { + $status = $this->renameColumn($table, $column, $name); + if ($status != 0) { + $this->rollbackTransaction(); + return -4; + } + } + + // The $name and $table parameters must be cleaned for the setComment function. + // It's ok to do that here since this is the last time these variables are used. + $this->fieldClean($name); + $this->fieldClean($table); + $status = $this->setComment('COLUMN', $name, $table, $comment); + if ($status != 0) { + $this->rollbackTransaction(); + return -5; + } + + return $this->endTransaction(); + } + + /** + * Returns table information + * @param $table The name of the table + * @return A recordset + */ + function getTable($table) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + $sql = " + SELECT + c.relname, n.nspname, u.usename AS relowner, + pg_catalog.obj_description(c.oid, 'pg_class') AS relcomment + FROM pg_catalog.pg_class c + LEFT JOIN pg_catalog.pg_user u ON u.usesysid = c.relowner + LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace + WHERE c.relkind = 'r' + AND n.nspname = '{$c_schema}' + AND c.relname = '{$table}'"; + + return $this->selectSet($sql); + } + + /** + * Return all tables in current database (and schema) + * @param $all True to fetch all tables, false for just in current schema + * @return All tables, sorted alphabetically + */ + function getTables($all = false) { + $c_schema = $this->_schema; + $this->clean($c_schema); + if ($all) { + // Exclude pg_catalog and information_schema tables + $sql = "SELECT schemaname AS nspname, tablename AS relname, tableowner AS relowner + FROM pg_catalog.pg_tables + WHERE schemaname NOT IN ('pg_catalog', 'information_schema', 'pg_toast') + ORDER BY schemaname, tablename"; + } else { + $sql = "SELECT c.relname, pg_catalog.pg_get_userbyid(c.relowner) AS relowner, + pg_catalog.obj_description(c.oid, 'pg_class') AS relcomment, + reltuples::bigint + FROM pg_catalog.pg_class c + LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace + WHERE c.relkind = 'r' + AND nspname='{$c_schema}' + ORDER BY c.relname"; + } + + return $this->selectSet($sql); + } + + /** + * Returns the current default_with_oids setting + * @return default_with_oids setting + */ + function getDefaultWithOid() { + // 8.0 is the first release to have this setting + // Prior releases don't have this setting... oids always activated + return 'on'; + } + + // Constraint functions + + /** + * Returns a list of all constraints on a table, + * including constraint name, definition, related col and referenced namespace, + * table and col if needed + * @param $table the table where we are looking for fk + * @return a recordset + */ + function getConstraintsWithFields($table) { + + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + // get the max number of col used in a constraint for the table + $sql = "SELECT DISTINCT + max(SUBSTRING(array_dims(c.conkey) FROM '^\\\\[.*:(.*)\\\\]$')) as nb + FROM pg_catalog.pg_constraint AS c + JOIN pg_catalog.pg_class AS r ON (c.conrelid=r.oid) + JOIN pg_catalog.pg_namespace AS ns ON (r.relnamespace=ns.oid) + WHERE + r.relname = '{$table}' AND ns.nspname='{$c_schema}'"; + + $rs = $this->selectSet($sql); + + if ($rs->EOF) $max_col = 0; + else $max_col = $rs->fields['nb']; + + $sql = ' + SELECT + c.oid AS conid, c.contype, c.conname, pg_catalog.pg_get_constraintdef(c.oid, true) AS consrc, + ns1.nspname as p_schema, r1.relname as p_table, ns2.nspname as f_schema, + r2.relname as f_table, f1.attname as p_field, f1.attnum AS p_attnum, f2.attname as f_field, + f2.attnum AS f_attnum, pg_catalog.obj_description(c.oid, \'pg_constraint\') AS constcomment, + c.conrelid, c.confrelid + FROM + pg_catalog.pg_constraint AS c + JOIN pg_catalog.pg_class AS r1 ON (c.conrelid=r1.oid) + JOIN pg_catalog.pg_attribute AS f1 ON (f1.attrelid=r1.oid AND (f1.attnum=c.conkey[1]'; + for ($i = 2; $i <= $rs->fields['nb']; $i++) { + $sql.= " OR f1.attnum=c.conkey[$i]"; + } + $sql.= ')) + JOIN pg_catalog.pg_namespace AS ns1 ON r1.relnamespace=ns1.oid + LEFT JOIN ( + pg_catalog.pg_class AS r2 JOIN pg_catalog.pg_namespace AS ns2 ON (r2.relnamespace=ns2.oid) + ) ON (c.confrelid=r2.oid) + LEFT JOIN pg_catalog.pg_attribute AS f2 ON + (f2.attrelid=r2.oid AND ((c.confkey[1]=f2.attnum AND c.conkey[1]=f1.attnum)'; + for ($i = 2; $i <= $rs->fields['nb']; $i++) + $sql.= " OR (c.confkey[$i]=f2.attnum AND c.conkey[$i]=f1.attnum)"; + + $sql .= sprintf(")) + WHERE + r1.relname = '%s' AND ns1.nspname='%s' + ORDER BY 1", $table, $c_schema); + + return $this->selectSet($sql); + } + + // Sequence functions + + /** + * Returns all sequences in the current database + * @return A recordset + */ + function getSequences($all = false) { + $c_schema = $this->_schema; + $this->clean($c_schema); + if ($all) { + // Exclude pg_catalog and information_schema tables + $sql = "SELECT n.nspname, c.relname AS seqname, u.usename AS seqowner + FROM pg_catalog.pg_class c, pg_catalog.pg_user u, pg_catalog.pg_namespace n + WHERE c.relowner=u.usesysid AND c.relnamespace=n.oid + AND c.relkind = 'S' + AND n.nspname NOT IN ('pg_catalog', 'information_schema', 'pg_toast') + ORDER BY nspname, seqname"; + } else { + $sql = "SELECT c.relname AS seqname, u.usename AS seqowner, pg_catalog.obj_description(c.oid, 'pg_class') AS seqcomment + FROM pg_catalog.pg_class c, pg_catalog.pg_user u, pg_catalog.pg_namespace n + WHERE c.relowner=u.usesysid AND c.relnamespace=n.oid + AND c.relkind = 'S' AND n.nspname='{$c_schema}' ORDER BY seqname"; + } + + return $this->selectSet( $sql ); + } + + // Function functions + + /** + * Returns all details for a particular function + * @param $func The name of the function to retrieve + * @return Function info + */ + function getFunction($function_oid) { + $this->clean($function_oid); + + $sql = " + SELECT + pc.oid AS prooid, + proname, + pg_catalog.pg_get_userbyid(proowner) AS proowner, + nspname as proschema, + lanname as prolanguage, + pg_catalog.format_type(prorettype, NULL) as proresult, + prosrc, + probin, + proretset, + proisstrict, + provolatile, + prosecdef, + pg_catalog.oidvectortypes(pc.proargtypes) AS proarguments, + pg_catalog.obj_description(pc.oid, 'pg_proc') AS procomment + FROM + pg_catalog.pg_proc pc, pg_catalog.pg_language pl, pg_catalog.pg_namespace n + WHERE + pc.oid = '$function_oid'::oid + AND pc.prolang = pl.oid + AND n.oid = pc.pronamespace + "; + + return $this->selectSet($sql); + } + + /** + * Returns a list of all casts in the database + * @return All casts + */ + function getCasts() { + global $conf; + + if ($conf['show_system']) + $where = ''; + else + $where = " + AND n1.nspname NOT LIKE 'pg\\\\_%' + AND n2.nspname NOT LIKE 'pg\\\\_%' + AND n3.nspname NOT LIKE 'pg\\\\_%' + "; + + $sql = " + SELECT + c.castsource::pg_catalog.regtype AS castsource, + c.casttarget::pg_catalog.regtype AS casttarget, + CASE WHEN c.castfunc=0 THEN NULL + ELSE c.castfunc::pg_catalog.regprocedure END AS castfunc, + c.castcontext, + obj_description(c.oid, 'pg_cast') as castcomment + FROM + (pg_catalog.pg_cast c LEFT JOIN pg_catalog.pg_proc p ON c.castfunc=p.oid JOIN pg_catalog.pg_namespace n3 ON p.pronamespace=n3.oid), + pg_catalog.pg_type t1, + pg_catalog.pg_type t2, + pg_catalog.pg_namespace n1, + pg_catalog.pg_namespace n2 + WHERE + c.castsource=t1.oid + AND c.casttarget=t2.oid + AND t1.typnamespace=n1.oid + AND t2.typnamespace=n2.oid + {$where} + ORDER BY 1, 2 + "; + + return $this->selectSet($sql); + } + + // Capabilities + + function hasAlterColumnType() { return false; } + function hasCreateFieldWithConstraints() { return false; } + function hasAlterDatabaseOwner() { return false; } + function hasAlterSchemaOwner() { return false; } + function hasFunctionAlterOwner() { return false; } + function hasNamedParams() { return false; } + function hasQueryCancel() { return false; } + function hasTablespaces() { return false; } + function hasMagicTypes() { return false; } +} +?> diff --git a/php/pgadmin/classes/database/Postgres80.php b/php/pgadmin/classes/database/Postgres80.php new file mode 100644 index 0000000..c8eb5d3 --- /dev/null +++ b/php/pgadmin/classes/database/Postgres80.php @@ -0,0 +1,360 @@ + 'CP866', + 'EUC_CN' => 'GB2312', + 'EUC_JP' => 'EUC-JP', + 'EUC_KR' => 'EUC-KR', + 'EUC_TW' => 'EUC-TW', + 'ISO_8859_5' => 'ISO-8859-5', + 'ISO_8859_6' => 'ISO-8859-6', + 'ISO_8859_7' => 'ISO-8859-7', + 'ISO_8859_8' => 'ISO-8859-8', + 'JOHAB' => 'CP1361', + 'KOI8' => 'KOI8-R', + 'LATIN1' => 'ISO-8859-1', + 'LATIN2' => 'ISO-8859-2', + 'LATIN3' => 'ISO-8859-3', + 'LATIN4' => 'ISO-8859-4', + // The following encoding map is a known error in PostgreSQL < 7.2 + // See the constructor for Postgres72. + 'LATIN5' => 'ISO-8859-5', + 'LATIN6' => 'ISO-8859-10', + 'LATIN7' => 'ISO-8859-13', + 'LATIN8' => 'ISO-8859-14', + 'LATIN9' => 'ISO-8859-15', + 'LATIN10' => 'ISO-8859-16', + 'SQL_ASCII' => 'US-ASCII', + 'TCVN' => 'CP1258', + 'UNICODE' => 'UTF-8', + 'WIN' => 'CP1251', + 'WIN874' => 'CP874', + 'WIN1256' => 'CP1256' + ); + + /** + * Constructor + * @param $conn The database connection + */ + function Postgres80($conn) { + $this->Postgres81($conn); + } + + // Help functions + + function getHelpPages() { + include_once('./help/PostgresDoc80.php'); + return $this->help_page; + } + + // Database functions + + /** + * Return all database available on the server + * @return A list of databases, sorted alphabetically + */ + function getDatabases($currentdatabase = NULL) { + global $conf, $misc; + + $server_info = $misc->getServerInfo(); + + if (isset($conf['owned_only']) && $conf['owned_only'] && !$this->isSuperUser($server_info['username'])) { + $username = $server_info['username']; + $this->clean($username); + $clause = " AND pu.usename='{$username}'"; + } + else $clause = ''; + + if ($currentdatabase != NULL) { + $this->clean($currentdatabase); + $orderby = "ORDER BY pdb.datname = '{$currentdatabase}' DESC, pdb.datname"; + } + else + $orderby = "ORDER BY pdb.datname"; + + if (!$conf['show_system']) + $where = ' AND NOT pdb.datistemplate'; + else + $where = ' AND pdb.datallowconn'; + + $sql = "SELECT pdb.datname AS datname, pu.usename AS datowner, pg_encoding_to_char(encoding) AS datencoding, + (SELECT description FROM pg_description pd WHERE pdb.oid=pd.objoid) AS datcomment, + (SELECT spcname FROM pg_catalog.pg_tablespace pt WHERE pt.oid=pdb.dattablespace) AS tablespace + FROM pg_database pdb, pg_user pu + WHERE pdb.datdba = pu.usesysid + {$where} + {$clause} + {$orderby}"; + + return $this->selectSet($sql); + } + + // Schema functions + + /** + * Return all schemas in the current database. + * @return All schemas, sorted alphabetically + */ + function getSchemas() { + global $conf, $slony; + + if (!$conf['show_system']) { + $where = "WHERE nspname NOT LIKE 'pg@_%' ESCAPE '@' AND nspname != 'information_schema'"; + if (isset($slony) && $slony->isEnabled()) { + $temp = $slony->slony_schema; + $this->clean($temp); + $where .= " AND nspname != '{$temp}'"; + } + + } + else $where = "WHERE nspname !~ '^pg_t(emp_[0-9]+|oast)$'"; + $sql = " + SELECT pn.nspname, pu.usename AS nspowner, + pg_catalog.obj_description(pn.oid, 'pg_namespace') AS nspcomment + FROM pg_catalog.pg_namespace pn + LEFT JOIN pg_catalog.pg_user pu ON (pn.nspowner = pu.usesysid) + {$where} + ORDER BY nspname"; + + return $this->selectSet($sql); + } + + /** + * Return all information relating to a schema + * @param $schema The name of the schema + * @return Schema information + */ + function getSchemaByName($schema) { + $this->clean($schema); + $sql = " + SELECT nspname, nspowner, u.usename AS ownername, nspacl, + pg_catalog.obj_description(pn.oid, 'pg_namespace') as nspcomment + FROM pg_catalog.pg_namespace pn + LEFT JOIN pg_shadow as u ON pn.nspowner = u.usesysid + WHERE nspname='{$schema}'"; + return $this->selectSet($sql); + } + + // Table functions + + /** + * Protected method which alter a table + * SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION + * @param $tblrs The table recordSet returned by getTable() + * @param $name The new name for the table + * @param $owner The new owner for the table + * @param $schema The new schema for the table + * @param $comment The comment on the table + * @param $tablespace The new tablespace for the table ('' means leave as is) + * @return 0 success + * @return -3 rename error + * @return -4 comment error + * @return -5 owner error + * @return -6 tablespace error + */ + protected + function _alterTable($tblrs, $name, $owner, $schema, $comment, $tablespace) { + + /* $schema not supported in pg80- */ + + // Comment + $status = $this->setComment('TABLE', '', $tblrs->fields['relname'], $comment); + if ($status != 0) return -4; + + // Owner + $this->fieldClean($owner); + $status = $this->alterTableOwner($tblrs, $owner); + if ($status != 0) return -5; + + // Tablespace + $this->fieldClean($tablespace); + $status = $this->alterTableTablespace($tblrs, $tablespace); + if ($status != 0) return -6; + + // Rename + $this->fieldClean($name); + $status = $this->alterTableName($tblrs, $name); + if ($status != 0) return -3; + + return 0; + } + + // View functions + + /** + * Protected method which alter a view + * SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION + * @param $vwrs The view recordSet returned by getView() + * @param $name The new name for the view + * @param $owner The new owner for the view + * @param $comment The comment on the view + * @return 0 success + * @return -3 rename error + * @return -4 comment error + * @return -5 owner error + */ + protected + function _alterView($vwrs, $name, $owner, $schema, $comment) { + + /* $schema not supported in pg80- */ + $this->fieldArrayClean($vwrs->fields); + + // Comment + if ($this->setComment('VIEW', $vwrs->fields['relname'], '', $comment) != 0) + return -4; + + // Owner + $this->fieldClean($owner); + $status = $this->alterViewOwner($vwrs, $owner); + if ($status != 0) return -5; + + // Rename + $this->fieldClean($name); + $status = $this->alterViewName($vwrs, $name); + if ($status != 0) return -3; + + return 0; + } + + // Sequence functions + + /** + * Protected method which alter a sequence + * SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION + * @param $seqrs The sequence recordSet returned by getSequence() + * @param $name The new name for the sequence + * @param $comment The comment on the sequence + * @param $owner The new owner for the sequence + * @param $schema The new schema for the sequence + * @param $increment The increment + * @param $minvalue The min value + * @param $maxvalue The max value + * @param $restartvalue The starting value + * @param $cachevalue The cache value + * @param $cycledvalue True if cycled, false otherwise + * @param $startvalue The sequence start value when issueing a restart + * @return 0 success + * @return -3 rename error + * @return -4 comment error + * @return -5 owner error + * @return -6 get sequence props error + * @return -7 schema error + */ + protected + function _alterSequence($seqrs, $name, $comment, $owner, $schema, $increment, + $minvalue, $maxvalue, $restartvalue, $cachevalue, $cycledvalue, $startvalue) { + + /* $schema not supported in pg80- */ + $this->fieldArrayClean($seqrs->fields); + + // Comment + $status = $this->setComment('SEQUENCE', $seqrs->fields['seqname'], '', $comment); + if ($status != 0) + return -4; + + // Owner + $this->fieldClean($owner); + $status = $this->alterSequenceOwner($seqrs, $owner); + if ($status != 0) + return -5; + + // Props + $this->clean($increment); + $this->clean($minvalue); + $this->clean($maxvalue); + $this->clean($restartvalue); + $this->clean($cachevalue); + $this->clean($cycledvalue); + $this->clean($startvalue); + $status = $this->alterSequenceProps($seqrs, $increment, $minvalue, + $maxvalue, $restartvalue, $cachevalue, $cycledvalue, null); + if ($status != 0) + return -6; + + // Rename + $this->fieldClean($name); + $status = $this->alterSequenceName($seqrs, $name); + if ($status != 0) + return -3; + + return 0; + } + + // Role, User/group functions + + /** + * Changes a user's password + * @param $username The username + * @param $password The new password + * @return 0 success + */ + function changePassword($username, $password) { + $enc = $this->_encryptPassword($username, $password); + $this->fieldClean($username); + $this->clean($enc); + + $sql = "ALTER USER \"{$username}\" WITH ENCRYPTED PASSWORD '{$enc}'"; + + return $this->execute($sql); + } + + // Aggregate functions + + /** + * Gets all information for an aggregate + * @param $name The name of the aggregate + * @param $basetype The input data type of the aggregate + * @return A recordset + */ + function getAggregate($name, $basetype) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($name); + $this->clean($basetype); + + $sql = " + SELECT p.proname, + CASE p.proargtypes[0] + WHEN 'pg_catalog.\"any\"'::pg_catalog.regtype THEN NULL + ELSE pg_catalog.format_type(p.proargtypes[0], NULL) + END AS proargtypes, a.aggtransfn, format_type(a.aggtranstype, NULL) AS aggstype, + a.aggfinalfn, a.agginitval, u.usename, pg_catalog.obj_description(p.oid, 'pg_proc') AS aggrcomment + FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n, pg_catalog.pg_user u, pg_catalog.pg_aggregate a + WHERE n.oid = p.pronamespace AND p.proowner=u.usesysid AND p.oid=a.aggfnoid + AND p.proisagg AND n.nspname='{$c_schema}' + AND p.proname='{$name}' + AND CASE p.proargtypes[0] + WHEN 'pg_catalog.\"any\"'::pg_catalog.regtype THEN '' + ELSE pg_catalog.format_type(p.proargtypes[0], NULL) + END ='{$basetype}'"; + + return $this->selectSet($sql); + } + + // Capabilities + + function hasAggregateSortOp() { return false; } + function hasAlterTableSchema() { return false; } + function hasAutovacuum() { return false; } + function hasDisableTriggers() { return false; } + function hasFunctionAlterSchema() { return false; } + function hasPreparedXacts() { return false; } + function hasRoles() { return false; } + function hasAlterSequenceSchema() { return false; } + function hasServerAdminFuncs() { return false; } +} +?> diff --git a/php/pgadmin/classes/database/Postgres81.php b/php/pgadmin/classes/database/Postgres81.php new file mode 100644 index 0000000..0e96461 --- /dev/null +++ b/php/pgadmin/classes/database/Postgres81.php @@ -0,0 +1,183 @@ + array('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'RULE', 'REFERENCES', 'TRIGGER', 'ALL PRIVILEGES'), + 'view' => array('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'RULE', 'REFERENCES', 'TRIGGER', 'ALL PRIVILEGES'), + 'sequence' => array('SELECT', 'UPDATE', 'ALL PRIVILEGES'), + 'database' => array('CREATE', 'TEMPORARY', 'ALL PRIVILEGES'), + 'function' => array('EXECUTE', 'ALL PRIVILEGES'), + 'language' => array('USAGE', 'ALL PRIVILEGES'), + 'schema' => array('CREATE', 'USAGE', 'ALL PRIVILEGES'), + 'tablespace' => array('CREATE', 'ALL PRIVILEGES') + ); + // List of characters in acl lists and the privileges they + // refer to. + var $privmap = array( + 'r' => 'SELECT', + 'w' => 'UPDATE', + 'a' => 'INSERT', + 'd' => 'DELETE', + 'R' => 'RULE', + 'x' => 'REFERENCES', + 't' => 'TRIGGER', + 'X' => 'EXECUTE', + 'U' => 'USAGE', + 'C' => 'CREATE', + 'T' => 'TEMPORARY' + ); + // Array of allowed index types + var $typIndexes = array('BTREE', 'RTREE', 'GIST', 'HASH'); + + /** + * Constructor + * @param $conn The database connection + */ + function Postgres81($conn) { + $this->Postgres82($conn); + } + + // Help functions + + function getHelpPages() { + include_once('./help/PostgresDoc81.php'); + return $this->help_page; + } + + // Database functions + + /** + * Returns all databases available on the server + * @return A list of databases, sorted alphabetically + */ + function getDatabases($currentdatabase = NULL) { + global $conf, $misc; + + $server_info = $misc->getServerInfo(); + + if (isset($conf['owned_only']) && $conf['owned_only'] && !$this->isSuperUser($server_info['username'])) { + $username = $server_info['username']; + $this->clean($username); + $clause = " AND pr.rolname='{$username}'"; + } + else $clause = ''; + + if ($currentdatabase != NULL) { + $this->clean($currentdatabase); + $orderby = "ORDER BY pdb.datname = '{$currentdatabase}' DESC, pdb.datname"; + } + else + $orderby = "ORDER BY pdb.datname"; + + if (!$conf['show_system']) + $where = ' AND NOT pdb.datistemplate'; + else + $where = ' AND pdb.datallowconn'; + + $sql = "SELECT pdb.datname AS datname, pr.rolname AS datowner, pg_encoding_to_char(encoding) AS datencoding, + (SELECT description FROM pg_catalog.pg_description pd WHERE pdb.oid=pd.objoid) AS datcomment, + (SELECT spcname FROM pg_catalog.pg_tablespace pt WHERE pt.oid=pdb.dattablespace) AS tablespace, + pg_catalog.pg_database_size(pdb.oid) as dbsize + FROM pg_catalog.pg_database pdb LEFT JOIN pg_catalog.pg_roles pr ON (pdb.datdba = pr.oid) + WHERE true + {$where} + {$clause} + {$orderby}"; + + return $this->selectSet($sql); + } + + /** + * Alters a database + * the multiple return vals are for postgres 8+ which support more functionality in alter database + * @param $dbName The name of the database + * @param $newName new name for the database + * @param $newOwner The new owner for the database + * @return 0 success + * @return -1 transaction error + * @return -2 owner error + * @return -3 rename error + */ + function alterDatabase($dbName, $newName, $newOwner = '', $comment = '') { + $this->clean($dbName); + $this->clean($newName); + $this->clean($newOwner); + //ignore $comment, not supported pre 8.2 + + $status = $this->beginTransaction(); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + if ($dbName != $newName) { + $status = $this->alterDatabaseRename($dbName, $newName); + if ($status != 0) { + $this->rollbackTransaction(); + return -3; + } + } + + $status = $this->alterDatabaseOwner($newName, $newOwner); + if ($status != 0) { + $this->rollbackTransaction(); + return -2; + } + return $this->endTransaction(); + } + + // Tablespace functions + + /** + * Retrieves a tablespace's information + * @return A recordset + */ + function getTablespace($spcname) { + $this->clean($spcname); + + $sql = "SELECT spcname, pg_catalog.pg_get_userbyid(spcowner) AS spcowner, spclocation + FROM pg_catalog.pg_tablespace WHERE spcname='{$spcname}'"; + + return $this->selectSet($sql); + } + + /** + * Retrieves information for all tablespaces + * @param $all Include all tablespaces (necessary when moving objects back to the default space) + * @return A recordset + */ + function getTablespaces($all = false) { + global $conf; + + $sql = "SELECT spcname, pg_catalog.pg_get_userbyid(spcowner) AS spcowner, spclocation + FROM pg_catalog.pg_tablespace"; + + if (!$conf['show_system'] && !$all) { + $sql .= ' WHERE spcname NOT LIKE $$pg\_%$$'; + } + + $sql .= " ORDER BY spcname"; + + return $this->selectSet($sql); + } + + // Capabilities + + function hasCreateTableLikeWithConstraints() {return false;} + function hasSharedComments() {return false;} + function hasConcurrentIndexBuild() {return false;} +} + +?> diff --git a/php/pgadmin/classes/database/Postgres82.php b/php/pgadmin/classes/database/Postgres82.php new file mode 100644 index 0000000..e30cd67 --- /dev/null +++ b/php/pgadmin/classes/database/Postgres82.php @@ -0,0 +1,359 @@ + 'i', '!=' => 'i', '<' => 'i', '>' => 'i', '<=' => 'i', '>=' => 'i', '<<' => 'i', '>>' => 'i', '<<=' => 'i', '>>=' => 'i', + 'LIKE' => 'i', 'NOT LIKE' => 'i', 'ILIKE' => 'i', 'NOT ILIKE' => 'i', 'SIMILAR TO' => 'i', + 'NOT SIMILAR TO' => 'i', '~' => 'i', '!~' => 'i', '~*' => 'i', '!~*' => 'i', + 'IS NULL' => 'p', 'IS NOT NULL' => 'p', 'IN' => 'x', 'NOT IN' => 'x'); + + /** + * Constructor + * @param $conn The database connection + */ + function Postgres82($conn) { + $this->Postgres($conn); + } + + // Help functions + + function getHelpPages() { + include_once('./help/PostgresDoc82.php'); + return $this->help_page; + } + + // Database functions + + /** + * Returns table locks information in the current database + * @return A recordset + */ + function getLocks() { + global $conf; + + if (!$conf['show_system']) + $where = 'AND pn.nspname NOT LIKE $$pg\_%$$'; + else + $where = "AND nspname !~ '^pg_t(emp_[0-9]+|oast)$'"; + + $sql = "SELECT pn.nspname, pc.relname AS tablename, pl.transaction, pl.pid, pl.mode, pl.granted + FROM pg_catalog.pg_locks pl, pg_catalog.pg_class pc, pg_catalog.pg_namespace pn + WHERE pl.relation = pc.oid AND pc.relnamespace=pn.oid {$where} + ORDER BY nspname,tablename"; + + return $this->selectSet($sql); + } + + // Sequence functions + + /** + * Rename a sequence + * @param $seqrs The sequence RecordSet returned by getSequence() + * @param $name The new name for the sequence + * @return 0 success + */ + function alterSequenceName($seqrs, $name) { + /* vars are cleaned in _alterSequence */ + if (!empty($name) && ($seqrs->fields['seqname'] != $name)) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $sql = "ALTER TABLE \"{$f_schema}\".\"{$seqrs->fields['seqname']}\" RENAME TO \"{$name}\""; + $status = $this->execute($sql); + if ($status == 0) + $seqrs->fields['seqname'] = $name; + else + return $status; + } + return 0; + } + + // View functions + + /** + * Rename a view + * @param $vwrs The view recordSet returned by getView() + * @param $name The new view's name + * @return -1 Failed + * @return 0 success + */ + function alterViewName($vwrs, $name) { + // Rename (only if name has changed) + /* $vwrs and $name are cleaned in _alterView */ + if (!empty($name) && ($name != $vwrs->fields['relname'])) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $sql = "ALTER TABLE \"{$f_schema}\".\"{$vwrs->fields['relname']}\" RENAME TO \"{$name}\""; + $status = $this->execute($sql); + if ($status == 0) + $vwrs->fields['relname'] = $name; + else + return $status; + } + return 0; + } + + // Trigger functions + + /** + * Grabs a list of triggers on a table + * @param $table The name of a table whose triggers to retrieve + * @return A recordset + */ + function getTriggers($table = '') { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + $sql = "SELECT + t.tgname, pg_catalog.pg_get_triggerdef(t.oid) AS tgdef, t.tgenabled, p.oid AS prooid, + p.proname || ' (' || pg_catalog.oidvectortypes(p.proargtypes) || ')' AS proproto, + ns.nspname AS pronamespace + FROM pg_catalog.pg_trigger t, pg_catalog.pg_proc p, pg_catalog.pg_namespace ns + WHERE t.tgrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='{$table}' + AND relnamespace=(SELECT oid FROM pg_catalog.pg_namespace WHERE nspname='{$c_schema}')) + AND (NOT tgisconstraint OR NOT EXISTS + (SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c + ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) + WHERE d.classid = t.tableoid AND d.objid = t.oid AND d.deptype = 'i' AND c.contype = 'f')) + AND p.oid=t.tgfoid + AND p.pronamespace = ns.oid"; + + return $this->selectSet($sql); + } + + // Function functions + + /** + * Returns all details for a particular function + * @param $func The name of the function to retrieve + * @return Function info + */ + function getFunction($function_oid) { + $this->clean($function_oid); + + $sql = "SELECT + pc.oid AS prooid, + proname, + pg_catalog.pg_get_userbyid(proowner) AS proowner, + nspname as proschema, + lanname as prolanguage, + pg_catalog.format_type(prorettype, NULL) as proresult, + prosrc, + probin, + proretset, + proisstrict, + provolatile, + prosecdef, + pg_catalog.oidvectortypes(pc.proargtypes) AS proarguments, + proargnames AS proargnames, + pg_catalog.obj_description(pc.oid, 'pg_proc') AS procomment + FROM + pg_catalog.pg_proc pc, pg_catalog.pg_language pl, pg_catalog.pg_namespace pn + WHERE + pc.oid = '{$function_oid}'::oid + AND pc.prolang = pl.oid + AND pc.pronamespace = pn.oid + "; + + return $this->selectSet($sql); + } + + /** + * Creates a new function. + * @param $funcname The name of the function to create + * @param $args A comma separated string of types + * @param $returns The return type + * @param $definition The definition for the new function + * @param $language The language the function is written for + * @param $flags An array of optional flags + * @param $setof True if it returns a set, false otherwise + * @param $rows number of rows planner should estimate will be returned + * @param $cost cost the planner should use in the function execution step + * @param $comment The comment on the function + * @param $replace (optional) True if OR REPLACE, false for normal + * @return 0 success + * @return -1 create function failed + * @return -4 set comment failed + */ + function createFunction($funcname, $args, $returns, $definition, $language, $flags, $setof, $cost, $rows, $comment, $replace = false) { + + // Begin a transaction + $status = $this->beginTransaction(); + if ($status != 0) { + $this->rollbackTransaction(); + return -1; + } + + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($funcname); + $this->clean($args); + $this->fieldClean($language); + $this->arrayClean($flags); + + $sql = "CREATE"; + if ($replace) $sql .= " OR REPLACE"; + $sql .= " FUNCTION \"{$f_schema}\".\"{$funcname}\" ("; + + if ($args != '') + $sql .= $args; + + // For some reason, the returns field cannot have quotes... + $sql .= ") RETURNS "; + if ($setof) $sql .= "SETOF "; + $sql .= "{$returns} AS "; + + if (is_array($definition)) { + $this->arrayClean($definition); + $sql .= "'" . $definition[0] . "'"; + if ($definition[1]) { + $sql .= ",'" . $definition[1] . "'"; + } + } else { + $this->clean($definition); + $sql .= "'" . $definition . "'"; + } + + $sql .= " LANGUAGE \"{$language}\""; + + // Add flags + foreach ($flags as $v) { + // Skip default flags + if ($v == '') continue; + else $sql .= "\n{$v}"; + } + + $status = $this->execute($sql); + if ($status != 0) { + $this->rollbackTransaction(); + return -3; + } + + /* set the comment */ + $status = $this->setComment('FUNCTION', "\"{$funcname}\"({$args})", null, $comment); + if ($status != 0) { + $this->rollbackTransaction(); + return -4; + } + + return $this->endTransaction(); + } + + // Index functions + + /** + * Clusters an index + * @param $index The name of the index + * @param $table The table the index is on + * @return 0 success + */ + function clusterIndex($table='', $index='') { + + $sql = 'CLUSTER'; + + // We don't bother with a transaction here, as there's no point rolling + // back an expensive cluster if a cheap analyze fails for whatever reason + + if (!empty($table)) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $this->fieldClean($table); + + if (!empty($index)) { + $this->fieldClean($index); + $sql .= " \"{$index}\" ON \"{$f_schema}\".\"{$table}\""; + } + else { + $sql .= " \"{$f_schema}\".\"{$table}\""; + } + } + + return $this->execute($sql); + } + + // Operator functions + + /** + * Returns all details for a particular operator + * @param $operator_oid The oid of the operator + * @return Function info + */ + function getOperator($operator_oid) { + $this->clean($operator_oid); + + $sql = " + SELECT + po.oid, po.oprname, + oprleft::pg_catalog.regtype AS oprleftname, + oprright::pg_catalog.regtype AS oprrightname, + oprresult::pg_catalog.regtype AS resultname, + po.oprcanhash, + oprcom::pg_catalog.regoperator AS oprcom, + oprnegate::pg_catalog.regoperator AS oprnegate, + oprlsortop::pg_catalog.regoperator AS oprlsortop, + oprrsortop::pg_catalog.regoperator AS oprrsortop, + oprltcmpop::pg_catalog.regoperator AS oprltcmpop, + oprgtcmpop::pg_catalog.regoperator AS oprgtcmpop, + po.oprcode::pg_catalog.regproc AS oprcode, + po.oprrest::pg_catalog.regproc AS oprrest, + po.oprjoin::pg_catalog.regproc AS oprjoin + FROM + pg_catalog.pg_operator po + WHERE + po.oid='{$operator_oid}' + "; + + return $this->selectSet($sql); + } + + // Operator Class functions + + /** + * Gets all opclasses + * @return A recordset + */ + function getOpClasses() { + $c_schema = $this->_schema; + $this->clean($c_schema); + $sql = " + SELECT + pa.amname, + po.opcname, + po.opcintype::pg_catalog.regtype AS opcintype, + po.opcdefault, + pg_catalog.obj_description(po.oid, 'pg_opclass') AS opccomment + FROM + pg_catalog.pg_opclass po, pg_catalog.pg_am pa, pg_catalog.pg_namespace pn + WHERE + po.opcamid=pa.oid + AND po.opcnamespace=pn.oid + AND pn.nspname='{$c_schema}' + ORDER BY 1,2 + "; + + return $this->selectSet($sql); + } + + // Capabilities + + function hasCreateTableLikeWithIndexes() {return false;} + function hasEnumTypes() {return false;} + function hasFTS() {return false;} + function hasFunctionCosting() {return false;} + function hasFunctionGUC() {return false;} + function hasVirtualTransactionId() {return false;} + +} + +?> diff --git a/php/pgadmin/classes/database/Postgres83.php b/php/pgadmin/classes/database/Postgres83.php new file mode 100644 index 0000000..d66ee53 --- /dev/null +++ b/php/pgadmin/classes/database/Postgres83.php @@ -0,0 +1,332 @@ + array('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'REFERENCES', 'TRIGGER', 'ALL PRIVILEGES'), + 'view' => array('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'REFERENCES', 'TRIGGER', 'ALL PRIVILEGES'), + 'sequence' => array('SELECT', 'UPDATE', 'ALL PRIVILEGES'), + 'database' => array('CREATE', 'TEMPORARY', 'CONNECT', 'ALL PRIVILEGES'), + 'function' => array('EXECUTE', 'ALL PRIVILEGES'), + 'language' => array('USAGE', 'ALL PRIVILEGES'), + 'schema' => array('CREATE', 'USAGE', 'ALL PRIVILEGES'), + 'tablespace' => array('CREATE', 'ALL PRIVILEGES') + ); + // List of characters in acl lists and the privileges they + // refer to. + var $privmap = array( + 'r' => 'SELECT', + 'w' => 'UPDATE', + 'a' => 'INSERT', + 'd' => 'DELETE', + 'R' => 'RULE', + 'x' => 'REFERENCES', + 't' => 'TRIGGER', + 'X' => 'EXECUTE', + 'U' => 'USAGE', + 'C' => 'CREATE', + 'T' => 'TEMPORARY', + 'c' => 'CONNECT' + ); + + /** + * Constructor + * @param $conn The database connection + */ + function Postgres83($conn) { + $this->Postgres($conn); + } + + // Help functions + + function getHelpPages() { + include_once('./help/PostgresDoc83.php'); + return $this->help_page; + } + + // Databse functions + + /** + * Return all database available on the server + * @param $currentdatabase database name that should be on top of the resultset + * + * @return A list of databases, sorted alphabetically + */ + function getDatabases($currentdatabase = NULL) { + global $conf, $misc; + + $server_info = $misc->getServerInfo(); + + if (isset($conf['owned_only']) && $conf['owned_only'] && !$this->isSuperUser($server_info['username'])) { + $username = $server_info['username']; + $this->clean($username); + $clause = " AND pr.rolname='{$username}'"; + } + else $clause = ''; + + if ($currentdatabase != NULL) { + $this->clean($currentdatabase); + $orderby = "ORDER BY pdb.datname = '{$currentdatabase}' DESC, pdb.datname"; + } + else + $orderby = "ORDER BY pdb.datname"; + + if (!$conf['show_system']) + $where = ' AND NOT pdb.datistemplate'; + else + $where = ' AND pdb.datallowconn'; + + $sql = " + SELECT pdb.datname AS datname, pr.rolname AS datowner, pg_encoding_to_char(encoding) AS datencoding, + (SELECT description FROM pg_catalog.pg_shdescription pd WHERE pdb.oid=pd.objoid) AS datcomment, + (SELECT spcname FROM pg_catalog.pg_tablespace pt WHERE pt.oid=pdb.dattablespace) AS tablespace, + pg_catalog.pg_database_size(pdb.oid) as dbsize + FROM pg_catalog.pg_database pdb LEFT JOIN pg_catalog.pg_roles pr ON (pdb.datdba = pr.oid) + WHERE true + {$where} + {$clause} + {$orderby}"; + + return $this->selectSet($sql); + } + + // Administration functions + + /** + * Returns all available autovacuum per table information. + * @return A recordset + */ + function getTableAutovacuum($table='') { + $sql = ''; + + if ($table !== '') { + $this->clean($table); + $c_schema = $this->_schema; + $this->clean($c_schema); + + $sql = " + SELECT vacrelid, nspname, relname, + CASE enabled + WHEN 't' THEN 'on' + ELSE 'off' + END AS autovacuum_enabled, vac_base_thresh AS autovacuum_vacuum_threshold, + vac_scale_factor AS autovacuum_vacuum_scale_factor, anl_base_thresh AS autovacuum_analyze_threshold, + anl_scale_factor AS autovacuum_analyze_scale_factor, vac_cost_delay AS autovacuum_vacuum_cost_delay, + vac_cost_limit AS autovacuum_vacuum_cost_limit + FROM pg_autovacuum AS a + join pg_class AS c on (c.oid=a.vacrelid) + join pg_namespace AS n on (n.oid=c.relnamespace) + WHERE c.relname = '{$table}' AND n.nspname = '{$c_schema}' + ORDER BY nspname, relname + "; + } + else { + $sql = " + SELECT vacrelid, nspname, relname, + CASE enabled + WHEN 't' THEN 'on' + ELSE 'off' + END AS autovacuum_enabled, vac_base_thresh AS autovacuum_vacuum_threshold, + vac_scale_factor AS autovacuum_vacuum_scale_factor, anl_base_thresh AS autovacuum_analyze_threshold, + anl_scale_factor AS autovacuum_analyze_scale_factor, vac_cost_delay AS autovacuum_vacuum_cost_delay, + vac_cost_limit AS autovacuum_vacuum_cost_limit + FROM pg_autovacuum AS a + join pg_class AS c on (c.oid=a.vacrelid) + join pg_namespace AS n on (n.oid=c.relnamespace) + ORDER BY nspname, relname + "; + } + + return $this->selectSet($sql); + } + + function saveAutovacuum($table, $vacenabled, $vacthreshold, $vacscalefactor, $anathresold, + $anascalefactor, $vaccostdelay, $vaccostlimit) + { + $defaults = $this->getAutovacuum(); + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + $rs = $this->selectSet(" + SELECT c.oid + FROM pg_catalog.pg_class AS c + LEFT JOIN pg_catalog.pg_namespace AS n ON (n.oid=c.relnamespace) + WHERE + c.relname = '{$table}' AND n.nspname = '{$c_schema}' + "); + + if ($rs->EOF) + return -1; + + $toid = $rs->fields('oid'); + unset ($rs); + + if (empty($_POST['autovacuum_vacuum_threshold'])) + $_POST['autovacuum_vacuum_threshold'] = $defaults['autovacuum_vacuum_threshold']; + + if (empty($_POST['autovacuum_vacuum_scale_factor'])) + $_POST['autovacuum_vacuum_scale_factor'] = $defaults['autovacuum_vacuum_scale_factor']; + + if (empty($_POST['autovacuum_analyze_threshold'])) + $_POST['autovacuum_analyze_threshold'] = $defaults['autovacuum_analyze_threshold']; + + if (empty($_POST['autovacuum_analyze_scale_factor'])) + $_POST['autovacuum_analyze_scale_factor'] = $defaults['autovacuum_analyze_scale_factor']; + + if (empty($_POST['autovacuum_vacuum_cost_delay'])) + $_POST['autovacuum_vacuum_cost_delay'] = $defaults['autovacuum_vacuum_cost_delay']; + + if (empty($_POST['autovacuum_vacuum_cost_limit'])) + $_POST['autovacuum_vacuum_cost_limit'] = $defaults['autovacuum_vacuum_cost_limit']; + + if (empty($_POST['vacuum_freeze_min_age'])) + $_POST['vacuum_freeze_min_age'] = $defaults['vacuum_freeze_min_age']; + + if (empty($_POST['autovacuum_freeze_max_age'])) + $_POST['autovacuum_freeze_max_age'] = $defaults['autovacuum_freeze_max_age']; + + + $rs = $this->selectSet("SELECT vacrelid + FROM \"pg_catalog\".\"pg_autovacuum\" + WHERE vacrelid = {$toid};"); + + $status = -1; // ini + if (isset($rs->fields['vacrelid']) and ($rs->fields['vacrelid'] == $toid)) { + // table exists in pg_autovacuum, UPDATE + $sql = sprintf("UPDATE \"pg_catalog\".\"pg_autovacuum\" SET + enabled = '%s', + vac_base_thresh = %s, + vac_scale_factor = %s, + anl_base_thresh = %s, + anl_scale_factor = %s, + vac_cost_delay = %s, + vac_cost_limit = %s, + freeze_min_age = %s, + freeze_max_age = %s + WHERE vacrelid = {$toid}; + ", + ($_POST['autovacuum_enabled'] == 'on')? 't':'f', + $_POST['autovacuum_vacuum_threshold'], + $_POST['autovacuum_vacuum_scale_factor'], + $_POST['autovacuum_analyze_threshold'], + $_POST['autovacuum_analyze_scale_factor'], + $_POST['autovacuum_vacuum_cost_delay'], + $_POST['autovacuum_vacuum_cost_limit'], + $_POST['vacuum_freeze_min_age'], + $_POST['autovacuum_freeze_max_age'] + ); + $status = $this->execute($sql); + } + else { + // table doesn't exists in pg_autovacuum, INSERT + $sql = sprintf("INSERT INTO \"pg_catalog\".\"pg_autovacuum\" + VALUES (%s, '%s', %s, %s, %s, %s, %s, %s, %s, %s ) + WHERE + c.relname = '{$table}' AND n.nspname = '{$c_schema}';", + $toid, + ($_POST['autovacuum_enabled'] == 'on')? 't':'f', + $_POST['autovacuum_vacuum_threshold'], + $_POST['autovacuum_vacuum_scale_factor'], + $_POST['autovacuum_analyze_threshold'], + $_POST['autovacuum_analyze_scale_factor'], + $_POST['autovacuum_vacuum_cost_delay'], + $_POST['autovacuum_vacuum_cost_limit'], + $_POST['vacuum_freeze_min_age'], + $_POST['autovacuum_freeze_max_age'] + ); + $status = $this->execute($sql); + } + + return $status; + } + + function dropAutovacuum($table) { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + $rs = $this->selectSet(" + SELECT c.oid + FROM pg_catalog.pg_class AS c + LEFT JOIN pg_catalog.pg_namespace AS n ON (n.oid=c.relnamespace) + WHERE + c.relname = '{$table}' AND n.nspname = '{$c_schema}' + "); + + return $this->deleteRow('pg_autovacuum', array('vacrelid' => $rs->fields['oid']), 'pg_catalog'); + } + + // Sequence functions + + /** + * Alter a sequence's properties + * @param $seqrs The sequence RecordSet returned by getSequence() + * @param $increment The sequence incremental value + * @param $minvalue The sequence minimum value + * @param $maxvalue The sequence maximum value + * @param $restartvalue The sequence current value + * @param $cachevalue The sequence cache value + * @param $cycledvalue Sequence can cycle ? + * @param $startvalue The sequence start value when issueing a restart (ignored) + * @return 0 success + */ + function alterSequenceProps($seqrs, $increment, $minvalue, $maxvalue, + $restartvalue, $cachevalue, $cycledvalue, $startvalue) { + + $sql = ''; + /* vars are cleaned in _alterSequence */ + if (!empty($increment) && ($increment != $seqrs->fields['increment_by'])) $sql .= " INCREMENT {$increment}"; + if (!empty($minvalue) && ($minvalue != $seqrs->fields['min_value'])) $sql .= " MINVALUE {$minvalue}"; + if (!empty($maxvalue) && ($maxvalue != $seqrs->fields['max_value'])) $sql .= " MAXVALUE {$maxvalue}"; + if (!empty($restartvalue) && ($restartvalue != $seqrs->fields['last_value'])) $sql .= " RESTART {$restartvalue}"; + if (!empty($cachevalue) && ($cachevalue != $seqrs->fields['cache_value'])) $sql .= " CACHE {$cachevalue}"; + // toggle cycle yes/no + if (!is_null($cycledvalue)) $sql .= (!$cycledvalue ? ' NO ' : '') . " CYCLE"; + if ($sql != '') { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $sql = "ALTER SEQUENCE \"{$f_schema}\".\"{$seqrs->fields['seqname']}\" {$sql}"; + return $this->execute($sql); + } + return 0; + } + + /** + * Alter a sequence's owner + * @param $seqrs The sequence RecordSet returned by getSequence() + * @param $name The new owner for the sequence + * @return 0 success + */ + function alterSequenceOwner($seqrs, $owner) { + // If owner has been changed, then do the alteration. We are + // careful to avoid this generally as changing owner is a + // superuser only function. + /* vars are cleaned in _alterSequence */ + if (!empty($owner) && ($seqrs->fields['seqowner'] != $owner)) { + $f_schema = $this->_schema; + $this->fieldClean($f_schema); + $sql = "ALTER TABLE \"{$f_schema}\".\"{$seqrs->fields['seqname']}\" OWNER TO \"{$owner}\""; + return $this->execute($sql); + } + return 0; + } + + function hasQueryKill() { return false; } + function hasDatabaseCollation() { return false; } + function hasAlterSequenceStart() { return false; } +} + +?> diff --git a/php/pgadmin/classes/database/Postgres84.php b/php/pgadmin/classes/database/Postgres84.php new file mode 100644 index 0000000..702b163 --- /dev/null +++ b/php/pgadmin/classes/database/Postgres84.php @@ -0,0 +1,229 @@ + array('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'REFERENCES', 'TRIGGER', 'ALL PRIVILEGES'), + 'view' => array('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'REFERENCES', 'TRIGGER', 'ALL PRIVILEGES'), + 'sequence' => array('SELECT', 'UPDATE', 'ALL PRIVILEGES'), + 'database' => array('CREATE', 'TEMPORARY', 'CONNECT', 'ALL PRIVILEGES'), + 'function' => array('EXECUTE', 'ALL PRIVILEGES'), + 'language' => array('USAGE', 'ALL PRIVILEGES'), + 'schema' => array('CREATE', 'USAGE', 'ALL PRIVILEGES'), + 'tablespace' => array('CREATE', 'ALL PRIVILEGES'), + 'column' => array('SELECT', 'INSERT', 'UPDATE', 'REFERENCES','ALL PRIVILEGES') + ); + + /** + * Constructor + * @param $conn The database connection + */ + function Postgres84($conn) { + $this->Postgres($conn); + } + + // Help functions + + function getHelpPages() { + include_once('./help/PostgresDoc84.php'); + return $this->help_page; + } + + // Database functions + + /** + * Grabs a list of triggers on a table + * @param $table The name of a table whose triggers to retrieve + * @return A recordset + */ + function getTriggers($table = '') { + $c_schema = $this->_schema; + $this->clean($c_schema); + $this->clean($table); + + $sql = "SELECT + t.tgname, pg_catalog.pg_get_triggerdef(t.oid) AS tgdef, + CASE WHEN t.tgenabled = 'D' THEN FALSE ELSE TRUE END AS tgenabled, p.oid AS prooid, + p.proname || ' (' || pg_catalog.oidvectortypes(p.proargtypes) || ')' AS proproto, + ns.nspname AS pronamespace + FROM pg_catalog.pg_trigger t, pg_catalog.pg_proc p, pg_catalog.pg_namespace ns + WHERE t.tgrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='{$table}' + AND relnamespace=(SELECT oid FROM pg_catalog.pg_namespace WHERE nspname='{$c_schema}')) + AND (NOT tgisconstraint OR NOT EXISTS + (SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c + ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) + WHERE d.classid = t.tableoid AND d.objid = t.oid AND d.deptype = 'i' AND c.contype = 'f')) + AND p.oid=t.tgfoid + AND p.pronamespace = ns.oid"; + + return $this->selectSet($sql); + } + + /** + * Searches all system catalogs to find objects that match a certain name. + * @param $term The search term + * @param $filter The object type to restrict to ('' means no restriction) + * @return A recordset + */ + function findObject($term, $filter) { + global $conf; + + /*about escaping: + * SET standard_conforming_string is not available before 8.2 + * So we must use PostgreSQL specific notation :/ + * E'' notation is not available before 8.1 + * $$ is available since 8.0 + * Nothing specific from 7.4 + **/ + + // Escape search term for ILIKE match + $this->clean($term); + $this->clean($filter); + $term = str_replace('_', '\_', $term); + $term = str_replace('%', '\%', $term); + + // Exclude system relations if necessary + if (!$conf['show_system']) { + // XXX: The mention of information_schema here is in the wrong place, but + // it's the quickest fix to exclude the info schema from 7.4 + $where = " AND pn.nspname NOT LIKE \$_PATERN_\$pg\_%\$_PATERN_\$ AND pn.nspname != 'information_schema'"; + $lan_where = "AND pl.lanispl"; + } + else { + $where = ''; + $lan_where = ''; + } + + // Apply outer filter + $sql = ''; + if ($filter != '') { + $sql = "SELECT * FROM ("; + } + + $term = "\$_PATERN_\$%{$term}%\$_PATERN_\$"; + + $sql .= " + SELECT 'SCHEMA' AS type, oid, NULL AS schemaname, NULL AS relname, nspname AS name + FROM pg_catalog.pg_namespace pn WHERE nspname ILIKE {$term} {$where} + UNION ALL + SELECT CASE WHEN relkind='r' THEN 'TABLE' WHEN relkind='v' THEN 'VIEW' WHEN relkind='S' THEN 'SEQUENCE' END, pc.oid, + pn.nspname, NULL, pc.relname FROM pg_catalog.pg_class pc, pg_catalog.pg_namespace pn + WHERE pc.relnamespace=pn.oid AND relkind IN ('r', 'v', 'S') AND relname ILIKE {$term} {$where} + UNION ALL + SELECT CASE WHEN pc.relkind='r' THEN 'COLUMNTABLE' ELSE 'COLUMNVIEW' END, NULL, pn.nspname, pc.relname, pa.attname FROM pg_catalog.pg_class pc, pg_catalog.pg_namespace pn, + pg_catalog.pg_attribute pa WHERE pc.relnamespace=pn.oid AND pc.oid=pa.attrelid + AND pa.attname ILIKE {$term} AND pa.attnum > 0 AND NOT pa.attisdropped AND pc.relkind IN ('r', 'v') {$where} + UNION ALL + SELECT 'FUNCTION', pp.oid, pn.nspname, NULL, pp.proname || '(' || pg_catalog.oidvectortypes(pp.proargtypes) || ')' FROM pg_catalog.pg_proc pp, pg_catalog.pg_namespace pn + WHERE pp.pronamespace=pn.oid AND NOT pp.proisagg AND pp.proname ILIKE {$term} {$where} + UNION ALL + SELECT 'INDEX', NULL, pn.nspname, pc.relname, pc2.relname FROM pg_catalog.pg_class pc, pg_catalog.pg_namespace pn, + pg_catalog.pg_index pi, pg_catalog.pg_class pc2 WHERE pc.relnamespace=pn.oid AND pc.oid=pi.indrelid + AND pi.indexrelid=pc2.oid + AND NOT EXISTS ( + SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c + ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) + WHERE d.classid = pc2.tableoid AND d.objid = pc2.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p') + ) + AND pc2.relname ILIKE {$term} {$where} + UNION ALL + SELECT 'CONSTRAINTTABLE', NULL, pn.nspname, pc.relname, pc2.conname FROM pg_catalog.pg_class pc, pg_catalog.pg_namespace pn, + pg_catalog.pg_constraint pc2 WHERE pc.relnamespace=pn.oid AND pc.oid=pc2.conrelid AND pc2.conrelid != 0 + AND CASE WHEN pc2.contype IN ('f', 'c') THEN TRUE ELSE NOT EXISTS ( + SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c + ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) + WHERE d.classid = pc2.tableoid AND d.objid = pc2.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p') + ) END + AND pc2.conname ILIKE {$term} {$where} + UNION ALL + SELECT 'CONSTRAINTDOMAIN', pt.oid, pn.nspname, pt.typname, pc.conname FROM pg_catalog.pg_type pt, pg_catalog.pg_namespace pn, + pg_catalog.pg_constraint pc WHERE pt.typnamespace=pn.oid AND pt.oid=pc.contypid AND pc.contypid != 0 + AND pc.conname ILIKE {$term} {$where} + UNION ALL + SELECT 'TRIGGER', NULL, pn.nspname, pc.relname, pt.tgname FROM pg_catalog.pg_class pc, pg_catalog.pg_namespace pn, + pg_catalog.pg_trigger pt WHERE pc.relnamespace=pn.oid AND pc.oid=pt.tgrelid + AND ( NOT pt.tgisconstraint OR NOT EXISTS + (SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c + ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) + WHERE d.classid = pt.tableoid AND d.objid = pt.oid AND d.deptype = 'i' AND c.contype = 'f')) + AND pt.tgname ILIKE {$term} {$where} + UNION ALL + SELECT 'RULETABLE', NULL, pn.nspname AS schemaname, c.relname AS tablename, r.rulename FROM pg_catalog.pg_rewrite r + JOIN pg_catalog.pg_class c ON c.oid = r.ev_class + LEFT JOIN pg_catalog.pg_namespace pn ON pn.oid = c.relnamespace + WHERE c.relkind='r' AND r.rulename != '_RETURN' AND r.rulename ILIKE {$term} {$where} + UNION ALL + SELECT 'RULEVIEW', NULL, pn.nspname AS schemaname, c.relname AS tablename, r.rulename FROM pg_catalog.pg_rewrite r + JOIN pg_catalog.pg_class c ON c.oid = r.ev_class + LEFT JOIN pg_catalog.pg_namespace pn ON pn.oid = c.relnamespace + WHERE c.relkind='v' AND r.rulename != '_RETURN' AND r.rulename ILIKE {$term} {$where} + "; + + // Add advanced objects if show_advanced is set + if ($conf['show_advanced']) { + $sql .= " + UNION ALL + SELECT CASE WHEN pt.typtype='d' THEN 'DOMAIN' ELSE 'TYPE' END, pt.oid, pn.nspname, NULL, + pt.typname FROM pg_catalog.pg_type pt, pg_catalog.pg_namespace pn + WHERE pt.typnamespace=pn.oid AND typname ILIKE {$term} + AND (pt.typrelid = 0 OR (SELECT c.relkind = 'c' FROM pg_catalog.pg_class c WHERE c.oid = pt.typrelid)) + {$where} + UNION ALL + SELECT 'OPERATOR', po.oid, pn.nspname, NULL, po.oprname FROM pg_catalog.pg_operator po, pg_catalog.pg_namespace pn + WHERE po.oprnamespace=pn.oid AND oprname ILIKE {$term} {$where} + UNION ALL + SELECT 'CONVERSION', pc.oid, pn.nspname, NULL, pc.conname FROM pg_catalog.pg_conversion pc, + pg_catalog.pg_namespace pn WHERE pc.connamespace=pn.oid AND conname ILIKE {$term} {$where} + UNION ALL + SELECT 'LANGUAGE', pl.oid, NULL, NULL, pl.lanname FROM pg_catalog.pg_language pl + WHERE lanname ILIKE {$term} {$lan_where} + UNION ALL + SELECT DISTINCT ON (p.proname) 'AGGREGATE', p.oid, pn.nspname, NULL, p.proname FROM pg_catalog.pg_proc p + LEFT JOIN pg_catalog.pg_namespace pn ON p.pronamespace=pn.oid + WHERE p.proisagg AND p.proname ILIKE {$term} {$where} + UNION ALL + SELECT DISTINCT ON (po.opcname) 'OPCLASS', po.oid, pn.nspname, NULL, po.opcname FROM pg_catalog.pg_opclass po, + pg_catalog.pg_namespace pn WHERE po.opcnamespace=pn.oid + AND po.opcname ILIKE {$term} {$where} + "; + } + // Otherwise just add domains + else { + $sql .= " + UNION ALL + SELECT 'DOMAIN', pt.oid, pn.nspname, NULL, + pt.typname FROM pg_catalog.pg_type pt, pg_catalog.pg_namespace pn + WHERE pt.typnamespace=pn.oid AND pt.typtype='d' AND typname ILIKE {$term} + AND (pt.typrelid = 0 OR (SELECT c.relkind = 'c' FROM pg_catalog.pg_class c WHERE c.oid = pt.typrelid)) + {$where} + "; + } + + if ($filter != '') { + // We use like to make RULE, CONSTRAINT and COLUMN searches work + $sql .= ") AS sub WHERE type LIKE '{$filter}%' "; + } + + $sql .= "ORDER BY type, schemaname, relname, name"; + + return $this->selectSet($sql); + } + + + // Capabilities + +} + +?> diff --git a/php/pgadmin/classes/plugins/Plugin.php b/php/pgadmin/classes/plugins/Plugin.php new file mode 100644 index 0000000..687d4e2 --- /dev/null +++ b/php/pgadmin/classes/plugins/Plugin.php @@ -0,0 +1,30 @@ +name = $name; + + // Read in configuration + if ($this->config !== null) { + global $conf; + include('./conf/' . $name . '.inc.php'); + } + } + +} + +?> diff --git a/php/pgadmin/classes/plugins/Slony.php b/php/pgadmin/classes/plugins/Slony.php new file mode 100644 index 0000000..e73f9db --- /dev/null +++ b/php/pgadmin/classes/plugins/Slony.php @@ -0,0 +1,910 @@ +Plugin('slony'); + $this->isEnabled(); + } + + /** + * Determines whether or not Slony is installed in the current + * database. + * @post Will populate version and schema fields, etc. + * @return True if Slony is installed, false otherwise. + */ + function isEnabled() { + // Access cache + if ($this->enabled !== null) return $this->enabled; + else $this->enabled = false; + + global $data; + + // Check for the slonyversion() function and find the schema + // it's in. We put an order by and limit 1 in here to guarantee + // only finding the first one, even if there are somehow two + // Slony schemas. + $sql = "SELECT pn.nspname AS schema, pu.usename AS owner, + SUBSTRING(pn.nspname FROM 2) AS cluster, + pg_catalog.obj_description(pn.oid, 'pg_namespace') AS + nspcomment + FROM pg_catalog.pg_proc pp, pg_catalog.pg_namespace pn, + pg_catalog.pg_user pu + WHERE pp.pronamespace=pn.oid + AND pn.nspowner = pu.usesysid + AND pp.proname='slonyversion' + AND pn.nspname LIKE '@_%' ESCAPE '@' + ORDER BY pn.nspname LIMIT 1"; + $rs = $data->selectSet($sql); + if ($rs->recordCount() == 1) { + $schema = $rs->fields['schema']; + $this->slony_schema = $schema; + $this->slony_owner = $rs->fields['owner']; + $this->slony_comment = $rs->fields['nspcomment']; + // Cluster name is schema minus "_" prefix. + $this->slony_cluster = $rs->fields['cluster']; + $data->fieldClean($schema); + $sql = "SELECT \"{$schema}\".slonyversion() AS version"; + $version = $data->selectField($sql, 'version'); + if ($version === -1) return false; + else { + $this->slony_version = $version; + $this->enabled = true; + return true; + } + } + else return false; + } + + // CLUSTERS + + /** + * Gets the clusters in this database + */ + function getClusters() { + include_once('./classes/ArrayRecordSet.php'); + + if ($this->isEnabled()) { + $clusters = array(array('cluster' => $this->slony_cluster, 'comment' => $this->slony_comment)); + } + else + $clusters = array(); + + return new ArrayRecordSet($clusters); + } + + /** + * Gets a single cluster + */ + function getCluster() { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($no_id); + + $sql = "SELECT no_id, no_comment, \"{$schema}\".slonyversion() AS version + FROM \"{$schema}\".sl_local_node_id, \"{$schema}\".sl_node + WHERE no_id=last_value"; + + + return $data->selectSet($sql); + } + + /** + * Drops an entire cluster. + */ + function dropCluster() { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + + $sql = "SELECT \"{$schema}\".uninstallnode(); DROP SCHEMA \"{$schema}\" CASCADE"; + + $status = $data->execute($sql); + if ($status == 0) { + $this->enabled = null; + $enabled = $this->isEnabled(); + } + return $status; + } + + /** + * Helper function to get a file into a string and replace + * variables. + * @return The file contents, or FALSE on error. + */ + function _getFile($file, $cluster) { + global $data,$misc; + $schema = '_' . $cluster; + $data->fieldClean($cluster); + + $server_info = $misc->getServerInfo(); + $path = $server_info['slony_sql'] . '/' . $file; + + // Check that we can access the file + if (!file_exists($path) || !is_readable($path)) return false; + + $buffer = null; + $handle = fopen($path, 'r'); + if ($handle === false) return false; + while (!feof($handle)) { + $temp = fgets($handle, 4096); + $temp = str_replace('@CLUSTERNAME@', $cluster, $temp); + + $temp = str_replace('@NAMESPACE@', $schema, $temp); + $buffer .= $temp; + } + fclose($handle); + + return $buffer; + } + + /** + * Initializes a new cluster + */ + function initCluster($name, $no_id, $no_comment) { + global $data, $misc; + + // Prevent timeouts since cluster initialization can be slow + if (!ini_get('safe_mode')) set_time_limit(0); + + $server_info = $misc->getServerInfo(); + + if (!$data->isSuperUser($server_info['username'])) { + return -10; + } + + // Determine Slony compatibility version. + if ($data->major_version == 7.3) + $ver = '73'; + elseif ($data->major_version >= 7.4) + $ver = '74'; + else { + return -11; + } + + $status = $data->beginTransaction(); + if ($status != 0) return -1; + + // Create the schema + $status = $data->createSchema('_' . $name); + if ($status != 0) { + $data->rollbackTransaction(); + return -2; + } + + $sql = $this->_getFile("xxid.v{$ver}.sql", $name); + if ($sql === false) { + $data->rollbackTransaction(); + return -6; + } + $status = $data->execute($sql); + if ($status != 0) { + $data->rollbackTransaction(); + return -3; + } + + $sql = $this->_getFile('slony1_base.sql', $name); + if ($sql === false) { + $data->rollbackTransaction(); + return -6; + } + $status = $data->execute($sql); + if ($status != 0) { + $data->rollbackTransaction(); + return -3; + } +/* THIS FILE IS EMPTY AND JUST CAUSES ERRORS + $sql = $this->_getFile('slony1_base.v74.sql', $name); + $status = $data->execute($sql); + if ($status != 0) { + $data->rollbackTransaction(); + return -3; + } +*/ + $sql = $this->_getFile('slony1_funcs.sql', $name); + if ($sql === false) { + $data->rollbackTransaction(); + return -6; + } + $status = $data->execute($sql); + if ($status != 0) { + $data->rollbackTransaction(); + return -3; + } + + $sql = $this->_getFile("slony1_funcs.v{$ver}.sql", $name); + if ($sql === false) { + $data->rollbackTransaction(); + return -6; + } + $status = $data->execute($sql); + if ($status != 0) { + $data->rollbackTransaction(); + return -3; + } + + $this->enabled = null; + $enabled = $this->isEnabled(); + if (!$enabled) { + $data->rollbackTransaction(); + return -4; + } + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($no_id); + $data->clean($no_comment); + + $sql = "SELECT \"{$schema}\".initializelocalnode('{$no_id}', '{$no_comment}'); SELECT \"{$schema}\".enablenode('{$no_id}')"; + $status = $data->execute($sql); + if ($status != 0) { + $data->rollbackTransaction(); + return -5; + } + + return $data->endTransaction(); + } + + // NODES + + /** + * Gets the nodes in this database + */ + function getNodes() { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + + // We use 10 seconds as the default check time since that is the + // the default in Slony, and it gives no mechanism to look it up + $sql = "SELECT no_id, no_active, no_comment, no_spool, ". + "CASE WHEN st_lag_time > '10 seconds'::interval ". + "THEN 'outofsync' ELSE 'insync' END AS no_status ". + "FROM \"{$schema}\".sl_node ". + "LEFT JOIN \"{$schema}\".sl_status ON (no_id =st_received) ". + "ORDER BY no_comment"; + + return $data->selectSet($sql); + } + + /** + * Gets a single node + */ + function getNode($no_id) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($no_id); + + $sql = "SELECT * FROM \"{$schema}\".sl_node WHERE no_id='{$no_id}'"; + + return $data->selectSet($sql); + } + + /** + * Creates a node + */ + function createNode($no_id, $no_comment) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($no_comment); + $data->clean($no_id); + + if ($no_id != '') + $sql = "SELECT \"{$schema}\".storenode('{$no_id}', '{$no_comment}')"; + else + $sql = "SELECT \"{$schema}\".storenode((SELECT COALESCE(MAX(no_id), 0) + 1 FROM \"{$schema}\".sl_node), '{$no_comment}')"; + + return $data->execute($sql); + } + + /** + * Drops a node + */ + function dropNode($no_id) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($no_id); + + $sql = "SELECT \"{$schema}\".dropnode('{$no_id}')"; + + return $data->execute($sql); + } + + // REPLICATION SETS + + /** + * Gets the replication sets in this database + */ + function getReplicationSets() { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + + $sql = "SELECT *, set_locked IS NOT NULL AS is_locked FROM \"{$schema}\".sl_set ORDER BY set_id"; + + return $data->selectSet($sql); + } + + /** + * Gets a particular replication set + */ + function getReplicationSet($set_id) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($set_id); + + $sql = "SELECT *, (SELECT COUNT(*) FROM \"{$schema}\".sl_subscribe ssub WHERE ssub.sub_set=ss.set_id) AS subscriptions, + set_locked IS NOT NULL AS is_locked + FROM \"{$schema}\".sl_set ss, \"{$schema}\".sl_node sn + WHERE ss.set_origin=sn.no_id + AND set_id='{$set_id}'"; + + return $data->selectSet($sql); + } + + /** + * Creates a set + */ + function createReplicationSet($set_id, $set_comment) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($set_comment); + $data->clean($set_id); + + if ($set_id != '') + $sql = "SELECT \"{$schema}\".storeset('{$set_id}', '{$set_comment}')"; + else + $sql = "SELECT \"{$schema}\".storeset((SELECT COALESCE(MAX(set_id), 0) + 1 FROM \"{$schema}\".sl_set), '{$set_comment}')"; + + return $data->execute($sql); + } + + /** + * Drops a set + */ + function dropReplicationSet($set_id) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($set_id); + + $sql = "SELECT \"{$schema}\".dropset('{$set_id}')"; + + return $data->execute($sql); + } + + /** + * Locks or unlocks a set + * @param boolean $lock True to lock, false to unlock + */ + function lockReplicationSet($set_id, $lock) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($set_id); + + if ($lock) + $sql = "SELECT \"{$schema}\".lockset('{$set_id}')"; + else + $sql = "SELECT \"{$schema}\".unlockset('{$set_id}')"; + + return $data->execute($sql); + } + + /** + * Merges two sets + */ + function mergeReplicationSet($set_id, $target) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($set_id); + $data->clean($target); + + $sql = "SELECT \"{$schema}\".mergeset('{$target}', '{$set_id}')"; + + return $data->execute($sql); + } + + /** + * Moves a set to a new origin + */ + function moveReplicationSet($set_id, $new_origin) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($set_id); + $data->clean($new_origin); + + $sql = "SELECT \"{$schema}\".moveset('{$set_id}', '{$new_origin}')"; + + return $data->execute($sql); + } + + /** + * Executes schema changing DDL set on nodes + */ + function executeReplicationSet($set_id, $script) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($set_id); + $data->clean($script); + + $sql = "SELECT \"{$schema}\".ddlscript('{$set_id}', '{$script}')"; + + return $data->execute($sql); + } + + // TABLES + + /** + * Return all tables in a replication set + * @param $set_id The ID of the replication set + * @return Tables in the replication set, sorted alphabetically + */ + function getTables($set_id) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($set_id); + + $sql = "SELECT st.tab_id, c.relname, n.nspname, n.nspname||'.'||c.relname AS qualname, + pg_catalog.pg_get_userbyid(c.relowner) AS relowner, + reltuples::bigint"; + // Tablespace + if ($data->hasTablespaces()) { + $sql .= ", (SELECT spcname FROM pg_catalog.pg_tablespace pt WHERE pt.oid=c.reltablespace) AS tablespace"; + } + $sql .= " FROM pg_catalog.pg_class c, \"{$schema}\".sl_table st, pg_catalog.pg_namespace n + WHERE c.oid=st.tab_reloid + AND c.relnamespace=n.oid + AND st.tab_set='{$set_id}' + ORDER BY n.nspname, c.relname"; + + return $data->selectSet($sql); + } + + /** + * Adds a table to a replication set + */ + function addTable($set_id, $tab_id, $nspname, $relname, $idxname, $comment, $storedtriggers) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($set_id); + $data->clean($tab_id); + $fqname = $nspname . '.' . $relname; + $data->clean($fqname); + $data->clean($nspname); + $data->clean($relname); + $data->clean($idxname); + $data->clean($comment); + + $hastriggers = (sizeof($storedtriggers) > 0); + if ($hastriggers) { + // Begin a transaction + $status = $data->beginTransaction(); + if ($status != 0) return -1; + } + + if ($tab_id != '') + $sql = "SELECT \"{$schema}\".setaddtable('{$set_id}', '{$tab_id}', '{$fqname}', '{$idxname}', '{$comment}')"; + else { + $sql = "SELECT \"{$schema}\".setaddtable('{$set_id}', (SELECT COALESCE(MAX(tab_id), 0) + 1 FROM \"{$schema}\".sl_table), '{$fqname}', '{$idxname}', '{$comment}')"; + } + + $status = $data->execute($sql); + if ($status != 0) { + if ($hastriggers) $data->rollbackTransaction(); + return -3; + } + + // If we are storing triggers, we need to know the tab_id that was assigned to the table + if ($tab_id == '' && $hastriggers) { + $sql = "SELECT tab_id + FROM \"{$schema}\".sl_table + WHERE tab_set='{$set_id}' + AND tab_reloid=(SELECT pc.oid FROM pg_catalog.pg_class pc, pg_namespace pn + WHERE pc.relnamespace=pn.oid AND pc.relname='{$relname}' + AND pn.nspname='{$nspname}')"; + $tab_id = $data->selectField($sql, 'tab_id'); + if ($tab_id === -1) { + $data->rollbackTransaction(); + return -4; + } + } + + // Store requested triggers + if ($hastriggers) { + foreach ($storedtriggers as $tgname) { + $data->clean($tgname); + $sql = "SELECT \"{$schema}\".storetrigger('{$tab_id}', '{$tgname}')"; + $status = $data->execute($sql); + if ($status != 0) { + $data->rollbackTransaction(); + return -5; + } + } + } + + if ($hastriggers) + return $data->endTransaction(); + else + return $status; + } + + /** + * Drops a table from a replication set + */ + function dropTable($tab_id) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($tab_id); + + $sql = "SELECT \"{$schema}\".setdroptable('{$tab_id}')"; + + return $data->execute($sql); + } + + /** + * Moves a table to another replication set + */ + function moveTable($tab_id, $new_set_id) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($tab_id); + $data->clean($new_set_id); + + $sql = "SELECT \"{$schema}\".setmovetable('{$tab_id}', '{$new_set_id}')"; + + return $data->execute($sql); + } + + /** + * Return all tables we are not current in a replication set + */ + function getNonRepTables() + { + global $data; + /* + * we cannot just query pg_tables as we want the OID of the table + * for the subquery against the slony table. We could match on + * on schema name and table name, but the slony info isn't updated + * if the user renames a table which is in a replication set + */ + $sql = "SELECT c.relname, n.nspname, n.nspname||'.'||c.relname AS qualname, + pg_get_userbyid(c.relowner) AS relowner + FROM pg_class c + LEFT JOIN pg_namespace n ON n.oid = c.relnamespace + WHERE c.relkind = 'r' AND n.nspname NOT IN ('pg_catalog', + 'information_schema', 'pg_toast') AND + NOT(n.nspname = '_{$this->slony_cluster}' AND + relname LIKE 'sl_%') AND + NOT EXISTS(SELECT 1 FROM _{$this->slony_cluster}.sl_table s + WHERE s.tab_reloid = c.oid) + ORDER BY n.nspname, c.relname"; + return $data->selectSet($sql); + } + + // SEQUENCES + + /** + * Return all sequences in a replication set + * @param $set_id The ID of the replication set + * @return Sequences in the replication set, sorted alphabetically + */ + function getSequences($set_id) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($set_id); + + $sql = "SELECT ss.seq_id, c.relname AS seqname, n.nspname, n.nspname||'.'||c.relname AS qualname, + pg_catalog.obj_description(c.oid, 'pg_class') AS seqcomment, + pg_catalog.pg_get_userbyid(c.relowner) AS seqowner + FROM pg_catalog.pg_class c, \"{$schema}\".sl_sequence ss, pg_catalog.pg_namespace n + WHERE c.oid=ss.seq_reloid + AND c.relnamespace=n.oid + AND ss.seq_set='{$set_id}' + ORDER BY n.nspname, c.relname"; + + return $data->selectSet($sql); + } + + /** + * Adds a sequence to a replication set + */ + function addSequence($set_id, $seq_id, $fqname, $comment) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($set_id); + $data->clean($seq_id); + $data->clean($fqname); + $data->clean($comment); + + if ($seq_id != '') + $sql = "SELECT \"{$schema}\".setaddsequence('{$set_id}', '{$seq_id}', '{$fqname}', '{$comment}')"; + else + $sql = "SELECT \"{$schema}\".setaddsequence('{$set_id}', (SELECT COALESCE(MAX(seq_id), 0) + 1 FROM \"{$schema}\".sl_sequence), '{$fqname}', '{$comment}')"; + + return $data->execute($sql); } + + /** + * Drops a sequence from a replication set + */ + function dropSequence($seq_id) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($seq_id); + + $sql = "SELECT \"{$schema}\".setdropsequence('{$seq_id}')"; + + return $data->execute($sql); + } + + /** + * Moves a sequence to another replication set + */ + function moveSequence($seq_id, $new_set_id) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($seq_id); + $data->clean($new_set_id); + + $sql = "SELECT \"{$schema}\".setmovesequence('{$seq_id}', '{$new_set_id}')"; + + return $data->execute($sql); + } + + // SUBSCRIPTIONS + + /** + * Gets all nodes subscribing to a set + * @param $set_id The ID of the replication set + * @return Nodes subscribing to this set + */ + function getSubscribedNodes($set_id) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($set_id); + + $sql = "SELECT sn.*, ss.sub_set + FROM \"{$schema}\".sl_subscribe ss, \"{$schema}\".sl_node sn + WHERE ss.sub_set='{$set_id}' + AND ss.sub_receiver = sn.no_id + ORDER BY sn.no_comment"; + + return $data->selectSet($sql); + } + + /** + * Gets all nodes subscribing to a set + * @param $set_id The ID of the replication set + * @return Nodes subscribing to this set + */ + function getSubscription($set_id, $no_id) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($set_id); + $data->clean($no_id); + + $sql = "SELECT ss.*, sn.no_comment AS receiver, sn2.no_comment AS provider + FROM \"{$schema}\".sl_subscribe ss, \"{$schema}\".sl_node sn, \"{$schema}\".sl_node sn2 + WHERE ss.sub_set='{$set_id}' + AND ss.sub_receiver = sn.no_id + AND ss.sub_provider = sn2.no_id + AND sn.no_id='{$no_id}'"; + + return $data->selectSet($sql); + } + + // NODES + + /** + * Gets node paths + */ + function getPaths($no_id) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($no_id); + + $sql = "SELECT * FROM \"{$schema}\".sl_path sp, \"{$schema}\".sl_node sn + WHERE sp.pa_server=sn.no_id + AND sp.pa_client='{$no_id}' + ORDER BY sn.no_comment"; + + return $data->selectSet($sql); + } + + /** + * Gets node path details + */ + function getPath($no_id, $path_id) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($no_id); + $data->clean($path_id); + + $sql = "SELECT * FROM \"{$schema}\".sl_path sp, \"{$schema}\".sl_node sn + WHERE sp.pa_server=sn.no_id + AND sp.pa_client='{$no_id}' + AND sn.no_id='{$path_id}'"; + + return $data->selectSet($sql); + } + + /** + * Creates a path + */ + function createPath($no_id, $server, $conn, $retry) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($no_id); + $data->clean($server); + $data->clean($conn); + $data->clean($retry); + + $sql = "SELECT \"{$schema}\".storepath('{$server}', '{$no_id}', '{$conn}', '{$retry}')"; + + return $data->execute($sql); + } + + /** + * Drops a path + */ + function dropPath($no_id, $path_id) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($no_id); + $data->clean($path_id); + + $sql = "SELECT \"{$schema}\".droppath('{$path_id}', '{$no_id}')"; + + return $data->execute($sql); + } + + // LISTENS + + /** + * Gets node listens + */ + function getListens($no_id) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($no_id); + + $sql = "SELECT * FROM \"{$schema}\".sl_listen sl, \"{$schema}\".sl_node sn + WHERE sl.li_provider=sn.no_id + AND sl.li_receiver='{$no_id}' + ORDER BY sn.no_comment"; + + return $data->selectSet($sql); + } + + /** + * Gets node listen details + */ + function getListen($no_id, $listen_id) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($no_id); + $data->clean($listen_id); + + $sql = "SELECT sl.*, sn.*, sn2.no_comment AS origin FROM \"{$schema}\".sl_listen sl, \"{$schema}\".sl_node sn, \"{$schema}\".sl_node sn2 + WHERE sl.li_provider=sn.no_id + AND sl.li_receiver='{$no_id}' + AND sn.no_id='{$listen_id}' + AND sn2.no_id=sl.li_origin"; + + return $data->selectSet($sql); + } + + /** + * Creates a listen + */ + function createListen($no_id, $origin, $provider) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($no_id); + $data->clean($origin); + $data->clean($provider); + + $sql = "SELECT \"{$schema}\".storelisten('{$origin}', '{$provider}', '{$no_id}')"; + + return $data->execute($sql); + } + + /** + * Drops a listen + */ + function dropListen($no_id, $origin, $provider) { + global $data; + + $schema = $this->slony_schema; + $data->fieldClean($schema); + $data->clean($no_id); + $data->clean($origin); + $data->clean($provider); + + $sql = "SELECT \"{$schema}\".droplisten('{$origin}', '{$provider}', '{$no_id}')"; + + return $data->execute($sql); + } + + // ACTIONS + + + +} + +?> diff --git a/php/pgadmin/colproperties.php b/php/pgadmin/colproperties.php new file mode 100644 index 0000000..9aa7f72 --- /dev/null +++ b/php/pgadmin/colproperties.php @@ -0,0 +1,292 @@ +printTrail('column'); + $misc->printTitle($lang['stralter'], 'pg.column.alter'); + $misc->printMsg($msg); + + echo ""; + echo "
\n"; + + // Output table header + echo "\n"; + echo "\n"; + if ($data->hasAlterColumnType()) { + echo "\n"; + echo "\n"; + } + else { + echo "\n"; + } + echo "\n\n\n"; + + $column = $data->getTableAttributes($_REQUEST['table'], $_REQUEST['column']); + $column->fields['attnotnull'] = $data->phpBool($column->fields['attnotnull']); + + // Upon first drawing the screen, load the existing column information + // from the database. + if (!isset($_REQUEST['default'])) { + $_REQUEST['field'] = $column->fields['attname']; + $_REQUEST['type'] = $column->fields['base_type']; + // Check to see if its' an array type... + // XXX: HACKY + if (substr($column->fields['base_type'], strlen($column->fields['base_type']) - 2) == '[]') { + $_REQUEST['type'] = substr($column->fields['base_type'], 0, strlen($column->fields['base_type']) - 2); + $_REQUEST['array'] = '[]'; + } + else { + $_REQUEST['type'] = $column->fields['base_type']; + $_REQUEST['array'] = ''; + } + // To figure out the length, look in the brackets :( + // XXX: HACKY + if ($column->fields['type'] != $column->fields['base_type'] && preg_match('/\\(([0-9, ]*)\\)/', $column->fields['type'], $bits)) { + $_REQUEST['length'] = $bits[1]; + } + else + $_REQUEST['length'] = ''; + $_REQUEST['default'] = $_REQUEST['olddefault'] = $column->fields['adsrc']; + if ($column->fields['attnotnull']) $_REQUEST['notnull'] = 'YES'; + $_REQUEST['comment'] = $column->fields['comment']; + } + + // Column name + echo "\n"; + + // Column type + $escaped_predef_types = array(); // the JS escaped array elements + if ($data->hasAlterColumnType()) { + // Fetch all available types + $types = $data->getTypes(true, false, true); + $types_for_js = array(); + + echo "\n"; + + // Output array type selector + echo "\n"; + $predefined_size_types = array_intersect($data->predefined_size_types, $types_for_js); + foreach($predefined_size_types as $value) { + $escaped_predef_types[] = "'{$value}'"; + } + + echo "\n"; + } else { + // Otherwise draw the read-only type name + echo "\n"; + } + + echo "\n"; + echo "\n"; + echo "\n"; + echo "
{$lang['strname']}{$lang['strtype']}{$lang['strlength']}{$lang['strtype']}{$lang['strnotnull']}{$lang['strdefault']}{$lang['strcomment']}
_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['field']), "\" />", $misc->printVal($data->formatType($column->fields['type'], $column->fields['atttypmod'])), "
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "\n"; + if ($column->fields['attnotnull']) echo "\n"; + echo "formatType($column->fields['type'], $column->fields['atttypmod'])), "\" />\n"; + // Add hidden variables to suppress error notices if we don't support altering column type + if (!$data->hasAlterColumnType()) { + echo "\n"; + echo "\n"; + echo "\n"; + } + echo "\n"; + echo "

\n"; + echo "
\n"; + echo "\n"; + break; + case 2: + // Check inputs + if (trim($_REQUEST['field']) == '') { + $_REQUEST['stage'] = 1; + doAlter($lang['strcolneedsname']); + return; + } + if (!isset($_REQUEST['length'])) $_REQUEST['length'] = ''; + $status = $data->alterColumn($_REQUEST['table'], $_REQUEST['column'], $_REQUEST['field'], + isset($_REQUEST['notnull']), isset($_REQUEST['oldnotnull']), + $_REQUEST['default'], $_REQUEST['olddefault'], + $_REQUEST['type'], $_REQUEST['length'], $_REQUEST['array'], $_REQUEST['oldtype'], + $_REQUEST['comment']); + if ($status == 0) { + if ($_REQUEST['column'] != $_REQUEST['field']) { + $_REQUEST['column'] = $_REQUEST['field']; + $_reload_browser = true; + } + doDefault($lang['strcolumnaltered']); + } + else { + $_REQUEST['stage'] = 1; + doAlter($lang['strcolumnalteredbad']); + return; + } + break; + default: + echo "

{$lang['strinvalidparam']}

\n"; + } + } + + /** + * Show default list of columns in the table + */ + function doDefault($msg = '', $isTable = true) { + global $data, $conf, $misc, $tableName; + global $lang; + + function attPre(&$rowdata) { + global $data; + $rowdata->fields['+type'] = $data->formatType($rowdata->fields['type'], $rowdata->fields['atttypmod']); + } + + if (empty($_REQUEST['column'])) + $msg.= "
{$lang['strnoobjects']}"; + + $misc->printTrail('column'); + //$misc->printTitle($lang['strcolprop']); + $misc->printTabs('column','properties'); + $misc->printMsg($msg); + + if (! empty($_REQUEST['column'])) { + // Get table + $tdata = $data->getTable($tableName); + // Get columns + $attrs = $data->getTableAttributes($tableName, $_REQUEST['column']); + + // Show comment if any + if ($attrs->fields['comment'] !== null) + echo "

", $misc->printVal($attrs->fields['comment']), "

\n"; + + $column = array( + 'column' => array( + 'title' => $lang['strcolumn'], + 'field' => field('attname'), + ), + 'type' => array( + 'title' => $lang['strtype'], + 'field' => field('+type'), + ) + ); + + if ($isTable) { + $column['notnull'] = array( + 'title' => $lang['strnotnull'], + 'field' => field('attnotnull'), + 'type' => 'bool', + 'params'=> array('true' => 'NOT NULL', 'false' => '') + ); + $column['default'] = array( + 'title' => $lang['strdefault'], + 'field' => field('adsrc'), + ); + } + + $actions=array(); + $misc->printTable($attrs, $column, $actions, null, 'attPre'); + + echo "
\n"; + + echo "\n"; + } + } + + $misc->printHeader($lang['strtables'] . ' - ' . $tableName); + $misc->printBody(); + + if (isset($_REQUEST['view'])) + doDefault(null, false); + else + switch ($action) { + case 'properties': + if (isset($_POST['cancel'])) doDefault(); + else doAlter(); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/conf/config.inc.php b/php/pgadmin/conf/config.inc.php new file mode 100644 index 0000000..0e871db --- /dev/null +++ b/php/pgadmin/conf/config.inc.php @@ -0,0 +1,165 @@ + diff --git a/php/pgadmin/conf/config.inc.php-dist b/php/pgadmin/conf/config.inc.php-dist new file mode 100644 index 0000000..81b1252 --- /dev/null +++ b/php/pgadmin/conf/config.inc.php-dist @@ -0,0 +1,159 @@ + diff --git a/php/pgadmin/constraints.php b/php/pgadmin/constraints.php new file mode 100644 index 0000000..f966f48 --- /dev/null +++ b/php/pgadmin/constraints.php @@ -0,0 +1,576 @@ +printTrail('table'); + $misc->printTitle($lang['straddfk'],'pg.constraint.foreign_key'); + $misc->printMsg($msg); + + // Unserialize target and fetch appropriate table. This is a bit messy + // because the table could be in another schema. + $data->setSchema($_REQUEST['target']['schemaname']); + $attrs = $data->getTableAttributes($_REQUEST['target']['tablename']); + $data->setSchema($_REQUEST['schema']); + + $selColumns = new XHTML_select('TableColumnList', true, 10); + $selColumns->set_style('width: 15em;'); + + if ($attrs->recordCount() > 0) { + while (!$attrs->EOF) { + $selColumns->add(new XHTML_Option($attrs->fields['attname'])); + $attrs->moveNext(); + } + } + + $selIndex = new XHTML_select('IndexColumnList[]', true, 10); + $selIndex->set_style('width: 15em;'); + $selIndex->set_attribute('id', 'IndexColumnList'); + $buttonAdd = new XHTML_Button('add', '>>'); + $buttonAdd->set_attribute('onclick', 'buttonPressed(this);'); + $buttonAdd->set_attribute('type', 'button'); + + $buttonRemove = new XHTML_Button('remove', '<<'); + $buttonRemove->set_attribute('onclick', 'buttonPressed(this);'); + $buttonRemove->set_attribute('type', 'button'); + + echo "
\n"; + + echo "\n"; + echo ""; + echo "\n"; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo ""; + echo "\n"; + echo "
{$lang['strfktarget']}
{$lang['strtablecolumnlist']} {$lang['strfkcolumnlist']}
" . $selColumns->fetch() . "" . $buttonRemove->fetch() . $buttonAdd->fetch() . "" . $selIndex->fetch() . "
{$lang['stractions']}
\n"; + // ON SELECT actions + echo "{$lang['stronupdate']}
\n"; + + // ON DELETE actions + echo "{$lang['strondelete']}
\n"; + + // MATCH options + echo "
\n"; + + // DEFERRABLE options + echo "
\n"; + + // INITIALLY options + echo "\n"; + echo "
\n"; + + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + break; + case 3: + // Unserialize target + $_POST['target'] = unserialize($_POST['target']); + + // Check that they've given at least one column + if (isset($_POST['SourceColumnList'])) $temp = unserialize($_POST['SourceColumnList']); + if (!isset($_POST['IndexColumnList']) || !is_array($_POST['IndexColumnList']) + || sizeof($_POST['IndexColumnList']) == 0 || !isset($temp) + || !is_array($temp) || sizeof($temp) == 0) addForeignKey(2, $lang['strfkneedscols']); + else { + $status = $data->addForeignKey($_POST['table'], $_POST['target']['schemaname'], $_POST['target']['tablename'], + unserialize($_POST['SourceColumnList']), $_POST['IndexColumnList'], $_POST['upd_action'], $_POST['del_action'], + $_POST['match'], $_POST['deferrable'], $_POST['initially'], $_POST['name']); + if ($status == 0) + doDefault($lang['strfkadded']); + else + addForeignKey(2, $lang['strfkaddedbad']); + } + break; + default: + $misc->printTrail('table'); + $misc->printTitle($lang['straddfk'],'pg.constraint.foreign_key'); + $misc->printMsg($msg); + + $attrs = $data->getTableAttributes($_REQUEST['table']); + $tables = $data->getTables(true); + + $selColumns = new XHTML_select('TableColumnList', true, 10); + $selColumns->set_style('width: 15em;'); + + if ($attrs->recordCount() > 0) { + while (!$attrs->EOF) { + $selColumns->add(new XHTML_Option($attrs->fields['attname'])); + $attrs->moveNext(); + } + } + + $selIndex = new XHTML_select('IndexColumnList[]', true, 10); + $selIndex->set_style('width: 15em;'); + $selIndex->set_attribute('id', 'IndexColumnList'); + $buttonAdd = new XHTML_Button('add', '>>'); + $buttonAdd->set_attribute('onclick', 'buttonPressed(this);'); + $buttonAdd->set_attribute('type', 'button'); + + $buttonRemove = new XHTML_Button('remove', '<<'); + $buttonRemove->set_attribute('onclick', 'buttonPressed(this);'); + $buttonRemove->set_attribute('type', 'button'); + + echo "
\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo ""; + echo ""; + echo ""; + echo "
{$lang['strname']}
_maxNameLen}\" />
{$lang['strtablecolumnlist']} {$lang['strfkcolumnlist']}
" . $selColumns->fetch() . "" . $buttonRemove->fetch() . $buttonAdd->fetch() . "" . $selIndex->fetch() . "
{$lang['strfktarget']}
\n"; + echo "
\n"; + + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + break; + } + + } + + /** + * Confirm and then actually add a PRIMARY KEY or UNIQUE constraint + */ + function addPrimaryOrUniqueKey($type, $confirm, $msg = '') { + global $data, $misc; + global $lang; + + if (!isset($_POST['name'])) $_POST['name'] = ''; + + if ($confirm) { + if (!isset($_POST['name'])) $_POST['name'] = ''; + if (!isset($_POST['tablespace'])) $_POST['tablespace'] = ''; + + $misc->printTrail('table'); + + switch ($type) { + case 'primary': + $misc->printTitle($lang['straddpk'],'pg.constraint.primary_key'); + break; + case 'unique': + $misc->printTitle($lang['stradduniq'],'pg.constraint.unique_key'); + break; + default: + doDefault($lang['strinvalidparam']); + return; + } + + $misc->printMsg($msg); + + $attrs = $data->getTableAttributes($_REQUEST['table']); + // Fetch all tablespaces from the database + if ($data->hasTablespaces()) $tablespaces = $data->getTablespaces(); + + + $selColumns = new XHTML_select('TableColumnList', true, 10); + $selColumns->set_style('width: 15em;'); + + if ($attrs->recordCount() > 0) { + while (!$attrs->EOF) { + $selColumns->add(new XHTML_Option($attrs->fields['attname'])); + $attrs->moveNext(); + } + } + + $selIndex = new XHTML_select('IndexColumnList[]', true, 10); + $selIndex->set_style('width: 15em;'); + $selIndex->set_attribute('id', 'IndexColumnList'); + $buttonAdd = new XHTML_Button('add', '>>'); + $buttonAdd->set_attribute('onclick', 'buttonPressed(this);'); + $buttonAdd->set_attribute('type', 'button'); + + $buttonRemove = new XHTML_Button('remove', '<<'); + $buttonRemove->set_attribute('onclick', 'buttonPressed(this);'); + $buttonRemove->set_attribute('type', 'button'); + + echo "
\n"; + + echo "\n"; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo ""; + echo "\n"; + + // Tablespace (if there are any) + if ($data->hasTablespaces() && $tablespaces->recordCount() > 0) { + echo ""; + echo "\n"; + } + + echo "
{$lang['strname']}
_maxNameLen}\" />
{$lang['strtablecolumnlist']} {$lang['strindexcolumnlist']}
" . $selColumns->fetch() . "" . $buttonRemove->fetch() . $buttonAdd->fetch() . "" . $selIndex->fetch() . "
{$lang['strtablespace']}
\n"; + + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + // Default tablespace to empty if it isn't set + if (!isset($_POST['tablespace'])) $_POST['tablespace'] = ''; + + if ($_POST['type'] == 'primary') { + // Check that they've given at least one column + if (!isset($_POST['IndexColumnList']) || !is_array($_POST['IndexColumnList']) + || sizeof($_POST['IndexColumnList']) == 0) addPrimaryOrUniqueKey($_POST['type'], true, $lang['strpkneedscols']); + else { + $status = $data->addPrimaryKey($_POST['table'], $_POST['IndexColumnList'], $_POST['name'], $_POST['tablespace']); + if ($status == 0) + doDefault($lang['strpkadded']); + else + addPrimaryOrUniqueKey($_POST['type'], true, $lang['strpkaddedbad']); + } + } + elseif ($_POST['type'] == 'unique') { + // Check that they've given at least one column + if (!isset($_POST['IndexColumnList']) || !is_array($_POST['IndexColumnList']) + || sizeof($_POST['IndexColumnList']) == 0) addPrimaryOrUniqueKey($_POST['type'], true, $lang['struniqneedscols']); + else { + $status = $data->addUniqueKey($_POST['table'], $_POST['IndexColumnList'], $_POST['name'], $_POST['tablespace']); + if ($status == 0) + doDefault($lang['struniqadded']); + else + addPrimaryOrUniqueKey($_POST['type'], true, $lang['struniqaddedbad']); + } + } + else doDefault($lang['strinvalidparam']); + } + } + + /** + * Confirm and then actually add a CHECK constraint + */ + function addCheck($confirm, $msg = '') { + global $data, $misc; + global $lang; + + if (!isset($_POST['name'])) $_POST['name'] = ''; + if (!isset($_POST['definition'])) $_POST['definition'] = ''; + + if ($confirm) { + $misc->printTrail('table'); + $misc->printTitle($lang['straddcheck'],'pg.constraint.check'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + + echo "\n"; + echo "
{$lang['strname']}{$lang['strdefinition']}
_maxNameLen}\" value=\"", + htmlspecialchars($_POST['name']), "\" />()
\n"; + + echo "\n"; + echo "\n"; + echo $misc->form; + echo "

\n"; + echo "

\n"; + echo "
\n"; + + } + else { + if (trim($_POST['definition']) == '') + addCheck(true, $lang['strcheckneedsdefinition']); + else { + $status = $data->addCheckConstraint($_POST['table'], + $_POST['definition'], $_POST['name']); + if ($status == 0) + doDefault($lang['strcheckadded']); + else + addCheck(true, $lang['strcheckaddedbad']); + } + } + } + + /** + * Show confirmation of drop and perform actual drop + */ + function doDrop($confirm) { + global $data, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('constraint'); + $misc->printTitle($lang['strdrop'],'pg.constraint.drop'); + + echo "

", sprintf($lang['strconfdropconstraint'], $misc->printVal($_REQUEST['constraint']), + $misc->printVal($_REQUEST['table'])), "

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $data->dropConstraint($_POST['constraint'], $_POST['table'], $_POST['type'], isset($_POST['cascade'])); + if ($status == 0) + doDefault($lang['strconstraintdropped']); + else + doDefault($lang['strconstraintdroppedbad']); + } + } + + /** + * List all the constraints on the table + */ + function doDefault($msg = '') { + global $data, $misc, $lang; + + function cnPre(&$rowdata) { + global $data; + if (is_null($rowdata->fields['consrc'])) { + $atts = $data->getAttributeNames($_REQUEST['table'], explode(' ', $rowdata->fields['indkey'])); + $rowdata->fields['+definition'] = ($rowdata->fields['contype'] == 'u' ? "UNIQUE (" : "PRIMARY KEY (") . join(',', $atts) . ')'; + } else { + $rowdata->fields['+definition'] = $rowdata->fields['consrc']; + } + } + + $misc->printTrail('table'); + $misc->printTabs('table','constraints'); + $misc->printMsg($msg); + + $constraints = $data->getConstraints($_REQUEST['table']); + + $columns = array( + 'constraint' => array( + 'title' => $lang['strname'], + 'field' => field('conname'), + ), + 'definition' => array( + 'title' => $lang['strdefinition'], + 'field' => field('+definition'), + 'type' => 'pre', + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('constcomment'), + ), + ); + + $actions = array( + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "constraints.php?action=confirm_drop&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", + 'vars' => array('constraint' => 'conname', 'type' => 'contype'), + ), + ); + + $misc->printTable($constraints, $columns, $actions, $lang['strnoconstraints'], 'cnPre'); + + echo "\n"; + } + + function doTree() { + global $misc, $data; + + $constraints = $data->getConstraints($_REQUEST['table']); + + $reqvars = $misc->getRequestVars('schema'); + + function getIcon($f) { + switch($f['contype']) { + case 'u': + return 'UniqueConstraint'; + case 'c': + return 'CheckConstraint'; + case 'f': + return 'ForeignKey'; + case 'p': + return 'PrimaryKey'; + + } + } + + $attrs = array( + 'text' => field('conname'), + 'icon' => callback('getIcon'), + ); + + $misc->printTreeXML($constraints, $attrs); + exit; + } + + if ($action == 'tree') doTree(); + + $misc->printHeader($lang['strtables'] . ' - ' . $_REQUEST['table'] . ' - ' . $lang['strconstraints'], + ""); + + if ($action == 'add_unique_key' || $action == 'save_add_unique_key' + || $action == 'add_primary_key' || $action == 'save_add_primary_key' + || $action == 'add_foreign_key' || $action == 'save_add_foreign_key') + echo ""; + else + $misc->printBody(); + + switch ($action) { + case 'add_foreign_key': + addForeignKey(1); + break; + case 'save_add_foreign_key': + if (isset($_POST['cancel'])) doDefault(); + else addForeignKey($_REQUEST['stage']); + break; + case 'add_unique_key': + addPrimaryOrUniqueKey('unique', true); + break; + case 'save_add_unique_key': + if (isset($_POST['cancel'])) doDefault(); + else addPrimaryOrUniqueKey('unique', false); + break; + case 'add_primary_key': + addPrimaryOrUniqueKey('primary', true); + break; + case 'save_add_primary_key': + if (isset($_POST['cancel'])) doDefault(); + else addPrimaryOrUniqueKey('primary', false); + break; + case 'add_check': + addCheck(true); + break; + case 'save_add_check': + if (isset($_POST['cancel'])) doDefault(); + else addCheck(false); + break; + case 'save_create': + doSaveCreate(); + break; + case 'create': + doCreate(); + break; + case 'drop': + if (isset($_POST['drop'])) doDrop(false); + else doDefault(); + break; + case 'confirm_drop': + doDrop(true); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/conversions.php b/php/pgadmin/conversions.php new file mode 100644 index 0000000..6952500 --- /dev/null +++ b/php/pgadmin/conversions.php @@ -0,0 +1,88 @@ +printTrail('schema'); + $misc->printTabs('schema', 'conversions'); + $misc->printMsg($msg); + + $conversions = $data->getconversions(); + + $columns = array( + 'conversion' => array( + 'title' => $lang['strname'], + 'field' => field('conname'), + ), + 'source_encoding' => array( + 'title' => $lang['strsourceencoding'], + 'field' => field('conforencoding'), + ), + 'target_encoding' => array( + 'title' => $lang['strtargetencoding'], + 'field' => field('contoencoding'), + ), + 'default' => array( + 'title' => $lang['strdefault'], + 'field' => field('condefault'), + 'type' => 'yesno', + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('concomment'), + ), + ); + + $actions = array(); + + $misc->printTable($conversions, $columns, $actions, $lang['strnoconversions']); + } + + /** + * Generate XML for the browser tree. + */ + function doTree() { + global $misc, $data; + + $conversions = $data->getconversions(); + + $attrs = array( + 'text' => field('conname'), + 'icon' => 'Conversion', + 'toolTip'=> field('concomment') + ); + + $misc->printTreeXML($conversions, $attrs); + exit; + } + + if ($action == 'tree') doTree(); + + $misc->printHeader($lang['strconversions']); + $misc->printBody(); + + switch ($action) { + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/database.php b/php/pgadmin/database.php new file mode 100644 index 0000000..290d2a0 --- /dev/null +++ b/php/pgadmin/database.php @@ -0,0 +1,676 @@ +{$term}", $string); + } + + /** + * Sends a signal to a process + */ + function doSignal() { + global $data, $lang; + + $status = $data->sendSignal($_REQUEST['procpid'], $_REQUEST['signal']); + if ($status == 0) + doProcesses($lang['strsignalsent']); + else + doProcesses($lang['strsignalsentbad']); + } + + /** + * Searches for a named database object + */ + function doFind($confirm = true, $msg = '') { + global $data, $misc; + global $lang, $conf; + + if (!isset($_REQUEST['term'])) $_REQUEST['term'] = ''; + if (!isset($_REQUEST['filter'])) $_REQUEST['filter'] = ''; + + $misc->printTrail('database'); + $misc->printTabs('database','find'); + $misc->printMsg($msg); + + echo "
\n"; + echo "

_maxNameLen}\" />\n"; + // Output list of filters. This is complex due to all the 'has' and 'conf' feature possibilities + echo "\n"; + echo "\n"; + echo $misc->form; + echo "

\n"; + echo "
\n"; + + // Default focus + $misc->setFocus('forms[0].term'); + + // If a search term has been specified, then perform the search + // and display the results, grouped by object type + if ($_REQUEST['term'] != '') { + $rs = $data->findObject($_REQUEST['term'], $_REQUEST['filter']); + if ($rs->recordCount() > 0) { + $curr = ''; + while (!$rs->EOF) { + // Output a new header if the current type has changed, but not if it's just changed the rule type + if ($rs->fields['type'] != $curr) { + // Short-circuit in the case of changing from table rules to view rules; table cols to view cols; + // table constraints to domain constraints + if ($rs->fields['type'] == 'RULEVIEW' && $curr == 'RULETABLE') { + $curr = $rs->fields['type']; + } + elseif ($rs->fields['type'] == 'COLUMNVIEW' && $curr == 'COLUMNTABLE') { + $curr = $rs->fields['type']; + } + elseif ($rs->fields['type'] == 'CONSTRAINTTABLE' && $curr == 'CONSTRAINTDOMAIN') { + $curr = $rs->fields['type']; + } + else { + if ($curr != '') echo "\n"; + $curr = $rs->fields['type']; + echo "

"; + switch ($curr) { + case 'SCHEMA': + echo $lang['strschemas']; + break; + case 'TABLE': + echo $lang['strtables']; + break; + case 'VIEW': + echo $lang['strviews']; + break; + case 'SEQUENCE': + echo $lang['strsequences']; + break; + case 'COLUMNTABLE': + case 'COLUMNVIEW': + echo $lang['strcolumns']; + break; + case 'INDEX': + echo $lang['strindexes']; + break; + case 'CONSTRAINTTABLE': + case 'CONSTRAINTDOMAIN': + echo $lang['strconstraints']; + break; + case 'TRIGGER': + echo $lang['strtriggers']; + break; + case 'RULETABLE': + case 'RULEVIEW': + echo $lang['strrules']; + break; + case 'FUNCTION': + echo $lang['strfunctions']; + break; + case 'TYPE': + echo $lang['strtypes']; + break; + case 'DOMAIN': + echo $lang['strdomains']; + break; + case 'OPERATOR': + echo $lang['stroperators']; + break; + case 'CONVERSION': + echo $lang['strconversions']; + break; + case 'LANGUAGE': + echo $lang['strlanguages']; + break; + case 'AGGREGATE': + echo $lang['straggregates']; + break; + case 'OPCLASS': + echo $lang['stropclasses']; + break; + } + echo "

"; + echo "\n"; + + echo "

", $rs->recordCount(), " ", $lang['strobjects'], "

\n"; + } + else echo "

{$lang['strnoobjects']}

\n"; + } + } + + /** + * Displays options for database download + */ + function doExport($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('database'); + $misc->printTabs('database','export'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\n"; + // Data only + echo "\n"; + echo "\n"; + echo "\n\n"; + echo "\n\n"; + // Structure only + echo "\n"; + echo "\n\n"; + // Structure and data + echo "\n"; + echo "\n"; + echo "\n\n"; + echo "\n\n"; + echo "\n\n"; + echo "
{$lang['strformat']}{$lang['stroptions']}
"; + echo "{$lang['strformat']}\n
"; + echo "{$lang['strformat']}\n
\n"; + + echo "

{$lang['stroptions']}

\n"; + echo "

\n"; + echo "
\n"; + // MSIE cannot download gzip in SSL mode - it's just broken + if (!(strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE') && isset($_SERVER['HTTPS']))) { + echo "
\n"; + } + echo "

\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "

\n"; + echo "
\n"; + } + + /** + * Show the current status of all database variables + */ + function doVariables() { + global $data, $misc; + global $lang; + + // Fetch the variables from the database + $variables = $data->getVariables(); + $misc->printTrail('database'); + $misc->printTabs('database','variables'); + + $columns = array( + 'variable' => array( + 'title' => $lang['strname'], + 'field' => field('name'), + ), + 'value' => array( + 'title' => $lang['strsetting'], + 'field' => field('setting'), + ), + ); + + $actions = array(); + + $misc->printTable($variables, $columns, $actions, $lang['strnodata']); + } + + /** + * Show all current database connections and any queries they + * are running. + */ + function doProcesses($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('database'); + $misc->printTabs('database','processes'); + $misc->printMsg($msg); + + if (strlen($msg) === 0) { + echo "
icon('Refresh')."\" alt=\"{$lang['strrefresh']}\" title=\"{$lang['strrefresh']}\"/> {$lang['strrefresh']}"; + } + + echo "
"; + currentProcesses(); + echo "
"; + } + + function currentProcesses($isAjax = false) { + global $data, $misc, $lang; + + // Display prepared transactions + if($data->hasPreparedXacts()) { + echo "

{$lang['strpreparedxacts']}

\n"; + $prep_xacts = $data->getPreparedXacts($_REQUEST['database']); + + $columns = array( + 'transaction' => array( + 'title' => $lang['strxactid'], + 'field' => field('transaction'), + ), + 'gid' => array( + 'title' => $lang['strgid'], + 'field' => field('gid'), + ), + 'prepared' => array( + 'title' => $lang['strstarttime'], + 'field' => field('prepared'), + ), + 'owner' => array( + 'title' => $lang['strowner'], + 'field' => field('owner'), + ), + ); + + $actions = array(); + + $misc->printTable($prep_xacts, $columns, $actions, $lang['strnodata']); + } + + // Fetch the processes from the database + echo "

{$lang['strprocesses']}

\n"; + $processes = $data->getProcesses($_REQUEST['database']); + + $columns = array( + 'user' => array( + 'title' => $lang['strusername'], + 'field' => field('usename'), + ), + 'process' => array( + 'title' => $lang['strprocess'], + 'field' => field('procpid'), + ), + 'query' => array( + 'title' => $lang['strsql'], + 'field' => field('current_query'), + ), + 'start_time' => array( + 'title' => $lang['strstarttime'], + 'field' => field('query_start'), + ), + ); + + // Build possible actions for our process list + $columns['actions'] = array('title' => $lang['stractions']); + + $actions = array( + 'cancel' => array( + 'title' => $lang['strcancel'], + 'url' => "database.php?action=signal&signal=CANCEL&{$misc->href}&", + 'vars' => array('procpid' => 'procpid') + ), + 'kill' => array( + 'title' => $lang['strkill'], + 'url' => "database.php?action=signal&signal=KILL&{$misc->href}&", + 'vars' => array('procpid' => 'procpid') + ) + ); + + // Remove actions where not supported + if (!$data->hasQueryKill()) unset($actions['kill']); + if (!$data->hasQueryCancel()) unset($actions['cancel']); + + if (count($actions) == 0) unset($columns['actions']); + + // Remove query start time for <7.4 + if (!isset($processes->fields['query_start'])) unset($columns['start_time']); + + $misc->printTable($processes, $columns, $actions, $lang['strnodata']); + + if ($isAjax) exit; + } + + function currentLocks($isAjax = false) { + global $data, $misc, $lang; + + // Get the info from the pg_locks view + $variables = $data->getLocks(); + + $columns = array( + 'namespace' => array( + 'title' => $lang['strschema'], + 'field' => field('nspname'), + ), + 'tablename' => array( + 'title' => $lang['strtablename'], + 'field' => field('tablename'), + ), + 'vxid' => array( + 'title' => $lang['strvirtualtransaction'], + 'field' => field('virtualtransaction'), + ), + 'transactionid' => array( + 'title' => $lang['strtransaction'], + 'field' => field('transaction'), + ), + 'processid' => array( + 'title' => $lang['strprocessid'], + 'field' => field('pid'), + ), + 'mode' => array( + 'title' => $lang['strmode'], + 'field' => field('mode'), + ), + 'granted' => array( + 'title' => $lang['strislockheld'], + 'field' => field('granted'), + 'type' => 'yesno', + ), + ); + + if (!$data->hasVirtualTransactionId()) unset($columns['vxid']); + + $actions = array(); + $misc->printTable($variables, $columns, $actions, $lang['strnodata']); + + if ($isAjax) exit; + } + + /** + * Show the existing table locks in the current database + */ + function doLocks() { + global $data, $misc; + global $lang; + + $misc->printTrail('database'); + $misc->printTabs('database','locks'); + + echo "
icon('Refresh')."\" alt=\"{$lang['strrefresh']}\" title=\"{$lang['strrefresh']}\"/> {$lang['strrefresh']}"; + + echo "
"; + currentLocks(); + echo "
"; + } + + /** + * Allow execution of arbitrary SQL statements on a database + */ + function doSQL() { + global $data, $misc; + global $lang; + + if ((!isset($_SESSION['sqlquery'])) || isset($_REQUEST['new'])) $_SESSION['sqlquery'] = ''; + + $misc->printTrail('database'); + $misc->printTabs('database','sql'); + echo "

{$lang['strentersql']}

\n"; + echo "
\n"; + echo "

{$lang['strsql']}
\n"; + echo "

\n"; + + // Check that file uploads are enabled + if (ini_get('file_uploads')) { + // Don't show upload option if max size of uploads is zero + $max_size = $misc->inisizeToBytes(ini_get('upload_max_filesize')); + if (is_double($max_size) && $max_size > 0) { + echo "

\n"; + echo "

\n"; + } + } + + echo "

\n"; + echo "

\n"; + echo $misc->form; + echo "

\n"; + echo "
\n"; + + // Default focus + $misc->setFocus('forms[0].query'); + } + + function doTree() { + global $misc, $data, $lang, $slony; + + $reqvars = $misc->getRequestVars('database'); + + $tabs = $misc->getNavTabs('database'); + + $items = $misc->adjustTabsForTree($tabs); + + $attrs = array( + 'text' => noEscape(field('title')), + 'icon' => field('icon'), + 'action' => url(field('url'), + $reqvars, + field('urlvars', array()) + ), + 'branch' => url(field('url'), + $reqvars, + field('urlvars'), + array('action' => 'tree') + ), + ); + + $misc->printTreeXML($items, $attrs); + + exit; + } + + require('./admin.php'); + + /* shortcuts: these functions exit the script */ + if ($action == 'tree') doTree(); + if ($action == 'refresh_locks') currentLocks(true); + if ($action == 'refresh_processes') currentProcesses(true); + + /* normal flow */ + if ($action == 'locks' or $action == 'processes') { + $scripts = "\n"; + $scripts .= ""; + + $refreshTime = $conf['ajax_refresh'] * 1000; + + $scripts .= "\n"; + } + + $misc->printHeader($lang['strdatabase'], $scripts); + $misc->printBody(); + + switch ($action) { + case 'find': + if (isset($_REQUEST['term'])) doFind(false); + else doFind(true); + break; + case 'sql': + doSQL(); + break; + case 'variables': + doVariables(); + break; + case 'processes': + doProcesses(); + break; + case 'locks': + doLocks(); + break; + case 'export': + doExport(); + break; + case 'signal': + doSignal(); + break; + default: + if (adminActions($action, 'database') === false) doSQL(); + break; + } + + $misc->printFooter(); +?> diff --git a/php/pgadmin/dataexport.php b/php/pgadmin/dataexport.php new file mode 100644 index 0000000..ea145b5 --- /dev/null +++ b/php/pgadmin/dataexport.php @@ -0,0 +1,345 @@ + 'sql', + 'copy' => 'sql', + 'csv' => 'csv', + 'tab' => 'txt', + 'html' => 'html', + 'xml' => 'xml' + ); + + // Prevent timeouts on large exports (non-safe mode only) + if (!ini_get('safe_mode')) set_time_limit(0); + + // if (!isset($_REQUEST['table']) && !isset($_REQUEST['query'])) + // What must we do in this case? Maybe redirect to the homepage? + + // If format is set, then perform the export + if (isset($_REQUEST['what'])) { + + // Include application functions + $_no_output = true; + include_once('./libraries/lib.inc.php'); + + switch ($_REQUEST['what']) { + case 'dataonly': + // Check to see if they have pg_dump set up and if they do, use that + // instead of custom dump code + if ($misc->isDumpEnabled() + && ($_REQUEST['d_format'] == 'copy' || $_REQUEST['d_format'] == 'sql')) { + include('./dbexport.php'); + exit; + } + else { + $format = $_REQUEST['d_format']; + $oids = isset($_REQUEST['d_oids']); + } + break; + case 'structureonly': + // Check to see if they have pg_dump set up and if they do, use that + // instead of custom dump code + if ($misc->isDumpEnabled()) { + include('./dbexport.php'); + exit; + } + else $clean = isset($_REQUEST['s_clean']); + break; + case 'structureanddata': + // Check to see if they have pg_dump set up and if they do, use that + // instead of custom dump code + if ($misc->isDumpEnabled()) { + include('./dbexport.php'); + exit; + } + else { + $format = $_REQUEST['sd_format']; + $clean = isset($_REQUEST['sd_clean']); + $oids = isset($_REQUEST['sd_oids']); + } + break; + } + + // Make it do a download, if necessary + if ($_REQUEST['output'] == 'download') { + // Set headers. MSIE is totally broken for SSL downloading, so + // we need to have it download in-place as plain text + if (strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE') && isset($_SERVER['HTTPS'])) { + header('Content-Type: text/plain'); + } + else { + header('Content-Type: application/download'); + + if (isset($extensions[$format])) + $ext = $extensions[$format]; + else + $ext = 'txt'; + + header('Content-Disposition: attachment; filename=dump.' . $ext); + } + } + else { + header('Content-Type: text/plain'); + } + + if (isset($_REQUEST['query'])) $_REQUEST['query'] = trim(urldecode($_REQUEST['query'])); + + // Set the schema search path + if (isset($_REQUEST['search_path'])) { + $data->setSearchPath(array_map('trim',explode(',',$_REQUEST['search_path']))); + } + + // Set up the dump transaction + $status = $data->beginDump(); + + // If the dump is not dataonly then dump the structure prefix + if ($_REQUEST['what'] != 'dataonly') + echo $data->getTableDefPrefix($_REQUEST['table'], $clean); + + // If the dump is not structureonly then dump the actual data + if ($_REQUEST['what'] != 'structureonly') { + // Get database encoding + $dbEncoding = $data->getDatabaseEncoding(); + + // Set fetch mode to NUM so that duplicate field names are properly returned + $data->conn->setFetchMode(ADODB_FETCH_NUM); + + // Execute the query, if set, otherwise grab all rows from the table + if (isset($_REQUEST['table'])) + $rs = $data->dumpRelation($_REQUEST['table'], $oids); + else + $rs = $data->conn->Execute($_REQUEST['query']); + + if ($format == 'copy') { + $data->fieldClean($_REQUEST['table']); + echo "COPY \"{$_REQUEST['table']}\""; + if ($oids) echo " WITH OIDS"; + echo " FROM stdin;\n"; + while (!$rs->EOF) { + $first = true; + while(list($k, $v) = each($rs->fields)) { + // Escape value + $v = $data->escapeBytea($v); + + // We add an extra escaping slash onto octal encoded characters + $v = preg_replace('/\\\\([0-7]{3})/', '\\\\\1', $v); + if ($first) { + echo (is_null($v)) ? '\\N' : $v; + $first = false; + } + else echo "\t", (is_null($v)) ? '\\N' : $v; + } + echo "\n"; + $rs->moveNext(); + } + echo "\\.\n"; + } + elseif ($format == 'html') { + echo "\r\n"; + echo "\r\n"; + echo "\r\n"; + echo "\t\r\n"; + echo "\tcodemap[$dbEncoding]}\" />\r\n"; + echo "\r\n"; + echo "\r\n"; + echo "\r\n"; + echo "\t\r\n"; + if (!$rs->EOF) { + // Output header row + $j = 0; + foreach ($rs->fields as $k => $v) { + $finfo = $rs->fetchField($j++); + if ($finfo->name == $data->id && !$oids) continue; + echo "\t\t\r\n"; + } + } + echo "\t\r\n"; + while (!$rs->EOF) { + echo "\t\r\n"; + $j = 0; + foreach ($rs->fields as $k => $v) { + $finfo = $rs->fetchField($j++); + if ($finfo->name == $data->id && !$oids) continue; + echo "\t\t\r\n"; + } + echo "\t\r\n"; + $rs->moveNext(); + } + echo "
", $misc->printVal($finfo->name, true), "
", $misc->printVal($v, true, $finfo->type), "
\r\n"; + echo "\r\n"; + echo "\r\n"; + } + elseif ($format == 'xml') { + echo "codemap[$dbEncoding])) + echo " encoding=\"{$data->codemap[$dbEncoding]}\""; + echo " ?>\n"; + echo "\n"; + if (!$rs->EOF) { + // Output header row + $j = 0; + echo "\t
\n"; + foreach ($rs->fields as $k => $v) { + $finfo = $rs->fetchField($j++); + $name = htmlspecialchars($finfo->name); + $type = htmlspecialchars($finfo->type); + echo "\t\t\n"; + } + echo "\t
\n"; + } + echo "\t\n"; + while (!$rs->EOF) { + $j = 0; + echo "\t\t\n"; + foreach ($rs->fields as $k => $v) { + $finfo = $rs->fetchField($j++); + $name = htmlspecialchars($finfo->name); + if (!is_null($v)) $v = htmlspecialchars($v); + echo "\t\t\t{$v}\n"; + } + echo "\t\t\n"; + $rs->moveNext(); + } + echo "\t\n"; + echo "
\n"; + } + elseif ($format == 'sql') { + $data->fieldClean($_REQUEST['table']); + while (!$rs->EOF) { + echo "INSERT INTO \"{$_REQUEST['table']}\" ("; + $first = true; + $j = 0; + foreach ($rs->fields as $k => $v) { + $finfo = $rs->fetchField($j++); + $k = $finfo->name; + // SQL (INSERT) format cannot handle oids + // if ($k == $data->id) continue; + // Output field + $data->fieldClean($k); + if ($first) echo "\"{$k}\""; + else echo ", \"{$k}\""; + + if (!is_null($v)) { + // Output value + // addCSlashes converts all weird ASCII characters to octal representation, + // EXCEPT the 'special' ones like \r \n \t, etc. + $v = addCSlashes($v, "\0..\37\177..\377"); + // We add an extra escaping slash onto octal encoded characters + $v = preg_replace('/\\\\([0-7]{3})/', '\\\1', $v); + // Finally, escape all apostrophes + $v = str_replace("'", "''", $v); + } + if ($first) { + $values = (is_null($v) ? 'NULL' : "'{$v}'"); + $first = false; + } + else $values .= ', ' . ((is_null($v) ? 'NULL' : "'{$v}'")); + } + echo ") VALUES ({$values});\n"; + $rs->moveNext(); + } + } + else { + switch ($format) { + case 'tab': + $sep = "\t"; + break; + case 'csv': + default: + $sep = ','; + break; + } + if (!$rs->EOF) { + // Output header row + $first = true; + foreach ($rs->fields as $k => $v) { + $finfo = $rs->fetchField($k); + $v = $finfo->name; + if (!is_null($v)) $v = str_replace('"', '""', $v); + if ($first) { + echo "\"{$v}\""; + $first = false; + } + else echo "{$sep}\"{$v}\""; + } + echo "\r\n"; + } + while (!$rs->EOF) { + $first = true; + foreach ($rs->fields as $k => $v) { + if (!is_null($v)) $v = str_replace('"', '""', $v); + if ($first) { + echo (is_null($v)) ? "\"\\N\"" : "\"{$v}\""; + $first = false; + } + else echo is_null($v) ? "{$sep}\"\\N\"" : "{$sep}\"{$v}\""; + } + echo "\r\n"; + $rs->moveNext(); + } + } + } + + // If the dump is not dataonly then dump the structure suffix + if ($_REQUEST['what'] != 'dataonly') { + // Set fetch mode back to ASSOC for the table suffix to work + $data->conn->setFetchMode(ADODB_FETCH_ASSOC); + echo $data->getTableDefSuffix($_REQUEST['table']); + } + + // Finish the dump transaction + $status = $data->endDump(); + } + else { + // Include application functions + include_once('./libraries/lib.inc.php'); + + $misc->printHeader($lang['strexport']); + $misc->printBody(); + $misc->printTrail(isset($_REQUEST['subject']) ? $_REQUEST['subject'] : 'database'); + $misc->printTitle($lang['strexport']); + if (isset($msg)) $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo ""; + echo "
{$lang['strformat']}:
\n"; + + echo "

{$lang['stroptions']}

\n"; + echo "

\n"; + echo "

\n"; + + echo "

\n"; + echo "\n"; + if (isset($_REQUEST['table'])) { + echo "\n"; + } + echo "\n"; + if (isset($_REQUEST['search_path'])) { + echo "\n"; + } + echo $misc->form; + echo "

\n"; + echo "
\n"; + + $misc->printFooter(); + } + +?> diff --git a/php/pgadmin/dataimport.php b/php/pgadmin/dataimport.php new file mode 100644 index 0000000..ff81cd9 --- /dev/null +++ b/php/pgadmin/dataimport.php @@ -0,0 +1,298 @@ +rollbackTransaction(); + $misc->printMsg($lang['strimporterror']); + exit; + } + $state = 'DATA'; + break; + case 'HEADER': + if ($state != 'DATA') { + $data->rollbackTransaction(); + $misc->printMsg($lang['strimporterror']); + exit; + } + $state = 'HEADER'; + break; + case 'RECORDS': + if ($state != 'READ_HEADER') { + $data->rollbackTransaction(); + $misc->printMsg($lang['strimporterror']); + exit; + } + $state = 'RECORDS'; + break; + case 'ROW': + if ($state != 'RECORDS') { + $data->rollbackTransaction(); + $misc->printMsg($lang['strimporterror']); + exit; + } + $state = 'ROW'; + $curr_row = array(); + break; + case 'COLUMN': + // We handle columns in rows + if ($state == 'ROW') { + $state = 'COLUMN'; + $curr_col_name = $attrs['NAME']; + $curr_col_null = isset($attrs['NULL']); + } + // And we ignore columns in headers and fail in any other context + elseif ($state != 'HEADER') { + $data->rollbackTransaction(); + $misc->printMsg($lang['strimporterror']); + exit; + } + break; + default: + // An unrecognised tag means failure + $data->rollbackTransaction(); + $misc->printMsg($lang['strimporterror']); + exit; + } + } + + /** + * Close tag handler for XML import feature + */ + function _endElement($parser, $name) { + global $data, $misc, $lang; + global $state, $curr_row, $curr_col_name, $curr_col_val, $curr_col_null; + + switch ($name) { + case 'DATA': + $state = 'READ_DATA'; + break; + case 'HEADER': + $state = 'READ_HEADER'; + break; + case 'RECORDS': + $state = 'READ_RECORDS'; + break; + case 'ROW': + // Build value map in order to insert row into table + $fields = array(); + $vars = array(); + $nulls = array(); + $format = array(); + $types = array(); + $i = 0; + foreach ($curr_row as $k => $v) { + $fields[$i] = $k; + // Check for nulls + if ($v === null) $nulls[$i] = 'on'; + // Add to value array + $vars[$i] = $v; + // Format is always VALUE + $format[$i] = 'VALUE'; + // Type is always text + $types[$i] = 'text'; + $i++; + } + $status = $data->insertRow($_REQUEST['table'], $fields, $vars, $nulls, $format, $types); + if ($status != 0) { + $data->rollbackTransaction(); + $misc->printMsg($lang['strimporterror']); + exit; + } + $curr_row = array(); + $state = 'RECORDS'; + break; + case 'COLUMN': + $curr_row[$curr_col_name] = ($curr_col_null ? null : $curr_col_val); + $curr_col_name = null; + $curr_col_val = null; + $curr_col_null = false; + $state = 'ROW'; + break; + default: + // An unrecognised tag means failure + $data->rollbackTransaction(); + $misc->printMsg($lang['strimporterror']); + exit; + } + } + + /** + * Character data handler for XML import feature + */ + function _charHandler($parser, $cdata) { + global $data, $misc, $lang; + global $state, $curr_col_val; + + if ($state == 'COLUMN') { + $curr_col_val .= $cdata; + } + } + + function loadNULLArray() { + $array = array(); + if (isset($_POST['allowednulls'])) { + foreach ($_POST['allowednulls'] as $null_char) + $array[] = $null_char; + } + return $array; + } + + function determineNull($field, $null_array) { + return in_array($field, $null_array); + } + + $misc->printHeader($lang['strimport']); + $misc->printTrail('table'); + $misc->printTabs('table','import'); + + // Check that file is specified and is an uploaded file + if (isset($_FILES['source']) && is_uploaded_file($_FILES['source']['tmp_name']) && is_readable($_FILES['source']['tmp_name'])) { + + $fd = fopen($_FILES['source']['tmp_name'], 'r'); + // Check that file was opened successfully + if ($fd !== false) { + $null_array = loadNULLArray(); + $status = $data->beginTransaction(); + if ($status != 0) { + $misc->printMsg($lang['strimporterror']); + exit; + } + + // If format is set to 'auto', then determine format automatically from file name + if ($_REQUEST['format'] == 'auto') { + $extension = substr(strrchr($_FILES['source']['name'], '.'), 1); + switch ($extension) { + case 'csv': + $_REQUEST['format'] = 'csv'; + break; + case 'txt': + $_REQUEST['format'] = 'tab'; + break; + case 'xml': + $_REQUEST['format'] = 'xml'; + break; + default: + $data->rollbackTransaction(); + $misc->printMsg($lang['strimporterror-fileformat']); + exit; + } + } + + // Do different import technique depending on file format + switch ($_REQUEST['format']) { + case 'csv': + case 'tab': + // XXX: Length of CSV lines limited to 100k + $csv_max_line = 100000; + // Set delimiter to tabs or commas + if ($_REQUEST['format'] == 'csv') $csv_delimiter = ','; + else $csv_delimiter = "\t"; + // Get first line of field names + $fields = fgetcsv($fd, $csv_max_line, $csv_delimiter); + $row = 2; //We start on the line AFTER the field names + while ($line = fgetcsv($fd, $csv_max_line, $csv_delimiter)) { + // Build value map + $t_fields = array(); + $vars = array(); + $nulls = array(); + $format = array(); + $types = array(); + $i = 0; + foreach ($fields as $f) { + // Check that there is a column + if (!isset($line[$i])) { + $misc->printMsg(sprintf($lang['strimporterrorline-badcolumnnum'], $row)); + exit; + } + $t_fields[$i] = $f; + + // Check for nulls + if (determineNull($line[$i], $null_array)) { + $nulls[$i] = 'on'; + } + // Add to value array + $vars[$i] = $line[$i]; + // Format is always VALUE + $format[$i] = 'VALUE'; + // Type is always text + $types[$i] = 'text'; + $i++; + } + + $status = $data->insertRow($_REQUEST['table'], $t_fields, $vars, $nulls, $format, $types); + if ($status != 0) { + $data->rollbackTransaction(); + $misc->printMsg(sprintf($lang['strimporterrorline'], $row)); + exit; + } + $row++; + } + break; + case 'xml': + $parser = xml_parser_create(); + xml_set_element_handler($parser, '_startElement', '_endElement'); + xml_set_character_data_handler($parser, '_charHandler'); + + while (!feof($fd)) { + $line = fgets($fd, 4096); + xml_parse($parser, $line); + } + + xml_parser_free($parser); + break; + default: + // Unknown type + $data->rollbackTransaction(); + $misc->printMsg($lang['strinvalidparam']); + exit; + } + + $status = $data->endTransaction(); + if ($status != 0) { + $misc->printMsg($lang['strimporterror']); + exit; + } + fclose($fd); + + $misc->printMsg($lang['strfileimported']); + } + else { + // File could not be opened + $misc->printMsg($lang['strimporterror']); + } + } + else { + // Upload went wrong + $misc->printMsg($lang['strimporterror-uploadedfile']); + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/dbexport.php b/php/pgadmin/dbexport.php new file mode 100644 index 0000000..de241fb --- /dev/null +++ b/php/pgadmin/dbexport.php @@ -0,0 +1,139 @@ +isDumpEnabled($dumpall)) { + + $server_info = $misc->getServerInfo(); + + // Get the path of the pg_dump/pg_dumpall executable + $exe = $misc->escapeShellCmd($server_info[$dumpall ? 'pg_dumpall_path' : 'pg_dump_path']); + + // Obtain the pg_dump version number and check if the path is good + $version = array(); + preg_match("/(\d+(?:\.\d+)?)(?:\.\d+)?.*$/", exec($exe . " --version"), $version); + + if (empty($version)) { + if ($dumpall) + printf($lang['strbadpgdumpallpath'], $server_info['pg_dumpall_path']); + else + printf($lang['strbadpgdumppath'], $server_info['pg_dump_path']); + exit; + } + + // Make it do a download, if necessary + switch($_REQUEST['output']){ + case 'show': + header('Content-Type: text/plain'); + break; + case 'download': + // Set headers. MSIE is totally broken for SSL downloading, so + // we need to have it download in-place as plain text + if (strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE') && isset($_SERVER['HTTPS'])) { + header('Content-Type: text/plain'); + } + else { + header('Content-Type: application/download'); + header('Content-Disposition: attachment; filename=dump.sql'); + } + break; + case 'gzipped': + // MSIE in SSL mode cannot do this - it should never get to this point + header('Content-Type: application/download'); + header('Content-Disposition: attachment; filename=dump.sql.gz'); + break; + } + + // Set environmental variables that pg_dump uses + putenv('PGPASSWORD=' . $server_info['password']); + putenv('PGUSER=' . $server_info['username']); + $hostname = $server_info['host']; + if ($hostname !== null && $hostname != '') { + putenv('PGHOST=' . $hostname); + } + $port = $server_info['port']; + if ($port !== null && $port != '') { + putenv('PGPORT=' . $port); + } + + // Build command for executing pg_dump. '-i' means ignore version differences. + $cmd = $exe . " -i"; + + // we are PG 7.4+, so we always have a schema + if (isset($_REQUEST['schema'])) { + $f_schema = $_REQUEST['schema']; + $data->fieldClean($f_schema); + } + + // Check for a specified table/view + switch ($_REQUEST['subject']) { + case 'schema': + // This currently works for 8.2+ (due to the orthoganl -t -n issue introduced then) + $cmd .= " -n " . $misc->escapeShellArg("\"{$f_schema}\""); + break; + case 'table': + case 'view': + $f_object = $_REQUEST[$_REQUEST['subject']]; + $data->fieldClean($f_object); + + // Starting in 8.2, -n and -t are orthagonal, so we now schema qualify + // the table name in the -t argument and quote both identifiers + if ( ((float) $version[1]) >= 8.2 ) { + $cmd .= " -t " . $misc->escapeShellArg("\"{$f_schema}\".\"{$f_object}\""); + } + else { + // If we are 7.4 or higher, assume they are using 7.4 pg_dump and + // set dump schema as well. Also, mixed case dumping has been fixed + // then.. + $cmd .= " -t " . $misc->escapeShellArg($f_object) + . " -n " . $misc->escapeShellArg($f_schema); + } + } + + // Check for GZIP compression specified + if ($_REQUEST['output'] == 'gzipped' && !$dumpall) { + $cmd .= " -Z 9"; + } + + switch ($_REQUEST['what']) { + case 'dataonly': + $cmd .= ' -a'; + if ($_REQUEST['d_format'] == 'sql') $cmd .= ' --inserts'; + elseif (isset($_REQUEST['d_oids'])) $cmd .= ' -o'; + break; + case 'structureonly': + $cmd .= ' -s'; + if (isset($_REQUEST['s_clean'])) $cmd .= ' -c'; + break; + case 'structureanddata': + if ($_REQUEST['sd_format'] == 'sql') $cmd .= ' --inserts'; + elseif (isset($_REQUEST['sd_oids'])) $cmd .= ' -o'; + if (isset($_REQUEST['sd_clean'])) $cmd .= ' -c'; + break; + } + + if (!$dumpall) { + putenv('PGDATABASE=' . $_REQUEST['database']); + } + + // Execute command and return the output to the screen + passthru($cmd); + } + +?> diff --git a/php/pgadmin/display.php b/php/pgadmin/display.php new file mode 100644 index 0000000..07e62f0 --- /dev/null +++ b/php/pgadmin/display.php @@ -0,0 +1,663 @@ +printTrail($_REQUEST['subject']); + $misc->printTitle($lang['streditrow']); + $misc->printMsg($msg); + + $attrs = $data->getTableAttributes($_REQUEST['table']); + $rs = $data->browseRow($_REQUEST['table'], $key); + + if (($conf['autocomplete'] != 'disable')) { + $fksprops = $misc->getAutocompleteFKProperties($_REQUEST['table']); + if ($fksprops !== false) + echo $fksprops['code']; + } + else $fksprops = false; + + echo "
\n"; + $elements = 0; + $error = true; + if ($rs->recordCount() == 1 && $attrs->recordCount() > 0) { + echo "\n"; + + // Output table header + echo ""; + echo "\n"; + echo ""; + + $i = 0; + while (!$attrs->EOF) { + + $attrs->fields['attnotnull'] = $data->phpBool($attrs->fields['attnotnull']); + $id = (($i % 2) == 0 ? '1' : '2'); + + // Initialise variables + if (!isset($_REQUEST['format'][$attrs->fields['attname']])) + $_REQUEST['format'][$attrs->fields['attname']] = 'VALUE'; + + echo "\n"; + echo ""; + echo ""; + $elements++; + echo "\n"; + $elements++; + echo "\n"; + $elements++; + } + else + echo " "; + + echo ""; + $elements++; + echo "\n"; + $i++; + $attrs->moveNext(); + } + echo "
{$lang['strcolumn']}{$lang['strtype']}{$lang['strformat']}{$lang['strnull']}{$lang['strvalue']}
", $misc->printVal($attrs->fields['attname']), "\n"; + echo $misc->printVal($data->formatType($attrs->fields['type'], $attrs->fields['atttypmod'])); + echo "fields['attname']), "]\" value=\"", + htmlspecialchars($attrs->fields['type']), "\" />\n"; + echo "\n"; + // Output null box if the column allows nulls (doesn't look at CHECKs or ASSERTIONS) + if (!$attrs->fields['attnotnull']) { + // Set initial null values + if ($_REQUEST['action'] == 'confeditrow' && $rs->fields[$attrs->fields['attname']] === null) { + $_REQUEST['nulls'][$attrs->fields['attname']] = 'on'; + } + echo "fields['attname']}]\"", + isset($_REQUEST['nulls'][$attrs->fields['attname']]) ? ' checked="checked"' : '', " />fields['attnum']}\" style=\"white-space:nowrap;\">"; + + $extras = array(); + + // If the column allows nulls, then we put a JavaScript action on the data field to unset the + // NULL checkbox as soon as anything is entered in the field. We use the $elements variable to + // keep track of which element offset we're up to. We can't refer to the null checkbox by name + // as it contains '[' and ']' characters. + if (!$attrs->fields['attnotnull']) { + $extras['onChange'] = 'elements[' . ($elements - 1) . '].checked = false;'; + } + + if (($fksprops !== false) && isset($fksprops['byfield'][$attrs->fields['attnum']])) { + $extras['id'] = "attr_{$attrs->fields['attnum']}"; + $extras['autocomplete'] = 'off'; + } + + echo $data->printField("values[{$attrs->fields['attname']}]", $rs->fields[$attrs->fields['attname']], $attrs->fields['type'], $extras); + + echo "
\n"; + + $error = false; + } + elseif ($rs->recordCount() != 1) { + echo "

{$lang['strrownotunique']}

\n"; + } + else { + echo "

{$lang['strinvalidparam']}

\n"; + } + + echo "\n"; + echo $misc->form; + if (isset($_REQUEST['table'])) + echo "\n"; + if (isset($_REQUEST['subject'])) + echo "\n"; + if (isset($_REQUEST['query'])) + echo "\n"; + if (isset($_REQUEST['count'])) + echo "\n"; + if (isset($_REQUEST['return_url'])) + echo "\n"; + if (isset($_REQUEST['return_desc'])) + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

"; + if (!$error) echo "\n"; + echo "\n"; + + if($fksprops !== false) { + if ($conf['autocomplete'] != 'default off') + echo "\n"; + else + echo "\n"; + } + + echo "

\n"; + echo "
\n"; + } + else { + if (!isset($_POST['values'])) $_POST['values'] = array(); + if (!isset($_POST['nulls'])) $_POST['nulls'] = array(); + + $status = $data->editRow($_POST['table'], $_POST['values'], $_POST['nulls'], + $_POST['format'], $_POST['types'], unserialize($_POST['key'])); + if ($status == 0) + doBrowse($lang['strrowupdated']); + elseif ($status == -2) + doEditRow(true, $lang['strrownotunique']); + else + doEditRow(true, $lang['strrowupdatedbad']); + } + + } + + /** + * Show confirmation of drop and perform actual drop + */ + function doDelRow($confirm) { + global $data, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail($_REQUEST['subject']); + $misc->printTitle($lang['strdeleterow']); + + echo "

{$lang['strconfdeleterow']}

\n"; + + echo "
\n"; + echo "\n"; + echo $misc->form; + if (isset($_REQUEST['table'])) + echo "\n"; + if (isset($_REQUEST['subject'])) + echo "\n"; + if (isset($_REQUEST['query'])) + echo "\n"; + if (isset($_REQUEST['count'])) + echo "\n"; + if (isset($_REQUEST['return_url'])) + echo "\n"; + if (isset($_REQUEST['return_desc'])) + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $data->deleteRow($_POST['table'], unserialize($_POST['key'])); + if ($status == 0) + doBrowse($lang['strrowdeleted']); + elseif ($status == -2) + doBrowse($lang['strrownotunique']); + else + doBrowse($lang['strrowdeletedbad']); + } + + } + + /* build & return the FK information data structure + * used when deciding if a field should have a FK link or not*/ + function &getFKInfo() { + global $data, $misc, $lang; + + // Get the foreign key(s) information from the current table + $fkey_information = array('byconstr' => array(), 'byfield' => array()); + + if (isset($_REQUEST['table'])) { + $constraints = $data->getConstraintsWithFields($_REQUEST['table']); + if ($constraints->recordCount() > 0) { + + /* build the common parts of the url for the FK */ + $fk_return_url = "{$misc->href}&subject=table&table=". urlencode($_REQUEST['table']); + if (isset($_REQUEST['page'])) $fk_return_url .= "&page=" . urlencode($_REQUEST['page']); + if (isset($_REQUEST['query'])) $fk_return_url .= "&query=" . urlencode($_REQUEST['query']); + if (isset($_REQUEST['search_path'])) $fk_return_url .= "&search_path=" . urlencode($_REQUEST['search_path']); + + /* yes, we double urlencode fk_return_url so parameters here don't + * overwrite real one when included in the final url */ + $fkey_information['common_url'] = $misc->getHREF('schema') .'&subject=table&return_url=display.php?' + . urlencode($fk_return_url) .'&return_desc='. urlencode($lang['strback']); + + /* build the FK constraints data structure */ + while (!$constraints->EOF) { + $constr =& $constraints->fields; + if ($constr['contype'] == 'f') { + + if (!isset($fkey_information['byconstr'][$constr['conid']])) { + $fkey_information['byconstr'][$constr['conid']] = array ( + 'url_data' => 'table='. urlencode($constr['f_table']) .'&schema='. urlencode($constr['f_schema']), + 'fkeys' => array(), + 'consrc' => $constr['consrc'] + ); + } + + $fkey_information['byconstr'][$constr['conid']]['fkeys'][$constr['p_field']] = $constr['f_field']; + + if (!isset($fkey_information['byfield'][$constr['p_field']])) + $fkey_information['byfield'][$constr['p_field']] = array(); + + $fkey_information['byfield'][$constr['p_field']][] = $constr['conid']; + } + $constraints->moveNext(); + } + } + } + + return $fkey_information; + } + + /* Print table header cells + * @param $sortLink must be urlencoded already + * */ + function printTableHeaderCells(&$rs, $sortLink, $withOid) { + global $misc, $data, $conf; + $j = 0; + + foreach ($rs->fields as $k => $v) { + + if (($k === $data->id) && ( !($withOid && $conf['show_oids']) )) { + $j++; + continue; + } + $finfo = $rs->fetchField($j); + + if ($sortLink === false) { + echo "", $misc->printVal($finfo->name), "\n"; + } + else { + echo "", + $misc->printVal($finfo->name), "\n"; + } + $j++; + } + + reset($rs->fields); + } + + /* Print data-row cells */ + function printTableRowCells(&$rs, &$fkey_information, $withOid) { + global $data, $misc, $conf; + $j = 0; + + if (!isset($_REQUEST['strings'])) $_REQUEST['strings'] = 'collapsed'; + + foreach ($rs->fields as $k => $v) { + $finfo = $rs->fetchField($j++); + + if (($k === $data->id) && ( !($withOid && $conf['show_oids']) )) continue; + elseif ($v !== null && $v == '') echo " "; + else { + echo ""; + + if (($v !== null) && isset($fkey_information['byfield'][$k])) { + foreach ($fkey_information['byfield'][$k] as $conid) { + + $query_params = $fkey_information['byconstr'][$conid]['url_data']; + + foreach ($fkey_information['byconstr'][$conid]['fkeys'] as $p_field => $f_field) { + $query_params .= '&'. urlencode("fkey[{$f_field}]") .'='. urlencode($rs->fields[$p_field]); + } + + /* $fkey_information['common_url'] is already urlencoded */ + $query_params .= '&'. $fkey_information['common_url']; + echo ""; + } + echo $misc->printVal($v, $finfo->type, array('null' => true, 'clip' => ($_REQUEST['strings']=='collapsed'), 'class' => 'fk_value')); + } else { + echo $misc->printVal($v, $finfo->type, array('null' => true, 'clip' => ($_REQUEST['strings']=='collapsed'))); + } + echo ""; + } + } + } + + /* Print the FK row, used in ajax requests */ + function doBrowseFK() { + global $data, $misc, $lang; + + $ops = array(); + foreach($_REQUEST['fkey'] as $x => $y) { + $ops[$x] = '='; + } + $query = $data->getSelectSQL($_REQUEST['table'], array(), $_REQUEST['fkey'], $ops); + $_REQUEST['query'] = $query; + + $fkinfo =& getFKInfo(); + + $max_pages = 1; + // Retrieve page from query. $max_pages is returned by reference. + $rs = $data->browseQuery('SELECT', $_REQUEST['table'], $_REQUEST['query'], + null, null, 1, 1, $max_pages); + + echo "\"[delete]\"icon('Delete') ."\" />\n"; + echo "
"; + + if (is_object($rs) && $rs->recordCount() > 0) { + /* we are browsing a referenced table here + * we should show OID if show_oids is true + * so we give true to withOid in functions bellow + * as 3rd paramter */ + + echo ""; + printTableHeaderCells($rs, false, true); + echo ""; + echo "\n"; + printTableRowCells($rs, $fkinfo, true); + echo "\n"; + echo "
\n"; + } + else + echo $lang['strnodata']; + + echo "
"; + + exit; + } + + /** + * Displays requested data + */ + function doBrowse($msg = '') { + global $data, $conf, $misc, $lang; + + $save_history = false; + // If current page is not set, default to first page + if (!isset($_REQUEST['page'])) + $_REQUEST['page'] = 1; + if (!isset($_REQUEST['nohistory'])) + $save_history = true; + + if (isset($_REQUEST['subject'])) { + $subject = $_REQUEST['subject']; + if (isset($_REQUEST[$subject])) $object = $_REQUEST[$subject]; + } + else { + $subject = ''; + } + + $misc->printTrail(isset($subject) ? $subject : 'database'); + + /* This code is used when browsing FK in pure-xHTML (without js) */ + if (isset($_REQUEST['fkey'])) { + $ops = array(); + foreach($_REQUEST['fkey'] as $x => $y) { + $ops[$x] = '='; + } + $query = $data->getSelectSQL($_REQUEST['table'], array(), $_REQUEST['fkey'], $ops); + $_REQUEST['query'] = $query; + } + + if (isset($object)) { + if (isset($_REQUEST['query'])) { + $_SESSION['sqlquery'] = $_REQUEST['query']; + $misc->printTitle($lang['strselect']); + $type = 'SELECT'; + } else { + $misc->printTitle($lang['strbrowse']); + $type = 'TABLE'; + } + } else { + $misc->printTitle($lang['strqueryresults']); + $type = 'QUERY'; + } + + $misc->printMsg($msg); + + // If 'sortkey' is not set, default to '' + if (!isset($_REQUEST['sortkey'])) $_REQUEST['sortkey'] = ''; + + // If 'sortdir' is not set, default to '' + if (!isset($_REQUEST['sortdir'])) $_REQUEST['sortdir'] = ''; + + // If 'strings' is not set, default to collapsed + if (!isset($_REQUEST['strings'])) $_REQUEST['strings'] = 'collapsed'; + + // Fetch unique row identifier, if this is a table browse request. + if (isset($object)) + $key = $data->getRowIdentifier($object); + else + $key = array(); + + // Set the schema search path + if (isset($_REQUEST['search_path'])) { + if ($data->setSearchPath(array_map('trim',explode(',',$_REQUEST['search_path']))) != 0) { + return; + } + } + + // Retrieve page from query. $max_pages is returned by reference. + $rs = $data->browseQuery($type, + isset($object) ? $object : null, + isset($_REQUEST['query']) ? $_REQUEST['query'] : null, + $_REQUEST['sortkey'], $_REQUEST['sortdir'], $_REQUEST['page'], + $conf['max_rows'], $max_pages); + + $fkey_information =& getFKInfo(); + + // Build strings for GETs + $gets = $misc->href; + if (isset($object)) $gets .= "&" . urlencode($subject) . '=' . urlencode($object); + if (isset($subject)) $gets .= "&subject=" . urlencode($subject); + if (isset($_REQUEST['query'])) $gets .= "&query=" . urlencode($_REQUEST['query']); + if (isset($_REQUEST['count'])) $gets .= "&count=" . urlencode($_REQUEST['count']); + if (isset($_REQUEST['return_url'])) $gets .= "&return_url=" . urlencode($_REQUEST['return_url']); + if (isset($_REQUEST['return_desc'])) $gets .= "&return_desc=" . urlencode($_REQUEST['return_desc']); + if (isset($_REQUEST['search_path'])) $gets .= "&search_path=" . urlencode($_REQUEST['search_path']); + if (isset($_REQUEST['table'])) $gets .= "&table=" . urlencode($_REQUEST['table']); + + // This string just contains sort info + $getsort = "sortkey=" . urlencode($_REQUEST['sortkey']) . + "&sortdir=" . urlencode($_REQUEST['sortdir']); + + if ($save_history && is_object($rs) && ($type == 'QUERY')) //{ + $misc->saveScriptHistory($_REQUEST['query']); + + if (is_object($rs) && $rs->recordCount() > 0) { + // Show page navigation + $misc->printPages($_REQUEST['page'], $max_pages, "display.php?page=%s&{$gets}&{$getsort}&nohistory=t&strings=" . urlencode($_REQUEST['strings'])); + + echo "\n"; + + // Check that the key is actually in the result set. This can occur for select + // operations where the key fields aren't part of the select. XXX: We should + // be able to support this, somehow. + foreach ($key as $v) { + // If a key column is not found in the record set, then we + // can't use the key. + if (!in_array($v, array_keys($rs->fields))) { + $key = array(); + break; + } + } + // Display edit and delete actions if we have a key + if (sizeof($key) > 0) + echo "\n"; + + /* we show OIDs only if we are in TABLE or SELECT type browsing */ + printTableHeaderCells($rs, $gets, isset($object)); + + echo "\n"; + + $i = 0; + reset($rs->fields); + while (!$rs->EOF) { + $id = (($i % 2) == 0 ? '1' : '2'); + echo "\n"; + // Display edit and delete links if we have a key + if (sizeof($key) > 0) { + $key_str = ''; + $has_nulls = false; + foreach ($key as $v) { + if ($rs->fields[$v] === null) { + $has_nulls = true; + break; + } + if ($key_str != '') $key_str .= '&'; + $key_str .= urlencode("key[{$v}]") . '=' . urlencode($rs->fields[$v]); + } + if ($has_nulls) { + echo "\n"; + } else { + echo "\n"; + echo "\n"; + } + } + + print printTableRowCells($rs, $fkey_information, isset($object)); + + echo "\n"; + $rs->moveNext(); + $i++; + } + echo "
{$lang['stractions']}
 {$lang['stredit']}{$lang['strdelete']}
\n"; + + echo "

", $rs->recordCount(), " {$lang['strrows']}

\n"; + // Show page navigation + $misc->printPages($_REQUEST['page'], $max_pages, "display.php?page=%s&{$gets}&{$getsort}&strings=" . urlencode($_REQUEST['strings'])); + } + else echo "

{$lang['strnodata']}

\n"; + + // Navigation links + echo "\n"; + } + + + /* shortcuts: this function exit the script for ajax purpose */ + if ($action == 'dobrowsefk') { + doBrowseFK(); + } + + $scripts = "\n"; + $scripts .= ""; + + $scripts .= "\n"; + + // If a table is specified, then set the title differently + if (isset($_REQUEST['subject']) && isset($_REQUEST[$_REQUEST['subject']])) + $misc->printHeader($lang['strtables'], $scripts); + else + $misc->printHeader($lang['strqueryresults']); + + $misc->printBody(); + + switch ($action) { + case 'editrow': + if (isset($_POST['save'])) doEditRow(false); + else doBrowse(); + break; + case 'confeditrow': + doEditRow(true); + break; + case 'delrow': + if (isset($_POST['yes'])) doDelRow(false); + else doBrowse(); + break; + case 'confdelrow': + doDelRow(true); + break; + default: + doBrowse(); + break; + } + + $misc->printFooter(); +?> diff --git a/php/pgadmin/domains.php b/php/pgadmin/domains.php new file mode 100644 index 0000000..79a26c9 --- /dev/null +++ b/php/pgadmin/domains.php @@ -0,0 +1,503 @@ +alterDomain($_POST['domain'], $_POST['domdefault'], + isset($_POST['domnotnull']), $_POST['domowner']); + if ($status == 0) + doProperties($lang['strdomainaltered']); + else + doAlter($lang['strdomainalteredbad']); + } + + /** + * Allow altering a domain + */ + function doAlter($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('domain'); + $misc->printTitle($lang['stralter'],'pg.domain.alter'); + $misc->printMsg($msg); + + // Fetch domain info + $domaindata = $data->getDomain($_REQUEST['domain']); + // Fetch all users + $users = $data->getUsers(); + + if ($domaindata->recordCount() > 0) { + if (!isset($_POST['domname'])) { + $_POST['domtype'] = $domaindata->fields['domtype']; + $_POST['domdefault'] = $domaindata->fields['domdef']; + $domaindata->fields['domnotnull'] = $data->phpBool($domaindata->fields['domnotnull']); + if ($domaindata->fields['domnotnull']) $_POST['domnotnull'] = 'on'; + $_POST['domowner'] = $domaindata->fields['domowner']; + } + + // Display domain info + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
{$lang['strname']}", $misc->printVal($domaindata->fields['domname']), "
{$lang['strtype']}", $misc->printVal($domaindata->fields['domtype']), "
{$lang['strdefault']}
{$lang['strowner']}
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + } + + /** + * Confirm and then actually add a CHECK constraint + */ + function addCheck($confirm, $msg = '') { + global $data, $misc; + global $lang; + + if (!isset($_POST['name'])) $_POST['name'] = ''; + if (!isset($_POST['definition'])) $_POST['definition'] = ''; + + if ($confirm) { + $misc->printTrail('domain'); + $misc->printTitle($lang['straddcheck'],'pg.constraint.check'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + + echo "\n"; + echo "
{$lang['strname']}{$lang['strdefinition']}
_maxNameLen}\" value=\"", + htmlspecialchars($_POST['name']), "\" />()
\n"; + + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + + } + else { + if (trim($_POST['definition']) == '') + addCheck(true, $lang['strcheckneedsdefinition']); + else { + $status = $data->addDomainCheckConstraint($_POST['domain'], + $_POST['definition'], $_POST['name']); + if ($status == 0) + doProperties($lang['strcheckadded']); + else + addCheck(true, $lang['strcheckaddedbad']); + } + } + } + + /** + * Show confirmation of drop constraint and perform actual drop + */ + function doDropConstraint($confirm, $msg = '') { + global $data, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('domain'); + $misc->printTitle($lang['strdrop'],'pg.constraint.drop'); + $misc->printMsg($msg); + + echo "

", sprintf($lang['strconfdropconstraint'], $misc->printVal($_REQUEST['constraint']), + $misc->printVal($_REQUEST['domain'])), "

\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $data->dropDomainConstraint($_POST['domain'], $_POST['constraint'], isset($_POST['cascade'])); + if ($status == 0) + doProperties($lang['strconstraintdropped']); + else + doDropConstraint(true, $lang['strconstraintdroppedbad']); + } + + } + + /** + * Show properties for a domain. Allow manipulating constraints as well. + */ + function doProperties($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('domain'); + $misc->printTitle($lang['strproperties'],'pg.domain'); + $misc->printMsg($msg); + + $domaindata = $data->getDomain($_REQUEST['domain']); + + if ($domaindata->recordCount() > 0) { + // Show comment if any + if ($domaindata->fields['domcomment'] !== null) + echo "

", $misc->printVal($domaindata->fields['domcomment']), "

\n"; + + // Display domain info + $domaindata->fields['domnotnull'] = $data->phpBool($domaindata->fields['domnotnull']); + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
{$lang['strname']}", $misc->printVal($domaindata->fields['domname']), "
{$lang['strtype']}", $misc->printVal($domaindata->fields['domtype']), "
{$lang['strnotnull']}", ($domaindata->fields['domnotnull'] ? 'NOT NULL' : ''), "
{$lang['strdefault']}", $misc->printVal($domaindata->fields['domdef']), "
{$lang['strowner']}", $misc->printVal($domaindata->fields['domowner']), "
\n"; + + // Display domain constraints + if ($data->hasDomainConstraints()) { + $domaincons = $data->getDomainConstraints($_REQUEST['domain']); + if ($domaincons->recordCount() > 0) { + echo "

{$lang['strconstraints']}

\n"; + echo "\n"; + echo "\n"; + $i = 0; + + while (!$domaincons->EOF) { + $id = (($i % 2 ) == 0 ? '1' : '2'); + echo ""; + echo ""; + echo "\n"; + + $domaincons->moveNext(); + $i++; + } + + echo "
{$lang['strname']}{$lang['strdefinition']}{$lang['stractions']}
", $misc->printVal($domaincons->fields['conname']), ""; + echo $misc->printVal($domaincons->fields['consrc']); + echo ""; + echo "href}&constraint=", urlencode($domaincons->fields['conname']), + "&domain=", urlencode($_REQUEST['domain']), "&type=", urlencode($domaincons->fields['contype']), "\">{$lang['strdrop']}
\n"; + } + } + } + else echo "

{$lang['strnodata']}

\n"; + + echo "\n"; + } + + /** + * Show confirmation of drop and perform actual drop + */ + function doDrop($confirm) { + global $data, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('domain'); + $misc->printTitle($lang['strdrop'],'pg.domain.drop'); + + echo "

", sprintf($lang['strconfdropdomain'], $misc->printVal($_REQUEST['domain'])), "

\n"; + echo "
\n"; + echo "

\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + $status = $data->dropDomain($_POST['domain'], isset($_POST['cascade'])); + if ($status == 0) + doDefault($lang['strdomaindropped']); + else + doDefault($lang['strdomaindroppedbad']); + } + + } + + /** + * Displays a screen where they can enter a new domain + */ + function doCreate($msg = '') { + global $data, $misc; + global $lang; + + if (!isset($_POST['domname'])) $_POST['domname'] = ''; + if (!isset($_POST['domtype'])) $_POST['domtype'] = ''; + if (!isset($_POST['domlength'])) $_POST['domlength'] = ''; + if (!isset($_POST['domarray'])) $_POST['domarray'] = ''; + if (!isset($_POST['domdefault'])) $_POST['domdefault'] = ''; + if (!isset($_POST['domcheck'])) $_POST['domcheck'] = ''; + + $types = $data->getTypes(true); + + $misc->printTrail('schema'); + $misc->printTitle($lang['strcreatedomain'],'pg.domain.create'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + if ($data->hasDomainConstraints()) { + echo "\n"; + echo "\n"; + } + echo "
{$lang['strname']}_maxNameLen}\" value=\"", + htmlspecialchars($_POST['domname']), "\" />
{$lang['strtype']}\n"; + // Output return type list + echo "\n"; + + // Type length + echo ""; + + // Output array type selector + echo "
{$lang['strdefault']}
{$lang['strconstraints']}CHECK ()
\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + + /** + * Actually creates the new domain in the database + */ + function doSaveCreate() { + global $data, $lang; + + if (!isset($_POST['domcheck'])) $_POST['domcheck'] = ''; + + // Check that they've given a name and a definition + if ($_POST['domname'] == '') doCreate($lang['strdomainneedsname']); + else { + $status = $data->createDomain($_POST['domname'], $_POST['domtype'], $_POST['domlength'], $_POST['domarray'] != '', + isset($_POST['domnotnull']), $_POST['domdefault'], $_POST['domcheck']); + if ($status == 0) + doDefault($lang['strdomaincreated']); + else + doCreate($lang['strdomaincreatedbad']); + } + } + + /** + * Show default list of domains in the database + */ + function doDefault($msg = '') { + global $data, $conf, $misc; + global $lang; + + $misc->printTrail('schema'); + $misc->printTabs('schema','domains'); + $misc->printMsg($msg); + + $domains = $data->getDomains(); + + $columns = array( + 'domain' => array( + 'title' => $lang['strdomain'], + 'field' => field('domname'), + 'url' => "domains.php?action=properties&{$misc->href}&", + 'vars' => array('domain' => 'domname'), + ), + 'type' => array( + 'title' => $lang['strtype'], + 'field' => field('domtype'), + ), + 'notnull' => array( + 'title' => $lang['strnotnull'], + 'field' => field('domnotnull'), + 'type' => 'bool', + 'params'=> array('true' => 'NOT NULL', 'false' => ''), + ), + 'default' => array( + 'title' => $lang['strdefault'], + 'field' => field('domdef'), + ), + 'owner' => array( + 'title' => $lang['strowner'], + 'field' => field('domowner'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('domcomment'), + ), + ); + + $actions = array( + 'alter' => array( + 'title' => $lang['stralter'], + 'url' => "domains.php?action=alter&{$misc->href}&", + 'vars' => array('domain' => 'domname'), + ), + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "domains.php?action=confirm_drop&{$misc->href}&", + 'vars' => array('domain' => 'domname'), + ), + ); + + if (!$data->hasAlterDomains()) unset($actions['alter']); + + $misc->printTable($domains, $columns, $actions, $lang['strnodomains']); + + echo "

href}\">{$lang['strcreatedomain']}

\n"; + + } + + /** + * Generate XML for the browser tree. + */ + function doTree() { + global $misc, $data; + + $domains = $data->getDomains(); + + $reqvars = $misc->getRequestVars('domain'); + + $attrs = array( + 'text' => field('domname'), + 'icon' => 'Domain', + 'toolTip'=> field('domcomment'), + 'action' => url('domains.php', + $reqvars, + array( + 'action' => 'properties', + 'domain' => field('domname') + ) + ) + ); + + $misc->printTreeXML($domains, $attrs); + exit; + } + + if ($action == 'tree') doTree(); + + $misc->printHeader($lang['strdomains']); + $misc->printBody(); + + switch ($action) { + case 'add_check': + addCheck(true); + break; + case 'save_add_check': + if (isset($_POST['cancel'])) doProperties(); + else addCheck(false); + break; + case 'drop_con': + if (isset($_POST['drop'])) doDropConstraint(false); + else doProperties(); + break; + case 'confirm_drop_con': + doDropConstraint(true); + break; + case 'save_create': + if (isset($_POST['cancel'])) doDefault(); + else doSaveCreate(); + break; + case 'create': + doCreate(); + break; + case 'drop': + if (isset($_POST['drop'])) doDrop(false); + else doDefault(); + break; + case 'confirm_drop': + doDrop(true); + break; + case 'save_alter': + if (isset($_POST['alter'])) doSaveAlter(); + else doProperties(); + break; + case 'alter': + doAlter(); + break; + case 'properties': + doProperties(); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/fulltext.php b/php/pgadmin/fulltext.php new file mode 100644 index 0000000..830c05b --- /dev/null +++ b/php/pgadmin/fulltext.php @@ -0,0 +1,1035 @@ +printTrail('schema'); + $misc->printTabs('schema','fulltext'); + $misc->printTabs('fulltext','ftsconfigs'); + $misc->printMsg($msg); + + $cfgs = $data->getFtsConfigurations(false); + + $columns = array( + 'configuration' => array( + 'title' => $lang['strftsconfig'], + 'field' => field('name'), + 'url' => "fulltext.php?action=viewconfig&{$misc->href}&", + 'vars' => array('ftscfg' => 'name'), + ), + 'schema' => array( + 'title' => $lang['strschema'], + 'field' => field('schema'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('comment'), + ), + ); + + $actions = array( + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "fulltext.php?action=dropconfig&{$misc->href}&", + 'vars' => array('ftscfg' => 'name'), + ), + 'alter' => array( + 'title' => $lang['stralter'], + 'url' => "fulltext.php?action=alterconfig&{$misc->href}&", + 'vars' => array('ftscfg' => 'name'), + ), + ); + + $misc->printTable($cfgs, $columns, $actions, $lang['strftsnoconfigs']); + + + echo "\n"; + } + + function doDropConfig($confirm) { + global $data, $data, $misc; + global $lang, $_reload_browser; + + if ($confirm) { + $misc->printTrail('ftscfg'); + $misc->printTitle($lang['strdrop'], 'pg.ftscfg.drop'); + + echo "

", sprintf($lang['strconfdropftsconfig'], $misc->printVal($_REQUEST['ftscfg'])), "

\n"; + + echo "
\n"; + echo "

\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + $status = $data->dropFtsConfiguration($_POST['ftscfg'], isset($_POST['cascade'])); + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['strftsconfigdropped']); + } + else + doDefault($lang['strftsconfigdroppedbad']); + } + + } + + function doDropDict($confirm) { + global $data, $data, $misc; + global $lang, $_reload_browser; + + if ($confirm) { + $misc->printTrail('ftscfg'); // TODO: change to smth related to dictionary + $misc->printTitle($lang['strdrop'], 'pg.ftsdict.drop'); + + echo "

", sprintf($lang['strconfdropftsdict'], $misc->printVal($_REQUEST['ftsdict'])), "

\n"; + + echo "
\n"; + echo "

\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + //echo "\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + $status = $data->dropFtsDictionary($_POST['ftsdict'], isset($_POST['cascade'])); + if ($status == 0) { + $_reload_browser = true; + doViewDicts($lang['strftsdictdropped']); + } + else + doViewDicts($lang['strftsdictdroppedbad']); + } + + } + + /** + * Displays a screen where one can enter a new FTS configuration + */ + function doCreateConfig($msg = '') { + global $data, $misc; + global $lang; + + include_once('./classes/Gui.php'); + + $server_info = $misc->getServerInfo(); + + if (!isset($_POST['formName'])) $_POST['formName'] = ''; + if (!isset($_POST['formParser'])) $_POST['formParser'] = ''; + if (!isset($_POST['formTemplate'])) $_POST['formTemplate'] = ''; + if (!isset($_POST['formWithMap'])) $_POST['formWithMap'] = ''; + if (!isset($_POST['formComment'])) $_POST['formComment'] = ''; + + // Fetch all FTS configurations from the database + $ftscfgs = $data->getFtsConfigurations(); + // Fetch all FTS parsers from the database + $ftsparsers = $data->getFtsParsers(); + + $misc->printTrail('schema'); + $misc->printTitle($lang['strftscreateconfig'], 'pg.ftscfg.create'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + /* conf name */ + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + // Template + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + // Parser + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + // Comment + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + echo "
{$lang['strname']}_maxNameLen}\" value=\"", + htmlspecialchars($_POST['formName']), "\" />
{$lang['strftstemplate']}"; + + $tpls = array(); + $tplsel = ''; + while (!$ftscfgs->EOF) { + $data->fieldClean($ftscfgs->fields['schema']); + $data->fieldClean($ftscfgs->fields['name']); + $tplname = $ftscfgs->fields['schema'] .'.'. $ftscfgs->fields['name']; + $tpls[$tplname] = serialize(array( + 'name' => $ftscfgs->fields['name'], + 'schema' => $ftscfgs->fields['schema'] + )); + if ($_POST['formTemplate'] == $tpls[$tplname]) { + $tplsel = htmlspecialchars($tpls[$tplname]); + } + $ftscfgs->moveNext(); + } + echo GUI::printCombo($tpls, 'formTemplate', true, $tplsel, false); + echo "\n\t\t
{$lang['strftsparser']}\n"; + $ftsparsers_ = array(); + $ftsparsel = ''; + while (!$ftsparsers->EOF) { + $data->fieldClean($ftsparsers->fields['schema']); + $data->fieldClean($ftsparsers->fields['name']); + $parsername = $ftsparsers->fields['schema'] .'.'. $ftsparsers->fields['name']; + + $ftsparsers_[$parsername] = serialize(array( + 'parser' => $ftsparsers->fields['name'], + 'schema' => $ftsparsers->fields['schema'] + )); + if ($_POST['formParser'] == $ftsparsers_[$parsername]) { + $ftsparsel = htmlspecialchars($ftsparsers_[$parsername]); + } + $ftsparsers->moveNext(); + } + echo GUI::printCombo($ftsparsers_, 'formParser', true, $ftsparsel, false); + echo "\n\t\t
{$lang['strcomment']}
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + + /** + * Actually creates the new FTS configuration in the database + */ + function doSaveCreateConfig() { + global $data, $lang, $_reload_browser; + + $err = ''; + // Check that they've given a name + if ($_POST['formName'] == '') $err .= "{$lang['strftsconfigneedsname']}
"; + if (($_POST['formParser'] != '') && ($_POST['formTemplate'] != '')) $err .= "{$lang['strftscantparsercopy']}
"; + + if ($err != '') return doCreateConfig($err); + + if ($_POST['formParser'] != '') $formParser = unserialize($_POST['formParser']); + else $formParser = ''; + if ($_POST['formTemplate'] != '') $formTemplate = unserialize($_POST['formTemplate']); + else $formTemplate = ''; + + $status = $data->createFtsConfiguration($_POST['formName'], $formParser, $formTemplate, $_POST['formComment']); + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['strftsconfigcreated']); + } + else + doCreateConfig($lang['strftsconfigcreatedbad']); + } + + /** + * Display a form to permit editing FTS configuration properies. + */ + function doAlterConfig($msg = '') { + global $data, $misc, $lang; + + $misc->printTrail('ftscfg'); + $misc->printTitle($lang['stralter'], 'pg.ftscfg.alter'); + $misc->printMsg($msg); + + $ftscfg = $data->getFtsConfigurationByName($_REQUEST['ftscfg']); + if ($ftscfg->recordCount() > 0) { + if (!isset($_POST['formComment'])) $_POST['formComment'] = $ftscfg->fields['comment']; + if (!isset($_POST['ftscfg'])) $_POST['ftscfg'] = $_REQUEST['ftscfg']; + if (!isset($_POST['formName'])) $_POST['formName'] = $_REQUEST['ftscfg']; + if (!isset($_POST['formParser'])) $_POST['formParser'] = ''; + + // Fetch all FTS parsers from the database + $ftsparsers = $data->getFtsParsers(); + + echo "
\n"; + echo "\n"; + + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + + // Comment + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + echo "
{$lang['strname']}"; + echo "\t\t\t_maxNameLen}\" value=\"", + htmlspecialchars($_POST['formName']), "\" />\n"; + echo "\t\t
{$lang['strcomment']}
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } else { + echo "

{$lang['strnodata']}

\n"; + } + } + + /** + * Save the form submission containing changes to a FTS configuration + */ + function doSaveAlterConfig() { + global $data, $misc, $lang; + + $status = $data->updateFtsConfiguration($_POST['ftscfg'], $_POST['formComment'], $_POST['formName']); + if ($status == 0) + doDefault($lang['strftsconfigaltered']); + else + doAlterConfig($lang['strftsconfigalteredbad']); + } + + /** + * View list of FTS parsers + */ + function doViewParsers($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('schema'); + $misc->printTabs('schema','fulltext'); + $misc->printTabs('fulltext','ftsparsers'); + $misc->printMsg($msg); + + $parsers = $data->getFtsParsers(false); + + $columns = array( + 'schema' => array( + 'title' => $lang['strschema'], + 'field' => field('schema'), + ), + 'name' => array( + 'title' => $lang['strname'], + 'field' => field('name'), + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('comment'), + ), + ); + + $actions = array(); + + $misc->printTable($parsers, $columns, $actions, $lang['strftsnoparsers']); + + //TODO: create parser + //echo "\n"; + } + + + /** + * View list of FTS dictionaries + */ + function doViewDicts($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('schema'); + $misc->printTabs('schema','fulltext'); + $misc->printTabs('fulltext','ftsdicts'); + $misc->printMsg($msg); + + $dicts = $data->getFtsDictionaries(false); + + $columns = array( + 'schema' => array( + 'title' => $lang['strschema'], + 'field' => field('schema'), + ), + 'name' => array( + 'title' => $lang['strname'], + 'field' => field('name'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('comment'), + ), + ); + + $actions = array( + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "fulltext.php?action=dropdict&{$misc->href}&", + 'vars' => array('ftsdict' => 'name'), + ), + 'alter' => array( + 'title' => $lang['stralter'], + 'url' => "fulltext.php?action=alterdict&{$misc->href}&", + 'vars' => array('ftsdict' => 'name'), + ), + ); + + $misc->printTable($dicts, $columns, $actions, $lang['strftsnodicts']); + + echo "\n"; + } + + + /** + * View details of FTS configuration given + */ + function doViewConfig($ftscfg, $msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('ftscfg'); + $misc->printTabs('schema','fulltext'); + $misc->printTabs('fulltext','ftsconfigs'); + $misc->printMsg($msg); + + echo "

{$lang['strftsconfigmap']}

\n"; + + $map = $data->getFtsConfigurationMap($ftscfg); + + $columns = array( + 'name' => array( + 'title' => $lang['strftsmapping'], + 'field' => field('name'), + ), + 'dictionaries' => array( + 'title' => $lang['strftsdicts'], + 'field' => field('dictionaries'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('description'), + ), + ); + + $actions = array( + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "fulltext.php?action=dropmapping&{$misc->href}&", + 'vars' => array('mapping' => 'name', 'ftscfg' => 'cfgname'), + 'multiaction' => 'dropmapping', + ), + 'alter' => array( + 'title' => $lang['stralter'], + 'url' => "fulltext.php?action=altermapping&{$misc->href}&", + 'vars' => array('mapping' => 'name', 'ftscfg' => 'cfgname'), + ), + 'multiactions' => array( + 'keycols' => array('mapping' => 'name'), + 'url' => 'fulltext.php', + 'default' => null, + 'vars' => array('ftscfg' => $ftscfg), + ), + + ); + + $misc->printTable($map, $columns, $actions, $lang['strftsemptymap']); + + echo "\n"; + + } + + /** + * Displays a screen where one can enter a details of a new FTS dictionary + */ + function doCreateDict($msg = '') { + global $data, $misc; + global $lang; + + include_once('./classes/Gui.php'); + + $server_info = $misc->getServerInfo(); + + if (!isset($_POST['formName'])) $_POST['formName'] = ''; + if(!isset($_POST['formIsTemplate'])) $_POST['formIsTemplate'] = false; + if (!isset($_POST['formTemplate'])) $_POST['formTemplate'] = ''; + if (!isset($_POST['formLexize'])) $_POST['formLexize'] = ''; + if (!isset($_POST['formInit'])) $_POST['formInit'] = ''; + if (!isset($_POST['formOption'])) $_POST['formOption'] = ''; + if (!isset($_POST['formComment'])) $_POST['formComment'] = ''; + + // Fetch all FTS dictionaries from the database + $ftstpls = $data->getFtsDictionaryTemplates(); + + $misc->printTrail('schema'); + // TODO: create doc links + $misc->printTitle($lang['strftscreatedict'], 'pg.ftsdict.create'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + // Template + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + // TODO: what about maxlengths? + // Lexize + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + // Init + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + // Option + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + // Comment + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + echo "
{$lang['strname']}_maxNameLen}\" value=\"", + htmlspecialchars($_POST['formName']), "\" /> ", + "\n", + "
{$lang['strftstemplate']}"; + $tpls = array(); + $tplsel = ''; + while (!$ftstpls->EOF) { + $data->fieldClean($ftstpls->fields['schema']); + $data->fieldClean($ftstpls->fields['name']); + $tplname = $ftstpls->fields['schema'] .'.'. $ftstpls->fields['name']; + $tpls[$tplname] = serialize(array( + 'name' => $ftstpls->fields['name'], + 'schema' => $ftstpls->fields['schema'] + )); + if ($_POST['formTemplate'] == $tpls[$tplname]) { + $tplsel = htmlspecialchars($tpls[$tplname]); + } + $ftstpls->moveNext(); + } + echo GUI::printCombo($tpls, 'formTemplate', true, $tplsel, false); + echo "\n\t\t
{$lang['strftslexize']}
{$lang['strftsinit']}
{$lang['strftsoptionsvalues']}
{$lang['strcomment']}
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n", + "\n"; + } + + /** + * Actually creates the new FTS dictionary in the database + */ + function doSaveCreateDict() { + global $data, $lang, $_reload_browser; + + // Check that they've given a name + if ($_POST['formName'] == '') doCreateDict($lang['strftsdictneedsname']); + else { + + if(!isset($_POST['formIsTemplate'])) $_POST['formIsTemplate'] = false; + if(isset($_POST['formTemplate'])) + $formTemplate = unserialize($_POST['formTemplate']); + else + $formTemplate = ''; + if(!isset($_POST['formLexize'])) $_POST['formLexize'] = ''; + if(!isset($_POST['formInit'])) $_POST['formInit'] = ''; + if(!isset($_POST['formOption'])) $_POST['formOption'] = ''; + + $status = $data->createFtsDictionary($_POST['formName'], $_POST['formIsTemplate'], + $formTemplate, $_POST['formLexize'], + $_POST['formInit'], $_POST['formOption'], $_POST['formComment'] + ); + + if ($status == 0) { + $_reload_browser = true; + doViewDicts($lang['strftsdictcreated']); + } + else + doCreateDict($lang['strftsdictcreatedbad']); + } + } + + /** + * Display a form to permit editing FTS dictionary properies. + */ + function doAlterDict($msg = '') { + global $data, $misc, $lang; + + $misc->printTrail('ftscfg'); // TODO: change to smth related to dictionary + $misc->printTitle($lang['stralter'], 'pg.ftsdict.alter'); + $misc->printMsg($msg); + + $ftsdict = $data->getFtsDictionaryByName($_REQUEST['ftsdict']); + if ($ftsdict->recordCount() > 0) { + if (!isset($_POST['formComment'])) $_POST['formComment'] = $ftsdict->fields['comment']; + if (!isset($_POST['ftsdict'])) $_POST['ftsdict'] = $_REQUEST['ftsdict']; + if (!isset($_POST['formName'])) $_POST['formName'] = $_REQUEST['ftsdict']; + + echo "
\n"; + echo "\n"; + + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + + // Comment + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + echo "
{$lang['strname']}"; + echo "\t\t\t_maxNameLen}\" value=\"", + htmlspecialchars($_POST['formName']), "\" />\n"; + echo "\t\t
{$lang['strcomment']}
\n"; + echo "

\n"; + echo "\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } else { + echo "

{$lang['strnodata']}

\n"; + } + } + + /** + * Save the form submission containing changes to a FTS dictionary + */ + function doSaveAlterDict() { + global $data, $misc, $lang; + + $status = $data->updateFtsDictionary($_POST['ftsdict'], $_POST['formComment'], $_POST['formName']); + if ($status == 0) + doViewDicts($lang['strftsdictaltered']); + else + doAlterDict($lang['strftsdictalteredbad']); + } + + /** + * Show confirmation of drop and perform actual drop of FTS mapping + */ + function doDropMapping($confirm) { + global $data, $misc; + global $lang, $_reload_drop_database; + + if (empty($_REQUEST['mapping']) && empty($_REQUEST['ma'])) { + doDefault($lang['strftsspecifymappingtodrop']); + return; + } + + if (empty($_REQUEST['ftscfg'])) { + doDefault($lang['strftsspecifyconfigtoalter']); + return; + } + + if ($confirm) { + $misc->printTrail('ftscfg'); // TODO: proper breadcrumbs + $misc->printTitle($lang['strdrop'], 'pg.ftscfg.alter'); + + echo "
\n"; + + // Case of multiaction drop + if (isset($_REQUEST['ma'])) { + + foreach($_REQUEST['ma'] as $v) { + $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES)); + echo "

", sprintf($lang['strconfdropftsmapping'], $misc->printVal($a['mapping']), $misc->printVal($_REQUEST['ftscfg'])), "

\n"; + printf('', htmlspecialchars($a['mapping'])); + } + + } else { + echo "

", sprintf($lang['strconfdropftsmapping'], $misc->printVal($_REQUEST['mapping']), $misc->printVal($_REQUEST['ftscfg'])), "

\n"; + echo "\n"; + } + + echo "\n"; + echo "\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "
\n"; + } else { + // Case of multiaction drop + if (is_array($_REQUEST['mapping'])) { + $status = $data->changeFtsMapping($_REQUEST['ftscfg'], $_REQUEST['mapping'], 'drop'); + if ($status != 0) { + doViewConfig($_REQUEST['ftscfg'], $lang['strftsmappingdroppedbad']); + return; + } + doViewConfig($_REQUEST['ftscfg'], $lang['strftsmappingdropped']); + } else { + $status = $data->changeFtsMapping($_REQUEST['ftscfg'], array($_REQUEST['mapping']), 'drop'); + if ($status == 0) { + doViewConfig($_REQUEST['ftscfg'], $lang['strftsmappingdropped']); + } else { + doViewConfig($_REQUEST['ftscfg'], $lang['strftsmappingdroppedbad']); + } + } + } + } + + function doAlterMapping($msg = '') { + global $data, $misc, $lang; + + $misc->printTrail('ftscfg'); + $misc->printTitle($lang['stralter'], 'pg.ftscfg.alter'); + $misc->printMsg($msg); + + $ftsdicts = $data->getFtsDictionaries(); + if ($ftsdicts->recordCount() > 0) { + if (!isset($_POST['formMapping'])) $_POST['formMapping'] = @$_REQUEST['mapping']; + if (!isset($_POST['formDictionary'])) $_POST['formDictionary'] = ''; + if (!isset($_POST['ftscfg'])) $_POST['ftscfg'] = $_REQUEST['ftscfg']; + + echo "
\n"; + + echo "\n"; + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + + + // Dictionary + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + + echo "
{$lang['strftsmapping']}"; + + // Case of multiaction drop + if (isset($_REQUEST['ma'])) { + $ma_mappings = array(); + $ma_mappings_names = array(); + foreach($_REQUEST['ma'] as $v) { + $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES)); + printf('', htmlspecialchars($a['mapping'])); + $ma_mappings[] = $data->getFtsMappingByName($_POST['ftscfg'], $a['mapping']); + $ma_mappings_names[] = $a['mapping']; + } + echo implode(", ", $ma_mappings_names); + } else { + $mapping = $data->getFtsMappingByName($_POST['ftscfg'], $_POST['formMapping']); + echo $mapping->fields['name']; + echo "\n"; + } + + echo "\t\t
{$lang['strftsdict']}"; + echo "\t\t\t
\n"; + echo "

\n"; + echo "\n"; + echo "

\n"; + + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } else { + echo "

{$lang['strftsnodictionaries']}

\n"; + } + } + + /** + * Save the form submission containing changes to a FTS mapping + */ + function doSaveAlterMapping() { + global $data, $misc, $lang; + + $mappingArray = (is_array($_POST['formMapping']) ? $_POST['formMapping'] : array($_POST['formMapping'])); + $status = $data->changeFtsMapping($_POST['ftscfg'], $mappingArray, 'alter', $_POST['formDictionary']); + if ($status == 0) + doViewConfig($_POST['ftscfg'], $lang['strftsmappingaltered']); + else + doAlterMapping($lang['strftsmappingalteredbad']); + } + + /** + * Show the form to enter parameters of a new FTS mapping + */ + function doAddMapping($msg = '') { + global $data, $misc, $lang; + + $misc->printTrail('ftscfg'); + $misc->printTitle($lang['stralter'], 'pg.ftscfg.alter'); + $misc->printMsg($msg); + + $ftsdicts = $data->getFtsDictionaries(); + if ($ftsdicts->recordCount() > 0) { + if (!isset($_POST['formMapping'])) $_POST['formMapping'] = ''; + if (!isset($_POST['formDictionary'])) $_POST['formDictionary'] = ''; + if (!isset($_POST['ftscfg'])) $_POST['ftscfg'] = $_REQUEST['ftscfg']; + $mappings = $data->getFtsMappings($_POST['ftscfg']); + + echo "
\n"; + echo "\n"; + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + + + // Dictionary + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + + echo "
{$lang['strftsmapping']}"; + echo "\t\t\t
{$lang['strftsdict']}"; + echo "\t\t\t
\n"; + echo "

\n"; + echo "\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } else { + echo "

{$lang['strftsnodictionaries']}

\n"; + } + } + + /** + * Save the form submission containing parameters of a new FTS mapping + */ + function doSaveAddMapping() { + global $data, $misc, $lang; + + $mappingArray = (is_array($_POST['formMapping']) ? $_POST['formMapping'] : array($_POST['formMapping'])); + $status = $data->changeFtsMapping($_POST['ftscfg'], $mappingArray, 'add', $_POST['formDictionary']); + if ($status == 0) + doViewConfig($_POST['ftscfg'], $lang['strftsmappingadded']); + else + doAddMapping($lang['strftsmappingaddedbad']); + } + + /** + * Generate XML for the browser tree. + */ + function doTree() { + global $misc, $data, $lang, $slony; + + $tabs = $misc->getNavTabs('fulltext'); + $items = $misc->adjustTabsForTree($tabs); + + $reqvars = $misc->getRequestVars('ftscfg'); + + $attrs = array( + 'text' => noEscape(field('title')), + 'icon' => field('icon'), + 'action' => url('fulltext.php', + $reqvars, + field('urlvars') + ), + 'branch' => url('fulltext.php', + $reqvars, + array( + 'action' => 'subtree', + 'what' => field('icon') // IZ: yeah, it's ugly, but I do not want to change navigation tabs arrays + ) + ), + ); + + $misc->printTreeXML($items, $attrs); + + exit; + } + + function doSubTree($what) { + global $misc, $data, $lang; + + switch($what) { + case 'FtsCfg': + $items = $data->getFtsConfigurations(false); + $urlvars = array('action' => 'viewconfig', 'ftscfg' => field('name')); + break; + case 'FtsDict': + $items = $data->getFtsDictionaries(false); + $urlvars = array('action' => 'viewdicts'); + break; + case 'FtsParser': + $items = $data->getFtsParsers(false); + $urlvars = array('action' => 'viewparsers'); + break; + default: + exit; + } + + $reqvars = $misc->getRequestVars('ftscfg'); + + $attrs = array( + 'text' => noEscape(field('name')), + 'icon' => $what, + 'toolTip'=> field('comment'), + 'action' => url('fulltext.php', + $reqvars, + $urlvars + ), + 'branch' => ifempty(field('branch'), + '', + url('fulltext.php', + $reqvars, + array( + 'action' => 'subtree', + 'ftscfg' => field('name') + ) + ) + ), + ); + + $misc->printTreeXML($items, $attrs); + exit; + } + + + if ($action == 'tree') doTree(); + if ($action == 'subtree') doSubTree($_REQUEST['what']); + + $misc->printHeader($lang['strschemas']); + $misc->printBody(); + + if (isset($_POST['cancel'])) { + if (isset($_POST['prev_action'])) { + $action = $_POST['prev_action']; + } else { + $action = ''; + } + } + + switch ($action) { + case 'createconfig': + if (isset($_POST['create'])) doSaveCreateConfig(); + else doCreateConfig(); + break; + case 'alterconfig': + if (isset($_POST['alter'])) doSaveAlterConfig(); + else doAlterConfig(); + break; + case 'dropconfig': + if (isset($_POST['drop'])) doDropConfig(false); + else doDropConfig(true); + break; + case 'viewconfig': + doViewConfig($_REQUEST['ftscfg']); + break; + case 'viewparsers': + doViewParsers(); + break; + case 'viewdicts': + doViewDicts(); + break; + case 'createdict': + if (isset($_POST['create'])) doSaveCreateDict(); + else doCreateDict(); + break; + case 'alterdict': + if (isset($_POST['alter'])) doSaveAlterDict(); + else doAlterDict(); + break; + case 'dropdict': + if (isset($_POST['drop'])) doDropDict(false); + else doDropDict(true); + break; + case 'dropmapping': + if (isset($_POST['drop'])) doDropMapping(false); + else doDropMapping(true); + break; + case 'altermapping': + if (isset($_POST['alter'])) doSaveAlterMapping(); + else doAlterMapping(); + break; + case 'addmapping': + if (isset($_POST['add'])) doSaveAddMapping(); + else doAddMapping(); + break; + + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/functions.js b/php/pgadmin/functions.js new file mode 100644 index 0000000..3a93bf8 --- /dev/null +++ b/php/pgadmin/functions.js @@ -0,0 +1,204 @@ +var g_args = 0; +var g_no_args = new Boolean(false); +/* +function for adding arguments +*/ + +function addArg() { + var baseTR = baseArgTR(); + if(document.getElementById("args_table").insertBefore(baseTR,document.getElementById("parent_add_tr"))) { + g_args++; + return baseTR; + } +} + +function buildArgImages(orig_td) { + var table = document.createElement("table"); + var tbody = document.createElement("tbody"); + var tr = document.createElement("tr"); + var td = document.createElement("td"); + var img = document.createElement("img"); + img.src="images/themes/default/RaiseArgument.png"; + td.onmouseover=function() { this.style.cursor='pointer';this.title=g_lang_strargraise; } + td.onclick=function() { swapArgTR(this.parentNode.parentNode.parentNode.parentNode.parentNode.previousSibling,this.parentNode.parentNode.parentNode.parentNode.parentNode); } + img.className='arg_icon'; + td.appendChild(img); + td.className="data1"; + tr.appendChild(td); + var img = document.createElement("img"); + var td = document.createElement("td"); + img.src="images/themes/default/LowerArgument.png"; + img.className='arg_icon'; + td.appendChild(img); + td.className="data1"; + td.onmouseover=function() { this.style.cursor='pointer';this.title=g_lang_strarglower; } + td.onclick=function() { swapArgTR(this.parentNode.parentNode.parentNode.parentNode.parentNode,this.parentNode.parentNode.parentNode.parentNode.parentNode.nextSibling); } + tr.appendChild(td); + var img = document.createElement("img"); + var td = document.createElement("td"); + img.src="images/themes/default/RemoveArgument.png"; + img.title=g_lang_strargremove; + img.className='arg_icon'; + td.appendChild(img); + td.className="data1"; + td.onmouseover=function() { this.style.cursor='pointer';this.title='Remove'; } + td.onclick=function() { if(g_args>1) { if(confirm(g_lang_strargremoveconfirm)) document.getElementById("args_table").removeChild(this.parentNode.parentNode.parentNode.parentNode.parentNode);g_args--; } else { + if(g_no_args==false) { + disableArgTR(this.parentNode.parentNode.parentNode.parentNode.parentNode); + this.childNodes[0].src='images/themes/default/EnableArgument.png'; + this.childNodes[0].title=g_lang_strargenableargs; + this.childNodes[0].id="1st_arg_iag"; + alert(g_lang_strargnoargs); + g_no_args = true; + g_args--; + } else { + enableArgTR(this.parentNode.parentNode.parentNode.parentNode.parentNode); + this.childNodes[0].src='images/themes/default/RemoveArgument.png'; + this.childNodes[0].title=g_lang_strargremove; + g_args++; + g_no_args = false; + } + } + } + td.onmouseout=function() { } + if(g_args==0) { + td.id="1st_arg_td"; + } + tr.className='arg_tr_pc'; + tr.appendChild(td); + tbody.appendChild(tr); + table.appendChild(tbody); + orig_td.appendChild(table); + return orig_td; +} + +function noArgsRebuild(tr) { + disableArgTR(tr); + var td = document.getElementById("1st_arg_td"); + td.childNodes[0].src='images/themes/default/EnableArgument.png'; + td.childNodes[0].title=g_lang_strargenableargs; + td.childNodes[0].id="1st_arg_iag"; + g_no_args = true; + g_args--; +} + +function swapArgTR(first,second) { + var tmp = null; + tmp = second; + second = first; + first = tmp; + if(first.className=='arg_tr_pc' && second.className=='arg_tr_pc') { + document.getElementById("args_table").insertBefore(first,second); + } else if(first.className=='arg_tr_pc' && second.className!='arg_tr_pc') { + alert(g_lang_strargnorowabove); + } else if(first.className!='arg_tr_pc' && second.className=='arg_tr_pc') { + alert(g_lang_strargnorowbelow); + } +} + +function disableArgTR(tr) { + var children = (tr.childNodes); + for(i in children) { + var secondary_children = children[i].childNodes; + for(i2 in secondary_children) { + secondary_children[i2].disabled=true; + } + } +} + +function enableArgTR(tr) { + var children = (tr.childNodes); + for(i in children) { + var secondary_children = children[i].childNodes; + for(i2 in secondary_children) { + secondary_children[i2].disabled=false; + } + } +} + +function RebuildArgTR(mode,arg_name,arg_type,arg_array) { + var tr = document.createElement("tr"); + var td = document.createElement("td"); + var modes_select = buildSelect("formArgModes[]",g_main_modes,mode); + modes_select.style.width='100%'; + td.appendChild(modes_select); + tr.appendChild(td); + var arg_txt = document.createElement("input"); + arg_txt.type='text'; + arg_txt.name='formArgName[]'; + arg_txt.style.width='100%'; + arg_txt.value=arg_name; + var td = document.createElement("td"); + td.appendChild(arg_txt); + tr.appendChild(td); + var td = document.createElement("td"); + td.appendChild(buildSelect("formArgType[]",g_main_types,arg_type)); + if(arg_array==true) { + var szArr = "[]"; + } else { + var szArr = ""; + } + td.appendChild(buildSelect("formArgArray[]",new Array("","[]"),szArr)); + tr.appendChild(td); + var td = document.createElement("td"); + td = buildArgImages(td); + td.className="data3"; + tr.className='arg_tr_pc'; + tr.appendChild(td); + if(document.getElementById("args_table").insertBefore(tr,document.getElementById("parent_add_tr"))) { + g_args++; + } +} + +function buildSelect(name,options,selected) { + var s = document.createElement('select'); + for(i=0;ihasFunctionAlterSchema()) $_POST['formFuncSchema'] = ''; + + $status = $data->setFunction($_POST['function_oid'], $_POST['original_function'], $_POST['formFunction'], + $_POST['original_arguments'], $_POST['original_returns'], $def, + $_POST['original_lang'], $_POST['formProperties'], isset($_POST['original_setof']), + $_POST['original_owner'], $_POST['formFuncOwn'], $_POST['original_schema'], + $_POST['formFuncSchema'], isset($_POST['formCost']) ? $_POST['formCost'] : null, + isset($_POST['formRows']) ? $_POST['formRows'] : 0, $_POST['formComment']); + + if ($status == 0) { + // If function has had schema altered, need to change to the new schema + // and reload the browser frame. + if (!empty($_POST['formFuncSchema']) && ($_POST['formFuncSchema'] != $_POST['original_schema'])) { + // Jump them to the new function schema + $_REQUEST['schema'] = $_POST['formFuncSchema']; + $misc->href = "server={$_REQUEST['server']}&database={$_REQUEST['database']}&schema={$_REQUEST['schema']}"; + // Force a browser reload + $_reload_browser = true; + } + doProperties($lang['strfunctionupdated']); + } else { + doEdit($lang['strfunctionupdatedbad']); + } + } + + /** + * Function to allow editing of a Function + */ + function doEdit($msg = '') { + global $data, $misc; + global $lang; + $misc->printTrail('function'); + $misc->printTitle($lang['stralter'],'pg.function.alter'); + $misc->printMsg($msg); + + $fndata = $data->getFunction($_REQUEST['function_oid']); + + if ($fndata->recordCount() > 0) { + $fndata->fields['proretset'] = $data->phpBool($fndata->fields['proretset']); + + // Initialise variables + if (!isset($_POST['formDefinition'])) $_POST['formDefinition'] = $fndata->fields['prosrc']; + if (!isset($_POST['formProperties'])) $_POST['formProperties'] = $data->getFunctionProperties($fndata->fields); + if (!isset($_POST['formFunction'])) $_POST['formFunction'] = $fndata->fields['proname']; + if (!isset($_POST['formComment'])) $_POST['formComment'] = $fndata->fields['procomment']; + if (!isset($_POST['formObjectFile'])) $_POST['formObjectFile'] = $fndata->fields['probin']; + if (!isset($_POST['formLinkSymbol'])) $_POST['formLinkSymbol'] = $fndata->fields['prosrc']; + if (!isset($_POST['formFuncOwn'])) $_POST['formFuncOwn'] = $fndata->fields['proowner']; + if (!isset($_POST['formFuncSchema'])) $_POST['formFuncSchema'] = $fndata->fields['proschema']; + + if ($data->hasFunctionCosting()) { + if (!isset($_POST['formCost'])) $_POST['formCost'] = $fndata->fields['procost']; + if (!isset($_POST['formRows'])) $_POST['formRows'] = $fndata->fields['prorows']; + } + + // Deal with named parameters + if ($data->hasNamedParams()) { + $args_arr = explode(', ', $fndata->fields['proarguments']); + $names_arr = $data->phpArray($fndata->fields['proargnames']); + $args = ''; + $i = 0; + for ($i = 0; $i < sizeof($args_arr); $i++) { + if ($i != 0) $args .= ', '; + if (isset($names_arr[$i]) && $names_arr[$i] != '') { + $data->fieldClean($names_arr[$i]); + $args .= '"' . $names_arr[$i] . '" '; + } + $args .= $args_arr[$i]; + } + } + else { + $args = $fndata->fields['proarguments']; + } + + $func_full = $fndata->fields['proname'] . "(". $fndata->fields['proarguments'] .")"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + echo "\n"; + + $fnlang = strtolower($fndata->fields['prolanguage']); + if ($fnlang == 'c') { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } else if ($fnlang == 'internal') { + echo "\n"; + echo "\n"; + } else { + echo "\n"; + echo "\n"; + } + + // Display function comment + echo "\n"; + echo "\n"; + + // Display function cost options + if ($data->hasFunctionCosting()) { + echo "\n"; + echo ""; + echo ""; + } + + // Display function properties + if (is_array($data->funcprops) && sizeof($data->funcprops) > 0) { + echo "\n"; + echo "\n"; + } + + // function owner + if ($data->hasFunctionAlterOwner()) { + $users = $data->getUsers(); + echo "\n"; + } + echo "
{$lang['strschema']}{$lang['strfunction']}{$lang['strarguments']}{$lang['strreturns']}{$lang['strproglanguage']}
"; + echo "fields['proschema']),"\" />\n"; + if ($data->hasFunctionAlterSchema()) { + $schemas = $data->getSchemas(); + echo "\n"; + } + else echo $fndata->fields['proschema']; + echo ""; + echo "fields['proname']),"\" />\n"; + echo "_maxNameLen}\" value=\"", htmlspecialchars($_POST['formFunction']), "\" />"; + echo "", $misc->printVal($args), "\n"; + echo "\n"; + echo ""; + if ($fndata->fields['proretset']) echo "setof "; + echo $misc->printVal($fndata->fields['proresult']), "\n"; + echo "fields['proresult']), "\" />\n"; + if ($fndata->fields['proretset']) + echo "\n"; + echo "", $misc->printVal($fndata->fields['prolanguage']), "\n"; + echo "fields['prolanguage']), "\" />\n"; + echo "
{$lang['strobjectfile']}{$lang['strlinksymbol']}
{$lang['strlinksymbol']}
{$lang['strdefinition']}
{$lang['strcomment']}
{$lang['strfunctioncosting']}
{$lang['strexecutioncost']}: {$lang['strresultrows']}: fields['proretset']) ? 'disabled' : '', "/>
{$lang['strproperties']}
\n"; + $i = 0; + foreach ($data->funcprops as $k => $v) { + echo "
\n"; + $i++; + } + echo "
{$lang['strowner']}: \n"; + echo "fields['proowner']),"\" />\n"; + echo "
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + } + + /** + * Show read only properties of a function + */ + function doProperties($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('function'); + $misc->printTitle($lang['strproperties'],'pg.function'); + $misc->printMsg($msg); + + $funcdata = $data->getFunction($_REQUEST['function_oid']); + + if ($funcdata->recordCount() > 0) { + // Deal with named parameters + if ($data->hasNamedParams()) { + $args_arr = explode(', ', $funcdata->fields['proarguments']); + $names_arr = $data->phpArray($funcdata->fields['proargnames']); + $args = ''; + $i = 0; + for ($i = 0; $i < sizeof($args_arr); $i++) { + if ($i != 0) $args .= ', '; + if (isset($names_arr[$i]) && $names_arr[$i] != '') { + $data->fieldClean($names_arr[$i]); + $args .= '"' . $names_arr[$i] . '" '; + } + $args .= $args_arr[$i]; + } + } + else { + $args = $funcdata->fields['proarguments']; + } + + // Show comment if any + if ($funcdata->fields['procomment'] !== null) + echo "

", $misc->printVal($funcdata->fields['procomment']), "

\n"; + + $funcdata->fields['proretset'] = $data->phpBool($funcdata->fields['proretset']); + $func_full = $funcdata->fields['proname'] . "(". $funcdata->fields['proarguments'] .")"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + $fnlang = strtolower($funcdata->fields['prolanguage']); + if ($fnlang == 'c') { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } else if ($fnlang == 'internal') { + echo "\n"; + echo "\n"; + } else { + include_once('./libraries/highlight.php'); + echo "\n"; + // Check to see if we have syntax highlighting for this language + if (isset($data->langmap[$funcdata->fields['prolanguage']])) { + $temp = syntax_highlight(htmlspecialchars($funcdata->fields['prosrc']), $data->langmap[$funcdata->fields['prolanguage']]); + $tag = 'prenoescape'; + } + else { + $temp = $funcdata->fields['prosrc']; + $tag = 'pre'; + } + echo "\n"; + } + + // Display function cost options + if ($data->hasFunctionCosting()) { + echo "\n"; + echo ""; + echo ""; + } + + // Show flags + if (is_array($data->funcprops) && sizeof($data->funcprops) > 0) { + // Fetch an array of the function properties + $funcprops = $data->getFunctionProperties($funcdata->fields); + echo "\n"; + echo "\n"; + } + + echo "\n"; + echo "
{$lang['strfunction']}{$lang['strarguments']}{$lang['strreturns']}{$lang['strproglanguage']}
", $misc->printVal($funcdata->fields['proname']), "", $misc->printVal($args), ""; + if ($funcdata->fields['proretset']) echo "setof "; + echo $misc->printVal($funcdata->fields['proresult']), "", $misc->printVal($funcdata->fields['prolanguage']), "
{$lang['strobjectfile']}{$lang['strlinksymbol']}
", $misc->printVal($funcdata->fields['probin']), "", $misc->printVal($funcdata->fields['prosrc']), "
{$lang['strlinksymbol']}
", $misc->printVal($funcdata->fields['prosrc']), "
{$lang['strdefinition']}
", $misc->printVal($temp, $tag, array('lineno' => true, 'class' => 'data1')), "
{$lang['strfunctioncosting']}
{$lang['strexecutioncost']}: ", $misc->printVal($funcdata->fields['procost']), " {$lang['strresultrows']}: ", $misc->printVal($funcdata->fields['prorows']), "
{$lang['strproperties']}
\n"; + foreach ($funcprops as $v) { + echo $misc->printVal($v), "
\n"; + } + echo "
{$lang['strowner']}: ", htmlspecialchars($funcdata->fields['proowner']),"\n"; + echo "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + + echo ""; + } + + /** + * Show confirmation of drop and perform actual drop + */ + function doDrop($confirm) { + global $data, $misc; + global $lang, $_reload_browser; + + if (empty($_REQUEST['function']) && empty($_REQUEST['ma'])) { + doDefault($lang['strspecifyfunctiontodrop']); + exit(); + } + + if ($confirm) { + $misc->printTrail('schema'); + $misc->printTitle($lang['strdrop'],'pg.function.drop'); + + echo "
\n"; + + //If multi drop + if (isset($_REQUEST['ma'])) { + foreach($_REQUEST['ma'] as $v) { + $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES)); + echo "

", sprintf($lang['strconfdropfunction'], $misc->printVal($a['function'])), "

\n"; + echo '\n"; + echo "\n"; + } + } + else { + echo "

", sprintf($lang['strconfdropfunction'], $misc->printVal($_REQUEST['function'])), "

\n"; + echo "\n"; + echo "\n"; + } + + echo "\n"; + + echo $misc->form; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + if (is_array($_POST['function_oid'])) { + $msg=''; + $status = $data->beginTransaction(); + if ($status == 0) { + foreach($_POST['function_oid'] as $k => $s) { + $status = $data->dropFunction($s, isset($_POST['cascade'])); + if ($status == 0) + $msg.= sprintf('%s: %s
', htmlentities($_POST['function'][$k]), $lang['strfunctiondropped']); + else { + $data->endTransaction(); + doDefault(sprintf('%s%s: %s
', $msg, htmlentities($_POST['function'][$k]), $lang['strfunctiondroppedbad'])); + return; + } + } + } + if($data->endTransaction() == 0) { + // Everything went fine, back to the Default page.... + $_reload_browser = true; + doDefault($msg); + } + else doDefault($lang['strfunctiondroppedbad']); + } + else{ + $status = $data->dropFunction($_POST['function_oid'], isset($_POST['cascade'])); + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['strfunctiondropped']); + } + else { + doDefault($lang['strfunctiondroppedbad']); + } + } + } + + } + + /** + * Displays a screen where they can enter a new function + */ + function doCreate($msg = '',$szJS="") { + global $data, $misc; + global $lang; + + $misc->printTrail('schema'); + if (!isset($_POST['formFunction'])) $_POST['formFunction'] = ''; + if (!isset($_POST['formArguments'])) $_POST['formArguments'] = ''; + if (!isset($_POST['formReturns'])) $_POST['formReturns'] = ''; + if (!isset($_POST['formLanguage'])) $_POST['formLanguage'] = isset($_REQUEST['language']) ? $_REQUEST['language'] : 'sql'; + if (!isset($_POST['formDefinition'])) $_POST['formDefinition'] = ''; + if (!isset($_POST['formObjectFile'])) $_POST['formObjectFile'] = ''; + if (!isset($_POST['formLinkSymbol'])) $_POST['formLinkSymbol'] = ''; + if (!isset($_POST['formProperties'])) $_POST['formProperties'] = $data->defaultprops; + if (!isset($_POST['formSetOf'])) $_POST['formSetOf'] = ''; + if (!isset($_POST['formArray'])) $_POST['formArray'] = ''; + if (!isset($_POST['formCost'])) $_POST['formCost'] = ''; + if (!isset($_POST['formRows'])) $_POST['formRows'] = ''; + if (!isset($_POST['formComment'])) $_POST['formComment'] = ''; + + $types = $data->getTypes(true, true, true); + $langs = $data->getLanguages(true); + $fnlang = strtolower($_POST['formLanguage']); + + switch ($fnlang) { + case 'c': + $misc->printTitle($lang['strcreatecfunction'],'pg.function.create.c'); + break; + case 'internal': + $misc->printTitle($lang['strcreateinternalfunction'],'pg.function.create.internal'); + break; + default: + $misc->printTitle($lang['strcreateplfunction'],'pg.function.create.pl'); + break; + } + $misc->printMsg($msg); + + // Create string for return type list + $szTypes = ""; + while (!$types->EOF) { + $szSelected = ""; + if($types->fields['typname'] == $_POST['formReturns']) { + $szSelected = " selected=\"selected\""; + } + /* this variable is include in the JS code bellow, so we need to ENT_QUOTES */ + $szTypes .= ""; + $types->moveNext(); + } + + $szFunctionName = "_maxNameLen}\" value=\"". + htmlspecialchars($_POST['formFunction']) ."\" />"; + + $szArguments = ""; + + $szSetOfSelected = ""; + $szNotSetOfSelected = ""; + if($_POST['formSetOf'] == '') { + $szNotSetOfSelected = " selected=\"selected\""; + } else if($_POST['formSetOf'] == 'SETOF') { + $szSetOfSelected = " selected=\"selected\""; + } + $szReturns = ""; + $szReturns .= ""; + + $szReturns .= ""; + + // Create string array type selector + + $szArraySelected = ""; + $szNotArraySelected = ""; + if($_POST['formArray'] == '') { + $szNotArraySelected = " selected=\"selected\""; + } else if($_POST['formArray'] == '[]') { + $szArraySelected = " selected=\"selected\""; + } + + $szReturns .= "\n"; + + // Create string for language + $szLanguage = ""; + if ($fnlang == 'c' || $fnlang == 'internal') { + $szLanguage .= $_POST['formLanguage'] . "\n"; + $szLanguage .= "\n"; + } + else { + $szLanguage .= "\n"; + } + + $szLanguage .= ""; + $szJSArguments = "{$lang['strarguments']}"; + $arrayModes = array("IN","OUT","INOUT"); + $szModes = ""; + $szArgReturns = ""; + if(!empty($conf['theme'])) { + $szImgPath = "images/themes/{$conf['theme']}"; + } else { + $szImgPath = "images/themes/default"; + } + if(empty($msg)) { + $szJSTRArg = "\n"; + } else { + $szJSTRArg = ""; + } + $szJSAddTR = "\n
\"Add{$lang['strargadd']}
\n\n"; + + echo " + + "; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "{$szFunctionName}\n"; + echo "{$szReturns}\n"; + echo "{$szLanguage}\n"; + echo "\n"; + echo "{$szJSArguments}\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "{$szJSAddTR}\n"; + + if ($fnlang == 'c') { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } else if ($fnlang == 'internal') { + echo "\n"; + echo "\n"; + } else { + echo "\n"; + echo "\n"; + } + + // Display function comment + echo "\n"; + echo "\n"; + + // Display function cost options + if ($data->hasFunctionCosting()) { + echo "\n"; + echo ""; + echo ""; + } + + // Display function properties + if (is_array($data->funcprops) && sizeof($data->funcprops) > 0) { + echo "\n"; + echo "\n"; + } + echo "
{$lang['strname']}{$lang['strreturns']}{$lang['strproglanguage']}
{$lang['strargmode']}{$lang['strname']}{$lang['strargtype']}
{$lang['strobjectfile']}{$lang['strlinksymbol']}
{$lang['strlinksymbol']}
{$lang['strdefinition']}
{$lang['strcomment']}
{$lang['strfunctioncosting']}
{$lang['strexecutioncost']}: {$lang['strresultrows']}:
{$lang['strproperties']}
\n"; + $i = 0; + foreach ($data->funcprops as $k => $v) { + echo "
\n"; + $i++; + } + echo "
\n"; + echo $szJSTRArg; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + echo $szJS; + } + + /** + * Actually creates the new function in the database + */ + function doSaveCreate() { + global $data, $lang; + + $fnlang = strtolower($_POST['formLanguage']); + + if ($fnlang == 'c') { + $def = array($_POST['formObjectFile'], $_POST['formLinkSymbol']); + } else if ($fnlang == 'internal'){ + $def = $_POST['formLinkSymbol']; + } else { + $def = $_POST['formDefinition']; + } + + $szJS = ''; + + echo ""; + echo "'; + if(!empty($_POST['formArgName'])) { + $szJS = buildJSRows(buildFunctionArguments($_POST)); + } else { + $szJS = ""; + } + + $cost = (isset($_POST['formCost'])) ? $_POST['formCost'] : null; + if ($cost == '' || !is_numeric($cost) || $cost != (int)$cost || $cost < 0) { + $cost = null; + } + + $rows = (isset($_POST['formRows'])) ? $_POST['formRows'] : null; + if ($rows == '' || !is_numeric($rows) || $rows != (int)$rows ) { + $rows = null; + } + + // Check that they've given a name and a definition + if ($_POST['formFunction'] == '') doCreate($lang['strfunctionneedsname'],$szJS); + elseif ($fnlang != 'internal' && !$def) doCreate($lang['strfunctionneedsdef'],$szJS); + else { + // Append array symbol to type if chosen + $status = $data->createFunction($_POST['formFunction'], empty($_POST['nojs'])? buildFunctionArguments($_POST) : $_POST['formArguments'], + $_POST['formReturns'] . $_POST['formArray'] , $def , $_POST['formLanguage'], + $_POST['formProperties'], $_POST['formSetOf'] == 'SETOF', + $cost, $rows, $_POST['formComment'], false); + if ($status == 0) + doDefault($lang['strfunctioncreated']); + else { + doCreate($lang['strfunctioncreatedbad'],$szJS); + } + } + } + + /** + * Build out the function arguments string + */ + function buildFunctionArguments($arrayVars) { + if(isset($_POST['formArgName'])) { + $arrayArgs = array(); + foreach($arrayVars['formArgName'] as $pK => $pV) { + $arrayArgs[] = $arrayVars['formArgModes'][$pK] .' '. trim($pV) .' '. trim($arrayVars['formArgType'][$pK]) . $arrayVars['formArgArray'][$pK]; + } + return implode(",", $arrayArgs); + } + return ''; + } + + /** + * Build out JS to re-create table rows for arguments + */ + function buildJSRows($szArgs) { + $arrayModes = array('IN','OUT','INOUT'); + $arrayArgs = explode(',',$szArgs); + $arrayProperArgs = array(); + $nC = 0; + $szReturn = ''; + foreach($arrayArgs as $pV) { + $arrayWords = explode(' ',$pV); + if(in_array($arrayWords[0],$arrayModes)===true) { + $szMode = $arrayWords[0]; + array_shift($arrayWords); + } + $szArgName = array_shift($arrayWords); + if(strpos($arrayWords[count($arrayWords)-1],'[]')===false) { + $szArgType = implode(" ",$arrayWords); + $bArgIsArray = "false"; + } else { + $szArgType = str_replace('[]','',implode(' ',$arrayWords)); + $bArgIsArray = "true"; + } + $arrayProperArgs[] = array($szMode,$szArgName,$szArgType,$bArgIsArray); + $szReturn .= ""; + $nC++; + } + return $szReturn; + } + + + function buildJSData() { + global $data; + $arrayModes = array('IN','OUT','INOUT'); + $arrayTypes = $data->getTypes(true, true, true); + $arrayPTypes = array(); + $arrayPModes = array(); + $szTypes = ''; + + while (!$arrayTypes->EOF) { + $arrayPTypes[] = "'". $arrayTypes->fields['typname'] ."'"; + $arrayTypes->moveNext(); + } + + foreach($arrayModes as $pV) { + $arrayPModes[] = "'{$pV}'"; + } + + $szTypes = 'g_main_types = new Array('. implode(',', $arrayPTypes) .');'; + $szModes = 'g_main_modes = new Array('. implode(',', $arrayPModes) .');'; + return $szTypes . $szModes; + } + + /** + * Show default list of functions in the database + */ + function doDefault($msg = '') { + global $data, $conf, $misc, $func; + global $lang; + + $misc->printTrail('schema'); + $misc->printTabs('schema','functions'); + $misc->printMsg($msg); + + $funcs = $data->getFunctions(); + + $columns = array( + 'function' => array( + 'title' => $lang['strfunction'], + 'field' => field('proproto'), + 'type' => 'verbatim', + 'url' => "redirect.php?subject=function&action=properties&{$misc->href}&", + 'vars' => array('function' => 'proproto', 'function_oid' => 'prooid'), + ), + 'returns' => array( + 'title' => $lang['strreturns'], + 'field' => field('proreturns'), + 'type' => 'verbatim', + ), + 'owner' => array( + 'title' => $lang['strowner'], + 'field' => field('proowner'), + ), + 'proglanguage' => array( + 'title' => $lang['strproglanguage'], + 'field' => field('prolanguage'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('procomment'), + ), + ); + + $actions = array( + 'multiactions' => array( + 'keycols' => array('function' => 'proproto', 'function_oid' => 'prooid'), + 'url' => 'functions.php', + ), + 'alter' => array( + 'title' => $lang['stralter'], + 'url' => "functions.php?action=edit&{$misc->href}&", + 'vars' => array('function' => 'proproto', 'function_oid' => 'prooid'), + ), + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "functions.php?action=confirm_drop&{$misc->href}&", + 'vars' => array('function' => 'proproto', 'function_oid' => 'prooid'), + 'multiaction' => 'confirm_drop', + ), + 'privileges' => array( + 'title' => $lang['strprivileges'], + 'url' => "privileges.php?{$misc->href}&subject=function&", + 'vars' => array('function' => 'proproto', 'function_oid' => 'prooid'), + ), + ); + + $misc->printTable($funcs, $columns, $actions, $lang['strnofunctions']); + + echo "\n"; + } + + /** + * Generate XML for the browser tree. + */ + function doTree() { + global $misc, $data; + + $funcs = $data->getFunctions(); + + $proto = concat(field('proname'),' (',field('proarguments'),')'); + + $reqvars = $misc->getRequestVars('function'); + + $attrs = array( + 'text' => $proto, + 'icon' => 'Function', + 'toolTip' => field('procomment'), + 'action' => url('redirect.php', + $reqvars, + array( + 'action' => 'properties', + 'function' => $proto, + 'function_oid' => field('prooid') + ) + ) + ); + + $misc->printTreeXML($funcs, $attrs); + exit; + } + + if ($action == 'tree') doTree(); + + $misc->printHeader($lang['strfunctions']); + $misc->printBody(); + + switch ($action) { + case 'save_create': + if (isset($_POST['cancel'])) doDefault(); + else doSaveCreate(); + break; + case 'create': + doCreate(); + break; + case 'drop': + if (isset($_POST['drop'])) doDrop(false); + else doDefault(); + break; + case 'confirm_drop': + doDrop(true); + break; + case 'save_edit': + if (isset($_POST['cancel'])) doDefault(); + else doSaveEdit(); + break; + case 'edit': + doEdit(); + break; + case 'properties': + doProperties(); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/groups.php b/php/pgadmin/groups.php new file mode 100644 index 0000000..8aed969 --- /dev/null +++ b/php/pgadmin/groups.php @@ -0,0 +1,288 @@ +addGroupMember($_REQUEST['group'], $_REQUEST['user']); + if ($status == 0) + doProperties($lang['strmemberadded']); + else + doProperties($lang['strmemberaddedbad']); + } + + /** + * Show confirmation of drop user from group and perform actual drop + */ + function doDropMember($confirm) { + global $data, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('group'); + $misc->printTitle($lang['strdropmember'],'pg.group.alter'); + + echo "

", sprintf($lang['strconfdropmember'], $misc->printVal($_REQUEST['user']), $misc->printVal($_REQUEST['group'])), "

\n"; + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $data->dropGroupMember($_REQUEST['group'], $_REQUEST['user']); + if ($status == 0) + doProperties($lang['strmemberdropped']); + else + doDropMember(true, $lang['strmemberdroppedbad']); + } + } + + /** + * Show read only properties for a group + */ + function doProperties($msg = '') { + global $data, $misc; + global $lang; + + if (!isset($_POST['user'])) $_POST['user'] = ''; + + $misc->printTrail('group'); + $misc->printTitle($lang['strproperties'],'pg.group'); + $misc->printMsg($msg); + + $groupdata = $data->getGroup($_REQUEST['group']); + $users = $data->getUsers(); + + if ($groupdata->recordCount() > 0) { + echo "\n"; + echo "\n"; + $i = 0; + while (!$groupdata->EOF) { + $id = (($i % 2) == 0 ? '1' : '2'); + echo "\n"; + echo "\n"; + echo "\n"; + $groupdata->moveNext(); + } + echo "
{$lang['strmembers']}{$lang['stractions']}
", $misc->printVal($groupdata->fields['usename']), "href}&group=", + urlencode($_REQUEST['group']), "&user=", urlencode($groupdata->fields['usename']), "\">{$lang['strdrop']}
\n"; + } + else echo "

{$lang['strnousers']}

\n"; + + // Display form for adding a user to the group + echo "
\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "
\n"; + + echo "

href}\">{$lang['strshowallgroups']}

\n"; + } + + /** + * Show confirmation of drop and perform actual drop + */ + function doDrop($confirm) { + global $data, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('group'); + $misc->printTitle($lang['strdrop'],'pg.group.drop'); + + echo "

", sprintf($lang['strconfdropgroup'], $misc->printVal($_REQUEST['group'])), "

\n"; + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $data->dropGroup($_REQUEST['group']); + if ($status == 0) + doDefault($lang['strgroupdropped']); + else + doDefault($lang['strgroupdroppedbad']); + } + } + + /** + * Displays a screen where they can enter a new group + */ + function doCreate($msg = '') { + global $data, $misc; + global $lang; + + if (!isset($_POST['name'])) $_POST['name'] = ''; + if (!isset($_POST['members'])) $_POST['members'] = array(); + + // Fetch a list of all users in the cluster + $users = $data->getUsers(); + + $misc->printTrail('server'); + $misc->printTitle($lang['strcreategroup'],'pg.group.create'); + $misc->printMsg($msg); + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + if ($users->recordCount() > 0) { + echo "\t\n\t\t\n"; + + echo "\t\t\n\t\n"; + } + echo "
{$lang['strname']}_maxNameLen}\" name=\"name\" value=\"", htmlspecialchars($_POST['name']), "\" />
{$lang['strmembers']}\n"; + echo "\t\t\t\n"; + echo "\t\t
\n"; + echo "

\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + + /** + * Actually creates the new group in the database + */ + function doSaveCreate() { + global $data; + global $lang; + + if (!isset($_POST['members'])) $_POST['members'] = array(); + + // Check form vars + if (trim($_POST['name']) == '') + doCreate($lang['strgroupneedsname']); + else { + $status = $data->createGroup($_POST['name'], $_POST['members']); + if ($status == 0) + doDefault($lang['strgroupcreated']); + else + doCreate($lang['strgroupcreatedbad']); + } + } + + /** + * Show default list of groups in the database + */ + function doDefault($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('server'); + $misc->printTabs('server','groups'); + $misc->printMsg($msg); + + $groups = $data->getGroups(); + + $columns = array( + 'group' => array( + 'title' => $lang['strgroup'], + 'field' => field('groname'), + 'url' => "groups.php?action=properties&{$misc->href}&", + 'vars' => array('group' => 'groname'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + ); + + $actions = array( + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "groups.php?action=confirm_drop&{$misc->href}&", + 'vars' => array('group' => 'groname'), + ), + ); + + $misc->printTable($groups, $columns, $actions, $lang['strnogroups']); + + echo "

href}\">{$lang['strcreategroup']}

\n"; + + } + + $misc->printHeader($lang['strgroups']); + $misc->printBody(); + + switch ($action) { + case 'add_member': + doAddMember(); + break; + case 'drop_member': + if (isset($_REQUEST['drop'])) doDropMember(false); + else doProperties(); + break; + case 'confirm_drop_member': + doDropMember(true); + break; + case 'save_create': + if (isset($_REQUEST['cancel'])) doDefault(); + else doSaveCreate(); + break; + case 'create': + doCreate(); + break; + case 'drop': + if (isset($_REQUEST['drop'])) doDrop(false); + else doDefault(); + break; + case 'confirm_drop': + doDrop(true); + break; + case 'save_edit': + doSaveEdit(); + break; + case 'edit': + doEdit(); + break; + case 'properties': + doProperties(); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/help.php b/php/pgadmin/help.php new file mode 100644 index 0000000..9dbde0e --- /dev/null +++ b/php/pgadmin/help.php @@ -0,0 +1,88 @@ +getHelp($_REQUEST['help']); + + if (is_array($url)) { + doChoosePage($url); + return; + } + + if ($url) { + header("Location: $url"); + exit; + } + } + + doBrowse($lang['strinvalidhelppage']); + } + + function doBrowse($msg = '') { + global $misc, $data, $lang; + + $misc->printHeader($lang['strhelppagebrowser']); + $misc->printBody(); + + $misc->printTitle($lang['strselecthelppage']); + + echo $misc->printMsg($msg); + + echo "
\n"; + + $pages = $data->getHelpPages(); + foreach ($pages as $page => $dummy) { + echo "
{$page}
\n"; + + $urls = $data->getHelp($page); + if (!is_array($urls)) $urls = array($urls); + foreach ($urls as $url) { + echo "
{$url}
\n"; + } + } + + echo "
\n"; + + $misc->printFooter(); + } + + function doChoosePage($urls) { + global $misc, $lang; + + $misc->printHeader($lang['strhelppagebrowser']); + $misc->printBody(); + + $misc->printTitle($lang['strselecthelppage']); + + echo "
    \n"; + foreach($urls as $url) { + echo "
  • {$url}
  • \n"; + } + echo "
\n"; + + $misc->printFooter(); + } + + switch ($action) { + case 'browse': + doBrowse(); + break; + default: + doDefault(); + break; + } +?> diff --git a/php/pgadmin/help/PostgresDoc74.php b/php/pgadmin/help/PostgresDoc74.php new file mode 100644 index 0000000..b845828 --- /dev/null +++ b/php/pgadmin/help/PostgresDoc74.php @@ -0,0 +1,160 @@ +help_base = sprintf($GLOBALS['conf']['help_base'], '7.4'); + +# TODO: Check and fix links + +$this->help_page = array( + + 'pg.database' => 'managing-databases.html', + 'pg.database.create' => array('sql-createdatabase.html', 'manage-ag-createdb.html'), + 'pg.database.alter' => 'sql-alterdatabase.html', + 'pg.database.drop' => array('sql-dropdatabase.html', 'manage-ag-dropdb.html'), + + 'pg.admin.analyze' => 'sql-analyze.html', + 'pg.admin.vacuum' => 'sql-vacuum.html', + + 'pg.cast' => array('sql-expressions.html#SQL-SYNTAX-TYPE-CASTS','sql-createcast.html'), + 'pg.cast.create' => 'sql-createcast.html', + 'pg.cast.drop' => 'sql-dropcast.html', + + 'pg.column.add' => array('ddl-alter.html#AEN2115', 'sql-altertable.html'), + 'pg.column.alter' => array('ddl-alter.html','sql-altertable.html'), + 'pg.column.drop' => array('ddl-alter.html#AEN2124', 'sql-altertable.html'), + + 'pg.constraint' => 'ddl-constraints.html', + 'pg.constraint.add' => 'ddl-alter.html#AEN2131', + 'pg.constraint.check' => 'ddl-constraints.html#AEN1895', + 'pg.constraint.drop' => 'ddl-alter.html#AEN2140', + 'pg.constraint.foreign_key' => 'ddl-constraints.html#DDL-CONSTRAINTS-FK', + 'pg.constraint.primary_key' => 'ddl-constraints.html#AEN1972', + 'pg.constraint.unique_key' => 'ddl-constraints.html#AEN1950', + + 'pg.conversion' => 'multibyte.html', + 'pg.conversion.alter' => 'sql-alterconversion.html', + 'pg.conversion.create' => 'sql-createconversion.html', + 'pg.conversion.drop' => 'sql-dropconversion.html', + + 'pg.domain' => 'extend-type-system.html#AEN28657', + 'pg.domain.alter' => 'sql-alterdomain.html', + 'pg.domain.create' => 'sql-createdomain.html', + 'pg.domain.drop' => 'sql-dropdomain.html', + + 'pg.function' => array('xfunc.html', 'functions.html', 'sql-expressions.html#AEN1599'), + 'pg.function.alter' => 'sql-alterfunction.html', + 'pg.function.create' => 'sql-createfunction.html', + 'pg.function.create.c' => array('xfunc-c.html','sql-createfunction.html'), + 'pg.function.create.internal' => array('xfunc-internal.html','sql-createfunction.html'), + 'pg.function.create.pl' => array('xfunc-sql.html','xfunc-pl.html','sql-createfunction.html'), + 'pg.function.drop' => 'sql-dropfunction.html', + + 'pg.group' => 'groups.html', + 'pg.group.alter' => array('sql-altergroup.html','groups.html'), + 'pg.group.create' => 'sql-creategroup.html', + 'pg.group.drop' => 'sql-dropgroup.html', + + 'pg.index' => 'indexes.html', + 'pg.index.cluster' => 'sql-cluster.html', + 'pg.index.drop' => 'sql-dropindex.html', + 'pg.index.create' => 'sql-createindex.html', + 'pg.index.reindex' => 'sql-reindex.html', + + 'pg.language' => 'xplang.html', + 'pg.language.alter' => 'sql-alterlanguage.html', + 'pg.language.create' => 'sql-createlanguage.html', + 'pg.language.drop' => 'sql-droplanguage.html', + + 'pg.opclass' => 'indexes-opclass.html', + 'pg.opclass.alter' => 'sql-alteropclass.html', + 'pg.opclass.create' => 'sql-createopclass.html', + 'pg.opclass.drop' => 'sql-dropopclass.html', + + 'pg.operator' => array('xoper.html', 'functions.html', 'sql-expressions.html#AEN1570'), + 'pg.operator.alter' => 'sql-alteroperator.html', + 'pg.operator.create' => 'sql-createoperator.html', + 'pg.operator.drop' => 'sql-dropoperator.html', + + 'pg.pl' => 'xplang.html', + 'pg.pl.plperl' => 'plperl.html', + 'pg.pl.plpgsql' => 'plpgsql.html', + 'pg.pl.plpython' => 'plpython.html', + 'pg.pl.pltcl' => 'pltcl.html', + + 'pg.privilege' => array('privileges.html','ddl-priv.html'), + 'pg.privilege.grant' => 'sql-grant.html', + 'pg.privilege.revoke' => 'sql-revoke.html', + + 'pg.process' => 'monitoring.html', + + 'pg.rule' => 'rules.html', + 'pg.rule.create' => 'sql-createrule.html', + 'pg.rule.drop' => 'sql-droprule.html', + + 'pg.schema' => 'ddl-schemas.html', + 'pg.schema.alter' => 'sql-alterschema.html', + 'pg.schema.create' => array( 'sql-createschema.html','ddl-schemas.html#DDL-SCHEMAS-CREATE'), + 'pg.schema.drop' => 'sql-dropschema.html', + 'pg.schema.search_path' => 'ddl-schemas.html#DDL-SCHEMAS-PATH', + + 'pg.sequence' => 'functions-sequence.html', + 'pg.sequence.alter' => 'sql-altersequence.html', + 'pg.sequence.create' => 'sql-createsequence.html', + 'pg.sequence.drop' => 'sql-dropsequence.html', + + 'pg.sql' => array('sql.html','sql-commands.html'), + 'pg.sql.insert' => 'sql-insert.html', + 'pg.sql.select' => 'sql-select.html', + 'pg.sql.update' => 'sql-update.html', + + 'pg.table' => 'ddl.html#DDL-BASICS', + 'pg.table.alter' => 'sql-altertable.html', + 'pg.table.create' => 'sql-createtable.html', + 'pg.table.drop' => 'sql-droptable.html', + 'pg.table.empty' => 'sql-truncate.html', + + 'pg.tablespace' => 'manage-ag-tablespaces.html', + 'pg.tablespace.alter' => 'sql-altertablespace.html', + 'pg.tablespace.create' => 'sql-createtablespace.html', + 'pg.tablespace.drop' => 'sql-droptablespace.html', + + 'pg.trigger' => 'triggers.html', + 'pg.trigger.alter' => 'sql-altertrigger.html', + 'pg.trigger.create' => 'sql-createtrigger.html', + 'pg.trigger.drop' => 'sql-droptrigger.html', + + 'pg.type' => array('xtypes.html','datatype.html','extend-type-system.html'), + 'pg.type.alter' => 'sql-altertype.html', + 'pg.type.create' => 'sql-createtype.html', + 'pg.type.drop' => 'sql-droptype.html', + + 'pg.user.alter' => array('sql-alteruser.html','user-attributes.html'), + 'pg.user.create' => array('sql-createuser.html','user-manag.html#DATABASE-USERS'), + 'pg.user.drop' => array('sql-dropuser.html','user-manag.html#DATABASE-USERS'), + + 'pg.variable' => 'runtime-config.html', + + 'pg.view' => 'tutorial-views.html', + 'pg.view.alter' => array('sql-createview.html','sql-altertable.html'), + 'pg.view.create' => 'sql-createview.html', + 'pg.view.drop' => 'sql-dropview.html', + + 'pg.aggregate' => array('xaggr.html', 'tutorial-agg.html', 'functions-aggregate.html', 'sql-expressions.html#SYNTAX-AGGREGATES'), + 'pg.aggregate.create' => 'sql-createaggregate.html', + 'pg.aggregate.drop' => 'sql-dropaggregate.html', + 'pg.aggregate.alter' => 'sql-alteraggregate.html', + + 'pg.server' => 'admin.html', + + 'pg.user' => 'user-manag.html', + + 'pg.locks' => 'view-pg-locks.html' +); + + +?> diff --git a/php/pgadmin/help/PostgresDoc80.php b/php/pgadmin/help/PostgresDoc80.php new file mode 100644 index 0000000..f0bd19a --- /dev/null +++ b/php/pgadmin/help/PostgresDoc80.php @@ -0,0 +1,28 @@ +help_base = sprintf($GLOBALS['conf']['help_base'], '8.0'); + +$this->help_page['pg.column.add'][0] = 'ddl-alter.html#AEN2217'; +$this->help_page['pg.column.drop'][0] = 'ddl-alter.html#AEN2226'; + +$this->help_page['pg.constraint.add'] = 'ddl-alter.html#AEN2217'; +$this->help_page['pg.constraint.check'] = 'ddl-constraints.html#AEN1978'; +$this->help_page['pg.constraint.drop'] = 'ddl-alter.html#AEN2226'; +$this->help_page['pg.constraint.primary_key'] = 'ddl-constraints.html#AEN2055'; +$this->help_page['pg.constraint.unique_key'] = 'ddl-constraints.html#AEN2033'; + +$this->help_page['pg.domain'] = 'extend-type-system.html#AEN27940'; + +$this->help_page['pg.function'][2] = 'sql-expressions.html#AEN1652'; + +$this->help_page['pg.operator'][2] = 'sql-expressions.html#AEN1623'; + +?> diff --git a/php/pgadmin/help/PostgresDoc81.php b/php/pgadmin/help/PostgresDoc81.php new file mode 100644 index 0000000..29307e3 --- /dev/null +++ b/php/pgadmin/help/PostgresDoc81.php @@ -0,0 +1,18 @@ +help_base = sprintf($GLOBALS['conf']['help_base'], '8.1'); + +$this->help_page['pg.role'] = 'user-manag.html'; +$this->help_page['pg.role.create'] = array('sql-createrole.html','user-manag.html#DATABASE-ROLES'); +$this->help_page['pg.role.alter'] = array('sql-alterrole.html','role-attributes.html'); +$this->help_page['pg.role.drop'] = array('sql-droprole.html','user-manag.html#DATABASE-ROLES'); + +?> diff --git a/php/pgadmin/help/PostgresDoc82.php b/php/pgadmin/help/PostgresDoc82.php new file mode 100644 index 0000000..7b956f0 --- /dev/null +++ b/php/pgadmin/help/PostgresDoc82.php @@ -0,0 +1,13 @@ +help_base = sprintf($GLOBALS['conf']['help_base'], '8.2'); + +?> diff --git a/php/pgadmin/help/PostgresDoc83.php b/php/pgadmin/help/PostgresDoc83.php new file mode 100644 index 0000000..3684ad2 --- /dev/null +++ b/php/pgadmin/help/PostgresDoc83.php @@ -0,0 +1,27 @@ +help_base = sprintf($GLOBALS['conf']['help_base'], '8.3'); + +$this->help_page['pg.fts'] = 'textsearch.html'; + +$this->help_page['pg.ftscfg'] = 'textsearch-intro.html#TEXTSEARCH-INTRO-CONFIGURATIONS'; +$this->help_page['pg.ftscfg.example'] = 'textsearch-configuration.html'; +$this->help_page['pg.ftscfg.drop'] = 'sql-droptsconfig.html'; +$this->help_page['pg.ftscfg.create'] = 'sql-createtsconfig.html'; +$this->help_page['pg.ftscfg.alter'] = 'sql-altertsconfig.html'; + +$this->help_page['pg.ftsdict'] = 'textsearch-dictionaries.html'; +$this->help_page['pg.ftsdict.drop'] = 'sql-droptsdictionary.html'; +$this->help_page['pg.ftsdict.create'] = array('sql-createtsdictionary.html', 'sql-createtstemplate.html'); +$this->help_page['pg.ftsdict.alter'] = 'sql-altertsdictionary.html'; + +$this->help_page['pg.ftsparser'] = 'textsearch-parsers.html'; +?> diff --git a/php/pgadmin/help/PostgresDoc84.php b/php/pgadmin/help/PostgresDoc84.php new file mode 100644 index 0000000..91c8b20 --- /dev/null +++ b/php/pgadmin/help/PostgresDoc84.php @@ -0,0 +1,13 @@ +help_base = sprintf($GLOBALS['conf']['help_base'], '8.4'); + +?> diff --git a/php/pgadmin/help/PostgresDoc90.php b/php/pgadmin/help/PostgresDoc90.php new file mode 100644 index 0000000..519a7db --- /dev/null +++ b/php/pgadmin/help/PostgresDoc90.php @@ -0,0 +1,13 @@ +help_base = sprintf($GLOBALS['conf']['help_base'], '9.0'); + +?> diff --git a/php/pgadmin/history.php b/php/pgadmin/history.php new file mode 100644 index 0000000..285cb24 --- /dev/null +++ b/php/pgadmin/history.php @@ -0,0 +1,150 @@ +printHeader($lang['strhistory']); + + // Bring to the front always + echo "\n"; + + echo "
\n"; + $misc->printConnection($onchange); + echo "

"; + + if (!isset($_REQUEST['database'])) { + echo "

{$lang['strnodatabaseselected']}

\n"; + return; + } + + if (isset($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']])) { + include_once('classes/ArrayRecordSet.php'); + + $history = new ArrayRecordSet($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']]); + + $columns = array( + 'query' => array( + 'title' => $lang['strsql'], + 'field' => field('query'), + ), + 'paginate' => array( + 'title' => $lang['strpaginate'], + 'field' => field('paginate'), + 'type' => 'yesno', + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + ); + + $actions = array( + 'run' => array( + 'title' => $lang['strexecute'], + 'url' => "sql.php?{$misc->href}&nohistory=t&", + 'vars' => array('query' => 'query', 'paginate' => 'paginate'), + 'target' => 'detail', + ), + 'remove' => array( + 'title' => $lang['strdelete'], + 'url' => "history.php?{$misc->href}&action=confdelhistory&", + 'vars' => array('queryid' => 'queryid'), + ), + ); + + $misc->printTable($history, $columns, $actions, $lang['strnohistory']); + } + else echo "

{$lang['strnohistory']}

\n"; + + echo "\n"; + } + + function doDelHistory($qid, $confirm) { + global $misc, $lang; + + if ($confirm) { + $misc->printHeader($lang['strhistory']); + + // Bring to the front always + echo "\n"; + + echo "

{$lang['strdelhistory']}

\n"; + echo "

{$lang['strconfdelhistory']}

\n"; + + echo "
", htmlentities($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']][$qid]['query']), "
"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else + unset($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']][$qid]); + } + + function doClearHistory($confirm) { + global $misc, $lang; + + if ($confirm) { + $misc->printHeader($lang['strhistory']); + + // Bring to the front always + echo "\n"; + + echo "

{$lang['strclearhistory']}

\n"; + echo "

{$lang['strconfclearhistory']}

\n"; + + echo "
\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else + unset($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']]); + } + + + switch ($action) { + case 'confdelhistory': + doDelHistory($_REQUEST['queryid'], true); + break; + case 'delhistory': + if (isset($_POST['yes'])) doDelHistory($_REQUEST['queryid'], false); + doDefault(); + break; + case 'confclearhistory': + doClearHistory(true); + break; + case 'clearhistory': + if (isset($_POST['yes'])) doClearHistory(false); + doDefault(); + break; + default: + doDefault(); + } + + // Set the name of the window + $misc->setWindowName('history'); + $misc->printFooter(); + +?> diff --git a/php/pgadmin/images/themes/cappuccino/Lminus.png b/php/pgadmin/images/themes/cappuccino/Lminus.png new file mode 100644 index 0000000..b5e4898 Binary files /dev/null and b/php/pgadmin/images/themes/cappuccino/Lminus.png differ diff --git a/php/pgadmin/images/themes/cappuccino/Lplus.png b/php/pgadmin/images/themes/cappuccino/Lplus.png new file mode 100644 index 0000000..ef51c7e Binary files /dev/null and b/php/pgadmin/images/themes/cappuccino/Lplus.png differ diff --git a/php/pgadmin/images/themes/cappuccino/Tminus.png b/php/pgadmin/images/themes/cappuccino/Tminus.png new file mode 100644 index 0000000..95a34bc Binary files /dev/null and b/php/pgadmin/images/themes/cappuccino/Tminus.png differ diff --git a/php/pgadmin/images/themes/cappuccino/Tplus.png b/php/pgadmin/images/themes/cappuccino/Tplus.png new file mode 100644 index 0000000..c54f5c8 Binary files /dev/null and b/php/pgadmin/images/themes/cappuccino/Tplus.png differ diff --git a/php/pgadmin/images/themes/cappuccino/inputbckg.png b/php/pgadmin/images/themes/cappuccino/inputbckg.png new file mode 100644 index 0000000..35815c5 Binary files /dev/null and b/php/pgadmin/images/themes/cappuccino/inputbckg.png differ diff --git a/php/pgadmin/images/themes/cappuccino/openListe.png b/php/pgadmin/images/themes/cappuccino/openListe.png new file mode 100644 index 0000000..0d132d3 Binary files /dev/null and b/php/pgadmin/images/themes/cappuccino/openListe.png differ diff --git a/php/pgadmin/images/themes/cappuccino/title.png b/php/pgadmin/images/themes/cappuccino/title.png new file mode 100644 index 0000000..ed8667b Binary files /dev/null and b/php/pgadmin/images/themes/cappuccino/title.png differ diff --git a/php/pgadmin/images/themes/default/AddArguments.png b/php/pgadmin/images/themes/default/AddArguments.png new file mode 100644 index 0000000..3ac45e1 Binary files /dev/null and b/php/pgadmin/images/themes/default/AddArguments.png differ diff --git a/php/pgadmin/images/themes/default/Admin.png b/php/pgadmin/images/themes/default/Admin.png new file mode 100644 index 0000000..8ea212b Binary files /dev/null and b/php/pgadmin/images/themes/default/Admin.png differ diff --git a/php/pgadmin/images/themes/default/Aggregate.png b/php/pgadmin/images/themes/default/Aggregate.png new file mode 100644 index 0000000..6fe4201 Binary files /dev/null and b/php/pgadmin/images/themes/default/Aggregate.png differ diff --git a/php/pgadmin/images/themes/default/Aggregates.png b/php/pgadmin/images/themes/default/Aggregates.png new file mode 100644 index 0000000..4641859 Binary files /dev/null and b/php/pgadmin/images/themes/default/Aggregates.png differ diff --git a/php/pgadmin/images/themes/default/AllUsers.png b/php/pgadmin/images/themes/default/AllUsers.png new file mode 100644 index 0000000..bbfadb5 Binary files /dev/null and b/php/pgadmin/images/themes/default/AllUsers.png differ diff --git a/php/pgadmin/images/themes/default/AvailableReplicationSet.png b/php/pgadmin/images/themes/default/AvailableReplicationSet.png new file mode 100644 index 0000000..12e98aa Binary files /dev/null and b/php/pgadmin/images/themes/default/AvailableReplicationSet.png differ diff --git a/php/pgadmin/images/themes/default/AvailableSubscription.png b/php/pgadmin/images/themes/default/AvailableSubscription.png new file mode 100644 index 0000000..100949a Binary files /dev/null and b/php/pgadmin/images/themes/default/AvailableSubscription.png differ diff --git a/php/pgadmin/images/themes/default/Backup.png b/php/pgadmin/images/themes/default/Backup.png new file mode 100644 index 0000000..7783eb8 Binary files /dev/null and b/php/pgadmin/images/themes/default/Backup.png differ diff --git a/php/pgadmin/images/themes/default/Cast.png b/php/pgadmin/images/themes/default/Cast.png new file mode 100644 index 0000000..d7666e5 Binary files /dev/null and b/php/pgadmin/images/themes/default/Cast.png differ diff --git a/php/pgadmin/images/themes/default/Casts.png b/php/pgadmin/images/themes/default/Casts.png new file mode 100644 index 0000000..d7b9e71 Binary files /dev/null and b/php/pgadmin/images/themes/default/Casts.png differ diff --git a/php/pgadmin/images/themes/default/CheckConstraint.png b/php/pgadmin/images/themes/default/CheckConstraint.png new file mode 100644 index 0000000..db078e9 Binary files /dev/null and b/php/pgadmin/images/themes/default/CheckConstraint.png differ diff --git a/php/pgadmin/images/themes/default/Cluster.png b/php/pgadmin/images/themes/default/Cluster.png new file mode 100644 index 0000000..4b6bf12 Binary files /dev/null and b/php/pgadmin/images/themes/default/Cluster.png differ diff --git a/php/pgadmin/images/themes/default/Column.png b/php/pgadmin/images/themes/default/Column.png new file mode 100644 index 0000000..ecd1433 Binary files /dev/null and b/php/pgadmin/images/themes/default/Column.png differ diff --git a/php/pgadmin/images/themes/default/Columns.png b/php/pgadmin/images/themes/default/Columns.png new file mode 100644 index 0000000..f257577 Binary files /dev/null and b/php/pgadmin/images/themes/default/Columns.png differ diff --git a/php/pgadmin/images/themes/default/Constraints.png b/php/pgadmin/images/themes/default/Constraints.png new file mode 100644 index 0000000..76df5ed Binary files /dev/null and b/php/pgadmin/images/themes/default/Constraints.png differ diff --git a/php/pgadmin/images/themes/default/Conversion.png b/php/pgadmin/images/themes/default/Conversion.png new file mode 100644 index 0000000..bc6db85 Binary files /dev/null and b/php/pgadmin/images/themes/default/Conversion.png differ diff --git a/php/pgadmin/images/themes/default/Conversions.png b/php/pgadmin/images/themes/default/Conversions.png new file mode 100644 index 0000000..2e37247 Binary files /dev/null and b/php/pgadmin/images/themes/default/Conversions.png differ diff --git a/php/pgadmin/images/themes/default/Copy.png b/php/pgadmin/images/themes/default/Copy.png new file mode 100644 index 0000000..a137858 Binary files /dev/null and b/php/pgadmin/images/themes/default/Copy.png differ diff --git a/php/pgadmin/images/themes/default/CorruptedDatabase.png b/php/pgadmin/images/themes/default/CorruptedDatabase.png new file mode 100644 index 0000000..48dc1e0 Binary files /dev/null and b/php/pgadmin/images/themes/default/CorruptedDatabase.png differ diff --git a/php/pgadmin/images/themes/default/Cut.png b/php/pgadmin/images/themes/default/Cut.png new file mode 100644 index 0000000..8fdf565 Binary files /dev/null and b/php/pgadmin/images/themes/default/Cut.png differ diff --git a/php/pgadmin/images/themes/default/Database.png b/php/pgadmin/images/themes/default/Database.png new file mode 100644 index 0000000..e998bc5 Binary files /dev/null and b/php/pgadmin/images/themes/default/Database.png differ diff --git a/php/pgadmin/images/themes/default/Databases.png b/php/pgadmin/images/themes/default/Databases.png new file mode 100644 index 0000000..5cef88f Binary files /dev/null and b/php/pgadmin/images/themes/default/Databases.png differ diff --git a/php/pgadmin/images/themes/default/Definition.png b/php/pgadmin/images/themes/default/Definition.png new file mode 100644 index 0000000..77b21bc Binary files /dev/null and b/php/pgadmin/images/themes/default/Definition.png differ diff --git a/php/pgadmin/images/themes/default/Delete.png b/php/pgadmin/images/themes/default/Delete.png new file mode 100644 index 0000000..0aedd44 Binary files /dev/null and b/php/pgadmin/images/themes/default/Delete.png differ diff --git a/php/pgadmin/images/themes/default/DisabledJob.png b/php/pgadmin/images/themes/default/DisabledJob.png new file mode 100644 index 0000000..8bbad8c Binary files /dev/null and b/php/pgadmin/images/themes/default/DisabledJob.png differ diff --git a/php/pgadmin/images/themes/default/DisconnectedDatabase.png b/php/pgadmin/images/themes/default/DisconnectedDatabase.png new file mode 100644 index 0000000..b81a171 Binary files /dev/null and b/php/pgadmin/images/themes/default/DisconnectedDatabase.png differ diff --git a/php/pgadmin/images/themes/default/DisconnectedServer.png b/php/pgadmin/images/themes/default/DisconnectedServer.png new file mode 100644 index 0000000..6badaec Binary files /dev/null and b/php/pgadmin/images/themes/default/DisconnectedServer.png differ diff --git a/php/pgadmin/images/themes/default/Domain.png b/php/pgadmin/images/themes/default/Domain.png new file mode 100644 index 0000000..15ab7d7 Binary files /dev/null and b/php/pgadmin/images/themes/default/Domain.png differ diff --git a/php/pgadmin/images/themes/default/Domains.png b/php/pgadmin/images/themes/default/Domains.png new file mode 100644 index 0000000..6356e48 Binary files /dev/null and b/php/pgadmin/images/themes/default/Domains.png differ diff --git a/php/pgadmin/images/themes/default/EnableArgument.png b/php/pgadmin/images/themes/default/EnableArgument.png new file mode 100644 index 0000000..4ba0a0a Binary files /dev/null and b/php/pgadmin/images/themes/default/EnableArgument.png differ diff --git a/php/pgadmin/images/themes/default/Erase.png b/php/pgadmin/images/themes/default/Erase.png new file mode 100644 index 0000000..a9ad128 Binary files /dev/null and b/php/pgadmin/images/themes/default/Erase.png differ diff --git a/php/pgadmin/images/themes/default/Execute.png b/php/pgadmin/images/themes/default/Execute.png new file mode 100644 index 0000000..289805c Binary files /dev/null and b/php/pgadmin/images/themes/default/Execute.png differ diff --git a/php/pgadmin/images/themes/default/ExecuteSave.png b/php/pgadmin/images/themes/default/ExecuteSave.png new file mode 100644 index 0000000..ff2abb9 Binary files /dev/null and b/php/pgadmin/images/themes/default/ExecuteSave.png differ diff --git a/php/pgadmin/images/themes/default/Explain.png b/php/pgadmin/images/themes/default/Explain.png new file mode 100644 index 0000000..71421ef Binary files /dev/null and b/php/pgadmin/images/themes/default/Explain.png differ diff --git a/php/pgadmin/images/themes/default/Export.png b/php/pgadmin/images/themes/default/Export.png new file mode 100644 index 0000000..fb7a14b Binary files /dev/null and b/php/pgadmin/images/themes/default/Export.png differ diff --git a/php/pgadmin/images/themes/default/Favicon.ico b/php/pgadmin/images/themes/default/Favicon.ico new file mode 100644 index 0000000..6a188d5 Binary files /dev/null and b/php/pgadmin/images/themes/default/Favicon.ico differ diff --git a/php/pgadmin/images/themes/default/Filter.png b/php/pgadmin/images/themes/default/Filter.png new file mode 100644 index 0000000..4412a64 Binary files /dev/null and b/php/pgadmin/images/themes/default/Filter.png differ diff --git a/php/pgadmin/images/themes/default/ForeignKey.png b/php/pgadmin/images/themes/default/ForeignKey.png new file mode 100644 index 0000000..d4b99e8 Binary files /dev/null and b/php/pgadmin/images/themes/default/ForeignKey.png differ diff --git a/php/pgadmin/images/themes/default/Fts.png b/php/pgadmin/images/themes/default/Fts.png new file mode 100644 index 0000000..4bbc8a8 Binary files /dev/null and b/php/pgadmin/images/themes/default/Fts.png differ diff --git a/php/pgadmin/images/themes/default/FtsCfg.png b/php/pgadmin/images/themes/default/FtsCfg.png new file mode 100644 index 0000000..6d6df98 Binary files /dev/null and b/php/pgadmin/images/themes/default/FtsCfg.png differ diff --git a/php/pgadmin/images/themes/default/FtsDict.png b/php/pgadmin/images/themes/default/FtsDict.png new file mode 100644 index 0000000..7fb0fc7 Binary files /dev/null and b/php/pgadmin/images/themes/default/FtsDict.png differ diff --git a/php/pgadmin/images/themes/default/FtsParser.png b/php/pgadmin/images/themes/default/FtsParser.png new file mode 100644 index 0000000..be510ec Binary files /dev/null and b/php/pgadmin/images/themes/default/FtsParser.png differ diff --git a/php/pgadmin/images/themes/default/Function.png b/php/pgadmin/images/themes/default/Function.png new file mode 100644 index 0000000..a68e1fd Binary files /dev/null and b/php/pgadmin/images/themes/default/Function.png differ diff --git a/php/pgadmin/images/themes/default/Functions.png b/php/pgadmin/images/themes/default/Functions.png new file mode 100644 index 0000000..6ed5535 Binary files /dev/null and b/php/pgadmin/images/themes/default/Functions.png differ diff --git a/php/pgadmin/images/themes/default/GurusHint.png b/php/pgadmin/images/themes/default/GurusHint.png new file mode 100644 index 0000000..1ee60f1 Binary files /dev/null and b/php/pgadmin/images/themes/default/GurusHint.png differ diff --git a/php/pgadmin/images/themes/default/Help.png b/php/pgadmin/images/themes/default/Help.png new file mode 100644 index 0000000..916726c Binary files /dev/null and b/php/pgadmin/images/themes/default/Help.png differ diff --git a/php/pgadmin/images/themes/default/Histories.png b/php/pgadmin/images/themes/default/Histories.png new file mode 100644 index 0000000..1ca603a Binary files /dev/null and b/php/pgadmin/images/themes/default/Histories.png differ diff --git a/php/pgadmin/images/themes/default/History.png b/php/pgadmin/images/themes/default/History.png new file mode 100644 index 0000000..5d9a56c Binary files /dev/null and b/php/pgadmin/images/themes/default/History.png differ diff --git a/php/pgadmin/images/themes/default/I.png b/php/pgadmin/images/themes/default/I.png new file mode 100644 index 0000000..00fd334 Binary files /dev/null and b/php/pgadmin/images/themes/default/I.png differ diff --git a/php/pgadmin/images/themes/default/Import.png b/php/pgadmin/images/themes/default/Import.png new file mode 100644 index 0000000..fe49e63 Binary files /dev/null and b/php/pgadmin/images/themes/default/Import.png differ diff --git a/php/pgadmin/images/themes/default/Index.png b/php/pgadmin/images/themes/default/Index.png new file mode 100644 index 0000000..5a9b6a7 Binary files /dev/null and b/php/pgadmin/images/themes/default/Index.png differ diff --git a/php/pgadmin/images/themes/default/Indexes.png b/php/pgadmin/images/themes/default/Indexes.png new file mode 100644 index 0000000..92f6b33 Binary files /dev/null and b/php/pgadmin/images/themes/default/Indexes.png differ diff --git a/php/pgadmin/images/themes/default/Introduction.png b/php/pgadmin/images/themes/default/Introduction.png new file mode 100644 index 0000000..17fe937 Binary files /dev/null and b/php/pgadmin/images/themes/default/Introduction.png differ diff --git a/php/pgadmin/images/themes/default/Job.png b/php/pgadmin/images/themes/default/Job.png new file mode 100644 index 0000000..b416209 Binary files /dev/null and b/php/pgadmin/images/themes/default/Job.png differ diff --git a/php/pgadmin/images/themes/default/Jobs.png b/php/pgadmin/images/themes/default/Jobs.png new file mode 100644 index 0000000..b4dd827 Binary files /dev/null and b/php/pgadmin/images/themes/default/Jobs.png differ diff --git a/php/pgadmin/images/themes/default/Key.png b/php/pgadmin/images/themes/default/Key.png new file mode 100644 index 0000000..a4b5adc Binary files /dev/null and b/php/pgadmin/images/themes/default/Key.png differ diff --git a/php/pgadmin/images/themes/default/L.png b/php/pgadmin/images/themes/default/L.png new file mode 100644 index 0000000..b67c837 Binary files /dev/null and b/php/pgadmin/images/themes/default/L.png differ diff --git a/php/pgadmin/images/themes/default/Language.png b/php/pgadmin/images/themes/default/Language.png new file mode 100644 index 0000000..88f72ae Binary files /dev/null and b/php/pgadmin/images/themes/default/Language.png differ diff --git a/php/pgadmin/images/themes/default/Languages.png b/php/pgadmin/images/themes/default/Languages.png new file mode 100644 index 0000000..54c6bd7 Binary files /dev/null and b/php/pgadmin/images/themes/default/Languages.png differ diff --git a/php/pgadmin/images/themes/default/Listen.png b/php/pgadmin/images/themes/default/Listen.png new file mode 100644 index 0000000..5cf37a4 Binary files /dev/null and b/php/pgadmin/images/themes/default/Listen.png differ diff --git a/php/pgadmin/images/themes/default/Listens.png b/php/pgadmin/images/themes/default/Listens.png new file mode 100644 index 0000000..53f4122 Binary files /dev/null and b/php/pgadmin/images/themes/default/Listens.png differ diff --git a/php/pgadmin/images/themes/default/Lminus.png b/php/pgadmin/images/themes/default/Lminus.png new file mode 100644 index 0000000..8787956 Binary files /dev/null and b/php/pgadmin/images/themes/default/Lminus.png differ diff --git a/php/pgadmin/images/themes/default/Loading.gif b/php/pgadmin/images/themes/default/Loading.gif new file mode 100644 index 0000000..874e0db Binary files /dev/null and b/php/pgadmin/images/themes/default/Loading.gif differ diff --git a/php/pgadmin/images/themes/default/LowerArgument.png b/php/pgadmin/images/themes/default/LowerArgument.png new file mode 100644 index 0000000..9334e90 Binary files /dev/null and b/php/pgadmin/images/themes/default/LowerArgument.png differ diff --git a/php/pgadmin/images/themes/default/Lplus.png b/php/pgadmin/images/themes/default/Lplus.png new file mode 100644 index 0000000..4d5cd78 Binary files /dev/null and b/php/pgadmin/images/themes/default/Lplus.png differ diff --git a/php/pgadmin/images/themes/default/Node.png b/php/pgadmin/images/themes/default/Node.png new file mode 100644 index 0000000..c68cd44 Binary files /dev/null and b/php/pgadmin/images/themes/default/Node.png differ diff --git a/php/pgadmin/images/themes/default/Nodes.png b/php/pgadmin/images/themes/default/Nodes.png new file mode 100644 index 0000000..95bd6d6 Binary files /dev/null and b/php/pgadmin/images/themes/default/Nodes.png differ diff --git a/php/pgadmin/images/themes/default/ObjectNotFound.png b/php/pgadmin/images/themes/default/ObjectNotFound.png new file mode 100644 index 0000000..648b0fe Binary files /dev/null and b/php/pgadmin/images/themes/default/ObjectNotFound.png differ diff --git a/php/pgadmin/images/themes/default/OfferedReplicationSet.png b/php/pgadmin/images/themes/default/OfferedReplicationSet.png new file mode 100644 index 0000000..39076e7 Binary files /dev/null and b/php/pgadmin/images/themes/default/OfferedReplicationSet.png differ diff --git a/php/pgadmin/images/themes/default/OfferedSubscription.png b/php/pgadmin/images/themes/default/OfferedSubscription.png new file mode 100644 index 0000000..8cfca1d Binary files /dev/null and b/php/pgadmin/images/themes/default/OfferedSubscription.png differ diff --git a/php/pgadmin/images/themes/default/Open.png b/php/pgadmin/images/themes/default/Open.png new file mode 100644 index 0000000..f22d163 Binary files /dev/null and b/php/pgadmin/images/themes/default/Open.png differ diff --git a/php/pgadmin/images/themes/default/Operator.png b/php/pgadmin/images/themes/default/Operator.png new file mode 100644 index 0000000..b67679a Binary files /dev/null and b/php/pgadmin/images/themes/default/Operator.png differ diff --git a/php/pgadmin/images/themes/default/OperatorClass.png b/php/pgadmin/images/themes/default/OperatorClass.png new file mode 100644 index 0000000..7af9217 Binary files /dev/null and b/php/pgadmin/images/themes/default/OperatorClass.png differ diff --git a/php/pgadmin/images/themes/default/OperatorClasses.png b/php/pgadmin/images/themes/default/OperatorClasses.png new file mode 100644 index 0000000..489a577 Binary files /dev/null and b/php/pgadmin/images/themes/default/OperatorClasses.png differ diff --git a/php/pgadmin/images/themes/default/Operators.png b/php/pgadmin/images/themes/default/Operators.png new file mode 100644 index 0000000..c2d7075 Binary files /dev/null and b/php/pgadmin/images/themes/default/Operators.png differ diff --git a/php/pgadmin/images/themes/default/Paste.png b/php/pgadmin/images/themes/default/Paste.png new file mode 100644 index 0000000..d82c733 Binary files /dev/null and b/php/pgadmin/images/themes/default/Paste.png differ diff --git a/php/pgadmin/images/themes/default/Path.png b/php/pgadmin/images/themes/default/Path.png new file mode 100644 index 0000000..2eab716 Binary files /dev/null and b/php/pgadmin/images/themes/default/Path.png differ diff --git a/php/pgadmin/images/themes/default/Paths.png b/php/pgadmin/images/themes/default/Paths.png new file mode 100644 index 0000000..e61415b Binary files /dev/null and b/php/pgadmin/images/themes/default/Paths.png differ diff --git a/php/pgadmin/images/themes/default/PrimaryKey.png b/php/pgadmin/images/themes/default/PrimaryKey.png new file mode 100644 index 0000000..ed31775 Binary files /dev/null and b/php/pgadmin/images/themes/default/PrimaryKey.png differ diff --git a/php/pgadmin/images/themes/default/Privileges.png b/php/pgadmin/images/themes/default/Privileges.png new file mode 100644 index 0000000..ce800d5 Binary files /dev/null and b/php/pgadmin/images/themes/default/Privileges.png differ diff --git a/php/pgadmin/images/themes/default/Processes.png b/php/pgadmin/images/themes/default/Processes.png new file mode 100644 index 0000000..ca2bbe0 Binary files /dev/null and b/php/pgadmin/images/themes/default/Processes.png differ diff --git a/php/pgadmin/images/themes/default/Property.png b/php/pgadmin/images/themes/default/Property.png new file mode 100644 index 0000000..e616bcb Binary files /dev/null and b/php/pgadmin/images/themes/default/Property.png differ diff --git a/php/pgadmin/images/themes/default/RaiseArgument.png b/php/pgadmin/images/themes/default/RaiseArgument.png new file mode 100644 index 0000000..b0ea0e1 Binary files /dev/null and b/php/pgadmin/images/themes/default/RaiseArgument.png differ diff --git a/php/pgadmin/images/themes/default/Record.png b/php/pgadmin/images/themes/default/Record.png new file mode 100644 index 0000000..d83812f Binary files /dev/null and b/php/pgadmin/images/themes/default/Record.png differ diff --git a/php/pgadmin/images/themes/default/Records.png b/php/pgadmin/images/themes/default/Records.png new file mode 100644 index 0000000..ccdae66 Binary files /dev/null and b/php/pgadmin/images/themes/default/Records.png differ diff --git a/php/pgadmin/images/themes/default/Redo.png b/php/pgadmin/images/themes/default/Redo.png new file mode 100644 index 0000000..ed5a0af Binary files /dev/null and b/php/pgadmin/images/themes/default/Redo.png differ diff --git a/php/pgadmin/images/themes/default/Refresh.png b/php/pgadmin/images/themes/default/Refresh.png new file mode 100644 index 0000000..74852bd Binary files /dev/null and b/php/pgadmin/images/themes/default/Refresh.png differ diff --git a/php/pgadmin/images/themes/default/RemoveArgument.png b/php/pgadmin/images/themes/default/RemoveArgument.png new file mode 100644 index 0000000..1e6d8aa Binary files /dev/null and b/php/pgadmin/images/themes/default/RemoveArgument.png differ diff --git a/php/pgadmin/images/themes/default/Replication.png b/php/pgadmin/images/themes/default/Replication.png new file mode 100644 index 0000000..af3f68e Binary files /dev/null and b/php/pgadmin/images/themes/default/Replication.png differ diff --git a/php/pgadmin/images/themes/default/ReplicationSets.png b/php/pgadmin/images/themes/default/ReplicationSets.png new file mode 100644 index 0000000..89ef45a Binary files /dev/null and b/php/pgadmin/images/themes/default/ReplicationSets.png differ diff --git a/php/pgadmin/images/themes/default/Report.png b/php/pgadmin/images/themes/default/Report.png new file mode 100644 index 0000000..f9158b9 Binary files /dev/null and b/php/pgadmin/images/themes/default/Report.png differ diff --git a/php/pgadmin/images/themes/default/Reports.png b/php/pgadmin/images/themes/default/Reports.png new file mode 100644 index 0000000..4a403e0 Binary files /dev/null and b/php/pgadmin/images/themes/default/Reports.png differ diff --git a/php/pgadmin/images/themes/default/Restore.png b/php/pgadmin/images/themes/default/Restore.png new file mode 100644 index 0000000..d14c403 Binary files /dev/null and b/php/pgadmin/images/themes/default/Restore.png differ diff --git a/php/pgadmin/images/themes/default/Roles.png b/php/pgadmin/images/themes/default/Roles.png new file mode 100644 index 0000000..aad2728 Binary files /dev/null and b/php/pgadmin/images/themes/default/Roles.png differ diff --git a/php/pgadmin/images/themes/default/Rule.png b/php/pgadmin/images/themes/default/Rule.png new file mode 100644 index 0000000..a1ddf6b Binary files /dev/null and b/php/pgadmin/images/themes/default/Rule.png differ diff --git a/php/pgadmin/images/themes/default/Rules.png b/php/pgadmin/images/themes/default/Rules.png new file mode 100644 index 0000000..dc9aa0d Binary files /dev/null and b/php/pgadmin/images/themes/default/Rules.png differ diff --git a/php/pgadmin/images/themes/default/Save.png b/php/pgadmin/images/themes/default/Save.png new file mode 100644 index 0000000..6e8694e Binary files /dev/null and b/php/pgadmin/images/themes/default/Save.png differ diff --git a/php/pgadmin/images/themes/default/Schedule.png b/php/pgadmin/images/themes/default/Schedule.png new file mode 100644 index 0000000..9273471 Binary files /dev/null and b/php/pgadmin/images/themes/default/Schedule.png differ diff --git a/php/pgadmin/images/themes/default/Schedules.png b/php/pgadmin/images/themes/default/Schedules.png new file mode 100644 index 0000000..2c37e7a Binary files /dev/null and b/php/pgadmin/images/themes/default/Schedules.png differ diff --git a/php/pgadmin/images/themes/default/Schema.png b/php/pgadmin/images/themes/default/Schema.png new file mode 100644 index 0000000..e592562 Binary files /dev/null and b/php/pgadmin/images/themes/default/Schema.png differ diff --git a/php/pgadmin/images/themes/default/Schemas.png b/php/pgadmin/images/themes/default/Schemas.png new file mode 100644 index 0000000..0f2276a Binary files /dev/null and b/php/pgadmin/images/themes/default/Schemas.png differ diff --git a/php/pgadmin/images/themes/default/Search.png b/php/pgadmin/images/themes/default/Search.png new file mode 100644 index 0000000..1d3052f Binary files /dev/null and b/php/pgadmin/images/themes/default/Search.png differ diff --git a/php/pgadmin/images/themes/default/Sequence.png b/php/pgadmin/images/themes/default/Sequence.png new file mode 100644 index 0000000..9475ff4 Binary files /dev/null and b/php/pgadmin/images/themes/default/Sequence.png differ diff --git a/php/pgadmin/images/themes/default/Sequences.png b/php/pgadmin/images/themes/default/Sequences.png new file mode 100644 index 0000000..14109c5 Binary files /dev/null and b/php/pgadmin/images/themes/default/Sequences.png differ diff --git a/php/pgadmin/images/themes/default/Server.png b/php/pgadmin/images/themes/default/Server.png new file mode 100644 index 0000000..3478028 Binary files /dev/null and b/php/pgadmin/images/themes/default/Server.png differ diff --git a/php/pgadmin/images/themes/default/Servers.png b/php/pgadmin/images/themes/default/Servers.png new file mode 100644 index 0000000..dd457a5 Binary files /dev/null and b/php/pgadmin/images/themes/default/Servers.png differ diff --git a/php/pgadmin/images/themes/default/SqlEditor.png b/php/pgadmin/images/themes/default/SqlEditor.png new file mode 100644 index 0000000..5135599 Binary files /dev/null and b/php/pgadmin/images/themes/default/SqlEditor.png differ diff --git a/php/pgadmin/images/themes/default/Statistics.png b/php/pgadmin/images/themes/default/Statistics.png new file mode 100644 index 0000000..c3d6b7b Binary files /dev/null and b/php/pgadmin/images/themes/default/Statistics.png differ diff --git a/php/pgadmin/images/themes/default/Step.png b/php/pgadmin/images/themes/default/Step.png new file mode 100644 index 0000000..897dc13 Binary files /dev/null and b/php/pgadmin/images/themes/default/Step.png differ diff --git a/php/pgadmin/images/themes/default/Steps.png b/php/pgadmin/images/themes/default/Steps.png new file mode 100644 index 0000000..b923faf Binary files /dev/null and b/php/pgadmin/images/themes/default/Steps.png differ diff --git a/php/pgadmin/images/themes/default/Stop.png b/php/pgadmin/images/themes/default/Stop.png new file mode 100644 index 0000000..67d870b Binary files /dev/null and b/php/pgadmin/images/themes/default/Stop.png differ diff --git a/php/pgadmin/images/themes/default/Subscriptions.png b/php/pgadmin/images/themes/default/Subscriptions.png new file mode 100644 index 0000000..63384cb Binary files /dev/null and b/php/pgadmin/images/themes/default/Subscriptions.png differ diff --git a/php/pgadmin/images/themes/default/T.png b/php/pgadmin/images/themes/default/T.png new file mode 100644 index 0000000..d555ac7 Binary files /dev/null and b/php/pgadmin/images/themes/default/T.png differ diff --git a/php/pgadmin/images/themes/default/Table.png b/php/pgadmin/images/themes/default/Table.png new file mode 100644 index 0000000..0f2b630 Binary files /dev/null and b/php/pgadmin/images/themes/default/Table.png differ diff --git a/php/pgadmin/images/themes/default/Tables.png b/php/pgadmin/images/themes/default/Tables.png new file mode 100644 index 0000000..e5d0d82 Binary files /dev/null and b/php/pgadmin/images/themes/default/Tables.png differ diff --git a/php/pgadmin/images/themes/default/Tablespace.png b/php/pgadmin/images/themes/default/Tablespace.png new file mode 100644 index 0000000..84489b1 Binary files /dev/null and b/php/pgadmin/images/themes/default/Tablespace.png differ diff --git a/php/pgadmin/images/themes/default/Tablespaces.png b/php/pgadmin/images/themes/default/Tablespaces.png new file mode 100644 index 0000000..57bd8dc Binary files /dev/null and b/php/pgadmin/images/themes/default/Tablespaces.png differ diff --git a/php/pgadmin/images/themes/default/Tminus.png b/php/pgadmin/images/themes/default/Tminus.png new file mode 100644 index 0000000..86ed3a6 Binary files /dev/null and b/php/pgadmin/images/themes/default/Tminus.png differ diff --git a/php/pgadmin/images/themes/default/Tplus.png b/php/pgadmin/images/themes/default/Tplus.png new file mode 100644 index 0000000..552d7a0 Binary files /dev/null and b/php/pgadmin/images/themes/default/Tplus.png differ diff --git a/php/pgadmin/images/themes/default/Trigger.png b/php/pgadmin/images/themes/default/Trigger.png new file mode 100644 index 0000000..a0c781d Binary files /dev/null and b/php/pgadmin/images/themes/default/Trigger.png differ diff --git a/php/pgadmin/images/themes/default/TriggerFunction.png b/php/pgadmin/images/themes/default/TriggerFunction.png new file mode 100644 index 0000000..33b3336 Binary files /dev/null and b/php/pgadmin/images/themes/default/TriggerFunction.png differ diff --git a/php/pgadmin/images/themes/default/TriggerFunctions.png b/php/pgadmin/images/themes/default/TriggerFunctions.png new file mode 100644 index 0000000..e35f5d5 Binary files /dev/null and b/php/pgadmin/images/themes/default/TriggerFunctions.png differ diff --git a/php/pgadmin/images/themes/default/Triggers.png b/php/pgadmin/images/themes/default/Triggers.png new file mode 100644 index 0000000..4989f11 Binary files /dev/null and b/php/pgadmin/images/themes/default/Triggers.png differ diff --git a/php/pgadmin/images/themes/default/Type.png b/php/pgadmin/images/themes/default/Type.png new file mode 100644 index 0000000..9c8f538 Binary files /dev/null and b/php/pgadmin/images/themes/default/Type.png differ diff --git a/php/pgadmin/images/themes/default/Types.png b/php/pgadmin/images/themes/default/Types.png new file mode 100644 index 0000000..dab7294 Binary files /dev/null and b/php/pgadmin/images/themes/default/Types.png differ diff --git a/php/pgadmin/images/themes/default/Undo.png b/php/pgadmin/images/themes/default/Undo.png new file mode 100644 index 0000000..8c8df1a Binary files /dev/null and b/php/pgadmin/images/themes/default/Undo.png differ diff --git a/php/pgadmin/images/themes/default/UniqueConstraint.png b/php/pgadmin/images/themes/default/UniqueConstraint.png new file mode 100644 index 0000000..a699c35 Binary files /dev/null and b/php/pgadmin/images/themes/default/UniqueConstraint.png differ diff --git a/php/pgadmin/images/themes/default/User.png b/php/pgadmin/images/themes/default/User.png new file mode 100644 index 0000000..00bf4a9 Binary files /dev/null and b/php/pgadmin/images/themes/default/User.png differ diff --git a/php/pgadmin/images/themes/default/UserGroup.png b/php/pgadmin/images/themes/default/UserGroup.png new file mode 100644 index 0000000..8f0e8d9 Binary files /dev/null and b/php/pgadmin/images/themes/default/UserGroup.png differ diff --git a/php/pgadmin/images/themes/default/UserGroups.png b/php/pgadmin/images/themes/default/UserGroups.png new file mode 100644 index 0000000..2e91dfc Binary files /dev/null and b/php/pgadmin/images/themes/default/UserGroups.png differ diff --git a/php/pgadmin/images/themes/default/Users.png b/php/pgadmin/images/themes/default/Users.png new file mode 100644 index 0000000..d03e9ee Binary files /dev/null and b/php/pgadmin/images/themes/default/Users.png differ diff --git a/php/pgadmin/images/themes/default/Variables.png b/php/pgadmin/images/themes/default/Variables.png new file mode 100644 index 0000000..d24bc14 Binary files /dev/null and b/php/pgadmin/images/themes/default/Variables.png differ diff --git a/php/pgadmin/images/themes/default/View.png b/php/pgadmin/images/themes/default/View.png new file mode 100644 index 0000000..103fd51 Binary files /dev/null and b/php/pgadmin/images/themes/default/View.png differ diff --git a/php/pgadmin/images/themes/default/Views.png b/php/pgadmin/images/themes/default/Views.png new file mode 100644 index 0000000..a7232d7 Binary files /dev/null and b/php/pgadmin/images/themes/default/Views.png differ diff --git a/php/pgadmin/images/themes/default/blank.png b/php/pgadmin/images/themes/default/blank.png new file mode 100644 index 0000000..dae1f43 Binary files /dev/null and b/php/pgadmin/images/themes/default/blank.png differ diff --git a/php/pgadmin/images/themes/default/title.png b/php/pgadmin/images/themes/default/title.png new file mode 100644 index 0000000..10015d6 Binary files /dev/null and b/php/pgadmin/images/themes/default/title.png differ diff --git a/php/pgadmin/index.php b/php/pgadmin/index.php new file mode 100644 index 0000000..9fe0c86 --- /dev/null +++ b/php/pgadmin/index.php @@ -0,0 +1,38 @@ +printHeader('', null, true); + + $rtl = (strcasecmp($lang['applangdir'], 'rtl') == 0); + + $cols = $rtl ? '*,'.$conf['left_width'] : $conf['left_width'].',*'; + $mainframe = '' +?> + + + + + + + + + + <body> + <?php echo $lang['strnoframes'] ?><br /> + <a href="intro.php"><?php echo $lang['strnoframeslink'] ?></a> + </body> + + + + +printFooter(false); +?> diff --git a/php/pgadmin/indexes.js b/php/pgadmin/indexes.js new file mode 100644 index 0000000..27160f2 --- /dev/null +++ b/php/pgadmin/indexes.js @@ -0,0 +1,70 @@ + // Globals + // + + + /* + * Multiple Selection lists in HTML Document + */ + var tableColumnList; + var indexColumnList; + + /* + * Two Array vars + */ + + var indexColumns, tableColumns; + + + function buttonPressed(object) { + + if (object.name == "add") { + from = tableColumnList; + to = indexColumnList; + } + else { + to = tableColumnList; + from = indexColumnList; + } + + var selectedOptions = getSelectedOptions(from); + + for (i = 0; i < selectedOptions.length; i++) { + option = new Option(selectedOptions[i].text); + addToArray(to, option); + removeFromArray(from, selectedOptions[i].index); + } + } + + function doSelectAll() { + for(var x = 0; x < indexColumnList.options.length; x++){ + indexColumnList.options[x].selected = true; + } + } + + function init() { + tableColumnList = document.formIndex.TableColumnList; + indexColumnList = document.getElementById("IndexColumnList"); + indexColumns = indexColumnList.options; + tableColumns = tableColumnList.options; + } + + + function getSelectedOptions(obj) { + var selectedOptions = new Array(); + + for (i = 0; i < obj.options.length; i++) { + if (obj.options[i].selected) { + selectedOptions.push(obj.options[i]); + } + } + + return selectedOptions; + } + + function removeFromArray(obj, index) { + obj.remove(index); + } + + function addToArray(obj, item) { + obj.options[obj.options.length] = item; + } \ No newline at end of file diff --git a/php/pgadmin/indexes.php b/php/pgadmin/indexes.php new file mode 100644 index 0000000..23682a2 --- /dev/null +++ b/php/pgadmin/indexes.php @@ -0,0 +1,383 @@ +printTrail('index'); + $misc->printTitle($lang['strclusterindex'],'pg.index.cluster'); + + echo "

", sprintf($lang['strconfcluster'], $misc->printVal($_REQUEST['index'])), "

\n"; + + echo "
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $data->clusterIndex($_POST['table'], $_POST['index']); + if ($status == 0) + if (isset($_POST['analyze'])){ + $status = $data->analyzeDB($_POST['table']); + if ($status == 0) + doDefault($lang['strclusteredgood'] . ' ' . $lang['stranalyzegood']); + else + doDefault($lang['stranalyzebad']); + } else + doDefault($lang['strclusteredgood']); + else + doDefault($lang['strclusteredbad']); + } + + } + + function doReindex() { + global $data, $lang; + + $status = $data->reindex('INDEX', $_REQUEST['index']); + if ($status == 0) + doDefault($lang['strreindexgood']); + else + doDefault($lang['strreindexbad']); + } + + /** + * Displays a screen where they can enter a new index + */ + function doCreateIndex($msg = '') { + global $data, $misc; + global $lang; + + if (!isset($_POST['formIndexName'])) $_POST['formIndexName'] = ''; + if (!isset($_POST['formIndexType'])) $_POST['formIndexType'] = null; + if (!isset($_POST['formCols'])) $_POST['formCols'] = ''; + if (!isset($_POST['formWhere'])) $_POST['formWhere'] = ''; + if (!isset($_POST['formSpc'])) $_POST['formSpc'] = ''; + + $attrs = $data->getTableAttributes($_REQUEST['table']); + // Fetch all tablespaces from the database + if ($data->hasTablespaces()) $tablespaces = $data->getTablespaces(); + + $misc->printTrail('table'); + $misc->printTitle($lang['strcreateindex'],'pg.index.create'); + $misc->printMsg($msg); + + $selColumns = new XHTML_select("TableColumnList",true,10); + $selColumns->set_style("width: 10em;"); + + if ($attrs->recordCount() > 0) { + while (!$attrs->EOF) { + $selColumns->add(new XHTML_Option($attrs->fields['attname'])); + $attrs->moveNext(); + } + } + + $selIndex = new XHTML_select("IndexColumnList[]", true, 10); + $selIndex->set_style("width: 10em;"); + $selIndex->set_attribute("id", "IndexColumnList"); + $buttonAdd = new XHTML_Button("add", ">>"); + $buttonAdd->set_attribute("onclick", "buttonPressed(this);"); + $buttonAdd->set_attribute("type", "button"); + + $buttonRemove = new XHTML_Button("remove", "<<"); + $buttonRemove->set_attribute("onclick", "buttonPressed(this);"); + $buttonRemove->set_attribute("type", "button"); + + echo "
\n"; + + + echo "\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo ""; + echo "\n"; + echo "
{$lang['strindexname']}
_maxNameLen}\" value=\"", + htmlspecialchars($_POST['formIndexName']), "\" />
{$lang['strtablecolumnlist']} {$lang['strindexcolumnlist']}
" . $selColumns->fetch() . "" . $buttonRemove->fetch() . $buttonAdd->fetch() . "" . $selIndex->fetch() . "
\n"; + + echo " \n"; + echo ""; + echo ""; + echo "\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + + // Tablespace (if there are any) + if ($data->hasTablespaces() && $tablespaces->recordCount() > 0) { + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + } + + if ($data->hasConcurrentIndexBuild()) { + echo ""; + echo ""; + echo ""; + echo ""; + } + + echo "
{$lang['strindextype']}
{$lang['strwhere']}(_maxNameLen}\" value=\"", + htmlspecialchars($_POST['formWhere']), "\" />)
{$lang['strtablespace']}\n\t\t\t\n\t\t
"; + + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + + /** + * Actually creates the new index in the database + * @@ Note: this function can't handle columns with commas in them + */ + function doSaveCreateIndex() { + global $data; + global $lang; + + // Handle databases that don't have partial indexes + if (!isset($_POST['formWhere'])) $_POST['formWhere'] = ''; + // Default tablespace to null if it isn't set + if (!isset($_POST['formSpc'])) $_POST['formSpc'] = null; + + // Check that they've given a name and at least one column + if ($_POST['formIndexName'] == '') doCreateIndex($lang['strindexneedsname']); + elseif (!isset($_POST['IndexColumnList']) || $_POST['IndexColumnList'] == '') doCreateIndex($lang['strindexneedscols']); + else { + $status = $data->createIndex($_POST['formIndexName'], $_POST['table'], $_POST['IndexColumnList'], + $_POST['formIndexType'], isset($_POST['formUnique']), $_POST['formWhere'], $_POST['formSpc'], + isset($_POST['formConcur'])); + if ($status == 0) + doDefault($lang['strindexcreated']); + else + doCreateIndex($lang['strindexcreatedbad']); + } + } + + /** + * Show confirmation of drop index and perform actual drop + */ + function doDropIndex($confirm) { + global $data, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('index'); + $misc->printTitle($lang['strdrop'],'pg.index.drop'); + + echo "

", sprintf($lang['strconfdropindex'], $misc->printVal($_REQUEST['index'])), "

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $data->dropIndex($_POST['index'], isset($_POST['cascade'])); + if ($status == 0) + doDefault($lang['strindexdropped']); + else + doDefault($lang['strindexdroppedbad']); + } + + } + + function doDefault($msg = '') { + global $data, $misc; + global $lang; + + function indPre(&$rowdata, $actions) { + global $data, $lang; + + if ($data->phpBool($rowdata->fields['indisprimary'])) { + $rowdata->fields['+constraints'] = $lang['strprimarykey']; + $actions['drop']['disable'] = true; + } + elseif ($data->phpBool($rowdata->fields['indisunique'])) { + $rowdata->fields['+constraints'] = $lang['struniquekey']; + $actions['drop']['disable'] = true; + } + else + $rowdata->fields['+constraints'] = ''; + + return $actions; + } + + $misc->printTrail('table'); + $misc->printTabs('table','indexes'); + $misc->printMsg($msg); + + $indexes = $data->getIndexes($_REQUEST['table']); + + $columns = array( + 'index' => array( + 'title' => $lang['strname'], + 'field' => field('indname'), + ), + 'definition' => array( + 'title' => $lang['strdefinition'], + 'field' => field('inddef'), + ), + 'constraints' => array( + 'title' => $lang['strconstraints'], + 'field' => field('+constraints'), + 'type' => 'verbatim', + 'params'=> array('align' => 'center'), + ), + 'clustered' => array( + 'title' => $lang['strclustered'], + 'field' => field('indisclustered'), + 'type' => 'yesno', + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('idxcomment'), + ), + ); + + $actions = array( + 'cluster' => array( + 'title' => $lang['strclusterindex'], + 'url' => "indexes.php?action=confirm_cluster_index&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", + 'vars' => array('index' => 'indname'), + ), + 'reindex' => array( + 'title' => $lang['strreindex'], + 'url' => "indexes.php?action=reindex&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", + 'vars' => array('index' => 'indname'), + ), + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "indexes.php?action=confirm_drop_index&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", + 'vars' => array('index' => 'indname'), + ), + ); + + $misc->printTable($indexes, $columns, $actions, $lang['strnoindexes'], 'indPre'); + + echo "

href}&table=", + urlencode($_REQUEST['table']), "\">{$lang['strcreateindex']}

\n"; + } + + function doTree() { + global $misc, $data; + + $indexes = $data->getIndexes($_REQUEST['table']); + + $reqvars = $misc->getRequestVars('table'); + + function getIcon($f) { + if ($f['indisprimary'] == 't') + return 'PrimaryKey'; + if ($f['indisunique'] == 't') + return 'UniqueConstraint'; + return 'Index'; + } + + $attrs = array( + 'text' => field('indname'), + 'icon' => callback('getIcon'), + ); + + $misc->printTreeXML($indexes, $attrs); + exit; + } + + if ($action == 'tree') doTree(); + + $misc->printHeader($lang['strindexes'], ""); + + if ($action == 'create_index' || $action == 'save_create_index') + echo ""; + else + $misc->printBody(); + + switch ($action) { + case 'cluster_index': + if (isset($_POST['cluster'])) doClusterIndex(false); + else doDefault(); + break; + case 'confirm_cluster_index': + doClusterIndex(true); + break; + case 'reindex': + doReindex(); + break; + case 'save_create_index': + if (isset($_POST['cancel'])) doDefault(); + else doSaveCreateIndex(); + break; + case 'create_index': + doCreateIndex(); + break; + case 'drop_index': + if (isset($_POST['drop'])) doDropIndex(false); + else doDefault(); + break; + case 'confirm_drop_index': + doDropIndex(true); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/info.php b/php/pgadmin/info.php new file mode 100644 index 0000000..11b5bf1 --- /dev/null +++ b/php/pgadmin/info.php @@ -0,0 +1,306 @@ +printTrail('table'); + $misc->printTabs('table','info'); + $misc->printMsg($msg); + + // common params for printVal + $shownull = array('null' => true); + + // Fetch info + $referrers = $data->getReferrers($_REQUEST['table']); + $parents = $data->getTableParents($_REQUEST['table']); + $children = $data->getTableChildren($_REQUEST['table']); + $tablestatstups = $data->getStatsTableTuples($_REQUEST['table']); + $tablestatsio = $data->getStatsTableIO($_REQUEST['table']); + $indexstatstups = $data->getStatsIndexTuples($_REQUEST['table']); + $indexstatsio = $data->getStatsIndexIO($_REQUEST['table']); + + // Check that there is some info + if (($referrers === -99 || ($referrers !== -99 && $referrers->recordCount() == 0)) + && $parents->recordCount() == 0 && $children->recordCount() == 0 + && ($tablestatstups->recordCount() == 0 && $tablestatsio->recordCount() == 0 + && $indexstatstups->recordCount() == 0 && $indexstatsio->recordCount() == 0)) { + $misc->printMsg($lang['strnoinfo']); + } + else { + // Referring foreign tables + if ($referrers !== -99 && $referrers->recordCount() > 0) { + echo "

{$lang['strreferringtables']}

\n"; + echo "\n"; + echo "\t\n\t\t"; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\t\n"; + $i = 0; + + while (!$referrers->EOF) { + $id = ( ($i % 2 ) == 0 ? '1' : '2' ); + echo "\t\n\t\t"; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\t\n"; + $referrers->movenext(); + $i++; + } + + echo "
{$lang['strschema']}{$lang['strtable']}{$lang['strname']}{$lang['strdefinition']}{$lang['stractions']}
", $misc->printVal($referrers->fields['nspname']), "", $misc->printVal($referrers->fields['relname']), "", $misc->printVal($referrers->fields['conname']), "", $misc->printVal($referrers->fields['consrc']), "href}", + "&schema=", urlencode($referrers->fields['nspname']), + "&table=", urlencode($referrers->fields['relname']), "\">{$lang['strproperties']}
\n"; + } + + // Parent tables + if ($parents->recordCount() > 0) { + echo "

{$lang['strparenttables']}

\n"; + echo "\n"; + echo "\t\n\t\t"; + echo ""; + echo "\t\t"; + echo "\n"; + echo "\t\n"; + $i = 0; + + while (!$parents->EOF) { + $id = ( ($i % 2 ) == 0 ? '1' : '2' ); + echo "\t\n"; + echo "\t\t"; + echo ""; + echo "\n"; + echo "\t\n"; + $parents->movenext(); + $i++; + } + + echo "
{$lang['strschema']}{$lang['strtable']}{$lang['stractions']}
", $misc->printVal($parents->fields['nspname']), "", $misc->printVal($parents->fields['relname']), "href}", + "&schema=", urlencode($parents->fields['nspname']), + "&table=", urlencode($parents->fields['relname']), "\">{$lang['strproperties']}
\n"; + } + + // Child tables + if ($children->recordCount() > 0) { + echo "

{$lang['strchildtables']}

\n"; + echo "\n"; + echo "\t\n"; + echo ""; + echo "\t\t"; + echo "\n"; + echo "\t\n"; + $i = 0; + + while (!$children->EOF) { + $id = ( ($i % 2 ) == 0 ? '1' : '2' ); + echo "\t\n"; + echo "\t\t"; + echo ""; + echo "\n"; + echo "\t\n"; + $children->movenext(); + $i++; + } + + echo "
{$lang['strschema']}{$lang['strtable']}{$lang['stractions']}
", $misc->printVal($children->fields['nspname']), "", $misc->printVal($children->fields['relname']), "href}", + "&schema=", urlencode($children->fields['nspname']), + "&table=", urlencode($children->fields['relname']), "\">{$lang['strproperties']}
\n"; + } + + // Row performance + if ($tablestatstups->recordCount() > 0) { + echo "

{$lang['strrowperf']}

\n"; + + echo "\n"; + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + $i = 0; + + while (!$tablestatstups->EOF) { + $id = ( ($i % 2 ) == 0 ? '1' : '2' ); + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + $tablestatstups->movenext(); + $i++; + } + + echo "
{$lang['strsequential']}{$lang['strindex']}{$lang['strrows2']}
{$lang['strscan']}{$lang['strread']}{$lang['strscan']}{$lang['strfetch']}{$lang['strinsert']}{$lang['strupdate']}{$lang['strdelete']}
", $misc->printVal($tablestatstups->fields['seq_scan'], 'int4', $shownull), "", $misc->printVal($tablestatstups->fields['seq_tup_read'], 'int4', $shownull), "", $misc->printVal($tablestatstups->fields['idx_scan'], 'int4', $shownull), "", $misc->printVal($tablestatstups->fields['idx_tup_fetch'], 'int4', $shownull), "", $misc->printVal($tablestatstups->fields['n_tup_ins'], 'int4', $shownull), "", $misc->printVal($tablestatstups->fields['n_tup_upd'], 'int4', $shownull), "", $misc->printVal($tablestatstups->fields['n_tup_del'], 'int4', $shownull), "
\n"; + } + + // I/O performance + if ($tablestatsio->recordCount() > 0) { + echo "

{$lang['strioperf']}

\n"; + + echo "\n"; + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + $i = 0; + + while (!$tablestatsio->EOF) { + $id = ( ($i % 2 ) == 0 ? '1' : '2' ); + echo "\t\n"; + + $total = $tablestatsio->fields['heap_blks_hit'] + $tablestatsio->fields['heap_blks_read']; + if ($total > 0) $percentage = round(($tablestatsio->fields['heap_blks_hit'] / $total) * 100); + else $percentage = 0; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + + $total = $tablestatsio->fields['idx_blks_hit'] + $tablestatsio->fields['idx_blks_read']; + if ($total > 0) $percentage = round(($tablestatsio->fields['idx_blks_hit'] / $total) * 100); + else $percentage = 0; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + + $total = $tablestatsio->fields['toast_blks_hit'] + $tablestatsio->fields['toast_blks_read']; + if ($total > 0) $percentage = round(($tablestatsio->fields['toast_blks_hit'] / $total) * 100); + else $percentage = 0; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + + $total = $tablestatsio->fields['tidx_blks_hit'] + $tablestatsio->fields['tidx_blks_read']; + if ($total > 0) $percentage = round(($tablestatsio->fields['tidx_blks_hit'] / $total) * 100); + else $percentage = 0; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + $tablestatsio->movenext(); + $i++; + } + + echo "
{$lang['strheap']}{$lang['strindex']}{$lang['strtoast']}{$lang['strtoastindex']}
{$lang['strdisk']}{$lang['strcache']}{$lang['strpercent']}{$lang['strdisk']}{$lang['strcache']}{$lang['strpercent']}{$lang['strdisk']}{$lang['strcache']}{$lang['strpercent']}{$lang['strdisk']}{$lang['strcache']}{$lang['strpercent']}
", $misc->printVal($tablestatsio->fields['heap_blks_read'], 'int4', $shownull), "", $misc->printVal($tablestatsio->fields['heap_blks_hit'], 'int4', $shownull), "({$percentage}{$lang['strpercent']})", $misc->printVal($tablestatsio->fields['idx_blks_read'], 'int4', $shownull), "", $misc->printVal($tablestatsio->fields['idx_blks_hit'], 'int4', $shownull), "({$percentage}{$lang['strpercent']})", $misc->printVal($tablestatsio->fields['toast_blks_read'], 'int4', $shownull), "", $misc->printVal($tablestatsio->fields['toast_blks_hit'], 'int4', $shownull), "({$percentage}{$lang['strpercent']})", $misc->printVal($tablestatsio->fields['tidx_blks_read'], 'int4', $shownull), "", $misc->printVal($tablestatsio->fields['tidx_blks_hit'], 'int4', $shownull), "({$percentage}{$lang['strpercent']})
\n"; + } + + // Index row performance + if ($indexstatstups->recordCount() > 0) { + echo "

{$lang['stridxrowperf']}

\n"; + + echo "\n"; + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + $i = 0; + + while (!$indexstatstups->EOF) { + $id = ( ($i % 2 ) == 0 ? '1' : '2' ); + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + $indexstatstups->movenext(); + $i++; + } + + echo "
{$lang['strindex']}{$lang['strscan']}{$lang['strread']}{$lang['strfetch']}
", $misc->printVal($indexstatstups->fields['indexrelname']), "", $misc->printVal($indexstatstups->fields['idx_scan'], 'int4', $shownull), "", $misc->printVal($indexstatstups->fields['idx_tup_read'], 'int4', $shownull), "", $misc->printVal($indexstatstups->fields['idx_tup_fetch'], 'int4', $shownull), "
\n"; + } + + // Index I/0 performance + if ($indexstatsio->recordCount() > 0) { + echo "

{$lang['stridxioperf']}

\n"; + + echo "\n"; + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + $i = 0; + + while (!$indexstatsio->EOF) { + $id = ( ($i % 2 ) == 0 ? '1' : '2' ); + echo "\t\n"; + $total = $indexstatsio->fields['idx_blks_hit'] + $indexstatsio->fields['idx_blks_read']; + if ($total > 0) $percentage = round(($indexstatsio->fields['idx_blks_hit'] / $total) * 100); + else $percentage = 0; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + $indexstatsio->movenext(); + $i++; + } + + echo "
{$lang['strindex']}{$lang['strdisk']}{$lang['strcache']}{$lang['strpercent']}
", $misc->printVal($indexstatsio->fields['indexrelname']), "", $misc->printVal($indexstatsio->fields['idx_blks_read'], 'int4', $shownull), "", $misc->printVal($indexstatsio->fields['idx_blks_hit'], 'int4', $shownull), "({$percentage}{$lang['strpercent']})
\n"; + } + } + } + + $misc->printHeader($lang['strtables'] . ' - ' . $_REQUEST['table'] . ' - ' . $lang['strinfo']); + $misc->printBody(); + + switch ($action) { + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/intro.php b/php/pgadmin/intro.php new file mode 100644 index 0000000..e95916d --- /dev/null +++ b/php/pgadmin/intro.php @@ -0,0 +1,70 @@ +printHeader(); + $misc->printBody(); + + $misc->printTrail('root'); + $misc->printTabs('root','intro'); +?> + +

+ +
+ + + + + + + + + +
+ +
+ +
+ +
+ +

+ +
    +
  • +
  • +
  • +
  • +
+ +printFooter(); +?> diff --git a/php/pgadmin/js/ac_insert_row.js b/php/pgadmin/js/ac_insert_row.js new file mode 100644 index 0000000..6ac0bef --- /dev/null +++ b/php/pgadmin/js/ac_insert_row.js @@ -0,0 +1,226 @@ +var fkl_hasnext=false; +var fkl_hasprev=false; + +/* hide the value list */ +function hideAc() { + jQuery.ppa.o=0; + with (jQuery.ppa) { + fklist.hide(); + fkbg.hide(); + } +} + +/* enable/disable auto-complete feature */ +function triggerAc(ac) { + if (ac) { + jQuery.ppa.attrs + .bind('keyup.ac_action', autocomplete) + .bind('focus.ac_action', autocomplete) + .bind('keypress.ac_action', move) + .addClass('ac_field'); + } + else { + jQuery.ppa.attrs + .removeClass('ac_field') + .unbind('.ac_action'); + } +} + +/* select the given index value and highlight it */ +function selectVal(index) { + if (index == jQuery.ppa.i) + return; + + // we catch the header as well so it takes th index 0 + var trs = jQuery.ppa.fklist.find('tr'); + + // change colors for unselected + if (jQuery.ppa.i > 0) + trs.eq(jQuery.ppa.i).find('*').css({ + 'background-color': '#fff', + 'color': '' + }); + + // change colors for newly selected + trs.eq(index).find('*').css({ + 'background-color': '#3d80df', + 'color': '#fff' + }); + + jQuery.ppa.i = index; +} + +function openlist(e) { + var elt = jQuery(e); + var attnum = elt.attr('id').match(/\d+/)[0]; + /* FIXME we only support the first FK constraint of the field */ + var conid = attrs['attr_'+attnum][0]; + + var constr = constrs["constr_" + conid]; + + // get the changed attribute position in the arrays + for (i=0; (constr.pattnums[i] != attnum);i++); + + var datas = { + fattpos: i, + fvalue: e.value, + database: database, + 'keys[]': constr.pattnums, + 'keynames[]': constr.pattnames, + 'fkeynames[]': constr.fattnames, + f_table: constr.f_table, + f_schema: constr.f_schema, + offset: jQuery.ppa.o + }; + + jQuery.ajax({ + url: 'ajax-ac-insert.php?server=' + server, + type: 'post', + data: datas, + success: function (ret) { + jQuery.ppa.i = 0; + jQuery.ppa.fkbg.show(); + with(jQuery.ppa.fklist) { + html(ret); + appendTo('#row_att_'+ attnum); + css('width',elt.css('width')); + show(); + jQuery.ppa.numrow = find('tr').length; + } + } + }); +} + + +/* move the cursor down or up, + * load available next/prev values if going out of bound */ +function move(event) { + /* selecting next value down. + * if the list is closed, it will open next */ + if(event.keyCode == 40) { + if (jQuery.ppa.fklist[0].style.display == 'block') { + if ((jQuery.ppa.i + 1) < jQuery.ppa.numrow) { + selectVal(jQuery.ppa.i + 1); + } + else if (fkl_hasnext == true) { + jQuery.ppa.o+=11; + openlist(this); + } + } + else { + openlist(this); + } + } + /* selecting prev value up */ + else if(event.keyCode == 38) { + if ((jQuery.ppa.i - 1) > 0) { + selectVal(jQuery.ppa.i - 1); + } + else if ((fkl_hasprev == true) && (jQuery.ppa.i == 1)) { + jQuery.ppa.o-=11; + openlist(this); + } + else { + selectVal(jQuery.ppa.numrow -1); + } + } +} + +/* open/update the value list */ +function autocomplete(event) { + + /* if pressing enter, fire a click on the selected line */ + if (event.keyCode == 13) { + if (jQuery.ppa.i > 0) { + jQuery.ppa.fklist.find('tr').eq(jQuery.ppa.i).click(); + } + return false; + } + /* ignoring 38:up and 40:down */ + else if ( event.keyCode == 38 || event.keyCode == 40 ) { + return false; + } + /* ignoring 9:tab, 37:left, 39:right, 16:shift, ctrl: 17, alt:18, 20:lockmaj */ + else if ( event.keyCode == 9 || event.keyCode == 37 || event.keyCode == 39 + || event.keyCode == 16 || event.keyCode == 17 + || event.keyCode == 18 || event.keyCode == 20) { + return true; + } + /* esc */ + else if (event.keyCode == 27) { + hideAc(); + } + /* request the list of possible values asynchronously */ + else { + /* if we refresh because of a value update, + * we reset back to offset 0 so we catch values + * if list is smaller than 11 values */ + if (event.type == 'keyup') + jQuery.ppa.o = 0; + openlist(this); + } + + return true; +} + +/* bind actions on values lines: hover for style change, click for select */ +with(jQuery('tr.acline')) { + live('mouseover', function () { + selectVal(jQuery('table.ac_values tr').index(this)); + }); + + live('click', function () { + var a = jQuery(this).find('td > a.fkval'); + + for (i=0; i < a.length; i++) { + jQuery('input[name="values['+ a[i].name +']"]').val(a[i].innerHTML); + } + hideAc(); + }); +} + +jQuery('#fkprev').live('click', function () { + jQuery.ppa.o -= 11; + /* get the field that is the previous html elt from the #fklist + * and trigger its focus to refresh the list AND actualy + * focus back on the field */ + jQuery('#fklist').prev().focus(); +}); + +jQuery('#fknext').live('click', function () { + jQuery.ppa.o += 11; + /* get the field that is the previous html elt from the #fklist + * and trigger its focus to refresh the list AND actualy + * focus back on the field*/ + jQuery('#fklist').prev().focus(); +}); + +jQuery(document).ready(function () { + /* register some global value in the ppa namespace */ + jQuery.ppa = { + fklist: jQuery('#fklist'), + attrs: jQuery('input[id^=attr_]'), // select fields with FK + fkbg: jQuery('#fkbg'), + i:0, // selected value indice + o:0 // offset when navigating prev/next + }; + + /* close the list when clicking outside of it */ + jQuery.ppa.fkbg.click(function (e) { + hideAc(); + }); + + /* do not submit the form when selecting a value by pressing enter */ + jQuery.ppa.attrs + .keydown(function (e) { + if (e.keyCode == 13 && jQuery.ppa.fklist[0].style.display == 'block') + return false; + }); + + /* enable/disable auto-complete according to the checkbox */ + triggerAc( + jQuery('#no_ac').click(function () { + triggerAc(this.checked); + })[0].checked + ); +}); diff --git a/php/pgadmin/js/database.js b/php/pgadmin/js/database.js new file mode 100644 index 0000000..f70f707 --- /dev/null +++ b/php/pgadmin/js/database.js @@ -0,0 +1,64 @@ +$(document).ready(function() { + + var timeid = query = null; + var controlLink = $('#control'); + var errmsg = $('

'+Database.errmsg+'

') + .insertBefore(controlLink) + .hide(); + var loading = $('[loading]') + .insertAfter(controlLink) + .hide(); + + function refreshTable() { + if (Database.ajax_time_refresh > 0) { + loading.show(); + query = $.ajax({ + type: 'GET', + dataType: 'html', + data: {server: Database.server, database: Database.dbname, action: Database.action}, + url: 'database.php', + cache: false, + contentType: 'application/x-www-form-urlencoded', + success: function(html) { + $('#data_block').html(html); + timeid = window.setTimeout(refreshTable, Database.ajax_time_refresh) + }, + error: function() { + controlLink.click(); + errmsg.show(); + }, + complete: function () { + loading.hide(); + } + }); + } + } + + controlLink.toggle( + function() { + $(errmsg).hide(); + timeid = window.setTimeout(refreshTable, Database.ajax_time_refresh); + controlLink.html(' ' + + Database.str_stop.text + '   ' + ); + }, + function() { + $(errmsg).hide(); + $(loading).hide(); + window.clearInterval(timeid); + if (query) query.abort(); + controlLink.html(' ' + + Database.str_start.text + ); + } + ); + + /* preload images */ + $('#control img').hide() + .attr('src', Database.str_start.icon) + .attr('src', Database.str_stop.icon) + .show(); + + /* start refreshing */ + controlLink.click(); +}); diff --git a/php/pgadmin/js/display.js b/php/pgadmin/js/display.js new file mode 100644 index 0000000..f9180c6 --- /dev/null +++ b/php/pgadmin/js/display.js @@ -0,0 +1,78 @@ +$(document).ready(function() { + + /* init some needed tags and values */ + + $('table#data').wrap('
'); + $('#fkcontainer').append('
'); + + jQuery.ppa = { + root: $('#root'), + }; + + $("a.fk").live('click', function (event) { + /* make the cursor being a waiting cursor */ + $('body').css('cursor','wait'); + + query = $.ajax({ + type: 'GET', + dataType: 'html', + data: {action:'dobrowsefk'}, + url: $(this).attr('href'), + cache: false, + context: $(this), + contentType: 'application/x-www-form-urlencoded', + success: function(answer) { + pdiv = this.closest('div.fk'); + divclass = this.attr('class').split(' ')[1]; + + /* if we are clicking on a FK from the original table + (level 0), we are using the #root div as parent-div */ + if (pdiv[0].id == 'fkcontainer') { + /* computing top position, which is the topid as well */ + var top = this.position().top + 2 + this.height(); + /* if the requested top position is different than + the previous topid position of #root, empty and position it */ + if (top != jQuery.ppa.root.topid) + jQuery.ppa.root.empty() + .css({ + left: (pdiv.position().left) +'px', + top: top + 'px' + }) + /* this "topid" allows to track if we are + opening a FK from the same line in the original table */ + .topid = top; + + pdiv = jQuery.ppa.root; + + /* Remove equal rows in the root div */ + jQuery.ppa.root.children('.'+divclass).remove(); + } + else { + /* Remove equal rows in the pdiv */ + pdiv.children('div.'+divclass).remove(); + } + + /* creating the data div */ + newdiv = $('
').html(answer); + + /* appending it to the level-1 div */ + pdiv.append(newdiv); + }, + + error: function() { + this.closest('div.fk').append('

'+Display.errmsg+'

'); + }, + + complete: function () { + $('body').css('cursor','auto'); + } + }); + + return false; // do not refresh the page + }); + + $(".fk_delete").live('click', function (event) { + $(this).closest('div').remove(); + return false; // do not refresh the page + }); +}); diff --git a/php/pgadmin/lang/Makefile b/php/pgadmin/lang/Makefile new file mode 100644 index 0000000..75a9512 --- /dev/null +++ b/php/pgadmin/lang/Makefile @@ -0,0 +1,257 @@ +# This Makefile recodes source lang files into XML Unicode. +# You should add your encodings to this file. You need to have GNU Recode +# installed. +# +# It is important to: +# - fix the delimiters of php code: +# - convert CRLF -> LF +# - remove all text before first +# - convert "'" -> "'" +# using 'convert.awk' +# +# Modifications by Dave Smith, 2003-11-10: +# Added TARGETS variable for easy listing of all lang files. +# Added 'prepare' target to check that 'recode' is installed. +# Added 'clean' target to nuke recoded files. +# Surpressed verbose command line dumpage with '@'. +# Added dependency checking for incremental recoding. +# Added pretty "Recoding ..." messages. +# Added 'chmod 644' to 'all' target for correct file permissions. +# Modifications by Rafal Slubowski, 2003-12-12: +# All conversions of recoded text moved to convert.awk script +# +# $Id: Makefile,v 1.48 2007/02/10 03:48:35 xzilla Exp $ + +DESTDIR=./recoded +TARGETS=polish \ + english \ + chinese-sim \ + chinese-tr \ + chinese-utf8-zh_TW \ + chinese-utf8-zh_CN \ + danish \ + dutch \ + german \ + spanish \ + italian \ + french \ + russian \ + russian-utf8 \ + japanese \ + slovak \ + turkish \ + czech \ + portuguese-br \ + portuguese-pt \ + swedish \ + afrikaans \ + arabic \ + mongol \ + ukrainian \ + hungarian \ + hebrew \ + catalan \ + romanian \ + greek \ + galician + +all: prepare ${TARGETS} + @for p in ${TARGETS} ; do chmod 644 ${DESTDIR}/$$p.php ; done + +prepare: + @which recode >/dev/null 2>&1 || ( echo "You must have GNU 'recode' installed to use this Makefile,\ + but I could not find it in your path!" && exit 1 ) + @which sed >/dev/null 2>&1 || ( echo "You must have sed installed to use this Makefile,\ + but I could not find it in your path!" && exit 1 ) + @which awk >/dev/null 2>&1 || ( echo "You must have awk installed to use this Makefile,\ + but I could not find it in your path!" && exit 1 ) + +clean: + @echo "Nuking recoded lang files..." + @for p in ${TARGETS} ; do rm -fv ${DESTDIR}/$$p.php ; done + +catalan: catalan.php + @echo "Recoding catalan..." + @cat catalan.php | recode utf-8..xml | ./convert.awk \ + > ${DESTDIR}/catalan.php + @chmod 644 catalan.php ${DESTDIR}/catalan.php + +polish: polish.php + @echo "Recoding polish..." + @cat polish.php | recode utf-8..xml | ./convert.awk \ + > ${DESTDIR}/polish.php + @chmod 644 polish.php ${DESTDIR}/polish.php + +english: english.php + @echo "Recoding english..." + @cat english.php | recode latin1..xml | ./convert.awk \ + > ${DESTDIR}/english.php + @chmod 644 english.php ${DESTDIR}/english.php + +dutch: dutch.php + @echo "Recoding dutch..." + @cat dutch.php | recode latin1..xml | ./convert.awk \ + > ${DESTDIR}/dutch.php + @chmod 644 dutch.php ${DESTDIR}/dutch.php + +danish: danish.php + @echo "Recoding danish..." + @cat danish.php | recode latin1..xml | ./convert.awk \ + > ${DESTDIR}/danish.php + @chmod 644 danish.php ${DESTDIR}/danish.php + +german: german.php + @echo "Recoding german..." + @cat german.php | recode utf-8..xml | ./convert.awk \ + > ${DESTDIR}/german.php + @chmod 644 german.php ${DESTDIR}/german.php + +spanish: spanish.php + @echo "Recoding spanish..." + @cat spanish.php | recode iso-8859-1..xml | ./convert.awk \ + > ${DESTDIR}/spanish.php + @chmod 644 spanish.php ${DESTDIR}/spanish.php + +italian: italian.php + @echo "Recoding italian..." + @cat italian.php | recode iso-8859-1..xml | ./convert.awk \ + > ${DESTDIR}/italian.php + @chmod 644 italian.php ${DESTDIR}/italian.php + +chinese-sim: chinese-sim.php + @echo "Recoding chinese-sim..." + @cat chinese-sim.php | recode gb2312..xml | ./convert.awk \ + > ${DESTDIR}/chinese-sim.php + @chmod 644 chinese-sim.php ${DESTDIR}/chinese-sim.php + +chinese-tr: chinese-tr.php + @echo "Recoding chinese-tr..." + @cat chinese-tr.php | recode big5..xml | ./convert.awk \ + > ${DESTDIR}/chinese-tr.php + @chmod 644 chinese-tr.php ${DESTDIR}/chinese-tr.php + +chinese-utf8-zh_CN: chinese-utf8-zh_CN.php + @echo "Recoding chinese-utf8-zh_CN..." + @cat chinese-utf8-zh_CN.php | recode utf-8..xml | ./convert.awk \ + > ${DESTDIR}/chinese-utf8-zh_CN.php + @chmod 644 chinese-utf8-zh_CN.php ${DESTDIR}/chinese-utf8-zh_CN.php + +chinese-utf8-zh_TW: chinese-utf8-zh_TW.php + @echo "Recoding chinese-utf8-zh_TW..." + @cat chinese-utf8-zh_TW.php | recode utf-8..xml | ./convert.awk \ + > ${DESTDIR}/chinese-utf8-zh_TW.php + @chmod 644 chinese-utf8-zh_TW.php ${DESTDIR}/chinese-utf8-zh_TW.php + +french: french.php + @echo "Recoding french..." + @cat french.php | recode latin1..xml | ./convert.awk \ + > ${DESTDIR}/french.php + @chmod 644 french.php ${DESTDIR}/french.php + +japanese: japanese.php + @echo "Recoding japanese..." + @cat japanese.php | recode euc-jp..xml | ./convert.awk \ + > ${DESTDIR}/japanese.php + @chmod 644 japanese.php ${DESTDIR}/japanese.php + +russian: russian.php + @echo "Recoding russian..." + @cat russian.php | recode koi8..xml | ./convert.awk \ + > ${DESTDIR}/russian.php + @chmod 644 russian.php ${DESTDIR}/russian.php +russian-utf8: russian-utf8.php + @echo "Recoding russian-utf8..." + @cat russian-utf8.php | recode utf-8..xml | ./convert.awk \ + > ${DESTDIR}/russian-utf8.php + @chmod 644 russian-utf8.php ${DESTDIR}/russian-utf8.php + +slovak: slovak.php + @echo "Recoding slovak..." + @cat slovak.php | recode utf-8..xml | ./convert.awk \ + > ${DESTDIR}/slovak.php + @chmod 644 slovak.php ${DESTDIR}/slovak.php + +czech: czech.php + @echo "Recoding czech..." + @cat czech.php | recode utf-8..xml | ./convert.awk \ + > ${DESTDIR}/czech.php + @chmod 644 czech.php ${DESTDIR}/czech.php + +turkish: turkish.php + @echo "Recoding turkish..." + @cat turkish.php | recode iso-8859-9..xml | ./convert.awk \ + > ${DESTDIR}/turkish.php + @chmod 644 turkish.php ${DESTDIR}/turkish.php + +portuguese-br: portuguese-br.php + @echo "Recoding portuguese-br..." + @cat portuguese-br.php | recode iso-8859-1..xml | ./convert.awk \ + > ${DESTDIR}/portuguese-br.php + @chmod 644 portuguese-br.php ${DESTDIR}/portuguese-br.php + +portuguese-pt: portuguese-pt.php + @echo "Recoding portuguese-pt..." + @cat portuguese-pt.php | recode iso-8859-15..xml | ./convert.awk \ + > ${DESTDIR}/portuguese-pt.php + @chmod 644 portuguese-pt.php ${DESTDIR}/portuguese-pt.php + +swedish: swedish.php + @echo "Recoding swedish..." + @cat swedish.php | recode iso-8859-1..xml | ./convert.awk \ + > ${DESTDIR}/swedish.php + @chmod 644 swedish.php ${DESTDIR}/swedish.php + +afrikaans: afrikaans.php + @echo "Recoding afrikaans..." + @cat afrikaans.php | recode iso-8859-1..xml | ./convert.awk \ + > ${DESTDIR}/afrikaans.php + @chmod 644 afrikaans.php ${DESTDIR}/afrikaans.php + +hungarian: hungarian.php + @echo "Recoding hungarian..." + @cat hungarian.php | recode utf-8..xml | ./convert.awk \ + > ${DESTDIR}/hungarian.php + @chmod 644 hungarian.php ${DESTDIR}/hungarian.php + +arabic: arabic.php + @echo "Recoding arabic..." + @cat arabic.php | recode utf-8..xml | ./convert.awk \ + > ${DESTDIR}/arabic.php + @chmod 644 arabic.php ${DESTDIR}/arabic.php + +mongol: mongol.php + @echo "Recoding mongol..." + @cat mongol.php | recode iso-8859-5..xml | ./convert.awk \ + > ${DESTDIR}/mongol.php + @chmod 644 mongol.php ${DESTDIR}/mongol.php + +ukrainian: ukrainian.php + @echo "Recoding ukrainian..." + @cat ukrainian.php | recode koi8-r..xml | ./convert.awk \ + > ${DESTDIR}/ukrainian.php + @chmod 644 ukrainian.php ${DESTDIR}/ukrainian.php + +hebrew: hebrew.php + @echo "Recoding hebrew..." + @cat hebrew.php | recode utf-8..xml | ./convert.awk \ + > ${DESTDIR}/hebrew.php + @chmod 644 hebrew.php ${DESTDIR}/hebrew.php + +romanian: romanian.php + @echo "Recoding romanian..." + @cat romanian.php | recode utf-8..xml | ./convert.awk \ + > ${DESTDIR}/romanian.php + @chmod 644 romanian.php ${DESTDIR}/romanian.php + +greek: greek.php + @echo "Recoding greek..." + @cat greek.php | recode iso-8859-7..xml | ./convert.awk \ + > ${DESTDIR}/greek.php + @chmod 644 greek.php ${DESTDIR}/greek.php + +galician: galician.php + @echo "Recoding galician..." + @cat galician.php | recode utf-8..xml | ./convert.awk \ + > ${DESTDIR}/galician.php + @chmod 644 galician.php ${DESTDIR}/galician.php diff --git a/php/pgadmin/lang/afrikaans.php b/php/pgadmin/lang/afrikaans.php new file mode 100644 index 0000000..f1162b2 --- /dev/null +++ b/php/pgadmin/lang/afrikaans.php @@ -0,0 +1,636 @@ +>'; + $lang['strfailed'] = 'Het misluk'; + $lang['strcreate'] = 'Skep'; + $lang['strcreated'] = 'Geskep'; + $lang['strcomment'] = 'Kommentaar'; + $lang['strlength'] = 'Lengte'; + $lang['strdefault'] = 'Standaard'; + $lang['stralter'] = 'Wysig'; + $lang['strok'] = 'OK'; + $lang['strcancel'] = 'Kanselleer'; + $lang['strsave'] = 'Bewaar'; + $lang['strreset'] = 'Herstel'; + $lang['strinsert'] = 'Voeg in'; + $lang['strselect'] = 'Selekteer'; + $lang['strdelete'] = 'Verwyder'; + $lang['strupdate'] = 'Verfris'; + $lang['strreferences'] = 'Verwysings'; + $lang['stryes'] = 'Ja'; + $lang['strno'] = 'Nee'; + $lang['strtrue'] = 'WAAR'; + $lang['strfalse'] = 'VALS'; + $lang['stredit'] = 'Redigeer'; + $lang['strcolumn'] = 'Kolom'; + $lang['strcolumns'] = 'Kolomme'; + $lang['strrows'] = 'ry(e)'; + $lang['strrowsaff'] = 'ry(e) het verander.'; + $lang['strobjects'] = 'objek(te)'; + $lang['strback'] = 'Terug'; + $lang['strqueryresults'] = 'Navraagresultate'; + $lang['strshow'] = 'Wys'; + $lang['strempty'] = 'Leeg'; + $lang['strlanguage'] = 'Taal'; + $lang['strencoding'] = 'Enkodering'; + $lang['strvalue'] = 'Waarde'; + $lang['strunique'] = 'Uniek'; + $lang['strprimary'] = 'Primr'; + $lang['strexport'] = 'Eksporteer'; + $lang['strimport'] = 'Importeer'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = 'Admin'; + $lang['strvacuum'] = 'Stofsuig'; + $lang['stranalyze'] = 'Analiseer'; + $lang['strcluster'] = 'Kluster'; + $lang['strclustered'] = 'In klusters?'; + $lang['strreindex'] = 'Herindekseer'; + $lang['strrun'] = 'Loop'; + $lang['stradd'] = 'Voeg by'; + $lang['strevent'] = 'Gebeurtenis'; + $lang['strwhere'] = 'Waar'; + $lang['strinstead'] = 'Doen eerder'; + $lang['strwhen'] = 'Wanneer'; + $lang['strformat'] = 'Formaat'; + $lang['strdata'] = 'Data'; + $lang['strconfirm'] = 'Bevestig'; + $lang['strexpression'] = 'Uitdrukking'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'Vou oop'; + $lang['strcollapse'] = 'Vou toe'; + $lang['strexplain'] = 'Verduidelik'; + $lang['strexplainanalyze'] = 'Verduidelik Analise'; + $lang['strfind'] = 'Soek'; + $lang['stroptions'] = 'Opsies'; + $lang['strrefresh'] = 'Verfris'; + $lang['strdownload'] = 'Laai af'; + $lang['strdownloadgzipped'] = 'Laai af ... saamgepers met gzip'; + $lang['strinfo'] = 'Info'; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = 'Gevorderd'; + $lang['strvariables'] = 'Veranderlikes'; + $lang['strprocess'] = 'Proses'; + $lang['strprocesses'] = 'Prosesse'; + $lang['strsetting'] = 'Instelling'; + $lang['streditsql'] = 'Redigeer SQL'; + $lang['strruntime'] = 'Totale looptyd: %s ms'; + $lang['strpaginate'] = 'Resultate per bladsy'; + $lang['struploadscript'] = 'of laai \'n SQL skrip in:'; + $lang['strstarttime'] = 'Begintyd'; + $lang['strfile'] = 'Ler'; + $lang['strfileimported'] = 'Ler is ingetrek.'; + + // Error handling + $lang['strnoframes'] = 'Hierdie toepassing maak gebruik van HTML-rame. U het \'n blaaier nodig wat rame ondersteun om hierdie toepassing te kan gebruik. '; + $lang['strbadconfig'] = 'Die ler config.inc.php is verouderd. Jy kan verbeterde weergawe aflei van die ler config.inc.php-dist.'; + $lang['strnotloaded'] = 'Hierdie PHP-installasie is sonder ondersteuning van hierdie tipe database nie gekompileerd.'; + $lang['strpostgresqlversionnotsupported'] = 'Weergawe van PostgreSQL word nie ondersteun nie. Probeer asb. weergawe %s of later.'; + $lang['strbadschema'] = 'Ongeldige skema gespesifiseer.'; + $lang['strbadencoding'] = 'Die klintenkodering kon nie in die databasis geplaas word nie.'; + $lang['strsqlerror'] = 'SQL-fout:'; + $lang['strinstatement'] = 'In stelling:'; + $lang['strinvalidparam'] = 'Ongeldige parameters.'; + $lang['strnodata'] = 'Geen rye gevind.'; + $lang['strnoobjects'] = 'Geen objekte gevind.'; + $lang['strrownotunique'] = 'Geen unieke identifiseerder vir hierdie ry.'; + $lang['strnoreportsdb'] = 'Jy het nie die verslae-databasis geskep nie. Lees asb. die INSTALL-ler vir instruksies.'; + $lang['strnouploads'] = 'Oplaaiing van lers is afgeskakel.'; + $lang['strimporterror'] = 'Inleesfout.'; + $lang['strimporterrorline'] = 'Inleesfout op rel %s.'; + $lang['strcannotdumponwindows'] = 'Weergee van komplekse tabel- en skemaname word nie op Windows ondersteun nie. Kyk asb. in die FAQ.'; + + // Tables + $lang['strtable'] = 'Tabel'; + $lang['strtables'] = 'Tabelle'; + $lang['strshowalltables'] = 'Wys alle tabelle'; + $lang['strnotables'] = 'Geen tabelle gevind.'; + $lang['strnotable'] = 'Geen tabel gevind.'; + $lang['strcreatetable'] = 'Skep tabel'; + $lang['strtablename'] = 'Tabelnaam'; + $lang['strtableneedsname'] = 'Jy moet die tabel \'n naam gee.'; + $lang['strtableneedsfield'] = 'Jy moet ten minste een veld spesifiseer.'; + $lang['strtableneedscols'] = 'Jy moet die tabel \'n geldige aantal kolomme gee.'; + $lang['strtablecreated'] = 'Tabel geskep.'; + $lang['strtablecreatedbad'] = 'Die tabel kon nie geskep word nie.'; + $lang['strconfdroptable'] = 'Is jy seker dat dat jy die tabel "%s" wil verwyder?'; + $lang['strtabledropped'] = 'Tabel is verwyder.'; + $lang['strtabledroppedbad'] = 'Die tabel kon nie verwyder word nie.'; + $lang['strconfemptytable'] = 'Is jy seker dat jy alle rye uit tabel "%s" wil verwyder?'; + $lang['strtableemptied'] = 'Alle ryen is uit die tabel verwyder.'; + $lang['strtableemptiedbad'] = 'Die rye kon nie verwyder word nie.'; + $lang['strinsertrow'] = 'Voeg \'n ry by'; + $lang['strrowinserted'] = 'Ry is bygevoeg.'; + $lang['strrowinsertedbad'] = 'Die ry kon nie bygevoeg word nie.'; + $lang['streditrow'] = 'Wysig ry'; + $lang['strrowupdated'] = 'Ry is opgedateer.'; + $lang['strrowupdatedbad'] = 'Die opdatering van die ry het misluk.'; + $lang['strdeleterow'] = 'Verwyder ry'; + $lang['strconfdeleterow'] = 'Is jy seker dat jy hierdie ry wil verwyder?'; + $lang['strrowdeleted'] = 'Ry is verwyder.'; + $lang['strrowdeletedbad'] = 'Die ry kon nie verwyder word nie.'; + $lang['strinsertandrepeat'] = 'Voeg in & Herhaal'; + $lang['strnumcols'] = 'Aantal kolomme'; + $lang['strcolneedsname'] = 'Jy moet die kolom \'n naam gee'; + $lang['strselectallfields'] = 'Selekteer alle velde'; + $lang['strselectneedscol'] = 'Jy moet ten minste n kolom as uitvoer h'; + $lang['strselectunary'] = 'Unre operatore kan nie waardes kry nie.'; + $lang['straltercolumn'] = 'Wysig kolom'; + $lang['strcolumnaltered'] = 'Kolom is gewysig.'; + $lang['strcolumnalteredbad'] = 'Die kolom kon nie gewysig word nie.'; + $lang['strconfdropcolumn'] = 'Is jy seker dat jy die kolom "%s" wil verwyder uit tabel "%s"?'; + $lang['strcolumndropped'] = 'Kolom is verwyder.'; + $lang['strcolumndroppedbad'] = 'Die kolom kon nie verwyder word nie.'; + $lang['straddcolumn'] = 'Voeg kolom by'; + $lang['strcolumnadded'] = 'Kolom is bygevoeg.'; + $lang['strcolumnaddedbad'] = 'Die kolom kon nie bygevoeg word nie.'; + $lang['strcascade'] = 'CASCADE'; + $lang['strtablealtered'] = 'Tabel is gewysig.'; + $lang['strtablealteredbad'] = 'Tabelwysiging het misluk.'; + $lang['strdataonly'] = 'Slegs data'; + $lang['strstructureonly'] = 'Slegs struktuur'; + $lang['strstructureanddata'] = 'Struktuur en data'; + $lang['strtabbed'] = 'Tabbed'; + $lang['strauto'] = 'Auto'; + $lang['strconfvacuumtable'] = 'Is jy seker jy wil VACUUM "%s"?'; + $lang['strestimatedrowcount'] = 'Geskatte aantal rye'; + + // Users + $lang['struser'] = 'Gebruiker'; + $lang['strusers'] = 'Gebruikers'; + $lang['strusername'] = 'Gebruikersnaam'; + $lang['strpassword'] = 'Wagwoord'; + $lang['strsuper'] = 'Supergebruiker?'; + $lang['strcreatedb'] = 'Skep DB?'; + $lang['strexpires'] = 'Verval'; + $lang['strsessiondefaults'] = 'Verstekwaardes van sessie'; + $lang['strnousers'] = 'Geen gebruikers gevind.'; + $lang['struserupdated'] = 'Gebruiker is opgedateer.'; + $lang['struserupdatedbad'] = 'Gebruiker kon nie opgedateer word nie.'; + $lang['strshowallusers'] = 'Wys alle gebruikers'; + $lang['strcreateuser'] = 'Skep gebruiker'; + $lang['struserneedsname'] = 'Jy moet \'n naam gee vir die gebruiker.'; + $lang['strusercreated'] = 'Gebruiker geskep.'; + $lang['strusercreatedbad'] = 'Die gebruiker kon nie geskep word nie.'; + $lang['strconfdropuser'] = 'Is jy seker dat jy die gebruiker "%s" wil verwyder?'; + $lang['struserdropped'] = 'Gebruiker is verwyder.'; + $lang['struserdroppedbad'] = 'Verwydering van die gebruiker het misluk.'; + $lang['straccount'] = 'Gebruiker'; + $lang['strchangepassword'] = 'Verander wagwoord'; + $lang['strpasswordchanged'] = 'Wagwoord is verander.'; + $lang['strpasswordchangedbad'] = 'Wagwoordverandering het misluk.'; + $lang['strpasswordshort'] = 'Wagwoord is te kort.'; + $lang['strpasswordconfirm'] = 'Wagwoord verskil van bevestigings-wagwoord.'; + + // Groups + $lang['strgroup'] = 'Groep'; + $lang['strgroups'] = 'Groepe'; + $lang['strnogroup'] = 'Groep nie gevind.'; + $lang['strnogroups'] = 'Geen groepe gevind.'; + $lang['strcreategroup'] = 'Skep groep'; + $lang['strshowallgroups'] = 'Wys alle groepe'; + $lang['strgroupneedsname'] = 'Jy moet die groep \'n naam gee.'; + $lang['strgroupcreated'] = 'Groep geskep.'; + $lang['strgroupcreatedbad'] = 'Die groep kon nie geskep word nie.'; + $lang['strconfdropgroup'] = 'Is jy seker dat jy die groep "%s" wil verwyder?'; + $lang['strgroupdropped'] = 'Groep is verwyder.'; + $lang['strgroupdroppedbad'] = 'Verwydering van die groep het misluk.'; + $lang['strmembers'] = 'Lede'; + $lang['straddmember'] = 'Voeg \'n groeplid by'; + $lang['strmemberadded'] = 'Groeplid is bygevoeg.'; + $lang['strmemberaddedbad'] = 'Toevoeging van groeplid het misluk.'; + $lang['strdropmember'] = 'Verwyder groeplid'; + $lang['strconfdropmember'] = 'Is jy seker dat jy "%s" uit groep "%s" wil verwyder?'; + $lang['strmemberdropped'] = 'Groeplid is verwyder.'; + $lang['strmemberdroppedbad'] = 'Verwydering van groeplid het misluk.'; + + // Privileges + $lang['strprivilege'] = 'Voorregte'; + $lang['strprivileges'] = 'Voorregte'; + $lang['strnoprivileges'] = 'Hierdie objek het verstekeienaarvoorregte.'; + $lang['strgrant'] = 'Staan toe'; + $lang['strrevoke'] = 'Ontneem'; + $lang['strgranted'] = 'Voorregte is bygevoeg.'; + $lang['strgrantfailed'] = 'Voorregte kon nie bygevoeg word nie.'; + $lang['strgrantbad'] = 'Jy moet minstens een gebruiker of groep en minstens een voorreg aandui.'; + $lang['strgrantor'] = 'Grantor'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'Databasis'; + $lang['strdatabases'] = 'Databasisse'; + $lang['strshowalldatabases'] = 'Wys alle databasisse'; + $lang['strnodatabase'] = 'Geen databasis gevind.'; + $lang['strnodatabases'] = 'Geen databasis gevind.'; + $lang['strcreatedatabase'] = 'Skep databasis'; + $lang['strdatabasename'] = 'Databasisnaam'; + $lang['strdatabaseneedsname'] = 'Jy moet die databasis \'n naam gee.'; + $lang['strdatabasecreated'] = 'Databasis is geskep.'; + $lang['strdatabasecreatedbad'] = 'Die databasis kon nie geskep word nie.'; + $lang['strconfdropdatabase'] = 'Is jy seker dat jy die databasis "%s" wil verwyder?'; + $lang['strdatabasedropped'] = 'Databasis is verwyder.'; + $lang['strdatabasedroppedbad'] = 'Databasisverwydering het misluk.'; + $lang['strentersql'] = 'Tik hieronder die SQL in wat uitgevoer moet word:'; + $lang['strsqlexecuted'] = 'SQL uitgevoer.'; + $lang['strvacuumgood'] = 'Vacuum-bewerking is klaar.'; + $lang['strvacuumbad'] = 'Vacuum-bewerking het misluk.'; + $lang['stranalyzegood'] = 'Analise is voltooi.'; + $lang['stranalyzebad'] = 'Analise het misluk.'; + $lang['strreindexgood'] = 'Herindeksering is voltooi.'; + $lang['strreindexbad'] = 'Herindeksering het misluk.'; + $lang['strfull'] = 'Volledig'; + $lang['strfreeze'] = 'Vries'; + $lang['strforce'] = 'Forseer'; + $lang['strsignalsent'] = 'Sein gestuur.'; + $lang['strsignalsentbad'] = 'Stuur van sein het misluk.'; + $lang['strallobjects'] = 'Alle objekte'; + + // Views + $lang['strview'] = 'Aansig'; + $lang['strviews'] = 'Aansigte'; + $lang['strshowallviews'] = 'Wys alle aansigte'; + $lang['strnoview'] = 'Geen aansigte gevind.'; + $lang['strnoviews'] = 'Geen aansigte gevind.'; + $lang['strcreateview'] = 'Skep aansig'; + $lang['strviewname'] = 'Aansignaam'; + $lang['strviewneedsname'] = 'Jy moet die aansig \'n naam gee.'; + $lang['strviewneedsdef'] = 'Jy moet die aansig definieer.'; + $lang['strviewneedsfields'] = 'Jy moet s watter kolomme gekies moet wees in hierdie aansig.'; + $lang['strviewcreated'] = 'Aansig is geskep.'; + $lang['strviewcreatedbad'] = 'Die aansig kon nie geskep word nie.'; + $lang['strconfdropview'] = 'Is jy seker dat jy die aansig "%s" wil verwyder?'; + $lang['strviewdropped'] = 'Aansig is verwyder.'; + $lang['strviewdroppedbad'] = 'Die aansig kon nie verwyder word nie.'; + $lang['strviewupdated'] = 'Aansig is opgedateer.'; + $lang['strviewupdatedbad'] = 'Opdatering van aansig het misluk.'; + $lang['strviewlink'] = 'Sleutels word verbind'; + $lang['strviewconditions'] = 'Addisionele voorwaardes'; + $lang['strcreateviewwiz'] = 'Skep \'n aansig met behulp van \'n toergids'; + + // Sequences + $lang['strsequence'] = 'Reeks'; + $lang['strsequences'] = 'Reekse'; + $lang['strshowallsequences'] = 'Wys alle reekse'; + $lang['strnosequence'] = 'Geen reeks gevind.'; + $lang['strnosequences'] = 'Geen reekse gevind.'; + $lang['strcreatesequence'] = 'Skep reeks'; + $lang['strlastvalue'] = 'Laaste waarde'; + $lang['strincrementby'] = 'Verhoog met'; + $lang['strstartvalue'] = 'Aanvangswaarde'; + $lang['strmaxvalue'] = 'maks_waarde'; + $lang['strminvalue'] = 'min_waarde'; + $lang['strcachevalue'] = 'Kasgeheue-waarde'; + $lang['strlogcount'] = 'Boekstaaftelling'; + $lang['striscycled'] = 'is_siklies ?'; + $lang['strsequenceneedsname'] = 'Jy moet \'n naam gee vir die reeks.'; + $lang['strsequencecreated'] = 'Reeks is geskep.'; + $lang['strsequencecreatedbad'] = 'Die reeks kon nie geskep word nie.'; + $lang['strconfdropsequence'] = 'Is jy seker dat jy die reeks "%s" wil verwyder?'; + $lang['strsequencedropped'] = 'Reeks is verwyder.'; + $lang['strsequencedroppedbad'] = 'Verwydering van die reeks het misluk.'; + $lang['strsequencereset'] = 'Herstel reeks.'; + $lang['strsequenceresetbad'] = 'Herstel van reeks het misluk.'; + + // Indexes + $lang['strindex'] = 'Indeks'; + $lang['strindexes'] = 'Indekse'; + $lang['strindexname'] = 'Indeksnaam'; + $lang['strshowallindexes'] = 'Wys alle indekse'; + $lang['strnoindex'] = 'Geen indeks gevind.'; + $lang['strnoindexes'] = 'Geen indekse gevind.'; + $lang['strcreateindex'] = 'Skep \'n indeks'; + $lang['strtabname'] = 'Tab-naam'; + $lang['strcolumnname'] = 'Kolomnaam'; + $lang['strindexneedsname'] = 'Jy moet \'n naam gee vir die index.'; + $lang['strindexneedscols'] = 'Indekse moet ten minste uit n kolom bestaan.'; + $lang['strindexcreated'] = 'Indeks is geskep'; + $lang['strindexcreatedbad'] = 'Die indeks kon nie geskep word nie.'; + $lang['strconfdropindex'] = 'Is jy seker dat jy die indeks "%s" wil verwyder?'; + $lang['strindexdropped'] = 'Indeks is verwyder.'; + $lang['strindexdroppedbad'] = 'Verwydering van die indeks het misluk.'; + $lang['strkeyname'] = 'Sleutelnaam'; + $lang['struniquekey'] = 'Unieke sleutel'; + $lang['strprimarykey'] = 'Primre sleutel'; + $lang['strindextype'] = 'Tipe van die indeks'; + $lang['strtablecolumnlist'] = 'Kolomme in tabel'; + $lang['strindexcolumnlist'] = 'Kolomme in indeks'; + $lang['strconfcluster'] = 'Is jy seker jy wil \'n kluster maak van "%s"?'; + $lang['strclusteredgood'] = 'Kluster is voltooi.'; + $lang['strclusteredbad'] = 'Kluster het misluk.'; + + // Rules + $lang['strrules'] = 'Rels'; + $lang['strrule'] = 'Rel'; + $lang['strshowallrules'] = 'Wys alle rels'; + $lang['strnorule'] = 'Geen rel gevind.'; + $lang['strnorules'] = 'Geen rels gevind.'; + $lang['strcreaterule'] = 'Skep \'n rel'; + $lang['strrulename'] = 'Relnaam'; + $lang['strruleneedsname'] = 'Jy moet \'n naam gee vir die rel.'; + $lang['strrulecreated'] = 'Rel is geskep.'; + $lang['strrulecreatedbad'] = 'Die rel kon nie geskep word nie.'; + $lang['strconfdroprule'] = 'Is jy seker dat jy die rel "%s" op "%s" wil verwyder?'; + $lang['strruledropped'] = 'Rel is verwyder.'; + $lang['strruledroppedbad'] = 'Verwydering van die rel het misluk.'; + + // Constraints + $lang['strconstraints'] = 'Beperkings'; + $lang['strshowallconstraints'] = 'Wys alle beperkings'; + $lang['strnoconstraints'] = 'Geen beperkings gevind.'; + $lang['strcreateconstraint'] = 'Skep beperking'; + $lang['strconstraintcreated'] = 'Beperking is geskep.'; + $lang['strconstraintcreatedbad'] = 'Die beperking kon nie geskep word nie.'; + $lang['strconfdropconstraint'] = 'Is jy seker dat jy die beperking "%s" op "%s" wil verwyder?'; + $lang['strconstraintdropped'] = 'Beperking is verwyder.'; + $lang['strconstraintdroppedbad'] = 'Verwydering van die beperking het misluk.'; + $lang['straddcheck'] = 'Voeg \'n kontrole by'; + $lang['strcheckneedsdefinition'] = 'Kontrolebeperking moet gedefinieer wees.'; + $lang['strcheckadded'] = 'Kontrolebeperking is bygevoeg.'; + $lang['strcheckaddedbad'] = 'Kontrolebeperking kon nie bygevoeg word nie.'; + $lang['straddpk'] = 'Voeg primre sleutel by'; + $lang['strpkneedscols'] = 'Primre sleutel moet minstens n kolom h.'; + $lang['strpkadded'] = 'Primre sleutel bygevoeg.'; + $lang['strpkaddedbad'] = 'Primre sleutel kon nie bygevoeg word nie.'; + $lang['stradduniq'] = 'Voeg unieke sleutel by.'; + $lang['struniqneedscols'] = 'Unieke sleutel moet minstens n kolom h.'; + $lang['struniqadded'] = 'Unieke sleutel is bygevoeg.'; + $lang['struniqaddedbad'] = 'Unieke sleutel kon nie bygevoeg word nie.'; + $lang['straddfk'] = 'Voeg vreemdesleutel toe'; + $lang['strfkneedscols'] = 'Vreemdesleutel moet minstens n kolom h.'; + $lang['strfkneedstarget'] = 'Vreemdesleutel moet \'n doeltabel h.'; + $lang['strfkadded'] = 'Vreemdesleutel is bygevoeg.'; + $lang['strfkaddedbad'] = 'Vreemdesleutel kon nie bygevoeg word nie.'; + $lang['strfktarget'] = 'Doeltabel'; + $lang['strfkcolumnlist'] = 'Kolomme in sleutel'; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + + // Functions + $lang['strfunction'] = 'Funksie'; + $lang['strfunctions'] = 'Funksies'; + $lang['strshowallfunctions'] = 'Wys alle funksies'; + $lang['strnofunction'] = 'Geen funksies gevind.'; + $lang['strnofunctions'] = 'Geen funksies gevind.'; + $lang['strcreateplfunction'] = 'Skep SQL/PL funksie'; + $lang['strcreateinternalfunction'] = 'Skep interne funksie'; + $lang['strcreatecfunction'] = 'Skep C funksie'; + $lang['strfunctionname'] = 'Funksienaam'; + $lang['strreturns'] = 'Gee terug'; + $lang['strarguments'] = 'Argumente'; + $lang['strproglanguage'] = 'Programmeertaal'; + $lang['strfunctionneedsname'] = 'Jy moet die funksie \'n naam gee.'; + $lang['strfunctionneedsdef'] = 'Jy moet die funksie definieer.'; + $lang['strfunctioncreated'] = 'Funksie is geskep.'; + $lang['strfunctioncreatedbad'] = 'Die funksie kon nie geskep word nie.'; + $lang['strconfdropfunction'] = 'Is jy seker dat jy die funksie "%s" wil verwyder?'; + $lang['strfunctiondropped'] = 'Funksie is verwyder.'; + $lang['strfunctiondroppedbad'] = 'Verwydering van die funksie het misluk.'; + $lang['strfunctionupdated'] = 'Funksie is opgedateer.'; + $lang['strfunctionupdatedbad'] = 'Opdatering van die funksie het misluk.'; + $lang['strobjectfile'] = 'Objekler'; + $lang['strlinksymbol'] = 'Skakelsimbool'; + + // Triggers + $lang['strtrigger'] = 'Snellers'; + $lang['strtriggers'] = 'Snellers'; + $lang['strshowalltriggers'] = 'Wys alle snellers'; + $lang['strnotrigger'] = 'Geen sneller gevind.'; + $lang['strnotriggers'] = 'Geen snellers gevind.'; + $lang['strcreatetrigger'] = 'skep trigger'; + $lang['strtriggerneedsname'] = 'Jy moet vir die sneller \'n naam gee.'; + $lang['strtriggerneedsfunc'] = 'Jy moet vir die sneller \'n funksie gee.'; + $lang['strtriggercreated'] = 'Sneller is geskep.'; + $lang['strtriggercreatedbad'] = 'Die sneller kon nie geskep word nie.'; + $lang['strconfdroptrigger'] = 'Is jy seker dat jy die sneller "%s" op "%s" wil verwyder?'; + $lang['strtriggerdropped'] = 'Sneller is verwyder.'; + $lang['strtriggerdroppedbad'] = 'Verwydering van sneller misluk.'; + $lang['strtriggeraltered'] = 'Sneller is gewysig.'; + $lang['strtriggeralteredbad'] = 'Snellerwysiging het misluk.'; + + // Types + $lang['strtype'] = 'Tipe'; + $lang['strtypes'] = 'Tipes'; + $lang['strshowalltypes'] = 'Wys alle tipes'; + $lang['strnotype'] = 'Geen tipe gevind.'; + $lang['strnotypes'] = 'Geen tipes gevind.'; + $lang['strcreatetype'] = 'skep tipe'; + $lang['strcreatecomptype'] = 'Skep saamgestelde tipe'; + $lang['strtypeneedsfield'] = 'Jy moet ten minste een veld spesifiseer.'; + $lang['strtypeneedscols'] = 'Jy \'n geldige aantal velde spesifiseer.'; + $lang['strtypename'] = 'Tipenaam'; + $lang['strinputfn'] = 'Toevoerfunksie'; + $lang['stroutputfn'] = 'Afvoerfunksie'; + $lang['strpassbyval'] = 'Aangestuur per waarde?'; + $lang['stralignment'] = 'Belyning'; + $lang['strelement'] = 'Element'; + $lang['strdelimiter'] = 'Skeidingsteken'; + $lang['strstorage'] = 'Berging'; + $lang['strfield'] = 'Veld'; + $lang['strnumfields'] = 'Aantal velde'; + $lang['strtypeneedsname'] = 'Jy moet die tipe \'n naam gee.'; + $lang['strtypeneedslen'] = 'Jy moet die tipe \'n lengte gee.'; + $lang['strtypecreated'] = 'Tipe geskep'; + $lang['strtypecreatedbad'] = 'Tipeskepping het misluk.'; + $lang['strconfdroptype'] = 'Is jy seker dat jy die tipe \"%s\" wil verwyder?'; + $lang['strtypedropped'] = 'Tipe is verwyder.'; + $lang['strtypedroppedbad'] = 'Verwydering van die tipe het misluk.'; + $lang['strflavor'] = 'Geur'; + $lang['strbasetype'] = 'Basis'; + $lang['strcompositetype'] = 'Saamgestel'; + $lang['strpseudotype'] = 'Pseudo'; + + // Schemas + $lang['strschema'] = 'Skema'; + $lang['strschemas'] = 'Skemas'; + $lang['strshowallschemas'] = 'Wys alle skemas'; + $lang['strnoschema'] = 'Geen skema gevind.'; + $lang['strnoschemas'] = 'Geen skemas gevind.'; + $lang['strcreateschema'] = 'Skep skema'; + $lang['strschemaname'] = 'Skemanaam'; + $lang['strschemaneedsname'] = 'Jy moet \'n naam gee vir die skema.'; + $lang['strschemacreated'] = 'Skema is geskep'; + $lang['strschemacreatedbad'] = 'Die skema kon nie geskep word nie.'; + $lang['strconfdropschema'] = 'Is jy seker dat jy die skema "%s" wil verwyder?'; + $lang['strschemadropped'] = 'Skema is verwyder.'; + $lang['strschemadroppedbad'] = 'Verwydering van die skema het misluk.'; + $lang['strschemaaltered'] = 'Skema is gewysig.'; + $lang['strschemaalteredbad'] = 'Skemawysiging het misluk.'; + $lang['strsearchpath'] = 'Skema-soekpad'; + + // Reports + $lang['strreport'] = 'Verslag'; + $lang['strreports'] = 'Verslae'; + $lang['strshowallreports'] = 'Wys alle verslae'; + $lang['strnoreports'] = 'Geen verslae gevind.'; + $lang['strcreatereport'] = 'Skep verslag'; + $lang['strreportdropped'] = 'Verslag is verwyder.'; + $lang['strreportdroppedbad'] = 'Verwydering van verslag het misluk.'; + $lang['strconfdropreport'] = 'Is jy seker dat jy die verslag "%s" wil verwyder?'; + $lang['strreportneedsname'] = 'Jy moet \'n naam gee vir die verslag.'; + $lang['strreportneedsdef'] = 'Jy moet SQL-kode skryf vir die verslag.'; + $lang['strreportcreated'] = 'Verslag is geskep.'; + $lang['strreportcreatedbad'] = 'Die verslag kon nie geskep word nie.'; + + // Domains + $lang['strdomain'] = 'Domein'; + $lang['strdomains'] = 'Domeine'; + $lang['strshowalldomains'] = 'Wys alle domeine'; + $lang['strnodomains'] = 'Geen domeine is gevind nie.'; + $lang['strcreatedomain'] = 'Skep domein'; + $lang['strdomaindropped'] = 'Domein is verwyder.'; + $lang['strdomaindroppedbad'] = 'Verwydering van domein het misluk.'; + $lang['strconfdropdomain'] = 'Is jy seker dat jy die domein "%s" wil verwyder?'; + $lang['strdomainneedsname'] = 'Jy moet \'n naam gee vir die domein.'; + $lang['strdomaincreated'] = 'Domein is geskep.'; + $lang['strdomaincreatedbad'] = 'Domeinskepping het misluk.'; + $lang['strdomainaltered'] = 'Domein is gewysig.'; + $lang['strdomainalteredbad'] = 'Wysiging van die domein het misluk.'; + + // Operators + $lang['stroperator'] = 'Operator'; + $lang['stroperators'] = 'Operatore'; + $lang['strshowalloperators'] = 'Wys alle operators'; + $lang['strnooperator'] = 'Geen operator is gevind nie.'; + $lang['strnooperators'] = 'Geen operators is gevind nie.'; + $lang['strcreateoperator'] = 'Skep operator'; + $lang['strleftarg'] = 'Linkerargumenttipe'; + $lang['strrightarg'] = 'Regterargumenttipe'; + $lang['strcommutator'] = 'Kommutator'; + $lang['strnegator'] = 'Negeerder'; + $lang['strrestrict'] = 'Beperk'; + $lang['strjoin'] = 'Join'; + $lang['strhashes'] = 'Hashes'; + $lang['strmerges'] = 'Merges'; + $lang['strleftsort'] = 'Linkssorteer'; + $lang['strrightsort'] = 'Regssorteer'; + $lang['strlessthan'] = 'Kleiner as'; + $lang['strgreaterthan'] = 'Groter as'; + $lang['stroperatorneedsname'] = 'Jy moet \'n naam gee vir die operator.'; + $lang['stroperatorcreated'] = 'Operator is geskep'; + $lang['stroperatorcreatedbad'] = 'Operatorskepping het misluk.'; + $lang['strconfdropoperator'] = 'Is jy seker dat jy die operator "%s" wil verwyder?'; + $lang['stroperatordropped'] = 'Operator is verwyder.'; + $lang['stroperatordroppedbad'] = 'Verwydering van die operator het misluk.'; + + // Casts + $lang['strcasts'] = 'Ekwivalente'; + $lang['strnocasts'] = 'Geen ekwivalente gevind.'; + $lang['strsourcetype'] = 'Brontipe'; + $lang['strtargettype'] = 'Doeltipe'; + $lang['strimplicit'] = 'Implisiet'; + $lang['strinassignment'] = 'Tydens toekenning'; + $lang['strbinarycompat'] = '(Binr-versoenbaar)'; + + // Conversions + $lang['strconversions'] = 'Omskakelings'; + $lang['strnoconversions'] = 'Geen omskakelings gevind.'; + $lang['strsourceencoding'] = 'Bron-enkodering'; + $lang['strtargetencoding'] = 'Doel-enkodering'; + + // Languages + $lang['strlanguages'] = 'Tale'; + $lang['strnolanguages'] = 'Geen tale gevind.'; + $lang['strtrusted'] = 'Betroubaar'; + + // Info + $lang['strnoinfo'] = 'Geen inligting beskikbaar.'; + $lang['strreferringtables'] = 'Verwysende tabelle'; + $lang['strparenttables'] = 'Parent-tabelle'; + $lang['strchildtables'] = 'Child-tabelle'; + + // Aggregates + $lang['straggregates'] = 'Opsommers'; + $lang['strnoaggregates'] = 'Geen opsommers gevind.'; + $lang['stralltypes'] = '(Alle tipes)'; + + // Operator Classes + $lang['stropclasses'] = 'Operatorklasse'; + $lang['strnoopclasses'] = 'Geen operatorklasse gevind.'; + $lang['straccessmethod'] = 'Toegangmetode'; + + // Stats and performance + $lang['strrowperf'] = 'Ry werkverrigting'; + $lang['strioperf'] = 'T/A werkverrigting'; + $lang['stridxrowperf'] = 'Indekseer-ry werkverrigting'; + $lang['stridxioperf'] = 'Indeks T/A werkverrigting'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Sekwensieel'; + $lang['strscan'] = 'Deursoek'; + $lang['strread'] = 'Lees'; + $lang['strfetch'] = 'Gaan haal'; + $lang['strheap'] = 'Hoop'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST-indeks'; + $lang['strcache'] = 'Kasgeheue'; + $lang['strdisk'] = 'Skyf'; + $lang['strrows2'] = 'Rye'; + + // Tablespaces + $lang['strtablespace'] = 'Tabelruimte'; + $lang['strtablespaces'] = 'Tabelruimtes'; + $lang['strshowalltablespaces'] = 'Wys alle tabelruimtes'; + $lang['strnotablespaces'] = 'Geen tabelruimtes gevind.'; + $lang['strcreatetablespace'] = 'Skep tabelruimte'; + $lang['strlocation'] = 'Plek'; + $lang['strtablespaceneedsname'] = 'Jy moet \'n naam gee vir jou tabelruimte.'; + $lang['strtablespaceneedsloc'] = 'Jy moet \'n gids gee om jou tabelruimte in te skep.'; + $lang['strtablespacecreated'] = 'Tabelruimte geskep.'; + $lang['strtablespacecreatedbad'] = 'Skep van tabelruimte het misluk.'; + $lang['strconfdroptablespace'] = 'Is jy seker jy wil die tabelruimte "%s" uitvee?'; + $lang['strtablespacedropped'] = 'Tabelruimte is uitgevee.'; + $lang['strtablespacedroppedbad'] = 'Uitvee van tabelruimte het misluk.'; + $lang['strtablespacealtered'] = 'Tabelruimte gewysig.'; + $lang['strtablespacealteredbad'] = 'Wysiging van tabelruimte het misluk.'; + + // Miscellaneous + $lang['strtopbar'] = '%s loop op %s:%s -- Jy is aangeteken as gebruiker "%s"'; + $lang['strtimefmt'] = 'jS M, Y g:iA'; + $lang['strhelp'] = 'Hulp'; + $lang['strhelpicon'] = '?'; + +?> + diff --git a/php/pgadmin/lang/arabic.php b/php/pgadmin/lang/arabic.php new file mode 100644 index 0000000..2e00ca9 --- /dev/null +++ b/php/pgadmin/lang/arabic.php @@ -0,0 +1,596 @@ +السابق'; + $lang['strnext'] = '<التالي'; + $lang['strfirst'] = '>>الأول'; + $lang['strlast'] = 'الأخير<<'; + $lang['strfailed'] = 'فشـل'; + $lang['strcreate'] = 'إنشاء'; + $lang['strcreated'] = 'تم الإنشاء'; + $lang['strcomment'] = 'ملاحظات'; + $lang['strlength'] = 'طول'; + $lang['strdefault'] = 'الإفتراضي'; + $lang['stralter'] = 'تعديلAlter'; + $lang['strok'] = 'موافق'; + $lang['strcancel'] = 'تراجع'; + $lang['strsave'] = 'حفظ'; + $lang['strreset'] = 'إعادة Reset'; + $lang['strinsert'] = 'إدراج Insert'; + $lang['strselect'] = 'إختيار Select'; + $lang['strdelete'] = 'حذف Delete'; + $lang['strupdate'] = 'تعديل Update'; + $lang['strreferences'] = 'مراجع'; + $lang['stryes'] = 'نعم'; + $lang['strno'] = 'لا'; + $lang['strtrue'] = 'صحيح TRUE'; + $lang['strfalse'] = 'خاطئ FALSE'; + $lang['stredit'] = 'تحرير'; + $lang['strcolumns'] = 'أعمدة Columns'; + $lang['strrows'] = 'سجل/سجلات'; + $lang['strrowsaff'] = 'سجل تأثر/سجلات تأثرت'; + $lang['strobjects'] = 'object(s)'; + $lang['strexample'] = 'مثلا'; + $lang['strback'] = 'رجوع للخلف'; + $lang['strqueryresults'] = 'نتائج الإستعلام'; + $lang['strshow'] = 'اعرض'; + $lang['strempty'] = 'إفراغ Empty'; + $lang['strlanguage'] = 'اللغة'; + $lang['strencoding'] = 'الشيفرة Encoding'; + $lang['strvalue'] = 'القيمة Value'; + $lang['strunique'] = 'فريد Unique'; + $lang['strprimary'] = 'رئيسي Primary'; + $lang['strexport'] = 'تصدير Export'; + $lang['strimport'] = 'إستيراد Import'; + $lang['strsql'] = 'SQL'; + $lang['strgo'] = 'Go'; + $lang['stradmin'] = 'إدارة Admin'; + $lang['strvacuum'] = 'Vacuum'; + $lang['stranalyze'] = 'Analyze'; + $lang['strclusterindex'] = 'Cluster'; + $lang['strclustered'] = 'Clustered?'; + $lang['strreindex'] = 'Reindex'; + $lang['strrun'] = 'Run'; + $lang['stradd'] = 'إضافة'; + $lang['strevent'] = 'Event'; + $lang['strwhere'] = 'Where'; + $lang['strinstead'] = 'Do Instead'; + $lang['strwhen'] = 'When'; + $lang['strformat'] = 'Format'; + $lang['strdata'] = 'Data'; + $lang['strconfirm'] = 'تأكيد'; + $lang['strexpression'] = 'تعبير'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'إفتح'; + $lang['strcollapse'] = 'سكّر'; + $lang['strexplain'] = 'Explain'; + $lang['strexplainanalyze'] = 'Explain Analyze'; + $lang['strfind'] = 'بحث'; + $lang['stroptions'] = 'خيارات'; + $lang['strrefresh'] = 'تحديث Refresh'; + $lang['strdownload'] = 'تنزيل'; + $lang['strdownloadgzipped'] = 'تنزيل على شكل ملف مضغوط بـ gzip'; + $lang['strinfo'] = 'Info'; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = 'Advanced'; + $lang['strvariables'] = 'Variables'; + $lang['strprocess'] = 'العملية Process'; + $lang['strprocesses'] = 'العمليات Processes'; + $lang['strsetting'] = 'Setting'; + $lang['streditsql'] = 'Edit SQL'; + $lang['strruntime'] = 'Total runtime: %s ms'; + $lang['strpaginate'] = 'Paginate results'; + $lang['struploadscript'] = 'or upload an SQL script:'; + $lang['strstarttime'] = 'Start Time'; + $lang['strfile'] = 'ملف'; + $lang['strfileimported'] = 'تم استيراد الملف.'; + + // Error handling + $lang['strbadconfig'] = 'إن الملف config.inc.php الذي لديك اصبح قديما. ستحتاج الى إعادة توليده من الملف الجديد config.inc.php-dist.'; + $lang['strnotloaded'] = 'إن اعداد PHP الموجود على هذا الخادم لاتدعم PostgreSQL. تحتاج الى اعادة تثبيت PHP بإستخدام الخيار --with-pgsql configure option.'; + $lang['strpostgresqlversionnotsupported'] = 'هذا الاصدار من PostgreSQL غير مدعوم. الرجاء الترقية الى الإصدار %s او أعلى.'; + $lang['strbadschema'] = 'Invalid schema specified.'; + $lang['strbadencoding'] = 'لقد فشل ضبط شيفرة العميل client encoding في قاعدة البيانات.'; + $lang['strsqlerror'] = 'خطأ SQL:'; + $lang['strinstatement'] = 'في الجملة statement:'; + $lang['strinvalidparam'] = 'Invalid script parameters.'; + $lang['strnodata'] = 'لم توجد سجلات.'; + $lang['strnoobjects'] = 'لم توجد كائنات.'; + $lang['strrownotunique'] = 'لا يوجد معرّف فريد unique identifier في هذا السجل.'; + $lang['strnoreportsdb'] = 'لم تقم بإنشاء قاعدة بيانات التقارير reports database. إقرأ التعليمات في المف INSTALL.'; + $lang['strnouploads'] = 'تحميل الملفات غير مفعّل.'; + $lang['strimporterror'] = 'خطأ في الإستيراد.'; + $lang['strimporterrorline'] = 'خطأ في الإستيراد عند السطر: %s.'; + + // Tables + $lang['strtable'] = 'جدول Table'; + $lang['strtables'] = 'جداول Tables'; + $lang['strshowalltables'] = 'أعرض جميع الجداول Tables.'; + $lang['strnotables'] = 'لا يوجد جداول.'; + $lang['strnotable'] = 'لا يوجد جدول.'; + $lang['strcreatetable'] = 'إنشاء جدول Table جديد.'; + $lang['strtablename'] = 'إسم الجدول'; + $lang['strtableneedsname'] = 'يجب إعطاء إسم للجدول.'; + $lang['strtableneedsfield'] = 'يجب عليك تحديد على الأقل حقل واحد.'; + $lang['strtableneedscols'] = 'الجداول تتطلب عدد مقبول من الأعمدة.'; + $lang['strtablecreated'] = 'لقد تم إنشاء الجدول بنجاح.'; + $lang['strtablecreatedbad'] = 'لقد فشلت عملية إنشاء الجدول.'; + $lang['strconfdroptable'] = 'هل انت متأكد تريد حذف الجدول بإسم "%s"؟'; + $lang['strtabledropped'] = 'لقد تم حذف الجدول.'; + $lang['strtabledroppedbad'] = 'لقد فشلت عملية حذف الجدول.'; + $lang['strconfemptytable'] = 'هل انت متأكد تريد افراغ محتويات الجدول "%s"؟'; + $lang['strtableemptied'] = 'لقد تم افراغ محتويات الجدول بنجاح.'; + $lang['strtableemptiedbad'] = 'لقد فشلت عملية إفراغ محتويات الجدول.'; + $lang['strinsertrow'] = 'إدراج سجل.'; + $lang['strrowinserted'] = 'لقد تم إدراج السجل بنجاح.'; + $lang['strrowinsertedbad'] = 'لقد فشلت عملية إدراج السجل.'; + $lang['streditrow'] = 'تحرير السجل.'; + $lang['strrowupdated'] = 'تم تعديل السجل بنجاح.'; + $lang['strrowupdatedbad'] = 'لقد فشلت عملية تعديل السجل.'; + $lang['strdeleterow'] = 'إحذف السجل.'; + $lang['strconfdeleterow'] = 'هل انت متأكد تريد حذف هذا السجل؟'; + $lang['strrowdeleted'] = 'لقد تم حذف السجل بنجاح.'; + $lang['strrowdeletedbad'] = 'لقد فشلت عملية حذف السجل.'; + $lang['strinsertandrepeat'] = 'إدراج و إعادة'; + $lang['strfield'] = 'الحقل'; + $lang['strnumfields'] = 'عدد الحقول'; + $lang['strselectallfields'] = 'إختيار جميع الحقول'; + $lang['strselectneedscol'] = 'تحتاج عرض على الأقل عمود واحد.'; + $lang['strselectunary'] = 'العمليات الأحادية Unary operators لا يمكن ان يكون لها قيم.'; + $lang['straltercolumn'] = 'تعديل العمود'; + $lang['strcolumnaltered'] = 'لقد تم تعديل العمود بنجاح.'; + $lang['strcolumnalteredbad'] = 'لقد فشلت عملية تعديل العمود.'; + $lang['strconfdropcolumn'] = 'هل انت متأكد تريد حذف العمود "%s" من الجدول "%s"؟'; + $lang['strcolumndropped'] = 'لقد تم حذف العمود بنجاح.'; + $lang['strcolumndroppedbad'] = 'لقد فشلت عملية حذف العمود.'; + $lang['straddcolumn'] = 'إضافة عمود.'; + $lang['strcolumnadded'] = 'لقد تمت إضافة العمود بنجاح.'; + $lang['strcolumnaddedbad'] = 'لقد فشلت عملية إضافة العمود.'; + $lang['strcascade'] = 'CASCADE'; + $lang['strtablealtered'] = 'لقد تم تعديل الجدول بنجاح.'; + $lang['strtablealteredbad'] = 'لقد فشلت عملية تعديل الجدول.'; + $lang['strdataonly'] = 'البيانات فقط'; + $lang['strstructureonly'] = 'الهيكلية فقط'; + $lang['strstructureanddata'] = 'الهيكلية والبيانات'; + $lang['strtabbed'] = 'Tabbed'; + $lang['strauto'] = 'Auto'; + + // Users + $lang['struser'] = 'المستخدم'; + $lang['strusers'] = 'المستخدمين'; + $lang['strusername'] = 'إسم المستخدم'; + $lang['strpassword'] = 'كلمة السر'; + $lang['strsuper'] = 'مستخدم ذو صلاحيّات عليا؟'; + $lang['strcreatedb'] = 'إنشاء قاعدة بيانات؟'; + $lang['strexpires'] = 'ينتهي'; + $lang['strsessiondefaults'] = 'Session defaults'; + $lang['strnousers'] = 'لم يوجد مستخدمين.'; + $lang['struserupdated'] = 'تم تعديل المستخدم بنجاح.'; + $lang['struserupdatedbad'] = 'فشل تعديل المستخدم.'; + $lang['strshowallusers'] = 'عرض جميع المستخدمين'; + $lang['strcreateuser'] = 'إضافة مستخدم جديد'; + $lang['struserneedsname'] = 'يجب إعطاء إسم للمستخدم.'; + $lang['strusercreated'] = 'تمت عملية إضافة المستخدم بنجاح.'; + $lang['strusercreatedbad'] = 'فشلت عملية إضافة المستخدم.'; + $lang['strconfdropuser'] = 'هل انت متأكد تريد حذف المستخدم "%s"؟'; + $lang['struserdropped'] = 'تم حذف المستخدم بنجاح.'; + $lang['struserdroppedbad'] = 'فشلت عملية حذف المستخدم.'; + $lang['straccount'] = 'Account'; + $lang['strchangepassword'] = 'تغيير كلمة السر'; + $lang['strpasswordchanged'] = 'تم تغيير كلمة السر بنجاح.'; + $lang['strpasswordchangedbad'] = 'لم ينجح تغيير كلمة السر.'; + $lang['strpasswordshort'] = 'كلمة السر أقصر من الحد الأدنى.'; + $lang['strpasswordconfirm'] = 'كلمة السر المدخلة لم تتطابق مع تأكيد كلمة السر.'; + + // Groups + $lang['strgroup'] = 'المجموعة'; + $lang['strgroups'] = 'المجموعات'; + $lang['strnogroup'] = 'لم توجد المجموعة.'; + $lang['strnogroups'] = 'لم توجد مجموعات.'; + $lang['strcreategroup'] = 'إضافة مجموعة جديدة'; + $lang['strshowallgroups'] = 'عرض جميع المجموعات'; + $lang['strgroupneedsname'] = 'يجب إعطاء إسم للمجموعة.'; + $lang['strgroupcreated'] = 'لقد تمت إضافة المجموعة بنجاح.'; + $lang['strgroupcreatedbad'] = 'لقد فشلت عملية إضافة المجموعة.'; + $lang['strconfdropgroup'] = 'هل انت متأكد تريد حذف المجموعة "%s"؟'; + $lang['strgroupdropped'] = 'تم حذف المجموعة بنجاح.'; + $lang['strgroupdroppedbad'] = 'لقد فشلت عملية حذف المجموعة.'; + $lang['strmembers'] = 'الأعضاء'; + $lang['straddmember'] = 'إضافة عضو'; + $lang['strmemberadded'] = 'تمت إضافة العضو.'; + $lang['strmemberaddedbad'] = 'لقد فشلت عملية إضافة العضو.'; + $lang['strdropmember'] = 'حذف عضو'; + $lang['strconfdropmember'] = 'هل أنت متأكد تريد حذف العضو "%s" من المجموعة "%s"؟'; + $lang['strmemberdropped'] = 'تم حذف العضو.'; + $lang['strmemberdroppedbad'] = 'لقد فشل حذف العضو.'; + + // Privileges + $lang['strprivilege'] = 'الصلاحيّة'; + $lang['strprivileges'] = 'الصلاحيات'; + $lang['strnoprivileges'] = 'هذا الكائن لديه صلاحيّات المالك الإفتراضية.'; + $lang['strgrant'] = 'تصريح Grant'; + $lang['strrevoke'] = 'سحب Revoke'; + $lang['strgranted'] = 'تم تغيير الصلاحيات.'; + $lang['strgrantfailed'] = 'لقد فشل تغيير الصلاحيات.'; + $lang['strgrantbad'] = 'يجب عليك تحديد على الاقل مستخدم واحد او مجموعة واحدة و على الأقل صلاحيّة واحدة.'; + $lang['strgrantor'] = 'المصرّح Grantor'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'قاعدة بيانات'; + $lang['strdatabases'] = 'قواعد البيانات'; + $lang['strshowalldatabases'] = 'عرض جميع قواعد البيانات'; + $lang['strnodatabase'] = 'لم يوجد قاعدة بيانات.'; + $lang['strnodatabases'] = 'لم يوجد قواعد بيانات.'; + $lang['strcreatedatabase'] = 'إنشاء قاعدة بيانات جديدة'; + $lang['strdatabasename'] = 'إسم قاعدة البيانات'; + $lang['strdatabaseneedsname'] = 'يجب عليك إعطاء إسم لقاعدة البيانات.'; + $lang['strdatabasecreated'] = 'تم إنشاء قاعدة البيانات بنجاح.'; + $lang['strdatabasecreatedbad'] = 'فشل إنشاء قاعدة البيانات.'; + $lang['strconfdropdatabase'] = 'هل أنت متأكد تريد حذف قاعدة البيانات بإسم "%s"?'; + $lang['strdatabasedropped'] = 'تم حذف قاعدة البيانات.'; + $lang['strdatabasedroppedbad'] = 'لقد فشلت عملية حذف قاعدة البيانات.'; + $lang['strentersql'] = 'أدخل الـSQL الذي تريد إستدعاءه هنا:'; + $lang['strsqlexecuted'] = 'تم إستدعاء الـSQL.'; + $lang['strvacuumgood'] = 'تمت عملية الـVacuum.'; + $lang['strvacuumbad'] = 'لقد فشلت عملية الـVacuum.'; + $lang['stranalyzegood'] = 'تمت عملية الفحص.'; + $lang['stranalyzebad'] = 'لقد فشلت عملية الفحص.'; + $lang['strreindexgood'] = 'تمت عملية إعادة الفهرسة بنجاح.'; + $lang['strreindexbad'] = 'لقد فشلت عملية إعادة الفهرسة.'; + $lang['strfull'] = 'Full'; + $lang['strfreeze'] = 'Freeze'; + $lang['strforce'] = 'Force'; + + // Views + $lang['strview'] = 'View عرض'; + $lang['strviews'] = 'عروض Views'; + $lang['strshowallviews'] = 'أعرض جميع العروض Views.'; + $lang['strnoview'] = 'لم يوجد عرض View.'; + $lang['strnoviews'] = 'لم يوجد عروض Views.'; + $lang['strcreateview'] = 'إنشاء عرض View جديد'; + $lang['strviewname'] = 'إسم العرض View'; + $lang['strviewneedsname'] = 'يجب إعطاء إسم للعرض View.'; + $lang['strviewneedsdef'] = 'يجب عليك إعطاء تعريف للعرض View.'; + $lang['strviewneedsfields'] = 'يجب عليك تحديد الحقول التي تريدها في العرض View.'; + $lang['strviewcreated'] = 'تم إنشاء العرض View.'; + $lang['strviewcreatedbad'] = 'فشلت عملية إنشاء العرض View.'; + $lang['strconfdropview'] = 'هل انت متأكد تريد حذف العرض View بإسم "%s"'; + $lang['strviewdropped'] = 'تم حذف العرض View.'; + $lang['strviewdroppedbad'] = 'لقد فشلت عملية حذف العرض View.'; + $lang['strviewupdated'] = 'تم تحديث العرض View بنجاح.'; + $lang['strviewupdatedbad'] = 'لقد فشلت عملية تحديث العرض View.'; + $lang['strviewlink'] = 'Linking Keys'; + $lang['strviewconditions'] = 'Additional Conditions'; + $lang['strcreateviewwiz'] = 'إنشاء عرض View بإستخدام الساحر Wizard.'; + + // Sequences + $lang['strsequence'] = 'تسلسل Sequence'; + $lang['strsequences'] = 'تسلسلات Sequences'; + $lang['strshowallsequences'] = 'عرض جميع التسلسلات'; + $lang['strnosequence'] = 'لم يوجد تسلسل.'; + $lang['strnosequences'] = 'لم يوجد تسلسلات.'; + $lang['strcreatesequence'] = 'إنشاء تسلسل جديد'; + $lang['strlastvalue'] = 'آخر قيمة'; + $lang['strincrementby'] = 'مقدار الزيادة Increment by'; + $lang['strstartvalue'] = 'قيمة البداية'; + $lang['strmaxvalue'] = 'القيمة القصوى'; + $lang['strminvalue'] = 'القيمة الدنيا'; + $lang['strcachevalue'] = 'Cache value'; + $lang['strlogcount'] = 'Log count'; + $lang['striscycled'] = 'Is cycled?'; + $lang['strsequenceneedsname'] = 'يجب إعطاء إسم للتسلسل sequence.'; + $lang['strsequencecreated'] = 'تم إنشاء التسلسل بنجاح.'; + $lang['strsequencecreatedbad'] = 'لقد فشل إنشاء التسلسل.'; + $lang['strconfdropsequence'] = 'هل أنت متأكد تريد حذف التسلسل بإسم "%s"؟'; + $lang['strsequencedropped'] = 'لقد تم حذف التسلسل بنجاح.'; + $lang['strsequencedroppedbad'] = 'لقد فشلت عملية حذف التسلسل.'; + $lang['strsequencereset'] = 'لقد تمت إعادة التسلسل بنجاح.'; + $lang['strsequenceresetbad'] = 'لقد فشلت إعادة التسلسل.'; + + // Indexes + $lang['strindex'] = 'فهرسIndex'; + $lang['strindexes'] = 'فهارسIndexes'; + $lang['strindexname'] = 'إسم الفهرس Index'; + $lang['strshowallindexes'] = 'عرض جميع الفهارس indexes'; + $lang['strnoindex'] = 'لم يوجد فهرس index.'; + $lang['strnoindexes'] = 'لم توجد فهارس indexes.'; + $lang['strcreateindex'] = 'إنشاء فهرس index جديد'; + $lang['strtabname'] = 'Tab name'; + $lang['strcolumnname'] = 'إسم العمود'; + $lang['strindexneedsname'] = 'يجب عليك إعطاء إسم للفهرس index.'; + $lang['strindexneedscols'] = 'الفهارس تتطلب عدد مقبول من الأعمدة.'; + $lang['strindexcreated'] = 'لقد تم إنشاء الفهرس بنجاح.'; + $lang['strindexcreatedbad'] = 'فشل إنشاء الفهرس.'; + $lang['strconfdropindex'] = 'هل انت متأكد تريد حذف الفهرس بإسم "%s"؟'; + $lang['strindexdropped'] = 'لقد تم حذف الفهرس بنجاح.'; + $lang['strindexdroppedbad'] = 'فشلت عملية حذف الفهرس.'; + $lang['strkeyname'] = 'إسم المفتاح Key'; + $lang['struniquekey'] = 'مفتاح فريد Unique key'; + $lang['strprimarykey'] = 'مفتاح رئيسي Primary key'; + $lang['strindextype'] = 'نوع الفهرس'; + $lang['strtablecolumnlist'] = 'الأعمدة في الجدول'; + $lang['strindexcolumnlist'] = 'الأعمدة في الفهرس'; + $lang['strconfcluster'] = 'Are you sure you want to cluster "%s"?'; + $lang['strclusteredgood'] = 'Cluster complete.'; + $lang['strclusteredbad'] = 'Cluster failed.'; + + // Rules + $lang['strrules'] = 'قواعد Rules'; + $lang['strrule'] = 'قاعدة Rule'; + $lang['strshowallrules'] = 'عرض جميع القواعد'; + $lang['strnorule'] = 'لم توجد قاعدة.'; + $lang['strnorules'] = 'لم توجد قواعد.'; + $lang['strcreaterule'] = 'إنشاء قاعدة rule جديدة'; + $lang['strrulename'] = 'إسم القاعدة rule name'; + $lang['strruleneedsname'] = 'يجب عليك إعطاء إسم للقاعدة rule.'; + $lang['strrulecreated'] = 'تم إنشاء القاعدة بنجاح.'; + $lang['strrulecreatedbad'] = 'فشل إنشاء القاعدة.'; + $lang['strconfdroprule'] = 'هل أنت متأكد تريد حذف القاعدة "%s" على "%s"؟'; + $lang['strruledropped'] = 'تم حذف القاعدة.'; + $lang['strruledroppedbad'] = 'فشل حذف القاعدة.'; + + // Constraints + $lang['strconstraints'] = 'قيود Constraints'; + $lang['strshowallconstraints'] = 'عرض جميع القيود constraints'; + $lang['strnoconstraints'] = 'لم يوجد قيود constraints.'; + $lang['strcreateconstraint'] = 'إنشاء قيد constraint جديد'; + $lang['strconstraintcreated'] = 'تم إنشاء القيد بنجاح.'; + $lang['strconstraintcreatedbad'] = 'فشل إنشاء القيد.'; + $lang['strconfdropconstraint'] = 'هل أنت متأكد تريد حذف القيد "%s" على "%s"؟'; + $lang['strconstraintdropped'] = 'تم حذف القيد بنجاح.'; + $lang['strconstraintdroppedbad'] = 'فشل حذف القيد.'; + $lang['straddcheck'] = 'إضافة فحص check'; + $lang['strcheckneedsdefinition'] = 'قيد الفحص يحتاج لتعريف.'; + $lang['strcheckadded'] = 'تم إضافة قيد الفحص بنحاح.'; + $lang['strcheckaddedbad'] = 'فشلت إضافة قيد الفحص.'; + $lang['straddpk'] = 'primary key إضافة مفتاح رئيسي.'; + $lang['strpkneedscols'] = 'المفتاح الرئيسي يتطلب على الأقل عمود واحد.'; + $lang['strpkadded'] = 'تمت إضافة المفتاح الرئيسي بنجاح.'; + $lang['strpkaddedbad'] = 'فشلت إضافة المفتاح الرئيسي.'; + $lang['stradduniq'] = 'unique key إضافة مفتاح فريد'; + $lang['struniqneedscols'] = 'المفتاح الفريد يتطلب عمود واحد على الأقل.'; + $lang['struniqadded'] = 'تمت إضافة المفتاح الفريد بنجاح.'; + $lang['struniqaddedbad'] = 'فشلت إضافة المفتاح الفريد.'; + $lang['straddfk'] = 'إضافة مفتاح خارجيforeign key'; + $lang['strfkneedscols'] = 'المفتاح الخارجي يتطلب عمود واحد على الأقل.'; + $lang['strfkneedstarget'] = 'المفتاح الخارجي يحتاج الى جدول هدف.'; + $lang['strfkadded'] = 'تمت إضافة المفتاح الخارجي بنجاح.'; + $lang['strfkaddedbad'] = 'فشلت إضافة المفتاح الخارجي.'; + $lang['strfktarget'] = 'الجدول الهدف Target table'; + $lang['strfkcolumnlist'] = 'الأعمدة في المفتاح'; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + + // Functions + $lang['strfunction'] = 'دالة Function'; + $lang['strfunctions'] = 'دوال Functions'; + $lang['strshowallfunctions'] = 'عرض جميع الدوال functions'; + $lang['strnofunction'] = 'لم توجد دالة function.'; + $lang['strnofunctions'] = 'لم توجد دوال functions.'; + $lang['strfunctionname'] = 'إسم الدالة function name'; + $lang['strreturns'] = 'Returns'; + $lang['strarguments'] = 'Arguments'; + $lang['strproglanguage'] = 'لغة برمجة'; + $lang['strfunctionneedsname'] = 'يجب عليك إعطاء إسم للدالة function.'; + $lang['strfunctionneedsdef'] = 'يجب عليك اعطاء تعريف للدالة function definition.'; + $lang['strfunctioncreated'] = 'تم إنشاء الدالة function بنجاح.'; + $lang['strfunctioncreatedbad'] = 'لقد فشل إنشاء الدالة.'; + $lang['strconfdropfunction'] = 'هل أنت متأكد تريد حذف الدالة function بإسم "%s"?'; + $lang['strfunctiondropped'] = 'تم حذف الدالة function بنجاح.'; + $lang['strfunctiondroppedbad'] = 'لقد فشلت عملية حذف الدالة function.'; + $lang['strfunctionupdated'] = 'لقد تم تعديل الدالة function.'; + $lang['strfunctionupdatedbad'] = 'لقد فشل تعديل الدالة function.'; + + // Triggers + $lang['strtrigger'] = 'محفّز Trigger'; + $lang['strtriggers'] = 'محفّزات Triggers'; + $lang['strshowalltriggers'] = 'عرض جميع المحفزات triggers'; + $lang['strnotrigger'] = 'لم يوجد المحفز trigger.'; + $lang['strnotriggers'] = 'لم يوجد محفزات triggers.'; + $lang['strcreatetrigger'] = 'إنشاء محفّز trigger جديد'; + $lang['strtriggerneedsname'] = 'يجب إعطاء اسم للمحفز.'; + $lang['strtriggerneedsfunc'] = 'يجب تحديد دالة function للمحفز.'; + $lang['strtriggercreated'] = 'تم إنشاء المحفز بنجاح.'; + $lang['strtriggercreatedbad'] = 'لقد فشلت عملية إنشاء المحفز.'; + $lang['strconfdroptrigger'] = 'هل أنت متأكد تريد حذف المحفّز trigger "%s" على "%s"؟'; + $lang['strtriggerdropped'] = 'تم حذف المحفز.'; + $lang['strtriggerdroppedbad'] = 'فشل حذف المحفز، لم يتم الحذف.'; + $lang['strtriggeraltered'] = 'تم تعديل المحفز بنجاح.'; + $lang['strtriggeralteredbad'] = 'فشلت عملية تعديل المحفز. لم يتم التعديل.'; + + // Types + $lang['strtype'] = 'نوع Type'; + $lang['strtypes'] = 'أنواع Types'; + $lang['strshowalltypes'] = 'عرض جميع الأنواع'; + $lang['strnotype'] = 'لم يوجد النوع.'; + $lang['strnotypes'] = 'لم يوجد أنواع.'; + $lang['strcreatetype'] = 'إنشاء نوع جديد.'; + $lang['strtypename'] = 'إسم النوع'; + $lang['strinputfn'] = 'دالة الإدخال Input function'; + $lang['stroutputfn'] = 'دالة الإخراج Output function'; + $lang['strpassbyval'] = 'Passed by val?'; + $lang['stralignment'] = 'Alignment'; + $lang['strelement'] = 'Element'; + $lang['strdelimiter'] = 'Delimiter'; + $lang['strstorage'] = 'Storage'; + $lang['strtypeneedsname'] = 'يجب إعطاء إسم للنوع.'; + $lang['strtypeneedslen'] = 'يجب إعطاء طول للنوع.'; + $lang['strtypecreated'] = 'تم إنشاء النوع'; + $lang['strtypecreatedbad'] = 'فشل إنشاء النوع.'; + $lang['strconfdroptype'] = 'هل أنت متأكد تريد حذف النوع "%s"؟'; + $lang['strtypedropped'] = 'تم حذف النوع.'; + $lang['strtypedroppedbad'] = 'فشلت عملية حذف النوع.'; + + // Schemas + $lang['strschema'] = 'مخطط Schema'; + $lang['strschemas'] = 'المخططات Schemas'; + $lang['strshowallschemas'] = 'عرض جميع المخططات schemas'; + $lang['strnoschema'] = 'لم يوجد مخطط schema.'; + $lang['strnoschemas'] = 'لم توجد مخططات schemas.'; + $lang['strcreateschema'] = 'إنشاء مخطط schema جديد'; + $lang['strschemaname'] = 'إسم المخطط'; + $lang['strschemaneedsname'] = 'يجب عليك إعطاء إسم للمخطط.'; + $lang['strschemacreated'] = 'لقد تم انشاء المخطط بنجاح.'; + $lang['strschemacreatedbad'] = 'فشل إنشاء المخطط.'; + $lang['strconfdropschema'] = 'هل أنت متأكد تريد حذف المخطط Schema بإسم "%s"؟'; + $lang['strschemadropped'] = 'تم حذف المخطط.'; + $lang['strschemadroppedbad'] = 'فشلت عملية الحذف للمخطط.'; + $lang['strschemaaltered'] = 'تم تعديل المخطط.'; + $lang['strschemaalteredbad'] = 'فشلت عملية تعديل المخطط، لم يتم التعديل.'; + + // Reports + $lang['strreport'] = 'تقرير Report'; + $lang['strreports'] = 'تقارير Reports'; + $lang['strshowallreports'] = 'عرض جميع التقارير'; + $lang['strnoreports'] = 'لم توجد تقارير.'; + $lang['strcreatereport'] = 'إنشاء تقرير جديد'; + $lang['strreportdropped'] = 'تم حذف التقرير.'; + $lang['strreportdroppedbad'] = 'فشلت عملية حذف التقرير.'; + $lang['strconfdropreport'] = 'هل أنت متأكد تريد حذف التقرير "%s"؟'; + $lang['strreportneedsname'] = 'يجب إعطاء اسم للتقرير.'; + $lang['strreportneedsdef'] = 'يجب كتابة عبارة SQL للتقرير.'; + $lang['strreportcreated'] = 'تم حفظ التقرير.'; + $lang['strreportcreatedbad'] = 'لم يتم حفظ التقرير، لقد فشلت عملية الحفظ.'; + + // Domains + $lang['strdomain'] = 'نطاق Domain'; + $lang['strdomains'] = 'نطاقات Domains'; + $lang['strshowalldomains'] = 'عرض جيع النطاقات'; + $lang['strnodomains'] = 'لم يوجد نطاقات.'; + $lang['strcreatedomain'] = 'إنشاء نطاق جديد'; + $lang['strdomaindropped'] = 'تم حذف النطاق.'; + $lang['strdomaindroppedbad'] = 'لقد فشل حذف النطاق، لم يتم الحذف.'; + $lang['strconfdropdomain'] = 'هل أنت متأكد تريد حذف النطاق domain بإسم "%s"؟'; + $lang['strdomainneedsname'] = 'يجب إعطاء إسم للنطاق.'; + $lang['strdomaincreated'] = 'تم إنشاء النطاق بنجاح.'; + $lang['strdomaincreatedbad'] = 'لم يتم إنشاء النطاق، فشلت العملية.'; + $lang['strdomainaltered'] = 'تم تعديل النطاق.'; + $lang['strdomainalteredbad'] = 'فشلت عملية تعديل النطاق.'; + + // Operators + $lang['stroperator'] = 'Operator'; + $lang['stroperators'] = 'Operators'; + $lang['strshowalloperators'] = 'Show all operators'; + $lang['strnooperator'] = 'No operator found.'; + $lang['strnooperators'] = 'No operators found.'; + $lang['strcreateoperator'] = 'Create operator'; + $lang['strleftarg'] = 'Left Arg Type'; + $lang['strrightarg'] = 'Right Arg Type'; + $lang['strcommutator'] = 'Commutator'; + $lang['strnegator'] = 'Negator'; + $lang['strrestrict'] = 'Restrict'; + $lang['strjoin'] = 'Join'; + $lang['strhashes'] = 'Hashes'; + $lang['strmerges'] = 'Merges'; + $lang['strleftsort'] = 'Left sort'; + $lang['strrightsort'] = 'Right sort'; + $lang['strlessthan'] = 'Less than'; + $lang['strgreaterthan'] = 'Greater than'; + $lang['stroperatorneedsname'] = 'You must give a name for your operator.'; + $lang['stroperatorcreated'] = 'Operator created'; + $lang['stroperatorcreatedbad'] = 'Operator creation failed.'; + $lang['strconfdropoperator'] = 'Are you sure you want to drop the operator "%s"?'; + $lang['stroperatordropped'] = 'Operator dropped.'; + $lang['stroperatordroppedbad'] = 'Operator drop failed.'; + + // Casts + $lang['strcasts'] = 'Casts'; + $lang['strnocasts'] = 'No casts found.'; + $lang['strsourcetype'] = 'Source type'; + $lang['strtargettype'] = 'Target type'; + $lang['strimplicit'] = 'Implicit'; + $lang['strinassignment'] = 'In assignment'; + $lang['strbinarycompat'] = '(Binary compatible)'; + + // Conversions + $lang['strconversions'] = 'Conversions'; + $lang['strnoconversions'] = 'No conversions found.'; + $lang['strsourceencoding'] = 'Source encoding'; + $lang['strtargetencoding'] = 'Target encoding'; + + // Languages + $lang['strlanguages'] = 'Languages'; + $lang['strnolanguages'] = 'No languages found.'; + $lang['strtrusted'] = 'Trusted'; + + // Info + $lang['strnoinfo'] = 'No information available.'; + $lang['strreferringtables'] = 'Referring tables'; + $lang['strparenttables'] = 'Parent tables'; + $lang['strchildtables'] = 'Child tables'; + + // Aggregates + $lang['straggregates'] = 'Aggregates'; + $lang['strnoaggregates'] = 'No aggregates found.'; + $lang['stralltypes'] = '(All types)'; + + // Operator Classes + $lang['stropclasses'] = 'Op Classes'; + $lang['strnoopclasses'] = 'No operator classes found.'; + $lang['straccessmethod'] = 'Access method'; + + // Stats and performance + $lang['strrowperf'] = 'Row Performance'; + $lang['strioperf'] = 'I/O Performance'; + $lang['stridxrowperf'] = 'Index Row Performance'; + $lang['stridxioperf'] = 'Index I/O Performance'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Sequential'; + $lang['strscan'] = 'Scan'; + $lang['strread'] = 'Read'; + $lang['strfetch'] = 'Fetch'; + $lang['strheap'] = 'Heap'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST Index'; + $lang['strcache'] = 'Cache'; + $lang['strdisk'] = 'Disk'; + $lang['strrows2'] = 'Rows'; + + // Miscellaneous + $lang['strtopbar'] = '%s يعمل على %s:%s -- You are logged in as user "%s"'; + $lang['strtimefmt'] = 'jS M, Y g:iA'; + $lang['strhelp'] = 'مساعدة'; + +?> diff --git a/php/pgadmin/lang/catalan.php b/php/pgadmin/lang/catalan.php new file mode 100644 index 0000000..6131bef --- /dev/null +++ b/php/pgadmin/lang/catalan.php @@ -0,0 +1,1023 @@ + + * + * $Id: catalan.php,v 1.4 2008/03/14 03:31:43 xzilla Exp $ + */ + + // Language and character set + $lang['applang'] = 'Català'; + $lang['appcharset'] = 'UTF-8'; + $lang['applocale'] = 'ca_ES'; + $lang['appdbencoding'] = 'UNICODE'; + $lang['applangdir'] = 'ltr'; + + // Welcome + $lang['strintro'] = 'Benvingut a phpPgAdmin.'; + $lang['strppahome'] = 'Pàgina web de phpPgAdmin'; + $lang['strpgsqlhome'] = 'Pàgina web de PostgreSQL'; + $lang['strpgsqlhome_url'] = 'http://www.postgresql.org/'; + $lang['strlocaldocs'] = 'Documentació PostgreSQL (local)'; + $lang['strreportbug'] = 'Reportar un Bug'; + $lang['strviewfaq'] = 'Veure FAQ online'; + $lang['strviewfaq_url'] = 'http://phppgadmin.sourceforge.net/?page=faq'; + + // Basic strings + $lang['strlogin'] = 'Entrada'; + $lang['strloginfailed'] = 'Entrada fallida'; + $lang['strlogindisallowed'] = 'Entrada rebutjada per raons de seguretat.'; + $lang['strserver'] = 'Servidor'; + $lang['strservers'] = 'Servidors'; + $lang['strgroupservers'] = 'Servidors en el grup "%s"'; + $lang['strallservers'] = 'Tots els servidors'; + $lang['strintroduction'] = 'Introducció'; + $lang['strhost'] = 'Host'; + $lang['strport'] = 'Port'; + $lang['strlogout'] = 'Sortida'; + $lang['strowner'] = 'Propietari'; + $lang['straction'] = 'Acció'; + $lang['stractions'] = 'Accions'; + $lang['strname'] = 'Nom'; + $lang['strdefinition'] = 'Definició'; + $lang['strproperties'] = 'Propietats'; + $lang['strbrowse'] = 'Navega'; + $lang['strenable'] = 'Habilita'; + $lang['strdisable'] = 'Inhabilita'; + $lang['strdrop'] = 'Elimina'; + $lang['strdropped'] = 'Eliminat'; + $lang['strnull'] = 'Nul'; + $lang['strnotnull'] = 'No Nul'; + $lang['strprev'] = '< Previ'; + $lang['strnext'] = 'Següent >'; + $lang['strfirst'] = '<< Primer'; + $lang['strlast'] = 'Últim >>'; + $lang['strfailed'] = 'Fallat'; + $lang['strcreate'] = 'Crea'; + $lang['strcreated'] = 'Creat'; + $lang['strcomment'] = 'Comentari'; + $lang['strlength'] = 'Longitud'; + $lang['strdefault'] = 'Predeterminat'; + $lang['stralter'] = 'Modifica'; + $lang['strok'] = 'D\'acord'; + $lang['strcancel'] = 'Cancel·la'; + $lang['strkill'] = 'Mata'; + $lang['strac'] = 'Habilita AutoCompletat'; + $lang['strsave'] = 'Desa'; + $lang['strreset'] = 'Restableix'; + $lang['strrestart'] = 'Reinicia'; + $lang['strinsert'] = 'Inserta'; + $lang['strselect'] = 'Selecciona'; + $lang['strdelete'] = 'Elimina'; + $lang['strupdate'] = 'Actualitza'; + $lang['strreferences'] = 'Referències'; + $lang['stryes'] = 'Sí'; + $lang['strno'] = 'No'; + $lang['strtrue'] = 'Cert'; + $lang['strfalse'] = 'Fals'; + $lang['stredit'] = 'Edita'; + $lang['strcolumn'] = 'Columna'; + $lang['strcolumns'] = 'Columnes'; + $lang['strrows'] = 'fila(es)'; + $lang['strrowsaff'] = 'fila/es afectada/es.'; + $lang['strobjects'] = 'objecte(s)'; + $lang['strback'] = 'Enrere'; + $lang['strqueryresults'] = 'Resultat de la Consulta'; + $lang['strshow'] = 'Mostra'; + $lang['strempty'] = 'Buida'; + $lang['strlanguage'] = 'Idioma'; + $lang['strencoding'] = 'Codificació'; + $lang['strvalue'] = 'Valor'; + $lang['strunique'] = 'Únic'; + $lang['strprimary'] = 'Primari'; + $lang['strexport'] = 'Exporta'; + $lang['strimport'] = 'Importa'; + $lang['strallowednulls'] = 'Caràcters NULL Permesos'; + $lang['strbackslashn'] = '\N'; + $lang['stremptystring'] = 'Cadena o camp buit'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = 'Admin'; + $lang['strvacuum'] = 'Vacuum'; + $lang['stranalyze'] = 'Analyze'; + $lang['strclusterindex'] = 'Clúster'; + $lang['strclustered'] = 'Clusteritzat?'; + $lang['strreindex'] = 'Reindex'; + $lang['strexecute'] = 'Executa'; + $lang['stradd'] = 'Agrega'; + $lang['strevent'] = 'Event'; + $lang['strwhere'] = 'On'; + $lang['strinstead'] = 'Fes en el seu lloc'; + $lang['strwhen'] = 'Quan'; + $lang['strformat'] = 'Format'; + $lang['strdata'] = 'Dades'; + $lang['strconfirm'] = 'Confirma'; + $lang['strexpression'] = 'Expressió'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'Expandeix'; + $lang['strcollapse'] = 'Colapsa'; + $lang['strfind'] = 'Cerca'; + $lang['stroptions'] = 'Opcions'; + $lang['strrefresh'] = 'Refresca'; + $lang['strdownload'] = 'Baixa'; + $lang['strdownloadgzipped'] = 'Baixa comprimit amb gzip'; + $lang['strinfo'] = 'Informació'; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = 'Avançat'; + $lang['strvariables'] = 'Variables'; + $lang['strprocess'] = 'Procés'; + $lang['strprocesses'] = 'Processos'; + $lang['strsetting'] = 'Ajustament'; + $lang['streditsql'] = 'Edita SQL'; + $lang['strruntime'] = 'Total temps d\'execució: %s ms'; + $lang['strpaginate'] = 'Pagina els resultats'; + $lang['struploadscript'] = 'o carrega un script SQL:'; + $lang['strstarttime'] = 'Hora d\'Inici'; + $lang['strfile'] = 'Fitxer'; + $lang['strfileimported'] = 'Fitxer importat.'; + $lang['strtrycred'] = 'Usa aquestes credencials a tots els servidors'; + $lang['strconfdropcred'] = 'Per raons de seguretat, la desconnexió eliminarà la informació d\'entrada compartida. Està segur de voler desconnectar ?'; + $lang['stractionsonmultiplelines'] = 'Accions a múltiples línies'; + $lang['strselectall'] = 'Seleccina\'ls tots'; + $lang['strunselectall'] = 'No en seleccionis cap'; + $lang['strlocale'] = 'Local'; + $lang['strcollation'] = 'Col·lació'; + $lang['strctype'] = 'Tipus de caràcter'; + $lang['strdefaultvalues'] = 'Valors per defecte'; + $lang['strnewvalues'] = 'Valors nous'; + $lang['strstart'] = 'Comença'; + $lang['strstop'] = 'Para'; + $lang['strgotoppage'] = 'Torna al principi'; + $lang['strtheme'] = 'Tema'; + + // Admin + $lang['stradminondatabase'] = 'Les següents tasques administratives s\'apliquen a tota la base de dades %s.'; + $lang['stradminontable'] = 'Les següents tasques administratives s\'apliquen a la taula %s.'; + + // User-supplied SQL history + $lang['strhistory'] = 'Història'; + $lang['strnohistory'] = 'No hi ha història.'; + $lang['strclearhistory'] = 'Neteja la història'; + $lang['strdelhistory'] = 'Elimina de la història'; + $lang['strconfdelhistory'] = 'Realment vol eliminar aquesta petició de la història?'; + $lang['strconfclearhistory'] = 'Realment vol elimnar la història?'; + $lang['strnodatabaseselected'] = 'Si us plau, seleccioni una base de dades.'; + + // Database Sizes + $lang['strnoaccess'] = 'Sense Accés'; + $lang['strsize'] = 'Tamany'; + $lang['strbytes'] = 'bytes'; + $lang['strkb'] = 'kB'; + $lang['strmb'] = 'MB'; + $lang['strgb'] = 'GB'; + $lang['strtb'] = 'TB'; + + // Error handling + $lang['strnoframes'] = 'Aquesta aplicació treballa millor en un navegador amb suport per frames, però es pot usar sense seguint el link de sota.'; + $lang['strnoframeslink'] = 'Usa sense frames'; + $lang['strbadconfig'] = 'El seu config.inc.php no està actualitzat. Necessitarà regenerar-lo a partir del nou config.inc.php-dist.'; + $lang['strnotloaded'] = 'La seva instal·lació de PHP no suporta la PostgreSQL. Necessita recompilar el PHP usant la opció de configuració --with-pgsql.'; + $lang['strpostgresqlversionnotsupported'] = 'Versió de PostgreSQL no suportada. Si su plau actualitzi a la versió %s o posterior.'; + $lang['strbadschema'] = 'Esquema especificat invàlid.'; + $lang['strbadencoding'] = 'Error al fixar la codificació del client a la base de dades.'; + $lang['strsqlerror'] = 'Error SQL:'; + $lang['strinstatement'] = 'En la sentència:'; + $lang['strinvalidparam'] = 'Paràmetres del script invàlids.'; + $lang['strnodata'] = 'No s\'han trobat files.'; + $lang['strnoobjects'] = 'No s\'han trobat objectes.'; + $lang['strrownotunique'] = 'No hi ha un identificador únic per aquesta fila.'; + $lang['strnoreportsdb'] = 'La base de dades dels reports no està creada. Llegeixi el fitxer INSTALL per fer-ho.'; + $lang['strnouploads'] = 'La pujada de fitxers està deshabilitada.'; + $lang['strimporterror'] = 'Error d\'importació.'; + $lang['strimporterror-fileformat'] = 'Error d\'importació: Error al determinar automàticament el format del fitxer.'; + $lang['strimporterrorline'] = 'Error d\'importació a la línia %s.'; + $lang['strimporterrorline-badcolumnnum'] = 'Error d\'importació a la línia %s: La línia no té el número correcte de columnes.'; + $lang['strimporterror-uploadedfile'] = 'Error d\'importació: El fitxer no s\'ha pogut pujar al servidor'; + $lang['strcannotdumponwindows'] = 'El volcat de dades amb noms complexos de taules i esquemes en Windows no és suportada.'; + $lang['strinvalidserverparam'] = 'Intent de connexió amb un paràmetre del servidor invàlid, possiblement algú està provant d\'entrar al sistema.'; + $lang['strnoserversupplied'] = 'No s\'ha proporcionat cap servidor!'; + $lang['strbadpgdumppath'] = 'Error d\'exportació: Fallada en l\'execució de pg_dump (path definit a conf/config.inc.php : %s ). Sisplau, arregli el path en la configuració.'; + $lang['strbadpgdumpallpath'] = 'Error d\'exportació: Fallada en l\'execució de pg_dumpall (path definit a conf/config.inc.php : %s ). Sisplau, arregli el path en la configuració.'; + $lang['strconnectionfail'] = 'No hi ha connexió amb el servidor.'; + + // Tables + $lang['strtable'] = 'Taula'; + $lang['strtables'] = 'Taules'; + $lang['strshowalltables'] = 'Mostra totes les taules'; + $lang['strnotables'] = 'No s\'han trobat taules.'; + $lang['strnotable'] = 'No s\'ha trobat la taula.'; + $lang['strcreatetable'] = 'Crea una taula'; + $lang['strcreatetablelike'] = 'Crea una taula com a'; + $lang['strcreatetablelikeparent'] = 'Taula origen'; + $lang['strcreatelikewithdefaults'] = 'INCLUDE DEFAULTS'; + $lang['strcreatelikewithconstraints'] = 'INCLUDE CONSTRAINTS'; + $lang['strcreatelikewithindexes'] = 'INCLUDE INDEXES'; + $lang['strtablename'] = 'Nom de la taula'; + $lang['strtableneedsname'] = 'Ha d\'anomenar la taula.'; + $lang['strtablelikeneedslike'] = 'Ha de donar una taula d\'on copiar les propietats.'; + $lang['strtableneedsfield'] = 'Ha d\'especificar almenys un camp.'; + $lang['strtableneedscols'] = 'Ha d\'especificar un número vàlid de columnes.'; + $lang['strtablecreated'] = 'Taula creada.'; + $lang['strtablecreatedbad'] = 'No s\'ha pogut crear la taula.'; + $lang['strconfdroptable'] = 'Està segur de voler eliminar la taula "%s"?'; + $lang['strtabledropped'] = 'Taula eliminada.'; + $lang['strtabledroppedbad'] = 'No s\'ha pogut eliminar la taula.'; + $lang['strconfemptytable'] = 'Està segur que vol buidar la taula "%s"?'; + $lang['strtableemptied'] = 'Taula buidada.'; + $lang['strtableemptiedbad'] = 'No s\'ha pogut buidar la taula.'; + $lang['strinsertrow'] = 'Inserta una fila'; + $lang['strrowinserted'] = 'Fila insertada.'; + $lang['strrowinsertedbad'] = 'No s\'ha pogut insertar la taula.'; + $lang['strnofkref'] = 'No hi ha cap valor coincident en la foreign key %s.'; + $lang['strrowduplicate'] = 'Inserció de la taula fallada, intentant fer una inserció duplicada.'; + $lang['streditrow'] = 'Edita la fila'; + $lang['strrowupdated'] = 'Fila actualitzada.'; + $lang['strrowupdatedbad'] = 'No s\'ha pogut actualitzar la fila.'; + $lang['strdeleterow'] = 'Elimina la fila'; + $lang['strconfdeleterow'] = 'Està segur que vol eliminar aquesta fila?'; + $lang['strrowdeleted'] = 'Fila eliminada.'; + $lang['strrowdeletedbad'] = 'No s\'ha pogut eliminar la fila.'; + $lang['strinsertandrepeat'] = 'Inserta & Repeteix'; + $lang['strnumcols'] = 'Nombre de columnes'; + $lang['strcolneedsname'] = 'Ha d\'especificar un nom per la columna'; + $lang['strselectallfields'] = 'Selecciona tots els camps'; + $lang['strselectneedscol'] = 'Ha de mostrar almenys una columna.'; + $lang['strselectunary'] = 'Els operadors unaris no poden tenir valors.'; + $lang['strcolumnaltered'] = 'Columna modificada.'; + $lang['strcolumnalteredbad'] = 'No s\'ha pogut modificar la columna.'; + $lang['strconfdropcolumn'] = 'Està segur d\'eliminar la columna "%s" de la taula "%s"?'; + $lang['strcolumndropped'] = 'Columna eliminada.'; + $lang['strcolumndroppedbad'] = 'No s\'ha pogut eliminar la columna.'; + $lang['straddcolumn'] = 'Agrega una columna'; + $lang['strcolumnadded'] = 'Columna agregada.'; + $lang['strcolumnaddedbad'] = 'No s\'ha pogut agregar la columna.'; + $lang['strcascade'] = 'EN CASCADA'; + $lang['strtablealtered'] = 'Taula modificada.'; + $lang['strtablealteredbad'] = 'No s\'ha pogut modificar la columna.'; + $lang['strdataonly'] = 'Només dades'; + $lang['strstructureonly'] = 'Nomes estructura'; + $lang['strstructureanddata'] = 'Estructura i dades'; + $lang['strtabbed'] = 'Tabulat'; + $lang['strauto'] = 'Automàtic'; + $lang['strconfvacuumtable'] = 'Està segur de voler un vacuum "%s"?'; + $lang['strconfanalyzetable'] = 'Està segur de voler un analyze "%s"?'; + $lang['strconfreindextable'] = 'Està segur de voler un reindex "%s"?'; + $lang['strconfclustertable'] = 'Està sergur de voler un cluster "%s"?'; + $lang['strestimatedrowcount'] = 'Nombre estimat de files'; + $lang['strspecifytabletoanalyze'] = 'Ha d\'especificar almenys una taula per l\'analyze.'; + $lang['strspecifytabletoempty'] = 'Ha d\'especificar almenys una taula per buidar.'; + $lang['strspecifytabletodrop'] = 'Ha d\'especificar almenys una taula per eliminar.'; + $lang['strspecifytabletovacuum'] = 'Ha d\'especificar almenys una taula pel vacuum.'; + $lang['strspecifytabletoreindex'] = 'Ha d\'especifiar almenys una taula pel reindex.'; + $lang['strspecifytabletocluster'] = 'Ha d\'especificar almenys una taula pel cluster.'; + $lang['strnofieldsforinsert'] = 'No es pot insertar una fila a una taula sense cap columna.'; + + // Columns + $lang['strcolprop'] = 'Propietats de la Columna'; + $lang['strnotableprovided'] = 'No s\'ha proporcionat cap taula!'; + + // Users + $lang['struser'] = 'Usuari'; + $lang['strusers'] = 'Usuaris'; + $lang['strusername'] = 'Usuari'; + $lang['strpassword'] = 'Contrasenya'; + $lang['strsuper'] = 'Superusuari?'; + $lang['strcreatedb'] = 'Crear DB?'; + $lang['strexpires'] = 'Expira'; + $lang['strsessiondefaults'] = 'Valors predeterminats de la sessió'; + $lang['strnousers'] = 'No s\'han trobat usuaris.'; + $lang['struserupdated'] = 'Usuari actualitzat.'; + $lang['struserupdatedbad'] = 'L\'actualització de l\'usuari ha fallat.'; + $lang['strshowallusers'] = 'Mostra tots els usuaris'; + $lang['strcreateuser'] = 'Crea un usuari'; + $lang['struserneedsname'] = 'Ha de donar un nom a l\'usuari.'; + $lang['strusercreated'] = 'Usuari creat.'; + $lang['strusercreatedbad'] = 'Error al crear l\'usuari.'; + $lang['strconfdropuser'] = 'Està segur de voler eliminar l\'usuari "%s"?'; + $lang['struserdropped'] = 'Usuari eliminat.'; + $lang['struserdroppedbad'] = 'Error a l\'eliminar l\'usuari.'; + $lang['straccount'] = 'Compte'; + $lang['strchangepassword'] = 'Canvia la contrasenya'; + $lang['strpasswordchanged'] = 'Contrasenya canviada.'; + $lang['strpasswordchangedbad'] = 'Error al canviar la contrasenya.'; + $lang['strpasswordshort'] = 'Contrasenya massa curta.'; + $lang['strpasswordconfirm'] = 'La contrasenya no coincideix amb la confirmació.'; + + // Groups + $lang['strgroup'] = 'Grup'; + $lang['strgroups'] = 'Grups'; + $lang['strshowallgroups'] = 'Mostra tots els grups'; + $lang['strnogroup'] = 'Grup no trobat.'; + $lang['strnogroups'] = 'No s\'han trobat grups.'; + $lang['strcreategroup'] = 'Crea un grup'; + $lang['strgroupneedsname'] = 'Ha de donar un nom al grup.'; + $lang['strgroupcreated'] = 'Grup creat.'; + $lang['strgroupcreatedbad'] = 'No s\'ha pogut crear el grup.'; + $lang['strconfdropgroup'] = 'Està segur de voler eliminar el grup "%s"?'; + $lang['strgroupdropped'] = 'Grup eliminat.'; + $lang['strgroupdroppedbad'] = 'No s\'ha pogut eliminar el grup.'; + $lang['strmembers'] = 'Membres'; + $lang['strmemberof'] = 'Membre de'; + $lang['stradminmembers'] = 'Membres administradors'; + $lang['straddmember'] = 'Afegeix un membre'; + $lang['strmemberadded'] = 'Membre afegit.'; + $lang['strmemberaddedbad'] = 'No s\'ha pogut afegir el membre.'; + $lang['strdropmember'] = 'Elimina el membre'; + $lang['strconfdropmember'] = 'Està segur de voler eliminar el membre "%s" del grup "%s"?'; + $lang['strmemberdropped'] = 'Membre eliminat.'; + $lang['strmemberdroppedbad'] = 'No s\'ha pogut eliminar el membre.'; + + // Roles + $lang['strrole'] = 'Rol'; + $lang['strroles'] = 'Rols'; + $lang['strshowallroles'] = 'Mostra tots els rols'; + $lang['strnoroles'] = 'No s\'han trobat rols.'; + $lang['strinheritsprivs'] = 'Hereda privilegis?'; + $lang['strcreaterole'] = 'Crea un rol'; + $lang['strcancreaterole'] = 'Crear el rol?'; + $lang['strrolecreated'] = 'Rol creat.'; + $lang['strrolecreatedbad'] = 'No s\'ha pogut crear el rol.'; + $lang['strrolealtered'] = 'Rol modificat.'; + $lang['strrolealteredbad'] = 'No s\ha pogut modificar el rol.'; + $lang['strcanlogin'] = 'Pot entrar?'; + $lang['strconnlimit'] = 'Límit de la connexió'; + $lang['strdroprole'] = 'Elimina el rol'; + $lang['strconfdroprole'] = 'Està segur de voler eliminar el rol \'%s\'?'; + $lang['strroledropped'] = 'Rol eliminat.'; + $lang['strroledroppedbad'] = 'No s\'ha pogut eliminar el rol.'; + $lang['strnolimit'] = 'Sense límit'; + $lang['strnever'] = 'Mai'; + $lang['strroleneedsname'] = 'Ha de donar un nom al rol.'; + + // Privileges + $lang['strprivilege'] = 'Privilegi'; + $lang['strprivileges'] = 'Privilegis'; + $lang['strnoprivileges'] = 'Aquest objecte té els privilegis predeterminats.'; + $lang['strgrant'] = 'Concedeix'; + $lang['strrevoke'] = 'Revoca'; + $lang['strgranted'] = 'Privilegis canviats.'; + $lang['strgrantfailed'] = 'Ha fallat el canvi de privilegis.'; + $lang['strgrantbad'] = 'Ha d\'especificar almenys un usuari o grup i almenys un privilegi.'; + $lang['strgrantor'] = 'Cedent'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'Base de dades'; + $lang['strdatabases'] = 'Bases de dades'; + $lang['strshowalldatabases'] = 'Mostra totes les bases de dades'; + $lang['strnodatabases'] = 'No s\'han trobat bases de dades.'; + $lang['strcreatedatabase'] = 'Crea una base de dades'; + $lang['strdatabasename'] = 'Nom de la base de dades'; + $lang['strdatabaseneedsname'] = 'Ha de donar un nom a la base de dades.'; + $lang['strdatabasecreated'] = 'Base de dades creada.'; + $lang['strdatabasecreatedbad'] = 'No s\'ha pogut crear la base de dades.'; + $lang['strconfdropdatabase'] = 'Està segur de voler eliminar la base de dades "%s"?'; + $lang['strdatabasedropped'] = 'Base de dades eliminada.'; + $lang['strdatabasedroppedbad'] = 'No s\'ha pogut eliminar la base de dades.'; + $lang['strentersql'] = 'Entri la sentència SQL per executar a sota:'; + $lang['strsqlexecuted'] = 'SQL executat.'; + $lang['strvacuumgood'] = 'Vacuum completat.'; + $lang['strvacuumbad'] = 'Vacuum ha fallat.'; + $lang['stranalyzegood'] = 'Analyze completat.'; + $lang['stranalyzebad'] = 'Analyze ha fallat.'; + $lang['strreindexgood'] = 'Reindex completat.'; + $lang['strreindexbad'] = 'Reindex ha fallat.'; + $lang['strfull'] = 'Ple'; + $lang['strfreeze'] = 'Congelat'; + $lang['strforce'] = 'Força'; + $lang['strsignalsent'] = 'Senyal enviat.'; + $lang['strsignalsentbad'] = 'L\'enviament del senyal ha fallat.'; + $lang['strallobjects'] = 'Tots els objectes'; + $lang['strdatabasealtered'] = 'Base de dades modificada.'; + $lang['strdatabasealteredbad'] = 'No s\'ha pogut modificar la base de dades.'; + $lang['strspecifydatabasetodrop'] = 'Ha d\'especificar almenys una base de dades per eliminar.'; + $lang['strtemplatedb'] = 'Plantilla'; + $lang['strconfanalyzedatabase'] = 'Està segur de voler un analyze de totes les taules de la base de dades "%s"?'; + $lang['strconfvacuumdatabase'] = 'Està segur de voler un vacuum de totes les taules de la base de dades "%s"?'; + $lang['strconfreindexdatabase'] = 'Està segur de voler un reindex de totes les taules de la base de dades "%s"?'; + $lang['strconfclusterdatabase'] = 'Està segur de voler un clúster de totes les taules de la base de dades "%s"?'; + + // Views + $lang['strview'] = 'Vista'; + $lang['strviews'] = 'Vistes'; + $lang['strshowallviews'] = 'Mostra totes les vistes'; + $lang['strnoview'] = 'No s\'ha trobat la vista.'; + $lang['strnoviews'] = 'No s\'han trobat vistes.'; + $lang['strcreateview'] = 'Crea una vista'; + $lang['strviewname'] = 'Nom de la vista'; + $lang['strviewneedsname'] = 'Ha d\'anomenar la vista.'; + $lang['strviewneedsdef'] = 'Ha de donar una definició a la vista.'; + $lang['strviewneedsfields'] = 'Ha de seleccionar les columnes de la vista.'; + $lang['strviewcreated'] = 'Vista creada.'; + $lang['strviewcreatedbad'] = 'No s\'ha pogut crear la vista.'; + $lang['strconfdropview'] = 'Està segur de voler eliminar la vista "%s"?'; + $lang['strviewdropped'] = 'Vista eliminada.'; + $lang['strviewdroppedbad'] = 'No s\'ha pogut eliminar la vista.'; + $lang['strviewupdated'] = 'Vista actualitzada.'; + $lang['strviewupdatedbad'] = 'No s\'ha pogut actualitzar la vista.'; + $lang['strviewlink'] = 'Enllaçant claus'; + $lang['strviewconditions'] = 'Condicions addicionals'; + $lang['strcreateviewwiz'] = 'Crea una vista amb l\'assistent'; + $lang['strrenamedupfields'] = 'Reanomena els camps duplicats'; + $lang['strdropdupfields'] = 'Elimina els camps duplicats'; + $lang['strerrordupfields'] = 'Error en els camps duplicats'; + $lang['strviewaltered'] = 'Vista modificada.'; + $lang['strviewalteredbad'] = 'No s\'ha pogut modificar la vista.'; + $lang['strspecifyviewtodrop'] = 'Ha d\'especificar almenys una vista per eliminar.'; + + // Sequences + $lang['strsequence'] = 'Seqüència'; + $lang['strsequences'] = 'Seqüències'; + $lang['strshowallsequences'] = 'Mostra totes les seqüències'; + $lang['strnosequence'] = 'No s\'ha trobat la seqüencia.'; + $lang['strnosequences'] = 'No s\'han trobat seqüencies.'; + $lang['strcreatesequence'] = 'Crea una seqüència'; + $lang['strlastvalue'] = 'Últim valor'; + $lang['strincrementby'] = 'Incrementar en'; + $lang['strstartvalue'] = 'Valor inicial'; + $lang['strrestartvalue'] = 'Valor al reiniciar'; + $lang['strmaxvalue'] = 'Valor màxim'; + $lang['strminvalue'] = 'Valor mínim'; + $lang['strcachevalue'] = 'Valor de cache'; + $lang['strlogcount'] = 'Compte del registre'; + $lang['strcancycle'] = 'Pot completar un cicle?'; + $lang['striscalled'] = 'Vol incrementar l\últim valor abans de retornar el següent valor (is_called)?'; + $lang['strsequenceneedsname'] = 'Ha d\'especificar un nom per la seqüència.'; + $lang['strsequencecreated'] = 'Seqüència creada.'; + $lang['strsequencecreatedbad'] = 'No s\'ha pogut crear la seqüència.'; + $lang['strconfdropsequence'] = 'Està segur de voler eliminar la seqüència "%s"?'; + $lang['strsequencedropped'] = 'Seqüència eliminada.'; + $lang['strsequencedroppedbad'] = 'No s\'ha pogut eliminar la seqüència.'; + $lang['strsequencerestart'] = 'Seqüència reiniciada.'; + $lang['strsequencerestartbad'] = 'No s\'ha pogut reiniciar la seqüència.'; + $lang['strsequencereset'] = 'Seqüència reiniciada.'; + $lang['strsequenceresetbad'] = 'No s\'ha pogut reiniciar la seqüència.'; + $lang['strsequencealtered'] = 'Seqüència modificada.'; + $lang['strsequencealteredbad'] = 'No s\'ha pogut modificar la seqüència.'; + $lang['strsetval'] = 'Fixa el valor'; + $lang['strsequencesetval'] = 'Valor de la seqüència fixat.'; + $lang['strsequencesetvalbad'] = 'No s\'ha pogut fixar el valor de la seqüencia.'; + $lang['strnextval'] = 'Valor incremental'; + $lang['strsequencenextval'] = 'Seqüència incrementada.'; + $lang['strsequencenextvalbad'] = 'No s\'ha pogut incrementar la seqüència.'; + $lang['strspecifysequencetodrop'] = 'Ha d\'especificar almenys una seqüència per eliminar.'; + + // Indexes + $lang['strindex'] = 'Índex'; + $lang['strindexes'] = 'Índexs'; + $lang['strindexname'] = 'Nom de l\'índex'; + $lang['strshowallindexes'] = 'Mostra tots els índexs'; + $lang['strnoindex'] = 'No s\'ha trobat l\'índex'; + $lang['strnoindexes'] = 'No s\'han trobat índexs.'; + $lang['strcreateindex'] = 'Crea un índex'; + $lang['strtabname'] = 'Nom de la pestanya'; + $lang['strcolumnname'] = 'Nom de la columna'; + $lang['strindexneedsname'] = 'Ha d\'anomenar l\'índex.'; + $lang['strindexneedscols'] = 'Els índexs requereixen un número vàlid de columnes.'; + $lang['strindexcreated'] = 'Índex creat'; + $lang['strindexcreatedbad'] = 'No s\'ha pogut crear l\'índex.'; + $lang['strconfdropindex'] = 'Està segur de voler eliminar l\'índex "%s"?'; + $lang['strindexdropped'] = 'Índex eliminat.'; + $lang['strindexdroppedbad'] = 'No s\'ha pogut eliminar l\'índex.'; + $lang['strkeyname'] = 'Nom de la clau'; + $lang['struniquekey'] = 'Clau única'; + $lang['strprimarykey'] = 'Clau primària'; + $lang['strindextype'] = 'Tipus d\'índex'; + $lang['strtablecolumnlist'] = 'Columnes a la taula'; + $lang['strindexcolumnlist'] = 'Columnes a l\'índex'; + $lang['strclusteredgood'] = 'Clúster completat.'; + $lang['strclusteredbad'] = 'No s\'ha pogut crear el clúster.'; + $lang['strconcurrently'] = 'Actualment'; + $lang['strnoclusteravailable'] = 'No hi ha el clúster disponible en l\'índex.'; + + // Rules + $lang['strrules'] = 'Regles'; + $lang['strrule'] = 'Regla'; + $lang['strshowallrules'] = 'Mostra totes les regles'; + $lang['strnorule'] = 'No s\'ha trobat la regla.'; + $lang['strnorules'] = 'No s\'han trobat regles.'; + $lang['strcreaterule'] = 'Crea una regla'; + $lang['strrulename'] = 'Nom de la regla'; + $lang['strruleneedsname'] = 'Ha d\'especificar un nom per la regla'; + $lang['strrulecreated'] = 'Regla creada.'; + $lang['strrulecreatedbad'] = 'No s\'ha pogut crear la regla.'; + $lang['strconfdroprule'] = 'Està segur de voler eliminar la regla "%s" a "%s"?'; + $lang['strruledropped'] = 'Regla eliminada.'; + $lang['strruledroppedbad'] = 'No s\'ha pogut eliminar la regla.'; + + // Constraints + $lang['strconstraint'] = 'Restricció'; + $lang['strconstraints'] = 'Restriccions'; + $lang['strshowallconstraints'] = 'Mostra totes les restriccions'; + $lang['strnoconstraints'] = 'No s\'han trobat restriccions.'; + $lang['strcreateconstraint'] = 'Crea una restricció'; + $lang['strconstraintcreated'] = 'Restricció creada.'; + $lang['strconstraintcreatedbad'] = 'No s\'ha pogut crear la restricció.'; + $lang['strconfdropconstraint'] = 'Està segur de voler eliminar la restricció "%s" de "%s"?'; + $lang['strconstraintdropped'] = 'Restricció eliminada.'; + $lang['strconstraintdroppedbad'] = 'No s\'ha pogut eliminar la restricció.'; + $lang['straddcheck'] = 'Agrega un control'; + $lang['strcheckneedsdefinition'] = 'La restricció de control necessita una definició.'; + $lang['strcheckadded'] = 'Restricció de control agregada.'; + $lang['strcheckaddedbad'] = 'No s\'ha pogut agregar la restricció de control.'; + $lang['straddpk'] = 'Agrega una clau primària'; + $lang['strpkneedscols'] = 'La clau primària requereix almenys una columna.'; + $lang['strpkadded'] = 'Clau primària agregada.'; + $lang['strpkaddedbad'] = 'No s\'ha pogut agregar la clau primària.'; + $lang['stradduniq'] = 'Agrega una clau única'; + $lang['struniqneedscols'] = 'La clau única requereix almenys una columna.'; + $lang['struniqadded'] = 'Clau única agregada.'; + $lang['struniqaddedbad'] = 'No s\'ha pogut agregar la clau única.'; + $lang['straddfk'] = 'Agrega una clau externa'; + $lang['strfkneedscols'] = 'La clau externa requereix almenys una columna.'; + $lang['strfkneedstarget'] = 'La clau externa requereix una taula de referència.'; + $lang['strfkadded'] = 'Clau externa agregada.'; + $lang['strfkaddedbad'] = 'No s\'ha pogut agregar la clau externa.'; + $lang['strfktarget'] = 'Taula de destí'; + $lang['strfkcolumnlist'] = 'Columnes a la clau'; + $lang['strondelete'] = 'A L\'ELIMINAR'; + $lang['stronupdate'] = 'A L\'ACTUALITZAR'; + + // Functions + $lang['strfunction'] = 'Funció'; + $lang['strfunctions'] = 'Funcions'; + $lang['strshowallfunctions'] = 'Mostra totes les funcions'; + $lang['strnofunction'] = 'No s\'ha trobat la funció.'; + $lang['strnofunctions'] = 'No s\'han trobat funcions'; + $lang['strcreateplfunction'] = 'Crea una funció SQL/PL'; + $lang['strcreateinternalfunction'] = 'Crea una funció interna'; + $lang['strcreatecfunction'] = 'Crea una funció C'; + $lang['strfunctionname'] = 'Nom de la funció'; + $lang['strreturns'] = 'Retorna'; + $lang['strproglanguage'] = 'Llenguatge de programació'; + $lang['strfunctionneedsname'] = 'Ha de donar un nom a la funció.'; + $lang['strfunctionneedsdef'] = 'Ha de donar una definició a la funció.'; + $lang['strfunctioncreated'] = 'Funció creada.'; + $lang['strfunctioncreatedbad'] = 'No s\'ha pogut crear la funció.'; + $lang['strconfdropfunction'] = 'Està segur de voler eliminar la funció "%s"?'; + $lang['strfunctiondropped'] = 'Funció eliminada.'; + $lang['strfunctiondroppedbad'] = 'No s\'ha pogut eliminar la funció.'; + $lang['strfunctionupdated'] = 'Funció actualitzada.'; + $lang['strfunctionupdatedbad'] = 'No s\'ha pogut actualitzar la funció.'; + $lang['strobjectfile'] = 'Fitxer objecte'; + $lang['strlinksymbol'] = 'Enllaç simbòlic'; + $lang['strarguments'] = 'Arguments'; + $lang['strargmode'] = 'Mode'; + $lang['strargtype'] = 'Tipus'; + $lang['strargadd'] = 'Afegeix un altre argument'; + $lang['strargremove'] = 'Elimina aquest argument'; + $lang['strargnoargs'] = 'Aquesta funció no tindrà arguments.'; + $lang['strargenableargs'] = 'Habilita els arguments passats a aquesta funció.'; + $lang['strargnorowabove'] = 'Hi ha d\'haver una fila sobre aquesta fila.'; + $lang['strargnorowbelow'] = 'Hi ha d\'haver una fila sota aquesta fila.'; + $lang['strargraise'] = 'Mou amunt.'; + $lang['strarglower'] = 'Mou avall.'; + $lang['strargremoveconfirm'] = 'Està segur de voler eliminar aquest argument? Això NO es pot desfer.'; + $lang['strfunctioncosting'] = 'Funció de Cost'; + $lang['strresultrows'] = 'Files Resultants'; + $lang['strexecutioncost'] = 'Cost de l\'Execució'; + $lang['strspecifyfunctiontodrop'] = 'Ha d\'especificar almenys una funció per eliminar.'; + + // Triggers + $lang['strtrigger'] = 'Disparador'; + $lang['strtriggers'] = 'Disparadors'; + $lang['strshowalltriggers'] = 'Mostrar tots els disparadors'; + $lang['strnotrigger'] = 'No s\'ha trobat el disparador.'; + $lang['strnotriggers'] = 'No s\'han trobat disparadors.'; + $lang['strcreatetrigger'] = 'Crea un disparador'; + $lang['strtriggerneedsname'] = 'Ha de donar un nom al disparador.'; + $lang['strtriggerneedsfunc'] = 'Ha d\'especificar una funció pel disparador.'; + $lang['strtriggercreated'] = 'Disparador creat.'; + $lang['strtriggercreatedbad'] = 'No s\'ha pogut crear el disparador.'; + $lang['strconfdroptrigger'] = 'Està segur de voler eliminar el disparador "%s" de "%s"?'; + $lang['strconfenabletrigger'] = 'Està segur de voler habilitar el disparador "%s" a "%s"?'; + $lang['strconfdisabletrigger'] = 'Està segur de voler inhabilitar el disparador "%s" a "%s"?'; + $lang['strtriggerdropped'] = 'Disparador eliminat.'; + $lang['strtriggerdroppedbad'] = 'No s\'ha pogut eliminar el disparador.'; + $lang['strtriggerenabled'] = 'Disparador habilitat.'; + $lang['strtriggerenabledbad'] = 'No s\'ha pogut habilitar el disparador.'; + $lang['strtriggerdisabled'] = 'Disparador inhabilitat.'; + $lang['strtriggerdisabledbad'] = 'No s\'ha pogut inhabilitar el disparador.'; + $lang['strtriggeraltered'] = 'Disparador modificat.'; + $lang['strtriggeralteredbad'] = 'No s\'ha pogut modificar el disparador.'; + $lang['strforeach'] = 'Per cada'; + + // Types + $lang['strtype'] = 'Tipus'; + $lang['strtypes'] = 'Tipus'; + $lang['strshowalltypes'] = 'Mostrar tots els tipus'; + $lang['strnotype'] = 'No s\'ha trobat el tipus.'; + $lang['strnotypes'] = 'No s\'han trobat els tipus.'; + $lang['strcreatetype'] = 'Crea un tipus'; + $lang['strcreatecomptype'] = 'Crea un tipus compost'; + $lang['strcreateenumtype'] = 'Crea un tipus d\'enumeració'; + $lang['strtypeneedsfield'] = 'Ha d\'especificar almenys un camp.'; + $lang['strtypeneedsvalue'] = 'Ha d\'especificar almenys un valor.'; + $lang['strtypeneedscols'] = 'Ha d\'especificar un número vàlid de camps.'; + $lang['strtypeneedsvals'] = 'Ha d\'especificar un número vàlid de valors.'; + $lang['strinputfn'] = 'Funció d\'entrada'; + $lang['stroutputfn'] = 'Funció de sortida'; + $lang['strpassbyval'] = 'Passat per valor?'; + $lang['stralignment'] = 'Alineament'; + $lang['strelement'] = 'Element'; + $lang['strdelimiter'] = 'Delimitador'; + $lang['strstorage'] = 'Emmagatzemament'; + $lang['strfield'] = 'Camp'; + $lang['strnumfields'] = 'Num. de camps'; + $lang['strnumvalues'] = 'Num. de valors'; + $lang['strtypeneedsname'] = 'Ha de donar un nom al tipus.'; + $lang['strtypeneedslen'] = 'Ha de donar una longitud al tipus.'; + $lang['strtypecreated'] = 'Tipus creat'; + $lang['strtypecreatedbad'] = 'No s\'ha pogut crear el tipus.'; + $lang['strconfdroptype'] = 'Està segur de voler eliminar el tipus "%s"?'; + $lang['strtypedropped'] = 'Tipus eliminat.'; + $lang['strtypedroppedbad'] = 'No s\'ha pogut eliminar el tipus.'; + $lang['strflavor'] = 'Varietat'; + $lang['strbasetype'] = 'Base'; + $lang['strcompositetype'] = 'Compost'; + $lang['strpseudotype'] = 'Pseudo'; + $lang['strenum'] = 'Enumeració'; + $lang['strenumvalues'] = 'Valors de l\'enumeració'; + + // Schemas + $lang['strschema'] = 'Esquema'; + $lang['strschemas'] = 'Esquemes'; + $lang['strshowallschemas'] = 'Mostra tots els esquemes'; + $lang['strnoschema'] = 'No s\'ha trobat l\'esquema.'; + $lang['strnoschemas'] = 'No s\'han trobat esquemes.'; + $lang['strcreateschema'] = 'Crea un esquema'; + $lang['strschemaname'] = 'Nom de l\'esquema'; + $lang['strschemaneedsname'] = 'Ha d\'anomenar l\'esquema.'; + $lang['strschemacreated'] = 'Esquema creat'; + $lang['strschemacreatedbad'] = 'No s\'ha pogut crear l\'esquema.'; + $lang['strconfdropschema'] = 'Està segur de voler eliminar l\'esquema "%s"?'; + $lang['strschemadropped'] = 'Esquema eliminat.'; + $lang['strschemadroppedbad'] = 'No s\'ha pogut eliminar l\'esquema.'; + $lang['strschemaaltered'] = 'Esquema modificat.'; + $lang['strschemaalteredbad'] = 'No s\'ha pogut modificar l\'esquema.'; + $lang['strsearchpath'] = 'Camí de cerca de l\'esquema'; + $lang['strspecifyschematodrop'] = 'Ha d\especificar almenys un esquema per eliminar.'; + + // Reports + $lang['strreport'] = 'Report'; + $lang['strreports'] = 'Reports'; + $lang['strshowallreports'] = 'Mostra tots els reports'; + $lang['strnoreports'] = 'No s\'han trobat reports'; + $lang['strcreatereport'] = 'Crea un report'; + $lang['strreportdropped'] = 'Report eliminat.'; + $lang['strreportdroppedbad'] = 'No s\'ha pogut eliminar el report.'; + $lang['strconfdropreport'] = 'Està segur de voler eliminar el report "%s"?'; + $lang['strreportneedsname'] = 'Ha de donar un nom al report.'; + $lang['strreportneedsdef'] = 'Ha de donar un SQL al report.'; + $lang['strreportcreated'] = 'Report desat.'; + $lang['strreportcreatedbad'] = 'No s\'ha pogut desar el report.'; + + // Domains + $lang['strdomain'] = 'Domini'; + $lang['strdomains'] = 'Dominis'; + $lang['strshowalldomains'] = 'Mostrar tots els dominis'; + $lang['strnodomains'] = 'No s\'han trobat dominis.'; + $lang['strcreatedomain'] = 'Crea un domini'; + $lang['strdomaindropped'] = 'Domini eliminat.'; + $lang['strdomaindroppedbad'] = 'No s\'ha pogut eliminar el domini.'; + $lang['strconfdropdomain'] = 'Està segur de voler eliminar el domini "%s"?'; + $lang['strdomainneedsname'] = 'Ha d\'anomenar el domini.'; + $lang['strdomaincreated'] = 'Domini creat.'; + $lang['strdomaincreatedbad'] = 'No s\'ha pogut crear el domini.'; + $lang['strdomainaltered'] = 'Domini modificat.'; + $lang['strdomainalteredbad'] = 'No s\'ha pogut modificar el domini.'; + + // Operators + $lang['stroperator'] = 'Operador'; + $lang['stroperators'] = 'Operadors'; + $lang['strshowalloperators'] = 'Mostra tots els operadors'; + $lang['strnooperator'] = 'No s\'ha trobat l\'operador.'; + $lang['strnooperators'] = 'No s\'han trobat operadors.'; + $lang['strcreateoperator'] = 'Crea un operador'; + $lang['strleftarg'] = 'Tipus de l\'arg. esquerre'; + $lang['strrightarg'] = 'Tipus de l\'arg. dret'; + $lang['strcommutator'] = 'Commutador'; + $lang['strnegator'] = 'Negació'; + $lang['strrestrict'] = 'Restringeix'; + $lang['strjoin'] = 'Unieix'; + $lang['strhashes'] = 'Hash'; + $lang['strmerges'] = 'Fussiona'; + $lang['strleftsort'] = 'Sort esquerre'; + $lang['strrightsort'] = 'Sort dret'; + $lang['strlessthan'] = 'Menor que'; + $lang['strgreaterthan'] = 'Major que'; + $lang['stroperatorneedsname'] = 'Ha d\'anomenar l\'operador.'; + $lang['stroperatorcreated'] = 'Operador creat'; + $lang['stroperatorcreatedbad'] = 'No s\'ha pogut crear l\'operador.'; + $lang['strconfdropoperator'] = 'Està segur de voler eliminar l\'operador "%s"?'; + $lang['stroperatordropped'] = 'Operador eliminat.'; + $lang['stroperatordroppedbad'] = 'No s\'ha pogut eliminar l\'operador.'; + + // Casts + $lang['strcasts'] = 'Conversió de tipus'; + $lang['strnocasts'] = 'No s\'han trobat conversions.'; + $lang['strsourcetype'] = 'Tipus inicial'; + $lang['strtargettype'] = 'Tipus final'; + $lang['strimplicit'] = 'Implícit'; + $lang['strinassignment'] = 'En assignació'; + $lang['strbinarycompat'] = '(Compatible amb binari)'; + + // Conversions + $lang['strconversions'] = 'Conversions'; + $lang['strnoconversions'] = 'No s\'han trobat conversions.'; + $lang['strsourceencoding'] = 'Codificació inicial'; + $lang['strtargetencoding'] = 'Codificació final'; + + // Languages + $lang['strlanguages'] = 'Llenguatges'; + $lang['strnolanguages'] = 'No s\'han trobat llenguatges.'; + $lang['strtrusted'] = 'Fiable'; + + // Info + $lang['strnoinfo'] = 'No hi ha informació disponible.'; + $lang['strreferringtables'] = 'Referent a les taules'; + $lang['strparenttables'] = 'Taules pare'; + $lang['strchildtables'] = 'Taules fill'; + + // Aggregates + $lang['straggregate'] = 'Agregat'; + $lang['straggregates'] = 'Agregats'; + $lang['strnoaggregates'] = 'No s\'han trobat agregats'; + $lang['stralltypes'] = '(Tots els tipus)'; + $lang['strcreateaggregate'] = 'Crea un agregat'; + $lang['straggrbasetype'] = 'Tipus de dades d\'entrada'; + $lang['straggrsfunc'] = 'Funció de la transició de l\'estat'; + $lang['straggrstype'] = 'Tipus de dades pel valor de l\'estat'; + $lang['straggrffunc'] = 'Funció final'; + $lang['straggrinitcond'] = 'Condició inicial'; + $lang['straggrsortop'] = 'Operador ordre'; + $lang['strconfdropaggregate'] = 'Està segur de voler elimnar l\'agregat \'%s\'?'; + $lang['straggregatedropped'] = 'Agregat eliminat.'; + $lang['straggregatedroppedbad'] = 'No s\'ha pogut eliminar l\'agregat.'; + $lang['straggraltered'] = 'Agregat modificat.'; + $lang['straggralteredbad'] = 'No s\'ha pogut modificar l\'agregat.'; + $lang['straggrneedsname'] = 'Ha d\'especificar un nom per l\'agregat'; + $lang['straggrneedsbasetype'] = 'Ha d\'especificar el tipus de dades d\'entrada per l\'agregat'; + $lang['straggrneedssfunc'] = 'Ha d\'especificar el nom de la funció de transició de l\'estat per l\'agregat'; + $lang['straggrneedsstype'] = 'Ha d\'especificar el tipus de dades pel valor de l\'estat de l\'agregat'; + $lang['straggrcreated'] = 'Agregat creat.'; + $lang['straggrcreatedbad'] = 'No s\'ha pogut crear l\agregat.'; + $lang['straggrshowall'] = 'Mostra tots els agregats'; + + // Operator Classes + $lang['stropclasses'] = 'Classes d\'operadors'; + $lang['strnoopclasses'] = 'No s\'han trobat classes d\'operadors.'; + $lang['straccessmethod'] = 'Mètode d\'accés'; + + // Stats and performance + $lang['strrowperf'] = 'Row Performance'; + $lang['strioperf'] = 'I/O Performance'; + $lang['stridxrowperf'] = 'Index Row Performance'; + $lang['stridxioperf'] = 'Index I/O Performance'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Sequential'; + $lang['strscan'] = 'Scan'; + $lang['strread'] = 'Read'; + $lang['strfetch'] = 'Fetch'; + $lang['strheap'] = 'Heap'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST Index'; + $lang['strcache'] = 'Cache'; + $lang['strdisk'] = 'Disk'; + $lang['strrows2'] = 'Rows'; + + // Tablespaces + $lang['strtablespace'] = 'Tablespace'; + $lang['strtablespaces'] = 'Tablespaces'; + $lang['strshowalltablespaces'] = 'Mostrar tots els tablespaces'; + $lang['strnotablespaces'] = 'No s\'han trobat tablespaces'; + $lang['strcreatetablespace'] = 'Crea un tablespace'; + $lang['strlocation'] = 'Localització'; + $lang['strtablespaceneedsname'] = 'Ha de donar un nom al tablespace.'; + $lang['strtablespaceneedsloc'] = 'Ha de donar un directori on crear el tablespace.'; + $lang['strtablespacecreated'] = 'Tablespace creat.'; + $lang['strtablespacecreatedbad'] = 'No s\'ha pogut crear el Tablespace.'; + $lang['strconfdroptablespace'] = 'Està segur de voler eliminar el tablespace "%s"?'; + $lang['strtablespacedropped'] = 'Tablespace eliminat.'; + $lang['strtablespacedroppedbad'] = 'No s\'ha pogut eliminar el tablespace.'; + $lang['strtablespacealtered'] = 'Tablespace modificat.'; + $lang['strtablespacealteredbad'] = 'No s\'ha pogut modifcar el tablespace.'; + + // Slony clusters + $lang['strcluster'] = 'Clúster'; + $lang['strnoclusters'] = 'No s\'han trobat clústers'; + $lang['strconfdropcluster'] = 'Està segur de voler eliminar el clúster "%s"?'; + $lang['strclusterdropped'] = 'Clúster eliminat.'; + $lang['strclusterdroppedbad'] = 'No s\'ha pogut eliminar el clúster.'; + $lang['strinitcluster'] = 'Inicialitza el clúster'; + $lang['strclustercreated'] = 'Clúster inicialitzat.'; + $lang['strclustercreatedbad'] = 'No s\'ha pogut inicialitzar el clúster.'; + $lang['strclusterneedsname'] = 'Ha de donar un nom al clúster.'; + $lang['strclusterneedsnodeid'] = 'Ha de donar una ID al node local.'; + + // Slony nodes + $lang['strnodes'] = 'Nodes'; + $lang['strnonodes'] = 'No s\'han trobat nodes.'; + $lang['strcreatenode'] = 'Crea un node'; + $lang['strid'] = 'ID'; + $lang['stractive'] = 'Activa'; + $lang['strnodecreated'] = 'Node creat.'; + $lang['strnodecreatedbad'] = 'No s\'ha pogut crear el node.'; + $lang['strconfdropnode'] = 'Està segur de voler eliminar el node "%s"?'; + $lang['strnodedropped'] = 'Node eliminat.'; + $lang['strnodedroppedbad'] = 'No s\'ha pogut eliminar el node'; + $lang['strfailover'] = 'Filtra'; + $lang['strnodefailedover'] = 'Node filtrat.'; + $lang['strnodefailedoverbad'] = 'No s\'ha pogut filtrar el node.'; + $lang['strstatus'] = 'Estat'; + $lang['strhealthy'] = 'Saludable'; + $lang['stroutofsync'] = 'Fora de sincronisme'; + $lang['strunknown'] = 'Desconegut'; + + // Slony paths + $lang['strpaths'] = 'Rutes'; + $lang['strnopaths'] = 'No s\'han trobat rutes.'; + $lang['strcreatepath'] = 'Crea una ruta'; + $lang['strnodename'] = 'Nom del node'; + $lang['strnodeid'] = 'ID del node'; + $lang['strconninfo'] = 'Cadena de connexió'; + $lang['strconnretry'] = 'Segons abans de reintentar la connexió'; + $lang['strpathneedsconninfo'] = 'Ha de donar una cadena de connexió per a la ruta.'; + $lang['strpathneedsconnretry'] = 'Ha de donar el num. de seg. d\'espera abans de reintentar la connexió.'; + $lang['strpathcreated'] = 'Ruta creada.'; + $lang['strpathcreatedbad'] = 'La creació de la ruta ha fallat.'; + $lang['strconfdroppath'] = 'Està segur de voler eliminar la ruta "%s"?'; + $lang['strpathdropped'] = 'Ruta eliminada.'; + $lang['strpathdroppedbad'] = 'No s\ha pogut eliminar la ruta.'; + + // Slony listens + $lang['strlistens'] = 'Escoltes'; + $lang['strnolistens'] = 'No s\'han trobat escoltes.'; + $lang['strcreatelisten'] = 'Crea una escolta'; + $lang['strlistencreated'] = 'Escolta creada.'; + $lang['strlistencreatedbad'] = 'La creació de l\'escolta ha fallat.'; + $lang['strconfdroplisten'] = 'Està segur de voler eliminar l\'escolta "%s"?'; + $lang['strlistendropped'] = 'Escolta eliminada.'; + $lang['strlistendroppedbad'] = 'No s\'ha pogut eliminar l\'escolta.'; + + // Slony replication sets + $lang['strrepsets'] = 'Conjunts de replicació'; + $lang['strnorepsets'] = 'No s\'han trobat conjunts de replicació.'; + $lang['strcreaterepset'] = 'Crea un conjunt de replicació'; + $lang['strrepsetcreated'] = 'Conjunt de replicació creat.'; + $lang['strrepsetcreatedbad'] = 'No s\'ha pogut crear el conjunt de replicació.'; + $lang['strconfdroprepset'] = 'Està segur de voler eliminar el conjunt de replicació "%s"?'; + $lang['strrepsetdropped'] = 'Conjunt de replicació eliminat.'; + $lang['strrepsetdroppedbad'] = 'No s\'ha pogut eliminar el conjunt de replicació.'; + $lang['strmerge'] = 'Uneix'; + $lang['strmergeinto'] = 'Uneix a'; + $lang['strrepsetmerged'] = 'Conjunts de replicació units.'; + $lang['strrepsetmergedbad'] = 'No s\'han pogut unir els conjunts de replicació.'; + $lang['strmove'] = 'Mou'; + $lang['strneworigin'] = 'Nou origen'; + $lang['strrepsetmoved'] = 'Conjunt de replicació traslladat.'; + $lang['strrepsetmovedbad'] = 'No s\'ha pogut traslladar el conjunt de replicació.'; + $lang['strnewrepset'] = 'Nou conjunt de replicació'; + $lang['strlock'] = 'Bloqueja'; + $lang['strlocked'] = 'Bloquejat'; + $lang['strunlock'] = 'Desbloqueja'; + $lang['strconflockrepset'] = 'Està segur de voler bloquejar el conjunt de replicació "%s"?'; + $lang['strrepsetlocked'] = 'Conjunt de replicació bloquejat.'; + $lang['strrepsetlockedbad'] = 'No s\'ha pogut bloquejar el conjunt de replicació.'; + $lang['strconfunlockrepset'] = 'Està segur de voler desbloquejar el conjunt de replicació "%s"?'; + $lang['strrepsetunlocked'] = 'Conjunt de replicació desbloquejat.'; + $lang['strrepsetunlockedbad'] = 'No s\'ha pogut desbloquejar el conjunt de replicació.'; + $lang['stronlyonnode'] = 'Només en el node'; + $lang['strddlscript'] = 'Script DDL'; + $lang['strscriptneedsbody'] = 'Ha de subministrar un script per ser executat a tots els nodes.'; + $lang['strscriptexecuted'] = 'Script DDL del conjunt de replicació executat.'; + $lang['strscriptexecutedbad'] = 'Fallada executant l\'script DDL del conjunt de replicació.'; + $lang['strtabletriggerstoretain'] = 'Els següents disparadors NO seran inhabilitats per l\'Slony:'; + + // Slony tables in replication sets + $lang['straddtable'] = 'Afegeix una taula'; + $lang['strtableneedsuniquekey'] = 'La taula que s\'ha d\'afegir requereix una clau primària o única.'; + $lang['strtableaddedtorepset'] = 'Taula afegida al conjunt de replicació.'; + $lang['strtableaddedtorepsetbad'] = 'No s\'ha pogut afegir la taula al conjunt de replicació.'; + $lang['strconfremovetablefromrepset'] = 'Està segur de voler eliminar la taula "%s" del conjunt de replicació "%s"?'; + $lang['strtableremovedfromrepset'] = 'Taula eliminada del conjunt de replicació.'; + $lang['strtableremovedfromrepsetbad'] = 'No s\'ha pogut eliminar la taula del conjunt de replicació.'; + + // Slony sequences in replication sets + $lang['straddsequence'] = 'Afegeix una seqüència'; + $lang['strsequenceaddedtorepset'] = 'Seqüència afegida al conjunt de replicació.'; + $lang['strsequenceaddedtorepsetbad'] = 'No s\'ha pogut afegir la seqüència al conjunt de replicació.'; + $lang['strconfremovesequencefromrepset'] = 'Està segur de voler eliminar la seqüència "%s" del conjunt de replicació "%s"?'; + $lang['strsequenceremovedfromrepset'] = 'Seqüència eliminada del conjunt de replicació.'; + $lang['strsequenceremovedfromrepsetbad'] = 'No s\'ha pogut eliminar la seqüència del conjunt de replicació.'; + + // Slony subscriptions + $lang['strsubscriptions'] = 'Subscripcions'; + $lang['strnosubscriptions'] = 'No s\'han trobat subscripcions.'; + + // Miscellaneous + $lang['strtopbar'] = '%s corrent a %s:%s -- Ha entrat com a usuari "%s"'; + $lang['strtimefmt'] = 'jS M, Y g:iA'; + $lang['strhelp'] = 'Ajuda'; + $lang['strhelpicon'] = '?'; + $lang['strhelppagebrowser'] = 'Cercador de pàgines d\'ajuda'; + $lang['strselecthelppage'] = 'Selecciona una pàgina d\'ajuda'; + $lang['strinvalidhelppage'] = 'Pàgina d\'ajuda invàlida.'; + $lang['strlogintitle'] = 'Entrar a %s'; + $lang['strlogoutmsg'] = 'Sortir de %s'; + $lang['strloading'] = 'Carregant...'; + $lang['strerrorloading'] = 'Error Carregant'; + $lang['strclicktoreload'] = 'Clicar per recarregar'; + + // Autovacuum + $lang['strautovacuum'] = 'Autovacuum'; + $lang['strturnedon'] = 'Activat'; + $lang['strturnedoff'] = 'Desactivat'; + $lang['strenabled'] = 'Habilitat'; + $lang['strnovacuumconf'] = 'No s\'ha trobat la configuració de l\'autovacuum.'; + $lang['strvacuumbasethreshold'] = 'Llindar Base del Vacuum'; + $lang['strvacuumscalefactor'] = 'Factor d\'Escala del Vacuum'; + $lang['stranalybasethreshold'] = 'Llindar Base de l\'Analyze'; + $lang['stranalyzescalefactor'] = 'Factor d\'Escala de l\'Analyze'; + $lang['strvacuumcostdelay'] = 'Cost del Retard del Vacuum'; + $lang['strvacuumcostlimit'] = 'Límit de Cost del Vacuum'; + $lang['strvacuumpertable'] = 'Configuració de l\'autovacuum per taula'; + $lang['straddvacuumtable'] = 'Afegeix la configuració de l\'autovacuum per una taula'; + $lang['streditvacuumtable'] = 'Edita la configuració de l\'autovacuum de la taula %s'; + $lang['strdelvacuumtable'] = 'Vol eliminar la configuració de l\'autovacuum de la taula %s ?'; + $lang['strvacuumtablereset'] = 'S\'ha inicialitzat la configuració de l\'autovacuum de la taula %s als valors per defecte'; + $lang['strdelvacuumtablefail'] = 'No s\'ha pogut eliminar la configuració de l\'autovacuum de la taula %s'; + $lang['strsetvacuumtablesaved'] = 'Configuració de l\'autovacuum de la taula %s desada.'; + $lang['strsetvacuumtablefail'] = 'Ha fallat la configuració de l\'autovacuum de la taula %s.'; + $lang['strspecifydelvacuumtable'] = 'Ha d\'especificar la taula d\'on vol eliminar els paràmetres de l\'autovacuum.'; + $lang['strspecifyeditvacuumtable'] = 'Ha d\'especificar la taula d\'on vol editar els paràmetres de l\'autovacuum.'; + $lang['strnotdefaultinred'] = 'Els paràmetres no per defecte en vermell.'; + + // Table-level Locks + $lang['strlocks'] = 'Bloquejos'; + $lang['strtransaction'] = 'ID de la Transacció'; + $lang['strvirtualtransaction'] = 'ID de la Transacció Virtual'; + $lang['strprocessid'] = 'ID del Procés'; + $lang['strmode'] = 'Mode de Bloqueig'; + $lang['strislockheld'] = 'S\'aguanta el bloqueig?'; + + // Prepared transactions + $lang['strpreparedxacts'] = 'Transaccions preparades'; + $lang['strxactid'] = 'ID de la Transacció'; + $lang['strgid'] = 'ID Global'; + + // Fulltext search + $lang['strfulltext'] = 'Cerca del Text Completa (FTS)'; + $lang['strftsconfig'] = 'Configuració FTS'; + $lang['strftsconfigs'] = 'Configuracions'; + $lang['strftscreateconfig'] = 'Crea una configuració FTS'; + $lang['strftscreatedict'] = 'Crea un diccionari'; + $lang['strftscreatedicttemplate'] = 'Crea una plantilla d\'un diccionari'; + $lang['strftscreateparser'] = 'Crea un analitzador'; + $lang['strftsnoconfigs'] = 'No s\'ha trobat cap configuració FTS.'; + $lang['strftsconfigdropped'] = 'Configuració FTS eliminada.'; + $lang['strftsconfigdroppedbad'] = 'No s\'ha pogut eliminar la configuració FTS.'; + $lang['strconfdropftsconfig'] = 'Està segur de voler eliminar la configuració FTS "%s"?'; + $lang['strconfdropftsdict'] = 'Està segur de voler eliminar el diccionari FTS "%s"?'; + $lang['strconfdropftsmapping'] = 'Està segur de voler eliminar el traçat "%s" de la configuració FTS "%s"?'; + $lang['strftstemplate'] = 'Plantilla'; + $lang['strftsparser'] = 'Analitzador'; + $lang['strftsconfigneedsname'] = 'Ha de donar un nom a la configuració FTS.'; + $lang['strftsconfigcreated'] = 'Configuració FTS creada.'; + $lang['strftsconfigcreatedbad'] = 'No s\'ha pogut crear la configuració FTS.'; + $lang['strftsmapping'] = 'Traçat'; + $lang['strftsdicts'] = 'Diccionaris'; + $lang['strftsdict'] = 'Diccionari'; + $lang['strftsemptymap'] = 'Mapa de la configuració FTS buida.'; + $lang['strftsconfigaltered'] = 'Configuració FTS modificada.'; + $lang['strftsconfigalteredbad'] = 'No s\'ha pogut modificar la configuració FTS.'; + $lang['strftsconfigmap'] = 'Mapa de la configuració FTS'; + $lang['strftsparsers'] = 'Analitzadors FTS'; + $lang['strftsnoparsers'] = 'No hi ha analitzadors FTS disponibles.'; + $lang['strftsnodicts'] = 'No hi ha diccionaris FTS disponibles.'; + $lang['strftsdictcreated'] = 'Diccionari FTS creat.'; + $lang['strftsdictcreatedbad'] = 'No s\ha pogut crear el diccionari FTS.'; + $lang['strftslexize'] = 'Lexize'; + $lang['strftsinit'] = 'Inicialitzador'; + $lang['strftsoptionsvalues'] = 'Opcions i valors'; + $lang['strftsdictneedsname'] = 'Ha de donar un nom al diccionari FTS.'; + $lang['strftsdictdropped'] = 'Diccionari FTS eliminat.'; + $lang['strftsdictdroppedbad'] = 'No s\'ha pogut eliminar el diccionari FTS.'; + $lang['strftsdictaltered'] = 'Diccionari FTS modificat.'; + $lang['strftsdictalteredbad'] = 'No s\'ha pogut modificar el diccionari FTS.'; + $lang['strftsaddmapping'] = 'Afegeix un nou traçat'; + $lang['strftsspecifymappingtodrop'] = 'Ha d\'especificar almenys un traçat per eliminar.'; + $lang['strftsspecifyconfigtoalter'] = 'Ha d\'especificar la configuració FTS per modificar'; + $lang['strftsmappingdropped'] = 'Traçat FTS eliminat.'; + $lang['strftsmappingdroppedbad'] = 'No s\'ha pogut eliminar el traçat FTS.'; + $lang['strftsnodictionaries'] = 'No s\'han trobat diccionaris.'; + $lang['strftsmappingaltered'] = 'Traçat FTS modificat.'; + $lang['strftsmappingalteredbad'] = 'No s\'ha pogut modificar el traçat FTS.'; + $lang['strftsmappingadded'] = 'Traçat FTS afegit.'; + $lang['strftsmappingaddedbad'] = 'No s\'ha pogut afegir el traçat FTS.'; + $lang['strftstabconfigs'] = 'Configuracions'; + $lang['strftstabdicts'] = 'Diccionaris'; + $lang['strftstabparsers'] = 'Analitzadors'; + $lang['strftscantparsercopy'] = 'No es pot especificar alhora un analitzador i una plantilla durant la creació de la configuració de la cerca de text.'; +?> diff --git a/php/pgadmin/lang/chinese-sim.php b/php/pgadmin/lang/chinese-sim.php new file mode 100644 index 0000000..6366179 --- /dev/null +++ b/php/pgadmin/lang/chinese-sim.php @@ -0,0 +1,372 @@ + diff --git a/php/pgadmin/lang/chinese-tr.php b/php/pgadmin/lang/chinese-tr.php new file mode 100644 index 0000000..ee30ebf --- /dev/null +++ b/php/pgadmin/lang/chinese-tr.php @@ -0,0 +1,598 @@ +'; + $lang['strfirst'] = '<< Ĥ@B'; + $lang['strlast'] = '̫@B >>'; + $lang['strfailed'] = ''; + $lang['strcreate'] = 'إ'; + $lang['strcreated'] = 'wإ'; + $lang['strcomment'] = ''; + $lang['strlength'] = ''; + $lang['strdefault'] = 'w]'; + $lang['stralter'] = 'ק'; + $lang['strok'] = 'Tw'; + $lang['strcancel'] = ''; + $lang['strsave'] = 'xs'; + $lang['strreset'] = ']'; + $lang['strinsert'] = 'J'; + $lang['strselect'] = ''; + $lang['strdelete'] = 'R'; + $lang['strupdate'] = 's'; + $lang['strreferences'] = 'Ѧ'; + $lang['stryes'] = 'O'; + $lang['strno'] = '_'; + $lang['strtrue'] = 'u'; + $lang['strfalse'] = ''; + $lang['stredit'] = 'ק'; + $lang['strcolumns'] = 'Ʀ'; + $lang['strrows'] = 'ƦC'; + $lang['strrowsaff'] = 'ƦCvTC'; + $lang['strobjects'] = ''; + $lang['strexample'] = 'ҦpG'; + $lang['strback'] = '^'; + $lang['strqueryresults'] = 'dߵG'; + $lang['strshow'] = ''; + $lang['strempty'] = ''; + $lang['strlanguage'] = 'y'; + $lang['strencoding'] = 'sX'; + $lang['strvalue'] = ''; + $lang['strunique'] = 'W@'; + $lang['strprimary'] = 'D'; + $lang['strexport'] = 'ץX'; + $lang['strimport'] = 'פJ'; + $lang['strsql'] = 'SQL'; + $lang['strgo'] = '}l'; + $lang['stradmin'] = '޲z'; + $lang['strvacuum'] = 'M'; + $lang['stranalyze'] = 'R'; + $lang['strclusterindex'] = 'O'; + $lang['strclustered'] = 'O?'; + $lang['strreindex'] = 'د'; + $lang['strrun'] = ''; + $lang['stradd'] = '[J'; + $lang['strevent'] = 'ƥ'; + $lang['strwhere'] = 'Where'; + $lang['strinstead'] = 'Do Instead'; + $lang['strwhen'] = ''; + $lang['strformat'] = '榡'; + $lang['strdata'] = ''; + $lang['strconfirm'] = 'T{'; + $lang['strexpression'] = 'ܦ'; + $lang['strellipsis'] = '...'; + $lang['strexpand'] = 'i}'; + $lang['strcollapse'] = 'P|'; + $lang['strexplain'] = 'ĩ'; + $lang['strexplainanalyze'] = 'ĩR'; + $lang['strfind'] = 'M'; + $lang['stroptions'] = 'ﶵ'; + $lang['strrefresh'] = 'sz'; + $lang['strdownload'] = 'U'; + $lang['strdownloadgzipped'] = 'HgzipYU'; + $lang['strinfo'] = 'T'; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = 'i'; + $lang['strvariables'] = 'ܼ'; + $lang['strprocess'] = '{'; + $lang['strprocesses'] = '{'; + $lang['strsetting'] = ']w'; + $lang['streditsql'] = 'sSQL'; + $lang['strruntime'] = '`@ɶ: %s ms'; + $lang['strpaginate'] = 'ܵG'; + $lang['struploadscript'] = 'άOWǤ@SQLO:'; + $lang['strstarttime'] = '}lɶ'; + $lang['strfile'] = 'ɮ'; + $lang['strfileimported'] = 'ɮפwפJC'; + + // Error handling + $lang['strbadconfig'] = 'z config.inc.php LġCЧQ config.inc.php-dist إ߱z config.inc.php ɡC'; + $lang['strnotloaded'] = 'z PHP ҥw˥ݪƮw䴩C'; + $lang['strbadschema'] = 'wFLĪҦ (schema)C'; + $lang['strbadencoding'] = 'ƮwLk]wΤݪsX覡C'; + $lang['strsqlerror'] = 'SQL ~G'; + $lang['strinstatement'] = '󳯭zG'; + $lang['strinvalidparam'] = 'LĪ script ܼơC'; + $lang['strnodata'] = '䤣ƦCC'; + $lang['strnoobjects'] = '䤣󪫥C'; + $lang['strrownotunique'] = 'ƦCLWSѧOC'; + $lang['strnoreportsdb'] = 'z|طsƮwAаѾ\INSTALLɻC'; + $lang['strnouploads'] = 'Wɮץ\wΡC'; + $lang['strimporterror'] = 'פJ~C'; + $lang['strimporterrorline'] = 'פJ~oͩ %s C'; + + // Tables + $lang['strtable'] = 'ƪ'; + $lang['strtables'] = 'ƪ'; + $lang['strshowalltables'] = 'ܩҦƪ'; + $lang['strnotables'] = '䤣즹ƪC'; + $lang['strnotable'] = '䤣ƪC'; + $lang['strcreatetable'] = 'إ߷sƪ'; + $lang['strtablename'] = 'ƪW'; + $lang['strtableneedsname'] = 'zݬzƪRWC'; + $lang['strtableneedsfield'] = 'zܤw@C'; + $lang['strtableneedscols'] = 'ƪݭn@wƥتƦC'; + $lang['strtablecreated'] = '\إ߸ƪC'; + $lang['strtablecreatedbad'] = 'إ߸ƪ@~ѡC'; + $lang['strconfdroptable'] = 'zTwnRƪ "%s"?'; + $lang['strtabledropped'] = '\RƪC'; + $lang['strtabledroppedbad'] = 'Rƪ@~ѡC'; + $lang['strconfemptytable'] = 'zTwnMŸƪ "%s"?'; + $lang['strtableemptied'] = '\MŸƪC'; + $lang['strtableemptiedbad'] = 'MŸƪ@~ѡC'; + $lang['strinsertrow'] = 'JƦ'; + $lang['strrowinserted'] = '\JƦC'; + $lang['strrowinsertedbad'] = 'JƦ@~ѡC'; + $lang['streditrow'] = 'קƦ'; + $lang['strrowupdated'] = '\sƦC'; + $lang['strrowupdatedbad'] = 'sƦ@~ѡC'; + $lang['strdeleterow'] = 'RƦ'; + $lang['strconfdeleterow'] = 'zTwnRǸƦ?'; + $lang['strrowdeleted'] = '\RƦC'; + $lang['strrowdeletedbad'] = 'ƦR@~ѡC'; + $lang['strsaveandrepeat'] = 'xsí'; + $lang['strfield'] = ''; + $lang['strfields'] = ''; + $lang['strnumfields'] = 'ƥ'; + $lang['strfieldneedsname'] = 'zݬzRWC'; + $lang['strselectallfields'] = 'ܩҦ'; + $lang['strselectneedscol'] = 'ܤܤ@ƦCC'; + $lang['strselectunary'] = 'ର@BlwƭȡC'; + $lang['straltercolumn'] = 'קƦC'; + $lang['strcolumnaltered'] = '\קƦCC'; + $lang['strcolumnalteredbad'] = 'קƦC@~ѡC'; + $lang['strconfdropcolumn'] = 'zTwnRƦC "%s" ƪ "%s"?'; + $lang['strcolumndropped'] = '\RƦCC'; + $lang['strcolumndroppedbad'] = 'RƦC@~ѡC'; + $lang['straddcolumn'] = '[Js'; + $lang['strcolumnadded'] = '\[JC'; + $lang['strcolumnaddedbad'] = '[J@~ѡC'; + $lang['strcascade'] = 'CASCADE'; + $lang['strtablealtered'] = 'ƪwקC'; + $lang['strtablealteredbad'] = 'ƪק@~ѡC'; + $lang['strdataonly'] = 'uܸ'; + $lang['strstructureonly'] = 'uc'; + $lang['strstructureanddata'] = 'ƩMc'; + $lang['strtabbed'] = 'Tabbed'; + $lang['strauto'] = '۰'; + + // Users + $lang['struser'] = 'Τ'; + $lang['strusers'] = 'Τ'; + $lang['strusername'] = 'ΤW'; + $lang['strpassword'] = 'KX'; + $lang['strsuper'] = 'WťΤ?'; + $lang['strcreatedb'] = '\إ߸Ʈw?'; + $lang['strexpires'] = ''; + $lang['strsessiondefaults'] = 'w]Session'; + $lang['strnousers'] = '䤣즹ΤC'; + $lang['struserupdated'] = '\sΤC'; + $lang['struserupdatedbad'] = 'sΤ@~ѡC'; + $lang['strshowallusers'] = 'ܩҦΤ'; + $lang['strcreateuser'] = 'إ߷sΤ'; + $lang['struserneedsname'] = 'ЬΤR'; + $lang['strusercreated'] = '\إ߷sΤC'; + $lang['strusercreatedbad'] = 'إ߷sΤ@~ѡC'; + $lang['strconfdropuser'] = 'zTwnRΤ "%s"?'; + $lang['struserdropped'] = 'ΤwRC'; + $lang['struserdroppedbad'] = 'RΤ@~ѡC'; + $lang['straccount'] = 'b'; + $lang['strchangepassword'] = 'KX'; + $lang['strpasswordchanged'] = '\KXC'; + $lang['strpasswordchangedbad'] = 'KX@~ѡC'; + $lang['strpasswordshort'] = 'KXӵuC'; + $lang['strpasswordconfirm'] = 'ҿJձKXPC'; + + // Groups + $lang['strgroup'] = 's'; + $lang['strgroups'] = 's'; + $lang['strnogroup'] = '䤣즹sաC'; + $lang['strnogroups'] = '䤣sաC'; + $lang['strcreategroup'] = 'إ߷ss'; + $lang['strshowallgroups'] = 'ܩҦs'; + $lang['strgroupneedsname'] = 'zݬzsթRWC'; + $lang['strgroupcreated'] = '\إ߸sաC'; + $lang['strgroupcreatedbad'] = 'sիإߧ@~ѡC'; + $lang['strconfdropgroup'] = 'zTwRs "%s"?'; + $lang['strgroupdropped'] = '\RsաC'; + $lang['strgroupdroppedbad'] = 'Rsէ@~ѡC'; + $lang['strmembers'] = 'Τ'; + $lang['straddmember'] = 'sWΤ'; + $lang['strmemberadded'] = 'w[JΤC'; + $lang['strmemberaddedbad'] = 'sWΤᥢѡC'; + $lang['strdropmember'] = 'RΤ'; + $lang['strconfdropmember'] = 'zTwnRΤ "%s" qs "%s"?'; + $lang['strmemberdropped'] = 'ΤwRC'; + $lang['strmemberdroppedbad'] = 'RΤ@~ѡC'; + + // Privilges + $lang['strprivilege'] = 'Sv'; + $lang['strprivileges'] = 'Sv'; + $lang['strnoprivileges'] = 'Ӫ󦳹w]ݤJSvC'; + $lang['strgrant'] = 'ᤩ'; + $lang['strrevoke'] = 'M^'; + $lang['strgranted'] = '\SvC'; + $lang['strgrantfailed'] = 'Sv@~ѡC'; + $lang['strgrantbad'] = 'z@WϥΪ̩θsիwܤ֤@ӯSvC'; + $lang['stralterprivs'] = 'Sv'; + $lang['strgrantor'] = 'v'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'Ʈw'; + $lang['strdatabases'] = 'Ʈw'; + $lang['strshowalldatabases'] = 'ܩҦƮw'; + $lang['strnodatabase'] = '䤣즹ƮwC'; + $lang['strnodatabases'] = '䤣ƮwC'; + $lang['strcreatedatabase'] = 'إ߷sƮw'; + $lang['strdatabasename'] = 'ƮwW'; + $lang['strdatabaseneedsname'] = 'zݬzƮwRWC'; + $lang['strdatabasecreated'] = '\إ߸ƮwC'; + $lang['strdatabasecreatedbad'] = 'إ߸Ʈw@~ѡC'; + $lang['strconfdropdatabase'] = 'zTwnRƮw "%s"?'; + $lang['strdatabasedropped'] = '\RƮwC'; + $lang['strdatabasedroppedbad'] = 'RƮw@~ѡC'; + $lang['strentersql'] = 'UJҭn檺 SQL zG'; + $lang['strsqlexecuted'] = '\ SQL C'; + $lang['strvacuumgood'] = 'Mŧ@~C'; + $lang['strvacuumbad'] = 'Mŧ@~ѡC'; + $lang['stranalyzegood'] = 'R@~C'; + $lang['stranalyzebad'] = 'R@~.'; + $lang['strreindexgood'] = 'ޭاC'; + $lang['strreindexbad'] = 'ޭإѡC'; + $lang['strfull'] = ''; + $lang['strfreeze'] = 'ᵲ'; + $lang['strforce'] = 'j'; + + // Views + $lang['strview'] = ''; + $lang['strviews'] = ''; + $lang['strshowallviews'] = 'ܩҦ'; + $lang['strnoview'] = '䤣즹C'; + $lang['strnoviews'] = '䤣C'; + $lang['strcreateview'] = 'إ߷s'; + $lang['strviewname'] = 'W'; + $lang['strviewneedsname'] = 'zݬzRWC'; + $lang['strviewneedsdef'] = 'zwqAC'; + $lang['strviewneedsfields'] = 'пܭn[JC'; + $lang['strviewcreated'] = '\إ߷sC'; + $lang['strviewcreatedbad'] = 'إ߷s@~'; + $lang['strconfdropview'] = 'zTwnR "%s"?'; + $lang['strviewdropped'] = '\RC'; + $lang['strviewdroppedbad'] = 'R@~ѡC'; + $lang['strviewupdated'] = '\sC'; + $lang['strviewupdatedbad'] = 's@~ѡC'; + $lang['strviewlink'] = 's'; + $lang['strviewconditions'] = 'B~'; + $lang['strcreateviewwiz'] = 'ϥεF'; + + // Sequences + $lang['strsequence'] = 'ǦC'; + $lang['strsequences'] = 'ǦC'; + $lang['strshowallsequences'] = 'ܩҦǦC'; + $lang['strnosequence'] = '䤣즹ǦCC'; + $lang['strnosequences'] = '䤣ǦCC'; + $lang['strcreatesequence'] = 'إ߷sǦC'; + $lang['strlastvalue'] = ''; + $lang['strincrementby'] = 'Wq ([/) '; + $lang['strstartvalue'] = 'ҩl'; + $lang['strmaxvalue'] = '̤j'; + $lang['strminvalue'] = '̤֭'; + $lang['strcachevalue'] = '֨'; + $lang['strlogcount'] = 'nƶq'; + $lang['striscycled'] = '`?'; + $lang['strsequenceneedsname'] = 'zݬzǦCRWC'; + $lang['strsequencecreated'] = '\إ߷sǦCC'; + $lang['strsequencecreatedbad'] = 'إ߷sǦC@~ѡC'; + $lang['strconfdropsequence'] = 'zTwnRǦC "%s"?'; + $lang['strsequencedropped'] = '\RǦCC'; + $lang['strsequencedroppedbad'] = 'RǦC@~ѡC'; + $lang['strsequencereset'] = 'w]ǦCC'; + $lang['strsequenceresetbad'] = ']ǦCѡC'; + + // Indexes + $lang['strindex'] = ''; + $lang['strindexes'] = ''; + $lang['strindexname'] = 'ަW'; + $lang['strshowallindexes'] = 'ܩҦ'; + $lang['strnoindex'] = '䤣즹ޡC'; + $lang['strnoindexes'] = '䤣ޡC'; + $lang['strcreateindex'] = 'إ߷s'; + $lang['strtabname'] = '˯W'; + $lang['strcolumnname'] = 'ƦCW'; + $lang['strindexneedsname'] = 'zݬzީRWC'; + $lang['strindexneedscols'] = '@wưݪƦCC'; + $lang['strindexcreated'] = '\إ߷s'; + $lang['strindexcreatedbad'] = 'إ߯ާ@~ѡC'; + $lang['strconfdropindex'] = 'zTwnR "%s"?'; + $lang['strindexdropped'] = '\RޡC'; + $lang['strindexdroppedbad'] = 'Rާ@~ѡC'; + $lang['strkeyname'] = 'W'; + $lang['struniquekey'] = 'W@'; + $lang['strprimarykey'] = 'D'; + $lang['strindextype'] = ''; + $lang['strtablecolumnlist'] = 'ƪҧtƦC'; + $lang['strindexcolumnlist'] = 'ީҧtƦC'; + $lang['strconfcluster'] = 'zTwnO "%s"?'; + $lang['strclusteredgood'] = 'OC'; + $lang['strclusteredbad'] = 'OѡC'; + + // Rules + $lang['strrules'] = 'Wh'; + $lang['strrule'] = 'Wh'; + $lang['strshowallrules'] = 'ܩҦWh'; + $lang['strnorule'] = '䤣즹WhC'; + $lang['strnorules'] = '䤣WhC'; + $lang['strcreaterule'] = 'إ߷sWh'; + $lang['strrulename'] = 'WhW'; + $lang['strruleneedsname'] = 'zݬzWhRWC'; + $lang['strrulecreated'] = '\إ߷sWhC'; + $lang['strrulecreatedbad'] = 'إ߷sWh@~ѡC'; + $lang['strconfdroprule'] = 'zTwnR "%s" "%s"?'; + $lang['strruledropped'] = '\RWhC'; + $lang['strruledroppedbad'] = 'RWh@~ѡC'; + + // Constraints + $lang['strconstraints'] = ''; + $lang['strshowallconstraints'] = 'ܩҦ'; + $lang['strnoconstraints'] = '䤣즹C'; + $lang['strcreateconstraint'] = 'إ߷s'; + $lang['strconstraintcreated'] = '\إ߷sC'; + $lang['strconstraintcreatedbad'] = 'sج@~ѡC'; + $lang['strconfdropconstraint'] = 'zTwnR "%s" "%s"?'; + $lang['strconstraintdropped'] = '\RC'; + $lang['strconstraintdroppedbad'] = 'R@~ѡC'; + $lang['straddcheck'] = '[Jsd (check)'; + $lang['strcheckneedsdefinition'] = 'zݩwqzd (check)C'; + $lang['strcheckadded'] = '\[Jsd (check)C'; + $lang['strcheckaddedbad'] = '[Jsd (check) @~ѡC'; + $lang['straddpk'] = '[JD'; + $lang['strpkneedscols'] = 'Dܤ]t@ӸƦC'; + $lang['strpkadded'] = '\[JDC'; + $lang['strpkaddedbad'] = '[JD@@~ѡC'; + $lang['stradduniq'] = '[JW@'; + $lang['struniqneedscols'] = 'W@ܤ]t@ӸƦC'; + $lang['struniqadded'] = '\[JW@C'; + $lang['struniqaddedbad'] = '[JW@@~ѡC'; + $lang['straddfk'] = '[J~'; + $lang['strfkneedscols'] = '~ܤ]t@ӸƦC'; + $lang['strfkneedstarget'] = '~ݰѷӥؼиƪC'; + $lang['strfkadded'] = '\[J~C'; + $lang['strfkaddedbad'] = '[J~@~ѡC'; + $lang['strfktarget'] = 'ؼиƪ'; + $lang['strfkcolumnlist'] = 'ҧtƦ'; + $lang['strondelete'] = 'R'; + $lang['stronupdate'] = ''; + + // Functions + $lang['strfunction'] = ''; + $lang['strfunctions'] = ''; + $lang['strshowallfunctions'] = 'ܩҦ'; + $lang['strnofunction'] = '䤣즹ơC'; + $lang['strnofunctions'] = '䤣ơC'; + $lang['strcreatefunction'] = 'إ߷s'; + $lang['strfunctionname'] = 'ƦW'; + $lang['strreturns'] = '^'; + $lang['strarguments'] = 'Ѽ'; + $lang['strproglanguage'] = '{y'; + $lang['strfunctionneedsname'] = 'zݬzƩRWC'; + $lang['strfunctionneedsdef'] = 'zwqzơC'; + $lang['strfunctioncreated'] = '\إ߷sơC'; + $lang['strfunctioncreatedbad'] = 'sبƧ@~ѡC'; + $lang['strconfdropfunction'] = 'zTwnR "%s"?'; + $lang['strfunctiondropped'] = '\RơC'; + $lang['strfunctiondroppedbad'] = 'RƧ@~ѡC'; + $lang['strfunctionupdated'] = '\ơC'; + $lang['strfunctionupdatedbad'] = 'Ƨ@~ѡC'; + + // Triggers + $lang['strtrigger'] = 'IJo'; + $lang['strtriggers'] = 'IJo'; + $lang['strshowalltriggers'] = 'ܩҦIJo'; + $lang['strnotrigger'] = '䤣즹IJoC'; + $lang['strnotriggers'] = '䤣IJoC'; + $lang['strcreatetrigger'] = 'إ߷sIJo'; + $lang['strtriggerneedsname'] = 'zݬzIJoRWC'; + $lang['strtriggerneedsfunc'] = 'zAIJow@ӨơC'; + $lang['strtriggercreated'] = '\إ߷sIJoC'; + $lang['strtriggercreatedbad'] = 'إIJo@~ѡC'; + $lang['strconfdroptrigger'] = 'zTwnRIJo "%s" "%s"?'; + $lang['strtriggerdropped'] = '\RIJoC'; + $lang['strtriggerdroppedbad'] = 'RIJo@~ѡC'; + $lang['strtriggeraltered'] = 'IJowקC'; + $lang['strtriggeralteredbad'] = 'קIJo@~ѡC'; + + // Types + $lang['strtype'] = ''; + $lang['strtypes'] = ''; + $lang['strshowalltypes'] = 'ܩҦ'; + $lang['strnotype'] = '䤣즹C'; + $lang['strnotypes'] = '䤣C'; + $lang['strcreatetype'] = 'إ߷s'; + $lang['strtypename'] = 'W'; + $lang['strinputfn'] = 'J'; + $lang['stroutputfn'] = 'X'; + $lang['strpassbyval'] = 'Hȶǰe?'; + $lang['stralignment'] = 'ƦC'; + $lang['strelement'] = ''; + $lang['strdelimiter'] = 'jŸ'; + $lang['strstorage'] = 'xs'; + $lang['strtypeneedsname'] = 'zݬzRWC'; + $lang['strtypeneedslen'] = 'zwzסC'; + $lang['strtypecreated'] = '\إ߷s'; + $lang['strtypecreatedbad'] = ' إ@~ѡC'; + $lang['strconfdroptype'] = 'zTwnR "%s"?'; + $lang['strtypedropped'] = '\RC'; + $lang['strtypedroppedbad'] = 'R@~ѡC'; + + // Schemas + $lang['strschema'] = 'Ҧ'; + $lang['strschemas'] = 'Ҧ'; + $lang['strshowallschemas'] = 'ܩҦҦ'; + $lang['strnoschema'] = '䤣즹Ҧ'; + $lang['strnoschemas'] = '䤣ҦC'; + $lang['strcreateschema'] = 'إ߷sҦ'; + $lang['strschemaname'] = 'ҦW'; + $lang['strschemaneedsname'] = 'zݬzҦRWC'; + $lang['strschemacreated'] = '\إ߷sҦC'; + $lang['strschemacreatedbad'] = 'إ߼Ҧ@~ѡC'; + $lang['strconfdropschema'] = 'zTwnRҦ "%s"?'; + $lang['strschemadropped'] = '\RҦC '; + $lang['strschemadroppedbad'] = 'RҦ@~ѡC'; + $lang['strschemaaltered'] = '\קҦ'; + $lang['strschemaalteredbad'] = 'קҦѡC'; + + // Reports + $lang['strreport'] = ''; + $lang['strreports'] = ''; + $lang['strshowallreports'] = 'ܩҦ'; + $lang['strnoreports'] = '䤣즹C'; + $lang['strcreatereport'] = 'إ߷s'; + $lang['strreportdropped'] = '\RC'; + $lang['strreportdroppedbad'] = 'R@~ѡC'; + $lang['strconfdropreport'] = 'zTwnR "%s"?'; + $lang['strreportneedsname'] = 'zݬzRWC'; + $lang['strreportneedsdef'] = 'zݵz SQLC'; + $lang['strreportcreated'] = '\xsC'; + $lang['strreportcreatedbad'] = 'LkxsC'; + + // Domains + $lang['strdomain'] = ''; + $lang['strdomains'] = ''; + $lang['strshowalldomains'] = 'ܩҦ'; + $lang['strnodomains'] = '䤣C'; + $lang['strcreatedomain'] = 'sػ'; + $lang['strdomaindropped'] = 'wRC'; + $lang['strdomaindroppedbad'] = 'R@~ѡC'; + $lang['strconfdropdomain'] = 'zTwnR "%s"?'; + $lang['strdomainneedsname'] = 'zݬRWC'; + $lang['strdomaincreated'] = 'wإߡC'; + $lang['strdomaincreatedbad'] = 'sػ@~ѡC'; + $lang['strdomainaltered'] = 'wקC'; + $lang['strdomainalteredbad'] = 'ק@~ѡC'; + + // Operators + $lang['stroperator'] = 'Bl'; + $lang['stroperators'] = 'Bl'; + $lang['strshowalloperators'] = 'ܩҦBls'; + $lang['strnooperator'] = '䤣BlC'; + $lang['strnooperators'] = '䤣BlC'; + $lang['strcreateoperator'] = 'sعBl'; + $lang['strleftarg'] = '޼ƫA'; + $lang['strrightarg'] = 'k޼ƫA'; + $lang['strcommutator'] = 'ഫ'; + $lang['strnegator'] = '_w'; + $lang['strrestrict'] = ''; + $lang['strjoin'] = 'X'; + $lang['strhashes'] = 'Hashes'; + $lang['strmerges'] = 'X'; + $lang['strleftsort'] = 'Ƨ'; + $lang['strrightsort'] = 'kƧ'; + $lang['strlessthan'] = 'p'; + $lang['strgreaterthan'] = 'j'; + $lang['stroperatorneedsname'] = 'zݬzBlRWC'; + $lang['stroperatorcreated'] = 'Blwإ'; + $lang['stroperatorcreatedbad'] = 'Blsا@~ѡC'; + $lang['strconfdropoperator'] = 'zTwnRBl "%s"?'; + $lang['stroperatordropped'] = 'BlwRC'; + $lang['stroperatordroppedbad'] = 'BlRѡC'; + + // Casts + $lang['strcasts'] = 'Oഫ'; + $lang['strnocasts'] = '䤣쫬OഫC'; + $lang['strsourcetype'] = 'lO'; + $lang['strtargettype'] = '᫬O'; + $lang['strimplicit'] = 't'; + $lang['strinassignment'] = ''; + $lang['strbinarycompat'] = '(G۲)'; + + // Conversions + $lang['strconversions'] = 'ഫ'; + $lang['strnoconversions'] = '䤣ഫC'; + $lang['strsourceencoding'] = 'lsX'; + $lang['strtargetencoding'] = 'ؼнsX'; + + // Languages + $lang['strlanguages'] = 'y'; + $lang['strnolanguages'] = '䤣yC'; + $lang['strtrusted'] = 'H'; + + // Info + $lang['strnoinfo'] = 'LkoTC'; + $lang['strreferringtables'] = 'ѷӸƪ'; + $lang['strparenttables'] = 'ƪ'; + $lang['strchildtables'] = 'lƪ'; + + // Aggregates + $lang['straggregates'] = '`'; + $lang['strnoaggregates'] = '䤣`C'; + $lang['stralltypes'] = '()'; + + // Operator Classes + $lang['stropclasses'] = 'BlO'; + $lang['strnoopclasses'] = '䤣BOC'; + $lang['straccessmethod'] = 'ڵs'; + + // Stats and performance + $lang['strrowperf'] = 'ƦIJv'; + $lang['strioperf'] = 'I/OIJv'; + $lang['stridxrowperf'] = 'ަIJv'; + $lang['stridxioperf'] = 'I/OIJv'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = '`'; + $lang['strscan'] = 'y'; + $lang['strread'] = 'Ū'; + $lang['strfetch'] = 'Fetch'; + $lang['strheap'] = 'Heap'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST'; + $lang['strcache'] = '֨'; + $lang['strdisk'] = 'Ϻ'; + $lang['strrows2'] = 'Ʀ'; + + // Miscellaneous + $lang['strtopbar'] = '%s %s:%s zO "%s"'; + $lang['strtimefmt'] = 'jS M, Y g:iA'; + $lang['strhelp'] = ''; + +?> diff --git a/php/pgadmin/lang/chinese-utf8-zh_CN.php b/php/pgadmin/lang/chinese-utf8-zh_CN.php new file mode 100644 index 0000000..00684a6 --- /dev/null +++ b/php/pgadmin/lang/chinese-utf8-zh_CN.php @@ -0,0 +1,980 @@ +>'; + $lang['strfailed'] = '失败'; + $lang['strcreate'] = '创建'; + $lang['strcreated'] = '已创建'; + $lang['strcomment'] = '注释'; + $lang['strlength'] = '长度'; + $lang['strdefault'] = '默认'; + $lang['stralter'] = '变更'; + $lang['strok'] = '确认'; + $lang['strcancel'] = '取消'; + $lang['strac'] = '自动完成有效'; + $lang['strsave'] = '保存'; + $lang['strreset'] = '重置'; + $lang['strinsert'] = '插入'; + $lang['strselect'] = '选择'; + $lang['strdelete'] = '删除'; + $lang['strupdate'] = '更新'; + $lang['strreferences'] = '参考'; + $lang['stryes'] = '是'; + $lang['strno'] = '否'; + $lang['strtrue'] = 'TRUE'; + $lang['strfalse'] = 'FALSE'; + $lang['stredit'] = '编辑'; + $lang['strcolumn'] = '列'; + $lang['strcolumns'] = '列'; + $lang['strrows'] = '行'; + $lang['strrowsaff'] = '行已影响(变更)。'; + $lang['strobjects'] = '对象(s)'; + $lang['strback'] = '返回'; + $lang['strqueryresults'] = '查询结果'; + $lang['strshow'] = '显示'; + $lang['strempty'] = '空'; + $lang['strlanguage'] = '语言'; + $lang['strencoding'] = '编码'; + $lang['strvalue'] = '值'; + $lang['strunique'] = '唯一'; + $lang['strprimary'] = '主'; + $lang['strexport'] = '导出'; + $lang['strimport'] = '导入'; + $lang['strallowednulls'] = '允许空串'; + $lang['strbackslashn'] = '\N'; + $lang['stremptystring'] = '空 字符串/字段'; + $lang['strsql'] = 'SQL码'; + $lang['stradmin'] = '管理'; + $lang['strvacuum'] = '清理'; + $lang['stranalyze'] = '分析'; + $lang['strclusterindex'] = '集群'; + $lang['strclustered'] = '集群?'; + $lang['strreindex'] = '重建索引'; + $lang['strexecute'] = '执行'; + $lang['stradd'] = '添加'; + $lang['strevent'] = '事件'; + $lang['strwhere'] = 'Where'; + $lang['strinstead'] = 'Do Instead'; + $lang['strwhen'] = '当'; + $lang['strformat'] = '格式'; + $lang['strdata'] = '数据'; + $lang['strconfirm'] = '确认'; + $lang['strexpression'] = '表达式'; + $lang['strellipsis'] = '。。。'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = '扩展'; + $lang['strcollapse'] = '崩溃'; + $lang['strexplain'] = '解释'; + $lang['strexplainanalyze'] = '解释分析'; + $lang['strfind'] = '查找'; + $lang['stroptions'] = '选项'; + $lang['strrefresh'] = '刷新'; + $lang['strdownload'] = '下载'; + $lang['strdownloadgzipped'] = '下载使用gzip压缩的文件'; + $lang['strinfo'] = '信息'; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = '高级'; + $lang['strvariables'] = '变量'; + $lang['strprocess'] = '进程'; + $lang['strprocesses'] = '进程'; + $lang['strsetting'] = '设置'; + $lang['streditsql'] = '编辑 SQL'; + $lang['strruntime'] = '总执行时间: %s ms'; + $lang['strpaginate'] = '分页结果'; + $lang['struploadscript'] = '或者上传一个 SQL 脚本:'; + $lang['strstarttime'] = '开始时间'; + $lang['strfile'] = '文件'; + $lang['strfileimported'] = '文件已导入。'; + $lang['strtrycred'] = '对所有服务器使用该用户名和密码'; + $lang['stractionsonmultiplelines'] = '多行上的操作'; + $lang['strselectall'] = '选择所有'; + $lang['strunselectall'] = '取消选择所有'; + $lang['strlocale'] = '本地'; + + // User-supplied SQL history + $lang['strhistory'] = '历史'; + $lang['strnohistory'] = '无历史.'; + $lang['strclearhistory'] = '清空历史'; + $lang['strdelhistory'] = '从历史删除'; + $lang['strconfdelhistory'] = '确定要从历史删除吗 ?'; + $lang['strconfclearhistory'] = '确定要清空历史吗 ?'; + $lang['strnodatabaseselected'] = '请选择一个数据库.'; + + // Database sizes + $lang['strsize'] = '大小'; + $lang['strbytes'] = '字节'; + $lang['strkb'] = 'kB'; + $lang['strmb'] = 'MB'; + $lang['strgb'] = 'GB'; + $lang['strtb'] = 'TB'; + + // Error handling + $lang['strnoframes'] = '该程序在具有框架(frames)功能的浏览器上工作的更好,但是也可以在不支持框架(frames)的浏览器上工作,请按下面的链接。'; + $lang['strnoframeslink'] = '不使用框架(frames)'; + $lang['strbadconfig'] = '您的 config.inc.php 已失效。您需要自行通过 config.inc.php-ist 恢复。'; + $lang['strnotloaded'] = '您安装的 PHP 不支持PostgreSQL。 你需要重新编译PHP并使用 --with-pgsql 配置选项。'; + $lang['strpostgresqlversionnotsupported'] = '版本的PostgreSQL不被支持。 请更新到版本 %s 或更高版本。'; + $lang['strbadschema'] = '无效的模式。'; + $lang['strbadencoding'] = '设定客户端编码错误。'; + $lang['strsqlerror'] = 'SQL:错误'; + $lang['strinstatement'] = '在语句:'; + $lang['strinvalidparam'] = '无效的脚本参数。'; + $lang['strnodata'] = '查无数据行。'; + $lang['strnoobjects'] = '查无对象。'; + $lang['strrownotunique'] = '该行无唯一约束。'; + $lang['strnoreportsdb'] = '你不能创建报告数据库。 请参阅INSTALL文件。'; + $lang['strnouploads'] = '文件上传被禁止。'; + $lang['strimporterror'] = '导入错误。'; + $lang['strimporterror-fileformat'] = '导入错误: 自动识别文件类型失败。'; + $lang['strimporterrorline'] = '导入错误,出错行 %s。'; + $lang['strimporterrorline-badcolumnnum'] = '导入错误,出错行 %s: 该行列数不正确。'; + $lang['strimporterror-uploadedfile'] = '导入错误: 文件不能上传到服务器'; + $lang['strcannotdumponwindows'] = '复杂表和模式名称的转储在Windows 不被支持。'; + $lang['strinvalidserverparam'] = '尝试用无效的服务器参数连接,可能有人正尝试攻击你的系统。'; + $lang['strnoserversupplied'] = '没有选择数据库!'; + + // Tables + $lang['strtable'] = '数据表'; + $lang['strtables'] = '数据表'; + $lang['strshowalltables'] = '显示示所有表。'; + $lang['strnotables'] = '查无数据表。'; + $lang['strnotable'] = '查无此表。'; + $lang['strcreatetable'] = '创建表'; + $lang['strcreatetablelike'] = '创建表从'; + $lang['strcreatetablelikeparent'] = '源表'; + $lang['strcreatelikewithdefaults'] = '包含默认值'; + $lang['strcreatelikewithconstraints'] = '包含约束'; + $lang['strcreatelikewithindexes'] = '包含表名'; + $lang['strtablename'] = '表名'; + $lang['strtableneedsname'] = '必须指定表名。'; + $lang['strtablelikeneedslike'] = '必须指定要拷贝的属性所属的数据表.'; + $lang['strtableneedsfield'] = '必须至少指定一个字段。'; + $lang['strtableneedscols'] = '必须指定一个有效的列数。'; + $lang['strtablecreated'] = '数据表已创建。'; + $lang['strtablecreatedbad'] = '数据表创建失败'; + $lang['strconfdroptable'] = '确定要删除"%s"数据表吗?'; + $lang['strtabledropped'] = '数据表已删除。'; + $lang['strtabledroppedbad'] = '数据表删除失败。'; + $lang['strconfemptytable'] = '确定要清空"%s"数据表吗?'; + $lang['strtableemptied'] = '数据表已清空。'; + $lang['strtableemptiedbad'] = '数据表清空失败。'; + $lang['strinsertrow'] = '插入行'; + $lang['strrowinserted'] = '行已插入。'; + $lang['strrowinsertedbad'] = '行插入失败。'; + $lang['strrowduplicate'] = '行插入失败, 尝试再次插入。'; + $lang['streditrow'] = '编辑行'; + $lang['strrowupdated'] = '行已更新。'; + $lang['strrowupdatedbad'] = '行更新失败。'; + $lang['strdeleterow'] = '删除行'; + $lang['strconfdeleterow'] = '确定要删除该行吗?'; + $lang['strrowdeleted'] = '行已删除。'; + $lang['strrowdeletedbad'] = '行删除失败。'; + $lang['strinsertandrepeat'] = '插入 & 替换'; + $lang['strnumcols'] = '列数目'; + $lang['strcolneedsname'] = '必须指定列名'; + $lang['strselectallfields'] = '选择所有字段'; + $lang['strselectneedscol'] = '必须至少显示一列。'; + $lang['strselectunary'] = '单项操作不能有值。'; + $lang['strcolumnaltered'] = '列已变更。'; + $lang['strcolumnalteredbad'] = '列变更失败。'; + $lang['strconfdropcolumn'] = '确定要将列 "%s" 从表 "%s" 中删除吗?'; + $lang['strcolumndropped'] = '列已删除。'; + $lang['strcolumndroppedbad'] = '列删除失败。'; + $lang['straddcolumn'] = '添加列'; + $lang['strcolumnadded'] = '列已添加。'; + $lang['strcolumnaddedbad'] = '列添加失败。'; + $lang['strcascade'] = 'CASCADE'; + $lang['strtablealtered'] = '数据表已变更。'; + $lang['strtablealteredbad'] = '数据表变更失败。'; + $lang['strdataonly'] = '仅数据'; + $lang['strstructureonly'] = '仅结构'; + $lang['strstructureanddata'] = '结构和数据'; + $lang['strtabbed'] = '固定(Tabbed)'; + $lang['strauto'] = '自动'; + $lang['strconfvacuumtable'] = '确定要清理 "%s"吗?'; + $lang['strconfanalyzetable'] = '确定要分析 "%s" 吗?'; + $lang['strestimatedrowcount'] = '估计的行数'; + $lang['strspecifytabletoanalyze'] = '必须至少选择一个表来分析'; + $lang['strspecifytabletoempty'] = '必须至少选择一个表来清空'; + $lang['strspecifytabletodrop'] = '必须至少选择一个表来移除'; + $lang['strspecifytabletovacuum'] = '必须至少选择一个表来清理(vacuum)'; + + // Columns + $lang['strcolprop'] = '列属性'; + $lang['strnotableprovided'] = '没有指表!'; + + // Users + $lang['struser'] = '用户'; + $lang['strusers'] = '用户'; + $lang['strusername'] = '用名'; + $lang['strpassword'] = '密码'; + $lang['strsuper'] = '超级用户'; + $lang['strcreatedb'] = '创建数据库?'; + $lang['strexpires'] = '过期'; + $lang['strsessiondefaults'] = '会话默认'; + $lang['strnousers'] = '查无此用户。'; + $lang['struserupdated'] = '用户已更新。'; + $lang['struserupdatedbad'] = '用户更新失败。'; + $lang['strshowallusers'] = '显示所有用户'; + $lang['strcreateuser'] = '创建用户'; + $lang['struserneedsname'] = '必须指定用户名称。'; + $lang['strusercreated'] = '用户已创建。'; + $lang['strusercreatedbad'] = '用户创建失败。'; + $lang['strconfdropuser'] = '确定要删除用户"%s"吗?'; + $lang['struserdropped'] = '用户已删除。'; + $lang['struserdroppedbad'] = '用户删除失败。'; + $lang['straccount'] = '帐户'; + $lang['strchangepassword'] = '修改密码'; + $lang['strpasswordchanged'] = '密码已修改。'; + $lang['strpasswordchangedbad'] = '密码修改失败。'; + $lang['strpasswordshort'] = '密码太短了。'; + $lang['strpasswordconfirm'] = '密码不匹配。'; + + // Groups + $lang['strgroup'] = '群组'; + $lang['strgroups'] = '群组'; + $lang['strshowallgroups'] = '显示所有群组'; + $lang['strnogroup'] = '查无此群组。'; + $lang['strnogroups'] = '查无群组。'; + $lang['strcreategroup'] = '创建群组'; + $lang['strgroupneedsname'] = '必须指定群组名称。'; + $lang['strgroupcreated'] = '群组已创建。'; + $lang['strgroupcreatedbad'] = '群组创建失败。'; + $lang['strconfdropgroup'] = '确定要删除群组"%s"吗?'; + $lang['strgroupdropped'] = '群组已删除。'; + $lang['strgroupdroppedbad'] = '群组删除失败。'; + $lang['strmembers'] = '成员'; + $lang['strmemberof'] = '所属成员'; + $lang['stradminmembers'] = '管理成员'; + $lang['straddmember'] = '添加成员'; + $lang['strmemberadded'] = '成员已添加。'; + $lang['strmemberaddedbad'] = '成员添加失败。'; + $lang['strdropmember'] = '删除成员'; + $lang['strconfdropmember'] = '确定要将成员 "%s" 从群组 "%s"中删除吗?'; + $lang['strmemberdropped'] = '成员已删除。'; + $lang['strmemberdroppedbad'] = '成员删除失败。'; + + // Roles + $lang['strrole'] = '角色'; + $lang['strroles'] = '角色'; + $lang['strshowallroles'] = '显示所有角色'; + $lang['strnoroles'] = '查无角色。'; + $lang['strinheritsprivs'] = '继承特权?'; + $lang['strcreaterole'] = '创建角色'; + $lang['strcancreaterole'] = '创建角色?'; + $lang['strrolecreated'] = '角色已创建。'; + $lang['strrolecreatedbad'] = '角色创建失败。'; + $lang['strrolealtered'] = '角色已变更。'; + $lang['strrolealteredbad'] = '角色变更失败。'; + $lang['strcanlogin'] = '可以登录?'; + $lang['strconnlimit'] = '连接限制'; + $lang['strdroprole'] = '删除角色'; + $lang['strconfdroprole'] = '确定要删除角色 "%s"吗?'; + $lang['strroledropped'] = '角色已删除。'; + $lang['strroledroppedbad'] = '角色删除失败。'; + $lang['strnolimit'] = '无限制'; + $lang['strnever'] = '从不'; + $lang['strroleneedsname'] = '必须指定角色名称。'; + + // Privileges + $lang['strprivilege'] = '特权'; + $lang['strprivileges'] = '特权'; + $lang['strnoprivileges'] = '这个对象拥有默认所属人的特权。'; + $lang['strgrant'] = '赋予'; + $lang['strrevoke'] = '撤回'; + $lang['strgranted'] = '特权已改变'; + $lang['strgrantfailed'] = '特权改变失败'; + $lang['strgrantbad'] = '必须指定至少一个用户或一个组和一个特权。'; + $lang['strgrantor'] = '赋予者'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = '数据库'; + $lang['strdatabases'] = '数据库'; + $lang['strshowalldatabases'] = '显示所有数据库'; + $lang['strnodatabases'] = '查无数据库。'; + $lang['strcreatedatabase'] = '创建数据库'; + $lang['strdatabasename'] = '数据库名称'; + $lang['strdatabaseneedsname'] = '必须指定数据库名称。'; + $lang['strdatabasecreated'] = '数据库已创建。'; + $lang['strdatabasecreatedbad'] = '数据库创建失败。'; + $lang['strconfdropdatabase'] = '确定要删除数据库"%s"吗?'; + $lang['strdatabasedropped'] = '数据库已删除。'; + $lang['strdatabasedroppedbad'] = '数据库删除失败'; + $lang['strentersql'] = '请在下方输入要执行的SQL语句:'; + $lang['strsqlexecuted'] = 'SQL 已执行。'; + $lang['strvacuumgood'] = '清理完成'; + $lang['strvacuumbad'] = '清理失败'; + $lang['stranalyzegood'] = '分析完成'; + $lang['stranalyzebad'] = '分析失败'; + $lang['strreindexgood'] = '重建索引完成。'; + $lang['strreindexbad'] = '重建索引失败。'; + $lang['strfull'] = '完全'; + $lang['strfreeze'] = '冻结'; + $lang['strforce'] = '强制'; + $lang['strsignalsent'] = '信号已发送。'; + $lang['strsignalsentbad'] = '信号发送失败。'; + $lang['strallobjects'] = '所有对象'; + $lang['strdatabasealtered'] = '数据库已变更。'; + $lang['strdatabasealteredbad'] = '数据库变更失败。'; + $lang['strspecifydatabasetodrop'] = '必须至少指定一个数据库来移除'; + + // Views + $lang['strview'] = '视图'; + $lang['strviews'] = '视图'; + $lang['strshowallviews'] = '显示所有视图'; + $lang['strnoview'] = '查无此视图'; + $lang['strnoviews'] = '查无视图。'; + $lang['strcreateview'] = '创建视图'; + $lang['strviewname'] = '视图名称'; + $lang['strviewneedsname'] = '必须指定视图名称。'; + $lang['strviewneedsdef'] = '必须指定视图定义。'; + $lang['strviewneedsfields'] = '必须指定视图里要选择的列。'; + $lang['strviewcreated'] = '视图已创建。'; + $lang['strviewcreatedbad'] = '视图创建失败。'; + $lang['strconfdropview'] = '确定要删除视图"%s"吗?'; + $lang['strviewdropped'] = '视图已删除。'; + $lang['strviewdroppedbad'] = '视图删除失败。'; + $lang['strviewupdated'] = '视图已更新。'; + $lang['strviewupdatedbad'] = '视图更新失败'; + $lang['strviewlink'] = '连接关键字(Linking keys)'; + $lang['strviewconditions'] = '附加条件'; + $lang['strcreateviewwiz'] = '使用向导创建视图'; + $lang['strrenamedupfields'] = '重命名复制的字段'; + $lang['strdropdupfields'] = '移除复制的字段'; + $lang['strerrordupfields'] = '复制字段时发生错误'; + $lang['strviewaltered'] = '视图已变更。'; + $lang['strviewalteredbad'] = '视图变更失败。'; + $lang['strspecifyviewtodrop'] = '必须至少指定一个视图来移除'; + + // Sequences + $lang['strsequence'] = '序列'; + $lang['strsequences'] = '序列'; + $lang['strshowallsequences'] = '显示所有序列'; + $lang['strnosequence'] = '查无此序列'; + $lang['strnosequences'] = '查无序列。'; + $lang['strcreatesequence'] = '创建序列'; + $lang['strlastvalue'] = '最后值'; + $lang['strincrementby'] = '增量'; + $lang['strstartvalue'] = '起始值'; + $lang['strmaxvalue'] = '最大值'; + $lang['strminvalue'] = '最小值'; + $lang['strcachevalue'] = '缓存值'; + $lang['strlogcount'] = '日志计数(Log count)'; + $lang['strcancycle'] = '可以循环吗?'; + $lang['striscalled'] = '将在返回下一个值前递增最后的值(is_called)吗?'; + $lang['strsequenceneedsname'] = '必须指定序列名称。'; + $lang['strsequencecreated'] = '序列已创建。'; + $lang['strsequencecreatedbad'] = '序列创建失败。'; + $lang['strconfdropsequence'] = '确定要删除序列"%s"吗?'; + $lang['strsequencedropped'] = '序列已删除。'; + $lang['strsequencedroppedbad'] = '序列删除失败。'; + $lang['strsequencereset'] = '序列已重置。'; + $lang['strsequenceresetbad'] = '序列重置失败。'; + $lang['strsequencealtered'] = '序列已变更。'; + $lang['strsequencealteredbad'] = '序列变更失败。'; + $lang['strsetval'] = '设定序列值'; + $lang['strsequencesetval'] = '序列值已设定。'; + $lang['strsequencesetvalbad'] = '序列值设置失败。'; + $lang['strnextval'] = '递增序列值'; + $lang['strsequencenextval'] = '序列值已递增。'; + $lang['strsequencenextvalbad'] = '序列值递增失败。'; + $lang['strspecifysequencetodrop'] = '必须至少指定一个序列来删除'; + + // Indexes + $lang['strindex'] = '索引'; + $lang['strindexes'] = '索引'; + $lang['strindexname'] = '索引名'; + $lang['strshowallindexes'] = '显示所有索引'; + $lang['strnoindex'] = '查无此索引'; + $lang['strnoindexes'] = '查无索引'; + $lang['strcreateindex'] = '创建索引'; + $lang['strtabname'] = '数据表名'; + $lang['strcolumnname'] = '列名'; + $lang['strindexneedsname'] = '必须指定索引名称。'; + $lang['strindexneedscols'] = '必须给索引指定有效的列数。'; + $lang['strindexcreated'] = '索引已创建'; + $lang['strindexcreatedbad'] = '索引创建失败。'; + $lang['strconfdropindex'] = '确定要删除"%s"索引?'; + $lang['strindexdropped'] = '索引已删除。'; + $lang['strindexdroppedbad'] = '索引删除失败。'; + $lang['strkeyname'] = '键名'; + $lang['struniquekey'] = '唯一键'; + $lang['strprimarykey'] = '主键'; + $lang['strindextype'] = '索引类型'; + $lang['strtablecolumnlist'] = '表中的列'; + $lang['strindexcolumnlist'] = '索引中的列'; + $lang['strconfcluster'] = '确定要集群 "%s"吗?'; + $lang['strclusteredgood'] = '集群完成。'; + $lang['strclusteredbad'] = '集群失败。'; + + // Rules + $lang['strrules'] = '规则'; + $lang['strrule'] = '规则'; + $lang['strshowallrules'] = '显示所有规则'; + $lang['strnorule'] = '查无此规则。'; + $lang['strnorules'] = '查无规则'; + $lang['strcreaterule'] = '创建规则'; + $lang['strrulename'] = '规则名称'; + $lang['strruleneedsname'] = '必须指定规则名称。'; + $lang['strrulecreated'] = '规则已创建。'; + $lang['strrulecreatedbad'] = '规则创建失败。'; + $lang['strconfdroprule'] = '确定要将规则"%s"从"%s"中删除吗?'; + $lang['strruledropped'] = '规则已删除。'; + $lang['strruledroppedbad'] = '规则删除失败。'; + + // Constraints + $lang['strconstraint'] = '约束'; + $lang['strconstraints'] = '约束'; + $lang['strshowallconstraints'] = '显示所有约束。'; + $lang['strnoconstraints'] = '查无此约束。'; + $lang['strcreateconstraint'] = '创建约束'; + $lang['strconstraintcreated'] = '约束已创建。'; + $lang['strconstraintcreatedbad'] = '约束创建失败。'; + $lang['strconfdropconstraint'] = '确定要将强制"%s"从"%s"中删除吗?'; + $lang['strconstraintdropped'] = '约束已删除。'; + $lang['strconstraintdroppedbad'] = '约束删除失败。'; + $lang['straddcheck'] = '添加检查约束'; + $lang['strcheckneedsdefinition'] = '必须指定检查约束的定义。'; + $lang['strcheckadded'] = '检查约束已添加。'; + $lang['strcheckaddedbad'] = '检查约束添加失败。'; + $lang['straddpk'] = '添加主键'; + $lang['strpkneedscols'] = '主键至少需指定一列。'; + $lang['strpkadded'] = '主键已添加。'; + $lang['strpkaddedbad'] = '主键添加失败。'; + $lang['stradduniq'] = '添加唯一键'; + $lang['struniqneedscols'] = '唯一键至少需指定一列。'; + $lang['struniqadded'] = '唯一键已添加。'; + $lang['struniqaddedbad'] = '唯一键添加失败。'; + $lang['straddfk'] = '添加外键'; + $lang['strfkneedscols'] = '外键至少需指定一列。'; + $lang['strfkneedstarget'] = '外键需指定一个目标数据表。'; + $lang['strfkadded'] = '外键已添加。'; + $lang['strfkaddedbad'] = '外键添加失败。'; + $lang['strfktarget'] = '目标数据表'; + $lang['strfkcolumnlist'] = '键中的列'; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + + // Functions + $lang['strfunction'] = '函数'; + $lang['strfunctions'] = '函数'; + $lang['strshowallfunctions'] = '显示所有函数'; + $lang['strnofunction'] = '查无此函数'; + $lang['strnofunctions'] = '查无函数'; + $lang['strcreateplfunction'] = '创建 SQL/PL 函数'; + $lang['strcreateinternalfunction'] = '创建内部函数'; + $lang['strcreatecfunction'] = '创建 C 函数'; + $lang['strfunctionname'] = '函数名称'; + $lang['strreturns'] = '返回'; + $lang['strproglanguage'] = '过程语言'; + $lang['strfunctionneedsname'] = '必须指定函数名称。'; + $lang['strfunctionneedsdef'] = '必须指定函数定义。'; + $lang['strfunctioncreated'] = '函数已创建'; + $lang['strfunctioncreatedbad'] = '函数创建失败'; + $lang['strconfdropfunction'] = '确定要删除函数"%s"吗?'; + $lang['strfunctiondropped'] = '函数已删除。'; + $lang['strfunctiondroppedbad'] = '函数删除失败。'; + $lang['strfunctionupdated'] = '函数已更新。'; + $lang['strfunctionupdatedbad'] = '函数更新失败。'; + $lang['strobjectfile'] = '对象文件'; + $lang['strlinksymbol'] = '连接对象'; + $lang['strarguments'] = '参数'; + $lang['strargmode'] = '模式'; + $lang['strargtype'] = '类型'; + $lang['strargadd'] = '新添加一个参数'; + $lang['strargremove'] = '移除这个参数'; + $lang['strargnoargs'] = '该函数无参数。'; + $lang['strargenableargs'] = '使该函数的参数有效。'; + $lang['strargnorowabove'] = '在该行上面须有一行。'; + $lang['strargnorowbelow'] = '在该行下面须有一行。'; + $lang['strargraise'] = '上移。'; + $lang['strarglower'] = '下移。'; + $lang['strargremoveconfirm'] = '确定要移除这个参数吗?这个操作不能撤销。'; + $lang['strfunctioncosting'] = '函数代价(Function Costing)'; + $lang['strresultrows'] = '结果行'; + $lang['strexecutioncost'] = '执行代价'; + $lang['strspecifyfunctiontodrop'] = '必须至少指定一个函数来删除'; + + // Triggers + $lang['strtrigger'] = '触发器'; + $lang['strtriggers'] = '触发器'; + $lang['strshowalltriggers'] = '显示所有触发器'; + $lang['strnotrigger'] = '查无此触发器。'; + $lang['strnotriggers'] = '查无触发器。'; + $lang['strcreatetrigger'] = '创建触发器'; + $lang['strtriggerneedsname'] = '必须指定触发器名称。'; + $lang['strtriggerneedsfunc'] = '必须给触发器指定一个函数。'; + $lang['strtriggercreated'] = '触发器已创建。'; + $lang['strtriggercreatedbad'] = '触发器创建失败。'; + $lang['strconfdroptrigger'] = '确定要将触发器"%s"从"%s"中删除吗?'; + $lang['strconfenabletrigger'] = '确定要使触发器 "%s" 在 "%s"上有效吗?'; + $lang['strconfdisabletrigger'] = '确定要使触发器 "%s" 在 "%s"上无效吗?'; + $lang['strtriggerdropped'] = '触发器已删除。'; + $lang['strtriggerdroppedbad'] = '触发器删除失败。'; + $lang['strtriggerenabled'] = '触发器已有效。'; + $lang['strtriggerenabledbad'] = '触发器有效化失败。'; + $lang['strtriggerdisabled'] = '触发器已无效。'; + $lang['strtriggerdisabledbad'] = '触发器无效化失败。'; + $lang['strtriggeraltered'] = '触发器已变更。'; + $lang['strtriggeralteredbad'] = '触发器变更失败。'; + $lang['strforeach'] = '给每一个'; + + // Types + $lang['strtype'] = '类型'; + $lang['strtypes'] = '类型'; + $lang['strshowalltypes'] = '显示所有的类型'; + $lang['strnotype'] = '查无此类型'; + $lang['strnotypes'] = '查无类型。'; + $lang['strcreatetype'] = '创建类型'; + $lang['strcreatecomptype'] = '创建组合类型'; + $lang['strcreateenumtype'] = '创建枚举类型'; + $lang['strtypeneedsfield'] = '必须至少指定一个字段。'; + $lang['strtypeneedsvalue'] = '必须至少指定一个值'; + $lang['strtypeneedscols'] = '必须指定有效的字段数。'; + $lang['strtypeneedsvals'] = '必须指定一个有效的字段数。'; + $lang['strinputfn'] = '输入函数'; + $lang['stroutputfn'] = '输出函数'; + $lang['strpassbyval'] = '传值?'; + $lang['stralignment'] = '参数'; + $lang['strelement'] = '元素'; + $lang['strdelimiter'] = '分隔符'; + $lang['strstorage'] = '磁盘存储'; + $lang['strfield'] = '字段'; + $lang['strvalue'] = '值'; + $lang['strnumfields'] = '列数'; + $lang['strnumvalues'] = '值数'; + $lang['strtypeneedsname'] = '必须指定类型名称。'; + $lang['strtypeneedslen'] = '必须指定类型长度。'; + $lang['strtypecreated'] = '类型已创建。'; + $lang['strtypecreatedbad'] = '类型创建失败。'; + $lang['strconfdroptype'] = '确定要删除"%s"类型吗?'; + $lang['strtypedropped'] = '类型已删除。'; + $lang['strtypedroppedbad'] = '类型删除失败。'; + $lang['strflavor'] = '风格(Flavor)'; + $lang['strbasetype'] = '基本'; + $lang['strcompositetype'] = '组合'; + $lang['strpseudotype'] = '伪(Pseudo)'; + $lang['strenum'] = 'Enum'; + $lang['strenumvalues'] = '枚举类型'; + + // Schemas + $lang['strschema'] = '模式'; + $lang['strschemas'] = '模式'; + $lang['strshowallschemas'] = '显示所有模式'; + $lang['strnoschema'] = '查无此模式'; + $lang['strnoschemas'] = '查无模式'; + $lang['strcreateschema'] = '创建模式'; + $lang['strschemaname'] = '模式名称'; + $lang['strschemaneedsname'] = '必须指定模式名称'; + $lang['strschemacreated'] = '模式已创建'; + $lang['strschemacreatedbad'] = '模式创建失败'; + $lang['strconfdropschema'] = '确定要删除模式"%s"吗?'; + $lang['strschemadropped'] = '模式已删除'; + $lang['strschemadroppedbad'] = '模式删除失败'; + $lang['strschemaaltered'] = '模式已变更。'; + $lang['strschemaalteredbad'] = '模式变更失败。'; + $lang['strsearchpath'] = '模式查找路径'; + $lang['strspecifyschematodrop'] = '必须至少指定一个模式来删除'; + + // Reports + $lang['strreport'] = '报表'; + $lang['strreports'] = '报表'; + $lang['strshowallreports'] = '显示所有报表'; + $lang['strnoreports'] = '查无报表。'; + $lang['strcreatereport'] = '创建报表'; + $lang['strreportdropped'] = '报表已删除。'; + $lang['strreportdroppedbad'] = '报表删除失败。'; + $lang['strconfdropreport'] = '确定要删除报表"%s"吗?'; + $lang['strreportneedsname'] = '必须指定报表名称。'; + $lang['strreportneedsdef'] = '必须给报表指定SQL。'; + $lang['strreportcreated'] = '报表已保存。'; + $lang['strreportcreatedbad'] = '报表保存失败。'; + + // Domains + $lang['strdomain'] = '域'; + $lang['strdomains'] = '域'; + $lang['strshowalldomains'] = '显示所有域'; + $lang['strnodomains'] = '查无 域。'; + $lang['strcreatedomain'] = '创建域'; + $lang['strdomaindropped'] = '域已删除。'; + $lang['strdomaindroppedbad'] = '域删除失败。'; + $lang['strconfdropdomain'] = '确定要删除域 "%s"吗?'; + $lang['strdomainneedsname'] = '必须指定域名称。'; + $lang['strdomaincreated'] = '域已创建。'; + $lang['strdomaincreatedbad'] = '域创建失败。'; + $lang['strdomainaltered'] = '域已变更。'; + $lang['strdomainalteredbad'] = '域变更失败。'; + + // Operators + $lang['stroperator'] = '操作符'; + $lang['stroperators'] = '操作符'; + $lang['strshowalloperators'] = '显示所有操作符'; + $lang['strnooperator'] = '查无此操作符。'; + $lang['strnooperators'] = '查无操作符。'; + $lang['strcreateoperator'] = '创建操作符'; + $lang['strleftarg'] = '左参数类型'; + $lang['strrightarg'] = '右参数类型'; + $lang['strcommutator'] = '转换符'; + $lang['strnegator'] = '非操作符'; + $lang['strrestrict'] = '受限'; + $lang['strjoin'] = '连接'; + $lang['strhashes'] = '哈希'; + $lang['strmerges'] = '合并'; + $lang['strleftsort'] = '左排序'; + $lang['strrightsort'] = '右排序'; + $lang['strlessthan'] = '小于'; + $lang['strgreaterthan'] = '大于'; + $lang['stroperatorneedsname'] = '必须指定操作符名称。'; + $lang['stroperatorcreated'] = '操作符已创建'; + $lang['stroperatorcreatedbad'] = '操作符创建失败。'; + $lang['strconfdropoperator'] = '确定要删除操作符 "%s"吗?'; + $lang['stroperatordropped'] = '操作符已删除。'; + $lang['stroperatordroppedbad'] = '操作符删除失败。'; + + // Casts + $lang['strcasts'] = '类型转换'; + $lang['strnocasts'] = '查无类型转换。'; + $lang['strsourcetype'] = '源类型'; + $lang['strtargettype'] = '目标类型'; + $lang['strimplicit'] = '隐含的'; + $lang['strinassignment'] = '委派中'; + $lang['strbinarycompat'] = '(二进制兼容)'; + + // Conversions + $lang['strconversions'] = '编码转换'; + $lang['strnoconversions'] = '查无编码转换。'; + $lang['strsourceencoding'] = '源编码'; + $lang['strtargetencoding'] = '目标编码'; + + // Languages + $lang['strlanguages'] = '过程语言'; + $lang['strnolanguages'] = '查无过程语言。'; + $lang['strtrusted'] = '信任的'; + + // Info + $lang['strnoinfo'] = '无资料(information)可用。'; + $lang['strreferringtables'] = '查询(Referring)表'; + $lang['strparenttables'] = '父表'; + $lang['strchildtables'] = '子表'; + + // Aggregates + $lang['straggregate'] = '聚集'; + $lang['straggregates'] = '聚集'; + $lang['strnoaggregates'] = '查无聚集。'; + $lang['stralltypes'] = '(所有类型)'; + $lang['strcreateaggregate'] = '创建聚集'; + $lang['straggrbasetype'] = '输入数据类型'; + $lang['straggrsfunc'] = '状态转化函数'; + $lang['straggrstype'] = '状态类型'; + $lang['straggrffunc'] = '最终函数'; + $lang['straggrinitcond'] = '初始函数'; + $lang['straggrsortop'] = '排序操作符'; + $lang['strconfdropaggregate'] = '确定要删除聚集 "%s"吗?'; + $lang['straggregatedropped'] = '聚集已删除。'; + $lang['straggregatedroppedbad'] = '聚集删除失败。'; + $lang['straggraltered'] = '聚集已变更。'; + $lang['straggralteredbad'] = '聚集变更失败。'; + $lang['straggrneedsname'] = '必须指定聚集的名称'; + $lang['straggrneedsbasetype'] = '必须指定聚集的输入数据类型'; + $lang['straggrneedssfunc'] = '必须指定聚集的状态转换函数'; + $lang['straggrneedsstype'] = '必须指定聚集的状态值的数据类型'; + $lang['straggrcreated'] = '聚集已创建。'; + $lang['straggrcreatedbad'] = '聚集创建失败。'; + $lang['straggrshowall'] = '显示所有聚集'; + + // Operator Classes + $lang['stropclasses'] = '操作符类'; + $lang['strnoopclasses'] = '查无此操作符类。'; + $lang['straccessmethod'] = '存取方法'; + + // Stats and performance + $lang['strrowperf'] = '行性能'; + $lang['strioperf'] = 'I/O 性能'; + $lang['stridxrowperf'] = '索引行性能'; + $lang['stridxioperf'] = '索引 I/O 性能'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = '顺序扫描'; + $lang['strscan'] = '扫描'; + $lang['strread'] = '读取'; + $lang['strfetch'] = '取得'; + $lang['strheap'] = '堆'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST 索引'; + $lang['strcache'] = '缓存'; + $lang['strdisk'] = '硬盘'; + $lang['strrows2'] = '行'; + + // Tablespaces + $lang['strtablespace'] = '表空间'; + $lang['strtablespaces'] = '表空间'; + $lang['strshowalltablespaces'] = '显示所有表空间'; + $lang['strnotablespaces'] = '查无此表空间。'; + $lang['strcreatetablespace'] = '创建表空间'; + $lang['strlocation'] = '位置'; + $lang['strtablespaceneedsname'] = '必须指定表空间名称。'; + $lang['strtablespaceneedsloc'] = '必须指定创建表空间的文件夹。'; + $lang['strtablespacecreated'] = '表空间已创建。'; + $lang['strtablespacecreatedbad'] = '表空间创建失败。'; + $lang['strconfdroptablespace'] = '确定要删除表空间 "%s"吗?'; + $lang['strtablespacedropped'] = '表空间已删除。'; + $lang['strtablespacedroppedbad'] = '表空间删除失败。'; + $lang['strtablespacealtered'] = '表空间已变更。'; + $lang['strtablespacealteredbad'] = '表空间变更失败。'; + + // Slony clusters + $lang['strcluster'] = '集群'; + $lang['strnoclusters'] = '查无此集群。'; + $lang['strconfdropcluster'] = '确定要删除集群 "%s"吗?'; + $lang['strclusterdropped'] = '集群已删除。'; + $lang['strclusterdroppedbad'] = '集群删除失败。'; + $lang['strinitcluster'] = '初始化集群'; + $lang['strclustercreated'] = '集群已初始化。'; + $lang['strclustercreatedbad'] = '集群初始化失败。'; + $lang['strclusterneedsname'] = '必须指定集群名称。'; + $lang['strclusterneedsnodeid'] = '必须指定本地节点ID。'; + + // Slony nodes + $lang['strnodes'] = '节点'; + $lang['strnonodes'] = '查无节点。'; + $lang['strcreatenode'] = '创建节点'; + $lang['strid'] = 'ID'; + $lang['stractive'] = '活动的'; + $lang['strnodecreated'] = '节点已创建。'; + $lang['strnodecreatedbad'] = '节点创建失败。'; + $lang['strconfdropnode'] = '确定要删除节点 "%s"吗?'; + $lang['strnodedropped'] = '节点已删除。'; + $lang['strnodedroppedbad'] = '节点删除失败'; + $lang['strfailover'] = '故障切换'; + $lang['strnodefailedover'] = '节点已故障切换。'; + $lang['strnodefailedoverbad'] = '节点故障切换失败。'; + $lang['strstatus'] = '状态'; + $lang['strhealthy'] = '健康度'; + $lang['stroutofsync'] = '同步过期'; + $lang['strunknown'] = '未知的'; + + // Slony paths + $lang['strpaths'] = '路径'; + $lang['strnopaths'] = '查无路径。'; + $lang['strcreatepath'] = '创建路径'; + $lang['strnodename'] = '节点名称'; + $lang['strnodeid'] = '节点 ID'; + $lang['strconninfo'] = '连接字符串'; + $lang['strconnretry'] = '重试连接间隔时间'; + $lang['strpathneedsconninfo'] = '必须指定路径的连接字符串。'; + $lang['strpathneedsconnretry'] = '必须指定重试连接间隔时间。'; + $lang['strpathcreated'] = '路径已创建。'; + $lang['strpathcreatedbad'] = '路径创建失败。'; + $lang['strconfdroppath'] = '确定要删除路径 "%s"吗?'; + $lang['strpathdropped'] = '路径已删除。'; + $lang['strpathdroppedbad'] = '路径删除失败。'; + + // Slony listens + $lang['strlistens'] = '监听'; + $lang['strnolistens'] = '查无监听。'; + $lang['strcreatelisten'] = '创建监听'; + $lang['strlistencreated'] = '监听已创建。'; + $lang['strlistencreatedbad'] = '监听创建失败。'; + $lang['strconfdroplisten'] = '确定要删除监听 "%s"吗?'; + $lang['strlistendropped'] = '监听已删除。'; + $lang['strlistendroppedbad'] = '监听删除失败。'; + + // Slony replication sets + $lang['strrepsets'] = '复写群组'; + $lang['strnorepsets'] = '查无复写群组。'; + $lang['strcreaterepset'] = '创建复写群组'; + $lang['strrepsetcreated'] = '复写群组已创建。'; + $lang['strrepsetcreatedbad'] = '复写群组创建失败。'; + $lang['strconfdroprepset'] = '确定要删除复写群组 "%s"吗?'; + $lang['strrepsetdropped'] = '复写群组已删除。'; + $lang['strrepsetdroppedbad'] = '复写群组删除失败。'; + $lang['strmerge'] = '合并'; + $lang['strmergeinto'] = '合并进'; + $lang['strrepsetmerged'] = '复写群组已合并。'; + $lang['strrepsetmergedbad'] = '复写群组合并失败。'; + $lang['strmove'] = '移动'; + $lang['strneworigin'] = '新建初始点'; + $lang['strrepsetmoved'] = '复写群组已移动。'; + $lang['strrepsetmovedbad'] = '复写群组移动失败。'; + $lang['strnewrepset'] = '新建件复写群组'; + $lang['strlock'] = '锁定'; + $lang['strlocked'] = '已锁定'; + $lang['strunlock'] = '解锁'; + $lang['strconflockrepset'] = '确定要锁定复写群组 "%s"吗?'; + $lang['strrepsetlocked'] = '复写群组已锁定。'; + $lang['strrepsetlockedbad'] = '复写群组锁定失败。'; + $lang['strconfunlockrepset'] = '确定要解锁复写群组 "%s"吗?'; + $lang['strrepsetunlocked'] = '复写群组已解锁。'; + $lang['strrepsetunlockedbad'] = '复写群组解锁失败。'; + $lang['stronlyonnode'] = '仅一个节点'; + $lang['strddlscript'] = 'DDL 脚本'; + $lang['strscriptneedsbody'] = '必须在所有节点上执行该脚本。'; + $lang['strscriptexecuted'] = '复写群组 DDL 脚本已执行。'; + $lang['strscriptexecutedbad'] = '复写群组 DDL 脚本执行失败。'; + $lang['strtabletriggerstoretain'] = '以下触发器将不会被Slony禁用:'; + + // Slony tables in replication sets + $lang['straddtable'] = '添加表'; + $lang['strtableneedsuniquekey'] = '要添加的表需要指定主键或者唯一键。'; + $lang['strtableaddedtorepset'] = '表已添加到复写群组。'; + $lang['strtableaddedtorepsetbad'] = '表添加到复写群组失败。'; + $lang['strconfremovetablefromrepset'] = '确定要将表 "%s" 从复写群组 "%s"中删除吗?'; + $lang['strtableremovedfromrepset'] = '表已从复写群组中删除。'; + $lang['strtableremovedfromrepsetbad'] = '表从复写群组中删除失败'; + + // Slony sequences in replication sets + $lang['straddsequence'] = '添加序列'; + $lang['strsequenceaddedtorepset'] = '序列已添加到复写群组。'; + $lang['strsequenceaddedtorepsetbad'] = '序列添加到复写群组失败。'; + $lang['strconfremovesequencefromrepset'] = '确定要将序列 "%s" 从复写群组 "%s"中删除吗?'; + $lang['strsequenceremovedfromrepset'] = '序列已从复写群组中删除。'; + $lang['strsequenceremovedfromrepsetbad'] = '序列从复写群组中删除失败。'; + + // Slony subscriptions + $lang['strsubscriptions'] = '订阅'; + $lang['strnosubscriptions'] = '查无订阅。'; + + // Miscellaneous + $lang['strtopbar'] = '%s 架于 %s:%s - 您是 "%s"'; + $lang['strtimefmt'] = 'jS M, Y g:iA'; + $lang['strhelp'] = '帮助'; + $lang['strhelpicon'] = '?'; + $lang['strhelppagebrowser'] = '帮助页面浏览'; + $lang['strselecthelppage'] = '选择一个帮助页面'; + $lang['strinvalidhelppage'] = '无效的帮助页面。'; + $lang['strlogintitle'] = '登入 %s'; + $lang['strlogoutmsg'] = '注销 %s'; + $lang['strloading'] = '加载中。。。'; + $lang['strerrorloading'] = '加载错误'; + $lang['strclicktoreload'] = '点击重新加载'; + + // Autovacuum + $lang['strautovacuum'] = '自动清理(Autovacuum)'; + $lang['strturnedon'] = '打开'; + $lang['strturnedoff'] = '关闭'; + $lang['strenabled'] = '有效'; + $lang['strvacuumbasethreshold'] = '清理基本临界值'; + $lang['strvacuumscalefactor'] = '清理换算系数'; + $lang['stranalybasethreshold'] = '分析基本临界值'; + $lang['stranalyzescalefactor'] = '分析换算系数'; + $lang['strvacuumcostdelay'] = '清理成本延迟'; + $lang['strvacuumcostlimit'] = '清理成本限制'; + + // Table-level Locks + $lang['strlocks'] = '锁'; + $lang['strtransaction'] = '事务ID'; + $lang['strvirtualtransaction'] = '虚拟事务ID'; + $lang['strprocessid'] = '进程ID'; + $lang['strmode'] = '锁定模式'; + $lang['strislockheld'] = '拥有锁?'; + + // Prepared transactions + $lang['strpreparedxacts'] = '已准备事务'; + $lang['strxactid'] = '事务ID'; + $lang['strgid'] = '全域ID'; + + // Fulltext search + $lang['strfulltext'] = '全文检索'; + $lang['strftsconfig'] = '全文检索配置'; + $lang['strftsconfigs'] = '配置'; + $lang['strftscreateconfig'] = '创建 全文检索配置'; + $lang['strftscreatedict'] = '创建字典'; + $lang['strftscreatedicttemplate'] = '创建字典模板'; + $lang['strftscreateparser'] = '创建分析器'; + $lang['strftsnoconfigs'] = '没有找到全文检索配置。'; + $lang['strftsconfigdropped'] = '全文检索配置已移除。'; + $lang['strftsconfigdroppedbad'] = '全文检索移除失败。'; + $lang['strconfdropftsconfig'] = '确定要移除全文检索检索配置 "%s"吗?'; + $lang['strconfdropftsdict'] = '确定要移除全文检索字典 "%s"吗?'; + $lang['strconfdropftsmapping'] = '确定要将映射 "%s" 从全文检索配置 "%s"中移除吗?'; + $lang['strftstemplate'] = '模板'; + $lang['strftsparser'] = '分析器'; + $lang['strftsconfigneedsname'] = '必须指定全文检索配置名称。'; + $lang['strftsconfigcreated'] = '全文检索配置已创建'; + $lang['strftsconfigcreatedbad'] = '全文检索配置创建失败。'; + $lang['strftsmapping'] = '映射'; + $lang['strftsdicts'] = '字典'; + $lang['strftsdict'] = '字典'; + $lang['strftsemptymap'] = '空的全文检索配置映射。'; + $lang['strftswithmap'] = '附带映射(With map)'; + $lang['strftsmakedefault'] = '为本地化作成默认值'; + $lang['strftsconfigaltered'] = '全文检索已变更。'; + $lang['strftsconfigalteredbad'] = '全文检索变更失败。'; + $lang['strftsconfigmap'] = '全文检索配置映射'; + $lang['strftsparsers'] = '全文检索分析器'; + $lang['strftsnoparsers'] = '无 有效的全文检索分析器。'; + $lang['strftsnodicts'] = '无 有效的全文检索字典。'; + $lang['strftsdictcreated'] = '全文检索字典已创建'; + $lang['strftsdictcreatedbad'] = '全文检索字典创建失败。'; + $lang['strftslexize'] = 'Lexize'; + $lang['strftsinit'] = '初始化'; + $lang['strftsoptionsvalues'] = '选项和值'; + $lang['strftsdictneedsname'] = '必须指定全文检索字典名称。'; + $lang['strftsdictdropped'] = '全文检索字典已移除。'; + $lang['strftsdictdroppedbad'] = '全文检索字典移除失败。'; + $lang['strftsdictaltered'] = '全文检索字典已变更。'; + $lang['strftsdictalteredbad'] = '全文检索字典变更失败。'; + $lang['strftsaddmapping'] = '添加映射'; + $lang['strftsspecifymappingtodrop'] = '必须最少指定一个映射来移除'; + $lang['strftsspecifyconfigtoalter'] = '必须指定一个全文检索配置来变更'; + $lang['strftsmappingdropped'] = '全文检索映射已删除。'; + $lang['strftsmappingdroppedbad'] = '全文检索映射移除失败。'; + $lang['strftsnodictionaries'] = '查无字典。'; + $lang['strftsmappingaltered'] = '全文检索映射已变更。'; + $lang['strftsmappingalteredbad'] = '全文检索映射变更失败。'; + $lang['strftsmappingadded'] = '全文检索映射已添加。'; + $lang['strftsmappingaddedbad'] = '全文检索映射添加失败。'; + $lang['strftsmappingdropped'] = '全文检索映射已删除。'; + $lang['strftsmappingdroppedbad'] = '全文检索映射移除失败。'; + $lang['strftstabconfigs'] = '配置'; + $lang['strftstabdicts'] = '字典'; + $lang['strftstabparsers'] = '分析器'; +?> diff --git a/php/pgadmin/lang/chinese-utf8-zh_TW.php b/php/pgadmin/lang/chinese-utf8-zh_TW.php new file mode 100644 index 0000000..4d9c3de --- /dev/null +++ b/php/pgadmin/lang/chinese-utf8-zh_TW.php @@ -0,0 +1,990 @@ +'; + $lang['strfirst'] = '<< 最前一步'; + $lang['strlast'] = '最後一步 >>'; + $lang['strfailed'] = '失敗'; + $lang['strcreate'] = '建立'; + $lang['strcreated'] = '已建立'; + $lang['strcomment'] = '註釋'; + $lang['strlength'] = '長度'; + $lang['strdefault'] = '預設值'; + $lang['stralter'] = '修改'; + $lang['strok'] = '確定'; + $lang['strcancel'] = '取消'; + $lang['strac'] = '啟用自動完成'; + $lang['strsave'] = '儲存'; + $lang['strreset'] = '重設'; + $lang['strinsert'] = '插入'; + $lang['strselect'] = '選取'; + $lang['strdelete'] = '刪除'; + $lang['strupdate'] = '更新'; + $lang['strreferences'] = '參照'; + $lang['stryes'] = '是'; + $lang['strno'] = '否'; + $lang['strtrue'] = '真(TRUE)'; + $lang['strfalse'] = '假(FALSE)'; + $lang['stredit'] = '編輯'; + $lang['strcolumn'] = '欄位'; + $lang['strcolumns'] = '欄位'; + $lang['strrows'] = '資料列'; + $lang['strrowsaff'] = '資料列受影響。'; + $lang['strobjects'] = '物件'; + $lang['strback'] = '返回'; + $lang['strqueryresults'] = '查詢結果'; + $lang['strshow'] = '顯示'; + $lang['strempty'] = '清空'; + $lang['strlanguage'] = '語言'; + $lang['strencoding'] = '字元編碼'; + $lang['strunique'] = '唯一值'; + $lang['strprimary'] = '主鍵(PK)'; + $lang['strexport'] = '匯出'; + $lang['strimport'] = '匯入'; + $lang['strallowednulls'] = '允許空字串'; + $lang['strbackslashn'] = '\N'; + $lang['stremptystring'] = '空 字串/欄位'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = '管理'; + $lang['strvacuum'] = '清理(Vacuum)'; + $lang['stranalyze'] = '分析'; + $lang['strclusterindex'] = '叢集'; + $lang['strclustered'] = '已叢集?'; + $lang['strreindex'] = '重建索引'; + $lang['strrun'] = '執行'; + $lang['stradd'] = '新增'; + $lang['strevent'] = '事件'; + $lang['strwhere'] = '條件'; + $lang['strinstead'] = '已被取代'; + $lang['strwhen'] = '當'; + $lang['strformat'] = '格式'; + $lang['strdata'] = '資料'; + $lang['strconfirm'] = '確認'; + $lang['strexpression'] = '表達式'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = '展開'; + $lang['strcollapse'] = '摺疊'; + $lang['strfind'] = '尋找'; + $lang['stroptions'] = '選項'; + $lang['strrefresh'] = '重新整理'; + $lang['strdownload'] = '下載'; + $lang['strdownloadgzipped'] = '以 gzip 壓縮並下載'; + $lang['strinfo'] = '資訊'; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = '進階'; + $lang['strvariables'] = '變數'; + $lang['strprocess'] = '進程'; + $lang['strprocesses'] = '進程'; + $lang['strsetting'] = '設定'; + $lang['streditsql'] = '編輯 SQL'; + $lang['strruntime'] = '總共執行時間: %s ms'; + $lang['strpaginate'] = '分頁顯示結果'; + $lang['struploadscript'] = '或是上傳一個 SQL 稿本檔: '; + $lang['strstarttime'] = '啟動時間'; + $lang['strfile'] = '檔案'; + $lang['strfileimported'] = '檔案已匯入。'; + $lang['strtrycred'] = '使用這些憑證給全部伺服器'; + $lang['stractionsonmultiplelines'] = '動作在多個行列上'; + $lang['strcheckall'] = '檢查全部'; + $lang['struncheckall'] = '不檢查全部'; + + // User-supplied SQL history + $lang['strhistory'] = '歷程'; + $lang['strnohistory'] = '無歷程。'; + $lang['strclearhistory'] = '清空歷程'; + $lang['strdelhistory'] = '從歷程刪除'; + $lang['strconfdelhistory'] = '確實要從歷程刪除嗎 ?'; + $lang['strconfclearhistory'] = '確實要清空歷程嗎 ?'; + $lang['strnodatabaseselected'] = '請選擇一個資料庫。'; + + // Database sizes + $lang['strsize'] = '容量'; + $lang['strbytes'] = '位元組'; + $lang['strkb'] = 'kB'; + $lang['strmb'] = 'MB'; + $lang['strgb'] = 'GB'; + $lang['strtb'] = 'TB'; + + // Error handling + $lang['strnoframes'] = '這個應用最好以一個能啟用框架頁(frame)的瀏覽器運作,但也能夠被使用在沒有框架頁下接繼運作,請按下面的連結。'; + $lang['strnoframeslink'] = '使用不包括框架頁(frame)'; + $lang['strbadconfig'] = '您的 config.inc.php 是過時的。您將需要從新的 config.inc.php-dist 重建它。'; + $lang['strnotloaded'] = '您的 PHP 環境未安裝 PostgreSQL 必要的支持。您必需重新編譯 PHP 使用 --with-pgsql 組態選項。'; + $lang['strpostgresqlversionnotsupported'] = '版本的 PostgreSQL 未被支持。請升級版本到 %s 或是更高者。'; + $lang['strbadschema'] = '無效的架構模式被指定。'; + $lang['strbadencoding'] = '在資料庫中設定客戶端字元編碼失敗。'; + $lang['strsqlerror'] = 'SQL 錯誤: '; + $lang['strinstatement'] = '在區塊內: '; + $lang['strinvalidparam'] = '無效的稿本變數。'; + $lang['strnodata'] = '找不到資料列。'; + $lang['strnoobjects'] = '找不到物件。'; + $lang['strrownotunique'] = '該資料列無唯一約束。'; + $lang['strnoreportsdb'] = '您尚未建立報表資料庫。請參閱指導 INSTALL 檔說明。'; + $lang['strnouploads'] = '上傳檔案功能是已停用。'; + $lang['strimporterror'] = '匯入錯誤。'; + $lang['strimporterror-fileformat'] = '匯入錯誤: 自動識別檔案格式已失敗。'; + $lang['strimporterrorline'] = '匯入錯誤發生在第 %s 行。'; + $lang['strimporterrorline-badcolumnnum'] = '匯入錯誤發生在第 %s 行: 該行不具備正確的欄位編號。'; + $lang['strimporterror-uploadedfile'] = '匯入錯誤: 檔案無法被上傳到這伺服器'; + $lang['strcannotdumponwindows'] = '複雜的資料表與架構模式名稱轉儲在 Windows 是未被支持的。'; + $lang['strinvalidserverparam'] = '試圖用無效的伺服器參數連結, 可能有人正試圖攻擊您的系統。'; + $lang['strnoserversupplied'] = '沒有選擇資料庫!'; + + // Tables + $lang['strtable'] = '資料表'; + $lang['strtables'] = '資料表'; + $lang['strshowalltables'] = '顯示全部資料表'; + $lang['strnotables'] = '找不到資料表。'; + $lang['strnotable'] = '找不到任何資料表。'; + $lang['strcreatetable'] = '建立新資料表'; + $lang['strtablename'] = '資料表名'; + $lang['strtableneedsname'] = '您必需為您的資料表命名。'; + $lang['strtableneedsfield'] = '您至少應指定一個欄位。'; + $lang['strtableneedscols'] = '您必需指定一個合法的欄位數量。'; + $lang['strtablecreated'] = '資料表已建立。'; + $lang['strtablecreatedbad'] = '建立資料表作業已失敗。'; + $lang['strconfdroptable'] = '您確定要移除資料表 "%s"?'; + $lang['strtabledropped'] = '資料表已移除。'; + $lang['strtabledroppedbad'] = '資料表移除已失敗。'; + $lang['strconfemptytable'] = '您確定要清空資料表 "%s"?'; + $lang['strtableemptied'] = '資料表已清空。'; + $lang['strtableemptiedbad'] = '資料表清空已失敗。'; + $lang['strinsertrow'] = '插入資料列'; + $lang['strrowinserted'] = '資料列已插入。'; + $lang['strrowinsertedbad'] = '資料列插入已失敗。'; + $lang['strrowduplicate'] = '資料列插入失敗, 試圖做複製品插入。'; + $lang['streditrow'] = '編輯資料列'; + $lang['strrowupdated'] = '資料列已更新。'; + $lang['strrowupdatedbad'] = '資料列更新已失敗。'; + $lang['strdeleterow'] = '刪除資料列'; + $lang['strconfdeleterow'] = '您確定要刪除這些資料列??'; + $lang['strrowdeleted'] = '資料列已刪除。'; + $lang['strrowdeletedbad'] = '資料列刪除已失敗。'; + $lang['strinsertandrepeat'] = '插入與重作'; + $lang['strnumcols'] = '欄位數量'; + $lang['strcolneedsname'] = '您必需為這個欄位特定一個名稱'; + $lang['strselectallfields'] = '選擇全部欄位'; + $lang['strselectneedscol'] = '您必需至少顯示一資料列。'; + $lang['strselectunary'] = '一元運算子不能有值。'; + $lang['straltercolumn'] = '修改資料列'; + $lang['strcolumnaltered'] = '資料列已修改。'; + $lang['strcolumnalteredbad'] = '資料列修改已失敗。'; + $lang['strconfdropcolumn'] = '您確定要移除欄位 "%s" 從資料表 "%s"?'; + $lang['strcolumndropped'] = '欄位已移除。'; + $lang['strcolumndroppedbad'] = '欄位移除已失敗。'; + $lang['straddcolumn'] = '新增欄位'; + $lang['strcolumnadded'] = '欄位已新增。'; + $lang['strcolumnaddedbad'] = '欄位新增已失敗。'; + $lang['strcascade'] = '附屬串聯(CASCADE)'; + $lang['strtablealtered'] = '資料表已修改。'; + $lang['strtablealteredbad'] = '資料表修改已失敗。'; + $lang['strdataonly'] = '只有資料'; + $lang['strstructureonly'] = '只有結構'; + $lang['strstructureanddata'] = '結構和資料'; + $lang['strtabbed'] = '固定(Tabbed)'; + $lang['strauto'] = '自動'; + $lang['strconfvacuumtable'] = '您確定將要清理(vacuum) "%s" 嗎?'; + $lang['strconfanalyzetable'] = '確定要分析 "%s" 嗎?'; + $lang['strestimatedrowcount'] = '已估算的資料列計數'; + $lang['strestimatedrowcount'] = '估計的資料列數'; + $lang['strspecifytabletoanalyze'] = '必須至少選擇一個資料表來分析'; + $lang['strspecifytabletoempty'] = '必須至少選擇一個資料表來清空'; + $lang['strspecifytabletodrop'] = '必須至少選擇一個資料表來移除'; + $lang['strspecifytabletovacuum'] = '必須至少選擇一個資料表來清理(vacuum)'; + + // Columns + $lang['strcolprop'] = '欄位屬性'; + $lang['strnotableprovided'] = '沒有指定資料表!'; + + // Users + $lang['struser'] = '使用者'; + $lang['strusers'] = '使用者'; + $lang['strusername'] = '使用者名稱'; + $lang['strpassword'] = '密碼'; + $lang['strsuper'] = '超級使用者?'; + $lang['strcreatedb'] = '能建立資料庫?'; + $lang['strexpires'] = '失效逾期'; + $lang['strsessiondefaults'] = 'Session 預設'; + $lang['strnousers'] = '找不到此使用者。'; + $lang['struserupdated'] = '使用者已更新。'; + $lang['struserupdatedbad'] = '使用者更新已失敗。'; + $lang['strshowallusers'] = '顯示所有使用者'; + $lang['strcreateuser'] = '建立新使用者'; + $lang['struserneedsname'] = '您必需為您的使用者命名。'; + $lang['strusercreated'] = '使用者已建立。'; + $lang['strusercreatedbad'] = '使用者建立已失敗。'; + $lang['strconfdropuser'] = '您確定您要移除這個使用者 "%s"?'; + $lang['struserdropped'] = '使用者已移除。'; + $lang['struserdroppedbad'] = '使用者移除已失敗。'; + $lang['straccount'] = '帳戶'; + $lang['strchangepassword'] = '變更密碼'; + $lang['strpasswordchanged'] = '密碼已變更。'; + $lang['strpasswordchangedbad'] = '密碼變更已失敗。'; + $lang['strpasswordshort'] = '密碼太簡短。'; + $lang['strpasswordconfirm'] = '所輸入的確認密碼不符。'; + + // Groups + $lang['strgroup'] = '群組'; + $lang['strgroups'] = '群組'; + $lang['strshowallgroups'] = '顯示全部群組'; + $lang['strnogroup'] = '找不到群組。'; + $lang['strnogroups'] = '找不到任何群組。'; + $lang['strcreategroup'] = '建立群組'; + $lang['strgroupneedsname'] = '您必需為您的群組命名。'; + $lang['strgroupcreated'] = '群組已建立。'; + $lang['strgroupcreatedbad'] = '群組建立已失敗。'; + $lang['strconfdropgroup'] = '您確定您要移除這個群組 "%s"?'; + $lang['strgroupdropped'] = '群組已移除。'; + $lang['strgroupdroppedbad'] = '群組移除已失敗。'; + $lang['strmembers'] = '成員'; + $lang['strmemberof'] = '成員屬於'; + $lang['stradminmembers'] = '管理員成員'; + $lang['straddmember'] = '增加成員'; + $lang['strmemberadded'] = '成員已加入。'; + $lang['strmemberaddedbad'] = '成員加入已失敗。'; + $lang['strdropmember'] = '移除成員'; + $lang['strconfdropmember'] = '您確定您要移除這個成員 "%s" 從這個群組 "%s"?'; + $lang['strmemberdropped'] = '成員已移除。'; + $lang['strmemberdroppedbad'] = '成員移除已失敗。'; + + // Roles + $lang['strrole'] = '角色'; + $lang['strroles'] = '角色'; + $lang['strshowallroles'] = '顯示全部角色'; + $lang['strnoroles'] = '找不到任何角色。'; + $lang['strinheritsprivs'] = '繼承特權?'; + $lang['strcreaterole'] = '建立角色'; + $lang['strcancreaterole'] = '能建立角色?'; + $lang['strrolecreated'] = '角色已建立。'; + $lang['strrolecreatedbad'] = '角色建立已失敗。'; + $lang['stralterrole'] = '修改角色'; + $lang['strrolealtered'] = '角色被修改。'; + $lang['strrolealteredbad'] = '角色修改已失敗。'; + $lang['strcanlogin'] = '可以登入?'; + $lang['strconnlimit'] = '連線限制'; + $lang['strdroprole'] = '移除角色'; + $lang['strconfdroprole'] = '您確定您要移除這個角色 "%s"?'; + $lang['strroledropped'] = '角色已移除。'; + $lang['strroledroppedbad'] = '角色移除已失敗。'; + $lang['strnolimit'] = '不限制'; + $lang['strnever'] = '從末'; + $lang['strroleneedsname'] = '您必需為這個角色命名。'; + + // Privileges + $lang['strprivilege'] = '特權'; + $lang['strprivileges'] = '特權'; + $lang['strnoprivileges'] = '這個物件有預設的擁有人特權。'; + $lang['strgrant'] = '賦予'; + $lang['strrevoke'] = '撤回'; + $lang['strgranted'] = '特權已變更。'; + $lang['strgrantfailed'] = '特權變更失敗。'; + $lang['strgrantbad'] = '您必需至少在一名使用者或群組中指定至少一項特權。'; + $lang['strgrantor'] = '授權者'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = '資料庫'; + $lang['strdatabases'] = '資料庫'; + $lang['strshowalldatabases'] = '顯示全部資料庫'; + $lang['strnodatabases'] = '找不到任何資料庫。'; + $lang['strcreatedatabase'] = '建立資料庫'; + $lang['strdatabasename'] = '資料庫名稱'; + $lang['strdatabaseneedsname'] = '您必需為您的資料庫給一個名稱。'; + $lang['strdatabasecreated'] = '資料庫已建立。'; + $lang['strdatabasecreatedbad'] = '資料庫建立失敗。'; + $lang['strconfdropdatabase'] = '您確定您要移除這個資料庫 "%s"?'; + $lang['strdatabasedropped'] = '資料庫已移除。'; + $lang['strdatabasedroppedbad'] = '資料庫移除失敗。'; + $lang['strentersql'] = '在下方輸入 SQL 來執行: '; + $lang['strsqlexecuted'] = 'SQL 已執行。'; + $lang['strvacuumgood'] = '清理完成。'; + $lang['strvacuumbad'] = '清理失敗。'; + $lang['stranalyzegood'] = '分析完成。'; + $lang['stranalyzebad'] = '分析失敗。'; + $lang['strreindexgood'] = '重建索引完成。'; + $lang['strreindexbad'] = '重建索引失敗。'; + $lang['strfull'] = '全部性'; + $lang['strfreeze'] = '凍結'; + $lang['strforce'] = '強制'; + $lang['strsignalsent'] = '訊號傳遞。'; + $lang['strsignalsentbad'] = '傳遞訊號失敗。'; + $lang['strallobjects'] = '全部物件'; + $lang['strdatabasealtered'] = '資料庫已修改。'; + $lang['strdatabasealteredbad'] = '資料庫修改已失敗。'; + $lang['strspecifydatabasetodrop'] = '必須至少指定一個資料庫來移除'; + + // Views + $lang['strview'] = '視觀表'; + $lang['strviews'] = '視觀表'; + $lang['strshowallviews'] = '顯示全部視觀表'; + $lang['strnoview'] = '找不到視觀表。'; + $lang['strnoviews'] = '找不到任何視觀表。'; + $lang['strcreateview'] = '建立視觀表'; + $lang['strviewname'] = '視觀表名稱'; + $lang['strviewneedsname'] = '您必需為您的視觀表給一個名稱。'; + $lang['strviewneedsdef'] = '您必需為你的視觀表給一個定義。'; + $lang['strviewneedsfields'] = '您必需在您的視觀表中選擇給這個欄位。'; + $lang['strviewcreated'] = '視觀表已建立。'; + $lang['strviewcreatedbad'] = '視觀表建立已失敗。'; + $lang['strconfdropview'] = '您確定您要移除這個視觀表 "%s" 嗎?'; + $lang['strviewdropped'] = '視觀表已移除。'; + $lang['strviewdroppedbad'] = '視觀表移除已失敗。'; + $lang['strviewlink'] = '連結鍵(Linking keys)'; + $lang['strviewconditions'] = '附加条件'; + $lang['strviewconditions'] = '附加的條件限制'; + $lang['strcreateviewwiz'] = '建立視觀表精靈'; + $lang['strrenamedupfields'] = '重新命名複製的字串'; + $lang['strdropdupfields'] = '移除複制的字串'; + $lang['strerrordupfields'] = '複製字串時發生錯誤'; + $lang['strviewupdated'] = '視觀表已更新。'; + $lang['strviewupdatedbad'] = '視觀表更新已失敗。'; + $lang['strspecifyviewtodrop'] = '必须至少指定一个视图来移除'; + + // Sequences + $lang['strsequence'] = '序列數'; + $lang['strsequences'] = '序列數'; + $lang['strshowallsequences'] = '顯示全部序列數'; + $lang['strnosequence'] = '找不到序列數。'; + $lang['strnosequences'] = '找不到任何序列數。'; + $lang['strcreatesequence'] = '建立序列數'; + $lang['strlastvalue'] = '最後值'; + $lang['strincrementby'] = '遞增量'; + $lang['strstartvalue'] = '初始值'; + $lang['strmaxvalue'] = '最大值'; + $lang['strminvalue'] = '最小值'; + $lang['strcachevalue'] = '快取值'; + $lang['strlogcount'] = '日誌計數'; + $lang['striscycled'] = '可循環?'; + $lang['striscalled'] = '將在返回下一個值前遞增最後的值(is_called)嗎?'; + $lang['strsequenceneedsname'] = '您必需為您的序列數給一個名稱。'; + $lang['strsequencecreated'] = '序列數已建立。'; + $lang['strsequencecreatedbad'] = '序列數建立失敗。'; + $lang['strconfdropsequence'] = '您確定您要移除這個序列數 "%s"?'; + $lang['strsequencedropped'] = '序列數已移除。'; + $lang['strsequencedroppedbad'] = '序列數移除已失敗。'; + $lang['strsequencereset'] = '序列數重置。'; + $lang['strsequenceresetbad'] = '序列數重置已失敗。'; + $lang['straltersequence'] = '修改序列數'; + $lang['strsequencealtered'] = '序列數已修改。'; + $lang['strsequencealteredbad'] = '序列數修改已失敗。'; + $lang['strsetval'] = '設定序列數值'; + $lang['strsequencesetval'] = '序列數值已設定。'; + $lang['strsequencesetvalbad'] = '序列數值設定已失敗。'; + $lang['strnextval'] = '遞增量'; + $lang['strsequencenextval'] = '序列數已遞增。'; + $lang['strsequencenextvalbad'] = '序列數已遞增失敗。'; + $lang['strspecifysequencetodrop'] = '必須至少指定一個序列數來刪除'; + + // Indexes + $lang['strindex'] = '索引'; + $lang['strindexes'] = '索引'; + $lang['strindexname'] = '索引名稱'; + $lang['strshowallindexes'] = '顯示全部索引'; + $lang['strnoindex'] = '找不到索引。'; + $lang['strnoindexes'] = '找不到任何索引。'; + $lang['strcreateindex'] = '建立索引'; + $lang['strtabname'] = '資料表名稱'; + $lang['strcolumnname'] = '欄位名稱'; + $lang['strindexneedsname'] = '您必需為您的索引給一個名稱。'; + $lang['strindexneedscols'] = '索引要求一個有效欄位數量。'; + $lang['strindexcreated'] = '索引已建立'; + $lang['strindexcreatedbad'] = '索引建立失敗。'; + $lang['strconfdropindex'] = '您確定您要移除這個索引 "%s" 嗎?'; + $lang['strindexdropped'] = '索引已移除。'; + $lang['strindexdroppedbad'] = '索引移除失敗。'; + $lang['strkeyname'] = '鍵名'; + $lang['struniquekey'] = '唯一鍵'; + $lang['strprimarykey'] = '主鍵(pkey)'; + $lang['strindextype'] = '索引類型'; + $lang['strtablecolumnlist'] = '資料表欄位'; + $lang['strindexcolumnlist'] = '索引欄位'; + $lang['strconfcluster'] = '您確定您要叢集化 "%s" 嗎?'; + $lang['strclusteredgood'] = '叢集完成。'; + $lang['strclusteredbad'] = '叢集已失敗。'; + + // Rules + $lang['strrules'] = '規則'; + $lang['strrule'] = '規則'; + $lang['strshowallrules'] = '顯示全部規則'; + $lang['strnorule'] = '找不到規則。'; + $lang['strnorules'] = '找不到任何規則。'; + $lang['strcreaterule'] = '建立規則'; + $lang['strrulename'] = '規則名稱'; + $lang['strruleneedsname'] = '您必需為您的規則給一個名稱。'; + $lang['strrulecreated'] = '規則已建立。'; + $lang['strrulecreatedbad'] = '規則建立已失敗。'; + $lang['strconfdroprule'] = '您確定您要移除這個規則 "%s" 在 "%s"上嗎?'; + $lang['strruledropped'] = '規則規則已移除。'; + $lang['strruledroppedbad'] = '規則移除已失敗。'; + + // Constraints + $lang['strconstraint'] = '約束限制'; + $lang['strconstraints'] = '約束限制'; + $lang['strshowallconstraints'] = '顯示全部約束限制'; + $lang['strnoconstraints'] = '找不到任何約束限制。'; + $lang['strcreateconstraint'] = '建立約束限制'; + $lang['strconstraintcreated'] = '約束限制已建立。'; + $lang['strconstraintcreatedbad'] = '約束限制建立已失敗。'; + $lang['strconfdropconstraint'] = '您確定您要移除這約束限制 "%s" 在 "%s" 上嗎?'; + $lang['strconstraintdropped'] = '約束限制已移除。'; + $lang['strconstraintdroppedbad'] = '約束限制移除已失敗。'; + $lang['straddcheck'] = '增加約束檢查(Check)'; + $lang['strcheckneedsdefinition'] = '約束檢查(Check)限制需要定義。'; + $lang['strcheckadded'] = '約束檢查限制已增加。'; + $lang['strcheckaddedbad'] = '增加約束檢查限制已失敗。'; + $lang['straddpk'] = '增加主鍵(pkey)'; + $lang['strpkneedscols'] = '主鍵(pkey)要求最少一個欄位。'; + $lang['strpkadded'] = '主鍵(pkey)已增加。'; + $lang['strpkaddedbad'] = '增加主鍵(pkey)已失敗。'; + $lang['stradduniq'] = '增加唯一約束限制'; + $lang['struniqneedscols'] = '唯一約束限制要求最少一個欄位。'; + $lang['struniqadded'] = '唯一約束限制已增加。'; + $lang['struniqaddedbad'] = '增加唯一約束限制已失敗。'; + $lang['straddfk'] = '增加外部鍵(fkey)'; + $lang['strfkneedscols'] = '外部鍵(fkey)要求最少一個欄位。'; + $lang['strfkneedstarget'] = '外部鍵(fkey)要求一個資料表。'; + $lang['strfkadded'] = '外部鍵(fkey)已增加。'; + $lang['strfkaddedbad'] = '增加外部鍵(fkey)已失敗。'; + $lang['strfktarget'] = '目標資料表'; + $lang['strfkcolumnlist'] = '鍵欄位'; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + + // Functions + $lang['strfunction'] = '函數'; + $lang['strfunctions'] = '函數'; + $lang['strshowallfunctions'] = '顯示全部函數'; + $lang['strnofunction'] = '找不到函數。'; + $lang['strnofunctions'] = '找不到任何函數。'; + $lang['strcreateplfunction'] = '建立 SQL/PL 函數'; + $lang['strcreateinternalfunction'] = '建立內部函數'; + $lang['strcreatecfunction'] = '建立 C 函數'; + $lang['strfunctionname'] = '函數名稱'; + $lang['strreturns'] = '遞回'; + $lang['strproglanguage'] = '程序語言'; + $lang['strfunctionneedsname'] = '您必需為您的函數給一個名稱。'; + $lang['strfunctionneedsdef'] = '您必需為您的函數給一個定義。'; + $lang['strfunctioncreated'] = '函數已建立。'; + $lang['strfunctioncreatedbad'] = '函數建立已失敗。'; + $lang['strconfdropfunction'] = '您確定您要移除這個函數 "%s"?'; + $lang['strfunctiondropped'] = '函數已移除。'; + $lang['strfunctiondroppedbad'] = '函數移除已失敗。'; + $lang['strfunctionupdated'] = '函數已更新。'; + $lang['strfunctionupdatedbad'] = '函數更新已失敗。'; + $lang['strobjectfile'] = '物件檔案'; + $lang['strlinksymbol'] = '連結物件標記'; + $lang['strarguments'] = '引數'; + $lang['strargmode'] = '方式'; + $lang['strargtype'] = '類型'; + $lang['strargadd'] = '增加作者引數'; + $lang['strargremove'] = '移除這個引數'; + $lang['strargnoargs'] = '這個函數將不能工作任何引數。'; + $lang['strargenableargs'] = '啟用引數已被傳遞到這個函數。'; + $lang['strargnorowabove'] = '需要資料列在這資料列之上。'; + $lang['strargnorowbelow'] = '需要資料列在這資料列之前。'; + $lang['strargraise'] = '向上移。'; + $lang['strarglower'] = '向下移。'; + $lang['strargremoveconfirm'] = '您確定你要移除這個引數? 這個作業未能完成。'; + $lang['strfunctioncosting'] = '函數成本'; + $lang['strresultrows'] = '结果集資料行數'; + $lang['strexecutioncost'] = '執行成本'; + $lang['strspecifyfunctiontodrop'] = '必須至少指定一個函數來刪除'; + + // Triggers + $lang['strtrigger'] = '觸發器'; + $lang['strtriggers'] = '觸發器'; + $lang['strshowalltriggers'] = '顯示全部觸發器'; + $lang['strnotrigger'] = '找不到觸發器。'; + $lang['strnotriggers'] = '找不到任何觸發器。'; + $lang['strcreatetrigger'] = '建立觸發器'; + $lang['strtriggerneedsname'] = '您必需為您的觸發器明確指定一個名稱。'; + $lang['strtriggerneedsfunc'] = '您必需為您的觸發器明確指定一個函數。'; + $lang['strtriggercreated'] = '觸發器已建立。'; + $lang['strtriggercreatedbad'] = '觸發器建立已失敗。'; + $lang['strconfdroptrigger'] = '您確定您要移除這個觸發器 "%s" on "%s"?'; + $lang['strconfenabletrigger'] = '您確定您要啟用這個觸發器觸發器 "%s" 在 "%s" 上?'; + $lang['strconfdisabletrigger'] = '您確定您要停用這個觸發器觸發器 "%s" on "%s" 上?'; + $lang['strtriggerdropped'] = '觸發器已移除。'; + $lang['strtriggerdroppedbad'] = '觸發器移除已失敗。'; + $lang['strtriggerenabled'] = '觸發器啟用。'; + $lang['strtriggerenabledbad'] = '觸發器啟用已失敗。'; + $lang['strtriggerdisabled'] = '觸發器停用。'; + $lang['strtriggerdisabledbad'] = '觸發器停用已失敗。'; + $lang['strtriggeraltered'] = '觸發器已修改。'; + $lang['strtriggeralteredbad'] = '觸發器修改已失敗。'; + $lang['strforeach'] = '給每個'; + + // Types + $lang['strtype'] = '類型'; + $lang['strtypes'] = '類型'; + $lang['strshowalltypes'] = '顯示全部類型'; + $lang['strnotype'] = '找不到類型。'; + $lang['strnotypes'] = '找不到任何類型。'; + $lang['strcreatetype'] = '建立類型'; + $lang['strcreatecomptype'] = '建立合成類型'; + $lang['strcreateenumtype'] = '建立列舉類型'; + $lang['strtypeneedsfield'] = '您必須明確指定最少一個欄位。'; + $lang['strtypeneedsvalue'] = '您必須明確指定最少一個值。'; + $lang['strtypeneedscols'] = '您必須明確指定有效的欄位數。'; + $lang['strtypeneedsvals'] = '您必須明確指定一個有效的欄位數。'; + $lang['strinputfn'] = '輸入類型'; + $lang['stroutputfn'] = '輸出類型'; + $lang['strpassbyval'] = '以值傳送?'; + $lang['stralignment'] = '列隊組合'; + $lang['strelement'] = '元素'; + $lang['strdelimiter'] = '分隔符號'; + $lang['strstorage'] = '儲藏所'; + $lang['strfield'] = '欄位'; + $lang['strvalue'] = '值'; + $lang['strnumfields'] = '欄位數. '; + $lang['strnumvalues'] = '值數'; + $lang['strtypeneedsname'] = '您必需為您的類型給一個名稱。'; + $lang['strtypeneedslen'] = '您必需為您的類型給一個長度。'; + $lang['strtypecreated'] = '類型已建立'; + $lang['strtypecreatedbad'] = '類型建立已失敗。'; + $lang['strconfdroptype'] = '您確定您要移除這個類型 "%s" 嗎?'; + $lang['strtypedropped'] = '類型已移除。'; + $lang['strtypedroppedbad'] = '類型移除已失敗。'; + $lang['strflavor'] = '風格(Flavor)'; + $lang['strbasetype'] = '基礎'; + $lang['strcompositetype'] = '合成'; + $lang['strpseudotype'] = '偽(Pseudo)'; + $lang['strenum'] = 'Enum'; + $lang['strenumvalues'] = '列舉類型'; + + // Schemas + $lang['strschema'] = '架構模式'; + $lang['strschemas'] = '架構模式'; + $lang['strshowallschemas'] = '顯示全部架構模式'; + $lang['strnoschema'] = '找不到架構模式。'; + $lang['strnoschemas'] = '找不到任何架構模式。'; + $lang['strcreateschema'] = '建立架構模式'; + $lang['strschemaname'] = '架構模式名稱'; + $lang['strschemaneedsname'] = '您必需為您的架構模式給一個名稱。'; + $lang['strschemacreated'] = '架構模式已建立'; + $lang['strschemacreatedbad'] = '架構模式建立已失敗。'; + $lang['strconfdropschema'] = '您確定您要移除這個架構模式 "%s" 嗎?'; + $lang['strschemadropped'] = '架構模式已移除。'; + $lang['strschemadroppedbad'] = '架構模式移除失敗。'; + $lang['strschemaaltered'] = '架構模式已修改。'; + $lang['strschemaalteredbad'] = '架構模式修改已失敗。'; + $lang['strsearchpath'] = '架構模式搜尋路徑'; + $lang['strspecifyschematodrop'] = '您必須至少指定一個架構模式來刪除'; + + // Reports + $lang['strreport'] = '報表'; + $lang['strreports'] = '報表'; + $lang['strshowallreports'] = '顯示全部報表'; + $lang['strnoreports'] = '找不到任何報表。'; + $lang['strcreatereport'] = '建立報表'; + $lang['strreportdropped'] = '報表已移除。'; + $lang['strreportdroppedbad'] = '報表移除已失敗。'; + $lang['strconfdropreport'] = '您確定您要移除這個報表 "%s" 嗎?'; + $lang['strreportneedsname'] = '您必需為您的報表給一個名稱。'; + $lang['strreportneedsdef'] = '您必需為您的報表給 SQL。'; + $lang['strreportcreated'] = '報表已儲存。'; + $lang['strreportcreatedbad'] = '報表儲存已失敗。'; + + // Domains + $lang['strdomain'] = '共同值域'; + $lang['strdomains'] = '共同值域'; + $lang['strshowalldomains'] = '顯示全部共同值域'; + $lang['strnodomains'] = '找不到任何共同值域。'; + $lang['strcreatedomain'] = '建立共同值域'; + $lang['strdomaindropped'] = '共同值域已移除。'; + $lang['strdomaindroppedbad'] = '共同值域移除已失敗。'; + $lang['strconfdropdomain'] = '您確定您要移除這個共同值域 "%s"?'; + $lang['strdomainneedsname'] = '您必需為您的共同值域給一個名稱。。'; + $lang['strdomaincreated'] = '共同值域已建立。'; + $lang['strdomaincreatedbad'] = '共同值域建立已失敗。'; + $lang['strdomainaltered'] = '共同值域已修改。'; + $lang['strdomainalteredbad'] = '共同值域修改已失敗。'; + + // Operators + $lang['stroperator'] = '運算子'; + $lang['stroperators'] = '運算子'; + $lang['strshowalloperators'] = '顯示全部運算子'; + $lang['strnooperator'] = '找不到運算子。'; + $lang['strnooperators'] = '找不到任何運算子。'; + $lang['strcreateoperator'] = '建立運算子'; + $lang['strleftarg'] = '左引數類型'; + $lang['strrightarg'] = '右引數類型'; + $lang['strcommutator'] = '轉換器'; + $lang['strnegator'] = '否定器'; + $lang['strrestrict'] = '限制'; + $lang['strjoin'] = '結合'; + $lang['strhashes'] = '雜湊(Hashes)'; + $lang['strmerges'] = '合併'; + $lang['strleftsort'] = '左排序'; + $lang['strrightsort'] = '右排序'; + $lang['strlessthan'] = '小於'; + $lang['strgreaterthan'] = '大於'; + $lang['stroperatorneedsname'] = '您必需為您的運算子給一個名稱。'; + $lang['stroperatorcreated'] = '運算子已建立'; + $lang['stroperatorcreatedbad'] = '運算子建立已失敗。'; + $lang['strconfdropoperator'] = '您確定您要移除這個運算子 "%s" 嗎?'; + $lang['stroperatordropped'] = '運算子已移除。'; + $lang['stroperatordroppedbad'] = '運算子移除已失敗。'; + + // Casts + $lang['strcasts'] = '類型轉換'; + $lang['strnocasts'] = '找不到任何類型轉換。'; + $lang['strsourcetype'] = '來源類型'; + $lang['strtargettype'] = '目標類型'; + $lang['strimplicit'] = '隱含'; + $lang['strinassignment'] = '在指派中'; + $lang['strbinarycompat'] = '(二進制碼相容)'; + + // Conversions + $lang['strconversions'] = '編碼轉換'; + $lang['strnoconversions'] = '找不到任何編碼轉換。'; + $lang['strsourceencoding'] = '來源編碼'; + $lang['strtargetencoding'] = '目標編碼'; + + // Languages + $lang['strlanguages'] = '程序語言'; + $lang['strnolanguages'] = '找不到任何程序語言。'; + $lang['strtrusted'] = '被信任的'; + + // Info + $lang['strnoinfo'] = '無資訊可用。'; + $lang['strreferringtables'] = '參照中資料表'; + $lang['strparenttables'] = '父資料表'; + $lang['strchildtables'] = '子資料表'; + + // Aggregates + $lang['straggregate'] = '聚集函數'; + $lang['straggregates'] = '聚集函數'; + $lang['strnoaggregates'] = '找不到任何聚集函數。'; + $lang['stralltypes'] = '(全部類型)'; + $lang['strcreateaggregate'] = '建立聚集函數'; + $lang['straggrbasetype'] = '輸入資料類型'; + $lang['straggrsfunc'] = '狀態過渡函數'; + $lang['straggrstype'] = '狀態類型'; + $lang['straggrffunc'] = '最終函數'; + $lang['straggrinitcond'] = '最初條件'; + $lang['straggrsortop'] = '排序運算子'; + $lang['strconfdropaggregate'] = '您確定您要移除這個聚集函數 "%s" 嗎?'; + $lang['straggregatedropped'] = '聚集函數已移除。'; + $lang['straggregatedroppedbad'] = '聚集函數移除已失敗。'; + $lang['straggraltered'] = '聚集函數已修改。'; + $lang['straggralteredbad'] = '聚集函數修改已失敗。'; + $lang['straggrneedsname'] = '您必需具體指定一個名稱給這個聚集函數。'; + $lang['straggrneedsbasetype'] = '您必需具體指定這聚集函數的進入資料類型。'; + $lang['straggrneedssfunc'] = '您必需具體指定這這聚集函數的狀態過渡函數名稱。'; + $lang['straggrneedsstype'] = '您必需具體指定這聚集函數群狀態值的資料類型'; + $lang['straggrcreated'] = '聚集函數已建立。'; + $lang['straggrcreatedbad'] = '聚集函數建立已失敗。'; + $lang['straggrshowall'] = '顯示全部聚集函數'; + + // Operator Classes + $lang['stropclasses'] = '運算子類別'; + $lang['strnoopclasses'] = '找不到任何運算子類別。'; + $lang['straccessmethod'] = '存取方法'; + + // Stats and performance + $lang['strrowperf'] = '資料列性能'; + $lang['strioperf'] = 'I/O 性能'; + $lang['stridxrowperf'] = '索引資料列性能'; + $lang['stridxioperf'] = '索引 I/O 性能'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = '順序性'; + $lang['strscan'] = '掃描'; + $lang['strread'] = '讀取'; + $lang['strfetch'] = '取得'; + $lang['strheap'] = '堆疊'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST 索引'; + $lang['strcache'] = '快取'; + $lang['strdisk'] = '磁碟'; + $lang['strrows2'] = '資料列'; + + // Tablespaces + $lang['strtablespace'] = '表空間'; + $lang['strtablespaces'] = '表空間'; + $lang['strshowalltablespaces'] = '顯示全部表空間'; + $lang['strnotablespaces'] = '找不到任何表空間。'; + $lang['strcreatetablespace'] = '建立表空間'; + $lang['strlocation'] = '所在位置'; + $lang['strtablespaceneedsname'] = '您必需為您的表空間給一個名稱。'; + $lang['strtablespaceneedsloc'] = '您必需給一個目錄夾來建立表空間。'; + $lang['strtablespacecreated'] = '表空間已建立。'; + $lang['strtablespacecreatedbad'] = '表空間建立已失敗。'; + $lang['strconfdroptablespace'] = '您確定您要移除這個表空間 "%s"?'; + $lang['strtablespacedropped'] = '表空間已移除。'; + $lang['strtablespacedroppedbad'] = '表空間移除已失敗。'; + $lang['strtablespacealtered'] = '表空間已修改。'; + $lang['strtablespacealteredbad'] = '表空間修改已失敗。'; + + // Slony clusters + $lang['strcluster'] = '叢集'; + $lang['strnoclusters'] = '找不到任何叢集。'; + $lang['strconfdropcluster'] = '您確定您要移除這個叢集 "%s" 嗎?'; + $lang['strclusterdropped'] = '叢集已移除。'; + $lang['strclusterdroppedbad'] = '叢集移除失敗。'; + $lang['strinitcluster'] = '初始化叢集'; + $lang['strclustercreated'] = '叢集已初始化。'; + $lang['strclustercreatedbad'] = '叢集初始化失敗。'; + $lang['strclusterneedsname'] = '您必需為這個叢集給一個名稱。'; + $lang['strclusterneedsnodeid'] = '您必需給這個本地節點給一個 ID。'; + + // Slony nodes + $lang['strnodes'] = '節點'; + $lang['strnonodes'] = '找不到任何節點。'; + $lang['strcreatenode'] = '建立節點'; + $lang['strid'] = 'ID'; + $lang['stractive'] = '活躍'; + $lang['strnodecreated'] = '節點已建立。'; + $lang['strnodecreatedbad'] = '節點建立失敗。'; + $lang['strconfdropnode'] = '您確定你要移除節點 "%s"?'; + $lang['strnodedropped'] = '節點已移除。'; + $lang['strnodedroppedbad'] = '節點移除失敗。'; + $lang['strfailover'] = '災難復原'; + $lang['strnodefailedover'] = '節點受災難失敗。'; + $lang['strnodefailedoverbad'] = '節點災難復原失敗。'; + $lang['strstatus'] = '狀態'; + $lang['strhealthy'] = '健全度'; + $lang['stroutofsync'] = '超出同步(Out of Sync)'; + $lang['strunknown'] = '未知的'; + + + // Slony paths + $lang['strpaths'] = '路徑'; + $lang['strnopaths'] = '找不到任何路徑。'; + $lang['strcreatepath'] = '建立路徑'; + $lang['strnodename'] = '節點名稱'; + $lang['strnodeid'] = '節點 ID'; + $lang['strconninfo'] = '連線字串'; + $lang['strconnretry'] = '秒之前重試連線'; + $lang['strpathneedsconninfo'] = '您必需給這個路徑一個連線字串。'; + $lang['strpathneedsconnretry'] = '您必需在連線之前給一個等待重試的秒數字。'; + $lang['strpathcreated'] = '路徑已建立。'; + $lang['strpathcreatedbad'] = '路徑建立已失敗。'; + $lang['strconfdroppath'] = '您確定您要移除路徑 "%s" 嗎?'; + $lang['strpathdropped'] = '路徑已移除。'; + $lang['strpathdroppedbad'] = '路徑移除已失敗。'; + + // Slony listens + $lang['strlistens'] = '監聽'; + $lang['strnolistens'] = '找不到任何監聽。'; + $lang['strcreatelisten'] = '建立監聽'; + $lang['strlistencreated'] = '監聽已建立。'; + $lang['strlistencreatedbad'] = '監聽建立已失敗。'; + $lang['strconfdroplisten'] = '您確定你要移除監聽 "%s"?'; + $lang['strlistendropped'] = '監聽已移除。'; + $lang['strlistendroppedbad'] = '監聽移除已失敗。'; + + // Slony replication sets + $lang['strrepsets'] = '複寫叢集設定'; + $lang['strnorepsets'] = '找不到任何複寫叢集設定。'; + $lang['strcreaterepset'] = '建立複寫叢集設定'; + $lang['strrepsetcreated'] = '複寫叢集設定已建立。'; + $lang['strrepsetcreatedbad'] = '複寫叢集設定建立已失敗。'; + $lang['strconfdroprepset'] = '您確定您要移除複寫叢集設定 "%s"?'; + $lang['strrepsetdropped'] = '複寫叢集設定已移除。'; + $lang['strrepsetdroppedbad'] = '複寫叢集設定移除已失敗。'; + $lang['strmerge'] = '合併'; + $lang['strmergeinto'] = '合併成為'; + $lang['strrepsetmerged'] = '複寫叢集設定已合併。'; + $lang['strrepsetmergedbad'] = '複寫叢集設定合併已失敗。'; + $lang['strmove'] = '遷移'; + $lang['strneworigin'] = '新起點'; + $lang['strrepsetmoved'] = '複寫叢集設定已遷移。'; + $lang['strrepsetmovedbad'] = '複寫叢集設定遷移已失敗。'; + $lang['strnewrepset'] = '新複寫叢集設定'; + $lang['strlock'] = '鎖定'; + $lang['strlocked'] = '已鎖定'; + $lang['strunlock'] = '未鎖定'; + $lang['strconflockrepset'] = '您確定您要鎖定複寫叢集設定 "%s"?'; + $lang['strrepsetlocked'] = '複寫叢集設定已鎖定。'; + $lang['strrepsetlockedbad'] = '複寫叢集設定鎖定已失敗。'; + $lang['strconfunlockrepset'] = '您確定您要解鎖複寫叢集設定 "%s"?'; + $lang['strrepsetunlocked'] = '複寫叢集設定未鎖定。'; + $lang['strrepsetunlockedbad'] = '複寫叢集設定解鎖已失敗。'; + $lang['stronlyonnode'] = '僅在節點上'; + $lang['strddlscript'] = '資料定義語言(DDL)稿本'; + $lang['strscriptneedsbody'] = '您必需提供一個稿本在這全部節點上被執行。'; + $lang['strscriptexecuted'] = '複寫叢集設定 DDL 稿本已執行。'; + $lang['strscriptexecutedbad'] = '執行複寫叢集設定 DDL 稿本中失敗。'; + $lang['strtabletriggerstoretain'] = '這將隨著觸發器不會停用 Slony 在以下: '; + + // Slony tables in replication sets + $lang['straddtable'] = '增加資料表'; + $lang['strtableneedsuniquekey'] = '資料表的增加要求一個主建(pkey)或唯一鍵。'; + $lang['strtableaddedtorepset'] = '資料表已增加到複寫叢集設定。'; + $lang['strtableaddedtorepsetbad'] = '資料表增加到複寫叢集設定失敗。'; + $lang['strconfremovetablefromrepset'] = '您確定您要從複寫叢集設定 "%s" 移除這資料表 "%s" 嗎?'; + $lang['strtableremovedfromrepset'] = '資料表已從複寫叢集設定移除。'; + $lang['strtableremovedfromrepsetbad'] = '資料表從複寫叢集設定移除失敗。'; + + // Slony sequences in replication sets + $lang['straddsequence'] = '增加序列號'; + $lang['strsequenceaddedtorepset'] = '序列號增加到複寫叢集設定。'; + $lang['strsequenceaddedtorepsetbad'] = '增加序列號到複寫叢集設定已失敗。'; + $lang['strconfremovesequencefromrepset'] = '您確定您要從複寫叢集設定 "%s" 移除序列號 "%s" 嗎?'; + $lang['strsequenceremovedfromrepset'] = '序列號已從複寫叢集設定移除。'; + $lang['strsequenceremovedfromrepsetbad'] = '序列號從複寫叢集設定移除已失敗。'; + + // Slony subscriptions + $lang['strsubscriptions'] = '訂閱'; + $lang['strnosubscriptions'] = '找不到任何訂閱。'; + + // Miscellaneous + $lang['strtopbar'] = '%s 運作於 %s: %s -- 您是已登入的使用者 "%s"'; + $lang['strtimefmt'] = 'jS M, Y g: iA'; + $lang['strhelp'] = '說明'; + $lang['strhelpicon'] = '?'; + $lang['strhelppagebrowser'] = '說明頁瀏覽器'; + $lang['strselecthelppage'] = '選擇一個說明頁'; + $lang['strinvalidhelppage'] = '無效說明頁。'; + $lang['strlogintitle'] = '登入到 %s'; + $lang['strlogoutmsg'] = '登出 %s'; + $lang['strloading'] = '載入中...'; + $lang['strerrorloading'] = '載入中錯誤'; + $lang['strclicktoreload'] = '點擊到重新載入'; + + // Autovacuum + $lang['strautovacuum'] = '自動清理(Autovacuum)'; + $lang['strturnedon'] = '已轉動 - 開啟'; + $lang['strturnedoff'] = '已轉動 - 關閉'; + $lang['strenabled'] = '啟用'; + $lang['strvacuumbasethreshold'] = 'Vacuum 基本門檻'; + $lang['strvacuumscalefactor'] = 'Vacuum 換算係數'; + $lang['stranalybasethreshold'] = 'Analyze 基本門檻'; + $lang['stranalyzescalefactor'] = 'Analyze 換算係數'; + $lang['strvacuumcostdelay'] = 'Vacuum 成本延遲'; + $lang['strvacuumcostlimit'] = 'Vacuum 成本限制'; + + // Table-level Locks + $lang['strlocks'] = '鎖定'; + $lang['strtransaction'] = '事務交易 ID'; + $lang['strvirtualtransaction'] = '虛擬事務交易 ID'; + $lang['strprocessid'] = '進程 ID'; + $lang['strmode'] = '鎖定模式'; + $lang['strislockheld'] = '是鎖定執(held)?'; + + // Prepared transactions + $lang['strpreparedxacts'] = '已準備事務交易'; + $lang['strxactid'] = '事務交易 ID'; + $lang['strgid'] = 'Global ID'; + + // Fulltext search + $lang['strfulltext'] = '全文檢索'; + $lang['strftsconfig'] = '全文檢索組態'; + $lang['strftsconfigs'] = '組態'; + $lang['strftscreateconfig'] = '新建全文檢索組態'; + $lang['strftscreatedict'] = '新建字典'; + $lang['strftscreatedicttemplate'] = '新建字典模板'; + $lang['strftscreateparser'] = '新建分析器'; + $lang['strftsnoconfigs'] = '沒有找到全文檢索組態。'; + $lang['strftsconfigdropped'] = '全文檢索組態已移除。'; + $lang['strftsconfigdroppedbad'] = '全文檢索移除失敗。'; + $lang['strconfdropftsconfig'] = '確定要移除全文檢索檢索組態 "%s" 嗎?'; + $lang['strconfdropftsdict'] = '確定要移除全文檢索字典 "%s" 嗎?'; + $lang['strconfdropftsmapping'] = '確定要將映射 "%s" 從全文檢索組態 "%s" 中移除嗎?'; + $lang['strftstemplate'] = '模板'; + $lang['strftsparser'] = '分析器'; + $lang['strftsconfigneedsname'] = '必須指定全文檢索組態名稱。'; + $lang['strftsconfigcreated'] = '全文檢索組態已創建'; + $lang['strftsconfigcreatedbad'] = '全文檢索組態創建失敗。'; + $lang['strftsmapping'] = '映射'; + $lang['strftsdicts'] = '字典'; + $lang['strftsdict'] = '字典'; + $lang['strftsemptymap'] = '空的全文檢索組態映射。'; + $lang['strftswithmap'] = '附帶映射(With map)'; + $lang['strftsmakedefault'] = '為本地化作成默認值'; + $lang['strftsconfigaltered'] = '全文檢索已修改。'; + $lang['strftsconfigalteredbad'] = '全文檢索修改失敗。'; + $lang['strftsconfigmap'] = '全文檢索組態映射'; + $lang['strftsparsers'] = '全文檢索分析器'; + $lang['strftsnoparsers'] = '無有效的全文檢索分析器。'; + $lang['strftsnodicts'] = '無有效的全文檢索字典。'; + $lang['strftsdictcreated'] = '全文檢索字典已創建'; + $lang['strftsdictcreatedbad'] = '全文檢索字典創建失敗。'; + $lang['strftslexize'] = '詞彙'; + $lang['strftsinit'] = '初始化'; + $lang['strftsoptionsvalues'] = '選項和值'; + $lang['strftsdictneedsname'] = '必須指定全文檢索字典名稱。'; + $lang['strftsdictdropped'] = '全文檢索字典已移除。'; + $lang['strftsdictdroppedbad'] = '全文檢索字典移除失敗。'; + $lang['strftsdictaltered'] = '全文檢索字典已修改。'; + $lang['strftsdictalteredbad'] = '全文檢索字典修改失敗。'; + $lang['strftsaddmapping'] = '增加映射'; + $lang['strftsspecifymappingtodrop'] = '必須最少指定一個映射來移除'; + $lang['strftsspecifyconfigtoalter'] = '必須指定一個全文檢索配置來修改'; + $lang['strftsmappingdropped'] = '全文檢索映射已刪除。'; + $lang['strftsmappingdroppedbad'] = '全文檢索映射移除失敗。'; + $lang['strftsnodictionaries'] = '查無字典。'; + $lang['strftsmappingaltered'] = '全文檢索映射已修改。'; + $lang['strftsmappingalteredbad'] = '全文檢索映射修改失敗。'; + $lang['strftsmappingadded'] = '全文檢索映射已增加。'; + $lang['strftsmappingaddedbad'] = '全文檢索映射增加失敗。'; + $lang['strftstabconfigs'] = '組態'; + $lang['strftstabdicts'] = '字典'; + $lang['strftstabparsers'] = '分析器'; + $lang['strftsaddmapping'] = '增加映射'; + $lang['strftsspecifymappingtodrop'] = '必须最少指定一个映射来移除'; + $lang['strftsspecifyconfigtoalter'] = '必须指定一个全文检索組態来修改'; + $lang['strftsmappingdropped'] = '全文检索映射已删除。'; + $lang['strftsmappingdroppedbad'] = '全文检索映射移除失败。'; + $lang['strftsnodictionaries'] = '查无字典。'; + $lang['strftsmappingaltered'] = '全文检索映射已修改。'; + $lang['strftsmappingalteredbad'] = '全文检索映射修改失败。'; + $lang['strftsmappingadded'] = '全文检索映射已增加。'; + $lang['strftsmappingaddedbad'] = '全文检索映射增加失败。'; + $lang['strftsmappingdropped'] = '全文检索映射已删除。'; + $lang['strftsmappingdroppedbad'] = '全文检索映射移除失败。'; + $lang['strftstabconfigs'] = '組態'; + $lang['strftstabdicts'] = '字典'; + $lang['strftstabparsers'] = '分析器'; +?> diff --git a/php/pgadmin/lang/convert.awk b/php/pgadmin/lang/convert.awk new file mode 100755 index 0000000..8b827b0 --- /dev/null +++ b/php/pgadmin/lang/convert.awk @@ -0,0 +1,18 @@ +#!/usr/bin/awk -f +# +# Script contains all needed conversions of recoded text +# +# Remove everything before first "" +# (as there should be only one occurance, thats no problem) +/\?\>/ { print "?>"; exit } + + { + # Convert CRLF -> LF (== "remove CR" ) ;-) + gsub(" ",""); + gsub("'","'"); + print $0 + } diff --git a/php/pgadmin/lang/czech.php b/php/pgadmin/lang/czech.php new file mode 100644 index 0000000..d7a0bb2 --- /dev/null +++ b/php/pgadmin/lang/czech.php @@ -0,0 +1,1023 @@ +'; + $lang['strfirst'] = '<< První'; + $lang['strlast'] = 'Poslední >>'; + $lang['strfailed'] = 'Nezdařilo se'; + $lang['strcreate'] = 'Vytvořit'; + $lang['strcreated'] = 'Vytvořeno'; + $lang['strcomment'] = 'Komentář'; + $lang['strlength'] = 'Délka'; + $lang['strdefault'] = 'Výchozí'; + $lang['stralter'] = 'Změnit'; + $lang['strok'] = 'OK'; + $lang['strcancel'] = 'Storno'; + $lang['strkill'] = 'Zabít'; + $lang['strac'] = 'Povolit automatické dokončení'; + $lang['strsave'] = 'Uložit'; + $lang['strreset'] = 'Resetovat'; + $lang['strrestart'] = 'Restartovat'; + $lang['strinsert'] = 'Vložit'; + $lang['strselect'] = 'Vybrat'; + $lang['strdelete'] = 'Smazat'; + $lang['strupdate'] = 'Aktualizovat'; + $lang['strreferences'] = 'Odkazy'; + $lang['stryes'] = 'Ano'; + $lang['strno'] = 'Ne'; + $lang['strtrue'] = 'PRAVDA'; + $lang['strfalse'] = 'NEPRAVDA'; + $lang['stredit'] = 'Upravit'; + $lang['strcolumn'] = 'Sloupec'; + $lang['strcolumns'] = 'Sloupce'; + $lang['strrows'] = 'řádků'; + $lang['strrowsaff'] = 'řádků změněno.'; + $lang['strobjects'] = 'objektů'; + $lang['strback'] = 'Zpět'; + $lang['strqueryresults'] = 'Výsledky dotazu'; + $lang['strshow'] = 'Zobrazit'; + $lang['strempty'] = 'Vyprázdnit'; + $lang['strlanguage'] = 'Jazyk'; + $lang['strencoding'] = 'Kódování'; + $lang['strvalue'] = 'Hodnota'; + $lang['strunique'] = 'Jedinečný'; + $lang['strprimary'] = 'Primární'; + $lang['strexport'] = 'Export'; + $lang['strimport'] = 'Import'; + $lang['strallowednulls'] = 'Povolené nulové znaky'; + $lang['strbackslashn'] = '\n'; + $lang['stremptystring'] = 'Prázdné řetězce/pole'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = 'Správa'; + $lang['strvacuum'] = 'Uklidit'; + $lang['stranalyze'] = 'Analyzovat'; + $lang['strclusterindex'] = 'Přeskupit'; + $lang['strclustered'] = 'Přeskupeno?'; + $lang['strreindex'] = 'Přeindexovat'; + $lang['strexecute'] = 'Provést'; + $lang['stradd'] = 'Přidat'; + $lang['strevent'] = 'Událost'; + $lang['strwhere'] = 'Kde'; + $lang['strinstead'] = 'Místo původního'; + $lang['strwhen'] = 'Kdy'; + $lang['strformat'] = 'Formát'; + $lang['strdata'] = 'Data'; + $lang['strconfirm'] = 'Potvrzení'; + $lang['strexpression'] = 'Výraz'; + $lang['strellipsis'] = '…'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'Rozbalit'; + $lang['strcollapse'] = 'Sbalit'; + $lang['strfind'] = 'Hledat'; + $lang['stroptions'] = 'Volby'; + $lang['strrefresh'] = 'Občerstvit'; + $lang['strdownload'] = 'Stáhnout'; + $lang['strdownloadgzipped'] = 'Stáhnout komprimované pomocí gzip'; + $lang['strinfo'] = 'Informace'; + $lang['stroids'] = 'OID'; + $lang['stradvanced'] = 'Pokročilé'; + $lang['strvariables'] = 'Proměnné'; + $lang['strprocess'] = 'Proces'; + $lang['strprocesses'] = 'Procesy'; + $lang['strsetting'] = 'Nastavení'; + $lang['streditsql'] = 'Upravit SQL'; + $lang['strruntime'] = 'Celková doba běhu: %s ms'; + $lang['strpaginate'] = 'Stránkovat výsledky'; + $lang['struploadscript'] = 'nebo nahrajte skript SQL:'; + $lang['strstarttime'] = 'Čas spuštění'; + $lang['strfile'] = 'Soubor'; + $lang['strfileimported'] = 'Soubor byl importován.'; + $lang['strtrycred'] = 'Použít tato prověření pro všechny servery'; + $lang['strconfdropcred'] = 'Odpojením se z bezpečnostních důvodů smažou vaše sdílené připojovací informace. Opravdu se chcete odpojit?'; + $lang['stractionsonmultiplelines'] = 'Akce pro víc řádků'; + $lang['strselectall'] = 'Vybrat vše'; + $lang['strunselectall'] = 'Zrušit výběr'; + $lang['strlocale'] = 'Místní nastavení'; + $lang['strcollation'] = 'Řazení'; + $lang['strctype'] = 'Typ znaku'; + $lang['strdefaultvalues'] = 'Výchozí hodnoty'; + $lang['strnewvalues'] = 'Nové hodnoty'; + $lang['strstart'] = 'Spustit'; + $lang['strstop'] = 'Zastavit'; + $lang['strgotoppage'] = 'zpět nahoru'; + $lang['strtheme'] = 'Motiv'; + + // Admin + $lang['stradminondatabase'] = 'Následující úlohy správy použít na celou databázi %s.'; + $lang['stradminontable'] = 'Následující úlohy správy použít na tabulku %s.'; + + // User-supplied SQL history + $lang['strhistory'] = 'Historie'; + $lang['strnohistory'] = 'Bez historie.'; + $lang['strclearhistory'] = 'Smazat historii'; + $lang['strdelhistory'] = 'Odebrat z historie'; + $lang['strconfdelhistory'] = 'Opravdu tento požadavek odebrat z historie?'; + $lang['strconfclearhistory'] = 'Skutečně smazat historii?'; + $lang['strnodatabaseselected'] = 'Zvolte prosím databázi.'; + + // Database sizes + $lang['strnoaccess'] = 'Bez přístupu'; + $lang['strsize'] = 'Velikost'; + $lang['strbytes'] = 'B'; + $lang['strkb'] = 'kB'; + $lang['strmb'] = 'MB'; + $lang['strgb'] = 'GB'; + $lang['strtb'] = 'TB'; + + // Error handling + $lang['strnoframes'] = 'Tato aplikace pracuje nejlépe, pokud jsou v prohlížeči povolené rámy. Může ale pracovat i bez rámů, stačí kliknout na následující odkaz.'; + $lang['strnoframeslink'] = 'Použít bez rámů'; + $lang['strbadconfig'] = 'Váš config.inc.php je zastaralý. Potřebujete jej vygenerovat znovu z nového config.inc.php-dist.'; + $lang['strnotloaded'] = 'Vaše instalace PHP nepodporuje PostgreSQL. Potřebujete znovu přeložit PHP s použitím volby --with-pgsql.'; + $lang['strpostgresqlversionnotsupported'] = 'Verze PostgreSQL není podporovaná. Přejděte prosím na verzi %s nebo novější.'; + $lang['strbadschema'] = 'Zadáno neplatné schéma.'; + $lang['strbadencoding'] = 'Nezdařilo se nastavit kódování klienta v databázi.'; + $lang['strsqlerror'] = 'Chyba SQL:'; + $lang['strinstatement'] = 'Ve výrazu:'; + $lang['strinvalidparam'] = 'Neplatné parametry skriptu.'; + $lang['strnodata'] = 'Nenalezen žádný řádek.'; + $lang['strnoobjects'] = 'Nenalezen žádný objekt.'; + $lang['strrownotunique'] = 'Pro tento řádek neexistuje jedinečný identifikátor.'; + $lang['strnoreportsdb'] = 'Nemáte vytvořenou databázi výstupních sestav. Přečtěte si soubor INSTALL s instrukcemi.'; + $lang['strnouploads'] = 'Je zakázané nahrávání souborů.'; + $lang['strimporterror'] = 'Chyba při importu.'; + $lang['strimporterror-fileformat'] = 'Chyba při importu: Nezdařilo se automaticky zjistit formát souboru.'; + $lang['strimporterrorline'] = 'Chyba při importu na řádku %s.'; + $lang['strimporterrorline-badcolumnnum'] = 'Chyba při importu na řádku %s: Řádek nemá správný počet sloupců.'; + $lang['strimporterror-uploadedfile'] = 'Chyba při importu: Soubor nelze nahrát na server'; + $lang['strcannotdumponwindows'] = 'Ve Windows není podporovaný výpis názvů komplexních tabulek a schémat.'; + $lang['strinvalidserverparam'] = 'Pokus o připojení s neplatnými parametry serveru, možná se někdo snaží neoprávněně napojit do vašeho systému.'; + $lang['strnoserversupplied'] = 'Není nabízen žádný server!'; + $lang['strbadpgdumppath'] = 'Chyba při exportu: Nezdařilo se spustit pg_dump (s cestou danou ve vašem conf/config.inc.php: %s). Opravte prosím cestu ve svém nastavení a zkuste to znovu.'; + $lang['strbadpgdumpallpath'] = 'Chyba při exportu: Nezdařilo se spustit pg_dumpall (s cestou danou ve vašem conf/config.inc.php: %s). Opravte prosím cestu ve svém nastavení a zkuste to znovu.'; + $lang['strconnectionfail'] = 'Nelze se připojit k serveru.'; + + // Tables + $lang['strtable'] = 'Tabulka'; + $lang['strtables'] = 'Tabulky'; + $lang['strshowalltables'] = 'Zobrazit všechny tabulky'; + $lang['strnotables'] = 'Nenalezeny žádné tabulky.'; + $lang['strnotable'] = 'Nenalezena žádná tabulka.'; + $lang['strcreatetable'] = 'Vytvořit tabulku'; + $lang['strcreatetablelike'] = 'Vytvořit tabulku podle'; + $lang['strcreatetablelikeparent'] = 'Zdrojová tabulka'; + $lang['strcreatelikewithdefaults'] = 'Včetně výchozích'; + $lang['strcreatelikewithconstraints'] = 'Včetně omezení'; + $lang['strcreatelikewithindexes'] = 'Včetně indexů'; + $lang['strtablename'] = 'Název tabulky'; + $lang['strtableneedsname'] = 'Musíte zadat název pro tabulku.'; + $lang['strtablelikeneedslike'] = 'Musíte zvolit, z které tabulky se budou vlastnosti kopírovat.'; + $lang['strtableneedsfield'] = 'Musíte zadat nejméně jedno pole.'; + $lang['strtableneedscols'] = 'Musíte zadat platný počet sloupců.'; + $lang['strtablecreated'] = 'Tabulka byla vytvořena.'; + $lang['strtablecreatedbad'] = 'Nezdařilo se vytvořit tabulku.'; + $lang['strconfdroptable'] = 'Opravdu chcete odstranit tabulku „%s“?'; + $lang['strtabledropped'] = 'Tabulka byla odstraněna.'; + $lang['strtabledroppedbad'] = 'Nezdařilo se odstranit tabulku.'; + $lang['strconfemptytable'] = 'Opravdu chcete vyprázdnit tabulku „%s“?'; + $lang['strtableemptied'] = 'Tabulka byla vyprázdněna.'; + $lang['strtableemptiedbad'] = 'Nezdařilo se vyprázdnit tabulku.'; + $lang['strinsertrow'] = 'Vložit řádek'; + $lang['strrowinserted'] = 'Řádek byl vložen.'; + $lang['strrowinsertedbad'] = 'Nezdařilo se vložit řádek.'; + $lang['strnofkref'] = 'Cizímu klíči %s neodpovídá žádná hodnota.'; + $lang['strrowduplicate'] = 'Nezdařilo se vložení řádku, pokus o duplicitní vložení.'; + $lang['streditrow'] = 'Upravit řádek'; + $lang['strrowupdated'] = 'Řádek byl aktualizován.'; + $lang['strrowupdatedbad'] = 'Nezdařilo se aktualizovat řádek.'; + $lang['strdeleterow'] = 'Smazat řádek'; + $lang['strconfdeleterow'] = 'Opravdu chcete smazat tento řádek?'; + $lang['strrowdeleted'] = 'Řádek byl smazán.'; + $lang['strrowdeletedbad'] = 'Nezdařilo se smazat řádek.'; + $lang['strinsertandrepeat'] = 'Vloži a opakovat'; + $lang['strnumcols'] = 'Počet sloupců'; + $lang['strcolneedsname'] = 'Musíte zadat název pro sloupec'; + $lang['strselectallfields'] = 'Vybrat všechna pole'; + $lang['strselectneedscol'] = 'Musíte zvolit alespoň jeden sloupec, který se má zobrazit.'; + $lang['strselectunary'] = 'Unární operátory nemohou mít hodnoty.'; + $lang['strcolumnaltered'] = 'Změny v sloupci byly provedeny.'; + $lang['strcolumnalteredbad'] = 'Nezdařilo se provést změny v sloupci.'; + $lang['strconfdropcolumn'] = 'Opravdu chcete odstranit sloupec „%s“ z tabulky „%s“?'; + $lang['strcolumndropped'] = 'Sloupec byl odstraněn.'; + $lang['strcolumndroppedbad'] = 'Nezdařilo se odstranit sloupec.'; + $lang['straddcolumn'] = 'Přidat sloupec'; + $lang['strcolumnadded'] = 'Sloupec byl přidán.'; + $lang['strcolumnaddedbad'] = 'Nezdařilo se přidat sloupec.'; + $lang['strcascade'] = 'Kaskádovitě'; + $lang['strtablealtered'] = 'Změny v tabulce byly provedeny.'; + $lang['strtablealteredbad'] = 'Nezdařilo se provést změny v tabulce.'; + $lang['strdataonly'] = 'Pouze data'; + $lang['strstructureonly'] = 'Pouze strukturu'; + $lang['strstructureanddata'] = 'Strukturu a data'; + $lang['strtabbed'] = 'S tabulátory'; + $lang['strauto'] = 'Automaticky'; + $lang['strconfvacuumtable'] = 'Opravdu chcete provést úklid „%s“?'; + $lang['strconfanalyzetable'] = 'Opravdu chcete analyzovat „%s“?'; + $lang['strconfreindextable'] = 'Opravdu chcete přeindexovat „%s“?'; + $lang['strconfclustertable'] = 'Opravdu chcete přeskupit "%s"?'; + $lang['strestimatedrowcount'] = 'Odhadnutý počet řádků'; + $lang['strspecifytabletoanalyze'] = 'Pokud chcete analyzovat tabulky, tak musíte nejméně jednu vybrat.'; + $lang['strspecifytabletoempty'] = 'Pokud chcete vyprázdnit tabulky, tak musíte nejméně jednu vybrat.'; + $lang['strspecifytabletodrop'] = 'Pokud chcete odstranit tabulky, tak musíte nejméně jednu vybrat.'; + $lang['strspecifytabletovacuum'] = 'Pokud chcete provést úklid tabulek, tak musíte nejméně jednu vybrat.'; + $lang['strspecifytabletoreindex'] = 'Pokud chcete přeindexovat tabulku, tak musíte nejméně jednu vybrat.'; + $lang['strspecifytabletocluster'] = 'Pokud chcete přeskupit tabulku, tak musíte nejméně jednu vybrat.'; + $lang['strnofieldsforinsert'] = 'Nemůžete vložit řádek do tabulky, která nemá žádné sloupce.'; + + // Columns + $lang['strcolprop'] = 'Vlastnosti sloupce'; + $lang['strnotableprovided'] = 'Není k dispozici žádná tabulka!'; + + // Users + $lang['struser'] = 'Uživatel'; + $lang['strusers'] = 'Uživatelé'; + $lang['strusername'] = 'Jméno uživatele'; + $lang['strpassword'] = 'Heslo'; + $lang['strsuper'] = 'Superuživatel?'; + $lang['strcreatedb'] = 'Vytvářet DB?'; + $lang['strexpires'] = 'Ztratí platnost'; + $lang['strsessiondefaults'] = 'Výchozí hodnoty sezení'; + $lang['strnousers'] = 'Nenalezeni žádní uživatelé.'; + $lang['struserupdated'] = 'Uživatel byl aktualizován'; + $lang['struserupdatedbad'] = 'Nezdařilo se aktualizovat uživatele.'; + $lang['strshowallusers'] = 'Zobrazit všechny uživatele'; + $lang['strcreateuser'] = 'Vytvořit uživatele'; + $lang['struserneedsname'] = 'Musíte zadat jméno uživatele.'; + $lang['strusercreated'] = 'Uživatel byl vytvořen.'; + $lang['strusercreatedbad'] = 'Nezdařilo se vytvořit uživatele.'; + $lang['strconfdropuser'] = 'Opravdu chcete odstranit uživatele „%s“?'; + $lang['struserdropped'] = 'Uživatel byl odstraněn.'; + $lang['struserdroppedbad'] = 'Nezdařilo se odstranit uživatele.'; + $lang['straccount'] = 'Účet'; + $lang['strchangepassword'] = 'Změnit heslo'; + $lang['strpasswordchanged'] = 'Heslo bylo změněno.'; + $lang['strpasswordchangedbad'] = 'Nezdařilo se změnit heslo.'; + $lang['strpasswordshort'] = 'Heslo je příliš krátké.'; + $lang['strpasswordconfirm'] = 'Heslo a jeho potvrzení nejsou shodné.'; + + // Groups + $lang['strgroup'] = 'Skupina'; + $lang['strgroups'] = 'Skupiny'; + $lang['strshowallgroups'] = 'Zobrazit všechny skupiny'; + $lang['strnogroup'] = 'Skupina nebyla nalezena.'; + $lang['strnogroups'] = 'Nebyly nalezeny žádné skupiny.'; + $lang['strcreategroup'] = 'Vytvořit skupinu'; + $lang['strgroupneedsname'] = 'Musíte zadat název pro skupinu.'; + $lang['strgroupcreated'] = 'Skupina byly vytvořena.'; + $lang['strgroupcreatedbad'] = 'Nezdařilo se vytvořit skupinu.'; + $lang['strconfdropgroup'] = 'Opravdu chcete odstranit skupinu „%s“?'; + $lang['strgroupdropped'] = 'Skupiny byla odstraněna.'; + $lang['strgroupdroppedbad'] = 'Nezdařilo se odstranit skupinu.'; + $lang['strmembers'] = 'Členové'; + $lang['strmemberof'] = 'Členem v'; + $lang['stradminmembers'] = 'Členové správci'; + $lang['straddmember'] = 'Přidat člena'; + $lang['strmemberadded'] = 'Člen byl přidán.'; + $lang['strmemberaddedbad'] = 'Nezdařilo se přidat člena.'; + $lang['strdropmember'] = 'Odebrat člena'; + $lang['strconfdropmember'] = 'Opravdu chcete odebrat člena „%s“ ze skupiny „%s“?'; + $lang['strmemberdropped'] = 'Člen byl odebrán.'; + $lang['strmemberdroppedbad'] = 'Nezdařilo se odebrat člena.'; + + // Roles + $lang['strrole'] = 'Role'; + $lang['strroles'] = 'Role'; + $lang['strshowallroles'] = 'Zobrazit všechny role'; + $lang['strnoroles'] = 'Nenalezena žádná role.'; + $lang['strinheritsprivs'] = 'Dědit oprávnění?'; + $lang['strcreaterole'] = 'Vytvořit roli'; + $lang['strcancreaterole'] = 'Vytvářet role?'; + $lang['strrolecreated'] = 'Role byl vytvořena.'; + $lang['strrolecreatedbad'] = 'Nezdařilo se vytvořit roli.'; + $lang['strrolealtered'] = 'Změny v roli byly provedeny.'; + $lang['strrolealteredbad'] = 'Nezdařilo se provést změny v roli.'; + $lang['strcanlogin'] = 'Přihlašovat se?'; + $lang['strconnlimit'] = 'Omezení připojení'; + $lang['strdroprole'] = 'Odstranit roli'; + $lang['strconfdroprole'] = 'Opravdu chcete odstranit roli „%s“?'; + $lang['strroledropped'] = 'Role byla odstraněna.'; + $lang['strroledroppedbad'] = 'Nezdařilo se odstranit roli.'; + $lang['strnolimit'] = 'Bez omezení'; + $lang['strnever'] = 'Nikdy'; + $lang['strroleneedsname'] = 'Musíte zadat název pro roli.'; + + // Privileges + $lang['strprivilege'] = 'Oprávnění'; + $lang['strprivileges'] = 'Oprávnění'; + $lang['strnoprivileges'] = 'Tento objekt má oprávnění výchozího vlastníka.'; + $lang['strgrant'] = 'Přidělit'; + $lang['strrevoke'] = 'Odepřít'; + $lang['strgranted'] = 'Oprávnění byla změněna.'; + $lang['strgrantfailed'] = 'Nezdařilo se změnit oprávnění.'; + $lang['strgrantbad'] = 'Musíte zvolit nejméně jednoho uživatele nebo skupinu a nejméně jedno oprávnění.'; + $lang['strgrantor'] = 'Přidělil'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'Databáze'; + $lang['strdatabases'] = 'Databáze'; + $lang['strshowalldatabases'] = 'Zobrazit všechny databáze'; + $lang['strnodatabases'] = 'Žádné databáze nenalezeny.'; + $lang['strcreatedatabase'] = 'Vytvořit databázi'; + $lang['strdatabasename'] = 'Název databáze'; + $lang['strdatabaseneedsname'] = 'Musíte zadat název pro databázi.'; + $lang['strdatabasecreated'] = 'Databáze byla vytvořena.'; + $lang['strdatabasecreatedbad'] = 'Nezdařilo se vytvořit databázi.'; + $lang['strconfdropdatabase'] = 'Opravdu chcete odstranit databázi „%s“?'; + $lang['strdatabasedropped'] = 'Databáze byla odstraněna.'; + $lang['strdatabasedroppedbad'] = 'Nezdařilo se odstranit databázi.'; + $lang['strentersql'] = 'Zadejte dotaz SQL, který chcete provést:'; + $lang['strsqlexecuted'] = 'Dotaz SQL byl proveden.'; + $lang['strvacuumgood'] = 'Úklid byl dokončen.'; + $lang['strvacuumbad'] = 'Úklid se nezdařil.'; + $lang['stranalyzegood'] = 'Analýza byla dokončena.'; + $lang['stranalyzebad'] = 'Analýza se nezdařila.'; + $lang['strreindexgood'] = 'Přeindexace byla dokončena.'; + $lang['strreindexbad'] = 'Přeindexace se nezdařila.'; + $lang['strfull'] = 'Úplný'; + $lang['strfreeze'] = 'Zmrazit'; + $lang['strforce'] = 'Vynutit'; + $lang['strsignalsent'] = 'Signál byl odeslán.'; + $lang['strsignalsentbad'] = 'Signál se nezdařilo odeslat.'; + $lang['strallobjects'] = 'Všechny objekty'; + $lang['strdatabasealtered'] = 'Změny v databázi byly provedeny.'; + $lang['strdatabasealteredbad'] = 'Nezdařilo se provést změny v databázi.'; + $lang['strspecifydatabasetodrop'] = 'Pokud chcete odstranit databáze, tak musíte nejméně jednu vybrat.'; + $lang['strtemplatedb'] = 'Šablona'; + $lang['strconfanalyzedatabase'] = 'Opravdu chcete analyzovat všechny tabulky v databázi „%s“?'; + $lang['strconfvacuumdatabase'] = 'Opravdu chcete uklidit všechny tabulky v databázi „%s“?'; + $lang['strconfreindexdatabase'] = 'Opravdu chcete přeindexovat všechny tabulky v databázi „%s“?'; + $lang['strconfclusterdatabase'] = 'Opravdu chcete přeskupit všechny tabulky v databázi „%s“?'; + + // Views + $lang['strview'] = 'Pohled'; + $lang['strviews'] = 'Pohledy'; + $lang['strshowallviews'] = 'Zobrazit všechny pohledy'; + $lang['strnoview'] = 'Nenalezen žádný pohled.'; + $lang['strnoviews'] = 'Nenalezeny žádné pohledy.'; + $lang['strcreateview'] = 'Vytvořit pohled'; + $lang['strviewname'] = 'Název pohledu'; + $lang['strviewneedsname'] = 'Musíte zadat název pro pohled.'; + $lang['strviewneedsdef'] = 'Musíte zadat definici pro pohled.'; + $lang['strviewneedsfields'] = 'Musíte zvolit, které sloupce chcete v pohledu mít.'; + $lang['strviewcreated'] = 'Pohled vytvořen.'; + $lang['strviewcreatedbad'] = 'Pohled se nezdařilo vytvořit.'; + $lang['strconfdropview'] = 'Opravdu chcete odstranit pohled „%s“?'; + $lang['strviewdropped'] = 'Pohled byl odstraněn.'; + $lang['strviewdroppedbad'] = 'Pohled se nezdařilo odstranit.'; + $lang['strviewupdated'] = 'Pohled byl aktualizován.'; + $lang['strviewupdatedbad'] = 'Pohled se nezdařilo aktualizovat.'; + $lang['strviewlink'] = 'Propojovací klíče'; + $lang['strviewconditions'] = 'Doplňující podmínky'; + $lang['strcreateviewwiz'] = 'Vytvořit pohled pomocí průvodce'; + $lang['strrenamedupfields'] = 'Duplicitní pole přejmenovat'; + $lang['strdropdupfields'] = 'Duplicitní pole odstranit'; + $lang['strerrordupfields'] = 'V případě duplicitních polí ohlásit chybu'; + $lang['strviewaltered'] = 'Změny v pohledu byly provedeny.'; + $lang['strviewalteredbad'] = 'Nezdařilo se provést změny v pohledu.'; + $lang['strspecifyviewtodrop'] = 'Pokud chcete odstranit pohledy, tak musíte nejméně jeden vybrat.'; + + // Sequences + $lang['strsequence'] = 'Sekvence'; + $lang['strsequences'] = 'Sekvence'; + $lang['strshowallsequences'] = 'Zobrazit všechny sekvence'; + $lang['strnosequence'] = 'Nenalezena žádná sekvence.'; + $lang['strnosequences'] = 'Nenalezeny žádné sekvence.'; + $lang['strcreatesequence'] = 'Vytvořit sekvenci'; + $lang['strlastvalue'] = 'Poslední hodnota'; + $lang['strincrementby'] = 'Přírůstek'; + $lang['strstartvalue'] = 'Počáteční hodnota'; + $lang['strrestartvalue'] = 'Nová počáteční hodnota'; + $lang['strmaxvalue'] = 'Max. hodnota'; + $lang['strminvalue'] = 'Min. hodnota'; + $lang['strcachevalue'] = 'Připraveno dopředu'; + $lang['strlogcount'] = 'Dostupných hodnot bez zápisu (log_cnt)'; + $lang['strcancycle'] = 'Cyklicky?'; + $lang['striscalled'] = 'Zvýšit před vrácením následující (is_called)?'; + $lang['strsequenceneedsname'] = 'Musíte zadat název pro sekvenci.'; + $lang['strsequencecreated'] = 'Sekvence byla vytvořena.'; + $lang['strsequencecreatedbad'] = 'Nezdařilo se vytvořit sekvenci.'; + $lang['strconfdropsequence'] = 'Opravdu chcete odstranit sekvenci „%s“?'; + $lang['strsequencedropped'] = 'Sekvence byla odstraněna.'; + $lang['strsequencedroppedbad'] = 'Nezdařilo se odstranit sekvenci.'; + $lang['strsequencerestart'] = 'Sekvence nastavena na novou počáteční hodnotu.'; + $lang['strsequencerestartbad'] = 'Nezdařilo se nastavit novou počáteční hodnotu sekvence.'; + $lang['strsequencereset'] = 'Sekvence byla nastavena na počáteční hodnotu.'; + $lang['strsequenceresetbad'] = 'Nezdařilo se nastavit počáteční hodnotu sekvence.'; + $lang['strsequencealtered'] = 'Změny v sekvenci byly provedeny.'; + $lang['strsequencealteredbad'] = 'Nezdařilo se provést změny v sekvenci.'; + $lang['strsetval'] = 'Nastavit hodnotu'; + $lang['strsequencesetval'] = 'Hodnota sekvence byla nastavena.'; + $lang['strsequencesetvalbad'] = 'Nezdařilo se změnit hodnotu sekvence.'; + $lang['strnextval'] = 'Zvýšit hodnotu'; + $lang['strsequencenextval'] = 'Hodnota sekvence byla zvýšena.'; + $lang['strsequencenextvalbad'] = 'Nezdařilo se zvýšit hodnotu sekvence.'; + $lang['strspecifysequencetodrop'] = 'Pokud chcete odstranit sekvence, tak musíte nejméně jednu vybrat.'; + + // Indexes + $lang['strindex'] = 'Index'; + $lang['strindexes'] = 'Indexy'; + $lang['strindexname'] = 'Název indexu'; + $lang['strshowallindexes'] = 'Zobrazit všechny indexy'; + $lang['strnoindex'] = 'Nenalezen žádný index.'; + $lang['strnoindexes'] = 'Nenalezeny žádné indexy.'; + $lang['strcreateindex'] = 'Vytvořit index'; + $lang['strtabname'] = 'Název tabulky'; + $lang['strcolumnname'] = 'Název sloupce'; + $lang['strindexneedsname'] = 'Musíte zadat název pro index.'; + $lang['strindexneedscols'] = 'Index musí obsahovat nejméně jeden sloupec.'; + $lang['strindexcreated'] = 'Index byl vytvořen.'; + $lang['strindexcreatedbad'] = 'Nezdařilo se vytvořit index.'; + $lang['strconfdropindex'] = 'Opravdu chcete odstranit index „%s“?'; + $lang['strindexdropped'] = 'Index byl odstraněn.'; + $lang['strindexdroppedbad'] = 'Nezdařilo se odstranit index.'; + $lang['strkeyname'] = 'Název klíče'; + $lang['struniquekey'] = 'Jedinečný klíč'; + $lang['strprimarykey'] = 'Primární klíč'; + $lang['strindextype'] = 'Typ indexu'; + $lang['strtablecolumnlist'] = 'Sloupce v tabulce'; + $lang['strindexcolumnlist'] = 'Sloupce v indexu'; + $lang['strclusteredgood'] = 'Přeskupení dokončeno.'; + $lang['strclusteredbad'] = 'Přeskupení se nezdařilo.'; + $lang['strconcurrently'] = 'Souběžně'; + $lang['strnoclusteravailable'] = 'Tabulka není přeskupena podle indexu.'; + + // Rules + $lang['strrules'] = 'Pravidla'; + $lang['strrule'] = 'Pravidlo'; + $lang['strshowallrules'] = 'Zobrazit všechna pravidla'; + $lang['strnorule'] = 'Nenalezeno žádné pravidlo.'; + $lang['strnorules'] = 'Nenalezena žádná pravidla.'; + $lang['strcreaterule'] = 'Vytvořit pravidlo'; + $lang['strrulename'] = 'Název pravidla'; + $lang['strruleneedsname'] = 'Musíte zadat název pro pravidlo.'; + $lang['strrulecreated'] = 'Pravidlo bylo vytvořeno.'; + $lang['strrulecreatedbad'] = 'Nezdařilo se vytvořit pravidlo.'; + $lang['strconfdroprule'] = 'Opravdu chcete odstranit pravidlo „%s“ na „%s“?'; + $lang['strruledropped'] = 'Pravidlo bylo odstraněno.'; + $lang['strruledroppedbad'] = 'Nezdařilo se odstranit pravidlo.'; + + // Constraints + $lang['strconstraint'] = 'Omezení'; + $lang['strconstraints'] = 'Omezení'; + $lang['strshowallconstraints'] = 'Zobrazit všechna omezení'; + $lang['strnoconstraints'] = 'Nenalezena žádná omezení.'; + $lang['strcreateconstraint'] = 'Vytvořit omezení'; + $lang['strconstraintcreated'] = 'Omezení bylo vytvořeno.'; + $lang['strconstraintcreatedbad'] = 'Nezdařilo se vytvořit omezení.'; + $lang['strconfdropconstraint'] = 'Opravdu chcete odstranit omezení „%s“ na „%s“?'; + $lang['strconstraintdropped'] = 'Omezení bylo odstraněno.'; + $lang['strconstraintdroppedbad'] = 'Nezdařilo se odstranit omezení.'; + $lang['straddcheck'] = 'Přidat kontrolu'; + $lang['strcheckneedsdefinition'] = 'Musíte zadat definici kontroly.'; + $lang['strcheckadded'] = 'Kontrola byla přidána.'; + $lang['strcheckaddedbad'] = 'Nezdařilo se přidat kontrolu.'; + $lang['straddpk'] = 'Přidat primární klíč'; + $lang['strpkneedscols'] = 'Primární klíč musí obsahovat nejméně jeden sloupec.'; + $lang['strpkadded'] = 'Primární klíč byl přidán.'; + $lang['strpkaddedbad'] = 'Nezdařilo se přidat primární klíč.'; + $lang['stradduniq'] = 'Přidat jedinečný klíč'; + $lang['struniqneedscols'] = 'Jedinečný klíč musí obsahovat nejméně jeden sloupec.'; + $lang['struniqadded'] = 'Jedinečný klíč byl přidán.'; + $lang['struniqaddedbad'] = 'Nezdařilo se přidat jedinečný klíč.'; + $lang['straddfk'] = 'Přidat cizí klíč'; + $lang['strfkneedscols'] = 'Cizí klíč musí obsahovat nejméně jeden sloupec.'; + $lang['strfkneedstarget'] = 'Musíte zadat cílovou tabulku, na kterou se cizí klíč odkazuje.'; + $lang['strfkadded'] = 'Cizí klíč byl přidán.'; + $lang['strfkaddedbad'] = 'Nezdařilo se přidat cizí klíč.'; + $lang['strfktarget'] = 'Cílová tabulka'; + $lang['strfkcolumnlist'] = 'Sloupce v klíči'; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + + // Functions + $lang['strfunction'] = 'Funkce'; + $lang['strfunctions'] = 'Funkce'; + $lang['strshowallfunctions'] = 'Zobrazit všechny funkce'; + $lang['strnofunction'] = 'Nenalezena žádná funkce.'; + $lang['strnofunctions'] = 'Nenalezeny žádné funkce.'; + $lang['strcreateplfunction'] = 'Vytvořit funkci SQL/PL'; + $lang['strcreateinternalfunction'] = 'Vytvořit interní funkci'; + $lang['strcreatecfunction'] = 'Vytvořit funkci C'; + $lang['strfunctionname'] = 'Název funkce'; + $lang['strreturns'] = 'Vrací'; + $lang['strproglanguage'] = 'Programovací jazyk'; + $lang['strfunctionneedsname'] = 'Musíte zadat název pro funkci.'; + $lang['strfunctionneedsdef'] = 'Musíte zadat definici pro funkci.'; + $lang['strfunctioncreated'] = 'Funkce byl vytvořena.'; + $lang['strfunctioncreatedbad'] = 'Nezdařilo se vytvořit funkci.'; + $lang['strconfdropfunction'] = 'Opravdu chcete odstranit funkci „%s“?'; + $lang['strfunctiondropped'] = 'Funkce byla odstraněna.'; + $lang['strfunctiondroppedbad'] = 'Nezdařilo se odstranit funkci.'; + $lang['strfunctionupdated'] = 'Funkce byla aktualizována.'; + $lang['strfunctionupdatedbad'] = 'Nezdařilo se aktualizovat funkci.'; + $lang['strobjectfile'] = 'Soubor s objektem'; + $lang['strlinksymbol'] = 'Napojený symbol'; + $lang['strarguments'] = 'Argumenty'; + $lang['strargmode'] = 'Režim'; + $lang['strargtype'] = 'Typ'; + $lang['strargadd'] = 'Přidat další argument'; + $lang['strargremove'] = 'Odebrat tento argument'; + $lang['strargnoargs'] = 'Tato funkce nepřebírá žádné argumenty.'; + $lang['strargenableargs'] = 'Povolit argumentům průchod do této funkce.'; + $lang['strargnorowabove'] = 'Nad tímto řádkem již žádný není.'; + $lang['strargnorowbelow'] = 'Pod tímto řádkem již žádný není.'; + $lang['strargraise'] = 'Přesunout výše.'; + $lang['strarglower'] = 'Přesunout níže.'; + $lang['strargremoveconfirm'] = 'Opravdu chcete odebrat tento argument? Operaci nelze vrátit zpět.'; + $lang['strfunctioncosting'] = 'Cena funkcí'; + $lang['strresultrows'] = 'Počet řádků'; + $lang['strexecutioncost'] = 'Cena provádění'; + $lang['strspecifyfunctiontodrop'] = 'Pokud chcete odstranit funkce, tak musíte nejméně jednu vybrat.'; + + // Triggers + $lang['strtrigger'] = 'Trigger'; + $lang['strtriggers'] = 'Triggery'; + $lang['strshowalltriggers'] = 'Zobrazit všechny triggery'; + $lang['strnotrigger'] = 'Nenalezen žádný trigger.'; + $lang['strnotriggers'] = 'Nenalezeny žádné triggery.'; + $lang['strcreatetrigger'] = 'Vytvořit trigger'; + $lang['strtriggerneedsname'] = 'Musíte zadat název pro trigger.'; + $lang['strtriggerneedsfunc'] = 'Musíte zvolit funkci pro trigger.'; + $lang['strtriggercreated'] = 'Trigger byl vytvořen.'; + $lang['strtriggercreatedbad'] = 'Nezdařilo se vytvořit trigger.'; + $lang['strconfdroptrigger'] = 'Opravdu chcete odstranit trigger „%s“ v „%s“?'; + $lang['strconfenabletrigger'] = 'Opravdu chcete povolit trigger „%s“ v „%s“?'; + $lang['strconfdisabletrigger'] = 'Opravdu chcete zakázat trigger „%s“ v „%s“?'; + $lang['strtriggerdropped'] = 'Trigger byl odstraněn.'; + $lang['strtriggerdroppedbad'] = 'Nezdařilo se odstranit trigger.'; + $lang['strtriggerenabled'] = 'Trigger byl povolen.'; + $lang['strtriggerenabledbad'] = 'Nezdařilo se povolit trigger.'; + $lang['strtriggerdisabled'] = 'Trigger byl zakázán.'; + $lang['strtriggerdisabledbad'] = 'Nezdařilo se zakázat trigger.'; + $lang['strtriggeraltered'] = 'Změny v triggeru byly provedeny.'; + $lang['strtriggeralteredbad'] = 'Nezdařilo se provést změny v triggeru.'; + $lang['strforeach'] = 'Pro každý'; + + // Types + $lang['strtype'] = 'Typ'; + $lang['strtypes'] = 'Typy'; + $lang['strshowalltypes'] = 'Zobrazit všechny typy'; + $lang['strnotype'] = 'Nenalezen žádný typ.'; + $lang['strnotypes'] = 'Nenalezeny žádné typy.'; + $lang['strcreatetype'] = 'Vytvořit externí typ'; + $lang['strcreatecomptype'] = 'Vytvořit složený typ'; + $lang['strcreateenumtype'] = 'Vytvořit výčtový typ'; + $lang['strtypeneedsfield'] = 'Musíte zadat nejméně jedno pole.'; + $lang['strtypeneedsvalue'] = 'Musíte zadat nejméně jednu hodnotu.'; + $lang['strtypeneedscols'] = 'Musíte zadat platný počet polí.'; + $lang['strtypeneedsvals'] = 'Musíte zadat platný počet hodnot.'; + $lang['strinputfn'] = 'Vstupní funkce'; + $lang['stroutputfn'] = 'Výstupní funkce'; + $lang['strpassbyval'] = 'Předávaný hodnotou?'; + $lang['stralignment'] = 'Zarovnání'; + $lang['strelement'] = 'Prvek'; + $lang['strdelimiter'] = 'Oddělovač'; + $lang['strstorage'] = 'Uložení'; + $lang['strfield'] = 'Pole'; + $lang['strnumfields'] = 'Počet polí'; + $lang['strnumvalues'] = 'Počet hodnot'; + $lang['strtypeneedsname'] = 'Musíte zadat název pro typ.'; + $lang['strtypeneedslen'] = 'Musíte zadat délku pro typ.'; + $lang['strtypecreated'] = 'Typ byl vytvořen.'; + $lang['strtypecreatedbad'] = 'Nezdařilo se vytvořit typ.'; + $lang['strconfdroptype'] = 'Opravdu chcete odstranit typ „%s“?'; + $lang['strtypedropped'] = 'Typ byl odstraněn.'; + $lang['strtypedroppedbad'] = 'Nezdařilo se odstranit typ.'; + $lang['strflavor'] = 'Druh'; + $lang['strbasetype'] = 'Základní'; + $lang['strcompositetype'] = 'Složený'; + $lang['strpseudotype'] = 'Pseudo'; + $lang['strenum'] = 'Výčtový'; + $lang['strenumvalues'] = 'Výčtové hodnoty'; + + // Schemas + $lang['strschema'] = 'Schéma'; + $lang['strschemas'] = 'Schémata'; + $lang['strshowallschemas'] = 'Zobrazit všechna schémata'; + $lang['strnoschema'] = 'Nebylo nalezeno žádné schéma.'; + $lang['strnoschemas'] = 'Nebyla nalezena žádná schémata.'; + $lang['strcreateschema'] = 'Vytvořit schéma'; + $lang['strschemaname'] = 'Název schématu'; + $lang['strschemaneedsname'] = 'Musíte zadat název pro schéma.'; + $lang['strschemacreated'] = 'Schéma bylo vytvořeno.'; + $lang['strschemacreatedbad'] = 'Nezdařilo se vytvořit schéma.'; + $lang['strconfdropschema'] = 'Opravdu chcete odstranit schéma „%s“?'; + $lang['strschemadropped'] = 'Schéma bylo odstraněno.'; + $lang['strschemadroppedbad'] = 'Nezdařilo se odstranit schéma.'; + $lang['strschemaaltered'] = 'Změny ve schématu byly provedeny.'; + $lang['strschemaalteredbad'] = 'Nezdařilo se provést změny ve schématu.'; + $lang['strsearchpath'] = 'Prohledávaná schémata'; + $lang['strspecifyschematodrop'] = 'Pokud chcete odstranit schémata, tak musíte nejméně jedno vybrat.'; + + // Reports + $lang['strreport'] = 'Výstupní sestava'; + $lang['strreports'] = 'Výstupní sestavy'; + $lang['strshowallreports'] = 'Zobrazit všechny výstupní sestavy'; + $lang['strnoreports'] = 'Nebyly nalezeny žádné výstupní sestava.'; + $lang['strcreatereport'] = 'Vytvořit výstupní sestavu'; + $lang['strreportdropped'] = 'Výstupní sestava byla odstraněna.'; + $lang['strreportdroppedbad'] = 'Nezdařilo se odstranit výstupní sestavu.'; + $lang['strconfdropreport'] = 'Opravdu chcete odstranit výstupní sestavu „%s“?'; + $lang['strreportneedsname'] = 'Musíte zadat název pro výstupní sestavu.'; + $lang['strreportneedsdef'] = 'Musíte zadat dotaz SQL pro výstupní sestavu.'; + $lang['strreportcreated'] = 'Výstupní sestava byla uložena.'; + $lang['strreportcreatedbad'] = 'Nezdařilo se uložit výstupní sestavu.'; + + // Domains + $lang['strdomain'] = 'Doména'; + $lang['strdomains'] = 'Domény'; + $lang['strshowalldomains'] = 'Zobrazit všechny domény'; + $lang['strnodomains'] = 'Nebyly nalezeny žádné domény.'; + $lang['strcreatedomain'] = 'Vytvořit doménu'; + $lang['strdomaindropped'] = 'Doména byla odstraněna.'; + $lang['strdomaindroppedbad'] = 'Nezdařilo se odstranit doménu.'; + $lang['strconfdropdomain'] = 'Opravdu chcete odstranit doménu „%s“?'; + $lang['strdomainneedsname'] = 'Musíte zadat název pro doménu.'; + $lang['strdomaincreated'] = 'Doména byla vytvořena.'; + $lang['strdomaincreatedbad'] = 'Nezdařilo se vytvořit doménu.'; + $lang['strdomainaltered'] = 'Změny v doméně byly provedeny.'; + $lang['strdomainalteredbad'] = 'Nezdařilo se provést změny v doméně.'; + + // Operators + $lang['stroperator'] = 'Operátor'; + $lang['stroperators'] = 'Operátory'; + $lang['strshowalloperators'] = 'Zobrazit všechny operátory'; + $lang['strnooperator'] = 'Nebyl nalezen žádný operátor.'; + $lang['strnooperators'] = 'Nebyly nalezeny žádné operátory.'; + $lang['strcreateoperator'] = 'Vytvořit operátor'; + $lang['strleftarg'] = 'Levý operand'; + $lang['strrightarg'] = 'Pravý operand'; + $lang['strcommutator'] = 'Komutátor'; + $lang['strnegator'] = 'Negátor'; + $lang['strrestrict'] = 'Omezení'; + $lang['strjoin'] = 'Propojení'; + $lang['strhashes'] = 'Heše'; + $lang['strmerges'] = 'Slučování'; + $lang['strleftsort'] = 'Levé řazení'; + $lang['strrightsort'] = 'Pravé řazení'; + $lang['strlessthan'] = 'Operátor <'; + $lang['strgreaterthan'] = 'Operátor >'; + $lang['stroperatorneedsname'] = 'Musíte zadat název pro operátor.'; + $lang['stroperatorcreated'] = 'Operátor byl vytvořen.'; + $lang['stroperatorcreatedbad'] = 'Nezdařilo se vytvořit operátor.'; + $lang['strconfdropoperator'] = 'Opravdu chcete odstranit operátor „%s“?'; + $lang['stroperatordropped'] = 'Operátor byl odstraněn.'; + $lang['stroperatordroppedbad'] = 'Nezdařilo se odstranit operátor.'; + + // Casts + $lang['strcasts'] = 'Přetypování'; + $lang['strnocasts'] = 'Nenalezena žádná přetypování.'; + $lang['strsourcetype'] = 'Zdrojový typ'; + $lang['strtargettype'] = 'Cílový typ'; + $lang['strimplicit'] = 'Implicitní'; + $lang['strinassignment'] = 'V přiřazení'; + $lang['strbinarycompat'] = '(Binárně zaměnitelné)'; + + // Conversions + $lang['strconversions'] = 'Konverze'; + $lang['strnoconversions'] = 'Nenalezeny žádné konverze.'; + $lang['strsourceencoding'] = 'Zdrojové kódování'; + $lang['strtargetencoding'] = 'Cílové kódování'; + + // Languages + $lang['strlanguages'] = 'Jazyky'; + $lang['strnolanguages'] = 'Nenalezeny žádné jazyky.'; + $lang['strtrusted'] = 'Důvěryhodný'; + + // Info + $lang['strnoinfo'] = 'Nejsou dostupné žádné informace.'; + $lang['strreferringtables'] = 'Odkazující tabulky'; + $lang['strparenttables'] = 'Rodičovské tabulky'; + $lang['strchildtables'] = 'Dceřiné tabulky'; + + // Aggregates + $lang['straggregate'] = 'Agregační funkce'; + $lang['straggregates'] = 'Agregační funkce'; + $lang['strnoaggregates'] = 'Nebyly nalezeny žádné agregační funkce.'; + $lang['stralltypes'] = '(Všechny typy)'; + $lang['strcreateaggregate'] = 'Vytvořit agregační funkci'; + $lang['straggrbasetype'] = 'Typ vstupních dat'; + $lang['straggrsfunc'] = 'Funkce stavového přechodu'; + $lang['straggrstype'] = 'Datový typ stavové hodnoty'; + $lang['straggrffunc'] = 'Finální funkce'; + $lang['straggrinitcond'] = 'Počáteční podmínka'; + $lang['straggrsortop'] = 'Operátor řazení'; + $lang['strconfdropaggregate'] = 'Opravdu chcete odstranit agregační funkci „%s“?'; + $lang['straggregatedropped'] = 'Agregační funkce byla odstraněna.'; + $lang['straggregatedroppedbad'] = 'Nezdařilo se odstranit agregační funkci.'; + $lang['straggraltered'] = 'Změny v agregační funkci byly provedeny.'; + $lang['straggralteredbad'] = 'Nezdařilo se provést změny v agregační funkci.'; + $lang['straggrneedsname'] = 'Musíte zadat název pro agregační funkci.'; + $lang['straggrneedsbasetype'] = 'Musíte zadat typ vstupních dat pro agregační funkci.'; + $lang['straggrneedssfunc'] = 'Musíte zadat název funkce stavového přechodu pro agregační funkci.'; + $lang['straggrneedsstype'] = 'Musíte zadat datový typ stavové hodnoty pro agregační funkci.'; + $lang['straggrcreated'] = 'Agregační funkce byla vytvořena.'; + $lang['straggrcreatedbad'] = 'Nezdařilo se vytvořit agregační funkci.'; + $lang['straggrshowall'] = 'Zobrazit všechny agregační funkce'; + + // Operator Classes + $lang['stropclasses'] = 'Třídy operátorů'; + $lang['strnoopclasses'] = 'Nebely nalezeny žádné třídy operátorů.'; + $lang['straccessmethod'] = 'Metoda přístupu'; + + // Stats and performance + $lang['strrowperf'] = 'Souhrn řádkových operací'; + $lang['strioperf'] = 'Souhrn V/V operací'; + $lang['stridxrowperf'] = 'Souhrn Indexových řádkových operací'; + $lang['stridxioperf'] = 'Souhrn Indexových V/V operací'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Sekvenčně'; + $lang['strscan'] = 'Prohledáno'; + $lang['strread'] = 'Čteno'; + $lang['strfetch'] = 'Načteno'; + $lang['strheap'] = 'Hromada'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST Index'; + $lang['strcache'] = 'Mezipaměť'; + $lang['strdisk'] = 'Disk'; + $lang['strrows2'] = 'Řádků'; + + // Tablespaces + $lang['strtablespace'] = 'Prostor tabulek'; + $lang['strtablespaces'] = 'Prostory tabulek'; + $lang['strshowalltablespaces'] = 'Zobrazit všechny prostory tabulek'; + $lang['strnotablespaces'] = 'Nebyly nalezeny žádné prostory tabulek.'; + $lang['strcreatetablespace'] = 'Vytvořit prostor tabulek'; + $lang['strlocation'] = 'Umístění'; + $lang['strtablespaceneedsname'] = 'Musíte zadat název pro prostor tabulek.'; + $lang['strtablespaceneedsloc'] = 'Musíte zadat složku, ve které se má prostor tabulek vytvořit.'; + $lang['strtablespacecreated'] = 'Prostor tabulek byl vytvořen.'; + $lang['strtablespacecreatedbad'] = 'Nezdařilo se vytvořit prostor tabulek.'; + $lang['strconfdroptablespace'] = 'Opravdu chcete odstranit prostor tabulek „%s“?'; + $lang['strtablespacedropped'] = 'Prostor tabulek byl odstraněn.'; + $lang['strtablespacedroppedbad'] = 'Nezdařilo se odstranit prostor tabulek.'; + $lang['strtablespacealtered'] = 'Změny v prostoru tabulek byly provedeny.'; + $lang['strtablespacealteredbad'] = 'Nezdařilo se provést změny v prostoru tabulek.'; + + // Slony clusters + $lang['strcluster'] = 'Klastr'; + $lang['strnoclusters'] = 'Nebyly nalezeny žádné klastry.'; + $lang['strconfdropcluster'] = 'Opravdu chcete odstranit klastr „%s“?'; + $lang['strclusterdropped'] = 'Klastr byl odstraněn.'; + $lang['strclusterdroppedbad'] = 'Nezdařilo se odstranit klastr.'; + $lang['strinitcluster'] = 'Inicializovat klastr'; + $lang['strclustercreated'] = 'Klastr byl inicializován.'; + $lang['strclustercreatedbad'] = 'Nezdařilo se inicializovat klastr.'; + $lang['strclusterneedsname'] = 'Musíte zadat název pro klastr.'; + $lang['strclusterneedsnodeid'] = 'Musíte zadat ID pro lokální uzel.'; + + // Slony nodes + $lang['strnodes'] = 'Uzly'; + $lang['strnonodes'] = 'Nenalezeny žádné uzly.'; + $lang['strcreatenode'] = 'Vytvořit uzel'; + $lang['strid'] = 'ID'; + $lang['stractive'] = 'Aktivní'; + $lang['strnodecreated'] = 'Uzel byl vytvořen.'; + $lang['strnodecreatedbad'] = 'Nezdařilo se vytvořit uzel.'; + $lang['strconfdropnode'] = 'Opravdu chcete odstranit uzel „%s“?'; + $lang['strnodedropped'] = 'Uzel byl odstraněn.'; + $lang['strnodedroppedbad'] = 'Nezdařilo se odstranit uzel.'; + $lang['strfailover'] = 'Překlenout výpadek'; + $lang['strnodefailedover'] = 'Uzel překlenul výpadek.'; + $lang['strnodefailedoverbad'] = 'Uzlu se nezdařilo překlenout výpadek.'; + $lang['strstatus'] = 'Stav'; + $lang['strhealthy'] = 'V pořádku'; + $lang['stroutofsync'] = 'Nesladěno'; + $lang['strunknown'] = 'Neznámo'; + + // Slony paths + $lang['strpaths'] = 'Cesty'; + $lang['strnopaths'] = 'Nenalezeny žádné cesty.'; + $lang['strcreatepath'] = 'Vytvořit cestu'; + $lang['strnodename'] = 'Název uzlu'; + $lang['strnodeid'] = 'ID uzlu'; + $lang['strconninfo'] = 'Připojovací řetězec'; + $lang['strconnretry'] = 'Čekání v sekundách před novým pokusem připojení'; + $lang['strpathneedsconninfo'] = 'Musíte zadat připojovací řetězec pro cestu.'; + $lang['strpathneedsconnretry'] = 'Musíte zadat dobu v sekundách, po kterou se bude čekat, než se zkusí znovu připojit.'; + $lang['strpathcreated'] = 'Cesta byla vytvořena.'; + $lang['strpathcreatedbad'] = 'Nezdařilo se vytvořit cestu.'; + $lang['strconfdroppath'] = 'Opravdu chcete odstranit cestu „%s“?'; + $lang['strpathdropped'] = 'Cesta byla odstraněna.'; + $lang['strpathdroppedbad'] = 'Nezdařilo se odstranit cestu.'; + + // Slony listens + $lang['strlistens'] = 'Naslouchání'; + $lang['strnolistens'] = 'Nebyla nalezena žádná naslouchání.'; + $lang['strcreatelisten'] = 'Vytvořit naslouchání'; + $lang['strlistencreated'] = 'Naslouchání bylo vytvořeno.'; + $lang['strlistencreatedbad'] = 'Nezdařilo se vytvořit naslouchání.'; + $lang['strconfdroplisten'] = 'Opravdu chcete odstranit naslouchání „%s“?'; + $lang['strlistendropped'] = 'Naslouchání bylo odstraněno.'; + $lang['strlistendroppedbad'] = 'Nezdařilo se odstranit naslouchání.'; + + // Slony replication sets + $lang['strrepsets'] = 'Replikační sady'; + $lang['strnorepsets'] = 'Nebyly nalezeny žádné replikační sady.'; + $lang['strcreaterepset'] = 'Vytvořit replikační sadu'; + $lang['strrepsetcreated'] = 'Replikační sada byla vytvořena.'; + $lang['strrepsetcreatedbad'] = 'Nezdařilo se vytvořit replikační sadu.'; + $lang['strconfdroprepset'] = 'Opravdu chcete odstranit replikační sadu „%s“?'; + $lang['strrepsetdropped'] = 'Replikační sada byla odstraněna.'; + $lang['strrepsetdroppedbad'] = 'Nezdařilo se odstranit replikační sadu.'; + $lang['strmerge'] = 'Sloučit'; + $lang['strmergeinto'] = 'Sloučit s'; + $lang['strrepsetmerged'] = 'Replikační sady byly sloučeny.'; + $lang['strrepsetmergedbad'] = 'Nezdařilo se sloučit replikační sady.'; + $lang['strmove'] = 'Přesunout'; + $lang['strneworigin'] = 'Nový počátek'; + $lang['strrepsetmoved'] = 'Replikační sada byla přesunuta.'; + $lang['strrepsetmovedbad'] = 'Nezdařilo se přesunout replikační sadu.'; + $lang['strnewrepset'] = 'Nová replikační sada'; + $lang['strlock'] = 'Zamknout'; + $lang['strlocked'] = 'Zamknuto'; + $lang['strunlock'] = 'Odemknout'; + $lang['strconflockrepset'] = 'Opravdu chcete zamknout replikační sadu „%s“?'; + $lang['strrepsetlocked'] = 'Replikační sada byla zamknuta.'; + $lang['strrepsetlockedbad'] = 'Nezdařilo se zamknout replikační sadu.'; + $lang['strconfunlockrepset'] = 'Opravdu chcete odemknout replikační sadu „%s“?'; + $lang['strrepsetunlocked'] = 'Replikační sada byla odemknuta.'; + $lang['strrepsetunlockedbad'] = 'Nezdařilo se odemknout replikační sadu.'; + $lang['stronlyonnode'] = 'Poze v uzlu'; + $lang['strddlscript'] = 'Skript DDL'; + $lang['strscriptneedsbody'] = 'Musíte zajistit, aby se skript spustil na všech uzlech.'; + $lang['strscriptexecuted'] = 'Skript DDL replikační sady byl vykonán.'; + $lang['strscriptexecutedbad'] = 'Nezdařilo se vykonat skript DDL replikační sady.'; + $lang['strtabletriggerstoretain'] = 'Následující triggery NEBUDOU replikačním systémem Slony zakázány:'; + + // Slony tables in replication sets + $lang['straddtable'] = 'Přidat tabulku'; + $lang['strtableneedsuniquekey'] = 'Přidávaná tabulka musí obsahovat primární nebo jedinečný klíč.'; + $lang['strtableaddedtorepset'] = 'Tabulka byla přidána do replikační sady.'; + $lang['strtableaddedtorepsetbad'] = 'Tabulku se nezdařilo přidat do replikační sady.'; + $lang['strconfremovetablefromrepset'] = 'Opravdu chcete odebrat tabulku „%s“ z replikační sady „%s“?'; + $lang['strtableremovedfromrepset'] = 'Tabulka byla odebrána z replikační sady.'; + $lang['strtableremovedfromrepsetbad'] = 'Tabulku se nezdařilo odebrat z replikační sady.'; + + // Slony sequences in replication sets + $lang['straddsequence'] = 'Přidat sekvenci'; + $lang['strsequenceaddedtorepset'] = 'Sekvence byla přidána do replikační sady.'; + $lang['strsequenceaddedtorepsetbad'] = 'Sekvenci se nezdařilo přidat do replikační sady.'; + $lang['strconfremovesequencefromrepset'] = 'Opravdu chcete odebrat sekvenci „%s“ z replikační sady „%s“?'; + $lang['strsequenceremovedfromrepset'] = 'Sekvence byla odebrána z replikační sady.'; + $lang['strsequenceremovedfromrepsetbad'] = 'Sekvenci se nezdařilo odebrat z replikační sady.'; + + // Slony subscriptions + $lang['strsubscriptions'] = 'Odběry'; + $lang['strnosubscriptions'] = 'Nebyly nalezeny žádné odběry.'; + + // Miscellaneous + $lang['strtopbar'] = '%s běžící na %s:%s -- Jste přihlášený jako uživatel „%s“'; + $lang['strtimefmt'] = 'j. M Y G:i'; + $lang['strhelp'] = 'Nápověda'; + $lang['strhelpicon'] = '?'; + $lang['strhelppagebrowser'] = 'Výběr stránky s nápovědou'; + $lang['strselecthelppage'] = 'Zvolte stránku s nápovědou'; + $lang['strinvalidhelppage'] = 'Neplatná stránka s nápovědou.'; + $lang['strlogintitle'] = 'Přihlášení k %s'; + $lang['strlogoutmsg'] = 'Odhlášení od %s'; + $lang['strloading'] = 'Načítá se…'; + $lang['strerrorloading'] = 'Chyba při načítání'; + $lang['strclicktoreload'] = 'Klikněte pro opětovné načtení'; + + // Autovacuum + $lang['strautovacuum'] = 'Automatický úklid'; + $lang['strturnedon'] = 'Zapnuto'; + $lang['strturnedoff'] = 'Vypnuto'; + $lang['strenabled'] = 'Povoleno'; + $lang['strnovacuumconf'] = 'Nebylo nalezeno žádné nastavení automatického úklidu.'; + $lang['strvacuumbasethreshold'] = 'VACUUM - základní práh'; + $lang['strvacuumscalefactor'] = 'VACUUM - škálovací faktor'; + $lang['stranalybasethreshold'] = 'ANALYZE - základní práh'; + $lang['stranalyzescalefactor'] = 'ANALYZE - škálovací faktor'; + $lang['strvacuumcostdelay'] = 'VACUUM - délka přestávky'; + $lang['strvacuumcostlimit'] = 'VACUUM - cenový limit'; + $lang['strvacuumpertable'] = 'Nastavení automatického uklidu jednotlivých tabulek'; + $lang['straddvacuumtable'] = 'Přidat nastavení automatického úklidu pro tabulku'; + $lang['streditvacuumtable'] = 'Upravit nastavení automatického úklidu pro tabulku %s'; + $lang['strdelvacuumtable'] = 'Smazat nastavení automatického úklidu pro tabulku %s ?'; + $lang['strvacuumtablereset'] = 'Autovacuum setup for table %s reset to default values'; + $lang['strdelvacuumtablefail'] = 'Nezdařilo se odebrat nastavení automatického úklidu pro tabulku %s'; + $lang['strsetvacuumtablesaved'] = 'Nastavení automatického úklidu pro tabulku %s bylo uloženo.'; + $lang['strsetvacuumtablefail'] = 'Nezdařilo se nastavení automatického úklidu pro tabulku %s.'; + $lang['strspecifydelvacuumtable'] = 'Musíte zadat tabulku, ze které chcete odebrat parametry automatického úklidu.'; + $lang['strspecifyeditvacuumtable'] = 'Musíte zadat tabulku, ze které chcete upravit parametry automatického úklidu.'; + $lang['strnotdefaultinred'] = 'V účtu nejsou žádné výchozí hodnoty.'; + + // Table-level Locks + $lang['strlocks'] = 'Zámky'; + $lang['strtransaction'] = 'ID transakce'; + $lang['strvirtualtransaction'] = 'ID virtuální transakce'; + $lang['strprocessid'] = 'ID procesu'; + $lang['strmode'] = 'Režim zámku'; + $lang['strislockheld'] = 'Je zámek držený?'; + + // Prepared transactions + $lang['strpreparedxacts'] = 'Připravené transakce'; + $lang['strxactid'] = 'Transakční ID'; + $lang['strgid'] = 'Globální ID'; + + // Fulltext search + $lang['strfulltext'] = 'Plně textové vyhledávání'; + $lang['strftsconfig'] = 'Nastavení FTS'; + $lang['strftsconfigs'] = 'Nastavení'; + $lang['strftscreateconfig'] = 'Vytvořit nastavení FTS'; + $lang['strftscreatedict'] = 'Vytvořit slovník'; + $lang['strftscreatedicttemplate'] = 'Vytvořit šablonu slovníku'; + $lang['strftscreateparser'] = 'Vytvořit analyzátor'; + $lang['strftsnoconfigs'] = 'Nebylo nalezeno žádné nastavení FTS.'; + $lang['strftsconfigdropped'] = 'Nastavení FTS bylo odstraněno.'; + $lang['strftsconfigdroppedbad'] = 'Nezdařilo se odstranit nastavení FTS.'; + $lang['strconfdropftsconfig'] = 'Opravdu chcete odstranit nastavení FTS „%s“?'; + $lang['strconfdropftsdict'] = 'Opravdu chcete odstranit slovník FTS „%s“?'; + $lang['strconfdropftsmapping'] = 'Opravdu chcete odstranit mapování „%s“ nastavení FTS „%s“?'; + $lang['strftstemplate'] = 'Šablona'; + $lang['strftsparser'] = 'Analyzátor'; + $lang['strftsconfigneedsname'] = 'Musíte zadat název pro nastavení FTS.'; + $lang['strftsconfigcreated'] = 'Nastavení FTS bylo vytvořeno.'; + $lang['strftsconfigcreatedbad'] = 'Nezdařilo se vytvořit nastavení FTS.'; + $lang['strftsmapping'] = 'Mapování'; + $lang['strftsdicts'] = 'Slovníky'; + $lang['strftsdict'] = 'Slovník'; + $lang['strftsemptymap'] = 'Vyprázdnit mapu nastavení FTS.'; + $lang['strftsconfigaltered'] = 'Byly provedeny změny nastavení FTS.'; + $lang['strftsconfigalteredbad'] = 'Nezdařilo se provést změny nastavení FTS.'; + $lang['strftsconfigmap'] = 'Mapa nastavení FTS'; + $lang['strftsparsers'] = 'Analyzátory FTS'; + $lang['strftsnoparsers'] = 'Nejsou dostupné žádné analyzátory FTS.'; + $lang['strftsnodicts'] = 'Nejsou dostupné žádné slovníky FTS.'; + $lang['strftsdictcreated'] = 'Slovník FTS byl vytvořen.'; + $lang['strftsdictcreatedbad'] = 'Nezdařilo se vytvořit slovník FTS.'; + $lang['strftslexize'] = 'Lexikální funkce'; + $lang['strftsinit'] = 'Inicializační funkce'; + $lang['strftsoptionsvalues'] = 'Volby a hodnoty'; + $lang['strftsdictneedsname'] = 'Musíte zadat název pro slovník FTS.'; + $lang['strftsdictdropped'] = 'Slovník FTS byl odstraněn.'; + $lang['strftsdictdroppedbad'] = 'Nezdařilo se odstranit slovník FTS.'; + $lang['strftsdictaltered'] = 'Byly provedeny změny slovníku FTS.'; + $lang['strftsdictalteredbad'] = 'Nezdařilo se provést změny slovníku FTS.'; + $lang['strftsaddmapping'] = 'Přidat nové mapování'; + $lang['strftsspecifymappingtodrop'] = 'Pokud chcete odstranit mapování, tak musíte nejméně jedno vybrat.'; + $lang['strftsspecifyconfigtoalter'] = 'Musíte vybrat, které nastavení FTS chcete změnit.'; + $lang['strftsmappingdropped'] = 'Mapování FTS bylo odstraněno.'; + $lang['strftsmappingdroppedbad'] = 'Nezdařilo se odstranit mapování FTS.'; + $lang['strftsnodictionaries'] = 'Nebyly nalezeny žádné slovníky.'; + $lang['strftsmappingaltered'] = 'Byly provedeny změny mapování FTS.'; + $lang['strftsmappingalteredbad'] = 'Nezdařilo se provést změny mapování FTS.'; + $lang['strftsmappingadded'] = 'Mapování FTS bylo přidáno.'; + $lang['strftsmappingaddedbad'] = 'Nezdařilo se přidat mapování FTS.'; + $lang['strftstabconfigs'] = 'Nastavení'; + $lang['strftstabdicts'] = 'Slovníky'; + $lang['strftstabparsers'] = 'Analyzátory'; + $lang['strftscantparsercopy'] = 'Při vytváření nastavení textového vyhledávání nemůžete naráz zadat analyzátor i šablonu.'; +?> diff --git a/php/pgadmin/lang/danish.php b/php/pgadmin/lang/danish.php new file mode 100644 index 0000000..265f999 --- /dev/null +++ b/php/pgadmin/lang/danish.php @@ -0,0 +1,633 @@ + + * + */ + + // Language and character set + $lang['applang'] = 'Danish'; + $lang['appcharset'] = 'ISO-8859-1'; + $lang['applocale'] = 'da_DK'; + $lang['appdbencoding'] = 'LATIN1'; + $lang['applangdir'] = 'ltr'; + + // Welcome + $lang['strintro'] = 'Velkommen til phpPgAdmin.'; + $lang['strppahome'] = 'phpPgAdmins Hjemmeside'; + $lang['strpgsqlhome'] = 'PostgreSQLs Hjemmeside'; + $lang['strpgsqlhome_url'] = 'http://www.postgresql.org/'; + $lang['strlocaldocs'] = 'PostgreSQL Dokumentation (lokalt)'; + $lang['strreportbug'] = 'Rapporter fejl'; + $lang['strviewfaq'] = 'Ofte stillede sprgsml'; + $lang['strviewfaq_url'] = 'http://phppgadmin.sourceforge.net/?page=faq'; + + // Basic strings + $lang['strlogin'] = 'Login'; + $lang['strloginfailed'] = 'Login mislykkedes'; + $lang['strlogindisallowed'] = 'Login forbudt'; + $lang['strserver'] = 'Server'; + $lang['strlogout'] = 'Log ud'; + $lang['strowner'] = 'Ejer'; + $lang['straction'] = 'Handling'; + $lang['stractions'] = 'Handlinger'; + $lang['strname'] = 'Navn'; + $lang['strdefinition'] = 'Definition'; + $lang['strproperties'] = 'Egenskaber'; + $lang['strbrowse'] = 'Bladre'; + $lang['strdrop'] = 'Fjern'; + $lang['strdropped'] = 'Fjernet'; + $lang['strnull'] = 'Ingenting'; + $lang['strnotnull'] = 'Ikke ingenting'; + $lang['strfirst'] = '<< Frste'; + $lang['strlast'] = 'Sidste >>'; + $lang['strprev'] = 'Forgende'; + $lang['strfailed'] = 'Mislykkedes'; + $lang['strnext'] = 'Nste'; + $lang['strcreate'] = 'Opret'; + $lang['strcreated'] = 'Oprettet'; + $lang['strcomment'] = 'Kommentar'; + $lang['strlength'] = 'Lngde'; + $lang['strdefault'] = 'Standardvrdi'; + $lang['stralter'] = 'ndre'; + $lang['strok'] = 'OK'; + $lang['strcancel'] = 'Fortryd'; + $lang['strsave'] = 'Gem'; + $lang['strreset'] = 'Nulstil'; + $lang['strinsert'] = 'Indst'; + $lang['strselect'] = 'Vlg'; + $lang['strdelete'] = 'Slet'; + $lang['strupdate'] = 'Opdater'; + $lang['strreferences'] = 'Referencer'; + $lang['stryes'] = 'Ja'; + $lang['strno'] = 'Nej'; + $lang['strtrue'] = 'Sand'; + $lang['strfalse'] = 'Falsk'; + $lang['stredit'] = 'Redigere'; + $lang['strcolumn'] = 'Kolonne'; + $lang['strcolumns'] = 'Kolonner'; + $lang['strrows'] = 'Rkke(r)'; + $lang['strrowsaff'] = 'Rkke(r) berrt.'; + $lang['strobjects'] = 'Objekt'; + $lang['strexample'] = 'f.eks.'; + $lang['strback'] = 'Tilbage'; + $lang['strqueryresults'] = 'Sgeresultat'; + $lang['strshow'] = 'Vise'; + $lang['strempty'] = 'Tm'; + $lang['strlanguage'] = 'Sprog'; + $lang['strencoding'] = 'Kodning'; + $lang['strvalue'] = 'Vrdi'; + $lang['strunique'] = 'Unik'; + $lang['strprimary'] = 'Primr'; + $lang['strexport'] = 'Eksportere'; + $lang['strimport'] = 'Importere'; + $lang['strsql'] = 'SQL'; + $lang['strgo'] = 'Udfr'; + $lang['stradmin'] = 'Admin'; + $lang['strvacuum'] = 'Ryd op'; + $lang['stranalyze'] = 'Analysere'; + $lang['strclusterindex'] = 'Klynge'; + $lang['strclustered'] = 'Klynget?'; + $lang['strreindex'] = 'Genindekser'; + $lang['strrun'] = 'Udfr'; + $lang['stradd'] = 'Tilfj'; + $lang['strevent'] = 'Hndelse'; + $lang['strwhere'] = 'Hvor'; + $lang['strinstead'] = 'Gr i stedet'; + $lang['strwhen'] = 'Nr'; + $lang['strformat'] = 'Format'; + $lang['strdata'] = 'Data'; + $lang['strconfirm'] = 'Bekrft'; + $lang['strexpression'] = 'Udtryk'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'Udvid'; + $lang['strcollapse'] = 'Klap sammen'; + $lang['strexplain'] = 'Forklar'; + $lang['strexplainanalyze'] = 'Forklar analyze'; + $lang['strfind'] = 'Sg'; + $lang['stroptions'] = 'Alternativ'; + $lang['strrefresh'] = 'Opdater'; + $lang['strdownload'] = 'Download'; + $lang['strdownloadgzipped'] = 'Download komprimeret som gzip'; + $lang['strinfo'] = 'Info'; + $lang['stroids'] = 'OIDer'; + $lang['stradvanced'] = 'Avanceret'; + $lang['strvariables'] = 'Variable'; + $lang['strprocess'] = 'Proces'; + $lang['strprocesses'] = 'Processer'; + $lang['strsetting'] = 'Indstilling'; + $lang['streditsql'] = 'Rediger SQL'; + $lang['strruntime'] = 'Total runtime: %s ms'; + $lang['strpaginate'] = 'Paginere resultater'; + $lang['struploadscript'] = 'eller upload et SQL script:'; + $lang['strstarttime'] = 'Starttid'; + $lang['strfile'] = 'Fil'; + $lang['strfileimported'] = 'Fil importeret.'; + $lang['strparameters'] = 'Parametrer'; + + // Error handling + $lang['strnotloaded'] = 'Du har ikke ikke indlagt korrekt databaseunderstttelse i din PHP-installation.'; + $lang['strbadconfig'] = 'Din config.inc.php er ikke opdateret. Du er ndt til at genetablere den fra den nye config.inc.php-dist.'; + $lang['strbadencoding'] = 'Det lykkedes ikke at stte klientkodning i databasen.'; + $lang['strbadSchema'] = 'Forkert Skema angivet.'; + $lang['strinstatement'] = 'I pstanden:'; + $lang['strsqlerror'] = 'SQL fejl:'; + $lang['strinvalidparam'] = 'Ugyldig scriptparam.'; + $lang['strnodata'] = 'Ingen rkker fundet.'; + $lang['strnoobjects'] = 'Ingen objekter fundet.'; + $lang['strrownotunique'] = 'Denne rkke har ingen unik ngle.'; + $lang['strnoreportsdb'] = 'Du har ikke oprettet nogen rapportdatabase. For instruktioner ls filen INSTALL.'; + + // Tables + $lang['strtable'] = 'Tabel'; + $lang['strtables'] = 'Tabeller'; + $lang['strshowalltables'] = 'Vis alle tabeller'; + $lang['strnotables'] = 'Fandt ingen tabeller.'; + $lang['strnotable'] = 'Fandt ingen tabel.'; + $lang['strcreatetable'] = 'Opret tabel'; + $lang['strtablename'] = 'Tabelnavn'; + $lang['strtableneedsname'] = 'Tabel skal have et navn.'; + $lang['strtableneedsfield'] = 'Der skal mindst vre et felt.'; + $lang['strtableneedscols'] = 'tabeller krver et tilladeligt antal kolonner.'; + $lang['strtablecreated'] = 'Tabel oprettet.'; + $lang['strtablecreatedbad'] = 'Tabeloprettelse mislykkedes.'; + $lang['strconfdroptable'] = 'Er du sikker p at du vil fjerne tabellen "%s"?'; + $lang['strtabledropped'] = 'Tabel fjernet.'; + $lang['strinsertrow'] = 'Indst rkke'; + $lang['strtabledroppedbad'] = 'Det lykkedes ikke at fjerne tabellen.'; + $lang['strrowinserted'] = 'Rkke indsat.'; + $lang['strconfemptytable'] = 'Er du sikker p at du vil tmme tabellen "%s"?'; + $lang['strrowupdated'] = 'Rkke opdateret.'; + $lang['strrowinsertedbad'] = 'Det lykkedes ikke indstte rkke.'; + $lang['strtableemptied'] = 'Tabellen tmt.'; + $lang['strrowupdatedbad'] = 'Opdatering af rkke mislykkedes.'; + $lang['streditrow'] = 'Rediger rkke'; + $lang['strrowdeleted'] = 'Rkke slettet.'; + $lang['strrowdeletedbad'] = 'Sletning af rkke mislykkedes.'; + $lang['strfield'] = 'Felt'; + $lang['strconfdeleterow'] = 'Er du sikker p at du vil slette denne rkke?'; + $lang['strnumfields'] = 'Antal felter'; + $lang['strsaveandrepeat'] = 'Gem & Fortst'; + $lang['strtableemptiedbad'] = 'Det lykkedes ikke at tmme tabellen'; + $lang['strdeleterow'] = 'Slet rkke'; + $lang['strfields'] = 'Felt'; + $lang['strfieldneedsname'] = 'Feltet skal have et navn'; + $lang['strcolumndropped'] = 'Kolonne fjernet.'; + $lang['strselectallfields'] = 'Vlg alle felter'; + $lang['strselectneedscol'] = 'Der skal vlges mindst een kolonne'; + $lang['strselectunary'] = 'Unary operander kan ikke have vrdien.'; + $lang['strcolumnaltered'] = 'Kolonne ndret.'; + $lang['straltercolumn'] = 'ndre kolonne'; + $lang['strcolumnalteredbad'] = 'Det lykkes ikke at ndre kolonne.'; + $lang['strconfdropcolumn'] = 'Er du sikker p at du vil fjerne kolonne "%s" fra tabel "%s"?'; + $lang['strcolumndroppedbad'] = 'Det lykkedes ikke at fjerne kolonne.'; + $lang['straddcolumn'] = 'Tilfj kolonne'; + $lang['strcolumnadded'] = 'Kolonne tifjet.'; + $lang['strcolumnaddedbad'] = 'Det lykkedes ikke at tilfje kolonne.'; + $lang['strcascade'] = 'KASKAD'; + $lang['strdataonly'] = 'Udelukkende data'; + $lang['strtablealtered'] = 'Tabel ndret.'; + $lang['strtablealteredbad'] = 'Det lykkedes ikke at ndre tabel.'; + $lang['strestimatedrowcount'] = 'Anslet antal rkker'; + + // Users + $lang['struser'] = 'Bruger'; + $lang['strusers'] = 'Brugere'; + $lang['strusername'] = 'Brugernavn'; + $lang['strpassword'] = 'Password'; + $lang['strsuper'] = 'Superbruger?'; + $lang['strcreatedb'] = 'Opret database?'; + $lang['strexpires'] = 'Udlber'; + $lang['strsessiondefaults'] = 'Sessionsindstillinger'; + $lang['strnewname'] = 'Nyt navn'; + $lang['strnousers'] = 'Der blev ikke fundet nogen brugere.'; + $lang['strrename'] = 'Omdb'; + $lang['struserrenamed'] = 'Brugernavn ndret.'; + $lang['struserrenamedbad'] = 'Det lykkedes ikke at omdbe bruger.'; + $lang['struserupdated'] = 'Bruger opdateret.'; + $lang['struserupdatedbad'] = 'Opdatering af bruger mislykkedes.'; + $lang['strshowallusers'] = 'Vis alle brugere'; + $lang['strcreateuser'] = 'Opret bruger'; + $lang['struserneedsname'] = 'Bruger behver et navn.'; + $lang['strconfdropuser'] = 'Er du sikker p at du vil slette brugeren "%s"?'; + $lang['strusercreated'] = 'Bruger oprettet.'; + $lang['strusercreatedbad'] = 'Oprettelse af bruger mislykkedes.'; + $lang['struserdropped'] = 'Bruger slettet.'; + $lang['struserdroppedbad'] = 'Sletning af bruger mislykkedes.'; + $lang['straccount'] = 'Konto'; + $lang['strchangepassword'] = 'ndre password'; + $lang['strpasswordchanged'] = 'Password ndret.'; + $lang['strpasswordchangedbad'] = 'ndring af password mislykkedes.'; + $lang['strpasswordshort'] = 'Password er for kort.'; + $lang['strpasswordconfirm'] = 'Password er forskellig fra bekrftelsen.'; + + // Groups + $lang['strgroup'] = 'Gruppe'; + $lang['strgroups'] = 'Grupper'; + $lang['strnogroup'] = 'Gruppe blev ikke fundet.'; + $lang['strnogroups'] = 'Ingen grupper blev fundet.'; + $lang['strcreategroup'] = 'Opret gruppe'; + $lang['strshowallgroups'] = 'Vis alle grupper'; + $lang['strgroupneedsname'] = 'Gruppen skal have et navn.'; + $lang['strgroupcreated'] = 'Gruppe oprettet.'; + $lang['strgroupdropped'] = 'Gruppe slettet.'; + $lang['strgroupcreatedbad'] = 'Oprettelse af gruppe mislykkedes.'; + $lang['strconfdropgroup'] = 'Er du sikker p at du vil slette gruppe "%s"?'; + $lang['strgrant'] = 'Tildel'; + $lang['strgranted'] = 'Privilegier ndret.'; + $lang['strgroupdroppedbad'] = 'Det lykkedes ikke at fjerne gruppe.'; + $lang['straddmember'] = 'Tilfj medlem'; + $lang['strmemberadded'] = 'Medlem tilfjet.'; + $lang['strmemberaddedbad'] = 'Det lykkedes ikke at tilfje medlem.'; + $lang['strdropmember'] = 'Fjern medlem'; + $lang['strconfdropmember'] = 'Er du sikker p at du vil fjerne medlem "%s" fra gruppen "%s"?'; + $lang['strmemberdropped'] = 'Medlem fjernet.'; + $lang['strmemberdroppedbad'] = 'Det lykkedes ikke at fjerne medlem.'; + + // Privileges + $lang['strprivilege'] = 'Rettighed'; + $lang['strprivileges'] = 'Rettigheder'; + $lang['strnoprivileges'] = 'Dette objekt har standard ejerrettigheder.'; + $lang['strmembers'] = 'Medlemmer'; + $lang['strrevoke'] = 'Inddrag'; + $lang['strgrantbad'] = 'Du skal angive mindst en bruger eller gruppe og mindst et privilegie.'; + $lang['strgrantfailed'] = 'ndring af rettigheder mislykkedes.'; + $lang['stralterprivs'] = 'ndre rettigheder'; + $lang['strdatabase'] = 'Database'; + $lang['strdatabasedropped'] = 'Database fjernet.'; + $lang['strdatabases'] = 'Databaser'; + $lang['strentersql'] = 'Indtast SQL til eksekvering :'; + $lang['strgrantor'] = 'Tilladelsesudsteder'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'Database'; + $lang['strdatabases'] = 'Databaser'; + $lang['strshowalldatabases'] = 'Vis alle databaser'; + $lang['strnodatabase'] = 'Database blev ikke fundet.'; + $lang['strnodatabases'] = 'Der blev ikke fundet nogen databaser.'; + $lang['strcreatedatabase'] = 'Opret database'; + $lang['strdatabasename'] = 'Databasenavn'; + $lang['strdatabaseneedsname'] = 'Databasen skal have et navn.'; + $lang['strdatabasecreated'] = 'Database oprettet.'; + $lang['strdatabasecreatedbad'] = 'Oprettelse af database mislykkedes.'; + $lang['strconfdropdatabase'] = 'Er du sikker p at du vil fjerne database "%s"?'; + $lang['strdatabasedroppedbad'] = 'Fjernelse af database mislykkedes.'; + $lang['strentersql'] = 'Enter the SQL to execute below:'; + $lang['strsqlexecuted'] = 'SQL-kommando udfrt.'; + $lang['strvacuumgood'] = 'Vacuum udfrt.'; + $lang['strvacuumbad'] = 'Vacuum mislykkedes.'; + $lang['stranalyzegood'] = 'Analysen lykkedes.'; + $lang['stranalyzebad'] = 'Analysen mislykkedes.'; + $lang['strreindexgood'] = 'Reindeksering komplet.'; + $lang['strreindexbad'] = 'Reindeksering slog fejl.'; + $lang['strfull'] = 'Fuld'; + $lang['strfreeze'] = 'Fastfrys'; + $lang['strforce'] = 'Force'; + $lang['strsignalsent'] = 'Signal sendt.'; + $lang['strsignalsentbad'] = 'Afsendelse af signal mislykkedes.'; + $lang['strallobjects'] = 'Alle objekter'; + $lang['strstructureonly'] = 'Kun struktur'; + $lang['strstructureanddata'] = 'Struktur og data'; + + // Views + $lang['strview'] = 'View'; + $lang['strviews'] = 'Views'; + $lang['strshowallviews'] = 'Vis alle views'; + $lang['strnoview'] = 'Ingen view blev fundet.'; + $lang['strnoviews'] = 'Ingen views blev fundet.'; + $lang['strcreateview'] = 'Opret view'; + $lang['strviewname'] = 'Navn p view'; + $lang['strviewneedsname'] = 'View skal have et navn.'; + $lang['strviewneedsdef'] = 'Du skal angive en defintion for view.'; + $lang['strviewcreated'] = 'View oprettet.'; + $lang['strviewcreatedbad'] = 'Oprettelse af View mislykkedes.'; + $lang['strconfdropview'] = 'Er du sikker p at du vil fjerne view "%s"?'; + $lang['strviewdropped'] = 'View fjernet.'; + $lang['strviewdroppedbad'] = 'Fjernelse af view mislykkedes.'; + $lang['strviewupdated'] = 'View opdateret.'; + $lang['strviewupdatedbad'] = 'Opdatering af view mislykkedes.'; + $lang['strviewlink'] = 'Linking Keys'; + $lang['strviewconditions'] = 'Yderligere vilkr'; + $lang['strcreateviewwiz'] = 'Opret view med hjlp af wizard'; + + // Sequences + $lang['strsequence'] = 'Sekvens'; + $lang['strsequences'] = 'Sekvenser'; + $lang['strshowallsequences'] = 'Vis alle sekvenser'; + $lang['strnosequence'] = 'Sekvens blev ikke fundet.'; + $lang['strnosequences'] = 'Ingen sekvenser blev fundet.'; + $lang['strcreatesequence'] = 'Opret sekvens'; + $lang['strlastvalue'] = 'Seneste vrdi'; + $lang['strincrementby'] = 'g med'; + $lang['strstartvalue'] = 'Startvrdi'; + $lang['strmaxvalue'] = 'Strste vrdi'; + $lang['strminvalue'] = 'Mindste vrdi'; + $lang['strcachevalue'] = 'Cachens vrdi'; + $lang['strlogcount'] = 'Log count'; + $lang['striscycled'] = 'Is cycled?'; + $lang['strsequenceneedsname'] = 'Sekvens skal have et navn.'; + $lang['strsequencecreated'] = 'Sekvens oprettet.'; + $lang['strsequencecreatedbad'] = 'Oprettelse af sekvens mislykkedes.'; + $lang['strconfdropsequence'] = 'Er du sikker p at du vil fjerne sekvensen "%s"?'; + $lang['strsequencedropped'] = 'Sekvensen fjernet.'; + $lang['strsequencedroppedbad'] = 'Fjernelse af sekvens mislykkedes.'; + + // Indexes + $lang['strindex'] = 'Indeks'; + $lang['strindexes'] = 'Indekser'; + $lang['strindexname'] = 'Indeksnavn'; + $lang['strshowallindexes'] = 'Vis alle indeks'; + $lang['strnoindex'] = 'Ingen indeks blev fundet.'; + $lang['strsequencereset'] = 'Nulstil sekvens.'; + $lang['strsequenceresetbad'] = 'Nulstilling af sekvens mislykkedes.'; + $lang['strnoindexes'] = 'Ingen indeks blev fundet.'; + $lang['strcreateindex'] = 'Opret indeks'; + $lang['strindexname'] = 'Indeksnavn'; + $lang['strtabname'] = 'Tabelnavn'; + $lang['strcolumnname'] = 'Kolonnenavn'; + $lang['strindexneedsname'] = 'Indeks skal have et navn'; + $lang['strindexneedscols'] = 'Indeks krveret gyldigt antal kolonner.'; + $lang['strindexcreated'] = 'Indeks oprettet'; + $lang['strindexcreatedbad'] = 'Oprettelse af indeks mislykkedes.'; + $lang['strconfdropindex'] = 'Er du sikker p at du vil fjerne indeks "%s"?'; + $lang['strindexdropped'] = 'Indeks fjernet.'; + $lang['strindexdroppedbad'] = 'Det lykkedes ikke at fjerne indeks.'; + $lang['strkeyname'] = 'Nglebetegnelse'; + $lang['struniquekey'] = 'Unik ngle'; + $lang['strprimarykey'] = 'Primrngle'; + $lang['strindextype'] = 'Indekstype'; + $lang['strindexname'] = 'Indeksnavn'; + $lang['strtablecolumnlist'] = 'Tabelkolonner'; + $lang['strindexcolumnlist'] = 'Indekskolonner'; + $lang['strconfcluster'] = 'Are you sure you want to cluster "%s"?'; + $lang['strclusteredgood'] = 'Cluster complete.'; + $lang['strclusteredbad'] = 'Cluster failed.'; + + // Rules + $lang['strrules'] = 'Regler'; + $lang['strrule'] = 'Regel'; + $lang['strshowallrules'] = 'Vis alle regler'; + $lang['strnorule'] = 'Regel blev ikke fundet.'; + $lang['strnorules'] = 'Ingen regler blev fundet.'; + $lang['strcreaterule'] = 'Opret regel'; + $lang['strrulename'] = 'Regelnavn'; + $lang['strruleneedsname'] = 'Regel skal have et navn.'; + $lang['strrulecreated'] = 'Regel oprettet.'; + $lang['strrulecreatedbad'] = 'Oprettelse af regel mislykkedes.'; + $lang['strconfdroprule'] = 'Er du sikker p at du fjerne regel "%s" for "%s"?'; + $lang['strruledropped'] = 'Regel fjernet.'; + $lang['strruledroppedbad'] = 'Det lykkedes ikke at fjerne regel.'; + + // Constraints + $lang['strconstraints'] = 'Afgrnsninger'; + $lang['strshowallconstraints'] = 'Vis alle afgrnsninger'; + $lang['strnoconstraints'] = 'Der blev ikke fundet nogen afgrnsninger.'; + $lang['strcreateconstraint'] = 'Opret afgrnsning'; + $lang['strconstraintcreated'] = 'Afgrnsning oprettet.'; + $lang['strconstraintcreatedbad'] = 'Det lykkedes ikke at oprette afgrnsning.'; + $lang['strconfdropconstraint'] = 'Er du sikker p at du vil fjerne afgrnsning "%s" for "%s"?'; + $lang['strconstraintdropped'] = 'Afgrnsning fjernet.'; + $lang['strconstraintdroppedbad'] = 'Det lykkedes ikke at fjerne afgrnsning.'; + $lang['straddcheck'] = 'Tilfj check'; + $lang['strcheckneedsdefinition'] = 'Check afgrnsning skal defineres.'; + $lang['strcheckadded'] = 'Check tilfjet.'; + $lang['strcheckaddedbad'] = 'Det lykkedes ikke at tilfje check.'; + $lang['straddpk'] = 'Tilfj primrngle'; + $lang['strpkneedscols'] = 'Primrngle krver mindst en kolonne.'; + $lang['strpkadded'] = 'Primrngle tilfjet.'; + $lang['strpkaddedbad'] = 'Tilfjelse af primrngle mislykkedes.'; + $lang['stradduniq'] = 'Tilfj unik ngle'; + $lang['struniqneedscols'] = 'Unik ngle krver mindst een kolonne.'; + $lang['struniqadded'] = 'Unik ngle tilfjet.'; + $lang['struniqaddedbad'] = 'Tilfjelse af unik ngle mislykkedes.'; + $lang['straddfk'] = 'Tilfj ekstern ngle'; + $lang['strfkneedscols'] = 'Ekstern ngle krver mindst een kolonne.'; + $lang['strfkneedstarget'] = 'Ekstern ngle krver en mltabel.'; + $lang['strfkadded'] = 'Ekstern ngle tilfjet.'; + $lang['strfkaddedbad'] = 'Tilfjelse af ekstern ngle mislykkedes.'; + $lang['strfktarget'] = 'Mltabel'; + $lang['strfkcolumnlist'] = 'Kolonner i ngle'; + $lang['strondelete'] = 'VED SLETNING'; + $lang['stronupdate'] = 'VED OPDATERING'; + + // Functions + $lang['strfunction'] = 'Funktion'; + $lang['strfunctions'] = 'Funktioner'; + $lang['strshowallfunctions'] = 'Vis alle funktioner'; + $lang['strnofunction'] = 'Hittade ingen funktion.'; + $lang['strnofunctions'] = 'Hittade inga funktioner.'; + $lang['strcreatefunction'] = 'Opret funktion'; + $lang['strcreateplfunction'] = 'Opret SQL/PL funktion'; + $lang['strcreateinternalfunction'] = 'Opret intern funktion'; + $lang['strcreatecfunction'] = 'Opret C funktion'; + $lang['strfunctionname'] = 'Funktionsnavn'; + $lang['strreturns'] = 'Tilbage'; + $lang['strarguments'] = 'Argumenter'; + $lang['strfunctionneedsname'] = 'Funktionen skal have et navn.'; + $lang['strfunctionneedsdef'] = 'Funktionen skal defineres.'; + $lang['strfunctioncreated'] = 'Funktion oprettet.'; + $lang['strfunctioncreatedbad'] = 'Oprettelse af funktion mislykkedes.'; + $lang['strconfdropfunction'] = 'Er du sikker p at du vil slette funktionen "%s"?'; + $lang['strproglanguage'] = 'Programmeringssprog'; + $lang['strfunctiondropped'] = 'Funktionen fjernet.'; + $lang['strfunctiondroppedbad'] = 'Fjernelse af funktionen mislykkedes.'; + $lang['strfunctionupdated'] = 'Funktion opdateret.'; + $lang['strfunctionupdatedbad'] = 'Opdatering af funktion mislykkedes.'; + + // Triggers + $lang['strtrigger'] = 'Trigger'; + $lang['strtriggers'] = 'Triggere'; + $lang['strshowalltriggers'] = 'Vis alle triggere'; + $lang['strnotrigger'] = 'Hittede ingen trigger.'; + $lang['strnotriggers'] = 'Hittede ingen trigger.'; + $lang['strcreatetrigger'] = 'Opret trigger'; + $lang['strtriggerneedsname'] = 'Trigger skal have et navn.'; + $lang['strtriggerneedsfunc'] = 'Du skal specificere en funktion for trigger.'; + $lang['strtriggercreated'] = 'Trigger oprettet.'; + $lang['strtriggerdropped'] = 'Trigger fjernet.'; + $lang['strtriggercreatedbad'] = 'Det lykkedes ikke at oprette trigger.'; + $lang['strconfdroptrigger'] = 'Er du sikker p at du vil fjerne trigger "%s" p "%s"?'; + $lang['strtriggerdroppedbad'] = 'Det lykkedes ikke at fjerne trigger.'; + + + + $lang['strstorage'] = 'Lagring'; + $lang['strtriggeraltered'] = 'Trigger ndret.'; + $lang['strtriggeralteredbad'] = 'Det lykkedes ikke at ndre trigger.'; + + // Types + $lang['strtype'] = 'Type'; + $lang['strtypes'] = 'Typer'; + $lang['strshowalltypes'] = 'Vis alle typer'; + $lang['strnotype'] = 'Typen blev ikke fundet.'; + $lang['strnotypes'] = 'Ingen typer fundet.'; + + $lang['strtypeneedslen'] = 'Du skal angive typens lngde.'; + + $lang['strcreatetype'] = 'Opret type'; + $lang['strtypename'] = 'Navn p typen'; + $lang['strinputfn'] = 'Input funktion'; + $lang['stroutputfn'] = 'Output funktion'; + $lang['strpassbyval'] = 'Passed by val?'; + $lang['stralignment'] = 'Justering'; + $lang['strelement'] = 'Element'; + $lang['strdelimiter'] = 'Begrnser'; + $lang['strtypeneedsname'] = 'Typen skal have et navn.'; + $lang['strtypecreated'] = 'Type oprettet'; + $lang['strtypecreatedbad'] = 'Det lykkedes ikke at oprette type.'; + $lang['strconfdroptype'] = 'Er du sikker p at du vil fjerne typen "%s"?'; + $lang['strtypedropped'] = 'Typen fjernet.'; + $lang['strtypedroppedbad'] = 'Det lykkedes ikke at fjerne typen.'; + + // Schemas + $lang['strschema'] = 'Skema'; + $lang['strschemas'] = 'Skemaer'; + $lang['strshowallschemas'] = 'Vis alle skemaer'; + $lang['strnoschema'] = 'Der blev ikke fundet noget skema.'; + $lang['strnoschemas'] = 'Der blev ikke fundet nogen skemaer.'; + $lang['strcreateschema'] = 'Opret skema'; + $lang['strschemaname'] = 'Skemanavn'; + $lang['strschemaneedsname'] = 'Skema skal have et navn.'; + $lang['strschemacreated'] = 'Skema oprettet'; + $lang['strschemacreatedbad'] = 'Det lykkedes ikke at oprette skema.'; + $lang['strconfdropschema'] = 'Er du sikker p, at du vil fjerne skemaet "%s"?'; + $lang['strschemadropped'] = 'Skema fjernet.'; + $lang['strschemadroppedbad'] = 'Det lykkedes ikka at fjerne skema.'; + + // Reports + $lang['strreport'] = 'Rapport'; + $lang['strreports'] = 'Rapporter'; + $lang['strshowallreports'] = 'Vis alle rapporter'; + $lang['strtopbar'] = '%s krer p %s:%s -- Du er logged ind som bruger "%s"'; + $lang['strtimefmt'] = 'jS M, Y g:iA'; + $lang['strnoreports'] = 'Ingen rapporter fundet.'; + $lang['strcreatereport'] = 'Opret rapport'; + $lang['strreportdropped'] = 'Rapport fjernet.'; + $lang['strreportcreated'] = 'Rapport oprettet.'; + $lang['strreportneedsname'] = 'Rapport skal have et navn.'; + $lang['strreportcreatedbad'] = 'Det lykkedes ikke at oprette rapport.'; + $lang['strreportdroppedbad'] = 'Det lykkedes ikke at fjerne rapport.'; + $lang['strconfdropreport'] = 'Er du sikker p, at du vil fjerne rapporten "%s"?'; + $lang['strreportneedsdef'] = 'Du skal angive en SQL-foresprgsel.'; + + // Domains + $lang['strdomain'] = 'Domne'; + $lang['strdomains'] = 'Domner'; + $lang['strshowalldomains'] = 'Vis alle domner'; + $lang['strnodomains'] = 'Ingen domner blev fundet.'; + $lang['strcreatedomain'] = 'Opret domne'; + $lang['strdomaindropped'] = 'Domne fjernet.'; + $lang['strdomaindroppedbad'] = 'Det lykkedes ikke at fjerne domne.'; + $lang['strconfdropdomain'] = 'Er du sikker p at du vil fjerne domnet "%s"?'; + $lang['strdomainneedsname'] = 'Du skal indtaste et domnenavn.'; + $lang['strdomaincreated'] = 'Domne oprettet.'; + $lang['strdomaincreatedbad'] = 'Det lykkedes ikke at oprette et domne.'; + $lang['strdomainaltered'] = 'Domne ndret.'; + $lang['strdomainalteredbad'] = 'Det lykkedes ikke at ndre domne.'; + + // Operators + $lang['stroperator'] = 'Operator'; + $lang['stroperators'] = 'Operatorer'; + $lang['strshowalloperators'] = 'Vis alle operatorer'; + $lang['strnooperator'] = 'Operator blev ikke.'; + $lang['strnooperators'] = 'Der blev ikke fundet nogen operatorer.'; + $lang['strcreateoperator'] = 'Opret operator'; + $lang['strleftarg'] = 'Left Arg Type'; + $lang['strrightarg'] = 'Right Arg Type'; + $lang['strcommutator'] = 'Commutator'; + $lang['strnegator'] = 'Negator'; + $lang['strrestrict'] = 'Restrict'; + $lang['strjoin'] = 'Join'; + $lang['strhashes'] = 'Hashes'; + $lang['strmerges'] = 'Merges'; + $lang['strleftsort'] = 'Left sort'; + $lang['strrightsort'] = 'Right sort'; + $lang['strlessthan'] = 'Less than'; + $lang['strgreaterthan'] = 'Greater than'; + $lang['stroperatorneedsname'] = 'Operator skal have et navn.'; + $lang['stroperatorcreated'] = 'Operator oprettet'; + $lang['stroperatorcreatedbad'] = 'Oprettelse af operator mislykkedes.'; + $lang['strconfdropoperator'] = 'Er du sikker p, at du vil fjerne operator "%s"?'; + $lang['stroperatordropped'] = 'Operator fjernet.'; + $lang['stroperatordroppedbad'] = 'Fjernelse af operator mislykkedes.'; + + // Casts + $lang['strcasts'] = 'Typekonverteringer'; + $lang['strnocasts'] = 'Ingen typekonverteringer fundet.'; + $lang['strsourcetype'] = 'Kildetype'; + $lang['strtargettype'] = 'Mltype'; + $lang['strimplicit'] = 'Implicit'; + $lang['strinassignment'] = 'Tildelt i'; + $lang['strbinarycompat'] = '(Binrt kompatibel)'; + + // Conversions + $lang['strconversions'] = 'Konverteringer'; + $lang['strnoconversions'] = 'Ingen konverteringer fundet.'; + $lang['strsourceencoding'] = 'Kildekodning'; + $lang['strtargetencoding'] = 'Mlkodning'; + + // Languages + $lang['strlanguages'] = 'Sprog'; + $lang['strnolanguages'] = 'Der blev ikke fundet noget sprog.'; + $lang['strtrusted'] = 'Plidelig(e)'; + + // Info + $lang['strnoinfo'] = 'Ingen tilgngelig information.'; + $lang['strreferringtables'] = 'Refererende tabeller'; + $lang['strparenttables'] = 'Overordnede tabeller'; + $lang['strchildtables'] = 'Underordnede tabeller'; + + // Aggregates + $lang['straggregates'] = 'Sammenlgninger'; + $lang['strnoaggregates'] = 'Ingen sammenlgninger fundet.'; + $lang['stralltypes'] = '(Alle typer)'; + + // Operator Classes + $lang['stropclasses'] = 'Operatorklasser'; + $lang['strnoopclasses'] = 'Ingen Operatorklasser fundet.'; + $lang['straccessmethod'] = 'Tilgangsmetode'; + + // Stats and performance + $lang['strrowperf'] = 'Row Performance'; + $lang['strioperf'] = 'I/O Performance'; + $lang['stridxrowperf'] = 'Index Row Performance'; + $lang['stridxioperf'] = 'Index I/O Performance'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Sequential'; + $lang['strscan'] = 'Scan'; + $lang['strread'] = 'Read'; + $lang['strfetch'] = 'Fetch'; + $lang['strheap'] = 'Heap'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST Index'; + $lang['strcache'] = 'Cache'; + $lang['strdisk'] = 'Disk'; + $lang['strrows2'] = 'Rows'; + + // Tablespaces + $lang['strtablespace'] = 'Tabelomrde'; + $lang['strtablespaces'] = 'Tabelomrder'; + $lang['strshowalltablespaces'] = 'Vis alle tabelomrder'; + $lang['strnotablespaces'] = 'Ingen tabelomrder fundet.'; + $lang['strcreatetablespace'] = 'Opret tabelomrder'; + $lang['strlocation'] = 'Location'; + $lang['strtablespaceneedsname'] = 'Tabelomrdet skal have et navn.'; + $lang['strtablespaceneedsloc'] = 'Du skal angive hvilken mappe tabelomrdet skal oprettes i.'; + $lang['strtablespacecreated'] = 'Tabelomrde oprettet.'; + $lang['strtablespacecreatedbad'] = 'Oprettelse af tabelomrde lykkedes ikke.'; + $lang['strconfdroptablespace'] = 'Er du sikker p, at du vil fjerne tabelomrde "%s"?'; + $lang['strtablespacedropped'] = 'Tabelomrde fjernet.'; + $lang['strtablespacedroppedbad'] = 'Fjernelse af tabelomrde lykkedes ikke.'; + $lang['strtablespacealtered'] = 'Tabelomrde ndret.'; + $lang['strtablespacealteredbad'] = 'ndring af tabelomrde lykkedes ikke.'; + + // Miscellaneous + $lang['strtopbar'] = '%s Krer p %s:%s -- Du er logged ind som bruger "%s", %s'; + $lang['strtimefmt'] = 'jS M, Y g:iA'; + $lang['strhelp'] = 'Hjlp'; + $lang['strhelpicon'] = '?'; + +?> diff --git a/php/pgadmin/lang/dutch.php b/php/pgadmin/lang/dutch.php new file mode 100644 index 0000000..6c5c204 --- /dev/null +++ b/php/pgadmin/lang/dutch.php @@ -0,0 +1,481 @@ +>'; + $lang['strexplain'] = 'Verklaring'; + $lang['strfind'] = 'Zoek'; + $lang['stroptions'] = 'Opties'; + $lang['strrefresh'] = 'Ververs'; + $lang['strdownload'] = 'Download'; + $lang['strrownotunique'] = 'Geen unieke identifier voor deze rij.'; + $lang['strselectallfields'] = 'Selecteer alle velden'; + $lang['strtablealtered'] = 'Tabel gewijzigd.'; + $lang['strtablealteredbad'] = 'Tabel wijzigen mislukt.'; + $lang['strcreateuser'] = 'Creer gebruiker'; + $lang['strusercreatedbad'] = 'Gebruiker creren mislukt.'; + $lang['straddmember'] = 'Voeg groepslid toe'; + $lang['strmemberadded'] = 'Groepslid toegevoegd.'; + $lang['strmemberaddedbad'] = 'Toevoegen groepslid mislukt.'; + $lang['strdropmember'] = 'Verwijder groepslid'; + $lang['strconfdropmember'] = 'Weet u zeker dat u "%s" uit groep "%s" wilt verwijderen?'; + $lang['strmemberdropped'] = 'Groepslid verwijderd.'; + $lang['strmemberdroppedbad'] = 'Verwijderen van groepslid mislukt.'; + $lang['strgrantor'] = 'Grantor'; + $lang['strasterisk'] = '*'; + $lang['strsequencereset'] = 'Sequence reset.'; + $lang['strsequenceresetbad'] = 'Sequence reset mislukt.'; + $lang['strproglanguage'] = 'Programmeertaal'; + $lang['strtriggeraltered'] = 'Trigger gewijzigd.'; + $lang['strtriggeralteredbad'] = 'Trigger wijziging mislukt.'; + $lang['strdomain'] = 'Domein'; + $lang['strdomains'] = 'Domeinen'; + $lang['strshowalldomains'] = 'Toon alle domeinen'; + $lang['strnodomains'] = 'Geen domeinen gevonden.'; + $lang['strcreatedomain'] = 'Creer domein'; + $lang['strdomaindropped'] = 'Domein verwijderd.'; + $lang['strdomaindroppedbad'] = 'Verwijderen van domein mislukt.'; + $lang['strconfdropdomain'] = 'Weet u zeker dat u het domein "%s" wilt verwijderen?'; + $lang['strdomainneedsname'] = 'U dient een naam op te geven voor uw domein.'; + $lang['strdomaincreated'] = 'Domein gecreerd.'; + $lang['strdomaincreatedbad'] = 'Domeincreatie mislukt.'; + $lang['strdomainaltered'] = 'Domein gewijzigd.'; + $lang['strdomainalteredbad'] = 'Wijzigen van het domein mislukt.'; + $lang['stroperator'] = 'Operator'; + $lang['strshowalloperators'] = 'Toon alle operators'; + $lang['strnooperator'] = 'Geen operator gevonden.'; + $lang['strnooperators'] = 'Geen operators gevonden.'; + $lang['strcreateoperator'] = 'Creer operator'; + $lang['stroperatorname'] = 'Naam van de operator'; + $lang['strleftarg'] = 'Linkerargument type'; + $lang['strrightarg'] = 'Rechterargument type'; + $lang['stroperatorneedsname'] = 'U dient een naam op te geven voor uw operator.'; + $lang['stroperatorcreated'] = 'Operator gecreerd'; + $lang['stroperatorcreatedbad'] = 'Operator creatie mislukt.'; + $lang['strconfdropoperator'] = 'Weet u zeker dat u de operator "%s" wilt verwijderen?'; + $lang['stroperatordropped'] = 'Operator verwijderd.'; + $lang['stroperatordroppedbad'] = 'Verwijderen van de operator mislukt.'; + $lang['strhelp'] = 'Help'; + +?> diff --git a/php/pgadmin/lang/english.php b/php/pgadmin/lang/english.php new file mode 100644 index 0000000..6ea8955 --- /dev/null +++ b/php/pgadmin/lang/english.php @@ -0,0 +1,1024 @@ +'; + $lang['strfirst'] = '<< First'; + $lang['strlast'] = 'Last >>'; + $lang['strfailed'] = 'Failed'; + $lang['strcreate'] = 'Create'; + $lang['strcreated'] = 'Created'; + $lang['strcomment'] = 'Comment'; + $lang['strlength'] = 'Length'; + $lang['strdefault'] = 'Default'; + $lang['stralter'] = 'Alter'; + $lang['strok'] = 'OK'; + $lang['strcancel'] = 'Cancel'; + $lang['strkill'] = 'Kill'; + $lang['strac'] = 'Enable AutoComplete'; + $lang['strsave'] = 'Save'; + $lang['strreset'] = 'Reset'; + $lang['strrestart'] = 'Restart'; + $lang['strinsert'] = 'Insert'; + $lang['strselect'] = 'Select'; + $lang['strdelete'] = 'Delete'; + $lang['strupdate'] = 'Update'; + $lang['strreferences'] = 'References'; + $lang['stryes'] = 'Yes'; + $lang['strno'] = 'No'; + $lang['strtrue'] = 'TRUE'; + $lang['strfalse'] = 'FALSE'; + $lang['stredit'] = 'Edit'; + $lang['strcolumn'] = 'Column'; + $lang['strcolumns'] = 'Columns'; + $lang['strrows'] = 'row(s)'; + $lang['strrowsaff'] = 'row(s) affected.'; + $lang['strobjects'] = 'object(s)'; + $lang['strback'] = 'Back'; + $lang['strqueryresults'] = 'Query Results'; + $lang['strshow'] = 'Show'; + $lang['strempty'] = 'Empty'; + $lang['strlanguage'] = 'Language'; + $lang['strencoding'] = 'Encoding'; + $lang['strvalue'] = 'Value'; + $lang['strunique'] = 'Unique'; + $lang['strprimary'] = 'Primary'; + $lang['strexport'] = 'Export'; + $lang['strimport'] = 'Import'; + $lang['strallowednulls'] = 'Allowed NULL characters'; + $lang['strbackslashn'] = '\N'; + $lang['stremptystring'] = 'Empty string/field'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = 'Admin'; + $lang['strvacuum'] = 'Vacuum'; + $lang['stranalyze'] = 'Analyze'; + $lang['strclusterindex'] = 'Cluster'; + $lang['strclustered'] = 'Clustered?'; + $lang['strreindex'] = 'Reindex'; + $lang['strexecute'] = 'Execute'; + $lang['stradd'] = 'Add'; + $lang['strevent'] = 'Event'; + $lang['strwhere'] = 'Where'; + $lang['strinstead'] = 'Do Instead'; + $lang['strwhen'] = 'When'; + $lang['strformat'] = 'Format'; + $lang['strdata'] = 'Data'; + $lang['strconfirm'] = 'Confirm'; + $lang['strexpression'] = 'Expression'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'Expand'; + $lang['strcollapse'] = 'Collapse'; + $lang['strfind'] = 'Find'; + $lang['stroptions'] = 'Options'; + $lang['strrefresh'] = 'Refresh'; + $lang['strdownload'] = 'Download'; + $lang['strdownloadgzipped'] = 'Download compressed with gzip'; + $lang['strinfo'] = 'Info'; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = 'Advanced'; + $lang['strvariables'] = 'Variables'; + $lang['strprocess'] = 'Process'; + $lang['strprocesses'] = 'Processes'; + $lang['strsetting'] = 'Setting'; + $lang['streditsql'] = 'Edit SQL'; + $lang['strruntime'] = 'Total runtime: %s ms'; + $lang['strpaginate'] = 'Paginate results'; + $lang['struploadscript'] = 'or upload an SQL script:'; + $lang['strstarttime'] = 'Start Time'; + $lang['strfile'] = 'File'; + $lang['strfileimported'] = 'File imported.'; + $lang['strtrycred'] = 'Use these credentials for all servers'; + $lang['strconfdropcred'] = 'For security reason, disconnecting will destroy your shared login information. Are you sure you want to disconnect ?'; + $lang['stractionsonmultiplelines'] = 'Actions on multiple lines'; + $lang['strselectall'] = 'Select all'; + $lang['strunselectall'] = 'Unselect all'; + $lang['strlocale'] = 'Locale'; + $lang['strcollation'] = 'Collation'; + $lang['strctype'] = 'Character Type'; + $lang['strdefaultvalues'] = 'Default values'; + $lang['strnewvalues'] = 'New values'; + $lang['strstart'] = 'Start'; + $lang['strstop'] = 'Stop'; + $lang['strgotoppage'] = 'back to top'; + $lang['strtheme'] = 'Theme'; + + // Admin + $lang['stradminondatabase'] = 'The following administrative tasks apply on the whole %s database.'; + $lang['stradminontable'] = 'The following administrative tasks apply on the table %s.'; + + // User-supplied SQL history + $lang['strhistory'] = 'History'; + $lang['strnohistory'] = 'No history.'; + $lang['strclearhistory'] = 'Clear history'; + $lang['strdelhistory'] = 'Delete from history'; + $lang['strconfdelhistory'] = 'Really remove this request from history?'; + $lang['strconfclearhistory'] = 'Really clear history?'; + $lang['strnodatabaseselected'] = 'Please, select a database.'; + + // Database sizes + $lang['strnoaccess'] = 'No Access'; + $lang['strsize'] = 'Size'; + $lang['strbytes'] = 'bytes'; + $lang['strkb'] = 'kB'; + $lang['strmb'] = 'MB'; + $lang['strgb'] = 'GB'; + $lang['strtb'] = 'TB'; + + // Error handling + $lang['strnoframes'] = 'This application works best with a frames-enabled browser, but can be used without frames by following the link below.'; + $lang['strnoframeslink'] = 'Use without frames'; + $lang['strbadconfig'] = 'Your config.inc.php is out of date. You will need to regenerate it from the new config.inc.php-dist.'; + $lang['strnotloaded'] = 'Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option.'; + $lang['strpostgresqlversionnotsupported'] = 'Version of PostgreSQL not supported. Please upgrade to version %s or later.'; + $lang['strbadschema'] = 'Invalid schema specified.'; + $lang['strbadencoding'] = 'Failed to set client encoding in database.'; + $lang['strsqlerror'] = 'SQL error:'; + $lang['strinstatement'] = 'In statement:'; + $lang['strinvalidparam'] = 'Invalid script parameters.'; + $lang['strnodata'] = 'No rows found.'; + $lang['strnoobjects'] = 'No objects found.'; + $lang['strrownotunique'] = 'No unique identifier for this row.'; + $lang['strnoreportsdb'] = 'You have not created the reports database. Read the INSTALL file for directions.'; + $lang['strnouploads'] = 'File uploads are disabled.'; + $lang['strimporterror'] = 'Import error.'; + $lang['strimporterror-fileformat'] = 'Import error: Failed to automatically determine the file format.'; + $lang['strimporterrorline'] = 'Import error on line %s.'; + $lang['strimporterrorline-badcolumnnum'] = 'Import error on line %s: Line does not possess the correct number of columns.'; + $lang['strimporterror-uploadedfile'] = 'Import error: File could not be uploaded to the server'; + $lang['strcannotdumponwindows'] = 'Dumping of complex table and schema names on Windows is not supported.'; + $lang['strinvalidserverparam'] = 'Attempt to connect with invalid server parameter, possibly someone is trying to hack your system.'; + $lang['strnoserversupplied'] = 'No server supplied!'; + $lang['strbadpgdumppath'] = 'Export error: Failed to execute pg_dump (given path in your conf/config.inc.php : %s). Please, fix this path in your configuration and relog.'; + $lang['strbadpgdumpallpath'] = 'Export error: Failed to execute pg_dumpall (given path in your conf/config.inc.php : %s). Please, fix this path in your configuration and relog.'; + $lang['strconnectionfail'] = 'Can not connect to server.'; + + // Tables + $lang['strtable'] = 'Table'; + $lang['strtables'] = 'Tables'; + $lang['strshowalltables'] = 'Show all tables'; + $lang['strnotables'] = 'No tables found.'; + $lang['strnotable'] = 'No table found.'; + $lang['strcreatetable'] = 'Create table'; + $lang['strcreatetablelike'] = 'Create table like'; + $lang['strcreatetablelikeparent'] = 'Source table'; + $lang['strcreatelikewithdefaults'] = 'INCLUDE DEFAULTS'; + $lang['strcreatelikewithconstraints'] = 'INCLUDE CONSTRAINTS'; + $lang['strcreatelikewithindexes'] = 'INCLUDE INDEXES'; + $lang['strtablename'] = 'Table name'; + $lang['strtableneedsname'] = 'You must give a name for your table.'; + $lang['strtablelikeneedslike'] = 'You must give a table to copy properties from.'; + $lang['strtableneedsfield'] = 'You must specify at least one field.'; + $lang['strtableneedscols'] = 'You must specify a valid number of columns.'; + $lang['strtablecreated'] = 'Table created.'; + $lang['strtablecreatedbad'] = 'Table creation failed.'; + $lang['strconfdroptable'] = 'Are you sure you want to drop the table "%s"?'; + $lang['strtabledropped'] = 'Table dropped.'; + $lang['strtabledroppedbad'] = 'Table drop failed.'; + $lang['strconfemptytable'] = 'Are you sure you want to empty the table "%s"?'; + $lang['strtableemptied'] = 'Table emptied.'; + $lang['strtableemptiedbad'] = 'Table empty failed.'; + $lang['strinsertrow'] = 'Insert row'; + $lang['strrowinserted'] = 'Row inserted.'; + $lang['strrowinsertedbad'] = 'Row insert failed.'; + $lang['strnofkref'] = 'There is no matching value in the foreign key %s.'; + $lang['strrowduplicate'] = 'Row insert failed, attempted to do duplicate insert.'; + $lang['streditrow'] = 'Edit row'; + $lang['strrowupdated'] = 'Row updated.'; + $lang['strrowupdatedbad'] = 'Row update failed.'; + $lang['strdeleterow'] = 'Delete Row'; + $lang['strconfdeleterow'] = 'Are you sure you want to delete this row?'; + $lang['strrowdeleted'] = 'Row deleted.'; + $lang['strrowdeletedbad'] = 'Row deletion failed.'; + $lang['strinsertandrepeat'] = 'Insert & Repeat'; + $lang['strnumcols'] = 'Number of columns'; + $lang['strcolneedsname'] = 'You must specify a name for the column'; + $lang['strselectallfields'] = 'Select all fields'; + $lang['strselectneedscol'] = 'You must show at least one column.'; + $lang['strselectunary'] = 'Unary operators cannot have values.'; + $lang['strcolumnaltered'] = 'Column altered.'; + $lang['strcolumnalteredbad'] = 'Column alteration failed.'; + $lang['strconfdropcolumn'] = 'Are you sure you want to drop column "%s" from table "%s"?'; + $lang['strcolumndropped'] = 'Column dropped.'; + $lang['strcolumndroppedbad'] = 'Column drop failed.'; + $lang['straddcolumn'] = 'Add column'; + $lang['strcolumnadded'] = 'Column added.'; + $lang['strcolumnaddedbad'] = 'Column add failed.'; + $lang['strcascade'] = 'CASCADE'; + $lang['strtablealtered'] = 'Table altered.'; + $lang['strtablealteredbad'] = 'Table alteration failed.'; + $lang['strdataonly'] = 'Data only'; + $lang['strstructureonly'] = 'Structure only'; + $lang['strstructureanddata'] = 'Structure and data'; + $lang['strtabbed'] = 'Tabbed'; + $lang['strauto'] = 'Auto'; + $lang['strconfvacuumtable'] = 'Are you sure you want to vacuum "%s"?'; + $lang['strconfanalyzetable'] = 'Are you sure you want to analyze "%s"?'; + $lang['strconfreindextable'] = 'Are you sure you want to reindex "%s"?'; + $lang['strconfclustertable'] = 'Are you sure you want to cluster "%s"?'; + $lang['strestimatedrowcount'] = 'Estimated row count'; + $lang['strspecifytabletoanalyze'] = 'You must specify at least one table to analyze.'; + $lang['strspecifytabletoempty'] = 'You must specify at least one table to empty.'; + $lang['strspecifytabletodrop'] = 'You must specify at least one table to drop.'; + $lang['strspecifytabletovacuum'] = 'You must specify at least one table to vacuum.'; + $lang['strspecifytabletoreindex'] = 'You must specify at least one table to reindex.'; + $lang['strspecifytabletocluster'] = 'You must specify at least one table to cluster.'; + $lang['strnofieldsforinsert'] = 'You cannot insert a row into a table with no column.'; + + // Columns + $lang['strcolprop'] = 'Column properties'; + $lang['strnotableprovided'] = 'No table provided!'; + + // Users + $lang['struser'] = 'User'; + $lang['strusers'] = 'Users'; + $lang['strusername'] = 'Username'; + $lang['strpassword'] = 'Password'; + $lang['strsuper'] = 'Superuser?'; + $lang['strcreatedb'] = 'Create DB?'; + $lang['strexpires'] = 'Expires'; + $lang['strsessiondefaults'] = 'Session defaults'; + $lang['strnousers'] = 'No users found.'; + $lang['struserupdated'] = 'User updated.'; + $lang['struserupdatedbad'] = 'User update failed.'; + $lang['strshowallusers'] = 'Show all users'; + $lang['strcreateuser'] = 'Create user'; + $lang['struserneedsname'] = 'You must give a name for your user.'; + $lang['strusercreated'] = 'User created.'; + $lang['strusercreatedbad'] = 'Failed to create user.'; + $lang['strconfdropuser'] = 'Are you sure you want to drop the user "%s"?'; + $lang['struserdropped'] = 'User dropped.'; + $lang['struserdroppedbad'] = 'Failed to drop user.'; + $lang['straccount'] = 'Account'; + $lang['strchangepassword'] = 'Change password'; + $lang['strpasswordchanged'] = 'Password changed.'; + $lang['strpasswordchangedbad'] = 'Failed to change password.'; + $lang['strpasswordshort'] = 'Password is too short.'; + $lang['strpasswordconfirm'] = 'Password does not match confirmation.'; + + // Groups + $lang['strgroup'] = 'Group'; + $lang['strgroups'] = 'Groups'; + $lang['strshowallgroups'] = 'Show all groups'; + $lang['strnogroup'] = 'Group not found.'; + $lang['strnogroups'] = 'No groups found.'; + $lang['strcreategroup'] = 'Create group'; + $lang['strgroupneedsname'] = 'You must give a name for your group.'; + $lang['strgroupcreated'] = 'Group created.'; + $lang['strgroupcreatedbad'] = 'Group creation failed.'; + $lang['strconfdropgroup'] = 'Are you sure you want to drop the group "%s"?'; + $lang['strgroupdropped'] = 'Group dropped.'; + $lang['strgroupdroppedbad'] = 'Group drop failed.'; + $lang['strmembers'] = 'Members'; + $lang['strmemberof'] = 'Member of'; + $lang['stradminmembers'] = 'Admin members'; + $lang['straddmember'] = 'Add member'; + $lang['strmemberadded'] = 'Member added.'; + $lang['strmemberaddedbad'] = 'Member add failed.'; + $lang['strdropmember'] = 'Drop member'; + $lang['strconfdropmember'] = 'Are you sure you want to drop the member "%s" from the group "%s"?'; + $lang['strmemberdropped'] = 'Member dropped.'; + $lang['strmemberdroppedbad'] = 'Member drop failed.'; + + // Roles + $lang['strrole'] = 'Role'; + $lang['strroles'] = 'Roles'; + $lang['strshowallroles'] = 'Show all roles'; + $lang['strnoroles'] = 'No roles found.'; + $lang['strinheritsprivs'] = 'Inherits privileges?'; + $lang['strcreaterole'] = 'Create role'; + $lang['strcancreaterole'] = 'Can create role?'; + $lang['strrolecreated'] = 'Role created.'; + $lang['strrolecreatedbad'] = 'Create role failed.'; + $lang['strrolealtered'] = 'Role altered.'; + $lang['strrolealteredbad'] = 'Role alter failed.'; + $lang['strcanlogin'] = 'Can login?'; + $lang['strconnlimit'] = 'Connection limit'; + $lang['strdroprole'] = 'Drop role'; + $lang['strconfdroprole'] = 'Are you sure you want to drop the role "%s"?'; + $lang['strroledropped'] = 'Role dropped.'; + $lang['strroledroppedbad'] = 'Role drop failed.'; + $lang['strnolimit'] = 'No limit'; + $lang['strnever'] = 'Never'; + $lang['strroleneedsname'] = 'You must give a name for the role.'; + + // Privileges + $lang['strprivilege'] = 'Privilege'; + $lang['strprivileges'] = 'Privileges'; + $lang['strnoprivileges'] = 'This object has default owner privileges.'; + $lang['strgrant'] = 'Grant'; + $lang['strrevoke'] = 'Revoke'; + $lang['strgranted'] = 'Privileges changed.'; + $lang['strgrantfailed'] = 'Failed to change privileges.'; + $lang['strgrantbad'] = 'You must specify at least one user or group and at least one privilege.'; + $lang['strgrantor'] = 'Grantor'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'Database'; + $lang['strdatabases'] = 'Databases'; + $lang['strshowalldatabases'] = 'Show all databases'; + $lang['strnodatabases'] = 'No databases found.'; + $lang['strcreatedatabase'] = 'Create database'; + $lang['strdatabasename'] = 'Database name'; + $lang['strdatabaseneedsname'] = 'You must give a name for your database.'; + $lang['strdatabasecreated'] = 'Database created.'; + $lang['strdatabasecreatedbad'] = 'Database creation failed.'; + $lang['strconfdropdatabase'] = 'Are you sure you want to drop the database "%s"?'; + $lang['strdatabasedropped'] = 'Database dropped.'; + $lang['strdatabasedroppedbad'] = 'Database drop failed.'; + $lang['strentersql'] = 'Enter the SQL to execute below:'; + $lang['strsqlexecuted'] = 'SQL executed.'; + $lang['strvacuumgood'] = 'Vacuum complete.'; + $lang['strvacuumbad'] = 'Vacuum failed.'; + $lang['stranalyzegood'] = 'Analyze complete.'; + $lang['stranalyzebad'] = 'Analyze failed.'; + $lang['strreindexgood'] = 'Reindex complete.'; + $lang['strreindexbad'] = 'Reindex failed.'; + $lang['strfull'] = 'Full'; + $lang['strfreeze'] = 'Freeze'; + $lang['strforce'] = 'Force'; + $lang['strsignalsent'] = 'Signal sent.'; + $lang['strsignalsentbad'] = 'Sending signal failed.'; + $lang['strallobjects'] = 'All objects'; + $lang['strdatabasealtered'] = 'Database altered.'; + $lang['strdatabasealteredbad'] = 'Database alter failed.'; + $lang['strspecifydatabasetodrop'] = 'You must specify at least one database to drop.'; + $lang['strtemplatedb'] = 'Template'; + $lang['strconfanalyzedatabase'] = 'Are you sure you want to analyze all tables in database "%s"?'; + $lang['strconfvacuumdatabase'] = 'Are you sure you want to vacuum all tables in database "%s"?'; + $lang['strconfreindexdatabase'] = 'Are you sure you want to reindex all tables in database "%s"?'; + $lang['strconfclusterdatabase'] = 'Are you sure you want to cluster all tables in database "%s"?'; + + // Views + $lang['strview'] = 'View'; + $lang['strviews'] = 'Views'; + $lang['strshowallviews'] = 'Show all views'; + $lang['strnoview'] = 'No view found.'; + $lang['strnoviews'] = 'No views found.'; + $lang['strcreateview'] = 'Create view'; + $lang['strviewname'] = 'View name'; + $lang['strviewneedsname'] = 'You must give a name for your view.'; + $lang['strviewneedsdef'] = 'You must give a definition for your view.'; + $lang['strviewneedsfields'] = 'You must give the columns you want selected in your view.'; + $lang['strviewcreated'] = 'View created.'; + $lang['strviewcreatedbad'] = 'View creation failed.'; + $lang['strconfdropview'] = 'Are you sure you want to drop the view "%s"?'; + $lang['strviewdropped'] = 'View dropped.'; + $lang['strviewdroppedbad'] = 'View drop failed.'; + $lang['strviewupdated'] = 'View updated.'; + $lang['strviewupdatedbad'] = 'View update failed.'; + $lang['strviewlink'] = 'Linking keys'; + $lang['strviewconditions'] = 'Additional conditions'; + $lang['strcreateviewwiz'] = 'Create view with wizard'; + $lang['strrenamedupfields'] = 'Rename duplicate fields'; + $lang['strdropdupfields'] = 'Drop duplicate fields'; + $lang['strerrordupfields'] = 'Error on duplicate fields'; + $lang['strviewaltered'] = 'View altered.'; + $lang['strviewalteredbad'] = 'View alteration failed.'; + $lang['strspecifyviewtodrop'] = 'You must specify at least one view to drop.'; + + // Sequences + $lang['strsequence'] = 'Sequence'; + $lang['strsequences'] = 'Sequences'; + $lang['strshowallsequences'] = 'Show all sequences'; + $lang['strnosequence'] = 'No sequence found.'; + $lang['strnosequences'] = 'No sequences found.'; + $lang['strcreatesequence'] = 'Create sequence'; + $lang['strlastvalue'] = 'Last value'; + $lang['strincrementby'] = 'Increment by'; + $lang['strstartvalue'] = 'Start value'; + $lang['strrestartvalue'] = 'Restart value'; + $lang['strmaxvalue'] = 'Max value'; + $lang['strminvalue'] = 'Min value'; + $lang['strcachevalue'] = 'Cache value'; + $lang['strlogcount'] = 'Log count'; + $lang['strcancycle'] = 'Can cycle?'; + $lang['striscalled'] = 'Will increment last value before returning next value (is_called)?'; + $lang['strsequenceneedsname'] = 'You must specify a name for your sequence.'; + $lang['strsequencecreated'] = 'Sequence created.'; + $lang['strsequencecreatedbad'] = 'Sequence creation failed.'; + $lang['strconfdropsequence'] = 'Are you sure you want to drop sequence "%s"?'; + $lang['strsequencedropped'] = 'Sequence dropped.'; + $lang['strsequencedroppedbad'] = 'Sequence drop failed.'; + $lang['strsequencerestart'] = 'Sequence restarted.'; + $lang['strsequencerestartbad'] = 'Sequence restart failed.'; + $lang['strsequencereset'] = 'Sequence reset.'; + $lang['strsequenceresetbad'] = 'Sequence reset failed.'; + $lang['strsequencealtered'] = 'Sequence altered.'; + $lang['strsequencealteredbad'] = 'Sequence alteration failed.'; + $lang['strsetval'] = 'Set value'; + $lang['strsequencesetval'] = 'Sequence value set.'; + $lang['strsequencesetvalbad'] = 'Sequence value set failed.'; + $lang['strnextval'] = 'Increment value'; + $lang['strsequencenextval'] = 'Sequence incremented.'; + $lang['strsequencenextvalbad'] = 'Sequence increment failed.'; + $lang['strspecifysequencetodrop'] = 'You must specify at least one sequence to drop.'; + + // Indexes + $lang['strindex'] = 'Index'; + $lang['strindexes'] = 'Indexes'; + $lang['strindexname'] = 'Index name'; + $lang['strshowallindexes'] = 'Show all indexes'; + $lang['strnoindex'] = 'No index found.'; + $lang['strnoindexes'] = 'No indexes found.'; + $lang['strcreateindex'] = 'Create index'; + $lang['strtabname'] = 'Tab name'; + $lang['strcolumnname'] = 'Column name'; + $lang['strindexneedsname'] = 'You must give a name for your index.'; + $lang['strindexneedscols'] = 'Indexes require a valid number of columns.'; + $lang['strindexcreated'] = 'Index created.'; + $lang['strindexcreatedbad'] = 'Index creation failed.'; + $lang['strconfdropindex'] = 'Are you sure you want to drop the index "%s"?'; + $lang['strindexdropped'] = 'Index dropped.'; + $lang['strindexdroppedbad'] = 'Index drop failed.'; + $lang['strkeyname'] = 'Key name'; + $lang['struniquekey'] = 'Unique key'; + $lang['strprimarykey'] = 'Primary key'; + $lang['strindextype'] = 'Type of index'; + $lang['strtablecolumnlist'] = 'Columns in table'; + $lang['strindexcolumnlist'] = 'Columns in index'; + $lang['strconfcluster'] = 'Are you sure you want to cluster on "%s"?'; + $lang['strclusteredgood'] = 'Cluster complete.'; + $lang['strclusteredbad'] = 'Cluster failed.'; + $lang['strconcurrently'] = 'Concurrently'; + $lang['strnoclusteravailable'] = 'Table not clustered on an index.'; + + // Rules + $lang['strrules'] = 'Rules'; + $lang['strrule'] = 'Rule'; + $lang['strshowallrules'] = 'Show all rules'; + $lang['strnorule'] = 'No rule found.'; + $lang['strnorules'] = 'No rules found.'; + $lang['strcreaterule'] = 'Create rule'; + $lang['strrulename'] = 'Rule name'; + $lang['strruleneedsname'] = 'You must specify a name for your rule.'; + $lang['strrulecreated'] = 'Rule created.'; + $lang['strrulecreatedbad'] = 'Rule creation failed.'; + $lang['strconfdroprule'] = 'Are you sure you want to drop the rule "%s" on "%s"?'; + $lang['strruledropped'] = 'Rule dropped.'; + $lang['strruledroppedbad'] = 'Rule drop failed.'; + + // Constraints + $lang['strconstraint'] = 'Constraint'; + $lang['strconstraints'] = 'Constraints'; + $lang['strshowallconstraints'] = 'Show all constraints'; + $lang['strnoconstraints'] = 'No constraints found.'; + $lang['strcreateconstraint'] = 'Create constraint'; + $lang['strconstraintcreated'] = 'Constraint created.'; + $lang['strconstraintcreatedbad'] = 'Constraint creation failed.'; + $lang['strconfdropconstraint'] = 'Are you sure you want to drop the constraint "%s" on "%s"?'; + $lang['strconstraintdropped'] = 'Constraint dropped.'; + $lang['strconstraintdroppedbad'] = 'Constraint drop failed.'; + $lang['straddcheck'] = 'Add check'; + $lang['strcheckneedsdefinition'] = 'Check constraint needs a definition.'; + $lang['strcheckadded'] = 'Check constraint added.'; + $lang['strcheckaddedbad'] = 'Failed to add check constraint.'; + $lang['straddpk'] = 'Add primary key'; + $lang['strpkneedscols'] = 'Primary key requires at least one column.'; + $lang['strpkadded'] = 'Primary key added.'; + $lang['strpkaddedbad'] = 'Failed to add primary key.'; + $lang['stradduniq'] = 'Add unique key'; + $lang['struniqneedscols'] = 'Unique key requires at least one column.'; + $lang['struniqadded'] = 'Unique key added.'; + $lang['struniqaddedbad'] = 'Failed to add unique key.'; + $lang['straddfk'] = 'Add foreign key'; + $lang['strfkneedscols'] = 'Foreign key requires at least one column.'; + $lang['strfkneedstarget'] = 'Foreign key requires a target table.'; + $lang['strfkadded'] = 'Foreign key added.'; + $lang['strfkaddedbad'] = 'Failed to add foreign key.'; + $lang['strfktarget'] = 'Target table'; + $lang['strfkcolumnlist'] = 'Columns in key'; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + + // Functions + $lang['strfunction'] = 'Function'; + $lang['strfunctions'] = 'Functions'; + $lang['strshowallfunctions'] = 'Show all functions'; + $lang['strnofunction'] = 'No function found.'; + $lang['strnofunctions'] = 'No functions found.'; + $lang['strcreateplfunction'] = 'Create SQL/PL function'; + $lang['strcreateinternalfunction'] = 'Create internal function'; + $lang['strcreatecfunction'] = 'Create C function'; + $lang['strfunctionname'] = 'Function name'; + $lang['strreturns'] = 'Returns'; + $lang['strproglanguage'] = 'Programming language'; + $lang['strfunctionneedsname'] = 'You must give a name for your function.'; + $lang['strfunctionneedsdef'] = 'You must give a definition for your function.'; + $lang['strfunctioncreated'] = 'Function created.'; + $lang['strfunctioncreatedbad'] = 'Function creation failed.'; + $lang['strconfdropfunction'] = 'Are you sure you want to drop the function "%s"?'; + $lang['strfunctiondropped'] = 'Function dropped.'; + $lang['strfunctiondroppedbad'] = 'Function drop failed.'; + $lang['strfunctionupdated'] = 'Function updated.'; + $lang['strfunctionupdatedbad'] = 'Function update failed.'; + $lang['strobjectfile'] = 'Object File'; + $lang['strlinksymbol'] = 'Link Symbol'; + $lang['strarguments'] = 'Arguments'; + $lang['strargmode'] = 'Mode'; + $lang['strargtype'] = 'Type'; + $lang['strargadd'] = 'Add another argument'; + $lang['strargremove'] = 'Remove this argument'; + $lang['strargnoargs'] = 'This function will not take any arguments.'; + $lang['strargenableargs'] = 'Enable arguments being passed to this function.'; + $lang['strargnorowabove'] = 'There needs to be a row above this row.'; + $lang['strargnorowbelow'] = 'There needs to be a row below this row.'; + $lang['strargraise'] = 'Move up.'; + $lang['strarglower'] = 'Move down.'; + $lang['strargremoveconfirm'] = 'Are you sure you want to remove this argument? This CANNOT be undone.'; + $lang['strfunctioncosting'] = 'Function Costing'; + $lang['strresultrows'] = 'Result Rows'; + $lang['strexecutioncost'] = 'Execution Cost'; + $lang['strspecifyfunctiontodrop'] = 'You must specify at least one function to drop.'; + + // Triggers + $lang['strtrigger'] = 'Trigger'; + $lang['strtriggers'] = 'Triggers'; + $lang['strshowalltriggers'] = 'Show all triggers'; + $lang['strnotrigger'] = 'No trigger found.'; + $lang['strnotriggers'] = 'No triggers found.'; + $lang['strcreatetrigger'] = 'Create trigger'; + $lang['strtriggerneedsname'] = 'You must specify a name for your trigger.'; + $lang['strtriggerneedsfunc'] = 'You must specify a function for your trigger.'; + $lang['strtriggercreated'] = 'Trigger created.'; + $lang['strtriggercreatedbad'] = 'Trigger creation failed.'; + $lang['strconfdroptrigger'] = 'Are you sure you want to drop the trigger "%s" on "%s"?'; + $lang['strconfenabletrigger'] = 'Are you sure you want to enable the trigger "%s" on "%s"?'; + $lang['strconfdisabletrigger'] = 'Are you sure you want to disable the trigger "%s" on "%s"?'; + $lang['strtriggerdropped'] = 'Trigger dropped.'; + $lang['strtriggerdroppedbad'] = 'Trigger drop failed.'; + $lang['strtriggerenabled'] = 'Trigger enabled.'; + $lang['strtriggerenabledbad'] = 'Trigger enable failed.'; + $lang['strtriggerdisabled'] = 'Trigger disabled.'; + $lang['strtriggerdisabledbad'] = 'Trigger disable failed.'; + $lang['strtriggeraltered'] = 'Trigger altered.'; + $lang['strtriggeralteredbad'] = 'Trigger alteration failed.'; + $lang['strforeach'] = 'For each'; + + // Types + $lang['strtype'] = 'Type'; + $lang['strtypes'] = 'Types'; + $lang['strshowalltypes'] = 'Show all types'; + $lang['strnotype'] = 'No type found.'; + $lang['strnotypes'] = 'No types found.'; + $lang['strcreatetype'] = 'Create type'; + $lang['strcreatecomptype'] = 'Create composite type'; + $lang['strcreateenumtype'] = 'Create enum type'; + $lang['strtypeneedsfield'] = 'You must specify at least one field.'; + $lang['strtypeneedsvalue'] = 'You must specify at least one value.'; + $lang['strtypeneedscols'] = 'You must specify a valid number of fields.'; + $lang['strtypeneedsvals'] = 'You must specify a valid number of values.'; + $lang['strinputfn'] = 'Input function'; + $lang['stroutputfn'] = 'Output function'; + $lang['strpassbyval'] = 'Passed by val?'; + $lang['stralignment'] = 'Alignment'; + $lang['strelement'] = 'Element'; + $lang['strdelimiter'] = 'Delimiter'; + $lang['strstorage'] = 'Storage'; + $lang['strfield'] = 'Field'; + $lang['strnumfields'] = 'Num. of fields'; + $lang['strnumvalues'] = 'Num. of values'; + $lang['strtypeneedsname'] = 'You must give a name for your type.'; + $lang['strtypeneedslen'] = 'You must give a length for your type.'; + $lang['strtypecreated'] = 'Type created.'; + $lang['strtypecreatedbad'] = 'Type creation failed.'; + $lang['strconfdroptype'] = 'Are you sure you want to drop the type "%s"?'; + $lang['strtypedropped'] = 'Type dropped.'; + $lang['strtypedroppedbad'] = 'Type drop failed.'; + $lang['strflavor'] = 'Flavor'; + $lang['strbasetype'] = 'Base'; + $lang['strcompositetype'] = 'Composite'; + $lang['strpseudotype'] = 'Pseudo'; + $lang['strenum'] = 'Enum'; + $lang['strenumvalues'] = 'Enum values'; + + // Schemas + $lang['strschema'] = 'Schema'; + $lang['strschemas'] = 'Schemas'; + $lang['strshowallschemas'] = 'Show all schemas'; + $lang['strnoschema'] = 'No schema found.'; + $lang['strnoschemas'] = 'No schemas found.'; + $lang['strcreateschema'] = 'Create schema'; + $lang['strschemaname'] = 'Schema name'; + $lang['strschemaneedsname'] = 'You must give a name for your schema.'; + $lang['strschemacreated'] = 'Schema created.'; + $lang['strschemacreatedbad'] = 'Schema creation failed.'; + $lang['strconfdropschema'] = 'Are you sure you want to drop the schema "%s"?'; + $lang['strschemadropped'] = 'Schema dropped.'; + $lang['strschemadroppedbad'] = 'Schema drop failed.'; + $lang['strschemaaltered'] = 'Schema altered.'; + $lang['strschemaalteredbad'] = 'Schema alteration failed.'; + $lang['strsearchpath'] = 'Schema search path'; + $lang['strspecifyschematodrop'] = 'You must specify at least one schema to drop.'; + + // Reports + $lang['strreport'] = 'Report'; + $lang['strreports'] = 'Reports'; + $lang['strshowallreports'] = 'Show all reports'; + $lang['strnoreports'] = 'No reports found.'; + $lang['strcreatereport'] = 'Create report'; + $lang['strreportdropped'] = 'Report dropped.'; + $lang['strreportdroppedbad'] = 'Report drop failed.'; + $lang['strconfdropreport'] = 'Are you sure you want to drop the report "%s"?'; + $lang['strreportneedsname'] = 'You must give a name for your report.'; + $lang['strreportneedsdef'] = 'You must give SQL for your report.'; + $lang['strreportcreated'] = 'Report saved.'; + $lang['strreportcreatedbad'] = 'Failed to save report.'; + + // Domains + $lang['strdomain'] = 'Domain'; + $lang['strdomains'] = 'Domains'; + $lang['strshowalldomains'] = 'Show all domains'; + $lang['strnodomains'] = 'No domains found.'; + $lang['strcreatedomain'] = 'Create domain'; + $lang['strdomaindropped'] = 'Domain dropped.'; + $lang['strdomaindroppedbad'] = 'Domain drop failed.'; + $lang['strconfdropdomain'] = 'Are you sure you want to drop the domain "%s"?'; + $lang['strdomainneedsname'] = 'You must give a name for your domain.'; + $lang['strdomaincreated'] = 'Domain created.'; + $lang['strdomaincreatedbad'] = 'Domain creation failed.'; + $lang['strdomainaltered'] = 'Domain altered.'; + $lang['strdomainalteredbad'] = 'Domain alteration failed.'; + + // Operators + $lang['stroperator'] = 'Operator'; + $lang['stroperators'] = 'Operators'; + $lang['strshowalloperators'] = 'Show all operators'; + $lang['strnooperator'] = 'No operator found.'; + $lang['strnooperators'] = 'No operators found.'; + $lang['strcreateoperator'] = 'Create operator'; + $lang['strleftarg'] = 'Left Arg Type'; + $lang['strrightarg'] = 'Right Arg Type'; + $lang['strcommutator'] = 'Commutator'; + $lang['strnegator'] = 'Negator'; + $lang['strrestrict'] = 'Restrict'; + $lang['strjoin'] = 'Join'; + $lang['strhashes'] = 'Hashes'; + $lang['strmerges'] = 'Merges'; + $lang['strleftsort'] = 'Left sort'; + $lang['strrightsort'] = 'Right sort'; + $lang['strlessthan'] = 'Less than'; + $lang['strgreaterthan'] = 'Greater than'; + $lang['stroperatorneedsname'] = 'You must give a name for your operator.'; + $lang['stroperatorcreated'] = 'Operator created.'; + $lang['stroperatorcreatedbad'] = 'Operator creation failed.'; + $lang['strconfdropoperator'] = 'Are you sure you want to drop the operator "%s"?'; + $lang['stroperatordropped'] = 'Operator dropped.'; + $lang['stroperatordroppedbad'] = 'Operator drop failed.'; + + // Casts + $lang['strcasts'] = 'Casts'; + $lang['strnocasts'] = 'No casts found.'; + $lang['strsourcetype'] = 'Source type'; + $lang['strtargettype'] = 'Target type'; + $lang['strimplicit'] = 'Implicit'; + $lang['strinassignment'] = 'In assignment'; + $lang['strbinarycompat'] = '(Binary compatible)'; + + // Conversions + $lang['strconversions'] = 'Conversions'; + $lang['strnoconversions'] = 'No conversions found.'; + $lang['strsourceencoding'] = 'Source encoding'; + $lang['strtargetencoding'] = 'Target encoding'; + + // Languages + $lang['strlanguages'] = 'Languages'; + $lang['strnolanguages'] = 'No languages found.'; + $lang['strtrusted'] = 'Trusted'; + + // Info + $lang['strnoinfo'] = 'No information available.'; + $lang['strreferringtables'] = 'Referring tables'; + $lang['strparenttables'] = 'Parent tables'; + $lang['strchildtables'] = 'Child tables'; + + // Aggregates + $lang['straggregate'] = 'Aggregate'; + $lang['straggregates'] = 'Aggregates'; + $lang['strnoaggregates'] = 'No aggregates found.'; + $lang['stralltypes'] = '(All types)'; + $lang['strcreateaggregate'] = 'Create aggregate'; + $lang['straggrbasetype'] = 'Input data type'; + $lang['straggrsfunc'] = 'State transition function'; + $lang['straggrstype'] = 'Data type for state value'; + $lang['straggrffunc'] = 'Final function'; + $lang['straggrinitcond'] = 'Initial condition'; + $lang['straggrsortop'] = 'Sort operator'; + $lang['strconfdropaggregate'] = 'Are you sure you want to drop the aggregate "%s"?'; + $lang['straggregatedropped'] = 'Aggregate dropped.'; + $lang['straggregatedroppedbad'] = 'Aggregate drop failed.'; + $lang['straggraltered'] = 'Aggregate altered.'; + $lang['straggralteredbad'] = 'Aggregate alteration failed.'; + $lang['straggrneedsname'] = 'You must specify a name for the aggregate.'; + $lang['straggrneedsbasetype'] = 'You must specify the input data type for the aggregate.'; + $lang['straggrneedssfunc'] = 'You must specify the name of the state transition function for the aggregate.'; + $lang['straggrneedsstype'] = 'You must specify the data type for the aggregate\'s state value.'; + $lang['straggrcreated'] = 'Aggregate created.'; + $lang['straggrcreatedbad'] = 'Aggregate creation failed.'; + $lang['straggrshowall'] = 'Show all aggregates'; + + // Operator Classes + $lang['stropclasses'] = 'Op Classes'; + $lang['strnoopclasses'] = 'No operator classes found.'; + $lang['straccessmethod'] = 'Access method'; + + // Stats and performance + $lang['strrowperf'] = 'Row Performance'; + $lang['strioperf'] = 'I/O Performance'; + $lang['stridxrowperf'] = 'Index Row Performance'; + $lang['stridxioperf'] = 'Index I/O Performance'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Sequential'; + $lang['strscan'] = 'Scan'; + $lang['strread'] = 'Read'; + $lang['strfetch'] = 'Fetch'; + $lang['strheap'] = 'Heap'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST Index'; + $lang['strcache'] = 'Cache'; + $lang['strdisk'] = 'Disk'; + $lang['strrows2'] = 'Rows'; + + // Tablespaces + $lang['strtablespace'] = 'Tablespace'; + $lang['strtablespaces'] = 'Tablespaces'; + $lang['strshowalltablespaces'] = 'Show all tablespaces'; + $lang['strnotablespaces'] = 'No tablespaces found.'; + $lang['strcreatetablespace'] = 'Create tablespace'; + $lang['strlocation'] = 'Location'; + $lang['strtablespaceneedsname'] = 'You must give a name for your tablespace.'; + $lang['strtablespaceneedsloc'] = 'You must give a directory in which to create the tablespace.'; + $lang['strtablespacecreated'] = 'Tablespace created.'; + $lang['strtablespacecreatedbad'] = 'Tablespace creation failed.'; + $lang['strconfdroptablespace'] = 'Are you sure you want to drop the tablespace "%s"?'; + $lang['strtablespacedropped'] = 'Tablespace dropped.'; + $lang['strtablespacedroppedbad'] = 'Tablespace drop failed.'; + $lang['strtablespacealtered'] = 'Tablespace altered.'; + $lang['strtablespacealteredbad'] = 'Tablespace alteration failed.'; + + // Slony clusters + $lang['strcluster'] = 'Cluster'; + $lang['strnoclusters'] = 'No clusters found.'; + $lang['strconfdropcluster'] = 'Are you sure you want to drop cluster "%s"?'; + $lang['strclusterdropped'] = 'Cluster dropped.'; + $lang['strclusterdroppedbad'] = 'Cluster drop failed.'; + $lang['strinitcluster'] = 'Initialize cluster'; + $lang['strclustercreated'] = 'Cluster initialized.'; + $lang['strclustercreatedbad'] = 'Cluster initialization failed.'; + $lang['strclusterneedsname'] = 'You must give a name for the cluster.'; + $lang['strclusterneedsnodeid'] = 'You must give an ID for the local node.'; + + // Slony nodes + $lang['strnodes'] = 'Nodes'; + $lang['strnonodes'] = 'No nodes found.'; + $lang['strcreatenode'] = 'Create node'; + $lang['strid'] = 'ID'; + $lang['stractive'] = 'Active'; + $lang['strnodecreated'] = 'Node created.'; + $lang['strnodecreatedbad'] = 'Node creation failed.'; + $lang['strconfdropnode'] = 'Are you sure you want to drop node "%s"?'; + $lang['strnodedropped'] = 'Node dropped.'; + $lang['strnodedroppedbad'] = 'Node drop failed.'; + $lang['strfailover'] = 'Failover'; + $lang['strnodefailedover'] = 'Node failed over.'; + $lang['strnodefailedoverbad'] = 'Node failover failed.'; + $lang['strstatus'] = 'Status'; + $lang['strhealthy'] = 'Healthy'; + $lang['stroutofsync'] = 'Out of sync'; + $lang['strunknown'] = 'Unknown'; + + // Slony paths + $lang['strpaths'] = 'Paths'; + $lang['strnopaths'] = 'No paths found.'; + $lang['strcreatepath'] = 'Create path'; + $lang['strnodename'] = 'Node name'; + $lang['strnodeid'] = 'Node ID'; + $lang['strconninfo'] = 'Connection string'; + $lang['strconnretry'] = 'Seconds before retry to connect'; + $lang['strpathneedsconninfo'] = 'You must give a connection string for the path.'; + $lang['strpathneedsconnretry'] = 'You must give the number of seconds to wait before retry to connect.'; + $lang['strpathcreated'] = 'Path created.'; + $lang['strpathcreatedbad'] = 'Path creation failed.'; + $lang['strconfdroppath'] = 'Are you sure you want to drop path "%s"?'; + $lang['strpathdropped'] = 'Path dropped.'; + $lang['strpathdroppedbad'] = 'Path drop failed.'; + + // Slony listens + $lang['strlistens'] = 'Listens'; + $lang['strnolistens'] = 'No listens found.'; + $lang['strcreatelisten'] = 'Create listen'; + $lang['strlistencreated'] = 'Listen created.'; + $lang['strlistencreatedbad'] = 'Listen creation failed.'; + $lang['strconfdroplisten'] = 'Are you sure you want to drop listen "%s"?'; + $lang['strlistendropped'] = 'Listen dropped.'; + $lang['strlistendroppedbad'] = 'Listen drop failed.'; + + // Slony replication sets + $lang['strrepsets'] = 'Replication sets'; + $lang['strnorepsets'] = 'No replication sets found.'; + $lang['strcreaterepset'] = 'Create replication set'; + $lang['strrepsetcreated'] = 'Replication set created.'; + $lang['strrepsetcreatedbad'] = 'Replication set creation failed.'; + $lang['strconfdroprepset'] = 'Are you sure you want to drop replication set "%s"?'; + $lang['strrepsetdropped'] = 'Replication set dropped.'; + $lang['strrepsetdroppedbad'] = 'Replication set drop failed.'; + $lang['strmerge'] = 'Merge'; + $lang['strmergeinto'] = 'Merge into'; + $lang['strrepsetmerged'] = 'Replication sets merged.'; + $lang['strrepsetmergedbad'] = 'Replication sets merge failed.'; + $lang['strmove'] = 'Move'; + $lang['strneworigin'] = 'New origin'; + $lang['strrepsetmoved'] = 'Replication set moved.'; + $lang['strrepsetmovedbad'] = 'Replication set move failed.'; + $lang['strnewrepset'] = 'New replication set'; + $lang['strlock'] = 'Lock'; + $lang['strlocked'] = 'Locked'; + $lang['strunlock'] = 'Unlock'; + $lang['strconflockrepset'] = 'Are you sure you want to lock replication set "%s"?'; + $lang['strrepsetlocked'] = 'Replication set locked.'; + $lang['strrepsetlockedbad'] = 'Replication set lock failed.'; + $lang['strconfunlockrepset'] = 'Are you sure you want to unlock replication set "%s"?'; + $lang['strrepsetunlocked'] = 'Replication set unlocked.'; + $lang['strrepsetunlockedbad'] = 'Replication set unlock failed.'; + $lang['stronlyonnode'] = 'Only on node'; + $lang['strddlscript'] = 'DDL script'; + $lang['strscriptneedsbody'] = 'You must supply a script to be executed on all nodes.'; + $lang['strscriptexecuted'] = 'Replication set DDL script executed.'; + $lang['strscriptexecutedbad'] = 'Failed executing replication set DDL script.'; + $lang['strtabletriggerstoretain'] = 'The following triggers will NOT be disabled by Slony:'; + + // Slony tables in replication sets + $lang['straddtable'] = 'Add table'; + $lang['strtableneedsuniquekey'] = 'Table to be added requires a primary or unique key.'; + $lang['strtableaddedtorepset'] = 'Table added to replication set.'; + $lang['strtableaddedtorepsetbad'] = 'Failed adding table to replication set.'; + $lang['strconfremovetablefromrepset'] = 'Are you sure you want to drop the table "%s" from replication set "%s"?'; + $lang['strtableremovedfromrepset'] = 'Table dropped from replication set.'; + $lang['strtableremovedfromrepsetbad'] = 'Failed to drop table from replication set.'; + + // Slony sequences in replication sets + $lang['straddsequence'] = 'Add sequence'; + $lang['strsequenceaddedtorepset'] = 'Sequence added to replication set.'; + $lang['strsequenceaddedtorepsetbad'] = 'Failed adding sequence to replication set.'; + $lang['strconfremovesequencefromrepset'] = 'Are you sure you want to drop the sequence "%s" from replication set "%s"?'; + $lang['strsequenceremovedfromrepset'] = 'Sequence dropped from replication set.'; + $lang['strsequenceremovedfromrepsetbad'] = 'Failed to drop sequence from replication set.'; + + // Slony subscriptions + $lang['strsubscriptions'] = 'Subscriptions'; + $lang['strnosubscriptions'] = 'No subscriptions found.'; + + // Miscellaneous + $lang['strtopbar'] = '%s running on %s:%s -- You are logged in as user "%s"'; + $lang['strtimefmt'] = 'jS M, Y g:iA'; + $lang['strhelp'] = 'Help'; + $lang['strhelpicon'] = '?'; + $lang['strhelppagebrowser'] = 'Help page browser'; + $lang['strselecthelppage'] = 'Select a help page'; + $lang['strinvalidhelppage'] = 'Invalid help page.'; + $lang['strlogintitle'] = 'Login to %s'; + $lang['strlogoutmsg'] = 'Logged out of %s'; + $lang['strloading'] = 'Loading...'; + $lang['strerrorloading'] = 'Error Loading'; + $lang['strclicktoreload'] = 'Click to reload'; + + // Autovacuum + $lang['strautovacuum'] = 'Autovacuum'; + $lang['strturnedon'] = 'Turned On'; + $lang['strturnedoff'] = 'Turned Off'; + $lang['strenabled'] = 'Enabled'; + $lang['strnovacuumconf'] = 'No autovacuum configuration found.'; + $lang['strvacuumbasethreshold'] = 'Vacuum Base Threshold'; + $lang['strvacuumscalefactor'] = 'Vacuum Scale Factor'; + $lang['stranalybasethreshold'] = 'Analyze Base Threshold'; + $lang['stranalyzescalefactor'] = 'Analyze Scale Factor'; + $lang['strvacuumcostdelay'] = 'Vacuum Cost Delay'; + $lang['strvacuumcostlimit'] = 'Vacuum Cost Limit'; + $lang['strvacuumpertable'] = 'Autovacuum setup per table'; + $lang['straddvacuumtable'] = 'Add autovacuum setup for a table'; + $lang['streditvacuumtable'] = 'Edit autovacuum setup for table %s'; + $lang['strdelvacuumtable'] = 'Delete autovacuum setup for table %s ?'; + $lang['strvacuumtablereset'] = 'Autovacuum setup for table %s reset to default values'; + $lang['strdelvacuumtablefail'] = 'Fail to remove the autovacuum setup for table %s'; + $lang['strsetvacuumtablesaved'] = 'Autovacuum setup for table %s saved.'; + $lang['strsetvacuumtablefail'] = 'Autovacuum setup for table %s failed.'; + $lang['strspecifydelvacuumtable'] = 'You must specify the table you want remove the autovacuum parameters from.'; + $lang['strspecifyeditvacuumtable'] = 'You must specify the table you want to edit the autovacuum parameters from.'; + $lang['strnotdefaultinred'] = 'Not default values are in red.'; + + // Table-level Locks + $lang['strlocks'] = 'Locks'; + $lang['strtransaction'] = 'Transaction ID'; + $lang['strvirtualtransaction'] = 'Virtual Transaction ID'; + $lang['strprocessid'] = 'Process ID'; + $lang['strmode'] = 'Lock mode'; + $lang['strislockheld'] = 'Is lock held?'; + + // Prepared transactions + $lang['strpreparedxacts'] = 'Prepared transactions'; + $lang['strxactid'] = 'Transaction ID'; + $lang['strgid'] = 'Global ID'; + + // Fulltext search + $lang['strfulltext'] = 'Full Text Search'; + $lang['strftsconfig'] = 'FTS configuration'; + $lang['strftsconfigs'] = 'Configurations'; + $lang['strftscreateconfig'] = 'Create FTS configuration'; + $lang['strftscreatedict'] = 'Create dictionary'; + $lang['strftscreatedicttemplate'] = 'Create dictionary template'; + $lang['strftscreateparser'] = 'Create parser'; + $lang['strftsnoconfigs'] = 'No FTS configuration found.'; + $lang['strftsconfigdropped'] = 'FTS configuration dropped.'; + $lang['strftsconfigdroppedbad'] = 'FTS configuration drop failed.'; + $lang['strconfdropftsconfig'] = 'Are you sure you want to drop the FTS configuration "%s"?'; + $lang['strconfdropftsdict'] = 'Are you sure you want to drop the FTS dictionary "%s"?'; + $lang['strconfdropftsmapping'] = 'Are you sure you want to drop mapping "%s" of FTS configuration "%s"?'; + $lang['strftstemplate'] = 'Template'; + $lang['strftsparser'] = 'Parser'; + $lang['strftsconfigneedsname'] = 'You must give a name for your FTS configuration.'; + $lang['strftsconfigcreated'] = 'FTS configuration created.'; + $lang['strftsconfigcreatedbad'] = 'FTS configuration creation failed.'; + $lang['strftsmapping'] = 'Mapping'; + $lang['strftsdicts'] = 'Dictionaries'; + $lang['strftsdict'] = 'Dictionary'; + $lang['strftsemptymap'] = 'Empty FTS configuration map.'; + $lang['strftsconfigaltered'] = 'FTS configuration altered.'; + $lang['strftsconfigalteredbad'] = 'FTS configuration alter failed.'; + $lang['strftsconfigmap'] = 'FTS configuration map'; + $lang['strftsparsers'] = 'FTS parsers'; + $lang['strftsnoparsers'] = 'No FTS parsers available.'; + $lang['strftsnodicts'] = 'No FTS dictionaries available.'; + $lang['strftsdictcreated'] = 'FTS dictionary created.'; + $lang['strftsdictcreatedbad'] = 'FTS dictionary creation failed.'; + $lang['strftslexize'] = 'Lexize'; + $lang['strftsinit'] = 'Init'; + $lang['strftsoptionsvalues'] = 'Options and values'; + $lang['strftsdictneedsname'] = 'You must give a name for your FTS dictionary.'; + $lang['strftsdictdropped'] = 'FTS dictionary dropped.'; + $lang['strftsdictdroppedbad'] = 'FTS dictionary drop failed.'; + $lang['strftsdictaltered'] = 'FTS dictionary altered.'; + $lang['strftsdictalteredbad'] = 'FTS dictionary alter failed.'; + $lang['strftsaddmapping'] = 'Add new mapping'; + $lang['strftsspecifymappingtodrop'] = 'You must specify at least one mapping to drop.'; + $lang['strftsspecifyconfigtoalter'] = 'You must specify a FTS configuration to alter'; + $lang['strftsmappingdropped'] = 'FTS mapping dropped.'; + $lang['strftsmappingdroppedbad'] = 'FTS mapping drop failed.'; + $lang['strftsnodictionaries'] = 'No dictionaries found.'; + $lang['strftsmappingaltered'] = 'FTS mapping altered.'; + $lang['strftsmappingalteredbad'] = 'FTS mapping alter failed.'; + $lang['strftsmappingadded'] = 'FTS mapping added.'; + $lang['strftsmappingaddedbad'] = 'FTS mapping add failed.'; + $lang['strftstabconfigs'] = 'Configurations'; + $lang['strftstabdicts'] = 'Dictionaries'; + $lang['strftstabparsers'] = 'Parsers'; + $lang['strftscantparsercopy'] = 'Can\'t specify both parser and template during text search configuration creation.'; +?> diff --git a/php/pgadmin/lang/french.php b/php/pgadmin/lang/french.php new file mode 100644 index 0000000..cb394b9 --- /dev/null +++ b/php/pgadmin/lang/french.php @@ -0,0 +1,1024 @@ +>'; + $lang['strfailed'] = 'chec'; + $lang['strcreate'] = 'Crer'; + $lang['strcreated'] = 'Cr'; + $lang['strcomment'] = 'Commentaire'; + $lang['strlength'] = 'Longueur'; + $lang['strdefault'] = 'Dfaut'; + $lang['stralter'] = 'Modifier'; + $lang['strok'] = 'OK'; + $lang['strcancel'] = 'Annuler'; + $lang['strkill'] = 'Tuer'; + $lang['strac'] = 'Activer la compltion automatique'; + $lang['strsave'] = 'Sauvegarder'; + $lang['strreset'] = 'Rinitialiser'; + $lang['strrestart'] = 'Redmarrer'; + $lang['strinsert'] = 'Insrer'; + $lang['strselect'] = 'Slectionner'; + $lang['strdelete'] = 'Effacer'; + $lang['strupdate'] = 'Modifier'; + $lang['strreferences'] = 'Rfrences'; + $lang['stryes'] = 'Oui'; + $lang['strno'] = 'Non'; + $lang['strtrue'] = 'TRUE'; + $lang['strfalse'] = 'FALSE'; + $lang['stredit'] = 'diter'; + $lang['strcolumn'] = 'Colonne'; + $lang['strcolumns'] = 'Colonnes'; + $lang['strrows'] = 'ligne(s)'; + $lang['strrowsaff'] = 'ligne(s) affecte(s).'; + $lang['strobjects'] = 'objet(s)'; + $lang['strback'] = 'Retour'; + $lang['strqueryresults'] = 'Rsultats de la requte'; + $lang['strshow'] = 'Voir'; + $lang['strempty'] = 'Vider'; + $lang['strlanguage'] = 'Langage'; + $lang['strencoding'] = 'Codage'; + $lang['strvalue'] = 'Valeur'; + $lang['strunique'] = 'Unique'; + $lang['strprimary'] = 'Primaire'; + $lang['strexport'] = 'Exporter'; + $lang['strimport'] = 'Importer'; + $lang['strallowednulls'] = 'Autoriser les caractres NULL'; + $lang['strbackslashn'] = '\N'; + $lang['stremptystring'] = 'Chane/champ vide'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = 'Admin'; + $lang['strvacuum'] = 'Vacuum'; + $lang['stranalyze'] = 'Analyze'; + $lang['strclusterindex'] = 'Cluster'; + $lang['strclustered'] = 'En Cluster ?'; + $lang['strreindex'] = 'Reindex'; + $lang['strexecute'] = 'Lancer'; + $lang['stradd'] = 'Ajouter'; + $lang['strevent'] = 'vnement'; + $lang['strwhere'] = 'O'; + $lang['strinstead'] = 'Faire la place'; + $lang['strwhen'] = 'Quand'; + $lang['strformat'] = 'Format'; + $lang['strdata'] = 'Donne'; + $lang['strconfirm'] = 'Confirmer'; + $lang['strexpression'] = 'Expression'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ' :'; + $lang['strexpand'] = 'tendre'; + $lang['strcollapse'] = 'Rduire'; + $lang['strfind'] = 'Rechercher'; + $lang['stroptions'] = 'Options'; + $lang['strrefresh'] = 'Rafraichir'; + $lang['strdownload'] = 'Tlcharger'; + $lang['strdownloadgzipped'] = 'Tlcharger avec compression gzip'; + $lang['strinfo'] = 'Info'; + $lang['stroids'] = 'OID'; + $lang['stradvanced'] = 'Avanc'; + $lang['strvariables'] = 'Variables'; + $lang['strprocess'] = 'Processus'; + $lang['strprocesses'] = 'Processus'; + $lang['strsetting'] = 'Paramtrage'; + $lang['streditsql'] = 'diter SQL'; + $lang['strruntime'] = 'Temps d\'excution total : %s ms'; + $lang['strpaginate'] = 'Paginer les rsultats'; + $lang['struploadscript'] = 'ou importer un script SQL :'; + $lang['strstarttime'] = 'Heure de dbut'; + $lang['strfile'] = 'Fichier'; + $lang['strfileimported'] = 'Fichier import.'; + $lang['strtrycred'] = 'Utilisez ces identifiants pour tous les serveurs'; + $lang['strconfdropcred'] = 'For security reason, disconnecting will destroy your shared login information. Are you sure you want to disconnect ?'; + $lang['strconfdropcred'] = 'Par mesure de scurit, la dconnexion supprimera le partage de vos identifiants pour tous les serveurs. tes-vous certain de vouloir vous dconnecter ?'; + $lang['stractionsonmultiplelines'] = 'Actions sur plusieurs lignes'; + $lang['strselectall'] = 'Slectionner tout'; + $lang['strunselectall'] = 'Deslectionner tout'; + $lang['strlocale'] = 'Locale'; + $lang['strcollation'] = 'Tri'; + $lang['strctype'] = 'Type de cartactre'; + $lang['strdefaultvalues'] = 'Valeurs par dfaut'; + $lang['strnewvalues'] = 'Nouvelles valeurs'; + $lang['strstart'] = 'Dmarrer'; + $lang['strstop'] = 'Arrter'; + $lang['strgotoppage'] = 'Haut de la page'; + $lang['strtheme'] = 'Thme'; + + // Admin + $lang['stradminondatabase'] = 'Les actions d\'administration suivantes s\'appliquent l\'ensemble de la base de donne %s.'; + $lang['stradminontable'] = 'Les actions d\'administration suivantes s\'appliquent la table %s.'; + + // User-supplied SQL history + $lang['strhistory'] = 'Historique'; + $lang['strnohistory'] = 'Pas d\'historique.'; + $lang['strclearhistory'] = 'ffacer l\'historique'; + $lang['strdelhistory'] = 'Supprimer de l\'historique'; + $lang['strconfdelhistory'] = 'Voulez-vous vraiment supprimer cette requte de l\'historique ?'; + $lang['strconfclearhistory'] = 'Voulez-vous vraiment ffacer l\'historique ?'; + $lang['strnodatabaseselected'] = 'Veuillez slectionner une base de donnes.'; + + // Database Sizes + $lang['strnoaccess'] = 'Pas d\'Accs'; + $lang['strsize'] = 'Taille'; + $lang['strbytes'] = 'octets'; + $lang['strkb'] = ' Ko'; + $lang['strmb'] = ' Mo'; + $lang['strgb'] = ' Go'; + $lang['strtb'] = ' To'; + + // Error handling + $lang['strnoframes'] = 'Cette application fonctionne mieux avec un navigateur pouvant afficher des frames mais peut tre utilise sans frames en suivant les liens ci-dessous.'; + $lang['strnoframeslink'] = 'Utiliser sans frames'; + $lang['strbadconfig'] = 'Le fichier de configuration config.inc.php est obsolte. Vous avez besoin de le regnrer partir de config.inc.php-dist.'; + $lang['strnotloaded'] = 'Vous n\'avez pas compil correctement le support de la base de donnes dans votre installation de PHP.'; + $lang['strpostgresqlversionnotsupported'] = 'Cette version de PostgreSQL n\'est pas supporte. Merci de mettre jour PHP la version %s ou ultrieure.'; + $lang['strbadschema'] = 'Schma spcifi invalide.'; + $lang['strbadencoding'] = 'Impossible de spcifier l\'encodage de la base de donnes.'; + $lang['strsqlerror'] = 'Erreur SQL :'; + $lang['strinstatement'] = 'Dans l\'instruction :'; + $lang['strinvalidparam'] = 'Paramtres de script invalides.'; + $lang['strnodata'] = 'Pas de rsultats.'; + $lang['strnoobjects'] = 'Aucun objet trouv.'; + $lang['strrownotunique'] = 'Pas d\'identifiant unique pour cette ligne.'; + $lang['strnoreportsdb'] = 'Vous n\'avez pas cr la base de donnes reports. Lisez le fichier INSTALL pour en savoir plus.'; + $lang['strnouploads'] = 'Importation de fichiers dsactive.'; + $lang['strimporterror'] = 'Erreur d\'importation.'; + $lang['strimporterror-fileformat'] = 'Erreur d\'importation : chec lors de la dtermination automatique du format de fichier.'; + $lang['strimporterrorline'] = 'Erreur d\'importation la ligne %s.'; + $lang['strimporterrorline-badcolumnnum'] = 'Erreur d\'importation sur la ligne %s : la ligne ne possde pas le bon nombre de colonnes.'; + $lang['strimporterror-uploadedfile'] = 'Erreur d\'importation : le fichier n\'a pas p tre rcupr sur le serveur.'; + $lang['strcannotdumponwindows'] = 'La sauvegarde de table complexe et des noms de schmas n\'est pas support sur Windows.'; + $lang['strinvalidserverparam'] = 'Tentative de connexion avec un serveur invalide, il est possible que quelqu\'un essai de pirater votre systme.'; + $lang['strnoserversupplied'] = 'Aucun serveur fournis !'; + $lang['strbadpgdumppath'] = 'Erreur d\'export : n\'a pu excuter pg_dump (chemin indiqu dans votre conf/config.inc.php : %s). Merci de corriger le chemin dans votre configuration et de vous reconnecter.'; + $lang['strbadpgdumpallpath'] = 'Erreur d\'export : n\'a pu excuter pg_dumpall (chemin indiqu dans votre conf/config.inc.php : %s). Merci de corriger le chemin dans votre configuration et de vous reconnecter.'; + $lang['strconnectionfail'] = 'Connexion au serveur choue.'; + + // Tables + $lang['strtable'] = 'Table'; + $lang['strtables'] = 'Tables'; + $lang['strshowalltables'] = 'Voir toutes les tables'; + $lang['strnotables'] = 'Aucune table trouve.'; + $lang['strnotable'] = 'Aucune table trouve.'; + $lang['strcreatetable'] = 'Crer une table'; + $lang['strcreatetablelike'] = 'Crer une table d\'aprs une table existante'; + $lang['strcreatetablelikeparent'] = 'Table modle'; + $lang['strcreatelikewithdefaults'] = 'inclure les valeurs par dfaut.'; + $lang['strcreatelikewithconstraints'] = 'inclure les contraintes.'; + $lang['strcreatelikewithindexes'] = 'inclure les indexes.'; + $lang['strtablename'] = 'Nom de la table'; + $lang['strtableneedsname'] = 'Vous devez donner un nom pour votre table.'; + $lang['strtablelikeneedslike'] = 'Vous devez prciser une table modle.'; + $lang['strtableneedsfield'] = 'Vous devez spcifier au moins un champ.'; + $lang['strtableneedscols'] = 'Vous devez indiquer un nombre valide de colonnes.'; + $lang['strtablecreated'] = 'Table cre.'; + $lang['strtablecreatedbad'] = 'chec de la cration de table.'; + $lang['strconfdroptable'] = 'tes-vous sur de vouloir supprimer la table %s ?'; + $lang['strtabledropped'] = 'Table supprime.'; + $lang['strtabledroppedbad'] = 'chec lors de la suppression de table.'; + $lang['strconfemptytable'] = 'tes-vous sr de vouloir vider la table %s ?'; + $lang['strtableemptied'] = 'Table vide.'; + $lang['strtableemptiedbad'] = 'chec du vidage de la table.'; + $lang['strinsertrow'] = 'Insrer un enregistrement.'; + $lang['strrowinserted'] = 'Enregistrement insr.'; + $lang['strrowinsertedbad'] = 'chec lors de l\'insertion d\'un enregistrement.'; + $lang['strnofkref'] = 'Aucune valeur correspondate pour la cl trangre %s.'; + $lang['strrowduplicate'] = 'chec lors de l\'insertion d\'un enregistrement, a tent de faire une insertion duplique.'; + $lang['streditrow'] = 'diter l\'enregistrement.'; + $lang['strrowupdated'] = 'Enregistrement mis jour.'; + $lang['strrowupdatedbad'] = 'chec de mise jour de l\'enregistrement.'; + $lang['strdeleterow'] = 'Effacer l\'enregistrement'; + $lang['strconfdeleterow'] = 'tes-vous sr de vouloir supprimer cet enregistrement ?'; + $lang['strrowdeleted'] = 'Enregistrement supprim.'; + $lang['strrowdeletedbad'] = 'chec lors de la suppression de l\'enregistrement.'; + $lang['strinsertandrepeat'] = 'Insrer et rpter'; + $lang['strnumcols'] = 'Nombre de colonnes'; + $lang['strcolneedsname'] = 'Vous devez spcifier un nom pour la colonne'; + $lang['strselectallfields'] = 'Slectionner tous les champs'; + $lang['strselectneedscol'] = 'Vous devez slectionner au moins une colonne.'; + $lang['strselectunary'] = 'Les oprateurs unaires ne peuvent avoir de valeurs.'; + $lang['strcolumnaltered'] = 'Colonne modifie.'; + $lang['strcolumnalteredbad'] = 'chec lors de la modification de la colonne.'; + $lang['strconfdropcolumn'] = 'tes-vous sr de vouloir supprimer la colonne %s de la table %s ?'; + $lang['strcolumndropped'] = 'Colonne supprime.'; + $lang['strcolumndroppedbad'] = 'chec lors de la suppression de la colonne.'; + $lang['straddcolumn'] = 'Ajouter une colonne'; + $lang['strcolumnadded'] = 'Colonne ajoute.'; + $lang['strcolumnaddedbad'] = 'chec lors de l\'ajout de la colonne.'; + $lang['strcascade'] = 'CASCADE'; + $lang['strtablealtered'] = 'Table modifie.'; + $lang['strtablealteredbad'] = 'chec lors de la modification de la table.'; + $lang['strdataonly'] = 'Donnes seulement'; + $lang['strstructureonly'] = 'Structure seulement'; + $lang['strstructureanddata'] = 'Structure et donnes'; + $lang['strtabbed'] = 'Tabul'; + $lang['strauto'] = 'Auto'; + $lang['strconfvacuumtable'] = 'tes-vous sr de vouloir faire un vacuum de %s ?'; + $lang['strconfanalyzetable'] = 'tes-vous sr de vouloir ffectuer un ANALYZE sur %s ?'; + $lang['strconfreindextable'] = 'tes-vous sr de vouloir rindexer %s ?'; + $lang['strconfclustertable'] = 'tes-vous sr de vouloir lancer un CLUSTER sur %s ?'; + $lang['strestimatedrowcount'] = 'Nombre d\'enregistrements estims'; + $lang['strspecifytabletoanalyze'] = 'Vous devez spcifier au moins une table analyzer'; + $lang['strspecifytabletoempty'] = 'Vous devez spcifier au moins une table vider'; + $lang['strspecifytabletodrop'] = 'Vous devez spcifier au moins une table supprimer'; + $lang['strspecifytabletovacuum'] = 'Vous devez spcifier au moins une table sur laquelle ffectuer le vacuum'; + $lang['strspecifytabletoreindex'] = 'Vous devez spcifier au moins une table rindexer.'; + $lang['strspecifytabletocluster'] = 'Vous devez spcifier au moins une table sur laquelle ffectuer la commande CLUSTER.'; + $lang['strnofieldsforinsert'] = 'Vous ne pouvez insrer de donnes dans une table sans champs.'; + + // Columns + $lang['strcolprop'] = 'Proprits de la Colonne'; + $lang['strnotableprovided'] = 'Aucune table fournie !'; + + // Users + $lang['struser'] = 'Utilisateur'; + $lang['strusers'] = 'Utilisateurs'; + $lang['strusername'] = 'Utilisateur'; + $lang['strpassword'] = 'Mot de passe'; + $lang['strsuper'] = 'Super utilisateur ?'; + $lang['strcreatedb'] = 'Crer base de donnes ?'; + $lang['strexpires'] = 'Expiration'; + $lang['strsessiondefaults'] = 'Session par dfaut'; + $lang['strnousers'] = 'Aucun utilisateur trouv.'; + $lang['struserupdated'] = 'Utilisateur mis jour.'; + $lang['struserupdatedbad'] = 'chec lors de la mise jour de l\'utilisateur.'; + $lang['strshowallusers'] = 'Voir tous les utilisateurs'; + $lang['strcreateuser'] = 'Crer un utilisateur'; + $lang['struserneedsname'] = 'Vous devez donner un nom pour votre utilisateur.'; + $lang['strusercreated'] = 'Utilisateur cr.'; + $lang['strusercreatedbad'] = 'chec lors de la cration de l\'utilisateur.'; + $lang['strconfdropuser'] = 'tes-vous sr de vouloir supprimer l\'utilisateur %s ?'; + $lang['struserdropped'] = 'Utilisateur supprim.'; + $lang['struserdroppedbad'] = 'chec lors de la suppression de l\'utilisateur.'; + $lang['straccount'] = 'Comptes'; + $lang['strchangepassword'] = 'Modifier le mot de passe'; + $lang['strpasswordchanged'] = 'Mot de passe modifi.'; + $lang['strpasswordchangedbad'] = 'chec lors de la modification du mot de passe.'; + $lang['strpasswordshort'] = 'Le mot de passe est trop court.'; + $lang['strpasswordconfirm'] = 'Le mot de passe de confirmation est diffrent.'; + + // Groups + $lang['strgroup'] = 'Groupe'; + $lang['strgroups'] = 'Groupes'; + $lang['strshowallgroups'] = 'Afficher tous les groupes'; + $lang['strnogroup'] = 'Groupe introuvable.'; + $lang['strnogroups'] = 'Aucun groupe trouv.'; + $lang['strcreategroup'] = 'Crer un groupe'; + $lang['strgroupneedsname'] = 'Vous devez indiquer un nom pour votre groupe.'; + $lang['strgroupcreated'] = 'Groupe cr.'; + $lang['strgroupcreatedbad'] = 'chec lors de la cration du groupe.'; + $lang['strconfdropgroup'] = 'tes-vous sr de vouloir supprimer le groupe %s ?'; + $lang['strgroupdropped'] = 'Groupe supprim.'; + $lang['strgroupdroppedbad'] = 'chec lors de la suppression du groupe.'; + $lang['strmembers'] = 'Membres'; + $lang['strmemberof'] = 'Membre de'; + $lang['stradminmembers'] = 'Membres admin'; + $lang['straddmember'] = 'Ajouter un membre'; + $lang['strmemberadded'] = 'Membre ajout.'; + $lang['strmemberaddedbad'] = 'chec lors de l\'ajout du membre.'; + $lang['strdropmember'] = 'Supprimer un membre'; + $lang['strconfdropmember'] = 'tes-vous sr de vouloir supprimer le membre %s du groupe %s ?'; + $lang['strmemberdropped'] = 'Membre supprim.'; + $lang['strmemberdroppedbad'] = 'chec lors de la suppression du membre.'; + + // Roles + $lang['strrole'] = 'Rle'; + $lang['strroles'] = 'Rles'; + $lang['strshowallroles'] = 'Afficher tous les rles'; + $lang['strnoroles'] = 'Aucun rle trouv.'; + $lang['strinheritsprivs'] = 'Hrite des droits ?'; + $lang['strcreaterole'] = 'Crer un rle'; + $lang['strcancreaterole'] = 'Peut crer un rle ?'; + $lang['strrolecreated'] = 'Rle cr.'; + $lang['strrolecreatedbad'] = 'chec lors de la cration du rle.'; + $lang['strrolealtered'] = 'Rle modifi.'; + $lang['strrolealteredbad'] = 'chec lors de la modification du rle.'; + $lang['strcanlogin'] = 'Peut se connecter ?'; + $lang['strconnlimit'] = 'Limite de connexion'; + $lang['strdroprole'] = 'Supprimer un rle'; + $lang['strconfdroprole'] = 'tes-vous sr de vouloir supprimer le rle %s ?'; + $lang['strroledropped'] = 'Rle supprim.'; + $lang['strroledroppedbad'] = 'chec lors de la suppression du rle.'; + $lang['strnolimit'] = 'Aucune limite'; + $lang['strnever'] = 'Jamais'; + $lang['strroleneedsname'] = 'Vous devez donner un nom ce rle.'; + + // Privileges + $lang['strprivilege'] = 'Droit'; + $lang['strprivileges'] = 'Droits'; + $lang['strnoprivileges'] = 'Cet objet possde les droits par dfault.'; + $lang['strgrant'] = 'Accorder (GRANT)'; + $lang['strrevoke'] = 'Rvoquer (REVOKE)'; + $lang['strgranted'] = 'Droits accords.'; + $lang['strgrantfailed'] = 'chec lors de l\'octroi des droits.'; + $lang['strgrantbad'] = 'Vous devez spcifier au moins un utilisateur ou groupe et au moins un droit.'; + $lang['strgrantor'] = 'Grantor'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'Base de donnes'; + $lang['strdatabases'] = 'Bases de donnes'; + $lang['strshowalldatabases'] = 'Voir toutes les bases de donnes'; + $lang['strnodatabases'] = 'Aucune base de donnes trouve.'; + $lang['strcreatedatabase'] = 'Crer une base de donnes'; + $lang['strdatabasename'] = 'Nom de la base de donnes'; + $lang['strdatabaseneedsname'] = 'Vous devez donner un nom pour votre base de donnes.'; + $lang['strdatabasecreated'] = 'Base de donnes cre.'; + $lang['strdatabasecreatedbad'] = 'chec lors de la cration de la base de donnes.'; + $lang['strconfdropdatabase'] = 'tes-vous sr de vouloir supprimer la base de donnes %s ?'; + $lang['strdatabasedropped'] = 'Base de donnes supprime.'; + $lang['strdatabasedroppedbad'] = 'chec lors de la suppression de la base de donnes.'; + $lang['strentersql'] = 'Veuillez saisir ci-dessous la requte SQL excuter :'; + $lang['strsqlexecuted'] = 'Requte SQL excute.'; + $lang['strvacuumgood'] = 'Vacuum excut.'; + $lang['strvacuumbad'] = 'chec du Vacuum.'; + $lang['stranalyzegood'] = 'Analyse effectue.'; + $lang['stranalyzebad'] = 'chec de l\'analyse.'; + $lang['strreindexgood'] = 'Rindexation excute.'; + $lang['strreindexbad'] = 'chec de la rindexation.'; + $lang['strfull'] = 'Intgral (FULL)'; + $lang['strfreeze'] = 'Freeze'; + $lang['strforce'] = 'Forcer'; + $lang['strsignalsent'] = 'Signal envoy.'; + $lang['strsignalsentbad'] = 'chec lors de l\'envoi du signal.'; + $lang['strallobjects'] = 'Tous les objets'; + $lang['strdatabasealtered'] = 'Base de donnes modifie.'; + $lang['strdatabasealteredbad'] = 'chec lors de la modification de la base de donnes.'; + $lang['strspecifydatabasetodrop'] = 'Vous devez spcifier au moins une base de donnes supprimer'; + $lang['strtemplatedb'] = 'Modle'; + $lang['strconfanalyzedatabase'] = 'tes vous sr de vouloir ffectuer un ANALYZE sur toutes les tables de la base de donnes %s ?'; + $lang['strconfvacuumdatabase'] = 'tes vous sr de vouloir ffectuer un VACUUM sur toutes les tables de la base de donnes %s ?'; + $lang['strconfreindexdatabase'] = 'tes vous sr de vouloir rindexer toutes les tables de la base de donnes %s ?'; + $lang['strconfclusterdatabase'] = 'tes vous sr de vouloir ffectuer un CLUSTER sur toutes les tables de la base de donnes %s ?'; + + // Views + $lang['strview'] = 'Vue'; + $lang['strviews'] = 'Vues'; + $lang['strshowallviews'] = 'Voir toutes les vues'; + $lang['strnoview'] = 'Aucne vue trouve.'; + $lang['strnoviews'] = 'Aucune vue trouve.'; + $lang['strcreateview'] = 'Crer une vue'; + $lang['strviewname'] = 'Nom de la vue'; + $lang['strviewneedsname'] = 'Vous devez indiquer un nom pour votre vue.'; + $lang['strviewneedsdef'] = 'Vous devez indiquer une dfinition pour votre vue.'; + $lang['strviewneedsfields'] = 'Vous devez prciser les colonnes que vous voulez slectionner dans votre vue.'; + $lang['strviewcreated'] = 'Vue cre.'; + $lang['strviewcreatedbad'] = 'chec lors de la cration de la vue.'; + $lang['strconfdropview'] = 'tes-vous sr de vouloir supprimer la vue %s ?'; + $lang['strviewdropped'] = 'Vue supprime.'; + $lang['strviewdroppedbad'] = 'chec lors de la suppression de la vue.'; + $lang['strviewupdated'] = 'Vue mise jour.'; + $lang['strviewupdatedbad'] = 'chec lors de la mise jour de la vue.'; + $lang['strviewlink'] = 'Cls lies'; + $lang['strviewconditions'] = 'Conditions supplmentaires'; + $lang['strcreateviewwiz'] = 'Crer une vue avec l\'assistant'; + $lang['strrenamedupfields'] = 'Renommer les champs dupliqus'; + $lang['strdropdupfields'] = 'Ignorer les champs dupliqus'; + $lang['strerrordupfields'] = 'Erreur en cas de champs dupliqus'; + $lang['strviewaltered'] = 'Vue modifie.'; + $lang['strviewalteredbad'] = 'chec lors de la modification de la vue.'; + $lang['strspecifyviewtodrop'] = 'Vous devez spcifier au moins une vue supprimer.'; + + // Sequences + $lang['strsequence'] = 'Squence'; + $lang['strsequences'] = 'Squences'; + $lang['strshowallsequences'] = 'Voir toutes les squences'; + $lang['strnosequence'] = 'Aucune squence trouve.'; + $lang['strnosequences'] = 'Aucune squence trouve.'; + $lang['strcreatesequence'] = 'Crer une squence'; + $lang['strlastvalue'] = 'Dernire valeur'; + $lang['strincrementby'] = 'Incrmenter par '; + $lang['strstartvalue'] = 'Valeur de dpart'; + $lang['strrestartvalue'] = 'Valeur de redmarrage'; + $lang['strmaxvalue'] = 'Valeur maximale'; + $lang['strminvalue'] = 'Valeur minimale'; + $lang['strcachevalue'] = 'Valeur de cache'; + $lang['strlogcount'] = 'Comptage'; + $lang['strcancycle'] = 'Peut boucler?'; + $lang['striscalled'] = 'Incrmentera la dernire valeur avant de retourner la prochaine valeur (is_called) ?'; + $lang['strsequenceneedsname'] = 'Vous devez spcifier un nom pour votre squence.'; + $lang['strsequencecreated'] = 'Squence cre.'; + $lang['strsequencecreatedbad'] = 'chec lors de la cration de la squence.'; + $lang['strconfdropsequence'] = 'tes-vous sr de vouloir supprimer la squence %s ?'; + $lang['strsequencedropped'] = 'Squence supprime.'; + $lang['strsequencedroppedbad'] = 'chec lors de la suppression de la squence.'; + $lang['strsequencerestart'] = 'Squence redmarre.'; + $lang['strsequencerestartbad'] = 'chec tu redmarrage de la squence.'; + $lang['strsequencereset'] = 'Squence initialise.'; + $lang['strsequenceresetbad'] = 'chec lors de l\'initialisation de la squence.'; + $lang['strsequencealtered'] = 'Squence modifie.'; + $lang['strsequencealteredbad'] = 'chec lors de la modification de la squence.'; + $lang['strsetval'] = 'Initialiser une valeur'; + $lang['strsequencesetval'] = 'Squence initialise.'; + $lang['strsequencesetvalbad'] = 'chec lors de l\'initialisation de la squence.'; + $lang['strnextval'] = 'Incrmenter la valeur'; + $lang['strsequencenextval'] = 'Squence incrmente.'; + $lang['strsequencenextvalbad'] = 'chec lors de l\'incrmentation de la valeur.'; + $lang['strspecifysequencetodrop'] = 'Vous devez spcifier au moins une squence supprimer.'; + + // Indexes + $lang['strindex'] = 'Index'; + $lang['strindexes'] = 'Index'; + $lang['strindexname'] = 'Nom de l\'index'; + $lang['strshowallindexes'] = 'Voir tous les index'; + $lang['strnoindex'] = 'Aucun index trouv.'; + $lang['strnoindexes'] = 'Aucun index trouv.'; + $lang['strcreateindex'] = 'Crer un index'; + $lang['strtabname'] = 'Nom de la table'; + $lang['strcolumnname'] = 'Nom de la colonne'; + $lang['strindexneedsname'] = 'Vous devez indiquer un nom pour votre index'; + $lang['strindexneedscols'] = 'Vous devez indiquer un nombre valide de colonnes.'; + $lang['strindexcreated'] = 'Index cr'; + $lang['strindexcreatedbad'] = 'chec lors de la cration de l\'index.'; + $lang['strconfdropindex'] = 'tes-vous sr de vouloir supprimer l\'index %s ?'; + $lang['strindexdropped'] = 'Index supprim.'; + $lang['strindexdroppedbad'] = 'chec lors de la suppression de l\'index.'; + $lang['strkeyname'] = 'Nom de la cl'; + $lang['struniquekey'] = 'Cl unique'; + $lang['strprimarykey'] = 'Cl primaire'; + $lang['strindextype'] = 'Type d\'index'; + $lang['strtablecolumnlist'] = 'Liste des colonnes'; + $lang['strindexcolumnlist'] = 'Liste des colonnes dans l\'index'; + $lang['strclusteredgood'] = 'Cluster effectu.'; + $lang['strclusteredbad'] = 'chec du cluster.'; + $lang['strconcurrently'] = 'En parallle'; + $lang['strnoclusteravailable'] = 'La table n\'est pas encore ordonne selon un index.'; + + // Rules + $lang['strrules'] = 'Rgles'; + $lang['strrule'] = 'Rgle'; + $lang['strshowallrules'] = 'Voir toutes les rgles'; + $lang['strnorule'] = 'Aucune rgle trouve.'; + $lang['strnorules'] = 'Aucune rgle trouve.'; + $lang['strcreaterule'] = 'Crer une rgle'; + $lang['strrulename'] = 'Nom de la rgle'; + $lang['strruleneedsname'] = 'Vous devez indiquer un nom pour votre rgle.'; + $lang['strrulecreated'] = 'Rgle cre.'; + $lang['strrulecreatedbad'] = 'chec lors de la cration de la rgle.'; + $lang['strconfdroprule'] = 'tes-vous sr de vouloir supprimer la rgle %s sur %s ?'; + $lang['strruledropped'] = 'Rgle supprime.'; + $lang['strruledroppedbad'] = 'chec lors de la suppression de la rgle.'; + + // Constraints + $lang['strconstraint'] = 'Contrainte'; + $lang['strconstraints'] = 'Contraintes'; + $lang['strshowallconstraints'] = 'Voir toutes les contraintes'; + $lang['strnoconstraints'] = 'Aucune contrainte trouve.'; + $lang['strcreateconstraint'] = 'Crer une contrainte'; + $lang['strconstraintcreated'] = 'Cration d\'une contrainte.'; + $lang['strconstraintcreatedbad'] = 'chec lors de la cration de la contrainte.'; + $lang['strconfdropconstraint'] = 'tes-vous sr de vouloir supprimer la contrainte %s sur %s ?'; + $lang['strconstraintdropped'] = 'Contrainte supprime.'; + $lang['strconstraintdroppedbad'] = 'chec lors de la suppression de la contrainte.'; + $lang['straddcheck'] = 'Ajouter une contrainte'; + $lang['strcheckneedsdefinition'] = 'La contrainte a besoin d\'une dfinition.'; + $lang['strcheckadded'] = 'Contrainte ajoute.'; + $lang['strcheckaddedbad'] = 'chec lors de l\'ajout d\'une contrainte de vrification (CHECK).'; + $lang['straddpk'] = 'Ajouter une cl primaire'; + $lang['strpkneedscols'] = 'La cl primaire ncessite au moins une colonne.'; + $lang['strpkadded'] = 'Cl primaire ajoute.'; + $lang['strpkaddedbad'] = 'chec lors de l\'ajout de la cl primaire.'; + $lang['stradduniq'] = 'Ajouter une cl unique'; + $lang['struniqneedscols'] = 'Une cl unique ncessite au moins une colonne.'; + $lang['struniqadded'] = 'La cl unique a t ajoute.'; + $lang['struniqaddedbad'] = 'chec lors de la cration de la cl unique.'; + $lang['straddfk'] = 'Ajouter une cl trangre'; + $lang['strfkneedscols'] = 'Une cl trangre ncessite au moins une colonne.'; + $lang['strfkneedstarget'] = 'Une cl trangre ncessite une table cible.'; + $lang['strfkadded'] = 'La cl trangre a t ajoute.'; + $lang['strfkaddedbad'] = 'chec lors de la cration de la cl trangre.'; + $lang['strfktarget'] = 'Table cible'; + $lang['strfkcolumnlist'] = 'Liste des colonnes de la cl'; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + + // Functions + $lang['strfunction'] = 'Fonction'; + $lang['strfunctions'] = 'Fonctions'; + $lang['strshowallfunctions'] = 'Voir toutes les fonctions'; + $lang['strnofunction'] = 'Aucune fonction trouve.'; + $lang['strnofunctions'] = 'Aucune fonction trouve.'; + $lang['strcreateplfunction'] = 'Crer une fonction PL/SQL'; + $lang['strcreateinternalfunction'] = 'Crer une fonction interne'; + $lang['strcreatecfunction'] = 'Crer une fonction C'; + $lang['strfunctionname'] = 'Nom de la fonction'; + $lang['strreturns'] = 'Valeur de sortie'; + $lang['strproglanguage'] = 'Langage'; + $lang['strfunctionneedsname'] = 'Vous devez indiquer un nom pour votre fonction.'; + $lang['strfunctionneedsdef'] = 'Vous devez indiquer une dfinition pour votre fonction.'; + $lang['strfunctioncreated'] = 'Fonction cre.'; + $lang['strfunctioncreatedbad'] = 'chec lors de la cration de la fonction.'; + $lang['strconfdropfunction'] = 'tes-vous sr de vouloir supprimer la fonction %s ?'; + $lang['strfunctiondropped'] = 'Fonction supprime.'; + $lang['strfunctiondroppedbad'] = 'chec lors de la suppression de la fonction.'; + $lang['strfunctionupdated'] = 'Fonction mise jour.'; + $lang['strfunctionupdatedbad'] = 'chec lors de la mise jour de la fonction.'; + $lang['strobjectfile'] = 'Fichier objet'; + $lang['strlinksymbol'] = 'Symbole lien'; + $lang['strarguments'] = 'Arguments'; + $lang['strargmode'] = 'Mode'; + $lang['strargtype'] = 'Type'; + $lang['strargadd'] = 'Ajouter un autre argument'; + $lang['strargremove'] = 'Supprimer cet argument'; + $lang['strargnoargs'] = 'Cet fonction ne prend pas d\'arguments.'; + $lang['strargenableargs'] = 'Active les arguments passs cette fonction.'; + $lang['strargnorowabove'] = 'Il doit y avoir une ligne au-dessus de cette ligne.'; + $lang['strargnorowbelow'] = 'Il doit y avoir une ligne en-dessous de cette ligne.'; + $lang['strargraise'] = 'Monter.'; + $lang['strarglower'] = 'Descendre.'; + $lang['strargremoveconfirm'] = 'tes-vous sr de vouloir supprimer cet argument ? cette opration ne peut pas tre annule.'; + $lang['strfunctioncosting'] = 'Cot de la function'; + $lang['strresultrows'] = 'Lignes de rsultat'; + $lang['strexecutioncost'] = 'Cot d\'excution'; + $lang['strspecifyfunctiontodrop'] = 'Vous devez spcifier au moins une fonction supprimer.'; + + // Triggers + $lang['strtrigger'] = 'Trigger'; + $lang['strtriggers'] = 'Triggers'; + $lang['strshowalltriggers'] = 'Voir tous les triggers'; + $lang['strnotrigger'] = 'Aucun trigger trouv.'; + $lang['strnotriggers'] = 'Aucun trigger trouv.'; + $lang['strcreatetrigger'] = 'Crer un trigger'; + $lang['strtriggerneedsname'] = 'Vous devez indiquer un nom pour votre trigger.'; + $lang['strtriggerneedsfunc'] = 'Vous devez indiquer une fonction pour votre trigger.'; + $lang['strtriggercreated'] = 'Trigger cr.'; + $lang['strtriggercreatedbad'] = 'chec lors de la cration du trigger.'; + $lang['strconfdroptrigger'] = 'tes-vous sr de vouloir supprimer le trigger %s sur %s ?'; + $lang['strconfenabletrigger'] = 'tes-vous sr de vouloir activer le trigger %s sur %s ?'; + $lang['strconfdisabletrigger'] = 'tes-vous sr de vouloir dsactiver le trigger %s sur %s ?'; + $lang['strtriggerdropped'] = 'Trigger supprim.'; + $lang['strtriggerdroppedbad'] = 'chec lors de la suppression du trigger.'; + $lang['strtriggerenabled'] = 'Trigger activ.'; + $lang['strtriggerenabledbad'] = 'chec lors de l\'activation du trigger.'; + $lang['strtriggerdisabled'] = 'Trigger dsactiv.'; + $lang['strtriggerdisabledbad'] = 'chec lors de la dsactivation du trigger.'; + $lang['strtriggeraltered'] = 'Trigger modifi.'; + $lang['strtriggeralteredbad'] = 'chec lors de la modification du trigger.'; + $lang['strforeach'] = 'Pour chaque'; + + // Types + $lang['strtype'] = 'Type'; + $lang['strtypes'] = 'Types'; + $lang['strshowalltypes'] = 'Voir tous les types'; + $lang['strnotype'] = 'Aucun type trouv.'; + $lang['strnotypes'] = 'Aucun type trouv.'; + $lang['strcreatetype'] = 'Crer un type'; + $lang['strcreatecomptype'] = 'Crer un type compos'; + $lang['strcreateenumtype'] = 'Crer un type enum'; + $lang['strtypeneedsfield'] = 'Vous devez spcifier au moins un champ.'; + $lang['strtypeneedsvalue'] = 'Vous devez spcifier au moins une valeur.'; + $lang['strtypeneedscols'] = 'Vous devez spcifier un nombre valide de champs.'; + $lang['strtypeneedsvals'] = 'Vous devez spcifier un nombre valide de valeurs.'; + $lang['strinputfn'] = 'Fonction d\'entre'; + $lang['stroutputfn'] = 'Fonction de sortie'; + $lang['strpassbyval'] = 'Passe par valeur ?'; + $lang['stralignment'] = 'Alignement'; + $lang['strelement'] = 'lment'; + $lang['strdelimiter'] = 'Dlimiteur'; + $lang['strstorage'] = 'Stockage'; + $lang['strfield'] = 'Champ'; + $lang['strnumfields'] = 'Nombre de champs'; + $lang['strnumvalues'] = 'Nombre de valeurs'; + $lang['strtypeneedsname'] = 'Vous devez indiquer un nom pour votre type.'; + $lang['strtypeneedslen'] = 'Vous devez indiquer une longueur pour votre type.'; + $lang['strtypecreated'] = 'Type cr'; + $lang['strtypecreatedbad'] = 'chec lors de la cration du type.'; + $lang['strconfdroptype'] = 'tes-vous sr de vouloir supprimer le type %s ?'; + $lang['strtypedropped'] = 'Type supprim.'; + $lang['strtypedroppedbad'] = 'chec lors de la suppression du type.'; + $lang['strflavor'] = 'Genre'; + $lang['strbasetype'] = 'Base'; + $lang['strcompositetype'] = 'Composite'; + $lang['strpseudotype'] = 'Pseudo'; + $lang['strenum'] = 'Enum'; + $lang['strenumvalues'] = 'Valeurs de l\'enum'; + + // Schemas + $lang['strschema'] = 'Schma'; + $lang['strschemas'] = 'Schmas'; + $lang['strshowallschemas'] = 'Voir tous les schmas'; + $lang['strnoschema'] = 'Aucun schma trouv.'; + $lang['strnoschemas'] = 'Aucun schma trouv.'; + $lang['strcreateschema'] = 'Crer un schma'; + $lang['strschemaname'] = 'Nom du schma'; + $lang['strschemaneedsname'] = 'Vous devez indiquer un nom pour votre schma.'; + $lang['strschemacreated'] = 'Schma cr'; + $lang['strschemacreatedbad'] = 'chec lors de la cration du schma.'; + $lang['strconfdropschema'] = 'tes-vous sr de vouloir supprimer le schma %s ?'; + $lang['strschemadropped'] = 'Schma supprim.'; + $lang['strschemadroppedbad'] = 'chec lors de la suppression du schma.'; + $lang['strschemaaltered'] = 'Schema modifi.'; + $lang['strschemaalteredbad'] = 'chec lors de la modification du schma.'; + $lang['strsearchpath'] = 'Chemin de recherche du schma'; + $lang['strspecifyschematodrop'] = 'Vous devez spcifier au moins un schma supprimer.'; + + // Reports + $lang['strreport'] = 'Rapport'; + $lang['strreports'] = 'Rapports'; + $lang['strshowallreports'] = 'Voir tous les rapports'; + $lang['strnoreports'] = 'Aucun rapport trouv.'; + $lang['strcreatereport'] = 'Crer un rapport'; + $lang['strreportdropped'] = 'Rapport supprim.'; + $lang['strreportdroppedbad'] = 'chec lors de la suppression du rapport.'; + $lang['strconfdropreport'] = 'tes-vous sr de vouloir supprimer le rapport %s ?'; + $lang['strreportneedsname'] = 'Vous devez indiquer un nom pour votre rapport.'; + $lang['strreportneedsdef'] = 'Vous devez fournir une requte SQL pour votre rapport.'; + $lang['strreportcreated'] = 'Rapport sauvegard.'; + $lang['strreportcreatedbad'] = 'chec lors de la sauvegarde du rapport.'; + + // Domains + $lang['strdomain'] = 'Domaine'; + $lang['strdomains'] = 'Domaines'; + $lang['strshowalldomains'] = 'Voir tous les domaines'; + $lang['strnodomains'] = 'Pas de domaine trouv.'; + $lang['strcreatedomain'] = 'Crer un domaine'; + $lang['strdomaindropped'] = 'Domaine supprim.'; + $lang['strdomaindroppedbad'] = 'chec lors de la suppression.'; + $lang['strconfdropdomain'] = 'tes-vous sur de vouloir supprimer le domaine %s ?'; + $lang['strdomainneedsname'] = 'Vous devez donner un nom pour votre domaine.'; + $lang['strdomaincreated'] = 'Domaine cr.'; + $lang['strdomaincreatedbad'] = 'chec lors de la cration du domaine.'; + $lang['strdomainaltered'] = 'Domaine modifi.'; + $lang['strdomainalteredbad'] = 'chec lors de la modification du domaine.'; + + // Operators + $lang['stroperator'] = 'Oprateur'; + $lang['stroperators'] = 'Oprateurs'; + $lang['strshowalloperators'] = 'Voir tous les oprateurs'; + $lang['strnooperator'] = 'Pas d\'oprateur trouv.'; + $lang['strnooperators'] = 'Pas d\'oprateur trouv.'; + $lang['strcreateoperator'] = 'Crer un oprateur'; + $lang['strleftarg'] = 'Type de l\'argument de gauche'; + $lang['strrightarg'] = 'Type de l\'argument de droite'; + $lang['strcommutator'] = 'Commutateur'; + $lang['strnegator'] = 'Ngation'; + $lang['strrestrict'] = 'Restriction'; + $lang['strjoin'] = 'Jointure'; + $lang['strhashes'] = 'Hachages'; + $lang['strmerges'] = 'Assemblages'; + $lang['strleftsort'] = 'Tri gauche'; + $lang['strrightsort'] = 'Tri droite'; + $lang['strlessthan'] = 'Plus petit que'; + $lang['strgreaterthan'] = 'Plus grand que'; + $lang['stroperatorneedsname'] = 'Vous devez donner un nom pour votre oprateur.'; + $lang['stroperatorcreated'] = 'Oprateur cr'; + $lang['stroperatorcreatedbad'] = 'chec lors de la cration de l\'oprateur.'; + $lang['strconfdropoperator'] = 'tes-vous sur de vouloir supprimer l\'oprateur %s ?'; + $lang['stroperatordropped'] = 'Oprateur supprim.'; + $lang['stroperatordroppedbad'] = 'chec lors de la suppression de l\'oprateur.'; + + // Casts + $lang['strcasts'] = 'Conversions'; + $lang['strnocasts'] = 'Aucune conversion trouve.'; + $lang['strsourcetype'] = 'Type source'; + $lang['strtargettype'] = 'Type cible'; + $lang['strimplicit'] = 'Implicite'; + $lang['strinassignment'] = 'En affectation'; + $lang['strbinarycompat'] = '(binaire compatible)'; + + // Conversions + $lang['strconversions'] = 'Conversions'; + $lang['strnoconversions'] = 'Aucune conversion trouve.'; + $lang['strsourceencoding'] = 'Codage source'; + $lang['strtargetencoding'] = 'Codage cible'; + + // Languages + $lang['strlanguages'] = 'Langages'; + $lang['strnolanguages'] = 'Pas de langage trouv.'; + $lang['strtrusted'] = 'De confiance'; + + // Info + $lang['strnoinfo'] = 'Pas d\'information disponible.'; + $lang['strreferringtables'] = 'Tables rfrentes'; + $lang['strparenttables'] = 'Tables parents'; + $lang['strchildtables'] = 'Tables enfants'; + + // Aggregates + $lang['straggregate'] = 'Agrgat'; + $lang['straggregates'] = 'Agrgats'; + $lang['strnoaggregates'] = 'Aucun agrgat trouv.'; + $lang['stralltypes'] = '(tous les types)'; + $lang['strcreateaggregate'] = 'Crer un agrgat'; + $lang['straggrbasetype'] = 'Type de donnes en entre'; + $lang['straggrsfunc'] = 'Fonction de transition de l\'tat'; + $lang['straggrstype'] = 'Type de la valeur de transition'; + $lang['straggrffunc'] = 'Fonction finale'; + $lang['straggrinitcond'] = 'Condition initiale'; + $lang['straggrsortop'] = 'Oprateur de tri'; + $lang['strconfdropaggregate'] = 'tes-vous sr de vouloir supprimer l\'agrgat %s ?'; + $lang['straggregatedropped'] = 'Agrgat supprim.'; + $lang['straggregatedroppedbad'] = 'chec lors de la suppression de l\'agrgat.'; + $lang['straggraltered'] = 'Agrgat modifi.'; + $lang['straggralteredbad'] = 'chec lors de la modification de l\'agrgat.'; + $lang['straggrneedsname'] = 'Vous devez indiquer un nom pour l\'agrgat'; + $lang['straggrneedsbasetype'] = 'Vous devez indiquer le type de donnes en entre pour l\'agrgat'; + $lang['straggrneedssfunc'] = 'Vous devez indiquer le nom de la fonction de transition de l\'agrgat'; + $lang['straggrneedsstype'] = 'Vous devez indiquer le type de donne pour la valeur d\'tat pour l\'agrgat'; + $lang['straggrcreated'] = 'Agrgat cr.'; + $lang['straggrcreatedbad'] = 'chec lors de la cration de l\'agrgat.'; + $lang['straggrshowall'] = 'Afficher tous les agrgats'; + + // Operator Classes + $lang['stropclasses'] = 'Classes d\'oprateur'; + $lang['strnoopclasses'] = 'Aucune classe d\'oprateur trouve.'; + $lang['straccessmethod'] = 'Mthode d\'accs'; + + // Stats and performance + $lang['strrowperf'] = 'Performance des enregistrements'; + $lang['strioperf'] = 'Performance en entre/sortie'; + $lang['stridxrowperf'] = 'Performance des index'; + $lang['stridxioperf'] = 'Performance des index en entres/sortie'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Squentiel'; + $lang['strscan'] = 'Parcours'; + $lang['strread'] = 'Lecture'; + $lang['strfetch'] = 'Rcupration'; + $lang['strheap'] = 'En-tte'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'Index TOAST'; + $lang['strcache'] = 'Cache'; + $lang['strdisk'] = 'Disque'; + $lang['strrows2'] = 'Enregistrements'; + + // Tablespaces + $lang['strtablespace'] = 'Tablespace'; + $lang['strtablespaces'] = 'Tablespaces'; + $lang['strshowalltablespaces'] = 'Voir tous les tablespaces'; + $lang['strnotablespaces'] = 'Aucun tablespace trouv.'; + $lang['strcreatetablespace'] = 'Crer un tablespace'; + $lang['strlocation'] = 'Emplacement'; + $lang['strtablespaceneedsname'] = 'Vous devez donner un nom votre tablespace.'; + $lang['strtablespaceneedsloc'] = 'Vous devez prciser un rpertoire dans lequel sera cr le tablespace.'; + $lang['strtablespacecreated'] = 'Tablespace cr.'; + $lang['strtablespacecreatedbad'] = 'chec lors de la cration du tablespace.'; + $lang['strconfdroptablespace'] = 'tes-vous sr de vouloir supprimer le tablespace %s ?'; + $lang['strtablespacedropped'] = 'Tablespace supprim.'; + $lang['strtablespacedroppedbad'] = 'chec lors de la suppression du tablespace.'; + $lang['strtablespacealtered'] = 'Tablespace modifi.'; + $lang['strtablespacealteredbad'] = 'chec lors de la modification du tablespace.'; + + // Slony clusters + $lang['strcluster'] = 'Cluster'; + $lang['strnoclusters'] = 'Aucun cluster trouv.'; + $lang['strconfdropcluster'] = 'tesvous sr de vouloir supprimer le cluster %s ?'; + $lang['strclusterdropped'] = 'Cluster supprim.'; + $lang['strclusterdroppedbad'] = 'chec lors de la suppression du cluster.'; + $lang['strinitcluster'] = 'Initialiser le cluster'; + $lang['strclustercreated'] = 'Cluster initialis.'; + $lang['strclustercreatedbad'] = 'chec lors de l\'initialisation du cluster.'; + $lang['strclusterneedsname'] = 'Vous devez donner un nom au cluster.'; + $lang['strclusterneedsnodeid'] = 'Vous devez donner un ID au noeud local.'; + + // Slony nodes + $lang['strnodes'] = 'Noeuds'; + $lang['strnonodes'] = 'Aucun noeud trouv.'; + $lang['strcreatenode'] = 'Crer un noeud'; + $lang['strid'] = 'ID'; + $lang['stractive'] = 'Actif'; + $lang['strnodecreated'] = 'Noeud cr.'; + $lang['strnodecreatedbad'] = 'chec lors de la cration du noeud.'; + $lang['strconfdropnode'] = 'tes-vous sr de vouloir supprimer le noeud %s ?'; + $lang['strnodedropped'] = 'Noeud supprim.'; + $lang['strnodedroppedbad'] = 'chec lors de la suppression du noeud'; + $lang['strfailover'] = 'Basculer (failover)'; + $lang['strnodefailedover'] = 'Node bascul.'; + $lang['strnodefailedoverbad'] = 'chec lors du basculement du noeud.'; + $lang['strstatus'] = 'Statut'; + $lang['strhealthy'] = 'tat'; + $lang['stroutofsync'] = 'Hors synchro'; + $lang['strunknown'] = 'Inconnu'; + + // Slony paths + $lang['strpaths'] = 'Chemins'; + $lang['strnopaths'] = 'Aucun chemin trouv.'; + $lang['strcreatepath'] = 'Crer un chemin'; + $lang['strnodename'] = 'Nom du noeud'; + $lang['strnodeid'] = 'ID du noeud'; + $lang['strconninfo'] = 'Chane de connexion'; + $lang['strconnretry'] = 'Secondes avant une nouvelle tentative de connexion'; + $lang['strpathneedsconninfo'] = 'Vous devez donner une chane de connexion pour le chemin.'; + $lang['strpathneedsconnretry'] = 'Vous devez donner le nombre de secondes d\'attente avant une nouvelle tentative de connexion.'; + $lang['strpathcreated'] = 'Chemin cr.'; + $lang['strpathcreatedbad'] = 'chec lors de la cration du chemin.'; + $lang['strconfdroppath'] = 'tes-vous sr de vouloir supprimer le chemin %s ?'; + $lang['strpathdropped'] = 'Chemin supprim.'; + $lang['strpathdroppedbad'] = 'chec lors de la suppression du chemin.'; + + // Slony listens + $lang['strlistens'] = 'coutes'; + $lang['strnolistens'] = 'Aucune coute trouve.'; + $lang['strcreatelisten'] = 'Crer une coute'; + $lang['strlistencreated'] = 'coute cre.'; + $lang['strlistencreatedbad'] = 'chec lors de la cration de l\'coute.'; + $lang['strconfdroplisten'] = 'tes-vous sr de vouloir supprimer l\'coute %s ?'; + $lang['strlistendropped'] = 'coute supprim.'; + $lang['strlistendroppedbad'] = 'chec lors de la suppression de l\'coute.'; + + // Slony replication sets + $lang['strrepsets'] = 'Ensembles de rplication'; + $lang['strnorepsets'] = 'Aucun ensemble de rplication trouv.'; + $lang['strcreaterepset'] = 'Crer un ensemble de rplication'; + $lang['strrepsetcreated'] = 'Ensemble de rplication cr.'; + $lang['strrepsetcreatedbad'] = 'chec lors de la cration de l\'ensemble de rplication.'; + $lang['strconfdroprepset'] = 'tes-vous sr de vouloir supprimer l\'ensemble de rplication %s ?'; + $lang['strrepsetdropped'] = 'Ensemble de rplication supprim.'; + $lang['strrepsetdroppedbad'] = 'chec lors de la suppression de l\'ensemble de rplication.'; + $lang['strmerge'] = 'Assemblage'; + $lang['strmergeinto'] = 'Assembler dans'; + $lang['strrepsetmerged'] = 'Ensembles de rplication assembls.'; + $lang['strrepsetmergedbad'] = 'chec lors de l\'assemblage des ensembles de rplication.'; + $lang['strmove'] = 'Dplacement'; + $lang['strneworigin'] = 'Nouvelle origine'; + $lang['strrepsetmoved'] = 'Ensemble de rplication dplac.'; + $lang['strrepsetmovedbad'] = 'chec lors du dplacement de l\'ensemble de rplication.'; + $lang['strnewrepset'] = 'Nouvel ensemble de rplication'; + $lang['strlock'] = 'Verrou'; + $lang['strlocked'] = 'Verrouill'; + $lang['strunlock'] = 'Dverrouill'; + $lang['strconflockrepset'] = 'tes-vous sr de vouloir verrouiller l\'ensemble de rplication %s ?'; + $lang['strrepsetlocked'] = 'Ensemble de rplication verrouill.'; + $lang['strrepsetlockedbad'] = 'chec lors du verrouillage de l\'ensemble de rplication.'; + $lang['strconfunlockrepset'] = 'tes-vous sr de vouloir dverrouiller l\'ensemble de rplication %s ?'; + $lang['strrepsetunlocked'] = 'Ensemble de rplication dverrouill.'; + $lang['strrepsetunlockedbad'] = 'chec lors du dverrouillage de l\'ensemble de rplication.'; + $lang['stronlyonnode'] = 'Seulement sur le noeud'; + $lang['strddlscript'] = 'Script DDL'; + $lang['strscriptneedsbody'] = 'Vous devez fournir un script excuter sur tous les noeuds.'; + $lang['strscriptexecuted'] = 'Script DDL de l\'ensemble de rplication excut.'; + $lang['strscriptexecutedbad'] = 'chec lors de l\'excution du script DDL de l\'ensemble de rplication.'; + $lang['strtabletriggerstoretain'] = 'Les triggers suivants ne seront PAS dsactivs par Slony:'; + + // Slony tables in replication sets + $lang['straddtable'] = 'Ajouter une table'; + $lang['strtableneedsuniquekey'] = 'La table ajouter doit avoir une cl primaire ou une cl unique.'; + $lang['strtableaddedtorepset'] = 'Table ajouter l\'ensemble de rplication.'; + $lang['strtableaddedtorepsetbad'] = 'chec lors de l\'ajout de la table dans l\'ensemble de rplication.'; + $lang['strconfremovetablefromrepset'] = 'tes-vous sr de vouloir supprimer la table %s de l\'ensemble de rplication %s ?'; + $lang['strtableremovedfromrepset'] = 'Table supprime de l\'ensemble de rplication.'; + $lang['strtableremovedfromrepsetbad'] = 'chec lors de la suppression de la table de l\'ensemble de rplication.'; + + // Slony sequences in replication sets + $lang['straddsequence'] = 'Ajouter une squence'; + $lang['strsequenceaddedtorepset'] = 'Squence ajoute l\'ensemble de rplication.'; + $lang['strsequenceaddedtorepsetbad'] = 'chec lors de l\'ajout de la squence l\'ensemble de rplication.'; + $lang['strconfremovesequencefromrepset'] = 'tes-vous sr de vouloir supprimer la squence %s de l\'ensemble de rplication %s ?'; + $lang['strsequenceremovedfromrepset'] = 'Squence supprime de l\'ensemble de rplication.'; + $lang['strsequenceremovedfromrepsetbad'] = 'chec lors de la suppression de la squence partir de l\'ensemble de rplication.'; + + // Slony subscriptions + $lang['strsubscriptions'] = 'Souscriptions'; + $lang['strnosubscriptions'] = 'Aucune souscription trouve.'; + + // Miscellaneous + $lang['strtopbar'] = '%s lanc sur %s:%s -- Vous tes connect avec le profil %s '; + $lang['strtimefmt'] = 'j M Y, H:i'; + $lang['strhelp'] = 'Aide'; + $lang['strhelpicon'] = '?'; + $lang['strhelppagebrowser'] = 'Navigateur pour l\'aide'; + $lang['strselecthelppage'] = 'Slectionner une page d\'aide'; + $lang['strinvalidhelppage'] = 'Page d\'aide invalide.'; + $lang['strlogintitle'] = 'Se connecter %s'; + $lang['strlogoutmsg'] = 'Dconnect de %s'; + $lang['strloading'] = 'Chargement...'; + $lang['strerrorloading'] = 'Erreur lors du chargement'; + $lang['strclicktoreload'] = 'Cliquer pour recharger'; + + //Autovacuum + $lang['strautovacuum'] = 'Autovacuum'; + $lang['strturnedon'] = 'Activ'; + $lang['strturnedoff'] = 'Dsactiv'; + $lang['strenabled'] = 'activ'; + $lang['strnovacuumconf'] = 'Aucune configuration autovacuum trouve.'; + $lang['strvacuumbasethreshold'] = 'Limite de base pour le Vacuum'; + $lang['strvacuumscalefactor'] = 'Facteur d\'chelle pour le Vacuum'; + $lang['stranalybasethreshold'] = 'Limite de base pour le Analyze'; + $lang['stranalyzescalefactor'] = 'Facteur d\'chelle pour le Analyze'; + $lang['strvacuumcostdelay'] = 'Dlai du cot du Vacuum'; + $lang['strvacuumcostlimit'] = 'Limite du cot du Vacuum'; + $lang['strvacuumpertable'] = 'Configuration autovacuum par table'; + $lang['straddvacuumtable'] = 'Configurer autovacuum pour cette table'; + $lang['streditvacuumtable'] = 'Modifier la configuration autovacuum pour la table %s '; + $lang['strdelvacuumtable'] = 'Supprimer la configuration autovacuum pour la table %s ?'; + $lang['strvacuumtablereset'] = 'Configuration autovacuum par dfaut pour la table %s .'; + $lang['strdelvacuumtablefail'] = 'chec lors de la suppression de la configuration autovacuumpour la table %s '; + $lang['strsetvacuumtablesaved'] = 'Configuration autovacuum pour la table %s enregistre.'; + $lang['strsetvacuumtablefail'] = 'chec de la configuration autovacuum pour la table %s .'; + $lang['strspecifydelvacuumtable'] = 'Vous devez spcifier la table o supprimer les paramtres autovacuum.'; + $lang['strspecifyeditvacuumtable'] = 'Vous devez spcifier la table o diter les paramtres autovacuum.'; + $lang['strnotdefaultinred'] = 'Valeurs diffrentes de celles par dfaut en rouge.'; + + //Table-level Locks + $lang['strlocks'] = 'Verrous'; + $lang['strtransaction'] = 'ID de transaction'; + $lang['strvirtualtransaction'] = 'ID Virtuel de Transaction'; + $lang['strprocessid'] = 'ID du processus'; + $lang['strmode'] = 'Mode du verrou'; + $lang['strislockheld'] = 'Verrou dtenu ?'; + + // Prepared transactions + $lang['strpreparedxacts'] = 'Transactions prpares'; + $lang['strxactid'] = 'ID de transaction'; + $lang['strgid'] = 'ID global'; + + // Fulltext search + $lang['strfulltext'] = 'Recherche textuelle'; + $lang['strftsconfig'] = 'Configuration FTS'; + $lang['strftsconfigs'] = 'Configurations'; + $lang['strftscreateconfig'] = 'Crer une configuration FTS'; + $lang['strftscreatedict'] = 'Crer un dictionnaire'; + $lang['strftscreatedicttemplate'] = 'Crer un modle de dictionnaire'; + $lang['strftscreateparser'] = 'Crer un analyseur syntaxique'; + $lang['strftsnoconfigs'] = 'Aucune configuration FTS trouve.'; + $lang['strftsconfigdropped'] = 'Configuration FTS supprime.'; + $lang['strftsconfigdroppedbad'] = 'chec lors de la suppression de la configuration FTS.'; + $lang['strconfdropftsconfig'] = 'tes-vous sr de vouloir supprimer la configuration FTS %s ?'; + $lang['strconfdropftsdict'] = 'tes-vous sr de vouloir supprimer le dictionnaire FTS %s ?'; + $lang['strconfdropftsmapping'] = 'tes-vous sr de vouloir supprimer le mapping %s de la configuration FTS %s ?'; + $lang['strftstemplate'] = 'Modle'; + $lang['strftsparser'] = 'Analyseur syntaxique'; + $lang['strftsconfigneedsname'] = 'Vous devez donner un nom pour votre configuration FTS.'; + $lang['strftsconfigcreated'] = 'Configuration FTS cre'; + $lang['strftsconfigcreatedbad'] = 'chec lors de la cration de la configuration FTS.'; + $lang['strftsmapping'] = 'Type de jeton'; + $lang['strftsdicts'] = 'Dictionaires'; + $lang['strftsdict'] = 'Dictionaire'; + $lang['strftsemptymap'] = 'Aucune liaisons configure.'; + $lang['strftsconfigaltered'] = 'Configuration FTS modifie.'; + $lang['strftsconfigalteredbad'] = 'chec lors de l\'dition de la configuration FTS.'; + $lang['strftsconfigmap'] = 'Configuration des liaisons type de jeton / dictionnaires'; + $lang['strftsparsers'] = 'Analyseurs syntaxique FTS'; + $lang['strftsnoparsers'] = 'Aucun analyseur syntaxique FTS disponnible.'; + $lang['strftsnodicts'] = 'Aucun dictionnaire FTS disponible.'; + $lang['strftsdictcreated'] = 'Dictionnaire FTS cr'; + $lang['strftsdictcreatedbad'] = 'chec lors de la cration du dictionnaire FTS.'; + $lang['strftslexize'] = 'Lexize'; + $lang['strftsinit'] = 'Init'; + $lang['strftsoptionsvalues'] = 'Options et Valeurs'; + $lang['strftsdictneedsname'] = 'Vous devez donner un nom pour votre dictionnaire FTS.'; + $lang['strftsdictdropped'] = 'Dictionnaire FTS supprim.'; + $lang['strftsdictdroppedbad'] = 'chec lors de la suppression du dictionnaire FTS.'; + $lang['strftsdictaltered'] = 'Dictionnaire FTS modifi.'; + $lang['strftsdictalteredbad'] = 'chec lors de l\'dition du dictionnaire FTS.'; + $lang['strftsaddmapping'] = 'Ajouter une nouvelle liaison'; + $lang['strftsspecifymappingtodrop'] = 'Vous devez spcifier au moins une liaison suppimer.'; + $lang['strftsspecifyconfigtoalter'] = 'Vous devez spcifier une configuration FTS modifier'; + $lang['strftsmappingdropped'] = 'Laison supprime.'; + $lang['strftsmappingdroppedbad'] = 'chec lors de la suppression de la liaison.'; + $lang['strftsnodictionaries'] = 'Aucun dictionnaire trouv.'; + $lang['strftsmappingaltered'] = 'Liaison modifie.'; + $lang['strftsmappingalteredbad'] = 'chec lors de la modification de la liaison.'; + $lang['strftsmappingadded'] = 'Liaison ajoute.'; + $lang['strftsmappingaddedbad'] = 'chec lors de la suppression de la liaison.'; + $lang['strftstabconfigs'] = 'Configurations'; + $lang['strftstabdicts'] = 'Dictionaires'; + $lang['strftstabparsers'] = 'Analyseurs syntaxique'; + $lang['strftscantparsercopy'] = 'Vous ne pouvez spcifier en mme temps un modle et un analyseur lors de la cration d\'une configuration FTS.'; +?> diff --git a/php/pgadmin/lang/galician.php b/php/pgadmin/lang/galician.php new file mode 100644 index 0000000..8acca27 --- /dev/null +++ b/php/pgadmin/lang/galician.php @@ -0,0 +1,1034 @@ + + * Proxecto Trasno, . + * + * + * Comentarios sobre a tradución: + * - Escolleuse «eliminar» como tradución para “drop”, e «borrar» como tradución para + * “delete”. + * - Fixéronse certas escollas de vocabulario: “vacuum” → «aspirado», “cluster” → + * «contentrado». + * + */ + + // Language and character set + $lang['applang'] = 'Galego'; + $lang['appcharset'] = 'UTF-8'; + $lang['applocale'] = 'gl_ES'; + $lang['appdbencoding'] = 'UNICODE'; + $lang['applangdir'] = 'ltr'; + + // Welcome + $lang['strintro'] = 'Benvida ou benvido ao phpPgAdmin.'; + $lang['strppahome'] = 'Sitio web do phpPgAdmin'; + $lang['strpgsqlhome'] = 'Sitio web de PostgreSQL'; + $lang['strpgsqlhome_url'] = 'http://www.postgresql.org/'; + $lang['strlocaldocs'] = 'Documentación de PostgreSQL (local)'; + $lang['strreportbug'] = 'Informar dun erro'; + $lang['strviewfaq'] = 'Ver as preguntas máis frecuentes en liña'; + $lang['strviewfaq_url'] = 'http://phppgadmin.sourceforge.net/?page=faq'; + + // Basic strings + $lang['strlogin'] = 'Identificarse'; + $lang['strloginfailed'] = 'Non se puido levar a cabo a identificación.'; + $lang['strlogindisallowed'] = 'A identificación está desactivada por motivos de seguridade.'; + $lang['strserver'] = 'Servidor'; + $lang['strservers'] = 'Servidores'; + $lang['strgroupservers'] = 'Servidores no grupo «%s»'; + $lang['strallservers'] = 'Todos os servidores'; + $lang['strintroduction'] = 'Introdución'; + $lang['strhost'] = 'Enderezo IP'; + $lang['strport'] = 'Porto'; + $lang['strlogout'] = 'Saír'; + $lang['strowner'] = 'Propietario'; + $lang['straction'] = 'Acción'; + $lang['stractions'] = 'Accións'; + $lang['strname'] = 'Nome'; + $lang['strdefinition'] = 'Definición'; + $lang['strproperties'] = 'Propiedades'; + $lang['strbrowse'] = 'Navegar'; + $lang['strenable'] = 'Activar'; + $lang['strdisable'] = 'Desactivar'; + $lang['strdrop'] = 'Eliminar'; + $lang['strdropped'] = 'Eliminada'; + $lang['strnull'] = 'Nulo'; + $lang['strnotnull'] = 'Non nulo'; + $lang['strprev'] = '< Anterior'; + $lang['strnext'] = 'Seguinte >'; + $lang['strfirst'] = '« Principio'; + $lang['strlast'] = 'Final »'; + $lang['strfailed'] = 'Fallou'; + $lang['strcreate'] = 'Crear'; + $lang['strcreated'] = 'Creada'; + $lang['strcomment'] = 'Comentario'; + $lang['strlength'] = 'Lonxitude'; + $lang['strdefault'] = 'Predeterminado'; + $lang['stralter'] = 'Cambiar'; + $lang['strok'] = 'Aceptar'; + $lang['strcancel'] = 'Cancelar'; + $lang['strkill'] = 'Matar'; + $lang['strac'] = 'Activar o completado automático'; + $lang['strsave'] = 'Gardar'; + $lang['strreset'] = 'Restablecer'; + $lang['strrestart'] = 'Reiniciar'; + $lang['strinsert'] = 'Inserir'; + $lang['strselect'] = 'Seleccionar'; + $lang['strdelete'] = 'Borrar'; + $lang['strupdate'] = 'Actualizar'; + $lang['strreferences'] = 'Fai referencia a'; + $lang['stryes'] = 'Si'; + $lang['strno'] = 'Non'; + $lang['strtrue'] = 'CERTO'; + $lang['strfalse'] = 'FALSO'; + $lang['stredit'] = 'Editar'; + $lang['strcolumn'] = 'Columna'; + $lang['strcolumns'] = 'Columnas'; + $lang['strrows'] = 'fila(s)'; + $lang['strrowsaff'] = 'fila(s) afectadas.'; + $lang['strobjects'] = 'obxecto(s)'; + $lang['strback'] = 'Volver'; + $lang['strqueryresults'] = 'Resultados da consulta'; + $lang['strshow'] = 'Amosar'; + $lang['strempty'] = 'Baleiro'; + $lang['strlanguage'] = 'Lingua'; + $lang['strencoding'] = 'Codificación'; + $lang['strvalue'] = 'Valor'; + $lang['strunique'] = 'Único'; + $lang['strprimary'] = 'Primario'; + $lang['strexport'] = 'Exportar'; + $lang['strimport'] = 'Importar'; + $lang['strallowednulls'] = 'Permitir valores nulos'; + $lang['strbackslashn'] = '\N'; + $lang['stremptystring'] = 'Cadea ou campo baleiro'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = 'Administración'; + $lang['strvacuum'] = 'Aspirar'; + $lang['stranalyze'] = 'Analizar'; + $lang['strclusterindex'] = 'Concentrar'; + $lang['strclustered'] = 'Concentrada?'; + $lang['strreindex'] = 'Indexar'; + $lang['strexecute'] = 'Executar'; + $lang['stradd'] = 'Engadir'; + $lang['strevent'] = 'Evento'; + $lang['strwhere'] = 'Onde'; + $lang['strinstead'] = 'En vez de iso'; + $lang['strwhen'] = 'Cando'; + $lang['strformat'] = 'Formato'; + $lang['strdata'] = 'Datos'; + $lang['strconfirm'] = 'Confirmar'; + $lang['strexpression'] = 'Expresión'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'Expandir'; + $lang['strcollapse'] = 'Colapsar'; + $lang['strfind'] = 'Buscar'; + $lang['stroptions'] = 'Opcións'; + $lang['strrefresh'] = 'Actualizar'; + $lang['strdownload'] = 'Descargar'; + $lang['strdownloadgzipped'] = 'Descargar comprimida con gzip'; + $lang['strinfo'] = 'Info'; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = 'Avanzado'; + $lang['strvariables'] = 'Variables'; + $lang['strprocess'] = 'Proceso'; + $lang['strprocesses'] = 'Procesos'; + $lang['strsetting'] = 'Configuración'; + $lang['streditsql'] = 'Editar SQL'; + $lang['strruntime'] = 'Tempo total funcionando: %s ms'; + $lang['strpaginate'] = 'Amosar os resultados por páxinas'; + $lang['struploadscript'] = 'ou cargue un guión en SQL:'; + $lang['strstarttime'] = 'Hora de inicio'; + $lang['strfile'] = 'Ficheiro'; + $lang['strfileimported'] = 'Importouse o ficheiro.'; + $lang['strtrycred'] = 'Utilizar estas credenciais para todos os servidores'; + $lang['strconfdropcred'] = 'Por motivos de seguridade, ao desconectarse destruirase a información compartida sobre a súa identidade. Está seguro de que quere desconectarse?'; + $lang['stractionsonmultiplelines'] = 'Accións en varias liñas'; + $lang['strselectall'] = 'Marcar todo'; + $lang['strunselectall'] = 'Desmarcar todo'; + $lang['strlocale'] = 'Configuración rexional'; + $lang['strcollation'] = 'Recompilación'; + $lang['strctype'] = 'Tipo de carácter'; + $lang['strdefaultvalues'] = 'Valores predeterminados'; + $lang['strnewvalues'] = 'Valores novos'; + $lang['strstart'] = 'Iniciar'; + $lang['strstop'] = 'Deter'; + $lang['strgotoppage'] = 'Volver arriba'; + $lang['strtheme'] = 'Tema visual'; + + // Admin + $lang['stradminondatabase'] = 'As seguintes tarefas administrativas realizaranse en toda a base de datos «%s».'; + $lang['stradminontable'] = 'As seguintes tarefas administrativas realizaranse na táboa «%s».'; + + // User-supplied SQL history + $lang['strhistory'] = 'Historial'; + $lang['strnohistory'] = 'Sen historial.'; + $lang['strclearhistory'] = 'Borrar o historial'; + $lang['strdelhistory'] = 'Borrar do historial'; + $lang['strconfdelhistory'] = 'Seguro que quere borrar esta solicitude do historial?'; + $lang['strconfclearhistory'] = 'Seguro que quere borrar o historial?'; + $lang['strnodatabaseselected'] = 'Escolla unha base de datos.'; + + // Database sizes + $lang['strnoaccess'] = 'Sen acceso'; + $lang['strsize'] = 'Tamaño'; + $lang['strbytes'] = 'bytes'; + $lang['strkb'] = 'kiB'; + $lang['strmb'] = 'MiB'; + $lang['strgb'] = 'GiB'; + $lang['strtb'] = 'TiB'; + + // Error handling + $lang['strnoframes'] = 'Este aplicativo funciona mellor nos navegadores que permiten o uso de marcos, pero pode usalo sen eles premendo na ligazón que hai máis abaixo.'; + $lang['strnoframeslink'] = 'Utilizar sen marcos'; + $lang['strbadconfig'] = 'O seu ficheiro de configuración «config.inc.php» está obsoleto. Terá que volvelo crear a partires do novo ficheiro «config.inc.php-dist».'; + $lang['strnotloaded'] = 'A súa instalación de PHP non está preparada para utilizar PostgreSQL. Terá que compilar PHP de novo utilizando a opción de configuración «--with-pgsql».'; + $lang['strpostgresqlversionnotsupported'] = 'Este aplicativo non é compatible coa versión de PostgreSQL que está a usar. Actualíceo á versión %s ou outra versión posterior.'; + $lang['strbadschema'] = 'O esquema especificado non era correcto.'; + $lang['strbadencoding'] = 'Non se deu establecida a codificación do cliente na base de datos.'; + $lang['strsqlerror'] = 'Erro de SQL:'; + $lang['strinstatement'] = 'Na instrución:'; + $lang['strinvalidparam'] = 'Os parámetros fornecidos ao guión non son correctos.'; + $lang['strnodata'] = 'Non se atopou fila algunha.'; + $lang['strnoobjects'] = 'Non se atopou obxecto algún.'; + $lang['strrownotunique'] = 'Esta fila non ten ningún identificador único.'; + $lang['strnoreportsdb'] = 'Non creou a base de datos de informes. Lea o ficheiro »INSTALL» (en inglés) para máis información.'; + $lang['strnouploads'] = 'A carga de ficheiros está desactivada.'; + $lang['strimporterror'] = 'Produciuse un erro ao importar.'; + $lang['strimporterror-fileformat'] = 'Produciuse un erro ao importar: non se puido determinar de maneira automática o formato do ficheiro.'; + $lang['strimporterrorline'] = 'Produciuse un erro ao importar, na liña %s.'; + $lang['strimporterrorline-badcolumnnum'] = 'Produciuse un erro ao importar, na liña %s: a liña non ten unha cantidade de columnas axeitada.'; + $lang['strimporterror-uploadedfile'] = 'Produciuse un erro ao importar: non se puido cargar o ficheiro no servidor.'; + $lang['strcannotdumponwindows'] = 'O envorcado de táboas complexas e mais nomes de esquemas non pode efectuarse en sistemas Microsoft Windows.'; + $lang['strinvalidserverparam'] = 'Produciuse un intento de conexión cun servidor non permitido como parámetro, é posible que alguén estea intentando atacar o seu sistema.'; + $lang['strnoserversupplied'] = 'Non se forneceu ningún servidor!'; + $lang['strbadpgdumppath'] = 'Produciuse un erro ao exportar: non se conseguiu executar pg_dump (a ruta indicada no seu ficheiro «conf/config.inc.php» é «%s»). Cambie a ruta no ficheiro de configuración e volva intentalo.'; + $lang['strbadpgdumpallpath'] = 'Produciuse un erro ao exportar: non se conseguiu executar pg_dumpall (a ruta indicada no seu ficheiro «conf/config.inc.php» é «%s»). Cambie a ruta no ficheiro de configuración e volva intentalo.'; + $lang['strconnectionfail'] = 'Non se puido establecer a conexión co servidor.'; + + // Tables + $lang['strtable'] = 'Táboa'; + $lang['strtables'] = 'Táboas'; + $lang['strshowalltables'] = 'Amosar todas as táboas'; + $lang['strnotables'] = 'Non se atopou táboa algunha.'; + $lang['strnotable'] = 'Non se atopou táboa algunha.'; + $lang['strcreatetable'] = 'Crear unha táboa'; + $lang['strcreatetablelike'] = 'Crear unha táboa coma'; + $lang['strcreatetablelikeparent'] = 'Táboa orixinal'; + $lang['strcreatelikewithdefaults'] = 'INCLUÍR OS VALORES PREDETERMINADOS'; + $lang['strcreatelikewithconstraints'] = 'INCLUÍR AS RESTRICIÓNS'; + $lang['strcreatelikewithindexes'] = 'INCLUÍR OS ÍNDICES'; + $lang['strtablename'] = 'Nome da táboa'; + $lang['strtableneedsname'] = 'Debe fornecer un nome para a táboa.'; + $lang['strtablelikeneedslike'] = 'Debe fornecer unha táboa á que copiarlle as propiedades.'; + $lang['strtableneedsfield'] = 'Debe indicar polo menos un campo.'; + $lang['strtableneedscols'] = 'Debe indicar un número de columnas correcto.'; + $lang['strtablecreated'] = 'Creouse a táboa.'; + $lang['strtablecreatedbad'] = 'Non se conseguiu crear a táboa.'; + $lang['strconfdroptable'] = 'Está seguro de que quere eliminar a táboa «%s»?'; + $lang['strtabledropped'] = 'Eliminouse a táboa.'; + $lang['strtabledroppedbad'] = 'Non se conseguiu eliminar a táboa.'; + $lang['strconfemptytable'] = 'Está seguro de que quere baleirar a táboa «%s»?'; + $lang['strtableemptied'] = 'Baleirouse a táboa.'; + $lang['strtableemptiedbad'] = 'Non se conseguiu baleirar a táboa.'; + $lang['strinsertrow'] = 'Inserir unha fila'; + $lang['strrowinserted'] = 'Inseriuse unha fila.'; + $lang['strrowinsertedbad'] = 'Non se conseguiu inserir a fila.'; + $lang['strnofkref'] = 'Non existe ningún valor que coincida na clave externa «%s».'; + $lang['strrowduplicate'] = 'Non se conseguiu inserir a fila, intentouse facer unha inxección duplicada.'; + $lang['streditrow'] = 'Modificar a fila'; + $lang['strrowupdated'] = 'Actualizouse a fila.'; + $lang['strrowupdatedbad'] = 'Non se conseguiu actualizar a fila.'; + $lang['strdeleterow'] = 'Borrar a fila'; + $lang['strconfdeleterow'] = 'Está seguro de que quere borrar esta fila?'; + $lang['strrowdeleted'] = 'Borrouse a fila.'; + $lang['strrowdeletedbad'] = 'Non se conseguiu borrar a fila.'; + $lang['strinsertandrepeat'] = 'Inserir e repetir'; + $lang['strnumcols'] = 'Número de columnas'; + $lang['strcolneedsname'] = 'Debe especificar un nome para a columna'; + $lang['strselectallfields'] = 'Marcar todos os campos'; + $lang['strselectneedscol'] = 'Debe amosar polo menos unha columna.'; + $lang['strselectunary'] = 'Os operadores dun só operando non poden ter valores.'; + $lang['strcolumnaltered'] = 'Modificouse a columna.'; + $lang['strcolumnalteredbad'] = 'Non se conseguiu modificar a columna.'; + $lang['strconfdropcolumn'] = 'Está seguro de que quere eliminar a columna «%s» da táboa «%s»?'; + $lang['strcolumndropped'] = 'Eliminouse a columna.'; + $lang['strcolumndroppedbad'] = 'Non se conseguiu eliminar a columna.'; + $lang['straddcolumn'] = 'Engadir unha columna'; + $lang['strcolumnadded'] = 'Engadiuse a columna.'; + $lang['strcolumnaddedbad'] = 'Non se conseguiu engadir a columna.'; + $lang['strcascade'] = 'EN CASCADA'; + $lang['strtablealtered'] = 'Modificouse a táboa.'; + $lang['strtablealteredbad'] = 'Non se conseguiu modificar a táboa.'; + $lang['strdataonly'] = 'Só datos'; + $lang['strstructureonly'] = 'Só estrutura'; + $lang['strstructureanddata'] = 'Estrutura e datos'; + $lang['strtabbed'] = 'Tabulado'; + $lang['strauto'] = 'Detectar'; + $lang['strconfvacuumtable'] = 'Está seguro de que quere aspirar «%s»?'; + $lang['strconfanalyzetable'] = 'Está seguro de que quere analizar «%s»?'; + $lang['strconfreindextable'] = 'Está seguro de que quere indexar «%s»?'; + $lang['strconfclustertable'] = 'Está seguro de que quere concentrar «%s»?'; + $lang['strestimatedrowcount'] = 'Número estimado de filas'; + $lang['strspecifytabletoanalyze'] = 'Debe especificar polo menos unha táboa a analizar.'; + $lang['strspecifytabletoempty'] = 'Debe especificar polo menos unha táboa a baleirar.'; + $lang['strspecifytabletodrop'] = 'Debe especificar polo menos unha táboa a eliminar.'; + $lang['strspecifytabletovacuum'] = 'Debe especificar polo menos unha táboa a aspirar.'; + $lang['strspecifytabletoreindex'] = 'Debe especificar polo menos unha táboa a indexar.'; + $lang['strspecifytabletocluster'] = 'Debe especificar polo menos unha táboa a concentrar.'; + $lang['strnofieldsforinsert'] = 'Non pode inserir filas nunha táboa sen columnas.'; + + // Columns + $lang['strcolprop'] = 'Propiedades da columna'; + $lang['strnotableprovided'] = 'Non se forneceu ningunha táboa!'; + + // Users + $lang['struser'] = 'Usuario'; + $lang['strusers'] = 'Usuarios'; + $lang['strusername'] = 'Nome'; + $lang['strpassword'] = 'Contrasinal'; + $lang['strsuper'] = 'Administrador?'; + $lang['strcreatedb'] = 'Crear bases de datos?'; + $lang['strexpires'] = 'Caducidade'; + $lang['strsessiondefaults'] = 'Valores predeterminados da sesión'; + $lang['strnousers'] = 'Non se atopou ningún usuario.'; + $lang['struserupdated'] = 'Actualizouse o usuario.'; + $lang['struserupdatedbad'] = 'Non se conseguiu actualizar o usuario.'; + $lang['strshowallusers'] = 'Listar todos os usuarios'; + $lang['strcreateuser'] = 'Crear un usuario'; + $lang['struserneedsname'] = 'Debe fornecer un nome para o usuario.'; + $lang['strusercreated'] = 'Creouse o usuario.'; + $lang['strusercreatedbad'] = 'Non se conseguiu crear o usuario.'; + $lang['strconfdropuser'] = 'Está seguro de que quere eliminar o usuario «%s»?'; + $lang['struserdropped'] = 'Eliminouse o usuario.'; + $lang['struserdroppedbad'] = 'Non se conseguiu eliminar o usuario.'; + $lang['straccount'] = 'Conta'; + $lang['strchangepassword'] = 'Cambiar de contrasinal'; + $lang['strpasswordchanged'] = 'Cambiouse o contrasinal.'; + $lang['strpasswordchangedbad'] = 'Non se conseguiu cambiar o contrasinal.'; + $lang['strpasswordshort'] = 'O contrasinal é curto de máis.'; + $lang['strpasswordconfirm'] = 'Os contrasinais introducidos son distintos.'; + + // Groups + $lang['strgroup'] = 'Grupo'; + $lang['strgroups'] = 'Grupos'; + $lang['strshowallgroups'] = 'Amosar todos os grupos'; + $lang['strnogroup'] = 'Non se atopou o grupo.'; + $lang['strnogroups'] = 'Non se atopou grupo algún.'; + $lang['strcreategroup'] = 'Crear un grupo'; + $lang['strgroupneedsname'] = 'Debe fornecer un nome para o grupo.'; + $lang['strgroupcreated'] = 'Creouse o grupo.'; + $lang['strgroupcreatedbad'] = 'Non se conseguiu crear o grupo.'; + $lang['strconfdropgroup'] = 'está seguro de que quere eliminar o grupo «%s»?'; + $lang['strgroupdropped'] = 'Eliminouse o grupo.'; + $lang['strgroupdroppedbad'] = 'Non se conseguiu eliminar o grupo.'; + $lang['strmembers'] = 'Membros'; + $lang['strmemberof'] = 'Membros de'; + $lang['stradminmembers'] = 'Membros administradores'; + $lang['straddmember'] = 'Engadir un membro'; + $lang['strmemberadded'] = 'Engadiuse o membro.'; + $lang['strmemberaddedbad'] = 'Non se conseguiu engadir o membro.'; + $lang['strdropmember'] = 'Eliminar o membro'; + $lang['strconfdropmember'] = 'Está seguro de que quere eliminar o membro «%s» do grupo «%s»?'; + $lang['strmemberdropped'] = 'Eliminouse o membro.'; + $lang['strmemberdroppedbad'] = 'Non se conseguiu eliminar o membro.'; + + // Roles + $lang['strrole'] = 'Rol'; + $lang['strroles'] = 'Roles'; + $lang['strshowallroles'] = 'Amosar todos os roles'; + $lang['strnoroles'] = 'Non se atopou rol algún.'; + $lang['strinheritsprivs'] = 'Herdar os privilexios?'; + $lang['strcreaterole'] = 'Crear un rol'; + $lang['strcancreaterole'] = 'Pode crear roles?'; + $lang['strrolecreated'] = 'Creouse o rol.'; + $lang['strrolecreatedbad'] = 'Non se conseguiu crear o rol.'; + $lang['strrolealtered'] = 'Modificouse o rol.'; + $lang['strrolealteredbad'] = 'Non se conseguiu modificar o rol.'; + $lang['strcanlogin'] = 'Pode identificarse?'; + $lang['strconnlimit'] = 'Límite da conexión'; + $lang['strdroprole'] = 'Eliminar o rol'; + $lang['strconfdroprole'] = 'Está seguro de que quere eliminar o rol «%s»?'; + $lang['strroledropped'] = 'Eliminouse o rol.'; + $lang['strroledroppedbad'] = 'Non se conseguiu eliminar o rol.'; + $lang['strnolimit'] = 'Sen límite'; + $lang['strnever'] = 'Nunca'; + $lang['strroleneedsname'] = 'Ten que darlle un nome ao rol.'; + + // Privileges + $lang['strprivilege'] = 'Privilexio'; + $lang['strprivileges'] = 'Privilexios'; + $lang['strnoprivileges'] = 'Este obxecto ten os privilexios predeterminados do propietario.'; + $lang['strgrant'] = 'Conceder'; + $lang['strrevoke'] = 'Revogar'; + $lang['strgranted'] = 'Cambiáronse os privilexios.'; + $lang['strgrantfailed'] = 'Non se conseguiu cambiar os privilexios.'; + $lang['strgrantbad'] = 'Ten que especificar polo menos un usuario ou grupo e un privilexio.'; + $lang['strgrantor'] = 'Autor da concesión'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'Base de datos'; + $lang['strdatabases'] = 'Bases de datos'; + $lang['strshowalldatabases'] = 'Amosar todas as bases de datos'; + $lang['strnodatabases'] = 'Non se atopou base de datos algunha.'; + $lang['strcreatedatabase'] = 'Crear unha base de datos'; + $lang['strdatabasename'] = 'Nome da base de datos'; + $lang['strdatabaseneedsname'] = 'Debe darlle un nome á base de datos.'; + $lang['strdatabasecreated'] = 'Creouse a base de datos.'; + $lang['strdatabasecreatedbad'] = 'Non se conseguiu crear a base de datos.'; + $lang['strconfdropdatabase'] = 'Está seguro de que quere eliminar a base de datos «%s»?'; + $lang['strdatabasedropped'] = 'Eliminouse a base de datos.'; + $lang['strdatabasedroppedbad'] = 'Non se conseguiu eliminar a base de datos.'; + $lang['strentersql'] = 'Introduza a continuación as instrucións SQL a executar:'; + $lang['strsqlexecuted'] = 'Executáronse as instrucións SQL.'; + $lang['strvacuumgood'] = 'Completouse o aspirado.'; + $lang['strvacuumbad'] = 'Non se conseguiu efectuar o aspirado.'; + $lang['stranalyzegood'] = 'Completouse a análise.'; + $lang['stranalyzebad'] = 'Non se conseguiu completar a análise.'; + $lang['strreindexgood'] = 'Completouse o indexado.'; + $lang['strreindexbad'] = 'Non se conseguiu completar o indexado.'; + $lang['strfull'] = 'Completo'; + $lang['strfreeze'] = 'Agresivo'; + $lang['strforce'] = 'Forzar'; + $lang['strsignalsent'] = 'Enviouse o sinal.'; + $lang['strsignalsentbad'] = 'Non se conseguiu enviar o sinal.'; + $lang['strallobjects'] = 'Todos os obxectos'; + $lang['strdatabasealtered'] = 'Modificouse a base de datos.'; + $lang['strdatabasealteredbad'] = 'Non se conseguiu modificar a base de datos.'; + $lang['strspecifydatabasetodrop'] = 'Debe especificar polo menos unha base de datos a eliminar.'; + $lang['strtemplatedb'] = 'Modelo'; + $lang['strconfanalyzedatabase'] = 'Está seguro de que quere analizar todas as táboas da base de datos «%s»?'; + $lang['strconfvacuumdatabase'] = 'Está seguro de que quere aspirar todas as táboas da base de datos «%s»?'; + $lang['strconfreindexdatabase'] = 'Está seguro de que quere indexar todas as táboas da base de datos «%s»?'; + $lang['strconfclusterdatabase'] = 'Está seguro de que quere concentrar todas as táboas da base de datos «%s»?'; + + // Views + $lang['strview'] = 'Vista'; + $lang['strviews'] = 'Vistas'; + $lang['strshowallviews'] = 'Listar todas as vistas'; + $lang['strnoview'] = 'Non se atopou vista algunha.'; + $lang['strnoviews'] = 'Non se atopou vista algunha.'; + $lang['strcreateview'] = 'Crear unha vista'; + $lang['strviewname'] = 'Nome da vista'; + $lang['strviewneedsname'] = 'Debe fornecer un nome para a vista.'; + $lang['strviewneedsdef'] = 'Debe fornecer unha descrición da vista.'; + $lang['strviewneedsfields'] = 'Debe indicar que columnas quere ter na vista.'; + $lang['strviewcreated'] = 'Creouse a vista.'; + $lang['strviewcreatedbad'] = 'Non se conseguiu crear a vista.'; + $lang['strconfdropview'] = 'Está seguro de que quere eliminar a vista «%s»?'; + $lang['strviewdropped'] = 'Eliminouse a vista.'; + $lang['strviewdroppedbad'] = 'Non se conseguiu eliminar a vista.'; + $lang['strviewupdated'] = 'Actualizouse a vista.'; + $lang['strviewupdatedbad'] = 'Non se conseguiu actualizar a vista.'; + $lang['strviewlink'] = 'Unión de claves'; + $lang['strviewconditions'] = 'Condicións adicionais'; + $lang['strcreateviewwiz'] = 'Crear unha vista co asistente'; + $lang['strrenamedupfields'] = 'Renomear os campos duplicados'; + $lang['strdropdupfields'] = 'Eliminar os campos duplicados'; + $lang['strerrordupfields'] = 'Non permitir que haxa campos duplicados'; + $lang['strviewaltered'] = 'Modificouse a vista.'; + $lang['strviewalteredbad'] = 'Non se conseguiu modificar a vista.'; + $lang['strspecifyviewtodrop'] = 'Debe especificar polo menos unha vista a borrar.'; + + // Sequences + $lang['strsequence'] = 'Secuencia'; + $lang['strsequences'] = 'Secuencias'; + $lang['strshowallsequences'] = 'Amosar todas as secuencias'; + $lang['strnosequence'] = 'Non se atopou secuencia algunha.'; + $lang['strnosequences'] = 'Non se atopou secuencia algunha.'; + $lang['strcreatesequence'] = 'Crear unha secuencia'; + $lang['strlastvalue'] = 'Último valor'; + $lang['strincrementby'] = 'Aumentar en'; + $lang['strstartvalue'] = 'Valor inicial'; + $lang['strrestartvalue'] = 'Valor do reinicio'; + $lang['strmaxvalue'] = 'Valor máximo'; + $lang['strminvalue'] = 'Valor mínimo'; + $lang['strcachevalue'] = 'Valor da caché'; + $lang['strlogcount'] = 'Conta de rexistros'; + $lang['strcancycle'] = 'Pode repetirse?'; + $lang['striscalled'] = 'Aumentará o último valor antes de devolver o seguinte (is_called)?'; + $lang['strsequenceneedsname'] = 'Debe fornecer un nome para a secuencia.'; + $lang['strsequencecreated'] = 'Creouse a secuencia.'; + $lang['strsequencecreatedbad'] = 'Non se conseguiu crear a secuencia.'; + $lang['strconfdropsequence'] = 'Está seguro de que quere eliminar a secuencia «%s»?'; + $lang['strsequencedropped'] = 'Eliminouse a secuencia.'; + $lang['strsequencedroppedbad'] = 'Non se conseguiu eliminar a secuencia.'; + $lang['strsequencerestart'] = 'Reiniciouse a secuencia.'; + $lang['strsequencerestartbad'] = 'Non se conseguiu reiniciar a secuencia.'; + $lang['strsequencereset'] = 'Restableceuse a secuencia.'; + $lang['strsequenceresetbad'] = 'Non se conseguiu restablecer a secuencia.'; + $lang['strsequencealtered'] = 'Modificouse a secuencia.'; + $lang['strsequencealteredbad'] = 'Non se conseguiu modificar a secuencia.'; + $lang['strsetval'] = 'Establecer o valor'; + $lang['strsequencesetval'] = 'Estableceuse o valor da secuencia.'; + $lang['strsequencesetvalbad'] = 'Non se conseguiu establecer o valor da secuencia.'; + $lang['strnextval'] = 'Aumentar o valor'; + $lang['strsequencenextval'] = 'Aumentouse o valor da secuencia.'; + $lang['strsequencenextvalbad'] = 'Non se conseguiu aumentar o valor da secuencia.'; + $lang['strspecifysequencetodrop'] = 'Debe especificar polo menos unha secuencia a eliminar.'; + + // Indexes + $lang['strindex'] = 'Índice'; + $lang['strindexes'] = 'Índices'; + $lang['strindexname'] = 'Nome do índice'; + $lang['strshowallindexes'] = 'Listar todos os índices'; + $lang['strnoindex'] = 'Non se atopou índice algún.'; + $lang['strnoindexes'] = 'Non se atopou índice algún.'; + $lang['strcreateindex'] = 'Crear un índice'; + $lang['strtabname'] = 'Nome da lapela'; + $lang['strcolumnname'] = 'Nome da columna'; + $lang['strindexneedsname'] = 'Debe fornecer un nome para o índice.'; + $lang['strindexneedscols'] = 'Os índices teñen que ter un número de columnas correcto.'; + $lang['strindexcreated'] = 'Creouse o índice.'; + $lang['strindexcreatedbad'] = 'Non se conseguiu crear o índice.'; + $lang['strconfdropindex'] = 'Está seguro de que quere eliminar o índice «%s»?'; + $lang['strindexdropped'] = 'Eliminouse o índice.'; + $lang['strindexdroppedbad'] = 'Non se conseguiu eliminar o índice.'; + $lang['strkeyname'] = 'Nome da clave'; + $lang['struniquekey'] = 'Clave única'; + $lang['strprimarykey'] = 'Clave primaria'; + $lang['strindextype'] = 'Tipo de índice'; + $lang['strtablecolumnlist'] = 'Columnas na táboa'; + $lang['strindexcolumnlist'] = 'Columnas no índice'; + $lang['strclusteredgood'] = 'Completouse o concentrado.'; + $lang['strclusteredbad'] = 'Non se conseguiu completar o concentrado.'; + $lang['strconcurrently'] = 'Simultaneamente'; + $lang['strnoclusteravailable'] = 'A táboa non está concentrada nun índice.'; + + // Rules + $lang['strrules'] = 'Regras'; + $lang['strrule'] = 'Regra'; + $lang['strshowallrules'] = 'Listar todas as regras'; + $lang['strnorule'] = 'Non se atopou regra algunha.'; + $lang['strnorules'] = 'Non se atopou regra algunha.'; + $lang['strcreaterule'] = 'Crear unha regra'; + $lang['strrulename'] = 'Nome da regra'; + $lang['strruleneedsname'] = 'Debe fornecer un nome para a regra.'; + $lang['strrulecreated'] = 'Creouse a regra.'; + $lang['strrulecreatedbad'] = 'Non se conseguiu crear a regra.'; + $lang['strconfdroprule'] = 'Está seguro de que quere eliminar a regra «%s» en «%s»?'; + $lang['strruledropped'] = 'Eliminouse a regra.'; + $lang['strruledroppedbad'] = 'Non se conseguiu eliminar a regra.'; + + // Constraints + $lang['strconstraint'] = 'Restrición'; + $lang['strconstraints'] = 'Restricións'; + $lang['strshowallconstraints'] = 'Listar todas as restricións'; + $lang['strnoconstraints'] = 'Non se atopou restrición algunha.'; + $lang['strcreateconstraint'] = 'Crear unha restrición'; + $lang['strconstraintcreated'] = 'Creouse a restrición.'; + $lang['strconstraintcreatedbad'] = 'Non se conseguiu crear a restrición.'; + $lang['strconfdropconstraint'] = 'Está seguro de que quere eliminar a restrición «%s» en «%s»?'; + $lang['strconstraintdropped'] = 'Eliminouse a restrición.'; + $lang['strconstraintdroppedbad'] = 'Non se conseguiu eliminar a restrición.'; + $lang['straddcheck'] = 'Engadir unha comprobación'; + $lang['strcheckneedsdefinition'] = 'A comprobación necesita unha definición.'; + $lang['strcheckadded'] = 'Engadiuse a comprobación.'; + $lang['strcheckaddedbad'] = 'Non se conseguiu engadir a comprobación.'; + $lang['straddpk'] = 'Engadir unha clave primaria'; + $lang['strpkneedscols'] = 'A clave primaria necesita polo menos unha columna.'; + $lang['strpkadded'] = 'Engadiuse a clave primaria.'; + $lang['strpkaddedbad'] = 'Non se conseguiu engadir a clave primaria.'; + $lang['stradduniq'] = 'Engadir unha clave única'; + $lang['struniqneedscols'] = 'A clave única necesita polo menos unha columna.'; + $lang['struniqadded'] = 'Engadiuse a clave única.'; + $lang['struniqaddedbad'] = 'Non se conseguiu engadir a clave única.'; + $lang['straddfk'] = 'Engadir unha clave externa'; + $lang['strfkneedscols'] = 'A clave externa necesita polo menos unha columna.'; + $lang['strfkneedstarget'] = 'A clave externa necesita unha táboa externa.'; + $lang['strfkadded'] = 'Engadiuse a clave externa.'; + $lang['strfkaddedbad'] = 'Non se conseguiu engadir a clave externa.'; + $lang['strfktarget'] = 'Táboa externa'; + $lang['strfkcolumnlist'] = 'Columnas na clave'; + $lang['strondelete'] = 'AO ACTUALIZAR'; // Sei que son instrucións cando se usa SQL, pero na + $lang['stronupdate'] = 'AO BORRAR'; // interface paréceme mellor traducilos. + + // Functions + $lang['strfunction'] = 'Función'; + $lang['strfunctions'] = 'Funcións'; + $lang['strshowallfunctions'] = 'Listar todas as funcións'; + $lang['strnofunction'] = 'Non se atopou función algunha.'; + $lang['strnofunctions'] = 'Non se atopou función algunha.'; + $lang['strcreateplfunction'] = 'Crear unha función SQL/PL'; + $lang['strcreateinternalfunction'] = 'Crear unha función interna'; + $lang['strcreatecfunction'] = 'Crear unha función en C'; + $lang['strfunctionname'] = 'Nome da función'; + $lang['strreturns'] = 'Devolve'; + $lang['strproglanguage'] = 'Linguaxe de programación'; + $lang['strfunctionneedsname'] = 'Debe fornecer un nome para a función.'; + $lang['strfunctionneedsdef'] = 'Debe fornecer unha definición para a función.'; + $lang['strfunctioncreated'] = 'Creouse a función.'; + $lang['strfunctioncreatedbad'] = 'Non se conseguiu crear a función.'; + $lang['strconfdropfunction'] = 'Está seguro de que quere eliminar a función «%s»?'; + $lang['strfunctiondropped'] = 'Eliminouse a función.'; + $lang['strfunctiondroppedbad'] = 'Non se conseguiu eliminar a función.'; + $lang['strfunctionupdated'] = 'Actualizouse a función.'; + $lang['strfunctionupdatedbad'] = 'Non se conseguiu actualizar a función.'; + $lang['strobjectfile'] = 'Ficheiro de obxecto'; + $lang['strlinksymbol'] = 'Símbolo da ligazón'; + $lang['strarguments'] = 'Argumentos'; + $lang['strargmode'] = 'Modo'; + $lang['strargtype'] = 'Tipo'; + $lang['strargadd'] = 'Engadir outro argumento'; + $lang['strargremove'] = 'Borrar este argumento'; + $lang['strargnoargs'] = 'Esta función non recibirá argumento ningún.'; + $lang['strargenableargs'] = 'Permitir que se lle fornezan argumentos á función.'; + $lang['strargnorowabove'] = 'Ten que haber unha fila antes desta.'; + $lang['strargnorowbelow'] = 'Ten que haber unha fila despois desta.'; + $lang['strargraise'] = 'Subir.'; + $lang['strarglower'] = 'Baixar.'; + $lang['strargremoveconfirm'] = 'Está seguro de que quere borrar este argumento? Esta acción non se pode desfacer.'; + $lang['strfunctioncosting'] = 'Custo da función'; + $lang['strresultrows'] = 'Filas resultantes'; + $lang['strexecutioncost'] = 'Custo de execución'; + $lang['strspecifyfunctiontodrop'] = 'Debe especificar polo menos unha función a eliminar.'; + + // Triggers + $lang['strtrigger'] = 'Disparador'; + $lang['strtriggers'] = 'Disparadores'; + $lang['strshowalltriggers'] = 'Listar todos os disparadores'; + $lang['strnotrigger'] = 'Non se atopor disparador algún.'; + $lang['strnotriggers'] = 'Non se atopor disparador algún.'; + $lang['strcreatetrigger'] = 'Crear un disparador'; + $lang['strtriggerneedsname'] = 'Debe fornecer un nome para o disparador.'; + $lang['strtriggerneedsfunc'] = 'Debe especificar unha función para o disparador.'; + $lang['strtriggercreated'] = 'Creouse o disparador.'; + $lang['strtriggercreatedbad'] = 'Non se conseguiu crear o disparador.'; + $lang['strconfdroptrigger'] = 'Está seguro de que quere eliminar o disparador «%s» en «%s»?'; + $lang['strconfenabletrigger'] = 'Está seguro de que quere activar o disparador «%s» en «%s»?'; + $lang['strconfdisabletrigger'] = 'Está seguro de que quere desactivar o disparador «%s» en «%s»?'; + $lang['strtriggerdropped'] = 'Eliminouse o disparador.'; + $lang['strtriggerdroppedbad'] = 'Non se conseguiu eliminar o disparador.'; + $lang['strtriggerenabled'] = 'Activouse o disparador.'; + $lang['strtriggerenabledbad'] = 'Non se conseguiu activar o disparador.'; + $lang['strtriggerdisabled'] = 'Desactivouse o disparador.'; + $lang['strtriggerdisabledbad'] = 'Non se conseguiu desactivar o disparador.'; + $lang['strtriggeraltered'] = 'Modificouse o disparador.'; + $lang['strtriggeralteredbad'] = 'Non se conseguiu modificar o disparador.'; + $lang['strforeach'] = 'Por cada'; // «For each [row or instruction]» + + // Types + $lang['strtype'] = 'Tipo'; + $lang['strtypes'] = 'Tipos'; + $lang['strshowalltypes'] = 'Listar todos os tipos'; + $lang['strnotype'] = 'Non se atopou tipo algún.'; + $lang['strnotypes'] = 'Non se atopou tipo algún.'; + $lang['strcreatetype'] = 'Crear un tipo'; + $lang['strcreatecomptype'] = 'Crear un tipo composto'; + $lang['strcreateenumtype'] = 'Crear un tipo de enumeración'; + $lang['strtypeneedsfield'] = 'Debe especificar polo menos un campo.'; + $lang['strtypeneedsvalue'] = 'Debe especificar polo menos un valor.'; + $lang['strtypeneedscols'] = 'Debe especificar un número correcto de campos.'; + $lang['strtypeneedsvals'] = 'Debe especificar un número correcto de valores.'; + $lang['strinputfn'] = 'Función de entrada'; + $lang['stroutputfn'] = 'Función de saída'; + $lang['strpassbyval'] = 'Pasado por valor?'; + $lang['stralignment'] = 'Aliñación'; + $lang['strelement'] = 'Elemento'; + $lang['strdelimiter'] = 'Delimitador'; + $lang['strstorage'] = 'Almacenamento'; + $lang['strfield'] = 'Campo'; + $lang['strnumfields'] = 'Cantidade de campos'; + $lang['strnumvalues'] = 'Cantidade de valores'; + $lang['strtypeneedsname'] = 'Debe fornecer un nome para o tipo.'; + $lang['strtypeneedslen'] = 'Debe fornecer unha lonxitude para o tipo.'; + $lang['strtypecreated'] = 'Creouse o tipo.'; + $lang['strtypecreatedbad'] = 'Non se conseguiu crear o tipo.'; + $lang['strconfdroptype'] = 'Está seguro de que quere eliminar o tipo «%s»?'; + $lang['strtypedropped'] = 'Eliminouse o tipo.'; + $lang['strtypedroppedbad'] = 'Non se conseguiu eliminar o tipo.'; + $lang['strflavor'] = 'Subtipo'; + $lang['strbasetype'] = 'Base'; + $lang['strcompositetype'] = 'Composto'; + $lang['strpseudotype'] = 'Pseudo'; + $lang['strenum'] = 'Enumeración'; + $lang['strenumvalues'] = 'Valores da enumeración'; + + // Schemas + $lang['strschema'] = 'Esquema'; + $lang['strschemas'] = 'Esquemas'; + $lang['strshowallschemas'] = 'Listar todos os esquemas'; + $lang['strnoschema'] = 'Non se atopou esquema algún.'; + $lang['strnoschemas'] = 'Non se atopou esquema algún.'; + $lang['strcreateschema'] = 'Crear un esquema'; + $lang['strschemaname'] = 'Nome do esquema'; + $lang['strschemaneedsname'] = 'Debe fornecer un nome para o esquema.'; + $lang['strschemacreated'] = 'Creouse o esquema.'; + $lang['strschemacreatedbad'] = 'Non se conseguiu crear o esquema.'; + $lang['strconfdropschema'] = 'Está seguro de que quere eliminar o esquema «%s»?'; + $lang['strschemadropped'] = 'Eliminouse o esquema.'; + $lang['strschemadroppedbad'] = 'Non se conseguiu eliminar o esquema.'; + $lang['strschemaaltered'] = 'Modificouse o esquema.'; + $lang['strschemaalteredbad'] = 'Non se conseguiu modificar o esquema.'; + $lang['strsearchpath'] = 'Ruta de busca do esquema'; + $lang['strspecifyschematodrop'] = 'Debe especificar polo menos un esquema a eliminar.'; + + // Reports + $lang['strreport'] = 'Informe'; + $lang['strreports'] = 'Informes'; + $lang['strshowallreports'] = 'Listar todos os informes'; + $lang['strnoreports'] = 'Non se atopou informe algún.'; + $lang['strcreatereport'] = 'Crear un informe'; + $lang['strreportdropped'] = 'Eliminouse o informe.'; + $lang['strreportdroppedbad'] = 'Non se conseguiu eliminar o informe.'; + $lang['strconfdropreport'] = 'Está seguro de que quere eliminar o informe «%s»?'; + $lang['strreportneedsname'] = 'Debe fornecer un nome para o informe.'; + $lang['strreportneedsdef'] = 'Debe fornecer un código SQL para o informe.'; + $lang['strreportcreated'] = 'Gardouse o informe.'; + $lang['strreportcreatedbad'] = 'Non se conseguiu gardar o informe.'; + + // Domains + $lang['strdomain'] = 'Dominio'; + $lang['strdomains'] = 'Dominios'; + $lang['strshowalldomains'] = 'Listar todos os dominios'; + $lang['strnodomains'] = 'Non se atopou dominio algún.'; + $lang['strcreatedomain'] = 'Crear un dominio'; + $lang['strdomaindropped'] = 'Eliminouse o dominio.'; + $lang['strdomaindroppedbad'] = 'Non se conseguiu eliminar o dominio.'; + $lang['strconfdropdomain'] = 'Está seguro de que quere eliminar o dominio «%s»?'; + $lang['strdomainneedsname'] = 'Debe fornecer un nome para o dominio.'; + $lang['strdomaincreated'] = 'Creouse o dominio.'; + $lang['strdomaincreatedbad'] = 'Non se conseguiu crear o dominio.'; + $lang['strdomainaltered'] = 'Modificouse o dominio.'; + $lang['strdomainalteredbad'] = 'Non se conseguiu modificar o dominio.'; + + // Operators + $lang['stroperator'] = 'Operador'; + $lang['stroperators'] = 'Operadores'; + $lang['strshowalloperators'] = 'Listar todos os operadores'; + $lang['strnooperator'] = 'Non se atopou operador algún.'; + $lang['strnooperators'] = 'Non se atopou operador algún.'; + $lang['strcreateoperator'] = 'Crear un operador'; + $lang['strleftarg'] = 'Tipo do argumento esquerdo'; + $lang['strrightarg'] = 'Tipo do argumento dereito'; + $lang['strcommutator'] = 'Conmutador'; + $lang['strnegator'] = 'Negación'; + $lang['strrestrict'] = 'Restrinxir'; + $lang['strjoin'] = 'Unir'; + $lang['strhashes'] = 'Hashes'; // Non sei como traducilo. + $lang['strmerges'] = 'Mesturas'; + $lang['strleftsort'] = 'Ordenar pola esquerda'; + $lang['strrightsort'] = 'Ordenar pola dereita'; + $lang['strlessthan'] = 'Menor que'; + $lang['strgreaterthan'] = 'Maior que'; + $lang['stroperatorneedsname'] = 'Debe fornecer un nome para o operador.'; + $lang['stroperatorcreated'] = 'Creouse o operador.'; + $lang['stroperatorcreatedbad'] = 'Non se conseguiu crear o operador.'; + $lang['strconfdropoperator'] = 'Está seguro de que quere eliminar o operador «%s»?'; + $lang['stroperatordropped'] = 'Eliminouse o operador.'; + $lang['stroperatordroppedbad'] = 'Non se conseguiu eliminar o operador.'; + + // Casts + $lang['strcasts'] = 'Molde'; + $lang['strnocasts'] = 'Non se atopou molde algún.'; + $lang['strsourcetype'] = 'Tipo orixe'; + $lang['strtargettype'] = 'Tipo obxectivo'; + $lang['strimplicit'] = 'Implícito'; + $lang['strinassignment'] = 'Na asignación'; + $lang['strbinarycompat'] = '(Compatible a nivel binario)'; + + // Conversions + $lang['strconversions'] = 'Conversións'; + $lang['strnoconversions'] = 'Non se atopou conversión algunha.'; + $lang['strsourceencoding'] = 'Codificación orixinal'; + $lang['strtargetencoding'] = 'Codificación obxectivo'; + + // Languages + $lang['strlanguages'] = 'Linguas'; + $lang['strnolanguages'] = 'Non se atopou lingua algunha.'; + $lang['strtrusted'] = 'De confianza'; + + // Info + $lang['strnoinfo'] = 'Non hai información dispoñible.'; + $lang['strreferringtables'] = 'Táboas que fan referencia a esta'; + $lang['strparenttables'] = 'Táboas superiores'; + $lang['strchildtables'] = 'Táboas subordinadas'; + + // Aggregates + $lang['straggregate'] = 'Conxunto'; + $lang['straggregates'] = 'Conxuntos'; + $lang['strnoaggregates'] = 'Non se atopou conxunto algún.'; + $lang['stralltypes'] = '(Todos os tipos)'; + $lang['strcreateaggregate'] = 'Crear un conxunto'; + $lang['straggrbasetype'] = 'Tipo de dato de entrada'; + $lang['straggrsfunc'] = 'Función de cambio de estado'; + $lang['straggrstype'] = 'Tipo de dato para o valor do estado'; + $lang['straggrffunc'] = 'Función final'; + $lang['straggrinitcond'] = 'Condición inicial'; + $lang['straggrsortop'] = 'Operador de orde'; + $lang['strconfdropaggregate'] = 'Está seguro de que quere eliminar o conxunto «%s»?'; + $lang['straggregatedropped'] = 'Eliminouse o conxunto.'; + $lang['straggregatedroppedbad'] = 'Non se conseguiu eliminar o conxunto.'; + $lang['straggraltered'] = 'Modificouse o conxunto.'; + $lang['straggralteredbad'] = 'Non se conseguiu eliminar o conxunto.'; + $lang['straggrneedsname'] = 'Debe fornecer un nome para o conxunto.'; + $lang['straggrneedsbasetype'] = 'Debe fornecer un tipo de dato de entrada para o conxunto.'; + $lang['straggrneedssfunc'] = 'Debe fornecer o nome da función de cambio de estado para o conxunto.'; + $lang['straggrneedsstype'] = 'Debe fornecer un tipo de dato para o valor do estado do conxunto.'; + $lang['straggrcreated'] = 'Creouse o conxunto.'; + $lang['straggrcreatedbad'] = 'Non se conseguiu crear o conxunto.'; + $lang['straggrshowall'] = 'Listar todos os conxuntos'; + + // Operator Classes + $lang['stropclasses'] = 'Clases de operador'; + $lang['strnoopclasses'] = 'Non se atopor clase de operador algunha.'; + $lang['straccessmethod'] = 'Método de acceso'; + + // Stats and performance + $lang['strrowperf'] = 'Rendemento das filas'; + $lang['strioperf'] = 'Rendemento da entrada e saída'; + $lang['stridxrowperf'] = 'Rendemento das filas do índice'; + $lang['stridxioperf'] = 'Rendemento da entrada e saída do índice'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Secuencial'; + $lang['strscan'] = 'Explorar'; + $lang['strread'] = 'Ler'; + $lang['strfetch'] = 'Obter'; + $lang['strheap'] = 'Pila'; + $lang['strtoast'] = 'TOAST'; // Non traduzo por se son siglas, que non o teño claro. + $lang['strtoastindex'] = 'Índice TOAST'; + $lang['strcache'] = 'Caché'; + $lang['strdisk'] = 'Disco'; + $lang['strrows2'] = 'Filas'; + + // Tablespaces + $lang['strtablespace'] = 'Alias de ruta'; + $lang['strtablespaces'] = 'Alias de ruta'; + $lang['strshowalltablespaces'] = 'Listar todos os alias de ruta'; + $lang['strnotablespaces'] = 'Non se atopou alias de ruta algún.'; + $lang['strcreatetablespace'] = 'Crear un alias de ruta'; + $lang['strlocation'] = 'Lugar'; + $lang['strtablespaceneedsname'] = 'Debe fornecer un nome para o alias de ruta.'; + $lang['strtablespaceneedsloc'] = 'Debe fornecer unha ruta para a que crear o alias.'; + $lang['strtablespacecreated'] = 'Creouse o alias de ruta.'; + $lang['strtablespacecreatedbad'] = 'non se conseguiu crear o alias de ruta.'; + $lang['strconfdroptablespace'] = 'Está seguro de que quere borrar o alias de ruta «%s»?'; + $lang['strtablespacedropped'] = 'Eliminouse o alias de ruta.'; + $lang['strtablespacedroppedbad'] = 'Non se conseguiu eliminar o alias de ruta.'; + $lang['strtablespacealtered'] = 'Modificouse o alias de ruta.'; + $lang['strtablespacealteredbad'] = 'Non se conseguiu modificar o alias de ruta.'; + + // Slony clusters + $lang['strcluster'] = 'Concentrador'; + $lang['strnoclusters'] = 'Non se atopou concentrador algún.'; + $lang['strconfdropcluster'] = 'Está seguro de que quere eliminar o concentrador «%s»?'; + $lang['strclusterdropped'] = 'Eliminouse o concentrador.'; + $lang['strclusterdroppedbad'] = 'Non se conseguiu eliminar o concentrador.'; + $lang['strinitcluster'] = 'Inicializar o concentrador'; + $lang['strclustercreated'] = 'Inicializouse o concentrador.'; + $lang['strclustercreatedbad'] = 'Non se conseguiu inicializar o concentrador.'; + $lang['strclusterneedsname'] = 'Debe fornecer un nome para o concentrador.'; + $lang['strclusterneedsnodeid'] = 'Debe fornecer un identificador para o nodo local.'; + + // Slony nodes + $lang['strnodes'] = 'Nodos'; + $lang['strnonodes'] = 'Non se atopou nodo algún.'; + $lang['strcreatenode'] = 'Crear un nodo'; + $lang['strid'] = 'Identificador'; + $lang['stractive'] = 'Activo'; + $lang['strnodecreated'] = 'Creouse o nodo.'; + $lang['strnodecreatedbad'] = 'Non se conseguiu crear o nodo.'; + $lang['strconfdropnode'] = 'Está seguro de que quere eliminar o nodo «%s»?'; + $lang['strnodedropped'] = 'Eliminouse o nodo.'; + $lang['strnodedroppedbad'] = 'Non se conseguiu eliminar o nodo.'; + $lang['strfailover'] = 'Tolerancia de erros'; + $lang['strnodefailedover'] = 'O nodo tolerou o erro.'; + $lang['strnodefailedoverbad'] = 'O nodo non deu tolerado o erro.'; + $lang['strstatus'] = 'Estado'; + $lang['strhealthy'] = 'Saúde'; + $lang['stroutofsync'] = 'Sen sincronizar'; + $lang['strunknown'] = 'Descoñecido'; + + // Slony paths + $lang['strpaths'] = 'Rutas'; + $lang['strnopaths'] = 'Non se atopou ruta algunha.'; + $lang['strcreatepath'] = 'Crear unha ruta'; + $lang['strnodename'] = 'Nome do nodo'; + $lang['strnodeid'] = 'Identificador do nodo'; + $lang['strconninfo'] = 'Cadea de conexión'; + $lang['strconnretry'] = 'Segundos entre os intentos de conexión'; + $lang['strpathneedsconninfo'] = 'Debe fornecer unha cadea de conexión para a ruta.'; + $lang['strpathneedsconnretry'] = 'Debe indicar cantos segundos se ha de agardar para volver intentar establecer unha conexión.'; + $lang['strpathcreated'] = 'Creouse a ruta.'; + $lang['strpathcreatedbad'] = 'Non se conseguiu crear a ruta.'; + $lang['strconfdroppath'] = 'Está seguro de que quere eliminar a ruta «%s»?'; + $lang['strpathdropped'] = 'Eliminouse a ruta.'; + $lang['strpathdroppedbad'] = 'Non se conseguiu eliminar a ruta.'; + + // Slony listens + $lang['strlistens'] = 'Escoitas'; + $lang['strnolistens'] = 'Non se atopou escoita algunha.'; + $lang['strcreatelisten'] = 'Crear unha escoita'; + $lang['strlistencreated'] = 'Creouse a escoita.'; + $lang['strlistencreatedbad'] = 'Non se conseguiu crear a escoita.'; + $lang['strconfdroplisten'] = 'Está seguro de que quere eliminar a escoita «%s»?'; + $lang['strlistendropped'] = 'Eliminouse a escoita.'; + $lang['strlistendroppedbad'] = 'Non se conseguiu eliminar a escoita.'; + + // Slony replication sets + $lang['strrepsets'] = 'Grupos de réplicas'; + $lang['strnorepsets'] = 'Non se atopou grupo de réplicas algún.'; + $lang['strcreaterepset'] = 'Crear un grupo de réplicas'; + $lang['strrepsetcreated'] = 'Creouse o grupo de réplicas.'; + $lang['strrepsetcreatedbad'] = 'Non se conseguiu crear o grupo de réplicas.'; + $lang['strconfdroprepset'] = 'Está seguro de que quere borrar o grupo de réplicas «%s»?'; + $lang['strrepsetdropped'] = 'Eliminouse o grupo de réplicas.'; + $lang['strrepsetdroppedbad'] = 'Non se conseguiu eliminar o grupo de réplicas.'; + $lang['strmerge'] = 'Mesturar'; + $lang['strmergeinto'] = 'Mesturar con'; + $lang['strrepsetmerged'] = 'Mesturáronse os grupos de réplicas.'; + $lang['strrepsetmergedbad'] = 'Non se conseguiu mesturar os grupos de réplicas.'; + $lang['strmove'] = 'Mover'; + $lang['strneworigin'] = 'Nova orixe'; + $lang['strrepsetmoved'] = 'Moveuse o grupo de réplicas.'; + $lang['strrepsetmovedbad'] = 'Non se conseguiu mover o grupo de réplicas.'; + $lang['strnewrepset'] = 'Novo grupo de réplicas'; + $lang['strlock'] = 'Bloquear'; + $lang['strlocked'] = 'Bloqueado'; + $lang['strunlock'] = 'Desbloquear'; + $lang['strconflockrepset'] = 'Está seguro de que quere bloquear o grupo de réplicas «%s»?'; + $lang['strrepsetlocked'] = 'Bloqueouse o grupo de réplicas.'; + $lang['strrepsetlockedbad'] = 'Non se conseguiu bloquear o grupo de réplicas.'; + $lang['strconfunlockrepset'] = 'Está seguro de que quere desbloquear o grupo de réplicas «%s»?'; + $lang['strrepsetunlocked'] = 'Desbloqueouse o grupo de réplicas.'; + $lang['strrepsetunlockedbad'] = 'Non se conseguiu desbloquear o grupo de réplicas.'; + $lang['stronlyonnode'] = 'Só no nodo'; + $lang['strddlscript'] = 'Guión DDL'; + $lang['strscriptneedsbody'] = 'Debe fornecer un guión para que se execute en todos os nodos.'; + $lang['strscriptexecuted'] = 'Executouse o guión DDL do grupo de réplicas.'; + $lang['strscriptexecutedbad'] = 'Non se conseguiu executar o guión DDL do grupo de réplicas.'; + $lang['strtabletriggerstoretain'] = 'Slony non vai desactivar o seguintes disparadores::'; + + // Slony tables in replication sets + $lang['straddtable'] = 'Engadir unha táboa'; + $lang['strtableneedsuniquekey'] = 'A táboa a engadir necesita dunha clave primaria ou única.'; + $lang['strtableaddedtorepset'] = 'Engadiuse a táboa ao grupo de réplicas.'; + $lang['strtableaddedtorepsetbad'] = 'Non se conseguiu engadir a táboa ao grupo de réplicas.'; + $lang['strconfremovetablefromrepset'] = 'Está seguro de que quere eliminar a táboa «%s» do grupo de réplicas «%s»?'; + $lang['strtableremovedfromrepset'] = 'Eliminouse a táboa do grupo de réplicas.'; + $lang['strtableremovedfromrepsetbad'] = 'Non se conseguiu eliminar a táboa do grupo de réplicas.'; + + // Slony sequences in replication sets + $lang['straddsequence'] = 'Engadir unha secuencia'; + $lang['strsequenceaddedtorepset'] = 'Engadiuse a secuencia ao grupo de réplicas.'; + $lang['strsequenceaddedtorepsetbad'] = 'Non se conseguiu engadir a secuencia ao grupo de réplicas.'; + $lang['strconfremovesequencefromrepset'] = 'Está seguro de que quere eliminar a secuencia «%s» do grupo de réplicas «%s»?'; + $lang['strsequenceremovedfromrepset'] = 'Eliminouse a secuencia do grupo de réplicas.'; + $lang['strsequenceremovedfromrepsetbad'] = 'Non se conseguiu eliminar a secuencia do grupo de réplicas.'; + + // Slony subscriptions + $lang['strsubscriptions'] = 'Subscricións'; + $lang['strnosubscriptions'] = 'Non se atopou subscrición algunha.'; + + // Miscellaneous + $lang['strtopbar'] = '%s, executándose no enderezo %s:%s. Está identificado coma «%s».'; + $lang['strtimefmt'] = 'd/m/Y, G:i:s'; + $lang['strhelp'] = 'Axuda'; + $lang['strhelpicon'] = '?'; + $lang['strhelppagebrowser'] = 'Navegador das páxinas de axuda'; + $lang['strselecthelppage'] = 'Escolla unha páxina de axuda'; + $lang['strinvalidhelppage'] = 'Páxina de axuda incorrecta.'; + $lang['strlogintitle'] = 'Identificarse en %s'; + $lang['strlogoutmsg'] = 'Saíu de %s'; + $lang['strloading'] = 'Cargando...'; + $lang['strerrorloading'] = 'Produciuse un erro durante o proceso de carga'; + $lang['strclicktoreload'] = 'Prema aquí para recargar'; + + // Autovacuum + $lang['strautovacuum'] = 'Aspirado automático'; + $lang['strturnedon'] = 'Acendido'; + $lang['strturnedoff'] = 'Apagado'; + $lang['strenabled'] = 'Activado'; + $lang['strnovacuumconf'] = 'Non se atopou configuración para aspirados automáticos algunha.'; + $lang['strvacuumbasethreshold'] = 'Límite da base do aspirado'; + $lang['strvacuumscalefactor'] = 'Factores de escala do aspirado'; + $lang['stranalybasethreshold'] = 'Límite da base da análise'; + $lang['stranalyzescalefactor'] = 'Factores de escala da análise'; + $lang['strvacuumcostdelay'] = 'Atraso do custo do aspirado'; + $lang['strvacuumcostlimit'] = 'Custo límite do aspirado'; + $lang['strvacuumpertable'] = 'Configuración do aspirado automático por táboa'; + $lang['straddvacuumtable'] = 'Engadir unha configuración de aspirado automático dunha táboa'; + $lang['streditvacuumtable'] = 'Modificar a configuración de aspirado automático da táboa «%s»'; + $lang['strdelvacuumtable'] = 'Está seguro de que quere eliminar a configuración de aspirado automático da táboa «%s»?'; + $lang['strvacuumtablereset'] = 'A configuración de aspirado automático da táboa «%s» restableceuse aos seus valores predeterminados'; + $lang['strdelvacuumtablefail'] = 'Non se conseguiu eliminar a configuración de aspirado automático da táboa «%s»'; + $lang['strsetvacuumtablesaved'] = 'Gardouse a configuración de aspirado automático da táboa «%s».'; + $lang['strsetvacuumtablefail'] = 'Non se conseguiu gardar a configuración de aspirado automático da táboa «%s».'; + $lang['strspecifydelvacuumtable'] = 'Debe especificar unha táboa da que borrar os parámetros de aspirado.'; + $lang['strspecifyeditvacuumtable'] = 'Debe especificar unha táboa na que modificar os parámetros de aspirado.'; + $lang['strnotdefaultinred'] = 'Os valores que non sexan os predeterminados están en cor vermella.'; + + // Table-level Locks + $lang['strlocks'] = 'Bloqueos'; + $lang['strtransaction'] = 'Identificador da transacción'; + $lang['strvirtualtransaction'] = 'Identificador da transacción virtual'; + $lang['strprocessid'] = 'Identificador do proceso'; + $lang['strmode'] = 'Modo de bloqueo'; + $lang['strislockheld'] = 'Está activo o bloqueo?'; + + // Prepared transactions + $lang['strpreparedxacts'] = 'Transaccións preparadas'; + $lang['strxactid'] = 'Identificador da transacción'; + $lang['strgid'] = 'Identificador global'; + + // Fulltext search + $lang['strfulltext'] = 'Busca de texto completa'; + $lang['strftsconfig'] = 'Configuración de BTC'; + $lang['strftsconfigs'] = 'Configuracións'; + $lang['strftscreateconfig'] = 'Crear unha configuración de BTC'; + $lang['strftscreatedict'] = 'Crear un dicionario'; + $lang['strftscreatedicttemplate'] = 'Crear un modelo de dicionario'; + $lang['strftscreateparser'] = 'Crear un analizador'; + $lang['strftsnoconfigs'] = 'Non se atopou configuración de BTC algunha.'; + $lang['strftsconfigdropped'] = 'Eliminouse a configuración de BTC.'; + $lang['strftsconfigdroppedbad'] = 'Non se conseguiu eliminar a configuración de BTC.'; + $lang['strconfdropftsconfig'] = 'Está seguro de que quere eliminar a configuración de BTC «%s»?'; + $lang['strconfdropftsdict'] = 'Está seguro de que quere eliminar o dicionario de BTC «%s»?'; + $lang['strconfdropftsmapping'] = 'Está seguro de que quere eliminar a aplicación «%s» da configuración de BTC «%s»?'; + $lang['strftstemplate'] = 'Modelo'; + $lang['strftsparser'] = 'Analizador'; + $lang['strftsconfigneedsname'] = 'Debe fornecer un nome para a configuración de BTC.'; + $lang['strftsconfigcreated'] = 'Creouse a configuración de BTC.'; + $lang['strftsconfigcreatedbad'] = 'non se conseguiu crear a configuración de BTC.'; + $lang['strftsmapping'] = 'Aplicación'; + $lang['strftsdicts'] = 'Dicionarios'; + $lang['strftsdict'] = 'Dicionario'; + $lang['strftsemptymap'] = 'Aplicación da configuración de BTC baleira.'; + $lang['strftsconfigaltered'] = 'Modificouse a configuración de BTC.'; + $lang['strftsconfigalteredbad'] = 'Non se conseguiu modificar a configuración de BTC.'; + $lang['strftsconfigmap'] = 'Aplicación da configuración de BTC'; + $lang['strftsparsers'] = 'Analizadores de BTC'; + $lang['strftsnoparsers'] = 'Non hai ningún analizador de BTC dispoñible.'; + $lang['strftsnodicts'] = 'Non hai ningún dicionario de BTC dispoñible.'; + $lang['strftsdictcreated'] = 'Creouse o dicionario de BTC.'; + $lang['strftsdictcreatedbad'] = 'Non se conseguiu crear o dicionario de BTC.'; + $lang['strftslexize'] = 'Análise léxica'; + $lang['strftsinit'] = 'Comezo'; + $lang['strftsoptionsvalues'] = 'Opcións e valores'; + $lang['strftsdictneedsname'] = 'Debe fornecer un nome para o dicionario de BTC.'; + $lang['strftsdictdropped'] = 'Eliminouse o dicionario de BTC.'; + $lang['strftsdictdroppedbad'] = 'Non se conseguiu eliminar o dicionario de BTC.'; + $lang['strftsdictaltered'] = 'Modificouse o dicionario de BTC.'; + $lang['strftsdictalteredbad'] = 'Non se conseguiu modifica o dicionario de BTC.'; + $lang['strftsaddmapping'] = 'Engadir unha nova aplicación'; + $lang['strftsspecifymappingtodrop'] = 'Debe especificar polo menos unha aplicación a eliminar.'; + $lang['strftsspecifyconfigtoalter'] = 'Debe especificar polo menos unha configuración de BTC a modificar'; + $lang['strftsmappingdropped'] = 'Eliminouse a aplicación de BTC.'; + $lang['strftsmappingdroppedbad'] = 'Non se conseguiu eliminar a aplicación de BTC.'; + $lang['strftsnodictionaries'] = 'Non se atopou dicionario algún.'; + $lang['strftsmappingaltered'] = 'Modificouse a aplicación de BTC.'; + $lang['strftsmappingalteredbad'] = 'Non se conseguiu modificar a aplicación de BTC.'; + $lang['strftsmappingadded'] = 'Engadiuse a aplicación de BTC.'; + $lang['strftsmappingaddedbad'] = 'Non se conseguiu engadir a aplicación de BTC.'; + $lang['strftstabconfigs'] = 'Configuracións'; + $lang['strftstabdicts'] = 'Dicionarios'; + $lang['strftstabparsers'] = 'Analizadores'; + $lang['strftscantparsercopy'] = 'Non se pode especificar tanto un analizador coma un modelo durante a creación dunha configuración de busca de texto.'; +?> diff --git a/php/pgadmin/lang/german.php b/php/pgadmin/lang/german.php new file mode 100644 index 0000000..0087683 --- /dev/null +++ b/php/pgadmin/lang/german.php @@ -0,0 +1,978 @@ + + * + * $Id: german.php,v 1.30 2008/02/18 23:06:51 ioguix Exp $ + */ + + // Language and character set + $lang['applang'] = 'Deutsch'; + $lang['appcharset'] = 'UTF-8'; + $lang['applocale'] = 'de_DE'; + $lang['appdbencoding'] = 'LATIN1'; + $lang['applangdir'] = 'ltr'; + + // Welcome + $lang['strintro'] = 'Willkommen bei phpPgAdmin.'; + $lang['strppahome'] = 'phpPgAdmin Homepage'; + $lang['strpgsqlhome'] = 'PostgreSQL Homepage'; + $lang['strpgsqlhome_url'] = 'http://www.postgresql.org/'; + $lang['strlocaldocs'] = 'PostgreSQL Dokumentation (lokal)'; + $lang['strreportbug'] = 'Fehler melden'; + $lang['strviewfaq'] = 'Online-FAQ ansehen'; + $lang['strviewfaq_url'] = 'http://phppgadmin.sourceforge.net/?page=faq'; + + // Basic strings + $lang['strlogin'] = 'Anmelden'; + $lang['strloginfailed'] = 'Anmeldung fehlgeschlagen'; + $lang['strlogindisallowed'] = 'Anmeldung aus Sicherheitsgründen verweigert.'; + $lang['strserver'] = 'Server'; + $lang['strservers'] = 'Server'; + $lang['strintroduction'] = 'Einführung'; + $lang['strhost'] = 'Host'; + $lang['strport'] = 'Port'; + $lang['strlogout'] = 'Abmelden'; + $lang['strowner'] = 'Besitzer'; + $lang['straction'] = 'Aktion'; + $lang['stractions'] = 'Aktionen'; + $lang['strname'] = 'Name'; + $lang['strdefinition'] = 'Definition'; + $lang['strproperties'] = 'Eigenschaften'; + $lang['strbrowse'] = 'Durchsuchen'; + $lang['strenable'] = 'Einschalten'; + $lang['strdisable'] = 'Ausschalten'; + $lang['strdrop'] = 'Löschen'; + $lang['strdropped'] = 'Gelöscht'; + $lang['strnull'] = 'Null'; + $lang['strnotnull'] = 'Nicht Null'; + $lang['strprev'] = '< Zurück'; + $lang['strnext'] = 'Weiter >'; + $lang['strfirst'] = '<< Anfang'; + $lang['strlast'] = 'Ende >>'; + $lang['strfailed'] = 'Fehlgeschlagen'; + $lang['strcreate'] = 'Erstellen'; + $lang['strcreated'] = 'Erstellt'; + $lang['strcomment'] = 'Kommentar'; + $lang['strlength'] = 'Länge'; + $lang['strdefault'] = 'Standardwert'; + $lang['stralter'] = 'Ändern'; + $lang['strok'] = 'OK'; + $lang['strcancel'] = 'Abbrechen'; + $lang['strac'] = 'Automatische Vervollständigung einschalten'; + $lang['strsave'] = 'Speichern'; + $lang['strreset'] = 'Zurücksetzen'; + $lang['strinsert'] = 'Einfügen'; + $lang['strselect'] = 'Abfrage'; + $lang['strdelete'] = 'Löschen'; + $lang['strupdate'] = 'Ändern'; + $lang['strreferences'] = 'Verweise'; + $lang['stryes'] = 'Ja'; + $lang['strno'] = 'Nein'; + $lang['strtrue'] = 'WAHR'; + $lang['strfalse'] = 'FALSCH'; + $lang['stredit'] = 'Bearbeiten'; + $lang['strcolumn'] = 'Spalte'; + $lang['strcolumns'] = 'Spalten'; + $lang['strrows'] = 'Datensätze'; + $lang['strrowsaff'] = 'Datensätze betroffen.'; + $lang['strobjects'] = 'Objekt(e)'; + $lang['strback'] = 'Zurück'; + $lang['strqueryresults'] = 'Abfrageergebnis'; + $lang['strshow'] = 'Anzeigen'; + $lang['strempty'] = 'Leeren'; + $lang['strlanguage'] = 'Sprache'; + $lang['strencoding'] = 'Zeichenkodierung'; + $lang['strvalue'] = 'Wert'; + $lang['strunique'] = 'Eindeutig'; + $lang['strprimary'] = 'Primär'; + $lang['strexport'] = 'Exportieren'; + $lang['strimport'] = 'Importieren'; + $lang['strallowednulls'] = 'NULL-Zeichen erlaubt'; + $lang['strbackslashn'] = '\N'; + $lang['stremptystring'] = 'Leere Zeichenkette / Leere Spalte'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = 'Admin'; + $lang['strvacuum'] = 'Bereinigen'; + $lang['stranalyze'] = 'Analysieren'; + $lang['strclusterindex'] = 'Cluster'; + $lang['strclustered'] = 'Geclustert?'; + $lang['strreindex'] = 'Reindexieren'; + $lang['strexecute'] = 'Ausführen'; + $lang['stradd'] = 'Hinzufügen'; + $lang['strevent'] = 'Ereignis'; + $lang['strwhere'] = 'Bedingung'; + $lang['strinstead'] = 'Tu stattdessen'; + $lang['strwhen'] = 'Wann'; + $lang['strformat'] = 'Format'; + $lang['strdata'] = 'Daten'; + $lang['strconfirm'] = 'Bestätigen'; + $lang['strexpression'] = 'Ausdruck'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'Aufklappen'; + $lang['strcollapse'] = 'Zuklappen'; + $lang['strfind'] = 'Suchen'; + $lang['stroptions'] = 'Optionen'; + $lang['strrefresh'] = 'Aktualisieren'; + $lang['strdownload'] = 'Herunterladen'; + $lang['strdownloadgzipped'] = 'gzip-komprimiert herunterladen'; + $lang['strinfo'] = 'Info'; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = 'Erweitert'; + $lang['strvariables'] = 'Variable'; + $lang['strprocess'] = 'Prozess'; + $lang['strprocesses'] = 'Prozesse'; + $lang['strsetting'] = 'Einstellung'; + $lang['streditsql'] = 'SQL bearbeiten'; + $lang['strruntime'] = 'Laufzeit gesamt: %s ms'; + $lang['strpaginate'] = 'Ergebnisse seitenweise anzeigen'; + $lang['struploadscript'] = 'oder laden Sie ein SQL-Script hoch:'; + $lang['strstarttime'] = 'Beginnzeitpunkt'; + $lang['strfile'] = 'Datei'; + $lang['strfileimported'] = 'Datei importiert.'; + $lang['strtrycred'] = 'Diese Anmeldedaten für alle Server verwenden'; + $lang['strconfdropcred'] = 'Aus Sicherheitsgründen werden gemeinsamme Anmeldedaten beim Abmelden gelöscht. Sind Sie sicher, dass sie sich abmelden wollen?'; + $lang['stractionsonmultiplelines'] = 'Mehrzeilige Aktionen'; + $lang['strselectall'] = 'Alle auswählen'; + $lang['strunselectall'] = 'Alle abwählen'; + $lang['strlocale'] = 'Spracheinstellung'; + + // User-supplied SQL history + $lang['strhistory'] = 'Befehlsspeicher'; + $lang['strnohistory'] = 'Kein Befehlsspeicher.'; + $lang['strclearhistory'] = 'Befehlsspeicher löschen'; + $lang['strdelhistory'] = 'Aus dem Befehlsspeicher löschen'; + $lang['strconfdelhistory'] = 'Diese Abfrage wirklich aus dem Befehlsspeicher löschen?'; + $lang['strconfclearhistory'] = 'Befehlsspeicher wirklich löschen?'; + $lang['strnodatabaseselected'] = 'Bitte wählen Sie eine Datenbank aus.'; + + // Database sizes + $lang['strsize'] = 'Größe'; + $lang['strbytes'] = 'Bytes'; + $lang['strkb'] = 'kB'; + $lang['strmb'] = 'MB'; + $lang['strgb'] = 'GB'; + $lang['strtb'] = 'TB'; + + // Error handling + $lang['strnoframes'] = 'Diese Anwendung funktioniert am besten mit einem Browser, der Frames beherrscht, kann aber mit dem untenstehenden Link auch ohne Frames verwendet werden.'; + $lang['strnoframeslink'] = 'Ohne Frames arbeiten'; + $lang['strbadconfig'] = 'Ihre config.inc.php ist nicht aktuell. Sie müssen sie aus der config.inc.php-dist neu erzeugen.'; + $lang['strnotloaded'] = 'Ihre PHP-Installation unterstützt PostgreSQL nicht. Sie müssen PHP unter Verwendung der Konfigurationsoption --with-pgsql neu kompilieren.'; + $lang['strpostgresqlversionnotsupported'] = 'Ihre PostgreSQL-Version wird nicht unterstützt. Bitte stellen Sie Ihre Datenbank auf Version %s oder eine neuere Version um.'; + $lang['strbadschema'] = 'Ungültiges Schema angegeben.'; + $lang['strbadencoding'] = 'Kann die Client-Zeichenkodierung nicht in der Datenbank setzen.'; + $lang['strsqlerror'] = 'SQL-Fehler:'; + $lang['strinstatement'] = 'In der Anweisung:'; + $lang['strinvalidparam'] = 'Unzulässige Script-Parameter.'; + $lang['strnodata'] = 'Keine Datensätze gefunden.'; + $lang['strnoobjects'] = 'Keine Objekte gefunden.'; + $lang['strrownotunique'] = 'Dieser Datensatz hat keine eindeutige Spalte.'; + $lang['strnoreportsdb'] = 'Sie haben die Berichtsdatenbank nicht angelegt. In der Datei INSTALL finden Sie Anweisungen dafür.'; + $lang['strnouploads'] = 'Das Hochladen von Dateien ist ausgeschaltet.'; + $lang['strimporterror'] = 'Importfehler.'; + $lang['strimporterror-fileformat'] = 'Importfehler: Dateiformat konnte nicht automatisch bestimmt werden.'; + $lang['strimporterrorline'] = 'Importfehler in Zeile %s.'; + $lang['strimporterrorline-badcolumnnum'] = 'Importfehler in Zeile %s: die Zeile hat nicht die richtige Anzahl von Spalten.'; + $lang['strimporterror-uploadedfile'] = 'Importfehler: die Datei konnte nicht auf den Server geladen werden'; + $lang['strcannotdumponwindows'] = 'Das Ablegen von komplizierten Tabellen- und Schemanamen wird auf Windows nicht unterstützt.'; + $lang['strinvalidserverparam'] = 'Es wurde versucht, mit einem ungültigen Server-Parameter eine Verbindung herzustellen. Möglicherweise versucht jemand, in Ihr System einzubrechen.'; + $lang['strnoserversupplied'] = 'Kein Server angegeben!'; + + // Tables + $lang['strtable'] = 'Tabelle'; + $lang['strtables'] = 'Tabellen'; + $lang['strshowalltables'] = 'Alle Tabellen anzeigen'; + $lang['strnotables'] = 'Keine Tabellen gefunden.'; + $lang['strnotable'] = 'Keine Tabelle gefunden.'; + $lang['strcreatetable'] = 'Neue Tabelle erstellen'; + $lang['strcreatetablelike'] = 'Neue Tabelle als Kopie einer bestehenden anlegen'; + $lang['strcreatetablelikeparent'] = 'Ursprüngliche Tabelle'; + $lang['strcreatelikewithdefaults'] = 'DEFAULT-Werte mitkopieren'; + $lang['strcreatelikewithconstraints'] = 'Constraints mitkopieren'; + $lang['strcreatelikewithindexes'] = 'Indizes mitkopieren'; + $lang['strtablename'] = 'Tabellenname'; + $lang['strtableneedsname'] = 'Sie müssen für die Tabelle einen Namen angeben.'; + $lang['strtablelikeneedslike'] = 'Sie müssen eine Tabelle angeben, deren Spaltendefinitionen kopiert werden sollen.'; + $lang['strtableneedsfield'] = 'Sie müssen mindestens eine Spalte angeben.'; + $lang['strtableneedscols'] = 'Sie müssen eine zulässige Anzahl von Spalten angeben.'; + $lang['strtablecreated'] = 'Tabelle erstellt.'; + $lang['strtablecreatedbad'] = 'Erstellen der Tabelle fehlgeschlagen.'; + $lang['strconfdroptable'] = 'Sind Sie sicher, dass Sie die Tabelle "%s" löschen möchten?'; + $lang['strtabledropped'] = 'Tabelle gelöscht.'; + $lang['strtabledroppedbad'] = 'Löschen der Tabelle fehlgeschlagen.'; + $lang['strconfemptytable'] = 'Sind Sie sicher, dass Sie den Inhalt der Tabelle "%s" löschen möchten?'; + $lang['strtableemptied'] = 'Tabelleninhalt gelöscht.'; + $lang['strtableemptiedbad'] = 'Löschen des Tabelleninhaltes fehlgeschlagen.'; + $lang['strinsertrow'] = 'Datensatz einfügen'; + $lang['strrowinserted'] = 'Datensatz eingefügt.'; + $lang['strrowinsertedbad'] = 'Einfügen des Datensatzes fehlgeschlagen.'; + $lang['strrowduplicate'] = 'Einfügen des Datensatzes fehlgeschlagen: es wurde versucht, ein Duplikat einzufügen.'; + $lang['streditrow'] = 'Datensatz bearbeiten'; + $lang['strrowupdated'] = 'Datensatz geändert.'; + $lang['strrowupdatedbad'] = 'Ändern des Datensatzes fehlgeschlagen.'; + $lang['strdeleterow'] = 'Datensatz löschen'; + $lang['strconfdeleterow'] = 'Sind Sie sicher, dass Sie diesen Datensatz löschen möchten?'; + $lang['strrowdeleted'] = 'Datensatz gelöscht.'; + $lang['strrowdeletedbad'] = 'Löschen des Datensatzes fehlgeschlagen.'; + $lang['strinsertandrepeat'] = 'Einfügen und Wiederholen'; + $lang['strnumcols'] = 'Anzahl der Spalten'; + $lang['strcolneedsname'] = 'Sie müssen einen Namen für die Spalte angeben'; + $lang['strselectallfields'] = 'Alle Felder auswählen'; + $lang['strselectneedscol'] = 'Sie müssen mindestens eine Spalte anzeigen lassen.'; + $lang['strselectunary'] = 'Unäre Operatoren können keine Werte haben.'; + $lang['strcolumnaltered'] = 'Spalte geändert.'; + $lang['strcolumnalteredbad'] = 'Ändern der Spalte fehlgeschlagen.'; + $lang['strconfdropcolumn'] = 'Sind Sie sicher, dass Sie die Spalte "%s" aus der Tabelle "%s" löschen möchten?'; + $lang['strcolumndropped'] = 'Spalte gelöscht.'; + $lang['strcolumndroppedbad'] = 'Löschen der Spalte fehlgschlagen.'; + $lang['straddcolumn'] = 'Spalte hinzufügen'; + $lang['strcolumnadded'] = 'Spalte hinzugefügt.'; + $lang['strcolumnaddedbad'] = 'Hinzufügen der Spalte fehlgeschlagen.'; + $lang['strcascade'] = 'CASCADE'; + $lang['strtablealtered'] = 'Tabelle geändert.'; + $lang['strtablealteredbad'] = 'Ändern der Tabelle fehlgeschlagen.'; + $lang['strdataonly'] = 'Nur die Daten'; + $lang['strstructureonly'] = 'Nur die Struktur'; + $lang['strstructureanddata'] = 'Struktur und Daten'; + $lang['strtabbed'] = 'Mit Tabluatoren'; + $lang['strauto'] = 'Automatisch'; + $lang['strconfvacuumtable'] = 'Sind sie sicher, dass Sie VACUUM auf "%s" ausführen wollen?'; + $lang['strconfanalyzetable'] = 'Sind sie sicher, dass Sie ANALYZE auf "%s" ausführen wollen?'; + $lang['strestimatedrowcount'] = 'Geschätzte Anzahl von Datensätzen'; + $lang['strspecifytabletoanalyze'] = 'Sie müssen mindestens eine Tabelle angeben, die analysiert werden soll.'; + $lang['strspecifytabletoempty'] = 'Sie müssen mindestens eine Tabelle angeben, deren Inhalt gelöscht werden soll.'; + $lang['strspecifytabletodrop'] = 'Sie müssen mindestens eine Tabelle angeben, die gelöscht werden soll.'; + $lang['strspecifytabletovacuum'] = 'Sie müssen mindestens eine Tabelle angeben, die bereinigt werden soll.'; + + // Columns + $lang['strcolprop'] = 'Spalteneigenschaften'; + $lang['strnotableprovided'] = 'Keine Tabelle angegeben!'; + + // Users + $lang['struser'] = 'Benutzer'; + $lang['strusers'] = 'Benutzer'; + $lang['strusername'] = 'Benutzername'; + $lang['strpassword'] = 'Passwort'; + $lang['strsuper'] = 'Superuser?'; + $lang['strcreatedb'] = 'Datenbank erstellen?'; + $lang['strexpires'] = 'Gültig bis'; + $lang['strsessiondefaults'] = 'Standardwerte für Datenbanksitzungen'; + $lang['strnousers'] = 'Keine Benutzer gefunden.'; + $lang['struserupdated'] = 'Benutzer geändert.'; + $lang['struserupdatedbad'] = 'Ändern des Benutzers fehlgeschlagen.'; + $lang['strshowallusers'] = 'Alle Benutzer anzeigen'; + $lang['strcreateuser'] = 'Benutzer anlegen'; + $lang['struserneedsname'] = 'Sie müssen einen Namen für den Benutzer angeben.'; + $lang['strusercreated'] = 'Benutzer angelegt.'; + $lang['strusercreatedbad'] = 'Anlegen des Benutzers fehlgeschlagen.'; + $lang['strconfdropuser'] = 'Sind Sie sicher, dass Sie den Benutzer "%s" löschen möchten?'; + $lang['struserdropped'] = 'Benutzer gelöscht.'; + $lang['struserdroppedbad'] = 'Löschen des Benutzers fehlgeschlagen.'; + $lang['straccount'] = 'Benutzerkonto'; + $lang['strchangepassword'] = 'Passwort ändern'; + $lang['strpasswordchanged'] = 'Passwort geändert.'; + $lang['strpasswordchangedbad'] = 'Ändern des Passwortes fehlgeschlagen.'; + $lang['strpasswordshort'] = 'Passwort ist zu kurz.'; + $lang['strpasswordconfirm'] = 'Passwort und Passwortbestätigung stimmen nicht überein.'; + + // Groups + $lang['strgroup'] = 'Gruppe'; + $lang['strgroups'] = 'Gruppen'; + $lang['strshowallgroups'] = 'Alle Gruppen anzeigen'; + $lang['strnogroup'] = 'Gruppe nicht gefunden.'; + $lang['strnogroups'] = 'Keine Gruppe gefunden.'; + $lang['strcreategroup'] = 'Gruppe anlegen'; + $lang['strgroupneedsname'] = 'Sie müssen für die Gruppe einen Namen angeben.'; + $lang['strgroupcreated'] = 'Gruppe angelegt.'; + $lang['strgroupcreatedbad'] = 'Anlegen der Gruppe fehlgeschlagen.'; + $lang['strconfdropgroup'] = 'Sind Sie sicher, dass Sie die Gruppe "%s" löschen möchten?'; + $lang['strgroupdropped'] = 'Gruppe gelöscht.'; + $lang['strgroupdroppedbad'] = 'Löschen der Gruppe fehlgeschlagen.'; + $lang['strmembers'] = 'Mitglieder'; + $lang['strmemberof'] = 'Mitglied von'; + $lang['stradminmembers'] = 'Administrative Mitglieder'; + $lang['straddmember'] = 'Mitglied hinzufügen'; + $lang['strmemberadded'] = 'Mitglied hinzugefügt.'; + $lang['strmemberaddedbad'] = 'Hinzufügen des Mitglieds fehlgeschlagen.'; + $lang['strdropmember'] = 'Mitglied löschen'; + $lang['strconfdropmember'] = 'Sind Sie sicher, dass Sie das Mitglied "%s" aus der Gruppe "%s" löschen wollen?'; + $lang['strmemberdropped'] = 'Mitglied gelöscht.'; + $lang['strmemberdroppedbad'] = 'Löschen des Mitglieds fehlgeschlagen.'; + + // Roles + $lang['strrole'] = 'Rolle'; + $lang['strroles'] = 'Rollen'; + $lang['strshowallroles'] = 'Alle Rollen anzeigen'; + $lang['strnoroles'] = 'Keine Rollen gefunden.'; + $lang['strinheritsprivs'] = 'Rechte vererben?'; + $lang['strcreaterole'] = 'Rolle anlegen'; + $lang['strcancreaterole'] = 'Darf Rollen anlegen?'; + $lang['strrolecreated'] = 'Rolle angelegt.'; + $lang['strrolecreatedbad'] = 'Anlegen der Rolle fehlgeschlagen.'; + $lang['strrolealtered'] = 'Rolle geändert.'; + $lang['strrolealteredbad'] = 'Ändern der Rolle fehlgeschlagen.'; + $lang['strcanlogin'] = 'Darf sich anmelden?'; + $lang['strconnlimit'] = 'Maximalzahl an Datenbankverbindungen'; + $lang['strdroprole'] = 'Rolle löschen'; + $lang['strconfdroprole'] = 'Sind Sie sicher, dass Sie die Rolle "%s" löschen möchten?'; + $lang['strroledropped'] = 'Rolle gelöscht.'; + $lang['strroledroppedbad'] = 'Löschen der Rolle fehlgeschlagen.'; + $lang['strnolimit'] = 'Unbeschränkt'; + $lang['strnever'] = 'Nie'; + $lang['strroleneedsname'] = 'Sie müssen für die Rolle einen Namen angeben.'; + + // Privileges + $lang['strprivilege'] = 'Recht'; + $lang['strprivileges'] = 'Rechte'; + $lang['strnoprivileges'] = 'Für dieses Objekt gelten die Standard-Eigentümerrechte.'; + $lang['strgrant'] = 'Rechte erteilen'; + $lang['strrevoke'] = 'Rechte entziehen'; + $lang['strgranted'] = 'Rechte geändert.'; + $lang['strgrantfailed'] = 'Ändern der Rechte fehlgeschlagen.'; + $lang['strgrantbad'] = 'Sie müssen mindestens einen Benutzer oder eine Gruppe und mindestens ein Recht angeben.'; + $lang['strgrantor'] = 'Recht vergeben von'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'Datenbank'; + $lang['strdatabases'] = 'Datenbanken'; + $lang['strshowalldatabases'] = 'Alle Datenbanken anzeigen'; + $lang['strnodatabases'] = 'Keine Datenbanken gefunden.'; + $lang['strcreatedatabase'] = 'Datenbank erstellen'; + $lang['strdatabasename'] = 'Datenbankname'; + $lang['strdatabaseneedsname'] = 'Sie müssen für die Datenbank einen Namen angeben.'; + $lang['strdatabasecreated'] = 'Datenbank erstellt.'; + $lang['strdatabasecreatedbad'] = 'Erstellen der Datenbank fehlgeschlagen.'; + $lang['strconfdropdatabase'] = 'Sind Sie sicher, dass Sie die Datenbank "%s" löschen möchten?'; + $lang['strdatabasedropped'] = 'Datenbank gelöscht.'; + $lang['strdatabasedroppedbad'] = 'Löschen der Datenbank fehlgeschlagen.'; + $lang['strentersql'] = 'Auszuführende SQL-Anweisungen hier eingeben:'; + $lang['strsqlexecuted'] = 'SQL-Anweisungen ausgeführt.'; + $lang['strvacuumgood'] = 'Tabellenbereinigung abgeschlossen.'; + $lang['strvacuumbad'] = 'Tabellenbereinigung fehlgeschlagen.'; + $lang['stranalyzegood'] = 'Analyse abgeschlossen.'; + $lang['stranalyzebad'] = 'Analyse fehlgeschlagen.'; + $lang['strreindexgood'] = 'Neuindexierung abgeschlossen.'; + $lang['strreindexbad'] = 'Neuindexierung fehlgeschlagen.'; + $lang['strfull'] = 'Mit Reorganisation'; + $lang['strfreeze'] = 'Aggressives "Einfrieren"'; + $lang['strforce'] = 'Erzwingen'; + $lang['strsignalsent'] = 'Signal gesendet.'; + $lang['strsignalsentbad'] = 'Senden des Signales fehlgeschlagen.'; + $lang['strallobjects'] = 'Alle Objekte'; + $lang['strdatabasealtered'] = 'Datenbank geändert.'; + $lang['strdatabasealteredbad'] = 'Ändern der Datenbank fehlgeschlagen.'; + $lang['strspecifydatabasetodrop'] = 'Sie müssen mindestens eine Datenbank angeben, die gelöscht werden soll.'; + + // Views + $lang['strview'] = 'Sicht'; + $lang['strviews'] = 'Sichten'; + $lang['strshowallviews'] = 'Alle Sichten anzeigen'; + $lang['strnoview'] = 'Keine Sicht gefunden.'; + $lang['strnoviews'] = 'Keine Sichten gefunden.'; + $lang['strcreateview'] = 'Sicht erstellen'; + $lang['strviewname'] = 'Name der Sicht'; + $lang['strviewneedsname'] = 'Sie müssen für die Sicht einen Namen angeben.'; + $lang['strviewneedsdef'] = 'Sie müssen für die Sicht eine Definition angeben.'; + $lang['strviewneedsfields'] = 'Sie müssen die Spalten angeben, die sie in der Sicht haben wollen.'; + $lang['strviewcreated'] = 'Sicht erstellt.'; + $lang['strviewcreatedbad'] = 'Erstellen der Sicht fehlgeschlagen.'; + $lang['strconfdropview'] = 'Sind Sie sicher, dass Sie die Sicht "%s" löschen möchten?'; + $lang['strviewdropped'] = 'Sicht gelöscht.'; + $lang['strviewdroppedbad'] = 'Löschen der Sicht fehlgeschlagen.'; + $lang['strviewupdated'] = 'Sicht geändert.'; + $lang['strviewupdatedbad'] = 'Ändern der Sicht fehlgeschlagen.'; + $lang['strviewlink'] = 'Verbindende Schlüssel'; + $lang['strviewconditions'] = 'Zusätzliche Bedingungen'; + $lang['strcreateviewwiz'] = 'Sicht mit dem Assistenten erstellen'; + $lang['strrenamedupfields'] = 'Doppelte Spalten umbenennen'; + $lang['strdropdupfields'] = 'Doppelte Spalten entfernen'; + $lang['strerrordupfields'] = 'Fehler bei den doppelten Spalten'; + $lang['strviewaltered'] = 'Sicht geändert.'; + $lang['strviewalteredbad'] = 'Ändern der Sicht fehlgeschlagen.'; + $lang['strspecifyviewtodrop'] = 'Sie müssen mindestens eine Sicht angeben, die gelöscht werden soll.'; + + // Sequences + $lang['strsequence'] = 'Sequenz'; + $lang['strsequences'] = 'Sequenzen'; + $lang['strshowallsequences'] = 'Alle Sequenzen anzeigen'; + $lang['strnosequence'] = 'Keine Sequenz gefunden.'; + $lang['strnosequences'] = 'Keine Sequenzen gefunden.'; + $lang['strcreatesequence'] = 'Sequenz erstellen'; + $lang['strlastvalue'] = 'Letzter Wert'; + $lang['strincrementby'] = 'Erhöhen um'; + $lang['strstartvalue'] = 'Startwert'; + $lang['strmaxvalue'] = 'Maximalwert'; + $lang['strminvalue'] = 'Minimalwert'; + $lang['strcachevalue'] = 'Anzahl Werte im Cache'; + $lang['strlogcount'] = 'WAL-Zähler (log_cnt)'; + $lang['strcancycle'] = 'Zyklisch?'; + $lang['striscalled'] = 'Wird erhöht werden, wenn der nächste Wert angefordert wird (is_called)?'; + $lang['strsequenceneedsname'] = 'Sie müssen für die Sequenz einen Namen angeben.'; + $lang['strsequencecreated'] = 'Sequenz erstellt.'; + $lang['strsequencecreatedbad'] = 'Erstellen der Sequenz fehlgeschlagen.'; + $lang['strconfdropsequence'] = 'Sind Sie sicher, dass die die Sequenz "%s" löschen möchten?'; + $lang['strsequencedropped'] = 'Sequenz gelöscht.'; + $lang['strsequencedroppedbad'] = 'Löschen der Sequenz fehlgeschlagen.'; + $lang['strsequencereset'] = 'Sequenz zurückgesetzt.'; + $lang['strsequenceresetbad'] = 'Rücksetzen der Sequenz fehlgeschlagen.'; + $lang['strsequencealtered'] = 'Sequenz geändert.'; + $lang['strsequencealteredbad'] = 'Ändern der Sequenz fehlgeschlagen.'; + $lang['strsetval'] = 'Wert setzen'; + $lang['strsequencesetval'] = 'Sequenzwert gesetzt.'; + $lang['strsequencesetvalbad'] = 'Setzen des Sequenzwertes fehlgeschlagen.'; + $lang['strnextval'] = 'Wert erhöhen'; + $lang['strsequencenextval'] = 'Sequenzwert erhöht.'; + $lang['strsequencenextvalbad'] = 'Erhöhen des Sequenzwertes fehlgeschlagen.'; + $lang['strspecifysequencetodrop'] = 'Sie müssen mindestens eine Sequenz angeben, die gelöscht werden soll.'; + + // Indexes + $lang['strindex'] = 'Index'; + $lang['strindexes'] = 'Indizes'; + $lang['strindexname'] = 'Indexname'; + $lang['strshowallindexes'] = 'Alle Indizes anzeigen'; + $lang['strnoindex'] = 'Kein Index gefunden.'; + $lang['strnoindexes'] = 'Keine Indizes gefunden.'; + $lang['strcreateindex'] = 'Index erstellen'; + $lang['strtabname'] = 'Tabellenname'; + $lang['strcolumnname'] = 'Spaltenname'; + $lang['strindexneedsname'] = 'Sie müssen für den Index einen Namen angeben.'; + $lang['strindexneedscols'] = 'Sie müssen eine zulässige Anzahl an Spalten angeben.'; + $lang['strindexcreated'] = 'Index erstellt.'; + $lang['strindexcreatedbad'] = 'Erstellen des Index fehlgeschlagen.'; + $lang['strconfdropindex'] = 'Sind Sie sicher, dass sie den Index "%s" löschen möchten?'; + $lang['strindexdropped'] = 'Index gelöscht.'; + $lang['strindexdroppedbad'] = 'Löschen des Index fehlgeschlagen.'; + $lang['strkeyname'] = 'Schlüsselname'; + $lang['struniquekey'] = 'Eindeutiger Schlüssel'; + $lang['strprimarykey'] = 'Primärerschlüssel'; + $lang['strindextype'] = 'Typ des Index'; + $lang['strtablecolumnlist'] = 'Spalten in der Tabelle'; + $lang['strindexcolumnlist'] = 'Spalten im Index'; + $lang['strconfcluster'] = 'Sind Sie sicher, dass Sie "%s" clustern wollen?'; + $lang['strclusteredgood'] = 'Clustern abgeschlossen.'; + $lang['strclusteredbad'] = 'Clustern fehlgeschlagen.'; + + // Rules + $lang['strrules'] = 'Regeln'; + $lang['strrule'] = 'Regel'; + $lang['strshowallrules'] = 'Alle Regeln anzeigen'; + $lang['strnorule'] = 'Keine Regel gefunden.'; + $lang['strnorules'] = 'Keine Regeln gefunden.'; + $lang['strcreaterule'] = 'Regel erstellen'; + $lang['strrulename'] = 'Regelname'; + $lang['strruleneedsname'] = 'Sie müssen für die Regel einen Namen angeben.'; + $lang['strrulecreated'] = 'Regel erstellt.'; + $lang['strrulecreatedbad'] = 'Erstellen der Regel fehlgeschlagen.'; + $lang['strconfdroprule'] = 'Sind Sie sicher, dass Sie die Regel "%s" in der Tabelle "%s" löschen möchten?'; + $lang['strruledropped'] = 'Regel gelöscht.'; + $lang['strruledroppedbad'] = 'Löschen der Regel fehlgeschlagen.'; + + // Constraints + $lang['strconstraint'] = 'Constraint'; + $lang['strconstraints'] = 'Constraints'; + $lang['strshowallconstraints'] = 'Alle Constraints anzeigen'; + $lang['strnoconstraints'] = 'Keine Constraints gefunden.'; + $lang['strcreateconstraint'] = 'Constraint erstellen'; + $lang['strconstraintcreated'] = 'Constraint erstellt.'; + $lang['strconstraintcreatedbad'] = 'Erstellen des Constraints fehlgeschlagen.'; + $lang['strconfdropconstraint'] = 'Sind Sie sicher, dass Sie den Constraint "%s" in der Tabelle "%s" löschen möchten?'; + $lang['strconstraintdropped'] = 'Constraint gelöscht.'; + $lang['strconstraintdroppedbad'] = 'Löschen des Constraints fehlgeschlagen.'; + $lang['straddcheck'] = 'Check-Constraint hinzufügen'; + $lang['strcheckneedsdefinition'] = 'Ein Check-Constraint braucht eine Definition.'; + $lang['strcheckadded'] = 'Check-Constraint hinzugefügt.'; + $lang['strcheckaddedbad'] = 'Hinzufügen des Check-Constraints fehlgeschlagen.'; + $lang['straddpk'] = 'Primärschlüssel hinzufügen'; + $lang['strpkneedscols'] = 'Ein Primärschlüssel benötigt mindestens eine Spalte.'; + $lang['strpkadded'] = 'Primärschlüssel hinzugefügt.'; + $lang['strpkaddedbad'] = 'Hinzufügen des Primärschlüssels fehlgeschlagen.'; + $lang['stradduniq'] = 'Eindeutigen Schlüssel hinzufügen'; + $lang['struniqneedscols'] = 'Ein eindeutiger Schlüssel benötigt mindestens eine Spalte.'; + $lang['struniqadded'] = 'Eindeutiger Schlüssel hinzugefügt.'; + $lang['struniqaddedbad'] = 'Hinzufügen eines eindeutigen Schlüssels fehlgeschlagen.'; + $lang['straddfk'] = 'Fremdschlüssel hinzufügen'; + $lang['strfkneedscols'] = 'Ein Fremdschlüssel benötigt mindestens eine Spalte.'; + $lang['strfkneedstarget'] = 'Ein Fremdschlüssel benötigt eine Zieltabelle.'; + $lang['strfkadded'] = 'Fremdschlüssel hinzugefügt.'; + $lang['strfkaddedbad'] = 'Hinzufügen eines Fremdschlüssels fehlgeschlagen.'; + $lang['strfktarget'] = 'Zieltabelle'; + $lang['strfkcolumnlist'] = 'Spalten im Schlüssel'; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + + // Functions + $lang['strfunction'] = 'Funktion'; + $lang['strfunctions'] = 'Funktionen'; + $lang['strshowallfunctions'] = 'Alle Funktionen anzeigen'; + $lang['strnofunction'] = 'Keine Funktion gefunden.'; + $lang['strnofunctions'] = 'Keine Funktionen gefunden.'; + $lang['strcreateplfunction'] = 'SQL/PL-Funktion erstellen'; + $lang['strcreateinternalfunction'] = 'Interne Funktion erstellen'; + $lang['strcreatecfunction'] = 'C-Funktion erstellen'; + $lang['strfunctionname'] = 'Funktionsname'; + $lang['strreturns'] = 'Rückgabetyp'; + $lang['strproglanguage'] = 'Programmiersprache'; + $lang['strfunctionneedsname'] = 'Sie müssen für die Funktion einen Namen angeben.'; + $lang['strfunctionneedsdef'] = 'Sie müssen für die Funktion eine Definition angeben.'; + $lang['strfunctioncreated'] = 'Funktion erstellt.'; + $lang['strfunctioncreatedbad'] = 'Erstellen der Funktion fehlgeschlagen.'; + $lang['strconfdropfunction'] = 'Sind Sie sicher, dass sie die Funktion "%s" löschen möchten?'; + $lang['strfunctiondropped'] = 'Funktion gelöscht.'; + $lang['strfunctiondroppedbad'] = 'Löschen der Funktion fehlgeschlagen.'; + $lang['strfunctionupdated'] = 'Funktion geändert.'; + $lang['strfunctionupdatedbad'] = 'Ändern der Funktion fehlgeschlagen.'; + $lang['strobjectfile'] = 'Objektdatei'; + $lang['strlinksymbol'] = 'Link-Symbol'; + $lang['strarguments'] = 'Funktionsargumente'; + $lang['strargmode'] = 'Richtung'; + $lang['strargtype'] = 'Datentyp'; + $lang['strargadd'] = 'Weiteres Argument hinzufügen'; + $lang['strargremove'] = 'Dieses Argument entfernen'; + $lang['strargnoargs'] = 'Diese Funktion kann nur ohne Argumente aufgerufen werden.'; + $lang['strargenableargs'] = 'Diese Funktion kann mit Argumenten aufgerufen werden.'; + $lang['strargnorowabove'] = 'Oberhalb dieser Spalte muss eine weitere Spalte sein.'; + $lang['strargnorowbelow'] = 'Unterhalb dieser Spalte muss eine weitere Spalte sein.'; + $lang['strargraise'] = 'Hinaufschieben.'; + $lang['strarglower'] = 'Hinunterschieben.'; + $lang['strargremoveconfirm'] = 'Sind Sie sicher, dass Sie dieses Argument entfernen wollen? Das kann nicht rückgängig gemacht werden.'; + $lang['strfunctioncosting'] = 'Ausführungskosten'; + $lang['strresultrows'] = 'Geschätzte Anzahl der Ergebniszeilen'; + $lang['strexecutioncost'] = 'Geschätzte Ausführungskosten'; + $lang['strspecifyfunctiontodrop'] = 'Sie müssen mindestens eine Funktion angeben, die gelöscht werden soll.'; + + // Triggers + $lang['strtrigger'] = 'Trigger'; + $lang['strtriggers'] = 'Trigger'; + $lang['strshowalltriggers'] = 'Alle Trigger anzeigen'; + $lang['strnotrigger'] = 'Kein Trigger gefunden.'; + $lang['strnotriggers'] = 'Keine Trigger gefunden.'; + $lang['strcreatetrigger'] = 'Trigger erstellen'; + $lang['strtriggerneedsname'] = 'Sie müssen für den Trigger einen Namen angeben.'; + $lang['strtriggerneedsfunc'] = 'Sie müssen für den Trigger eine Funktion angeben.'; + $lang['strtriggercreated'] = 'Trigger erstellt.'; + $lang['strtriggercreatedbad'] = 'Erstellen des Triggers fehlgeschlagen.'; + $lang['strconfdroptrigger'] = 'Sind Sie sicher, dass Sie den Trigger "%s" auf der Tabelle "%s" löschen möchten?'; + $lang['strconfenabletrigger'] = 'Sind Sie sicher, dass Sie den Trigger "%s" auf der Tabelle "%s" aktivieren möchten?'; + $lang['strconfdisabletrigger'] = 'Sind Sie sicher, dass Sie den Trigger "%s" auf der Tabelle "%s" deaktivieren möchten?'; + $lang['strtriggerdropped'] = 'Trigger gelöscht.'; + $lang['strtriggerdroppedbad'] = 'Löschen des Triggers fehlgeschlagen.'; + $lang['strtriggerenabled'] = 'Trigger aktiviert.'; + $lang['strtriggerenabledbad'] = 'Aktivieren des Triggers fehlgeschlagen.'; + $lang['strtriggerdisabled'] = 'Trigger deaktiviert.'; + $lang['strtriggerdisabledbad'] = 'Deaktivieren des Triggers fehlgeschlagen.'; + $lang['strtriggeraltered'] = 'Trigger geändert.'; + $lang['strtriggeralteredbad'] = 'Ändern des Triggers fehlgeschlagen.'; + $lang['strforeach'] = 'Für alle'; + + // Types + $lang['strtype'] = 'Datentyp'; + $lang['strtypes'] = 'Datentypen'; + $lang['strshowalltypes'] = 'Alle Datentypen anzeigen'; + $lang['strnotype'] = 'Kein Datentyp gefunden.'; + $lang['strnotypes'] = 'Keine Datentypen gefunden.'; + $lang['strcreatetype'] = 'Datentyp erstellen'; + $lang['strcreatecomptype'] = 'Zusammengesetzten Typ erstellen'; + $lang['strcreateenumtype'] = 'Aufzählungstyp erstellen'; + $lang['strtypeneedsfield'] = 'Sie müssen mindestens ein Feld angeben.'; + $lang['strtypeneedsvalue'] = 'Sie müssen mindestens einen Wert angeben.'; + $lang['strtypeneedscols'] = 'Sie müssen eine gültige Anzahl von Spalten angeben.'; + $lang['strtypeneedsvals'] = 'Sie müssen eine gültige Anzahl von Werten angeben.'; + $lang['strinputfn'] = 'Eingabefunktion'; + $lang['stroutputfn'] = 'Ausgabefunktion'; + $lang['strpassbyval'] = 'Übergabe "by value"?'; + $lang['stralignment'] = 'Alignment'; + $lang['strelement'] = 'Element'; + $lang['strdelimiter'] = 'Trennzeichen'; + $lang['strstorage'] = 'Speicherung'; + $lang['strfield'] = 'Spalte'; + $lang['strnumfields'] = 'Anzahl Spalten'; + $lang['strnumvalues'] = 'Anzahl Werte'; + $lang['strtypeneedsname'] = 'Sie müssen einen Namen für den Datentyp angeben.'; + $lang['strtypeneedslen'] = 'Sie müssen eine Länge für den Datentyp angeben.'; + $lang['strtypecreated'] = 'Datentyp erstellt.'; + $lang['strtypecreatedbad'] = 'Erstellen des Datentypen fehlgeschlagen.'; + $lang['strconfdroptype'] = 'Sind Sie sicher, dass Sie den Datentyp "%s" löschen möchten?'; + $lang['strtypedropped'] = 'Datentyp gelöscht.'; + $lang['strtypedroppedbad'] = 'Löschen des Datentyps fehlgeschlagen.'; + $lang['strflavor'] = 'Art'; + $lang['strbasetype'] = 'Basis-Typ'; + $lang['strcompositetype'] = 'Zusammengesetzt'; + $lang['strpseudotype'] = 'Pseudo'; + $lang['strenum'] = 'Aufzählend'; + $lang['strenumvalues'] = 'Wert'; + + // Schemas + $lang['strschema'] = 'Schema'; + $lang['strschemas'] = 'Schemata'; + $lang['strshowallschemas'] = 'Alle Schemata anzeigen'; + $lang['strnoschema'] = 'Kein Schema gefunden.'; + $lang['strnoschemas'] = 'Keine Schemata gefunden.'; + $lang['strcreateschema'] = 'Schema erstellen'; + $lang['strschemaname'] = 'Name des Schema'; + $lang['strschemaneedsname'] = 'Sie müssen für das Schema einen Namen angeben.'; + $lang['strschemacreated'] = 'Schema erstellt.'; + $lang['strschemacreatedbad'] = 'Erstellen des Schemas fehlgeschlagen.'; + $lang['strconfdropschema'] = 'Sind Sie sicher, dass sie das Schema "%s" löschen möchten?'; + $lang['strschemadropped'] = 'Schema gelöscht.'; + $lang['strschemadroppedbad'] = 'Löschen des Schemas fehlgeschlagen'; + $lang['strschemaaltered'] = 'Schema geändert.'; + $lang['strschemaalteredbad'] = 'Ändern des Schemas fehlgeschlagen.'; + $lang['strsearchpath'] = 'Schemasuchpfad'; + $lang['strspecifyschematodrop'] = 'Sie müssen mindestens ein Schema angeben, das gelöscht werden soll.'; + + // Reports + $lang['strreport'] = 'Bericht'; + $lang['strreports'] = 'Berichte'; + $lang['strshowallreports'] = 'Alle Berichte anzeigen'; + $lang['strnoreports'] = 'Keine Berichte gefunden.'; + $lang['strcreatereport'] = 'Bericht erstellen.'; + $lang['strreportdropped'] = 'Bericht gelöscht.'; + $lang['strreportdroppedbad'] = 'Löschen des Berichtes fehlgeschlagen.'; + $lang['strconfdropreport'] = 'Sind Sie sicher, dass Sie den Bericht "%s" löschen wollen?'; + $lang['strreportneedsname'] = 'Sie müssen für den Bericht einen Namen angeben.'; + $lang['strreportneedsdef'] = 'Sie müssen eine SQL-Abfrage für den Bericht eingeben.'; + $lang['strreportcreated'] = 'Bericht gespeichert.'; + $lang['strreportcreatedbad'] = 'Speichern des Berichtes fehlgeschlagen.'; + + // Domains + $lang['strdomain'] = 'Domäne'; + $lang['strdomains'] = 'Domänen'; + $lang['strshowalldomains'] = 'Alle Domänen anzeigen'; + $lang['strnodomains'] = 'Keine Domänen gefunden.'; + $lang['strcreatedomain'] = 'Domäne erstellen'; + $lang['strdomaindropped'] = 'Domäne gelöscht.'; + $lang['strdomaindroppedbad'] = 'Löschen der Domäne fehlgeschlagen.'; + $lang['strconfdropdomain'] = 'Sind Sie sicher, dass Sie die Domäne "%s" löschen wollen?'; + $lang['strdomainneedsname'] = 'Sie müssen einen Namen für die Domäne angeben.'; + $lang['strdomaincreated'] = 'Domäne erstellt.'; + $lang['strdomaincreatedbad'] = 'Erstellen der Domäne fehlgeschlagen.'; + $lang['strdomainaltered'] = 'Domäne geändert.'; + $lang['strdomainalteredbad'] = 'Ändern der Domäne fehlgeschlagen.'; + + // Operators + $lang['stroperator'] = 'Operator'; + $lang['stroperators'] = 'Operatoren'; + $lang['strshowalloperators'] = 'Alle Operatoren anzeigen'; + $lang['strnooperator'] = 'Kein Operator gefunden.'; + $lang['strnooperators'] = 'Keine Operatoren gefunden.'; + $lang['strcreateoperator'] = 'Operator erstellen'; + $lang['strleftarg'] = 'Typ des linken Arguments'; + $lang['strrightarg'] = 'Typ des rechter Arguments'; + $lang['strcommutator'] = 'Kommutator'; + $lang['strnegator'] = 'Negator'; + $lang['strrestrict'] = 'Funktion zur Schätzung der Restriktions-Selektivität'; + $lang['strjoin'] = 'Funktion zur Schätzung der Join-Selektivität'; + $lang['strhashes'] = 'Unterstützt Hash-Joins'; + $lang['strmerges'] = 'Unterstützt Merge-Joins'; + $lang['strleftsort'] = 'Kleiner-Operator zum Sortieren der linken Seite'; + $lang['strrightsort'] = 'Kleiner-Operator zum Sortieren der rechten Seite'; + $lang['strlessthan'] = 'Kleiner-Operator'; + $lang['strgreaterthan'] = 'Größer-Operator'; + $lang['stroperatorneedsname'] = 'Sie müssen einen Namen für den Operator angeben.'; + $lang['stroperatorcreated'] = 'Operator erstellt.'; + $lang['stroperatorcreatedbad'] = 'Erstellen des Operators fehlgeschlagen.'; + $lang['strconfdropoperator'] = 'Sind Sie sicher, dass Sie den Operator "%s" löschen wollen?'; + $lang['stroperatordropped'] = 'Operator gelöscht.'; + $lang['stroperatordroppedbad'] = 'Löschen des Operators fehlgeschlagen.'; + + // Casts + $lang['strcasts'] = 'Typumwandlungen'; + $lang['strnocasts'] = 'Keine Typumwandlungen gefunden.'; + $lang['strsourcetype'] = 'Ursprungs-Datentyp'; + $lang['strtargettype'] = 'Ziel-Datentyp'; + $lang['strimplicit'] = 'Implizit'; + $lang['strinassignment'] = 'Bei Zuweisungen'; + $lang['strbinarycompat'] = '(Binärkompatibel)'; + + // Conversions + $lang['strconversions'] = 'Konvertierungen'; + $lang['strnoconversions'] = 'Keine Konvertierungen gefunden.'; + $lang['strsourceencoding'] = 'Ursprungs-Zeichenkodierung'; + $lang['strtargetencoding'] = 'Ziel-Zeichenkodierung'; + + // Languages + $lang['strlanguages'] = 'Programmiersprachen'; + $lang['strnolanguages'] = 'Keine Sprachen gefunden.'; + $lang['strtrusted'] = 'Vertrauenswürdig'; + + // Info + $lang['strnoinfo'] = 'Keine Informationen vorhanden.'; + $lang['strreferringtables'] = 'Tabellen, die mit Fremdschlüsseln auf diese Tabelle verweisen'; + $lang['strparenttables'] = 'Elterntabellen'; + $lang['strchildtables'] = 'Kindtabellen'; + + // Aggregates + $lang['straggregate'] = 'Aggregatsfunktion'; + $lang['straggregates'] = 'Aggregatsfunktionen'; + $lang['strnoaggregates'] = 'Keine Aggregatsfunktionen gefunden.'; + $lang['stralltypes'] = '(Alle Typen)'; + $lang['strcreateaggregate'] = 'Aggregatsfunktion erstellen'; + $lang['straggrbasetype'] = 'Eingabedatentyp'; + $lang['straggrsfunc'] = 'Zustandsübergangsfunktion'; + $lang['straggrstype'] = 'Datentyp für den Zustandswert'; + $lang['straggrffunc'] = 'Ergebnisfunktion'; + $lang['straggrinitcond'] = 'Zustandswert zu Beginn'; + $lang['straggrsortop'] = 'Operator für Sortierung'; + $lang['strconfdropaggregate'] = 'Sind Sie sicher, dass Sie die Aggregatsfunktion "%s" löschen wollen?'; + $lang['straggregatedropped'] = 'Aggregatsfunktion gelöscht.'; + $lang['straggregatedroppedbad'] = 'Löschen der Aggregatsfunktion fehlgeschlagen.'; + $lang['straggraltered'] = 'Aggregatsfunktion geändert.'; + $lang['straggralteredbad'] = 'Ändern der Aggregatsfunktion fehlgeschlagen.'; + $lang['straggrneedsname'] = 'Sie müssen einen Namen für die Aggregatsfunktion angeben.'; + $lang['straggrneedsbasetype'] = 'Sie müssen den Eingabedatentyp für die Aggregatsfunktion angeben.'; + $lang['straggrneedssfunc'] = 'Sie müssen den Namen der Zustandsübergangsfunktion für die Aggregatsfunktion angeben.'; + $lang['straggrneedsstype'] = 'Sie müssen den Datentyp für den Zustandswert der Aggregatsfunktion angeben.'; + $lang['straggrcreated'] = 'Aggregatsfunktion erstellt.'; + $lang['straggrcreatedbad'] = 'Erstellen der Aggregatsfunktion fehlgeschlagen.'; + $lang['straggrshowall'] = 'Alle Aggregatsfunktionen anzeigen'; + + // Operator Classes + $lang['stropclasses'] = 'Operatorklassen'; + $lang['strnoopclasses'] = 'Keine Operatorklassen gefunden.'; + $lang['straccessmethod'] = 'Zugriffsmethode'; + + // Stats and performance + $lang['strrowperf'] = 'Zeilen-Performance'; + $lang['strioperf'] = 'E/A Performance'; + $lang['stridxrowperf'] = 'Index-Zeilen-Performance'; + $lang['stridxioperf'] = 'Index-E/A-Performance'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Sequentiell'; + $lang['strscan'] = 'Durchsuchen'; + $lang['strread'] = 'Lesen'; + $lang['strfetch'] = 'Holen'; + $lang['strheap'] = 'Heap'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST-Index'; + $lang['strcache'] = 'Zwischenspeicher'; + $lang['strdisk'] = 'Festplatte'; + $lang['strrows2'] = 'Zeilen'; + + // Tablespaces + $lang['strtablespace'] = 'Tablespace'; + $lang['strtablespaces'] = 'Tablespaces'; + $lang['strshowalltablespaces'] = 'Alle Tablespaces anzeigen'; + $lang['strnotablespaces'] = 'Keine Tablespaces gefunden.'; + $lang['strcreatetablespace'] = 'Tablespace erstellen'; + $lang['strlocation'] = 'Pfad'; + $lang['strtablespaceneedsname'] = 'Sie müssen einen Namen für den Tablespace angeben.'; + $lang['strtablespaceneedsloc'] = 'Sie müssen ein Verzeichnis angeben, in dem Sie den Tablespace erstellen möchten.'; + $lang['strtablespacecreated'] = 'Tablespace erstellt.'; + $lang['strtablespacecreatedbad'] = 'Erstellen des Tablespace fehlgeschlagen.'; + $lang['strconfdroptablespace'] = 'Sind Sie sicher, dass Sie den Tablespace "%s" löschen wollen?'; + $lang['strtablespacedropped'] = 'Tablespace gelöscht.'; + $lang['strtablespacedroppedbad'] = 'Löschen des Tablespace fehlgeschlagen.'; + $lang['strtablespacealtered'] = 'Tablespace geändert.'; + $lang['strtablespacealteredbad'] = 'Ändern des Tablespace fehlgeschlagen.'; + + // Slony clusters + $lang['strcluster'] = 'Cluster'; + $lang['strnoclusters'] = 'Keine Cluster gefunden.'; + $lang['strconfdropcluster'] = 'Sind Sie sicher, dass Sie den Cluster "%s" löschen möchten?'; + $lang['strclusterdropped'] = 'Cluster gelöscht.'; + $lang['strclusterdroppedbad'] = 'Löschen des Clusters fehlgeschlagen.'; + $lang['strinitcluster'] = 'Cluster initialisieren'; + $lang['strclustercreated'] = 'Cluster initialisiert.'; + $lang['strclustercreatedbad'] = 'Initialisierung des Clusters fehlgeschlagen.'; + $lang['strclusterneedsname'] = 'Sie müssen einen Namen für den Cluster angeben.'; + $lang['strclusterneedsnodeid'] = 'Sie müssen eine ID für den lokalen Cluster-Knoten angeben.'; + + // Slony nodes + $lang['strnodes'] = 'Cluster-Knoten'; + $lang['strnonodes'] = 'Keine Cluster-Knoten gefunden.'; + $lang['strcreatenode'] = 'Cluster-Knoten erstellen'; + $lang['strid'] = 'ID'; + $lang['stractive'] = 'Aktiv'; + $lang['strnodecreated'] = 'Cluster-Knoten erstellt.'; + $lang['strnodecreatedbad'] = 'Erstellen des Cluster-Knotens fehlgeschlagen.'; + $lang['strconfdropnode'] = 'Sind Sie sicher, dass Sie Cluster-Knoten "%s" löschen möchten?'; + $lang['strnodedropped'] = 'Cluster-Knoten gelöscht.'; + $lang['strnodedroppedbad'] = 'Löschen des Cluster-Knotens fehlgeschlagen.'; + $lang['strfailover'] = 'Übernahme'; + $lang['strnodefailedover'] = 'Cluster-Knoten übernommen.'; + $lang['strnodefailedoverbad'] = 'Übernahme des Cluster-Knotens fehlgeschlagen.'; + $lang['strstatus'] = 'Status'; + $lang['strhealthy'] = 'Gesund'; + $lang['stroutofsync'] = 'Nicht Synchronisiert'; + $lang['strunknown'] = 'Unbekannt'; + + // Slony paths + $lang['strpaths'] = 'Kommunikationspfade'; + $lang['strnopaths'] = 'Keine Kommunikationspfade gefunden.'; + $lang['strcreatepath'] = 'Kommunikationspfad erstellen'; + $lang['strnodename'] = 'Name des Cluster-Knotens'; + $lang['strnodeid'] = 'ID des Cluster-Knotens'; + $lang['strconninfo'] = 'Connection-String'; + $lang['strconnretry'] = 'Wartezeit vor erneutem Verbindungsversuch in Sekunden'; + $lang['strpathneedsconninfo'] = 'Sie müssen einen Connection-String für den Kommunikationspfad angeben.'; + $lang['strpathneedsconnretry'] = 'Sie müssen die Wartezeit vor einem erneuten Verbindungsversuch angeben.'; + $lang['strpathcreated'] = 'Kommunikationspfad erstellt.'; + $lang['strpathcreatedbad'] = 'Erstellen des Kommunikationspfades fehlgeschlagen.'; + $lang['strconfdroppath'] = 'Sind Sie sicher, dass Sie den Kommunikationspfad "%s" löschen möchten?'; + $lang['strpathdropped'] = 'Kommunikationspfad gelöscht.'; + $lang['strpathdroppedbad'] = 'Löschen des Kommunikationspfades fehlgeschlagen.'; + + // Slony listens + $lang['strlistens'] = 'Zuhörer'; + $lang['strnolistens'] = 'Keine Zuhörer gefunden.'; + $lang['strcreatelisten'] = 'Zuhörer erstellen'; + $lang['strlistencreated'] = 'Zuhörer erstellt.'; + $lang['strlistencreatedbad'] = 'Erstellen des Zuhörers fehlgeschlagen.'; + $lang['strconfdroplisten'] = 'Sind Sie sicher, dass Sie Zuhörer "%s" löschen möchten?'; + $lang['strlistendropped'] = 'Zuhörer gelöscht.'; + $lang['strlistendroppedbad'] = 'Löschen des Zuhörers fehlgeschlagen.'; + + // Slony replication sets + $lang['strrepsets'] = 'Replikationsgruppe'; + $lang['strnorepsets'] = 'Keine Replikationsgruppen gefunden.'; + $lang['strcreaterepset'] = 'Replikationsgruppe erstellen'; + $lang['strrepsetcreated'] = 'Replikationsgruppe erstellt.'; + $lang['strrepsetcreatedbad'] = 'Erstellen der Replikationsgruppe fehlgeschlagen.'; + $lang['strconfdroprepset'] = 'Sind Sie sicher, dass Sie Replikationsgruppe "%s" löschen möchten?'; + $lang['strrepsetdropped'] = 'Replikationsgruppe gelöscht.'; + $lang['strrepsetdroppedbad'] = 'Löschen der Replikationsgruppe fehlgeschlagen.'; + $lang['strmerge'] = 'Vereinigen'; + $lang['strmergeinto'] = 'Vereinigen mit'; + $lang['strrepsetmerged'] = 'Replikationsgruppen vereinige.'; + $lang['strrepsetmergedbad'] = 'Vereinigung der Replikationsgruppen fehlgeschlagen.'; + $lang['strmove'] = 'Verschieben'; + $lang['strneworigin'] = 'Neuer Usrprung'; + $lang['strrepsetmoved'] = 'Replikationsgruppe verschoben.'; + $lang['strrepsetmovedbad'] = 'Verschieben der Replikationsgruppe fehlgeschlagen.'; + $lang['strnewrepset'] = 'Neue Replikationsgruppe'; + $lang['strlock'] = 'Sperren'; + $lang['strlocked'] = 'Gesperrt'; + $lang['strunlock'] = 'Entsperren'; + $lang['strconflockrepset'] = 'Sind Sie sicher, dass Sie Replikationsgruppe "%s" sperren möchten?'; + $lang['strrepsetlocked'] = 'Replikationsgruppe gesperrt.'; + $lang['strrepsetlockedbad'] = 'Sperren der Replikationsgruppe fehlgeschlagen.'; + $lang['strconfunlockrepset'] = 'Sind Sie sicher, dass Sie Replikationsgruppe "%s" entsperren möchten?'; + $lang['strrepsetunlocked'] = 'Replikationsgruppe entsperrt.'; + $lang['strrepsetunlockedbad'] = 'Entsperren der Replikationsgruppe fehlgeschlagen.'; + $lang['stronlyonnode'] = 'Nur auf dem Cluster-Knoten'; + $lang['strddlscript'] = 'DDL-Script'; + $lang['strscriptneedsbody'] = 'Sie müssen ein Script angeben, das auf allen Cluster-Knoten ausgeführt werden soll.'; + $lang['strscriptexecuted'] = 'DDL-Script für die Replikationsgruppe ausgeführt.'; + $lang['strscriptexecutedbad'] = 'Ausführung des DDL-Scripts für die Replikationsgruppe fehlgeschlagen.'; + $lang['strtabletriggerstoretain'] = 'Die folgenden Trigger werden von Slony NICHT deaktiviert:'; + + // Slony tables in replication sets + $lang['straddtable'] = 'Tabelle hinzufügen'; + $lang['strtableneedsuniquekey'] = 'Damit eine Tabelle hinzugefügt werden kann, muss sie einen Primärschlüssel oder einen eindeutigen Schlüssel besitzen.'; + $lang['strtableaddedtorepset'] = 'Tabelle zu Replikationsgruppe hinzugefügt.'; + $lang['strtableaddedtorepsetbad'] = 'Hinzufügen der Tabelle zur Replikationsgruppe fehlgeschlagen.'; + $lang['strconfremovetablefromrepset'] = 'Sind Sie sicher, dass Sie die Tabelle "%s" aus der Replikationsgruppe "%s" entfernen möchten?'; + $lang['strtableremovedfromrepset'] = 'Tabelle aus Replikationsgruppe entfernt.'; + $lang['strtableremovedfromrepsetbad'] = 'Entfernen der Tabelle aus der Replikationsgruppe fehlgeschlagen.'; + + // Slony sequences in replication sets + $lang['straddsequence'] = 'Sequenz hinzufügen'; + $lang['strsequenceaddedtorepset'] = 'Sequenz zu Replikationsgruppe hinzugefügt.'; + $lang['strsequenceaddedtorepsetbad'] = 'Hinzufügen der Sequenz zur Replikationsgruppe fehlgeschlagen.'; + $lang['strconfremovesequencefromrepset'] = 'Sind Sie sicher, dass Sie die Sequenz "%s" aus der Replikationsgruppe "%s" entfernen möchten?'; + $lang['strsequenceremovedfromrepset'] = 'Sequenz aus Replikationsgruppe entfernt.'; + $lang['strsequenceremovedfromrepsetbad'] = 'Entfernen der Sequenz aus der Replikationsgruppe fehlgeschlagen.'; + + // Slony subscriptions + $lang['strsubscriptions'] = 'Abonnements'; + $lang['strnosubscriptions'] = 'Keine Abonnements gefunden.'; + + // Miscellaneous + $lang['strtopbar'] = '%s läuft auf %s:%s -- Sie sind als "%s" angemeldet'; + $lang['strtimefmt'] = 'D, j. n. Y, G:i'; + $lang['strhelp'] = 'Hilfe'; + $lang['strhelpicon'] = '?'; + $lang['strhelppagebrowser'] = 'Browser für Hilfeseiten'; + $lang['strselecthelppage'] = 'Hilfeseite auswählen'; + $lang['strinvalidhelppage'] = 'Ungültige Hilfeseite.'; + $lang['strlogintitle'] = 'Bei %s anmelden'; + $lang['strlogoutmsg'] = 'Von %s abgemeldet'; + $lang['strloading'] = 'Lade...'; + $lang['strerrorloading'] = 'Fehler beim Laden'; + $lang['strclicktoreload'] = 'Klicken Sie zum Neuladen'; + + // Autovacuum + $lang['strautovacuum'] = 'Autovacuum'; + $lang['strturnedon'] = 'Eingeschaltet'; + $lang['strturnedoff'] = 'Ausgeschaltet'; + $lang['strenabled'] = 'Aktiviert'; + $lang['strvacuumbasethreshold'] = 'Autovacuum-Schwellwert'; + $lang['strvacuumscalefactor'] = 'Autovacuum-Skalierungsfaktor'; + $lang['stranalybasethreshold'] = 'Analyze-Schwellwert'; + $lang['stranalyzescalefactor'] = 'Analyze-Skalierungsfaktor'; + $lang['strvacuumcostdelay'] = 'Pause nach Erreichen des Autovacuum-Kostenlimits'; + $lang['strvacuumcostlimit'] = 'Autovacuum-Kostenlimits'; + + // Table-level Locks + $lang['strlocks'] = 'Sperren'; + $lang['strtransaction'] = 'Transaktions-ID'; + $lang['strvirtualtransaction'] = 'Virtuelle Transaktions-ID'; + $lang['strprocessid'] = 'Prozess-ID'; + $lang['strmode'] = 'Art der Sperre'; + $lang['strislockheld'] = 'Sperre gewährt?'; + + // Prepared transactions + $lang['strpreparedxacts'] = 'Vorbereitete verteilte Transaktionen'; + $lang['strxactid'] = 'Transaktions-ID'; + $lang['strgid'] = 'Globale ID'; + + // Fulltext search + $lang['strfulltext'] = 'Volltextsuche'; + $lang['strftsconfig'] = 'Volltextsuch-Konfiguration'; + $lang['strftsconfigs'] = 'Konfigurationen'; + $lang['strftscreateconfig'] = 'Volltextsuch-Konfiguration erstellen'; + $lang['strftscreatedict'] = 'Wörterbuch erstellen'; + $lang['strftscreatedicttemplate'] = 'Wörterbuch-Blaupause erstellen'; + $lang['strftscreateparser'] = 'Parser erstellen'; + $lang['strftsnoconfigs'] = 'Keine Volltextsuch-Konfigurationen gefunden.'; + $lang['strftsconfigdropped'] = 'Volltextsuch-Konfiguration gelöscht.'; + $lang['strftsconfigdroppedbad'] = 'Löschen der Volltextsuch-Konfiguration fehlgeschlagen.'; + $lang['strconfdropftsconfig'] = 'Sind Sie sicher, dass Sie die Volltextsuch-Konfiguration "%s" löschen möchten?'; + $lang['strconfdropftsdict'] = 'Sind Sie sicher, dass Sie das Wörterbuch "%s" löschen möchten?'; + $lang['strconfdropftsmapping'] = 'Sind Sie sicher, dass Sie die Zuordnung "%s" der Volltextsuch-Konfiguration "%s" löschen möchten?'; + $lang['strftstemplate'] = 'Blaupause'; + $lang['strftsparser'] = 'Parser'; + $lang['strftsconfigneedsname'] = 'Sie müssen für die Volltextsuch-Konfiguration einen Namen angeben.'; + $lang['strftsconfigcreated'] = 'Volltextsuch-Konfiguration erstellt.'; + $lang['strftsconfigcreatedbad'] = 'Erstellen der Volltextsuch-Konfiguration fehlgeschlagen.'; + $lang['strftsmapping'] = 'Zuordnung'; + $lang['strftsdicts'] = 'Wörterbücher'; + $lang['strftsdict'] = 'Wörterbuch'; + $lang['strftsemptymap'] = 'Leere Zuordnung für Volltextsuch-Konfiguration.'; + $lang['strftswithmap'] = 'Mit Zuordnung'; + $lang['strftsmakedefault'] = 'Als Standardwert für die angegebene Spracheinstellung festlegen'; + $lang['strftsconfigaltered'] = 'Volltextsuch-Konfiguration geändert.'; + $lang['strftsconfigalteredbad'] = 'Ändern der Volltextsuch-Konfiguration fehlgeschlagen.'; + $lang['strftsconfigmap'] = 'Zuordnung für Volltextsuch-Konfiguration'; + $lang['strftsparsers'] = 'Parsers für Volltextsuch-Konfiguration'; + $lang['strftsnoparsers'] = 'Keine Parsers für Volltextsuch-Konfiguration vorhanden'; + $lang['strftsnodicts'] = 'Keine Wörterbücher für die Volltextsuche vorhanden.'; + $lang['strftsdictcreated'] = 'Wörterbuch für die Volltextsuche erstellt.'; + $lang['strftsdictcreatedbad'] = 'Erstellen des Wörterbuches für die Volltextsuche fehlgeschlagen.'; + $lang['strftslexize'] = 'Funktion zum Zerlegen in Lexeme'; + $lang['strftsinit'] = 'Initialisierungsfunktion'; + $lang['strftsoptionsvalues'] = 'Optionen und Werte'; + $lang['strftsdictneedsname'] = 'Sie müssen für das Volltextsuch-Wörterbuch einen Namen angeben.'; + $lang['strftsdictdropped'] = 'Wörterbuches für die Volltextsuche gelöscht.'; + $lang['strftsdictdroppedbad'] = 'Löschen des Wörterbuches für die Volltextsuche fehlgeschlagen.'; + $lang['strftsdictaltered'] = 'Wörterbuches für die Volltextsuche geändert.'; + $lang['strftsdictalteredbad'] = 'Ändern des Wörterbuches für die Volltextsuche fehlgeschlagen.'; + $lang['strftsaddmapping'] = 'Neue Zuordnung hinzufügen'; + $lang['strftsspecifymappingtodrop'] = 'Sie müssen mindestens eine Zuordnung angeben, die gelöscht werden soll.'; + $lang['strftsspecifyconfigtoalter'] = 'Sie müssen eine Volltextsuch-Konfiguration angeben, die geändert werden soll'; + $lang['strftsmappingdropped'] = 'Volltextsuch-Zuordnung gelöscht.'; + $lang['strftsmappingdroppedbad'] = 'Löschen der Volltextsuch-Zuordnung fehlgeschlagen.'; + $lang['strftsnodictionaries'] = 'Keine Wörterbücher gefunden.'; + $lang['strftsmappingaltered'] = 'Volltextsuch-Zuordnung geändert.'; + $lang['strftsmappingalteredbad'] = 'Ändern der Volltextsuch-Zuordnung fehlgeschlagen.'; + $lang['strftsmappingadded'] = 'Volltextsuch-Zuordnung hinzugefügt.'; + $lang['strftsmappingaddedbad'] = 'Hinzufügen der Volltextsuch-Zuordnung fehlgeschlagen.'; + $lang['strftstabconfigs'] = 'Volltextsuch-Konfigurationen'; + $lang['strftstabdicts'] = 'Wörterbücher'; + $lang['strftstabparsers'] = 'Parser'; +?> diff --git a/php/pgadmin/lang/greek.php b/php/pgadmin/lang/greek.php new file mode 100644 index 0000000..9481d39 --- /dev/null +++ b/php/pgadmin/lang/greek.php @@ -0,0 +1,872 @@ +'; + $lang['strfirst'] = '<< '; + $lang['strlast'] = ' >>'; + $lang['strfailed'] = ''; + $lang['strcreate'] = ''; + $lang['strcreated'] = ''; + $lang['strcomment'] = ''; + $lang['strlength'] = ''; + $lang['strdefault'] = ' '; + $lang['stralter'] = ''; + $lang['strok'] = ''; + $lang['strcancel'] = ''; + $lang['strac'] = ' (AutoComplete)'; + $lang['strsave'] = ''; + $lang['strreset'] = ''; + $lang['strinsert'] = ''; + $lang['strselect'] = ''; + $lang['strdelete'] = ''; + $lang['strupdate'] = ''; + $lang['strreferences'] = ''; + $lang['stryes'] = ''; + $lang['strno'] = ''; + $lang['strtrue'] = ''; + $lang['strfalse'] = ''; + $lang['stredit'] = ''; + $lang['strcolumn'] = ''; + $lang['strcolumns'] = ''; + $lang['strrows'] = ''; + $lang['strrowsaff'] = ' .'; + $lang['strobjects'] = ''; + $lang['strback'] = ''; + $lang['strqueryresults'] = ' '; + $lang['strshow'] = ''; + $lang['strempty'] = ''; + $lang['strlanguage'] = ''; + $lang['strencoding'] = ''; + $lang['strvalue'] = ''; + $lang['strunique'] = ''; + $lang['strprimary'] = ''; + $lang['strexport'] = ''; + $lang['strimport'] = ''; + $lang['strallowednulls'] = ' '; + $lang['strbackslashn'] = '\N'; + $lang['strnull'] = ''; + $lang['stremptystring'] = ' / '; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = ''; + $lang['strvacuum'] = ''; + $lang['stranalyze'] = ''; + $lang['strclusterindex'] = ''; + $lang['strclustered'] = ''; + $lang['strreindex'] = ' '; + $lang['stradd'] = ''; + $lang['strevent'] = ''; + $lang['strwhere'] = ''; + $lang['strinstead'] = ' '; + $lang['strwhen'] = ''; + $lang['strformat'] = ' '; + $lang['strdata'] = ''; + $lang['strconfirm'] = ''; + $lang['strexpression'] = ''; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = ''; + $lang['strcollapse'] = ''; + $lang['strfind'] = ''; + $lang['stroptions'] = ''; + $lang['strrefresh'] = ''; + $lang['strdownload'] = ''; + $lang['strdownloadgzipped'] = ' gzip'; + $lang['strinfo'] = ''; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = ''; + $lang['strvariables'] = ''; + $lang['strprocess'] = ''; + $lang['strprocesses'] = ''; + $lang['strsetting'] = ''; + $lang['streditsql'] = ' SQL'; + $lang['strruntime'] = ' : %s ms'; + $lang['strpaginate'] = ''; + $lang['struploadscript'] = ' (script) SQL:'; + $lang['strstarttime'] = ' '; + $lang['strfile'] = ''; + $lang['strfileimported'] = ' .'; + $lang['strtrycred'] = ' '; + + // Database Sizes + $lang['strsize'] = ''; + $lang['strbytes'] = 'bytes'; + $lang['strkb'] = 'KB'; + $lang['strmb'] = 'MB'; + $lang['strgb'] = 'GB'; + $lang['strtb'] = 'TB'; + + // Error handling + $lang['strnoframes'] = ' phpPgAdmin (frames). .'; + $lang['strnoframeslink'] = ' '; + $lang['strbadconfig'] = ' config.inc.php . config.inc.php-dist.'; + $lang['strnotloaded'] = ' PHP PostgreSQL. --with-pgsql (compilation option).'; + $lang['strpostgresqlversionnotsupported'] = ' PostgreSQL phpPgAdmin. %s .'; + $lang['strbadschema'] = ' .'; + $lang['strbadencoding'] = ' .'; + $lang['strsqlerror'] = ' SQL:'; + $lang['strinstatement'] = ' :'; + $lang['strinvalidparam'] = ' .'; + $lang['strnodata'] = ' .'; + $lang['strnoobjects'] = ' .'; + $lang['strrownotunique'] = ' .'; + $lang['strnoreportsdb'] = ' . INSTALL .'; + $lang['strnouploads'] = ' .'; + $lang['strimporterror'] = ' .'; + $lang['strimporterror-fileformat'] = ' : .'; + $lang['strimporterrorline'] = ' %s.'; + $lang['strimporterrorline-badcolumnnum'] = ' %s: .'; + $lang['strimporterror-uploadedfile'] = ' : .'; + $lang['strcannotdumponwindows'] = ' (dumping) (schemas) Windows.'; + + // Tables + $lang['strtable'] = ''; + $lang['strtables'] = ''; + $lang['strshowalltables'] = ' '; + $lang['strnotables'] = ' .'; + $lang['strnotable'] = ' .'; + $lang['strcreatetable'] = ' '; + $lang['strtablename'] = ' '; + $lang['strtableneedsname'] = ' .'; + $lang['strtableneedsfield'] = ' .'; + $lang['strtableneedscols'] = ' .'; + $lang['strtablecreated'] = ' .'; + $lang['strtablecreatedbad'] = ' .'; + $lang['strconfdroptable'] = ' "%s"?'; + $lang['strtabledropped'] = ' .'; + $lang['strtabledroppedbad'] = ' .'; + $lang['strconfemptytable'] = ' "%s"?'; + $lang['strtableemptied'] = ' .'; + $lang['strtableemptiedbad'] = ' .'; + $lang['strinsertrow'] = ' '; + $lang['strrowinserted'] = ' .'; + $lang['strrowinsertedbad'] = 'H .'; + $lang['strrowduplicate'] = 'H , .'; + $lang['streditrow'] = ' '; + $lang['strrowupdated'] = ' .'; + $lang['strrowupdatedbad'] = ' .'; + $lang['strdeleterow'] = ' '; + $lang['strconfdeleterow'] = ' ?'; + $lang['strrowdeleted'] = ' .'; + $lang['strrowdeletedbad'] = ' .'; + $lang['strinsertandrepeat'] = ' '; + $lang['strnumcols'] = ' '; + $lang['strcolneedsname'] = ' '; + $lang['strselectallfields'] = ' '; + $lang['strselectneedscol'] = ' .'; + $lang['strselectunary'] = ' (unary operators) .'; + $lang['strcolumnaltered'] = ' .'; + $lang['strcolumnalteredbad'] = ' .'; + $lang['strconfdropcolumn'] = ' "%s" "%s"?'; + $lang['strcolumndropped'] = ' .'; + $lang['strcolumndroppedbad'] = ' .'; + $lang['straddcolumn'] = ' '; + $lang['strcolumnadded'] = ' .'; + $lang['strcolumnaddedbad'] = ' .'; + $lang['strcascade'] = ''; + $lang['strtablealtered'] = ' .'; + $lang['strtablealteredbad'] = ' .'; + $lang['strdataonly'] = ' '; + $lang['strstructureonly'] = ' '; + $lang['strstructureanddata'] = ' '; + $lang['strtabbed'] = ' '; + $lang['strauto'] = ''; + $lang['strconfvacuumtable'] = ' "%s"?'; + $lang['strestimatedrowcount'] = ' '; + + // Columns + $lang['strcolprop'] = ' '; + + // Users + $lang['struser'] = ''; + $lang['strusers'] = ''; + $lang['strusername'] = ' '; + $lang['strpassword'] = ' '; + $lang['strsuper'] = '?'; + $lang['strcreatedb'] = ' ?'; + $lang['strexpires'] = ''; + $lang['strsessiondefaults'] = ' '; + $lang['strnousers'] = ' .'; + $lang['struserupdated'] = ' .'; + $lang['struserupdatedbad'] = ' .'; + $lang['strshowallusers'] = ' '; + $lang['strcreateuser'] = ' '; + $lang['struserneedsname'] = ' .'; + $lang['strusercreated'] = ' .'; + $lang['strusercreatedbad'] = ' .'; + $lang['strconfdropuser'] = ' "%s"?'; + $lang['struserdropped'] = ' .'; + $lang['struserdroppedbad'] = ' .'; + $lang['straccount'] = ''; + $lang['strchangepassword'] = ' '; + $lang['strpasswordchanged'] = ' .'; + $lang['strpasswordchangedbad'] = ' .'; + $lang['strpasswordshort'] = ' .'; + $lang['strpasswordconfirm'] = ' .'; + + // Groups + $lang['strgroup'] = ''; + $lang['strgroups'] = ''; + $lang['strnogroup'] = ' .'; + $lang['strnogroups'] = ' .'; + $lang['strcreategroup'] = ' '; + $lang['strshowallgroups'] = ' '; + $lang['strgroupneedsname'] = ' .'; + $lang['strgroupcreated'] = ' .'; + $lang['strgroupcreatedbad'] = ' .'; + $lang['strconfdropgroup'] = ' "%s"?'; + $lang['strgroupdropped'] = ' .'; + $lang['strgroupdroppedbad'] = ' .'; + $lang['strmembers'] = ''; + $lang['strmemberof'] = ' '; + $lang['stradminmembers'] = ' '; + $lang['straddmember'] = ' '; + $lang['strmemberadded'] = ' .'; + $lang['strmemberaddedbad'] = ' .'; + $lang['strdropmember'] = ' '; + $lang['strconfdropmember'] = ' "%s" "%s"?'; + $lang['strmemberdropped'] = ' .'; + $lang['strmemberdroppedbad'] = ' .'; + + // Roles + $lang['strrole'] = ''; + $lang['strroles'] = ''; + $lang['strshowallroles'] = ' '; + $lang['strinheritsprivs'] = ' ?'; + $lang['strcreaterole'] = ' '; + $lang['strcancreaterole'] = ' ?'; + $lang['strrolecreated'] = ' .'; + $lang['strrolecreatedbad'] = ' .'; + $lang['strcanlogin'] = ' ?'; + $lang['strconnlimit'] = ' '; + $lang['strdroprole'] = ' '; + $lang['strconfdroprole'] = ' "%s"?'; + $lang['strroledropped'] = ' .'; + $lang['strroledroppedbad'] = ' .'; + $lang['strnoroles'] = ' .'; + $lang['strnolimit'] = ' '; + $lang['strnever'] = ''; + $lang['strroleneedsname'] = ' .'; + + // Privileges + $lang['strprivilege'] = ''; + $lang['strprivileges'] = ''; + $lang['strnoprivileges'] = ' .'; + $lang['strgrant'] = ''; + $lang['strrevoke'] = ''; + $lang['strgranted'] = ' .'; + $lang['strgrantfailed'] = ' .'; + $lang['strgrantbad'] = ' .'; + $lang['strgrantor'] = ''; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = ''; + $lang['strdatabases'] = ''; + $lang['strshowalldatabases'] = ' '; + $lang['strnodatabases'] = ' .'; + $lang['strcreatedatabase'] = ' '; + $lang['strdatabasename'] = ' '; + $lang['strdatabaseneedsname'] = ' .'; + $lang['strdatabasecreated'] = ' .'; + $lang['strdatabasecreatedbad'] = ' .'; + $lang['strconfdropdatabase'] = ' "%s"?'; + $lang['strdatabasedropped'] = ' .'; + $lang['strdatabasedroppedbad'] = ' .'; + $lang['strentersql'] = ' SQL :'; + $lang['strsqlexecuted'] = 'H SQL .'; + $lang['strvacuumgood'] = ' .'; + $lang['strvacuumbad'] = ' .'; + $lang['stranalyzegood'] = ' .'; + $lang['stranalyzebad'] = ' .'; + $lang['strreindexgood'] = ' .'; + $lang['strreindexbad'] = ' .'; + $lang['strfull'] = ''; + $lang['strfreeze'] = ''; + $lang['strforce'] = ''; + $lang['strsignalsent'] = ' .'; + $lang['strsignalsentbad'] = ' .'; + $lang['strallobjects'] = ' '; + $lang['strdatabasealtered'] = ' .'; + $lang['strdatabasealteredbad'] = ' .'; + + // Views + $lang['strview'] = ''; + $lang['strviews'] = ''; + $lang['strshowallviews'] = ' '; + $lang['strnoview'] = ' .'; + $lang['strnoviews'] = ' .'; + $lang['strcreateview'] = ' '; + $lang['strviewname'] = ' '; + $lang['strviewneedsname'] = ' .'; + $lang['strviewneedsdef'] = ' .'; + $lang['strviewneedsfields'] = ' .'; + $lang['strviewcreated'] = ' .'; + $lang['strviewcreatedbad'] = ' .'; + $lang['strconfdropview'] = ' "%s"?'; + $lang['strviewdropped'] = ' .'; + $lang['strviewdroppedbad'] = ' .'; + $lang['strviewupdated'] = ' .'; + $lang['strviewupdatedbad'] = ' .'; + $lang['strviewlink'] = ' '; + $lang['strviewconditions'] = ' '; + $lang['strcreateviewwiz'] = ' '; + + // Sequences + $lang['strsequence'] = ''; + $lang['strsequences'] = ''; + $lang['strshowallsequences'] = ' '; + $lang['strnosequence'] = ' .'; + $lang['strnosequences'] = ' .'; + $lang['strcreatesequence'] = ' '; + $lang['strlastvalue'] = ' '; + $lang['strincrementby'] = ' '; + $lang['strstartvalue'] = ' '; + $lang['strmaxvalue'] = ' '; + $lang['strminvalue'] = ' '; + $lang['strcachevalue'] = ' (cache)'; + $lang['strlogcount'] = ''; + $lang['strcancycle'] = ' ?'; + $lang['striscalled'] = ' ?'; + $lang['strsequenceneedsname'] = ' .'; + $lang['strsequencecreated'] = ' .'; + $lang['strsequencecreatedbad'] = ' .'; + $lang['strconfdropsequence'] = ' "%s"?'; + $lang['strsequencedropped'] = ' .'; + $lang['strsequencedroppedbad'] = ' .'; + $lang['strsequencereset'] = ' .'; + $lang['strsequenceresetbad'] = ' .'; + $lang['strsequencealtered'] = ' .'; + $lang['strsequencealteredbad'] = ' .'; + $lang['strsetval'] = ' '; + $lang['strsequencesetval'] = ' .'; + $lang['strsequencesetvalbad'] = ' .'; + $lang['strnextval'] = ''; + $lang['strsequencenextval'] = ' .'; + $lang['strsequencenextvalbad'] = ' .'; + + // Indexes + $lang['strindex'] = ''; + $lang['strindexes'] = ''; + $lang['strindexname'] = ' '; + $lang['strshowallindexes'] = ' '; + $lang['strnoindex'] = ' .'; + $lang['strnoindexes'] = ' .'; + $lang['strcreateindex'] = ' '; + $lang['strtabname'] = ' '; + $lang['strcolumnname'] = ' '; + $lang['strindexneedsname'] = ' .'; + $lang['strindexneedscols'] = ' .'; + $lang['strindexcreated'] = ' .'; + $lang['strindexcreatedbad'] = ' .'; + $lang['strconfdropindex'] = ' "%s"?'; + $lang['strindexdropped'] = ' .'; + $lang['strindexdroppedbad'] = ' .'; + $lang['strkeyname'] = ' '; + $lang['struniquekey'] = ' '; + $lang['strprimarykey'] = ' '; + $lang['strindextype'] = ' '; + $lang['strtablecolumnlist'] = ' '; + $lang['strindexcolumnlist'] = ' '; + $lang['strconfcluster'] = ' "%s"?'; + $lang['strclusteredgood'] = ' .'; + $lang['strclusteredbad'] = ' .'; + + // Rules + $lang['strrules'] = ''; + $lang['strrule'] = ''; + $lang['strshowallrules'] = ' '; + $lang['strnorule'] = ' .'; + $lang['strnorules'] = ' .'; + $lang['strcreaterule'] = ' '; + $lang['strrulename'] = ' '; + $lang['strruleneedsname'] = ' .'; + $lang['strrulecreated'] = ' .'; + $lang['strrulecreatedbad'] = ' .'; + $lang['strconfdroprule'] = ' "%s" "%s"?'; + $lang['strruledropped'] = ' .'; + $lang['strruledroppedbad'] = ' .'; + + // Constraints + $lang['strconstraint'] = ''; + $lang['strconstraints'] = ''; + $lang['strshowallconstraints'] = ' '; + $lang['strnoconstraints'] = ' .'; + $lang['strcreateconstraint'] = ' '; + $lang['strconstraintcreated'] = ' .'; + $lang['strconstraintcreatedbad'] = ' .'; + $lang['strconfdropconstraint'] = ' "%s" "%s"?'; + $lang['strconstraintdropped'] = ' .'; + $lang['strconstraintdroppedbad'] = ' .'; + $lang['straddcheck'] = ' '; + $lang['strcheckneedsdefinition'] = ' .'; + $lang['strcheckadded'] = ' .'; + $lang['strcheckaddedbad'] = ' .'; + $lang['straddpk'] = ' '; + $lang['strpkneedscols'] = ' .'; + $lang['strpkadded'] = ' .'; + $lang['strpkaddedbad'] = ' .'; + $lang['stradduniq'] = ' '; + $lang['struniqneedscols'] = ' .'; + $lang['struniqadded'] = ' .'; + $lang['struniqaddedbad'] = ' .'; + $lang['straddfk'] = ' '; + $lang['strfkneedscols'] = ' .'; + $lang['strfkneedstarget'] = ' .'; + $lang['strfkadded'] = ' .'; + $lang['strfkaddedbad'] = ' .'; + $lang['strfktarget'] = ' '; + $lang['strfkcolumnlist'] = ' '; + $lang['strondelete'] = ' '; + $lang['stronupdate'] = ' '; + + // Functions + $lang['strfunction'] = ''; + $lang['strfunctions'] = ''; + $lang['strshowallfunctions'] = ' '; + $lang['strnofunction'] = ' .'; + $lang['strnofunctions'] = ' .'; + $lang['strcreateplfunction'] = ' SQL/PL'; + $lang['strcreateinternalfunction'] = ' '; + $lang['strcreatecfunction'] = ' C'; + $lang['strfunctionname'] = ' '; + $lang['strreturns'] = ''; + $lang['strproglanguage'] = ' '; + $lang['strfunctionneedsname'] = ' .'; + $lang['strfunctionneedsdef'] = ' .'; + $lang['strfunctioncreated'] = ' .'; + $lang['strfunctioncreatedbad'] = ' .'; + $lang['strconfdropfunction'] = ' "%s"?'; + $lang['strfunctiondropped'] = ' .'; + $lang['strfunctiondroppedbad'] = ' .'; + $lang['strfunctionupdated'] = ' .'; + $lang['strfunctionupdatedbad'] = ' .'; + $lang['strobjectfile'] = ' '; + $lang['strlinksymbol'] = ' '; + $lang['strarguments'] = ''; + $lang['strargmode'] = ''; + $lang['strargtype'] = ''; + $lang['strargadd'] = ' '; + $lang['strargremove'] = ' '; + $lang['strargnoargs'] = ' .'; + $lang['strargenableargs'] = ' .'; + $lang['strargnorowabove'] = ' .'; + $lang['strargnorowbelow'] = ' .'; + $lang['strargraise'] = ' .'; + $lang['strarglower'] = ' .'; + $lang['strargremoveconfirm'] = ' ; .'; + + + // Triggers + $lang['strtrigger'] = ''; + $lang['strtriggers'] = ''; + $lang['strshowalltriggers'] = ' '; + $lang['strnotrigger'] = ' .'; + $lang['strnotriggers'] = ' .'; + $lang['strcreatetrigger'] = ' '; + $lang['strtriggerneedsname'] = ' .'; + $lang['strtriggerneedsfunc'] = ' .'; + $lang['strtriggercreated'] = ' .'; + $lang['strtriggercreatedbad'] = ' .'; + $lang['strconfdroptrigger'] = ' "%s" "%s"?'; + $lang['strconfenabletrigger'] = ' "%s" "%s"?'; + $lang['strconfdisabletrigger'] = ' "%s" "%s"?'; + $lang['strtriggerdropped'] = ' .'; + $lang['strtriggerdroppedbad'] = ' .'; + $lang['strtriggerenabled'] = ' .'; + $lang['strtriggerenabledbad'] = ' .'; + $lang['strtriggerdisabled'] = ' .'; + $lang['strtriggerdisabledbad'] = ' .'; + $lang['strtriggeraltered'] = ' .'; + $lang['strtriggeralteredbad'] = ' .'; + $lang['strforeach'] = ' '; + + // Types + $lang['strtype'] = ''; + $lang['strtypes'] = ''; + $lang['strshowalltypes'] = ' '; + $lang['strnotype'] = ' .'; + $lang['strnotypes'] = ' .'; + $lang['strcreatetype'] = ' '; + $lang['strcreatecomptype'] = ' '; + $lang['strtypeneedsfield'] = ' .'; + $lang['strtypeneedscols'] = ' .'; + $lang['strinputfn'] = ' '; + $lang['stroutputfn'] = ' '; + $lang['strpassbyval'] = ' ?'; + $lang['stralignment'] = ''; + $lang['strelement'] = ''; + $lang['strdelimiter'] = ''; + $lang['strstorage'] = ''; + $lang['strfield'] = ''; + $lang['strnumfields'] = ' '; + $lang['strtypeneedsname'] = ' .'; + $lang['strtypeneedslen'] = ' .'; + $lang['strtypecreated'] = ' .'; + $lang['strtypecreatedbad'] = ' .'; + $lang['strconfdroptype'] = ' "%s"?'; + $lang['strtypedropped'] = ' .'; + $lang['strtypedroppedbad'] = ' .'; + $lang['strflavor'] = ''; + $lang['strbasetype'] = ''; + $lang['strcompositetype'] = ''; + $lang['strpseudotype'] = ''; + + // Schemas + $lang['strschema'] = ''; + $lang['strschemas'] = ''; + $lang['strshowallschemas'] = ' '; + $lang['strnoschema'] = ' .'; + $lang['strnoschemas'] = ' .'; + $lang['strcreateschema'] = ' '; + $lang['strschemaname'] = ' '; + $lang['strschemaneedsname'] = ' .'; + $lang['strschemacreated'] = ' '; + $lang['strschemacreatedbad'] = ' .'; + $lang['strconfdropschema'] = ' "%s"?'; + $lang['strschemadropped'] = ' .'; + $lang['strschemadroppedbad'] = ' .'; + $lang['strschemaaltered'] = ' .'; + $lang['strschemaalteredbad'] = ' .'; + $lang['strsearchpath'] = ' '; + + // Reports + $lang['strreport'] = ''; + $lang['strreports'] = ''; + $lang['strshowallreports'] = ' '; + $lang['strnoreports'] = ' .'; + $lang['strcreatereport'] = ' '; + $lang['strreportdropped'] = ' .'; + $lang['strreportdroppedbad'] = ' .'; + $lang['strconfdropreport'] = ' "%s"?'; + $lang['strreportneedsname'] = ' .'; + $lang['strreportneedsdef'] = ' SQL .'; + $lang['strreportcreated'] = ' .'; + $lang['strreportcreatedbad'] = ' .'; + + // Domains + $lang['strdomain'] = ''; + $lang['strdomains'] = ''; + $lang['strshowalldomains'] = ' '; + $lang['strnodomains'] = ' .'; + $lang['strcreatedomain'] = ' '; + $lang['strdomaindropped'] = ' .'; + $lang['strdomaindroppedbad'] = ' .'; + $lang['strconfdropdomain'] = ' "%s"?'; + $lang['strdomainneedsname'] = ' .'; + $lang['strdomaincreated'] = ' .'; + $lang['strdomaincreatedbad'] = ' .'; + $lang['strdomainaltered'] = ' .'; + $lang['strdomainalteredbad'] = ' .'; + + // Operators + $lang['stroperator'] = ''; + $lang['stroperators'] = ''; + $lang['strshowalloperators'] = ' '; + $lang['strnooperator'] = ' .'; + $lang['strnooperators'] = ' .'; + $lang['strcreateoperator'] = ' '; + $lang['strleftarg'] = ' '; + $lang['strrightarg'] = ' '; + $lang['strcommutator'] = ''; + $lang['strnegator'] = ''; + $lang['strrestrict'] = ''; + $lang['strjoin'] = ''; + $lang['strhashes'] = ''; + $lang['strmerges'] = ''; + $lang['strleftsort'] = ' '; + $lang['strrightsort'] = ' '; + $lang['strlessthan'] = ' '; + $lang['strgreaterthan'] = ' '; + $lang['stroperatorneedsname'] = ' .'; + $lang['stroperatorcreated'] = ' '; + $lang['stroperatorcreatedbad'] = ' .'; + $lang['strconfdropoperator'] = ' "%s"?'; + $lang['stroperatordropped'] = ' .'; + $lang['stroperatordroppedbad'] = ' .'; + + // Casts + $lang['strcasts'] = ' '; + $lang['strnocasts'] = ' .'; + $lang['strsourcetype'] = ' '; + $lang['strtargettype'] = ' '; + $lang['strimplicit'] = ''; + $lang['strinassignment'] = ' '; + $lang['strbinarycompat'] = '( )'; + + // Conversions + $lang['strconversions'] = ''; + $lang['strnoconversions'] = ' .'; + $lang['strsourceencoding'] = ' '; + $lang['strtargetencoding'] = ' '; + + // Languages + $lang['strlanguages'] = ''; + $lang['strnolanguages'] = ' .'; + $lang['strtrusted'] = ''; + + // Info + $lang['strnoinfo'] = ' .'; + $lang['strreferringtables'] = ' '; + $lang['strparenttables'] = ' '; + $lang['strchildtables'] = ' '; + + // Aggregates + $lang['straggregate'] = ' '; + $lang['straggregates'] = ' '; + $lang['strnoaggregates'] = ' '; + $lang['stralltypes'] = '( )'; + $lang['strcreateaggregate'] = ' '; + $lang['straggrbasetype'] = ' '; + $lang['straggrsfunc'] = ' '; + $lang['straggrstype'] = ' '; + $lang['straggrffunc'] = ' '; + $lang['straggrinitcond'] = ' '; + $lang['straggrsortop'] = ' '; + $lang['strconfdropaggregate'] = ' "%s"?'; + $lang['straggregatedropped'] = ' .'; + $lang['straggregatedroppedbad'] = ' .'; + $lang['straggraltered'] = ' .'; + $lang['straggralteredbad'] = ' .'; + $lang['straggrneedsname'] = ' .'; + $lang['straggrneedsbasetype'] = ' '; + $lang['straggrneedssfunc'] = ' '; + $lang['straggrneedsstype'] = ' '; + $lang['straggrcreated'] = ' .'; + $lang['straggrcreatedbad'] = ' .'; + $lang['straggrshowall'] = ' '; + + // Operator Classes + $lang['stropclasses'] = ' '; + $lang['strnoopclasses'] = ' .'; + $lang['straccessmethod'] = ' '; + + // Stats and performance + $lang['strrowperf'] = ' '; + $lang['strioperf'] = ' /'; + $lang['stridxrowperf'] = ' '; + $lang['stridxioperf'] = ' / '; + $lang['strpercent'] = '%'; + $lang['strsequential'] = ''; + $lang['strscan'] = ''; + $lang['strread'] = ''; + $lang['strfetch'] = ''; + $lang['strheap'] = ''; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = ' TOAST'; + $lang['strcache'] = ' '; + $lang['strdisk'] = ''; + $lang['strrows2'] = ''; + + // Tablespaces + $lang['strtablespace'] = ' '; + $lang['strtablespaces'] = ' '; + $lang['strshowalltablespaces'] = ' '; + $lang['strnotablespaces'] = ' .'; + $lang['strcreatetablespace'] = ' '; + $lang['strlocation'] = ''; + $lang['strtablespaceneedsname'] = ' .'; + $lang['strtablespaceneedsloc'] = ' .'; + $lang['strtablespacecreated'] = ' .'; + $lang['strtablespacecreatedbad'] = ' .'; + $lang['strconfdroptablespace'] = ' "%s"?'; + $lang['strtablespacedropped'] = ' .'; + $lang['strtablespacedroppedbad'] = ' .'; + $lang['strtablespacealtered'] = ' .'; + $lang['strtablespacealteredbad'] = ' .'; + + // Slony clusters + $lang['strcluster'] = ''; + $lang['strnoclusters'] = ' .'; + $lang['strconfdropcluster'] = ' "%s"?'; + $lang['strclusterdropped'] = ' .'; + $lang['strclusterdroppedbad'] = ' .'; + $lang['strinitcluster'] = ' '; + $lang['strclustercreated'] = ' .'; + $lang['strclustercreatedbad'] = ' .'; + $lang['strclusterneedsname'] = ' .'; + $lang['strclusterneedsnodeid'] = ' .'; + + // Slony nodes + $lang['strnodes'] = ''; + $lang['strnonodes'] = ' .'; + $lang['strcreatenode'] = ' '; + $lang['strid'] = ''; + $lang['stractive'] = ''; + $lang['strnodecreated'] = ' .'; + $lang['strnodecreatedbad'] = ' .'; + $lang['strconfdropnode'] = ' "%s"?'; + $lang['strnodedropped'] = ' .'; + $lang['strnodedroppedbad'] = ' '; + $lang['strfailover'] = ''; + $lang['strnodefailedover'] = ' .'; + $lang['strnodefailedoverbad'] = ' .'; + $lang['strstatus'] = ''; + $lang['strhealthy'] = ''; + $lang['stroutofsync'] = ''; + $lang['strunknown'] = ''; + + + // Slony paths + $lang['strpaths'] = ''; + $lang['strnopaths'] = ' .'; + $lang['strcreatepath'] = ' '; + $lang['strnodename'] = ' '; + $lang['strnodeid'] = ' '; + $lang['strconninfo'] = ' '; + $lang['strconnretry'] = ' '; + $lang['strpathneedsconninfo'] = ' .'; + $lang['strpathneedsconnretry'] = ' .'; + $lang['strpathcreated'] = ' .'; + $lang['strpathcreatedbad'] = ' .'; + $lang['strconfdroppath'] = ' "%s"?'; + $lang['strpathdropped'] = ' .'; + $lang['strpathdroppedbad'] = ' .'; + + // Slony listens + $lang['strlistens'] = ''; + $lang['strnolistens'] = ' .'; + $lang['strcreatelisten'] = ' '; + $lang['strlistencreated'] = ' .'; + $lang['strlistencreatedbad'] = ' .'; + $lang['strconfdroplisten'] = ' "%s"?'; + $lang['strlistendropped'] = ' .'; + $lang['strlistendroppedbad'] = ' .'; + + // Slony replication sets + $lang['strrepsets'] = ' '; + $lang['strnorepsets'] = ' .'; + $lang['strcreaterepset'] = ' '; + $lang['strrepsetcreated'] = ' .'; + $lang['strrepsetcreatedbad'] = ' .'; + $lang['strconfdroprepset'] = ' "%s"?'; + $lang['strrepsetdropped'] = ' .'; + $lang['strrepsetdroppedbad'] = ' .'; + $lang['strmerge'] = ''; + $lang['strmergeinto'] = ' '; + $lang['strrepsetmerged'] = ' .'; + $lang['strrepsetmergedbad'] = ' .'; + $lang['strmove'] = ''; + $lang['strneworigin'] = ' '; + $lang['strrepsetmoved'] = ' .'; + $lang['strrepsetmovedbad'] = ' .'; + $lang['strnewrepset'] = ' '; + $lang['strlock'] = ''; + $lang['strlocked'] = ''; + $lang['strunlock'] = ''; + $lang['strconflockrepset'] = ' "%s"?'; + $lang['strrepsetlocked'] = ' .'; + $lang['strrepsetlockedbad'] = ' .'; + $lang['strconfunlockrepset'] = ' "%s"?'; + $lang['strrepsetunlocked'] = ' .'; + $lang['strrepsetunlockedbad'] = ' .'; + $lang['strexecute'] = ''; + $lang['stronlyonnode'] = ' '; + $lang['strddlscript'] = ' DDL'; + $lang['strscriptneedsbody'] = ' .'; + $lang['strscriptexecuted'] = ' DDL .'; + $lang['strscriptexecutedbad'] = ' DDL .'; + $lang['strtabletriggerstoretain'] = ' Slony:'; + + // Slony tables in replication sets + $lang['straddtable'] = ' '; + $lang['strtableneedsuniquekey'] = ' .'; + $lang['strtableaddedtorepset'] = ' .'; + $lang['strtableaddedtorepsetbad'] = ' .'; + $lang['strconfremovetablefromrepset'] = ' "%s" "%s"?'; + $lang['strtableremovedfromrepset'] = ' .'; + $lang['strtableremovedfromrepsetbad'] = ' .'; + + // Slony sequences in replication sets + $lang['straddsequence'] = ' '; + $lang['strsequenceaddedtorepset'] = ' .'; + $lang['strsequenceaddedtorepsetbad'] = ' .'; + $lang['strconfremovesequencefromrepset'] = ' "%s" "%s"?'; + $lang['strsequenceremovedfromrepset'] = ' .'; + $lang['strsequenceremovedfromrepsetbad'] = ' .'; + + // Slony subscriptions + $lang['strsubscriptions'] = ''; + $lang['strnosubscriptions'] = ' .'; + + // Miscellaneous + $lang['strtopbar'] = '%s %s:%s -- "%s"'; + $lang['strtimefmt'] = 'jS M, Y g:iA'; + $lang['strhelp'] = ''; + $lang['strhelpicon'] = '?'; + $lang['strlogintitle'] = ' %s'; + $lang['strlogoutmsg'] = ' %s'; + $lang['strloading'] = '...'; + $lang['strerrorloading'] = ' '; + $lang['strclicktoreload'] = ' '; + + // Autovacuum + $lang['strautovacuum'] = ' '; + $lang['strturnedon'] = ''; + $lang['strturnedoff'] = ''; + $lang['strenabled'] = ''; + $lang['strvacuumbasethreshold'] = ' '; + $lang['strvacuumscalefactor'] = ' '; + $lang['stranalybasethreshold'] = ' '; + $lang['stranalyzescalefactor'] = ' '; + $lang['strvacuumcostdelay'] = ' '; + $lang['strvacuumcostlimit'] = ' '; + + // Table-level Locks + $lang['strlocks'] = ''; + $lang['strtransaction'] = ' '; + $lang['strprocessid'] = ' '; + $lang['strmode'] = ' '; + $lang['strislockheld'] = ' ?'; + + // Prepared transactions + $lang['strpreparedxacts'] = ' '; + $lang['strxactid'] = ''; + $lang['strgid'] = ' '; +?> + diff --git a/php/pgadmin/lang/hebrew.php b/php/pgadmin/lang/hebrew.php new file mode 100644 index 0000000..9967fae --- /dev/null +++ b/php/pgadmin/lang/hebrew.php @@ -0,0 +1,630 @@ + + * + * $Id: hebrew.php,v 1.4 2007/04/24 11:42:07 soranzo Exp $ + */ + + // Language and character set + $lang['applang'] = 'Hebrew'; + $lang['appcharset'] = 'utf-8'; + $lang['applocale'] = 'he_IL'; + $lang['appdbencoding'] = 'UNICODE'; + $lang['applangdir'] = 'rtl'; + + // Welcome + $lang['strintro'] = 'ברוכים הבאים ל phpPgAdmin.'; + $lang['strppahome'] = 'עמוד הבית של phpPgAdmin.'; + $lang['strpgsqlhome'] = 'עמוד הבית של PostgreSQL.'; + $lang['strpgsqlhome_url'] = 'http://www.postgresql.org/'; + $lang['strlocaldocs'] = 'תיעוד PostgreSQL (מקומי)'; + $lang['strreportbug'] = 'דווח על באג'; + $lang['strviewfaq'] = 'צפה ב FAQ מקוון'; + $lang['strviewfaq_url'] = 'http://phppgadmin.sourceforge.net/?page=faq'; + + // Basic strings + $lang['strlogin'] = 'התחברות'; + $lang['strloginfailed'] = 'התחברות נכשלה'; + $lang['strlogindisallowed'] = 'התחברות מבוטלת בשל בעיות אבטחה.'; + $lang['strserver'] = 'שרת'; + $lang['strlogout'] = 'התנתקות'; + $lang['strowner'] = 'בעל'; + $lang['straction'] = 'פעולה'; + $lang['stractions'] = 'פעולות'; + $lang['strname'] = 'שם'; + $lang['strdefinition'] = 'הגדרה'; + $lang['strproperties'] = 'העדפות'; + $lang['strbrowse'] = 'דפדף'; + $lang['strdrop'] = 'מחק'; + $lang['strdropped'] = 'נמחק'; + $lang['strnull'] = 'Null'; + $lang['strnotnull'] = 'לא null'; + $lang['strprev'] = 'קודם <'; + $lang['strnext'] = '> הבאה'; + $lang['strfirst'] = 'ראשון <<'; + $lang['strlast'] = '>> אחרון'; + $lang['strfailed'] = 'נכשל'; + $lang['strcreate'] = 'צור'; + $lang['strcreated'] = 'נוצר'; + $lang['strcomment'] = 'הערה'; + $lang['strlength'] = 'אורך'; + $lang['strdefault'] = 'ברירת מחדל'; + $lang['stralter'] = 'ערוך'; + $lang['strok'] = 'OK'; + $lang['strcancel'] = 'בטל'; + $lang['strsave'] = 'שמור'; + $lang['strreset'] = 'שחזר'; + $lang['strinsert'] = 'הכנס'; + $lang['strselect'] = 'בחר'; + $lang['strdelete'] = 'מחק'; + $lang['strupdate'] = 'עדכן'; + $lang['strreferences'] = 'תיעודים'; + $lang['stryes'] = 'כן'; + $lang['strno'] = 'לא'; + $lang['strtrue'] = 'אמת'; + $lang['strfalse'] = 'שקר'; + $lang['stredit'] = 'ערוך'; + $lang['strcolumns'] = 'עמודות'; + $lang['strrows'] = 'שורות'; + $lang['strrowsaff'] = 'שורות מושפעות'; + $lang['strobjects'] = 'נתונים'; + $lang['strexample'] = 'דוגמה.'; + $lang['strback'] = 'קודם'; + $lang['strqueryresults'] = 'תוצאות השאילתה'; + $lang['strshow'] = 'הראה'; + $lang['strempty'] = 'רוקן'; + $lang['strlanguage'] = 'שפה'; + $lang['strencoding'] = 'קידוד'; + $lang['strvalue'] = 'ערך'; + $lang['strunique'] = 'מיוחד'; + $lang['strprimary'] = 'ראשי'; + $lang['strexport'] = 'יצוא'; + $lang['strimport'] = 'יבוא'; + $lang['strsql'] = 'SQL'; + $lang['strgo'] = 'לך'; + $lang['stradmin'] = 'מנהל'; + $lang['strvacuum'] = 'ריק'; + $lang['stranalyze'] = 'נתח'; + $lang['strclusterindex'] = 'אשכול'; + $lang['strclustered'] = 'מאושכל?'; + $lang['strreindex'] = 'אנדקס מחדש'; + $lang['strrun'] = 'הרץ'; + $lang['stradd'] = 'הוסף'; + $lang['strevent'] = 'אירוע'; + $lang['strwhere'] = 'איפה'; + $lang['strinstead'] = 'תעשה במקום'; + $lang['strwhen'] = 'כש'; + $lang['strformat'] = 'סוג'; + $lang['strdata'] = 'מידע'; + $lang['strconfirm'] = 'אשר'; + $lang['strexpression'] = 'ביטוי'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'הרחב'; + $lang['strcollapse'] = 'צמצם'; + $lang['strexplain'] = 'הסבק'; + $lang['strexplainanalyze'] = 'הסבר נתיחה'; + $lang['strfind'] = 'מצא'; + $lang['stroptions'] = 'אפשרויות'; + $lang['strrefresh'] = 'רענן'; + $lang['strdownload'] = 'הורד'; + $lang['strdownloadgzipped'] = 'הורד דחוס ב gzip'; + $lang['strinfo'] = 'מידע'; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = 'מתקדם'; + $lang['strvariables'] = 'משתנים'; + $lang['strprocess'] = 'תהליך'; + $lang['strprocesses'] = 'תהליכים'; + $lang['strsetting'] = 'הגדרות'; + $lang['streditsql'] = 'ערוך SQL'; + $lang['strruntime'] = 'זמן-ריצה כולל: %s ms'; + $lang['strpaginate'] = 'Paginate results'; + $lang['struploadscript'] = 'או העלה תסריט SQL:'; + $lang['strstarttime'] = 'זמן התחלה'; + $lang['strfile'] = 'קובץ'; + $lang['strfileimported'] = 'קובץ יובא'; + + // Error handling + $lang['strbadconfig'] = 'קובץ ה config.inc.php שלך אינו מעודכן. אתה תיצטרך ליצור אחד חדש יותר מהקובץ config.inc.php-dist החדש'; + $lang['strnotloaded'] = 'התקנת ה PHP שלך אינה תומכת ב PostgreSQL. אתה תיצטרך להדר אותה מחדש אם הפקודה --with-pqlsql בזמן ההגדרה'; + $lang['strphpversionnotsupported'] = 'גירסת ה PHP שלך אינה ניתמכת. אנא עדכן אותה לגירסה %s או חדשה יותר.'; + $lang['strpostgresqlversionnotsupported'] = 'גערסת ה PostgrSQL שלך אינה ניתמכת. אנא עדכן אותה לגירסה %s או חדשה יותר.'; + $lang['strbadschema'] = 'תרשים שגוי צויין'; + $lang['strbadencoding'] = 'נכשל בהתאמת קידוד משתמש למסד הנתונים.'; + $lang['strsqlerror'] = 'שגיאת SQL:'; + $lang['strinstatement'] = 'בהצהרה:'; + $lang['strinvalidparam'] = 'ממדי תסריט שגוי.'; + $lang['strnodata'] = 'לא נמצאו שורות.'; + $lang['strnoobjects'] = 'לא נמצאו נתונים.'; + $lang['strrownotunique'] = 'No unique identifier for this row.'; + $lang['strnoreportsdb'] = 'לא יצרתה בסיס נתונים בישביל הדוחות. אנא קרא את קובץ ה INSTALL בישביל הדרכה.'; + $lang['strnouploads'] = 'העלאת קבצים בוטלה.'; + $lang['strimporterror'] = 'שגיאת יבוא.'; + $lang['strimporterrorline'] = 'שגיאת יבוא בשורה: %s.'; + + // Tables + $lang['strtable'] = 'טבלה'; + $lang['strtables'] = 'טבלאות'; + $lang['strshowalltables'] = 'הראה את כל הטבלאות.'; + $lang['strnotables'] = 'לא נמצאו טבלאות.'; + $lang['strnotable'] = 'טבלה לא נמצאה.'; + $lang['strcreatetable'] = 'צור טבלה'; + $lang['strtablename'] = 'שם טבלה'; + $lang['strtableneedsname'] = 'אתה חייב לתת שם לטבלה שלך.'; + $lang['strtableneedsfield'] = 'אתה חייב לציין לפחות שדה אחד.'; + $lang['strtableneedscols'] = 'אתה חייב לציין מספר תקין של עמודות.'; + $lang['strtablecreated'] = 'טבלה נוצרה.'; + $lang['strtablecreatedbad'] = 'יצירת טבלה נכשלה.'; + $lang['strconfdroptable'] = 'אתה בטוח שברצונך למחוק את הטבלה "%s"?'; + $lang['strtabledropped'] = 'טבלה נמחקה.'; + $lang['strtabledroppedbad'] = 'מחיקת טבלה נכשלה.'; + $lang['strconfemptytable'] = 'האם אתה בטוח שברצונך לרוקן את הטבלה "%s"?'; + $lang['strtableemptied'] = 'טבלה רוקנה.'; + $lang['strtableemptiedbad'] = 'ריקון טבלה נכשל.'; + $lang['strinsertrow'] = 'הכנס שדה'; + $lang['strrowinserted'] = 'שדה הוכנס.'; + $lang['strrowinsertedbad'] = 'הכנסת שדה נכשלה.'; + $lang['streditrow'] = 'ערוך שדה'; + $lang['strrowupdated'] = 'שדה עודכן.'; + $lang['strrowupdatedbad'] = 'עידכון שדה נכשל.'; + $lang['strdeleterow'] = 'מחק שדה'; + $lang['strconfdeleterow'] = 'האם אתה בטוח שברצונך למחוק את השדה הזה?'; + $lang['strrowdeleted'] = 'שדה נמחק.'; + $lang['strrowdeletedbad'] = 'מחיקת שדה נכשל.'; + $lang['strinsertandrepeat'] = 'חזור &הכנס '; + $lang['strfield'] = 'שדה'; + $lang['strnumfields'] = 'מספר השדות'; + $lang['strselectallfields'] = 'בחר את כל השדות'; + $lang['strselectneedscol'] = 'אתה חייב להראות לפחות שדה אחד'; + $lang['strselectunary'] = 'Unary operators cannot have values.'; + $lang['straltercolumn'] = 'ערוך עמודה'; + $lang['strcolumnaltered'] = 'עמודה נערכה'; + $lang['strcolumnalteredbad'] = 'עריכת עמודה נכשלה.'; + $lang['strconfdropcolumn'] = 'האם אתה בטוח שברצונך למחוק את העמודה "%s" מהטבלה "%squot;?'; + $lang['strcolumndropped'] = 'עמודה נחמקה.'; + $lang['strcolumndroppedbad'] = 'מחיקת עמודה נכשלה.'; + $lang['straddcolumn'] = 'הוסף עמודה.'; + $lang['strcolumnadded'] = 'עמודה נוספה.'; + $lang['strcolumnaddedbad'] = 'הוספת עמודה נכשלה'; + $lang['strcascade'] = 'CASCADE'; + $lang['strtablealtered'] = 'טבלה נערכה.'; + $lang['strtablealteredbad'] = 'עריכת טבלה נכשלה.'; + $lang['strdataonly'] = 'מידע בלבד'; + $lang['strstructureonly'] = 'מבנה בילבד'; + $lang['strstructureanddata'] = 'מבנה ונתונים'; + $lang['strtabbed'] = 'תוייק'; + $lang['strauto'] = 'אוטומטי'; + + // Users + $lang['struser'] = 'משתמש'; + $lang['strusers'] = 'משתמשים'; + $lang['strusername'] = 'שם משתמש'; + $lang['strpassword'] = 'סיסמה'; + $lang['strsuper'] = 'משתמש על?'; + $lang['strcreatedb'] = 'יצירת בסיס נתונים?'; + $lang['strexpires'] = 'Expires'; + $lang['strsessiondefaults'] = 'הפעלת ברירת מחדל'; + $lang['strnousers'] = 'לא נמצאו משתמשים'; + $lang['struserupdated'] = 'משתמש עודכן.'; + $lang['struserupdatedbad'] = 'עדכון משתמש נכשל.'; + $lang['strshowallusers'] = 'הראה את כל המשתמשים.'; + $lang['strcreateuser'] = 'צור משתמש'; + $lang['struserneedsname'] = 'אתה חייב לתת שם למשתמש שלך.'; + $lang['strusercreated'] = 'משתמש נוצר.'; + $lang['strusercreatedbad'] = 'יצירת משתמש נכשל.'; + $lang['strconfdropuser'] = 'אתה בטוח שברצונך למחוק את המשתמש "%s"?'; + $lang['struserdropped'] = 'משתמש נמחק.'; + $lang['struserdroppedbad'] = 'מחיקת משתמש נכשל.'; + $lang['straccount'] = 'חשבון'; + $lang['strchangepassword'] = 'שנה סיסמה'; + $lang['strpasswordchanged'] = 'סיסמה שונתה.'; + $lang['strpasswordchangedbad'] = 'נכשל בשינוי סיסמה.'; + $lang['strpasswordshort'] = 'סיסמה קצרה מידי.'; + $lang['strpasswordconfirm'] = 'סיסמה אינה תואמת לאישורה.'; + + // Groups + $lang['strgroup'] = 'קבוצה'; + $lang['strgroups'] = 'קבוצות'; + $lang['strnogroup'] = 'קבוצה לא נמצאה.'; + $lang['strnogroups'] = 'לא נמצאו קבוצות.'; + $lang['strcreategroup'] = 'צור קבוצה'; + $lang['strshowallgroups'] = 'הראה את כל הקבוצות'; + $lang['strgroupneedsname'] = 'אתה חייב לתת שם לקבוצה שלך.'; + $lang['strgroupcreated'] = 'קבוצה נוצרה.'; + $lang['strgroupcreatedbad'] = 'יצירת קבוצה נכשלה.'; + $lang['strconfdropgroup'] = 'האם אתה בטוח שברצונך למחוק את הקבוצה "%s"?'; + $lang['strgroupdropped'] = 'קבוצה נמחקה.'; + $lang['strgroupdroppedbad'] = 'מחיקת קבוצה נכשלה.'; + $lang['strmembers'] = 'חברים'; + $lang['straddmember'] = 'הוסף חבר'; + $lang['strmemberadded'] = 'חבר נוסף.'; + $lang['strmemberaddedbad'] = 'הוספת חבר נכשלה.'; + $lang['strdropmember'] = 'מחק חבר.'; + $lang['strconfdropmember'] = 'באם אתה בטוח שברצונך למחוק את החבר "%s" מהקבוצה "%s"?'; + $lang['strmemberdropped'] = 'חבר נמחק.'; + $lang['strmemberdroppedbad'] = 'מחיקת חבר נכשלה.'; + + // Privileges + $lang['strprivilege'] = 'זכות'; + $lang['strprivileges'] = 'זכויות'; + $lang['strnoprivileges'] = 'לנתון זה יש זכויות ברירת מחדל של בעלים.'; + $lang['strgrant'] = 'Grant'; + $lang['strrevoke'] = 'Revoke'; + $lang['strgranted'] = 'זכויות שונו.'; + $lang['strgrantfailed'] = 'שינוי זכויות נכשל.'; + $lang['strgrantbad'] = 'אתה חייב לציין לפחות משתמש אחד אם קבוצה בעלי זכות.'; + $lang['strgrantor'] = 'Grantor'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'בסיס נתונים'; + $lang['strdatabases'] = 'בסיסי נתונים'; + $lang['strshowalldatabases'] = 'הראה את כל בסיסי הנתונים.'; + $lang['strnodatabase'] = 'בסיס נתונים לא נמצאה.'; + $lang['strnodatabases'] = 'לא נמצאו בסיסי נתונים.'; + $lang['strcreatedatabase'] = 'צור בסיס נתונים.'; + $lang['strdatabasename'] = 'שם בסיס הנתונים'; + $lang['strdatabaseneedsname'] = 'אתה חייב לתת שם לבסיס הנתונים שלך'; + $lang['strdatabasecreated'] = 'בסיס נתונים נוצר'; + $lang['strdatabasecreatedbad'] = 'יצירת בסיס נתונים נכשלה.'; + $lang['strconfdropdatabase'] = 'אתה בטוח שברצונך למחוק את בסיס הנתונים "%s"?'; + $lang['strdatabasedropped'] = 'מסד נתונים נמחק'; + $lang['strdatabasedroppedbad'] = 'מחיקת מסד הנתונים נכשלה.'; + $lang['strentersql'] = 'הכנס את ה SQL כדאי להריץ אותו פה:'; + $lang['strsqlexecuted'] = 'SQL הורץ.'; + $lang['strvacuumgood'] = 'ריק הושלם.'; + $lang['strvacuumbad'] = 'ריק נכשל.'; + $lang['stranalyzegood'] = 'ניתוח הושלם.'; + $lang['stranalyzebad'] = 'ניתוח נכשל.'; + $lang['strreindexgood'] = 'אנידוקס מחדש הושלם.'; + $lang['strreindexbad'] = 'אנידוקס מחדש נכשל.'; + $lang['strfull'] = 'מלא'; + $lang['strfreeze'] = 'Freeze'; + $lang['strforce'] = 'כוח'; + $lang['strsignalsent'] = 'שלח אות.'; + $lang['strsignalsentbad'] = 'שליחת אות נכשלה.'; + $lang['strallobjects'] = 'כל העצמים'; + + // Views + $lang['strview'] = 'צפייה'; + $lang['strviews'] = 'צפיות'; + $lang['strshowallviews'] = 'הראה את כל הצפיות'; + $lang['strnoview'] = 'צפייה לא נמצאה.'; + $lang['strnoviews'] = 'צפיות לא נמצאו.'; + $lang['strcreateview'] = 'צור צפייה'; + $lang['strviewname'] = 'שם הצפייה'; + $lang['strviewneedsname'] = 'אתה חייב לתת שם לצפייה'; + $lang['strviewneedsdef'] = 'אתה חייב לציין הגדרה לצפייה.'; + $lang['strviewneedsfields'] = 'אתה חייב לתת את העמודה אשר אתה רוצה לצפייה.'; + $lang['strviewcreated'] = 'צפייה נוצרה.'; + $lang['strviewcreatedbad'] = 'יצירת צפייה נכשלה.'; + $lang['strconfdropview'] = 'האם אתה בטוח שברצונך למחוק את הצפייה "%s"'; + $lang['strviewdropped'] = 'צפייה נמחקה.'; + $lang['strviewdroppedbad'] = 'מחיקת צפייה נכשלה.'; + $lang['strviewupdated'] = 'צפייה עודכנה.'; + $lang['strviewupdatedbad'] = 'עדכון צפייה נכשלה.'; + $lang['strviewlink'] = 'קישורי מפתח'; + $lang['strviewconditions'] = 'Additional Conditions'; + $lang['strcreateviewwiz'] = 'צור צפייה בעזרת אשף.'; + + // Sequences + $lang['strsequence'] = 'נוסחה'; + $lang['strsequences'] = 'נוסחאות'; + $lang['strshowallsequences'] = 'הראה את כל הנוסחאות.'; + $lang['strnosequence'] = 'נוסחה לא נמצאה.'; + $lang['strnosequences'] = 'לא נמצאו נוסחאות.'; + $lang['strcreatesequence'] = 'צור נוסחה'; + $lang['strlastvalue'] = 'ערך אחרון'; + $lang['strincrementby'] = 'Increment by'; + $lang['strstartvalue'] = 'ערך התחלה'; + $lang['strmaxvalue'] = 'ערך מקסימלי'; + $lang['strminvalue'] = 'ערך מינימלי'; + $lang['strcachevalue'] = 'ערך מטמון'; + $lang['strlogcount'] = 'ספירת יומן'; + $lang['striscycled'] = 'Is cycled?'; + $lang['strsequenceneedsname'] = 'אתה חייב לציין שם לנוסחה שלך.'; + $lang['strsequencecreated'] = 'נוסחה נוצרה.'; + $lang['strsequencecreatedbad'] = 'יצירת נוסחה נכשלה.'; + $lang['strconfdropsequence'] = 'האם אתה בטוח שברצונך למחוק את הנוסחה "%s"?'; + $lang['strsequencedropped'] = 'נוסחה נמחקה..'; + $lang['strsequencedroppedbad'] = 'נחיקת נוסחה נכשלה.'; + $lang['strsequencereset'] = 'נוסחה אותחלה.'; + $lang['strsequenceresetbad'] = 'איתחול נוסחה נכשלה.'; + + // Indexes + $lang['strindex'] = 'אינדקס'; + $lang['strindexes'] = 'אינדקסים'; + $lang['strindexname'] = 'שם האינדקס'; + $lang['strshowallindexes'] = 'צפה בכל האינדקסים'; + $lang['strnoindex'] = 'אינדקס לא נמצאה.'; + $lang['strnoindexes'] = 'לא נמצאו אינדקסים.'; + $lang['strcreateindex'] = 'צור אינקדס.'; + $lang['strtabname'] = 'תקייה אינקדס'; + $lang['strcolumnname'] = 'שם העמודה'; + $lang['strindexneedsname'] = 'אתה חייב לציין שם לאינדקס.'; + $lang['strindexneedscols'] = 'אינדקסים דורשים מספר תקין של עמודות.'; + $lang['strindexcreated'] = 'אינדקס נוצר.'; + $lang['strindexcreatedbad'] = 'יצירת אינקדס נכשלה.'; + $lang['strconfdropindex'] = 'האם אתה בטוח שברצונל למחוק את האינקדס "%s"?'; + $lang['strindexdropped'] = 'אינדקס נמחק.'; + $lang['strindexdroppedbad'] = 'מחיקת אינדקס נכשלה.'; + $lang['strkeyname'] = 'שם המפתח'; + $lang['struniquekey'] = 'מםתח יחודי'; + $lang['strprimarykey'] = 'מפתח ראשי'; + $lang['strindextype'] = 'סוג האינדקס'; + $lang['strtablecolumnlist'] = 'עמודות בטבלה'; + $lang['strindexcolumnlist'] = 'עמודות באינדקס'; + $lang['strconfcluster'] = 'האם אתה בטוח שברצונך למחוק את האשכול "%s"?'; + $lang['strclusteredgood'] = 'אשכול הושלם.'; + $lang['strclusteredbad'] = 'אשכול נכשל.'; + + // Rules + $lang['strrules'] = 'חוקים'; + $lang['strrule'] = 'חוק'; + $lang['strshowallrules'] = 'הראה את כל החוקים'; + $lang['strnorule'] = 'חוק לא נמצאה.'; + $lang['strnorules'] = 'לא נמצאו חוקים.'; + $lang['strcreaterule'] = 'צור חוק'; + $lang['strrulename'] = 'שם החוק'; + $lang['strruleneedsname'] = 'אתה חייב לציין שם לחוק.'; + $lang['strrulecreated'] = 'חוק נוצר.'; + $lang['strrulecreatedbad'] = 'יצירת חוק נכשלה.'; + $lang['strconfdroprule'] = 'האם אתה בטוח שברצונך למחוק את החוק "%s" מ "l%s"?'; + $lang['strruledropped'] = 'חוק נמחק.'; + $lang['strruledroppedbad'] = 'מחיקת חוק נכשלה.'; + + // Constraints + $lang['strconstraints'] = 'מבנים'; + $lang['strshowallconstraints'] = 'הראה את כל המבנים.'; + $lang['strnoconstraints'] = 'לא נמצאו מבנים.'; + $lang['strcreateconstraint'] = 'צור מבנה'; + $lang['strconstraintcreated'] = 'מבנה נוצר.'; + $lang['strconstraintcreatedbad'] = 'יצירת מבנה נכשלה.'; + $lang['strconfdropconstraint'] = 'האם אתה בטוח שברצונך למחוק את הבמנה "%s" מ "%s"?'; + $lang['strconstraintdropped'] = 'מבנה נמחק.'; + $lang['strconstraintdroppedbad'] = 'מחיקת מבנה נכשלה.'; + $lang['straddcheck'] = 'הוסף בדיקה'; + $lang['strcheckneedsdefinition'] = 'בדיקת מבנה זקוקה להגדרה.'; + $lang['strcheckadded'] = 'בדיקה מבנה נוספה.'; + $lang['strcheckaddedbad'] = 'בדיקת מבנה נכשלה.'; + $lang['straddpk'] = 'הוסף מפתח ראשי'; + $lang['strpkneedscols'] = 'מפתח ראשי דורש לפחות עמודה אחת.'; + $lang['strpkadded'] = 'מפתח ראשי נוסף.'; + $lang['strpkaddedbad'] = 'הוספת מפתח ראשי נכשלה.'; + $lang['stradduniq'] = 'הוסף מפתח מיוחד.'; + $lang['struniqneedscols'] = 'מפתח מיוחד דורש לפחות עמודה אחת.'; + $lang['struniqadded'] = 'מפתח מיוחד נוסף.'; + $lang['struniqaddedbad'] = 'נוספת מפתח מיוחד נכשלה.'; + $lang['straddfk'] = 'הוסף מפתח זר'; + $lang['strfkneedscols'] = 'מפתח זר דורש לפתוח עמודה אחת.'; + $lang['strfkneedstarget'] = 'מפתח זר דורש טבלת מטרה.'; + $lang['strfkadded'] = 'מפתח זר נוסף.'; + $lang['strfkaddedbad'] = 'יצירת מפתח זר נכשלה.'; + $lang['strfktarget'] = 'טבלת מטרה'; + $lang['strfkcolumnlist'] = 'עמודות במפתח'; + $lang['strondelete'] = 'DELETE ב'; + $lang['stronupdate'] = 'UPDATE ב'; + + // Functions + $lang['strfunction'] = 'פונקציה'; + $lang['strfunctions'] = 'פונקציות'; + $lang['strshowallfunctions'] = 'הראה את כל הפונקציות'; + $lang['strnofunction'] = 'פונקציה לא נמצאה.'; + $lang['strnofunctions'] = 'לא נמצאו פונקציות.'; + $lang['strcreateplfunction'] = 'צור פונקצית SQL/PL'; + $lang['strcreateinternalfunction'] = 'צור פונקציה פנימית'; + $lang['strcreatecfunction'] = 'צור פונקצית C'; + $lang['strfunctionname'] = 'שם הפונקציה'; + $lang['strreturns'] = 'חזרות'; + $lang['strarguments'] = 'ארגומנטים'; + $lang['strproglanguage'] = 'שפת תיכנות'; + $lang['strfunctionneedsname'] = 'אתה חייב לתת שם לפונקציה שלך.'; + $lang['strfunctionneedsdef'] = 'אתה חייב לציין הגדרה לפונקציה.'; + $lang['strfunctioncreated'] = 'פונקצייה נוצרה.'; + $lang['strfunctioncreatedbad'] = 'יצירת פונקצייה נכשלה.'; + $lang['strconfdropfunction'] = 'האם אתה בטוח שברצונך למחוק את הפונקצייה "%s"?'; + $lang['strfunctiondropped'] = 'פונקצייה נמחקה.'; + $lang['strfunctiondroppedbad'] = 'מחיקת פונקציה נכשלה.'; + $lang['strfunctionupdated'] = 'פונקציה עודכנה.'; + $lang['strfunctionupdatedbad'] = 'עדכון פונקציה נכשל.'; + $lang['strobjectfile'] = 'קובץ אובייקט'; + $lang['strlinksymbol'] = 'קישור סימלי'; + + // Triggers + $lang['strtrigger'] = 'זרז'; + $lang['strtriggers'] = 'זרזים'; + $lang['strshowalltriggers'] = 'הראה את כל הזרזים'; + $lang['strnotrigger'] = 'זרז לא נימצאה.'; + $lang['strnotriggers'] = 'לא נימצאו זרזים.'; + $lang['strcreatetrigger'] = 'צור זרז'; + $lang['strtriggerneedsname'] = 'אתה חייב לציין שם לזרז.'; + $lang['strtriggerneedsfunc'] = 'אתה חייב לציין פונקציה לזרז.'; + $lang['strtriggercreated'] = 'זרז נוצר.'; + $lang['strtriggercreatedbad'] = 'יצירת זרז נכשלה.'; + $lang['strconfdroptrigger'] = 'האם אתה בטוח שברצונך למחוק את הזרז "%s" מ "%s"?'; + $lang['strtriggerdropped'] = 'זרז נמחק.'; + $lang['strtriggerdroppedbad'] = 'מחיקת זרז נכשלה.'; + $lang['strtriggeraltered'] = 'זרז נערך.'; + $lang['strtriggeralteredbad'] = 'עריכת זרז נכשלה.'; + + // Types + $lang['strtype'] = 'סוג'; + $lang['strtypes'] = 'סוגים'; + $lang['strshowalltypes'] = 'הראה את כל הסוגים.'; + $lang['strnotype'] = 'סוג לא נמצאה.'; + $lang['strnotypes'] = 'לא נמצאו סוגים.'; + $lang['strcreatetype'] = 'צור סוג'; + $lang['strcreatecomptype'] = 'Create composite type'; + $lang['strtypeneedsfield'] = 'אתה חייב לציין לפחות שדה אחד.'; + $lang['strtypeneedscols'] = 'אתה חייב לציין מספר תקין של שדות.'; + $lang['strtypename'] = 'שם הסוג'; + $lang['strinputfn'] = 'פונקצית קלט'; + $lang['stroutputfn'] = 'פונקצית פלט'; + $lang['strpassbyval'] = 'Passed by val?'; + $lang['stralignment'] = 'Alignment'; + $lang['strelement'] = 'אלמנט'; + $lang['strdelimiter'] = 'Delimiter'; + $lang['strstorage'] = 'אחסנה'; + $lang['strtypeneedsname'] = 'אתה חייב לציין שם לסוג.'; + $lang['strtypeneedslen'] = 'אתה חייב לציין אורך לסוג.'; + $lang['strtypecreated'] = 'סוג נוצר.'; + $lang['strtypecreatedbad'] = 'יצירת סוג נכשלה.'; + $lang['strconfdroptype'] = 'האם אתה בטוח שברצונך למחוק את הסוג "%s"?'; + $lang['strtypedropped'] = 'סוג נמחק.'; + $lang['strtypedroppedbad'] = 'מחיקת סוג נכשלה.'; + $lang['strflavor'] = 'Flavor'; + $lang['strbasetype'] = 'בסיס'; + $lang['strcompositetype'] = 'Composite'; + $lang['strpseudotype'] = 'פאסדו'; + + // Schemas + $lang['strschema'] = 'תרשים'; + $lang['strschemas'] = 'תרשמים'; + $lang['strshowallschemas'] = 'הראה את כל התרשימים'; + $lang['strnoschema'] = 'תרשים לא נמצאה.'; + $lang['strnoschemas'] = 'לא נמצאו תרשימים.'; + $lang['strcreateschema'] = 'צור תרשים'; + $lang['strschemaname'] = 'שם התרשים'; + $lang['strschemaneedsname'] = 'אתה חייב לציין שם לתרשים.'; + $lang['strschemacreated'] = 'תרשים נוצר'; + $lang['strschemacreatedbad'] = 'יצירת תרשים נכשלה.'; + $lang['strconfdropschema'] = 'האם אתה בטוח שברצונך למחוק את התרשים "?"?'; + $lang['strschemadropped'] = 'תרשים נמחק.'; + $lang['strschemadroppedbad'] = 'מחיקת תרשים נכשלה.'; + $lang['strschemaaltered'] = 'תרשים נערך.'; + $lang['strschemaalteredbad'] = 'עריכת תרשים נכשלה.'; + $lang['strsearchpath'] = 'חיפוש מיקום התרשים.'; + + // Reports + $lang['strreport'] = 'דוח'; + $lang['strreports'] = 'דוחות'; + $lang['strshowallreports'] = 'הראה את כל הדוחות'; + $lang['strnoreports'] = 'לא נמצאו דוחות.'; + $lang['strcreatereport'] = 'צור דוח'; + $lang['strreportdropped'] = 'דוח נמחק.'; + $lang['strreportdroppedbad'] = 'מחיקת דוח נכשלה'; + $lang['strconfdropreport'] = 'האם אתה בטוח שברצונך למחוק את הדוח "%s"l?'; + $lang['strreportneedsname'] = 'אתה חייב לציין שם לדוח.'; + $lang['strreportneedsdef'] = 'אתה חייב לתת SQL לדוח.'; + $lang['strreportcreated'] = 'דוח נשמר.'; + $lang['strreportcreatedbad'] = 'שמירת דוח נכשלה.'; + + // Domains + $lang['strdomain'] = 'תחום'; + $lang['strdomains'] = 'תחומים'; + $lang['strshowalldomains'] = 'הראה את כל התחומים'; + $lang['strnodomains'] = 'לא נמצאו תחומים.'; + $lang['strcreatedomain'] = 'צור תחום'; + $lang['strdomaindropped'] = 'תחום נמחק.'; + $lang['strdomaindroppedbad'] = 'מחיקת תחום נכשלה.'; + $lang['strconfdropdomain'] = 'האם אתה בטוח שברצונך למחוק את התחום "%s"?'; + $lang['strdomainneedsname'] = 'אתה חייב לציין שם לתחום שלך.'; + $lang['strdomaincreated'] = 'תחום נוצר.'; + $lang['strdomaincreatedbad'] = 'יצירת תחום נכשלה.'; + $lang['strdomainaltered'] = 'תחום נערך.'; + $lang['strdomainalteredbad'] = 'עריכת תחום נכשלה.'; + + // Operators + $lang['stroperator'] = 'מפעיל'; + $lang['stroperators'] = 'מפעילים'; + $lang['strshowalloperators'] = 'הראה את כל המפעילים'; + $lang['strnooperator'] = 'מפעיל לא נמצאה.'; + $lang['strnooperators'] = 'לא נמצאו מפעילים.'; + $lang['strcreateoperator'] = 'צור מפעיל'; + $lang['strleftarg'] = 'סידור סוג לשמאל'; + $lang['strrightarg'] = 'סידור שמאל לימין'; + $lang['strcommutator'] = 'Commutator'; + $lang['strnegator'] = 'Negator'; + $lang['strrestrict'] = 'Restrict'; + $lang['strjoin'] = 'חבר'; + $lang['strhashes'] = 'Hashes'; + $lang['strmerges'] = 'Merges'; + $lang['strleftsort'] = 'סידור לשמאל'; + $lang['strrightsort'] = 'סידור לימין'; + $lang['strlessthan'] = 'פחות מ'; + $lang['strgreaterthan'] = 'גדול מ'; + $lang['stroperatorneedsname'] = 'אתה חייב לציין שם למפעיל.'; + $lang['stroperatorcreated'] = 'מפעיל נוצר.'; + $lang['stroperatorcreatedbad'] = 'יצירת מפעיל נכשלה.'; + $lang['strconfdropoperator'] = 'האם אתה בטוח שברצונך למחוק את המפעיל "%s"?'; + $lang['stroperatordropped'] = 'מפעיל נמחק.'; + $lang['stroperatordroppedbad'] = 'מחיקת מפעיל נכשלה.'; + + // Casts + $lang['strcasts'] = 'Casts'; + $lang['strnocasts'] = 'No casts found.'; + $lang['strsourcetype'] = 'סוג המקור'; + $lang['strtargettype'] = 'סוג המטרה'; + $lang['strimplicit'] = 'Implicit'; + $lang['strinassignment'] = 'In assignment'; + $lang['strbinarycompat'] = '(Binary compatible)'; + + // Conversions + $lang['strconversions'] = 'המרה'; + $lang['strnoconversions'] = 'לא נימצאה המרה.'; + $lang['strsourceencoding'] = 'סוג הקידוד של המקור'; + $lang['strtargetencoding'] = 'סוג הקידוד של המטרה'; + + // Languages + $lang['strlanguages'] = 'שפות'; + $lang['strnolanguages'] = 'לא נמצאו שפות'; + $lang['strtrusted'] = 'Trusted'; + + // Info + $lang['strnoinfo'] = 'אין מידע זמין.'; + $lang['strreferringtables'] = 'Referring tables'; + $lang['strparenttables'] = 'Parent tables'; + $lang['strchildtables'] = 'Child tables'; + + // Aggregates + $lang['straggregates'] = 'Aggregates'; + $lang['strnoaggregates'] = 'No aggregates found.'; + $lang['stralltypes'] = '(כל הסוגים)'; + + // Operator Classes + $lang['stropclasses'] = 'Op Classes'; + $lang['strnoopclasses'] = 'No operator classes found.'; + $lang['straccessmethod'] = 'שיטת גישה'; + + // Stats and performance + $lang['strrowperf'] = 'תפקוד שדות'; + $lang['strioperf'] = 'תפקוד קלט/פלט'; + $lang['stridxrowperf'] = 'תפקוד אנדוקס שדה'; + $lang['stridxioperf'] = 'תפקוד אנדוקס קלט/פלט'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Sequential'; + $lang['strscan'] = 'חיפוש'; + $lang['strread'] = 'קרא'; + $lang['strfetch'] = 'Fetch'; + $lang['strheap'] = 'Heap'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST Index'; + $lang['strcache'] = 'מטמון'; + $lang['strdisk'] = 'דיסק'; + $lang['strrows2'] = 'שורה'; + + // Tablespaces + $lang['strtablespace'] = 'מרחבון'; + $lang['strtablespaces'] = 'מרחבונים'; + $lang['strshowalltablespaces'] = 'הראה את כל המרחבונים'; + $lang['strnotablespaces'] = 'לא נמצאו מרחבונים.'; + $lang['strcreatetablespace'] = 'צור מרחבון'; + $lang['strlocation'] = 'מיקום'; + $lang['strtablespaceneedsname'] = 'אתה חייב לציין שם למרחבון.'; + $lang['strtablespaceneedsloc'] = 'אתה חייב לציין תיקיה שבה יבצר המרחבון.'; + $lang['strtablespacecreated'] = 'מרחבון נוצר.'; + $lang['strtablespacecreatedbad'] = 'יצירת מרחבון נכשלה.'; + $lang['strconfdroptablespace'] = 'האם אתה בטוח שברצונך למחוק את המרחבון "%s"?'; + $lang['strtablespacedropped'] = 'מרחבון נמחק.'; + $lang['strtablespacedroppedbad'] = 'מחיקת מרחבון נכשלה.'; + $lang['strtablespacealtered'] = 'מרחבון נערך.'; + $lang['strtablespacealteredbad'] = 'עריכת מרחבון מכשלה.'; + + // Miscellaneous + $lang['strtopbar'] = '%s רץ על %s:%s -- אתה מחובר כמשתמש - "%s"'; + $lang['strtimefmt'] = 'jS M, Y g:iA'; + $lang['strhelp'] = 'עזרה'; + +?> diff --git a/php/pgadmin/lang/hungarian.php b/php/pgadmin/lang/hungarian.php new file mode 100644 index 0000000..f6af854 --- /dev/null +++ b/php/pgadmin/lang/hungarian.php @@ -0,0 +1,1027 @@ + + * + * + */ + + // Language and character set + $lang['applang'] = 'Magyar'; + $lang['appcharset'] = 'UTF-8'; + $lang['applocale'] = 'hu_HU'; + $lang['appdbencoding'] = 'LATIN2'; // It would be good to change this to UNICODE. IMHO + $lang['applangdir'] = 'ltr'; + + // Welcome + $lang['strintro'] = 'Üdvözli a phpPgAdmin!'; + $lang['strppahome'] = 'A phpPgAdmin honlapja'; + $lang['strpgsqlhome'] = 'A PostgreSQL honlapja'; + $lang['strpgsqlhome_url'] = 'http://www.postgresql.org/'; + $lang['strlocaldocs'] = 'A PostgreSQL (helyi) dokumentációja'; + $lang['strreportbug'] = 'Hibajelentés feladása'; + $lang['strviewfaq'] = 'GYIK megtekintése'; + $lang['strviewfaq_url'] = 'http://phppgadmin.sourceforge.net/?page=faq'; + + // Basic strings + $lang['strlogin'] = 'Bejelentkezés'; + $lang['strloginfailed'] = 'Nem sikerült bejelentkezni'; + $lang['strlogindisallowed'] = 'Biztonsági okból engedélyezettlen a bejelentkezés.'; + $lang['strserver'] = 'Szolgáló'; + $lang['strservers'] = 'Szolgálók'; + $lang['strgroupservers'] = 'Szolgálók „%s” csoportban'; + $lang['strallservers'] = 'Minden szolgáló'; + $lang['strintroduction'] = 'Bevezető'; + $lang['strhost'] = 'Gazda'; + $lang['strport'] = 'Kapu'; + $lang['strlogout'] = 'Kilépés'; + $lang['strowner'] = 'Tulajdonos'; + $lang['straction'] = 'Művelet'; + $lang['stractions'] = 'Műveletek'; + $lang['strname'] = 'Név'; + $lang['strdefinition'] = 'Definíció'; + $lang['strproperties'] = 'Tulajdonságok'; + $lang['strbrowse'] = 'Tallóz'; + $lang['strenable'] = 'Enged'; + $lang['strdisable'] = 'Tilt'; + $lang['strdrop'] = 'Töröl'; + $lang['strdropped'] = 'Törlölve'; + $lang['strnull'] = 'Null'; + $lang['strnotnull'] = 'Not Null'; + $lang['strprev'] = '< Előző'; + $lang['strnext'] = 'Következő >'; + $lang['strfirst'] = '<< Első'; + $lang['strlast'] = 'Utolsó >>'; + $lang['strfailed'] = 'Sikertelen'; + $lang['strcreate'] = 'Teremt'; + $lang['strcreated'] = 'Megteremtve'; + $lang['strcomment'] = 'Megjegyzés'; + $lang['strlength'] = 'Hossz'; + $lang['strdefault'] = 'Alapértelmezés'; + $lang['stralter'] = 'Módosít'; + $lang['strok'] = 'OK'; + $lang['strcancel'] = 'Mégsem'; + $lang['strkill'] = 'Öl'; + $lang['strac'] = 'Önműködő kiegészítés engedélyezése'; + $lang['strsave'] = 'Ment'; + $lang['strreset'] = 'Újra'; + $lang['strrestart'] = 'Újraindít'; + $lang['strinsert'] = 'Beszúr'; + $lang['strselect'] = 'Kiválaszt'; + $lang['strdelete'] = 'Töröl'; + $lang['strupdate'] = 'Időszerűsít'; + $lang['strreferences'] = 'Hivatkozások'; + $lang['stryes'] = 'Igen'; + $lang['strno'] = 'Nem'; + $lang['strtrue'] = 'IGAZ'; + $lang['strfalse'] = 'HAMIS'; + $lang['stredit'] = 'Szerkeszt'; + $lang['strcolumn'] = 'Oszlop'; + $lang['strcolumns'] = 'Oszlopok'; + $lang['strrows'] = 'sor'; + $lang['strrowsaff'] = 'sor érintett.'; + $lang['strobjects'] = 'objektum'; + $lang['strback'] = 'Vissza'; + $lang['strqueryresults'] = 'Lekérdezés eredményei'; + $lang['strshow'] = 'Megjelenít'; + $lang['strempty'] = 'Ürít'; + $lang['strlanguage'] = 'Nyelv'; + $lang['strencoding'] = 'Kódolás'; + $lang['strvalue'] = 'Érték'; + $lang['strunique'] = 'egyedi'; + $lang['strprimary'] = 'Elsődleges'; + $lang['strexport'] = 'Kivisz'; + $lang['strimport'] = 'Behoz'; + $lang['strallowednulls'] = 'Engedélyezett NULL betűk'; + $lang['strbackslashn'] = '\N'; + $lang['stremptystring'] = 'Üres szöveg/mező'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = 'Gazda'; + $lang['strvacuum'] = 'Takarít'; + $lang['stranalyze'] = 'Elemez'; + $lang['strclusterindex'] = 'Fürtöz'; + $lang['strclustered'] = 'Fürtözve?'; + $lang['strreindex'] = 'Újraindexel'; + $lang['strexecute'] = 'Végrehajt'; + $lang['stradd'] = 'Bővít'; + $lang['strevent'] = 'Esemény'; + $lang['strwhere'] = 'Hol'; + $lang['strinstead'] = 'Inkább'; + $lang['strwhen'] = 'Mikor'; + $lang['strformat'] = 'Alak'; + $lang['strdata'] = 'Adatok'; + $lang['strconfirm'] = 'Megerősít'; + $lang['strexpression'] = 'Kifejezés'; + $lang['strellipsis'] = '…'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'Kinyit'; + $lang['strcollapse'] = 'Összecsuk'; + $lang['strfind'] = 'Keres'; + $lang['stroptions'] = 'Részletek'; + $lang['strrefresh'] = 'Frissít'; + $lang['strdownload'] = 'Letöltés'; + $lang['strdownloadgzipped'] = 'Gzippel tömörített letöltés'; + $lang['strinfo'] = 'Infó'; + $lang['stroids'] = 'OID-k'; + $lang['stradvanced'] = 'Haladó'; + $lang['strvariables'] = 'Változók'; + $lang['strprocess'] = 'Folyamat'; + $lang['strprocesses'] = 'Folyamatok'; + $lang['strsetting'] = 'Beállítás'; + $lang['streditsql'] = 'SQL-szerkesztés'; + $lang['strruntime'] = 'Teljes futási idő: %s ms'; + $lang['strpaginate'] = 'Oldalakra tördelés'; + $lang['struploadscript'] = 'vagy egy SQL-írás feltöltése:'; + $lang['strstarttime'] = 'Kezdés ideje'; + $lang['strfile'] = 'Fájl'; + $lang['strfileimported'] = 'Fájl behozva.'; + $lang['strtrycred'] = 'Használja minden kiszolgálóhoz e beállításokat'; + $lang['strconfdropcred'] = 'Biztonság okán a szétválás megszünteti a megosztott bejelentkező adatait. Biztosan szét akar válni?'; + $lang['stractionsonmultiplelines'] = 'Több soros műveletek'; + $lang['strselectall'] = 'Mindent kiválaszt'; + $lang['strunselectall'] = 'Semmit sem választ ki'; + $lang['strlocale'] = 'Helyszín'; + $lang['strcollation'] = 'Összerakás'; + $lang['strctype'] = 'Betűtípus'; + $lang['strdefaultvalues'] = 'Alapértékek'; + $lang['strnewvalues'] = 'Új értékek'; + $lang['strstart'] = 'Indít'; + $lang['strstop'] = 'Leállít'; + $lang['strgotoppage'] = 'vissza a tetejére'; + $lang['strtheme'] = 'Téma'; + + // Admin + $lang['stradminondatabase'] = 'A következő adminisztratív feladatok %s adatbázis egészére vonatkoznak.'; + $lang['stradminontable'] = 'A következő adminisztratív feladatok %s táblára vonatkoznak.'; + + // User-supplied SQL history + $lang['strhistory'] = 'Előzmények'; + $lang['strnohistory'] = 'Nincs előzmény.'; + $lang['strclearhistory'] = 'Előzményeket töröl'; + $lang['strdelhistory'] = 'Előzményekből töröl'; + $lang['strconfdelhistory'] = 'Tényleg töröli e kérelmet az előzményekből?'; + $lang['strconfclearhistory'] = 'Tényleg töröli az előzményeket?'; + $lang['strnodatabaseselected'] = 'Ki kell választani az adatbázist.'; + + // Database sizes + $lang['strnoaccess'] = 'Nincs hozzáférés'; + $lang['strsize'] = 'Méret'; + $lang['strbytes'] = 'bájt'; + $lang['strkb'] = 'kB'; + $lang['strmb'] = 'MB'; + $lang['strgb'] = 'GB'; + $lang['strtb'] = 'TB'; + + // Error handling + $lang['strnoframes'] = 'Ez alkalmazás legjobban kereteket támogató böngészővel működik, de használható keretek nélkül is az alábbi hivatkozásra kattintva.'; + $lang['strnoframeslink'] = 'Keretek nélküli használat'; + $lang['strbadconfig'] = 'A config.inc.php elavult. Újra kell teremteni az új config.inc.php-dist fájlból.'; + $lang['strnotloaded'] = 'Az ön PHP rendszere nem támogatja a PostgreSQL-t.'; + $lang['strpostgresqlversionnotsupported'] = 'A PostgreSQL e változata nem megfelelő. Kérem telepítse a %s változatot, vagy újabbat!'; + $lang['strbadschema'] = 'A megadott séma érvénytelen.'; + $lang['strbadencoding'] = 'Az ügyfél oldali kódolás beállítása az adatbázisban nem sikerült.'; + $lang['strsqlerror'] = 'SQL hiba:'; + $lang['strinstatement'] = 'A következő kifejezésben:'; + $lang['strinvalidparam'] = 'Érvénytelen paraméterek.'; + $lang['strnodata'] = 'Nincsenek sorok.'; + $lang['strnoobjects'] = 'Nincsenek objektumok.'; + $lang['strrownotunique'] = 'Nincs egyedi azonosító ehhez a sorhoz.'; + $lang['strnoreportsdb'] = 'Ön még nem teremtette meg a jelentések adatbázisát. Olvassa el az INSTALL fájlt további útmutatásért!'; + $lang['strnouploads'] = 'Fájl feltöltése letiltva.'; + $lang['strimporterror'] = 'Behozatali hiba.'; + $lang['strimporterror-fileformat'] = 'Behozatali hiba: nem sikerült automatikusan megállapítani a fájl formátumát.'; + $lang['strimporterrorline'] = 'Behozatali hiba a %s. sorban.'; + $lang['strimporterrorline-badcolumnnum'] = 'Behozatali hiba a(z) %s. számú sorban: A sor nem tartalmazza a megfelelő számú sort.'; + $lang['strimporterror-uploadedfile'] = 'Behozatali hiba: A fájlt nem sikerült feltülteni a kiszolgálóra.'; + $lang['strcannotdumponwindows'] = 'Összetett tábla ömlesztése és séma nevek Windows-on nem támogatottak.'; + $lang['strinvalidserverparam'] = 'Érvénytelen kiszolgáló paraméterrel próbáltak csatlakozni. Lehet, hogy valaki betörni próbál a rendszerbe.'; + $lang['strnoserversupplied'] = 'Nincs megadva kiszolgáló!'; + $lang['strbadpgdumppath'] = 'Kiviteli hiba: Elbukott a pg_dump végrehajtása (conf/config.inc.php fájlban megadott ösvény: %s). Kérem, javítsa ki ezt a beállításban, és ismételjen.'; + $lang['strbadpgdumpallpath'] = 'Kiviteli hiba: Elbukott a pg_dumpall végrehajtása (conf/config.inc.php fájlban megadott ösvény: %s). Kérem, javítsa ki ezt a beállításban, és ismételjen.'; + $lang['strconnectionfail'] = 'Nem csatlakozhatok a szolgálóhoz.'; + + // Tables + $lang['strtable'] = 'Tábla'; + $lang['strtables'] = 'Táblák'; + $lang['strshowalltables'] = 'Minden tábla megjelenítése'; + $lang['strnotables'] = 'Nincsenek táblák.'; + $lang['strnotable'] = 'Nincs tábla.'; + $lang['strcreatetable'] = 'Táblát teremt'; + $lang['strcreatetablelike'] = 'Táblát teremt mint'; + $lang['strcreatetablelikeparent'] = 'Forrás tábla'; + $lang['strcreatelikewithdefaults'] = 'ALAPÉRTELMEZÉSEKKEL'; + $lang['strcreatelikewithconstraints'] = 'MEGSZORÍTÁSOKKAL'; + $lang['strcreatelikewithindexes'] = 'INDEXEKKEL'; + $lang['strtablename'] = 'Tábla neve'; + $lang['strtableneedsname'] = 'Meg kell adni a tábla nevét.'; + $lang['strtablelikeneedslike'] = 'Meg kell adni a tábla nevét, ahonnan tulajdonságokat lehet másolni.'; + $lang['strtableneedsfield'] = 'Legalább egy oszlopot meg kell adni.'; + $lang['strtableneedscols'] = 'A táblának érvényes számú oszlop kell.'; + $lang['strtablecreated'] = 'A tábla megteremtve.'; + $lang['strtablecreatedbad'] = 'Nem sikerült táblát teremteni.'; + $lang['strconfdroptable'] = 'Biztosan törölni kívánja „%s” táblát?'; + $lang['strtabledropped'] = 'A tábla törölve.'; + $lang['strtabledroppedbad'] = 'Nem sikerült a táblát törölni.'; + $lang['strconfemptytable'] = 'Biztosan ki akarja üríteni „%s” táblát?'; + $lang['strtableemptied'] = 'A tábla kiürítve.'; + $lang['strtableemptiedbad'] = 'Nem sikerült a táblát kiüríteni.'; + $lang['strinsertrow'] = 'Sor beszúrása'; + $lang['strrowinserted'] = 'A sor beszúrva.'; + $lang['strrowinsertedbad'] = 'Nem sikerült a sort beszúrni.'; + $lang['strnofkref'] = 'Nincs %s idegen kulcshoz illő érték.'; + $lang['strrowduplicate'] = 'Nem sikerült sort beszúrni. Dupla beszúrási kísérlet.'; + $lang['streditrow'] = 'Sor szerkesztése'; + $lang['strrowupdated'] = 'A sor időszerűsítve.'; + $lang['strrowupdatedbad'] = 'Nem sikerült a sort időszerűsíteni.'; + $lang['strdeleterow'] = 'Sor törlése'; + $lang['strconfdeleterow'] = 'Biztosan törölni kívánja ezt a sort?'; + $lang['strrowdeleted'] = 'A sor törölve.'; + $lang['strrowdeletedbad'] = 'Nem sikerült a sort törölni.'; + $lang['strinsertandrepeat'] = 'Beszúrás & Ismétlés'; + $lang['strnumcols'] = 'Oszlopok száma'; + $lang['strcolneedsname'] = 'Meg kell adnia az oszlop nevét'; + $lang['strselectallfields'] = 'Minden oszlop kijelölése'; + $lang['strselectneedscol'] = 'Ki kell választani egy oszlopot'; + $lang['strselectunary'] = 'Egyváltozós műveleteknek nem lehetnek értékei'; + $lang['strcolumnaltered'] = 'Az oszlop megváltoztatva.'; + $lang['strcolumnalteredbad'] = 'Nem sikerült az oszlopot megváltoztatni.'; + $lang['strconfdropcolumn'] = 'Biztosan törölni kívánja „%s” oszlopot „%s” táblából?'; + $lang['strcolumndropped'] = 'Az oszlop törölve.'; + $lang['strcolumndroppedbad'] = 'Nem sikerült az oszlopot törölni.'; + $lang['straddcolumn'] = 'Oszloppal bővítés'; + $lang['strcolumnadded'] = 'Oszloppal bővítve.'; + $lang['strcolumnaddedbad'] = 'Nem sikerült az oszloppal bővíteni.'; + $lang['strcascade'] = 'ZUHATAG'; + $lang['strtablealtered'] = 'A tábla megváltoztatva.'; + $lang['strtablealteredbad'] = 'Nem sikerült a táblát megváltoztatni.'; + $lang['strdataonly'] = 'Csak adatok'; + $lang['strstructureonly'] = 'Csak struktúra'; + $lang['strstructureanddata'] = 'Struktúra és adatok'; + $lang['strtabbed'] = 'Füles'; + $lang['strauto'] = 'Autó'; + $lang['strconfvacuumtable'] = 'Biztosan ki akarja takarítani „%s” táblát?'; + $lang['strconfanalyzetable'] = 'Biztosan elemezzük „%s” táblát?'; + $lang['strconfreindextable'] = 'Biztosan újra akarja indexelni „%s” táblát?'; + $lang['strconfclustertable'] = 'Biztosan fürtözni akarja „%s” táblát?'; + $lang['strestimatedrowcount'] = 'Becsült sorok száma'; + $lang['strspecifytabletoanalyze'] = 'Legalább egy elemzendő táblát meg kell adni.'; + $lang['strspecifytabletoempty'] = 'Legalább egy ürítendő táblát meg kell adni.'; + $lang['strspecifytabletodrop'] = 'Legalább egy törlendő táblát meg kell adni.'; + $lang['strspecifytabletovacuum'] = 'Legalább egy takarítandó táblát meg kell adni.'; + $lang['strspecifytabletoreindex'] = 'Legalább egy indexelendő táblát meg kell adni.'; + $lang['strspecifytabletocluster'] = 'Legalább egy fürtözendő táblát meg kell adni.'; + $lang['strnofieldsforinsert'] = 'Oszloptalan táblába nem szúrhat be sort.'; + + // Columns + $lang['strcolprop'] = 'Tábla tulajdonságai'; + $lang['strnotableprovided'] = 'Nincs tábla megadva!'; + + // Users + $lang['struser'] = 'Használó'; + $lang['strusers'] = 'Használók'; + $lang['strusername'] = 'Használó neve'; + $lang['strpassword'] = 'Jelszó'; + $lang['strsuper'] = 'Rendszergazda?'; + $lang['strcreatedb'] = 'Létrehozhat AB-t?'; + $lang['strexpires'] = 'Lejár'; + $lang['strsessiondefaults'] = 'Munkamenet alapértékei'; + $lang['strnousers'] = 'Nincsenek használók.'; + $lang['struserupdated'] = 'Használó időszerűsítve.'; + $lang['struserupdatedbad'] = 'Nem sikerült a használót időszerűsíteni.'; + $lang['strshowallusers'] = 'Minden használó megjelenítése'; + $lang['strcreateuser'] = 'Használó teremtése'; + $lang['struserneedsname'] = 'A használónak nevet kell adni.'; + $lang['strusercreated'] = 'A használó megteremtve.'; + $lang['strusercreatedbad'] = 'Nem sikerült a használót megteremteni.'; + $lang['strconfdropuser'] = 'Biztosan törölni akarja „%s” használót?'; + $lang['struserdropped'] = 'A használó törölve.'; + $lang['struserdroppedbad'] = 'Nem sikerült a használót törölni.'; + $lang['straccount'] = 'Számla'; + $lang['strchangepassword'] = 'Jelszó megváltoztatása'; + $lang['strpasswordchanged'] = 'A jelszó megváltoztatva.'; + $lang['strpasswordchangedbad'] = 'Nem sikerült a jelszót megváltoztatni.'; + $lang['strpasswordshort'] = 'A jelszó túl rövid.'; + $lang['strpasswordconfirm'] = 'A jelszó nem egyezik a megerősítéssel.'; + + // Groups + $lang['strgroup'] = 'Csoport'; + $lang['strgroups'] = 'Csoportok'; + $lang['strshowallgroups'] = 'Minden csoportot megjelenít'; + $lang['strnogroup'] = 'Nincs csoport.'; + $lang['strnogroups'] = 'Nincsenek csoportok.'; + $lang['strcreategroup'] = 'Csoportot teremt'; + $lang['strgroupneedsname'] = 'A csoportnak nevet kell adni.'; + $lang['strgroupcreated'] = 'A csoport megteremtve.'; + $lang['strgroupcreatedbad'] = 'Nem sikerült a csoportot megteremteni.'; + $lang['strconfdropgroup'] = 'Biztosan törölni kívánja „%s” csoportot?'; + $lang['strgroupdropped'] = 'A csoport törölve.'; + $lang['strgroupdroppedbad'] = 'Nem sikerült a csoportot törölni.'; + $lang['strmembers'] = 'Tagok'; + $lang['strmemberof'] = 'Tagja '; + $lang['stradminmembers'] = 'Admin tagok'; + $lang['straddmember'] = 'Tagot vesz fel'; + $lang['strmemberadded'] = 'Tag felvéve.'; + $lang['strmemberaddedbad'] = 'Nem sikerült tagot felvenni.'; + $lang['strdropmember'] = 'Tag kicsapása'; + $lang['strconfdropmember'] = 'Biztosan ki akarja csapni „%s” tagot „%s” csoportból?'; + $lang['strmemberdropped'] = 'A tag kicsapva.'; + $lang['strmemberdroppedbad'] = 'Nem sikerült a tagot kicsapni.'; + + // Roles + $lang['strrole'] = 'Szerep'; + $lang['strroles'] = 'Szerepek'; + $lang['strshowallroles'] = 'Minden szerepet megjelenít'; + $lang['strnoroles'] = 'Nincs szerep.'; + $lang['strinheritsprivs'] = 'Jogosultságokat örököl?'; + $lang['strcreaterole'] = 'Szerepet teremt'; + $lang['strcancreaterole'] = 'Teremthet szerepet?'; + $lang['strrolecreated'] = 'Szerep megteremtve.'; + $lang['strrolecreatedbad'] = 'Nem sikerült szerepet teremteni.'; + $lang['strrolealtered'] = 'Szerep megváltoztatva.'; + $lang['strrolealteredbad'] = 'Nem sikerült szerepet változtatni.'; + $lang['strcanlogin'] = 'Beléphet?'; + $lang['strconnlimit'] = 'Kapcsolat korlátja'; + $lang['strdroprole'] = 'Szerepet töröl'; + $lang['strconfdroprole'] = 'Biztosan töröljük „%s” szerepet?'; + $lang['strroledropped'] = 'Szerep törölve.'; + $lang['strroledroppedbad'] = 'Nem sikerült szerepet törölni.'; + $lang['strnolimit'] = 'Nincs korlát'; + $lang['strnever'] = 'Soha'; + $lang['strroleneedsname'] = 'Nevet kell adni a szerepnek.'; + + // Privileges + $lang['strprivilege'] = 'Jogosultság'; + $lang['strprivileges'] = 'Jogosultságok'; + $lang['strnoprivileges'] = 'Ez objektum alap-jogosultságokkal rendelkezik.'; + $lang['strgrant'] = 'Feljogosít'; + $lang['strrevoke'] = 'Jogosultságot megvon'; + $lang['strgranted'] = 'A jogosultságok megváltoztatva.'; + $lang['strgrantfailed'] = 'Nem sikerült a jogosultságokat megváltoztatni.'; + $lang['strgrantbad'] = 'Legalább egy felhasználót és jogosultságot ki kell választani.'; + $lang['strgrantor'] = 'Jogosító'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'Adatbázis'; + $lang['strdatabases'] = 'Adatbázisok'; + $lang['strshowalldatabases'] = 'Minden adatbázist megjelenít'; + $lang['strnodatabases'] = 'Nincs adatbázis.'; + $lang['strcreatedatabase'] = 'Adatbázist teremt'; + $lang['strdatabasename'] = 'Adatbázisnév'; + $lang['strdatabaseneedsname'] = 'Meg kell adni az adatbázis nevét.'; + $lang['strdatabasecreated'] = 'Az adatbázis megteremtve.'; + $lang['strdatabasecreatedbad'] = 'Nem sikerült megteremteni az adatbázist.'; + $lang['strconfdropdatabase'] = 'Biztosan törölni akarja „%s” adatbázist?'; + $lang['strdatabasedropped'] = 'Az adatbázis törölve.'; + $lang['strdatabasedroppedbad'] = 'Nem sikerült törölni az adatbázist.'; + $lang['strentersql'] = 'Írja be a végrehajtandó SQL-kifejezéseket ide:'; + $lang['strsqlexecuted'] = 'Az SQL-kifejezések végrehajtva.'; + $lang['strvacuumgood'] = 'A takarítás kész.'; + $lang['strvacuumbad'] = 'Nem sikerült kitakarítani.'; + $lang['stranalyzegood'] = 'Az elemzés kész.'; + $lang['stranalyzebad'] = 'Nem sikerült kielemezni.'; + $lang['strreindexgood'] = 'Újraindexelés kész.'; + $lang['strreindexbad'] = 'Nem sikerült az újraindexelés.'; + $lang['strfull'] = 'Teljes'; + $lang['strfreeze'] = 'Befagyaszt'; + $lang['strforce'] = 'Kényszerít'; + $lang['strsignalsent'] = 'Jelzés elküldve.'; + $lang['strsignalsentbad'] = 'Nem sikerült jelzést küldeni.'; + $lang['strallobjects'] = 'Minden objektum'; + $lang['strdatabasealtered'] = 'Adatbázis megváltoztatva.'; + $lang['strdatabasealteredbad'] = 'Nem sikerült az adatbázist megváltoztatni.'; + $lang['strspecifydatabasetodrop'] = 'Meg kell adni a törlendő adatbázist'; + $lang['strtemplatedb'] = 'Sablon'; + $lang['strconfanalyzedatabase'] = 'Biztosan elemezni akarja „%s” adatbázis minden tábláját?'; + $lang['strconfvacuumdatabase'] = 'Biztosan takarítani akarja „%s” adatbázis minden tábláját?'; + $lang['strconfreindexdatabase'] = 'Biztosan indexelni akarja „%s” adatbázis minden tábláját?'; + $lang['strconfclusterdatabase'] = 'Biztosan fürtözni akarja „%s” adatbázis minden tábláját?'; + + // Views + $lang['strview'] = 'Nézet'; + $lang['strviews'] = 'Nézetek'; + $lang['strshowallviews'] = 'Minden nézetet megjelenít'; + $lang['strnoview'] = 'Nincs nézet.'; + $lang['strnoviews'] = 'Nincsenek nézetek.'; + $lang['strcreateview'] = 'Nézetet teremt'; + $lang['strviewname'] = 'Nézetnév'; + $lang['strviewneedsname'] = 'Meg kell adni a nézetnevet.'; + $lang['strviewneedsdef'] = 'Meg kell adni a nézet definícióját.'; + $lang['strviewneedsfields'] = 'Meg kell adnia a oszlopokat, amiket ki akar jelölni a nézetben.'; + $lang['strviewcreated'] = 'A nézet megteremtve.'; + $lang['strviewcreatedbad'] = 'Nem sikerült megteremteni a nézetet.'; + $lang['strconfdropview'] = 'Biztosan törölni kívánja „%s” nézetet?'; + $lang['strviewdropped'] = 'A nézet törölve.'; + $lang['strviewdroppedbad'] = 'Nem sikerült törölni a nézetet.'; + $lang['strviewupdated'] = 'A nézet időszerűsítve.'; + $lang['strviewupdatedbad'] = 'Nem sikerült időszerűsíteni a nézetet.'; + $lang['strviewlink'] = 'Hivatkozások'; + $lang['strviewconditions'] = 'További feltételek'; + $lang['strcreateviewwiz'] = 'Nézetet teremt varázslóval'; + $lang['strrenamedupfields'] = 'Másolt mezőket nevez át'; + $lang['strdropdupfields'] = 'Másolt mezőket töröl'; + $lang['strerrordupfields'] = 'Hiba a másolt mezőkben'; + $lang['strviewaltered'] = 'Nézet megváltoztatva.'; + $lang['strviewalteredbad'] = 'Nem sikerült megváltoztatni a nézetet.'; + $lang['strspecifyviewtodrop'] = 'Meg kell adni a törlendő nézetet'; + + // Sequences + $lang['strsequence'] = 'Sorozat'; + $lang['strsequences'] = 'Sorozatok'; + $lang['strshowallsequences'] = 'Minden sorozatot megjelenít'; + $lang['strnosequence'] = 'Nincs sorozat.'; + $lang['strnosequences'] = 'Nincsenek sorozatok.'; + $lang['strcreatesequence'] = 'Sorozatot teremt'; + $lang['strlastvalue'] = 'Utolsó érték'; + $lang['strincrementby'] = 'Növekmény'; + $lang['strstartvalue'] = 'Kezdő érték'; + $lang['strrestartvalue'] = 'Újrakezdő érték'; + $lang['strmaxvalue'] = 'Felső korlát'; + $lang['strminvalue'] = 'Alsó korlát'; + $lang['strcachevalue'] = 'Gyorstár értéke'; + $lang['strlogcount'] = 'Számláló'; + $lang['strcancycle'] = 'Körbejárhat?'; + $lang['striscalled'] = 'Növekedjék mielőtt visszatér a következő értékkel (is_called)?'; + $lang['strsequenceneedsname'] = 'Meg kell adni a sorozatnevet.'; + $lang['strsequencecreated'] = 'A sorozat megteremtve.'; + $lang['strsequencecreatedbad'] = 'Nem sikerült megteremteni a sorozatot.'; + $lang['strconfdropsequence'] = 'Biztosan törölni kívánja „%s” sorozatot?'; + $lang['strsequencedropped'] = 'A sorozat törölve.'; + $lang['strsequencedroppedbad'] = 'Nem sikerült törölni a sorozatot.'; + $lang['strsequencerestart'] = 'Sorozat újrakezdve.'; + $lang['strsequencerestartbad'] = 'Nem sikerült újrakezdeni a sorozatot.'; + $lang['strsequencereset'] = 'Sorozat nullázása.'; + $lang['strsequenceresetbad'] = 'Nem sikerült nullázni a sorozatot.'; + $lang['strsequencealtered'] = 'Sorozat megváltoztatva.'; + $lang['strsequencealteredbad'] = 'Nem sikerült megváltoztatni a sorozatot.'; + $lang['strsetval'] = 'Értéket ad'; + $lang['strsequencesetval'] = 'Érték megadva.'; + $lang['strsequencesetvalbad'] = 'Nem sikerült az értékadás.'; + $lang['strnextval'] = 'Növekmény'; + $lang['strsequencenextval'] = 'Sorozat megnövelve.'; + $lang['strsequencenextvalbad'] = 'Nem sikerült megnövelni a sorozatot.'; + $lang['strspecifysequencetodrop'] = 'Meg kell adnia a törlendő sorozatot'; + + // Indexes + $lang['strindex'] = 'Index'; + $lang['strindexes'] = 'Indexek'; + $lang['strindexname'] = 'Indexnév'; + $lang['strshowallindexes'] = 'Minden indexet megjelenít'; + $lang['strnoindex'] = 'Nincs index.'; + $lang['strnoindexes'] = 'Nincsenek indexek.'; + $lang['strcreateindex'] = 'Indexet teremt'; + $lang['strtabname'] = 'Táblanév'; + $lang['strcolumnname'] = 'Oszlopnév'; + $lang['strindexneedsname'] = 'Meg kell adni az index nevét.'; + $lang['strindexneedscols'] = 'Meg kell adni az oszlopok (érvényes) számát.'; + $lang['strindexcreated'] = 'Az index megteremtve'; + $lang['strindexcreatedbad'] = 'Nem sikerült megteremteni az indexet.'; + $lang['strconfdropindex'] = 'Biztosan törölni kívánja „%s” indexet?'; + $lang['strindexdropped'] = 'Az index törölve.'; + $lang['strindexdroppedbad'] = 'Nem sikerült törölni az indexet.'; + $lang['strkeyname'] = 'Kulcsnév'; + $lang['struniquekey'] = 'Egyedi kulcs'; + $lang['strprimarykey'] = 'Elsődleges kulcs'; + $lang['strindextype'] = 'Indextípus'; + $lang['strtablecolumnlist'] = 'A tábla oszlopai'; + $lang['strindexcolumnlist'] = 'Az index oszlopai'; + $lang['strclusteredgood'] = 'Fürtözés kész.'; + $lang['strclusteredbad'] = 'Nem sikerült fürtözni.'; + $lang['strconcurrently'] = 'Egyszerre'; + $lang['strnoclusteravailable'] = 'A tábla nincs indexre fürtözve.'; + + // Rules + $lang['strrules'] = 'Szabályok'; + $lang['strrule'] = 'Szabály'; + $lang['strshowallrules'] = 'Minden szabályt megjelenít'; + $lang['strnorule'] = 'Nincs szabály.'; + $lang['strnorules'] = 'Nincsenek szabályok.'; + $lang['strcreaterule'] = 'Szabályt teremt'; + $lang['strrulename'] = 'Szabálynév'; + $lang['strruleneedsname'] = 'Meg kell adni a szabálynevet.'; + $lang['strrulecreated'] = 'A szabály megteremtve.'; + $lang['strrulecreatedbad'] = 'Nem sikerült megteremteni a szabályt.'; + $lang['strconfdroprule'] = 'Biztosan törölni kívánja „%s” szabályt „%s” táblában?'; + $lang['strruledropped'] = 'A szabály törölve.'; + $lang['strruledroppedbad'] = 'Nem sikerült törölni a szabályt.'; + + // Constraints + $lang['strconstraint'] = 'Megszorítás'; + $lang['strconstraints'] = 'Megszorítások'; + $lang['strshowallconstraints'] = 'Minden megszorítást megjelenít'; + $lang['strnoconstraints'] = 'Nincsenek megszorítások.'; + $lang['strcreateconstraint'] = 'Megszorítást teremt'; + $lang['strconstraintcreated'] = 'A megszorítás megteremtve.'; + $lang['strconstraintcreatedbad'] = 'Nem sikerült megteremteni a megszorítást.'; + $lang['strconfdropconstraint'] = 'Biztosan törölni kívánja „%s” megszorítást „%s” táblában?'; + $lang['strconstraintdropped'] = 'A megszorítás törölve.'; + $lang['strconstraintdroppedbad'] = 'Nem sikerült törölni a megszorítást.'; + $lang['straddcheck'] = 'Ellenőrzést ad hozzá'; + $lang['strcheckneedsdefinition'] = 'Meg kell adni az ellenőrzés definícióját.'; + $lang['strcheckadded'] = 'Az ellenőrzés hozzáadva.'; + $lang['strcheckaddedbad'] = 'Nem sikerült hozzáadni az ellenőrzést.'; + $lang['straddpk'] = 'Elsődleges kulcsot ad hozzá'; + $lang['strpkneedscols'] = 'Legalább egy oszlopot meg kell adni elsődleges kulcsnak.'; + $lang['strpkadded'] = 'Elsődleges kulcs hozzáadva.'; + $lang['strpkaddedbad'] = 'Nem sikerült hozzáadni az elsődleges kulcsot.'; + $lang['stradduniq'] = 'Egyedi kulcsot ad hozzá'; + $lang['struniqneedscols'] = 'Legalább egy oszlopot meg kell adni egyedi kulcsnak.'; + $lang['struniqadded'] = 'Az egyedi kulcs hozzáadva.'; + $lang['struniqaddedbad'] = 'Nem sikerült hozzáadni az egyedi kulcsot.'; + $lang['straddfk'] = 'Külső kulcsot ad hozzá'; + $lang['strfkneedscols'] = 'Legalább egy oszlopot meg kell adni külső kulcsnak.'; + $lang['strfkneedstarget'] = 'Meg kell adni a céltáblát a külső kulcsnak.'; + $lang['strfkadded'] = 'A külső kulcs hozzáadva.'; + $lang['strfkaddedbad'] = 'Nem sikerült hozzáadni a külső kulcsot.'; + $lang['strfktarget'] = 'Céltábla'; + $lang['strfkcolumnlist'] = 'Kulcsoszlopok'; + $lang['strondelete'] = 'TÖRLÉSKOR'; + $lang['stronupdate'] = 'VÁLTOZTATÁSKOR'; + + // Functions + $lang['strfunction'] = 'Függvény'; + $lang['strfunctions'] = 'Függvények'; + $lang['strshowallfunctions'] = 'Minden függvényt megjelenít'; + $lang['strnofunction'] = 'Nincs függvény.'; + $lang['strnofunctions'] = 'Nincsenek függvények.'; + $lang['strcreateplfunction'] = 'SQL/PL függvényt teremt'; + $lang['strcreateinternalfunction'] = 'Belső függvényt teremt'; + $lang['strcreatecfunction'] = 'C függvényt teremt'; + $lang['strfunctionname'] = 'Függvénynév'; + $lang['strreturns'] = 'Visszatérő érték'; + $lang['strproglanguage'] = 'Programnyelv'; + $lang['strfunctionneedsname'] = 'Meg kell adni a függvény nevét.'; + $lang['strfunctionneedsdef'] = 'Meg kell adni a függvény definícióját.'; + $lang['strfunctioncreated'] = 'A függvény megteremtve.'; + $lang['strfunctioncreatedbad'] = 'Nem sikerült megteremteni a függvényt.'; + $lang['strconfdropfunction'] = 'Biztosan törölni kívánja „%s” függvényt?'; + $lang['strfunctiondropped'] = 'A függvény törölve.'; + $lang['strfunctiondroppedbad'] = 'Nem sikerült törölni a függvényt.'; + $lang['strfunctionupdated'] = 'A függvény időszerűsítve.'; + $lang['strfunctionupdatedbad'] = 'Nem sikerült a függvényt időszerűsíteni.'; + $lang['strobjectfile'] = 'Célkód fájl'; + $lang['strlinksymbol'] = 'Szerkesztő szimbólum'; + $lang['strarguments'] = 'Argumentumok'; + $lang['strargmode'] = 'Mód'; + $lang['strargtype'] = 'Típus'; + $lang['strargadd'] = 'Más argumentumot ad hozzá'; + $lang['strargremove'] = 'Argumentumot töröl'; + $lang['strargnoargs'] = 'E függvénynek nincsenek argumentumai.'; + $lang['strargenableargs'] = 'E függvénynek átadott argumentumok engedélyezése.'; + $lang['strargnorowabove'] = 'Egy sornak kell lennie e fölött.'; + $lang['strargnorowbelow'] = 'Egy sornak kell lennie ez alatt.'; + $lang['strargraise'] = 'Mozgás fel.'; + $lang['strarglower'] = 'Mozgás le.'; + $lang['strargremoveconfirm'] = 'Biztosan töröljük ez argumentumot? Ez VISSZAVONHATATLAN.'; + $lang['strfunctioncosting'] = 'Függvény költségei'; + $lang['strresultrows'] = 'Eredmény sorok'; + $lang['strexecutioncost'] = 'Végrehajtás költsége'; + $lang['strspecifyfunctiontodrop'] = 'Legalább egy törlendő függvényt meg kell adni'; + + // Triggers + $lang['strtrigger'] = 'Ravasz'; + $lang['strtriggers'] = 'Ravaszok'; + $lang['strshowalltriggers'] = 'Minden ravaszt megjelenít'; + $lang['strnotrigger'] = 'Nincs ravasz.'; + $lang['strnotriggers'] = 'Nincsenek ravaszok.'; + $lang['strcreatetrigger'] = 'Ravaszt teremt'; + $lang['strtriggerneedsname'] = 'Meg kell adni a ravasz nevét.'; + $lang['strtriggerneedsfunc'] = 'Meg kell adni egy függvény nevét a ravaszhoz.'; + $lang['strtriggercreated'] = 'Ravasz megteremtve.'; + $lang['strtriggercreatedbad'] = 'Nem sikerült megteremteni a ravaszt.'; + $lang['strconfdroptrigger'] = 'Biztosan törölni kívánja „%s” ravaszt „%s” táblában?'; + $lang['strconfenabletrigger'] = 'Biztosan engedélyezzük „%s” ravaszt „%s” elemre?'; + $lang['strconfdisabletrigger'] = 'Biztosan letiltsuk „%s” ravaszt „%s” elemre?'; + $lang['strtriggerdropped'] = 'Ravasz törölve.'; + $lang['strtriggerdroppedbad'] = 'Nem sikerült törölni a ravaszt.'; + $lang['strtriggerenabled'] = 'Ravasz engedélyezve.'; + $lang['strtriggerenabledbad'] = 'Nem sikerült a ravaszt engedélyezni.'; + $lang['strtriggerdisabled'] = 'Ravasz letiltva.'; + $lang['strtriggerdisabledbad'] = 'Nem sikerült a ravaszt letiltani.'; + $lang['strtriggeraltered'] = 'Ravasz megváltoztatva.'; + $lang['strtriggeralteredbad'] = 'Nem sikerült megváltoztatni a triggert.'; + $lang['strforeach'] = 'Mindegyik'; + + // Types + $lang['strtype'] = 'Típus'; + $lang['strtypes'] = 'Típusok'; + $lang['strshowalltypes'] = 'Minden típust megjelenít'; + $lang['strnotype'] = 'Nincs típus.'; + $lang['strnotypes'] = 'Nincsenek típusok.'; + $lang['strcreatetype'] = 'Típust teremt'; + $lang['strcreatecomptype'] = 'Összetett típust teremt'; + $lang['strcreateenumtype'] = 'Felsorolás típust teremt'; + $lang['strtypeneedsfield'] = 'Legalább egy oszlopot meg kell adnia.'; + $lang['strtypeneedsvalue'] = 'Legalább egy értéket meg kell adni.'; + $lang['strtypeneedscols'] = 'Érvényes oszlopszámot kell megadnia.'; + $lang['strtypeneedsvals'] = 'Érvényes értékszámot kell megadni.'; + $lang['strinputfn'] = 'Beviteli függvény'; + $lang['stroutputfn'] = 'Kiviteli függvény'; + $lang['strpassbyval'] = 'Érték szerinti átadás?'; + $lang['stralignment'] = 'Igazít'; + $lang['strelement'] = 'Elem'; + $lang['strdelimiter'] = 'Határoló'; + $lang['strstorage'] = 'Tár'; + $lang['strfield'] = 'Oszlop'; + $lang['strnumfields'] = 'Oszlopok száma'; + $lang['strnumvalues'] = 'Értékek száma'; + $lang['strtypeneedsname'] = 'Típusnevet kell megadni.'; + $lang['strtypeneedslen'] = 'Meg kell adni a típus hosszát.'; + $lang['strtypecreated'] = 'Típus megteremtve'; + $lang['strtypecreatedbad'] = 'Nem sikerült megteremteni a típust.'; + $lang['strconfdroptype'] = 'Biztosan törölni kívánja „%s” típust?'; + $lang['strtypedropped'] = 'Típus törölve.'; + $lang['strtypedroppedbad'] = 'Nem sikerült törölni a típust.'; + $lang['strflavor'] = 'Fajta'; + $lang['strbasetype'] = 'Alap'; + $lang['strcompositetype'] = 'Összetett'; + $lang['strpseudotype'] = 'Ál'; + $lang['strenum'] = 'Felsorolás'; + $lang['strenumvalues'] = 'Felsorolás értékei'; + + // Schemas + $lang['strschema'] = 'Séma'; + $lang['strschemas'] = 'Sémák'; + $lang['strshowallschemas'] = 'Minden sémát megjelenít'; + $lang['strnoschema'] = 'Nincs séma.'; + $lang['strnoschemas'] = 'Nincsenek sémák.'; + $lang['strcreateschema'] = 'Sémát teremt'; + $lang['strschemaname'] = 'Sémanév'; + $lang['strschemaneedsname'] = 'Meg kell adni a sémanevet.'; + $lang['strschemacreated'] = 'A séma megteremtve'; + $lang['strschemacreatedbad'] = 'Nem sikerült a sémát megteremteni.'; + $lang['strconfdropschema'] = 'Biztosan törölni kívánja „%s” sémát?'; + $lang['strschemadropped'] = 'A séma törölve.'; + $lang['strschemadroppedbad'] = 'Nem sikerült a sémát törölni.'; + $lang['strschemaaltered'] = 'Séma megváltoztatva.'; + $lang['strschemaalteredbad'] = 'Nem sikerült a sémát megváltoztatni.'; + $lang['strsearchpath'] = 'Séma keresési útvonala'; + $lang['strspecifyschematodrop'] = 'Meg kell adni a törlendő sémát'; + + // Reports + $lang['strreport'] = 'Jelentés'; + $lang['strreports'] = 'Jelentések'; + $lang['strshowallreports'] = 'Minden jelentést megjelenít'; + $lang['strnoreports'] = 'Nincsenek jelentések.'; + $lang['strcreatereport'] = 'Jelentést teremt'; + $lang['strreportdropped'] = 'A jelentés törölve.'; + $lang['strreportdroppedbad'] = 'Nem sikerült törölni a jelentést.'; + $lang['strconfdropreport'] = 'Biztosan törölni kívánja „%s” jelentést?'; + $lang['strreportneedsname'] = 'Meg kell adni a jelentésnevet.'; + $lang['strreportneedsdef'] = 'SQL kifejezést kell hozzáadni a jelentéshez.'; + $lang['strreportcreated'] = 'A jelentés megteremtve.'; + $lang['strreportcreatedbad'] = 'Nem sikerült megteremteni a jelentést.'; + + // Domains + $lang['strdomain'] = 'Tartomány'; + $lang['strdomains'] = 'Tartományok'; + $lang['strshowalldomains'] = 'Minden tartományt megjelenít'; + $lang['strnodomains'] = 'Nincsnek tartományok.'; + $lang['strcreatedomain'] = 'Tartományt teremt'; + $lang['strdomaindropped'] = 'A tartomány törölve.'; + $lang['strdomaindroppedbad'] = 'Nem sikerült törölni a tartományt.'; + $lang['strconfdropdomain'] = 'Biztosan törölni kívánja „%s” tartományt?'; + $lang['strdomainneedsname'] = 'Meg kell adni a tartománynevet.'; + $lang['strdomaincreated'] = 'A tartomány megteremtve.'; + $lang['strdomaincreatedbad'] = 'Nem sikerült megteremteni a tartományt.'; + $lang['strdomainaltered'] = 'A tartomány megváltoztatva.'; + $lang['strdomainalteredbad'] = 'Nem sikerült megváltoztatni a tartományt.'; + + // Operators + $lang['stroperator'] = 'Operátor'; + $lang['stroperators'] = 'Operátorok'; + $lang['strshowalloperators'] = 'Minden operátort megjelenít'; + $lang['strnooperator'] = 'Nincs operátor.'; + $lang['strnooperators'] = 'Nincsenek operátorok.'; + $lang['strcreateoperator'] = 'Operátort teremt'; + $lang['strleftarg'] = 'Bal arg típus'; + $lang['strrightarg'] = 'Jobb arg típus'; + $lang['strcommutator'] = 'Kommutátor'; + $lang['strnegator'] = 'Tagadó'; + $lang['strrestrict'] = 'Megszorítás'; + $lang['strjoin'] = 'Összekapcsolás'; + $lang['strhashes'] = 'Hasít'; + $lang['strmerges'] = 'Összefésül'; + $lang['strleftsort'] = 'Balrendezés'; + $lang['strrightsort'] = 'Jobbrendezés'; + $lang['strlessthan'] = 'Kisebb mint'; + $lang['strgreaterthan'] = 'Nagyobb mint'; + $lang['stroperatorneedsname'] = 'Meg kell adni az operátornevet.'; + $lang['stroperatorcreated'] = 'Az operátor megteremtve'; + $lang['stroperatorcreatedbad'] = 'Nem sikerült megteremteni az operátort.'; + $lang['strconfdropoperator'] = 'Biztosan törölni kívánja „%s” operátort?'; + $lang['stroperatordropped'] = 'Az operátor törölve.'; + $lang['stroperatordroppedbad'] = 'Nem sikerült törölni az operátort.'; + + // Casts + $lang['strcasts'] = 'Kasztok'; + $lang['strnocasts'] = 'Nincsenek kasztok.'; + $lang['strsourcetype'] = 'Forrástípus'; + $lang['strtargettype'] = 'Céltípus'; + $lang['strimplicit'] = 'Implicit'; + $lang['strinassignment'] = 'Értékadásban'; + $lang['strbinarycompat'] = '(Binárisan kompatibilis)'; + + // Conversions + $lang['strconversions'] = 'Átalakítások'; + $lang['strnoconversions'] = 'Nincsenek átalakítások.'; + $lang['strsourceencoding'] = 'Forráskódolás'; + $lang['strtargetencoding'] = 'Célkódolás'; + + // Languages + $lang['strlanguages'] = 'Nyelvek'; + $lang['strnolanguages'] = 'Nincsenek nyelvek.'; + $lang['strtrusted'] = 'Hiteles'; + + // Info + $lang['strnoinfo'] = 'Nincs elérhető információ.'; + $lang['strreferringtables'] = 'Kapcsolódó táblák'; + $lang['strparenttables'] = 'Szülőtáblák'; + $lang['strchildtables'] = 'Gyerektáblák'; + + // Aggregates + $lang['straggregate'] = 'Aggregálás'; + $lang['straggregates'] = 'Aggregálások'; + $lang['strnoaggregates'] = 'Nincsenek aggregálások.'; + $lang['stralltypes'] = '(Minden típus)'; + $lang['strcreateaggregate'] = 'Aggregálást teremt'; + $lang['straggrbasetype'] = 'Bemenő adattípus'; + $lang['straggrsfunc'] = 'Állapotátmeneti függvény'; + $lang['straggrstype'] = 'Állapotérték adattípusa'; + $lang['straggrffunc'] = 'Végső függvény'; + $lang['straggrinitcond'] = 'Kezdő feltétel'; + $lang['straggrsortop'] = 'Rendező művelet'; + $lang['strconfdropaggregate'] = 'Biztosan töröljük „%s” aggregálást?'; + $lang['straggregatedropped'] = 'Aggregálás törölve.'; + $lang['straggregatedroppedbad'] = 'Nem sikerült törölni az aggregálást.'; + $lang['straggraltered'] = 'Aggregálás megváltoztatva.'; + $lang['straggralteredbad'] = 'Nem sikerült az aggregálást megváltoztatni.'; + $lang['straggrneedsname'] = 'Meg kell adni az aggregálás nevét.'; + $lang['straggrneedsbasetype'] = 'Meg kell adni az aggregálás bemenő adattípusát.'; + $lang['straggrneedssfunc'] = 'Meg kell adni az aggregálás állapotátmeneti függvényének nevét.'; + $lang['straggrneedsstype'] = 'Meg kell adni az aggregálás állapotértékének adattípusát.'; + $lang['straggrcreated'] = 'Aggregálás megteremtve.'; + $lang['straggrcreatedbad'] = 'Nem sikerült megteremteni az aggregálást.'; + $lang['straggrshowall'] = 'Minden aggregálás megjelenítése'; + + // Operator Classes + $lang['stropclasses'] = 'Operátor-osztályok'; + $lang['strnoopclasses'] = 'Nincsenek operátor-osztályok.'; + $lang['straccessmethod'] = 'Hozzáférés módja'; + + // Stats and performance + $lang['strrowperf'] = 'Sorteljesítmény'; + $lang['strioperf'] = 'I/O-teljesítmény'; + $lang['stridxrowperf'] = 'Indexsor-teljesítmény'; + $lang['stridxioperf'] = 'Index-I/O-teljesítmény'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Szekvenciális'; + $lang['strscan'] = 'Keresés'; + $lang['strread'] = 'Olvasás'; + $lang['strfetch'] = 'Lehívás'; + $lang['strheap'] = 'Kupac'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST Index'; + $lang['strcache'] = 'Gyorstár'; + $lang['strdisk'] = 'Lemez'; + $lang['strrows2'] = 'Sorok'; + + // Tablespaces + $lang['strtablespace'] = 'Táblahely'; + $lang['strtablespaces'] = 'Táblahelyek'; + $lang['strshowalltablespaces'] = 'Minden táblahelyet megjelenít'; + $lang['strnotablespaces'] = 'Nincsenek táblahelyek.'; + $lang['strcreatetablespace'] = 'Táblahelyet teremt'; + $lang['strlocation'] = 'Hely'; + $lang['strtablespaceneedsname'] = 'Nevet kell adnia a táblahelynek.'; + $lang['strtablespaceneedsloc'] = 'Meg kell adnia egy mappát, ahol a táblahelyet teremti.'; + $lang['strtablespacecreated'] = 'Táblahely teremtve.'; + $lang['strtablespacecreatedbad'] = 'Nem sikerült táblahelyet teremteni.'; + $lang['strconfdroptablespace'] = 'Biztosan ki akarja dobni „%s” táblahelyet?'; + $lang['strtablespacedropped'] = 'Táblahely kidobva.'; + $lang['strtablespacedroppedbad'] = 'Nem sikerült kidobni a táblahelyet.'; + $lang['strtablespacealtered'] = 'Táblahely megváltoztatva.'; + $lang['strtablespacealteredbad'] = 'Nem sikerült megváltoztatni a táblahelyet.'; + + // Slony clusters + $lang['strcluster'] = 'Fürt'; + $lang['strnoclusters'] = 'Nincs fürt.'; + $lang['strconfdropcluster'] = 'Biztosan töröljük „%s” fürtöt?'; + $lang['strclusterdropped'] = 'Fürt törölve.'; + $lang['strclusterdroppedbad'] = 'Nem sikerült törölni a fürtöt.'; + $lang['strinitcluster'] = 'Fürtöt készít'; + $lang['strclustercreated'] = 'Fürt kész.'; + $lang['strclustercreatedbad'] = 'Nem sikerült fürtöt készíteni.'; + $lang['strclusterneedsname'] = 'Nevet kell adnia a fürtnek.'; + $lang['strclusterneedsnodeid'] = 'Azonosítót kell adnia a helyi csomópontnak.'; + + // Slony nodes + $lang['strnodes'] = 'Csomópontok'; + $lang['strnonodes'] = 'Nincs csomópont.'; + $lang['strcreatenode'] = 'Csomópontot teremt'; + $lang['strid'] = 'Az'; + $lang['stractive'] = 'Aktív'; + $lang['strnodecreated'] = 'Csomópont megteremtve.'; + $lang['strnodecreatedbad'] = 'Nem sikerült csomópontot teremteni.'; + $lang['strconfdropnode'] = 'Biztosan el akarja dobni „%s” csomópontot?'; + $lang['strnodedropped'] = 'Csomópont eldobva.'; + $lang['strnodedroppedbad'] = 'Nem sikerült eldobni a csomópontot.'; + $lang['strfailover'] = 'Áthidal'; + $lang['strnodefailedover'] = 'Végponti hiba áthidalva.'; + $lang['strnodefailedoverbad'] = 'Nem sikerült áthidalni a végpont hibáját.'; + $lang['strstatus'] = 'Állapot'; + $lang['strhealthy'] = 'Ép'; + $lang['stroutofsync'] = 'Lemaradás'; + $lang['strunknown'] = 'Ismeretlen'; + + // Slony paths + $lang['strpaths'] = 'Ösvények'; + $lang['strnopaths'] = 'Nincs ösvény.'; + $lang['strcreatepath'] = 'Ösvényt teremt'; + $lang['strnodename'] = 'Csomópont neve'; + $lang['strnodeid'] = 'Csomópont-azonosító'; + $lang['strconninfo'] = 'Csatlakozás tájékoztató'; + $lang['strconnretry'] = 'Másodpercek a csatlakozás ismétléséig'; + $lang['strpathneedsconninfo'] = 'Meg kell adnia a kapcsolati szöveget az ösvényhez.'; + $lang['strpathneedsconnretry'] = 'Meg kell adnia a csatlakozás ismétléséig történő várakozás idejét másodpercekben.'; + $lang['strpathcreated'] = 'Ösvény megteremtve.'; + $lang['strpathcreatedbad'] = 'Nem sikerült ösvényt teremteni.'; + $lang['strconfdroppath'] = 'Biztosan el akarja dobni „%s” ösvényt?'; + $lang['strpathdropped'] = 'Ösvény eldobva.'; + $lang['strpathdroppedbad'] = 'Nem sikerült az ösvényt eldobni.'; + + // Slony listens + $lang['strlistens'] = 'Figyelők'; + $lang['strnolistens'] = 'Nincs figyelő.'; + $lang['strcreatelisten'] = 'Figyelőt teremt'; + $lang['strlistencreated'] = 'Figyelő megteremtve.'; + $lang['strlistencreatedbad'] = 'Nem sikerült figyelőt teremteni.'; + $lang['strconfdroplisten'] = 'Biztosan törölni akarja „%s” figyelőt?'; + $lang['strlistendropped'] = 'Figyelő törölve.'; + $lang['strlistendroppedbad'] = 'Nem sikerült törölni a figyelőt.'; + + // Slony replication sets + $lang['strrepsets'] = 'Másodlatok'; + $lang['strnorepsets'] = 'Nincs másodlat.'; + $lang['strcreaterepset'] = 'Másodlatot teremt'; + $lang['strrepsetcreated'] = 'Másodlat megteremtve.'; + $lang['strrepsetcreatedbad'] = 'Nem sikerült másodlatot teremteni.'; + $lang['strconfdroprepset'] = 'Biztosan törölni akarja „%s” másodlatot?'; + $lang['strrepsetdropped'] = 'Másodlat törölve.'; + $lang['strrepsetdroppedbad'] = 'Nem sikerült törölni a másodlatot.'; + $lang['strmerge'] = 'Összefésül'; + $lang['strmergeinto'] = 'Összefésül ide'; + $lang['strrepsetmerged'] = 'Másodlatok összefésülve.'; + $lang['strrepsetmergedbad'] = 'Nem sikerült összefésülni a másodlatokat.'; + $lang['strmove'] = 'Mozgat'; + $lang['strneworigin'] = 'Új eredet'; + $lang['strrepsetmoved'] = 'Másodlat mozgatva.'; + $lang['strrepsetmovedbad'] = 'Nem sikerült elmozgatni a másodlatot.'; + $lang['strnewrepset'] = 'Új másodlat'; + $lang['strlock'] = 'Zárol'; + $lang['strlocked'] = 'Zárolva'; + $lang['strunlock'] = 'Kioldás'; + $lang['strconflockrepset'] = 'Biztosan zárolni akarja „%s” másodlatot?'; + $lang['strrepsetlocked'] = 'Másodlat zárolva.'; + $lang['strrepsetlockedbad'] = 'Nem sikerült zárolni a másodlatot.'; + $lang['strconfunlockrepset'] = 'Biztosan ki akarja oldani „%s” másodlatot?'; + $lang['strrepsetunlocked'] = 'Másodlat kioldva.'; + $lang['strrepsetunlockedbad'] = 'Nem sikerült kioldani a másodlatot.'; + $lang['stronlyonnode'] = 'Csak helyben'; + $lang['strddlscript'] = 'DDL-írás'; + $lang['strscriptneedsbody'] = 'Meg kell adnia egy írást, amit minden helyen végrehajtanak.'; + $lang['strscriptexecuted'] = 'Másodlati DDL-írás végrehajtva.'; + $lang['strscriptexecutedbad'] = 'Nem sikerült végrehajtani a másodlati DDL-írást.'; + $lang['strtabletriggerstoretain'] = 'A következő triggereket Slony NEM tiltja le:'; + + // Slony tables in replication sets + $lang['straddtable'] = 'Táblát felvesz'; + $lang['strtableneedsuniquekey'] = 'Tábla felvételéhez elsődleges vagy egyedi kulcs kell.'; + $lang['strtableaddedtorepset'] = 'Tábla felvéve a másodlatba.'; + $lang['strtableaddedtorepsetbad'] = 'Nem sikerült felvenni a táblát a másodlatba.'; + $lang['strconfremovetablefromrepset'] = 'Biztosan törölni akarja „%s” táblát „%s” másodlatból?'; + $lang['strtableremovedfromrepset'] = 'Tábla törölve a másodlatból.'; + $lang['strtableremovedfromrepsetbad'] = 'Nem sikerült törölni a táblát a másodlatból.'; + + // Slony sequences in replication sets + $lang['straddsequence'] = 'Sorozatot felvesz'; + $lang['strsequenceaddedtorepset'] = 'Sorozat felvéve a másodlatba.'; + $lang['strsequenceaddedtorepsetbad'] = 'Nem sikerült felvenni a sorozatot a másodlatba.'; + $lang['strconfremovesequencefromrepset'] = 'Biztosan törölni akarja „%s” sorozatot „%s” másodlatból?'; + $lang['strsequenceremovedfromrepset'] = 'Sorozat törölve a másodlatból.'; + $lang['strsequenceremovedfromrepsetbad'] = 'Nem sikerült törölni a sorozatot a másodlatból.'; + + // Slony subscriptions + $lang['strsubscriptions'] = 'Feliratkozások'; + $lang['strnosubscriptions'] = 'Nincs feliratkozás.'; + + // Miscellaneous + $lang['strtopbar'] = '%s fut %s:%s címen — Ön „%s” néven jelentkezett be.'; + $lang['strtimefmt'] = 'Y.m.d. H:i'; + $lang['strhelp'] = 'Súgó'; + $lang['strhelpicon'] = '?'; + $lang['strhelppagebrowser'] = 'Súgólap böngésző'; + $lang['strselecthelppage'] = 'Súgólapot választ'; + $lang['strinvalidhelppage'] = 'Érvénytelen súgólap.'; + $lang['strlogintitle'] = 'Belépett %s helyre'; + $lang['strlogoutmsg'] = 'Kilépett %s helyről'; + $lang['strloading'] = 'Betöltök...'; + $lang['strerrorloading'] = 'Betöltési hiba'; + $lang['strclicktoreload'] = 'Kattintson az újratöltéshez'; + + // Autovacuum + $lang['strautovacuum'] = 'Önműködő takarítás'; + $lang['strturnedon'] = 'Bekapcsolva'; + $lang['strturnedoff'] = 'Kikapcsolva'; + $lang['strenabled'] = 'Engedélyezve'; + $lang['strnovacuumconf'] = 'Nem találtam önműködő takarítást beállítva.'; + $lang['strvacuumbasethreshold'] = 'Takarítás alap küszbértéke'; + $lang['strvacuumscalefactor'] = 'Takarítás méretező tényezője'; + $lang['stranalybasethreshold'] = 'Alap küszöbértéket elemez'; + $lang['stranalyzescalefactor'] = 'Méretező tényezőt elemez'; + $lang['strvacuumcostdelay'] = 'Takarítás költségének késése'; + $lang['strvacuumcostlimit'] = 'Takarítás költségének korlátja'; + $lang['strvacuumpertable'] = 'Önműködő takarítás beállítása táblánként'; + $lang['straddvacuumtable'] = 'Önműködő takarítást állít be egy táblára'; + $lang['streditvacuumtable'] = 'Önműködő takarítást szerkeszt %s táblára'; + $lang['strdelvacuumtable'] = 'Törli az önműködő takarítást %s tábláról?'; + $lang['strvacuumtablereset'] = 'Az önműködő takarítást %s táblára visszaállítja az alap értékekre'; + $lang['strdelvacuumtablefail'] = 'Nem sikerült törölni az önműködő takarítást %s tábláról'; + $lang['strsetvacuumtablesaved'] = 'Önműködő takarítás %s táblára mentve.'; + $lang['strsetvacuumtablefail'] = 'Önműködő takarítást %s táblára nem sikerült beállítani.'; + $lang['strspecifydelvacuumtable'] = 'Meg kell adni a táblát, amiről törölni akarja az önműködő takarítás paramétereit.'; + $lang['strspecifyeditvacuumtable'] = 'Meg kell adni a táblát, amin szerkeszteni akarja az önműködő takarítás paramétereit.'; + $lang['strnotdefaultinred'] = 'A nem alap értékek pirosak.'; + + // Table-level Locks + $lang['strlocks'] = 'Zárak'; + $lang['strtransaction'] = 'Tranzakció AZ'; + $lang['strvirtualtransaction'] = 'Látszólagos tranzakció AZ'; + $lang['strprocessid'] = 'Folyamat AZ'; + $lang['strmode'] = 'Zármód'; + $lang['strislockheld'] = 'Zár tartva?'; + + // Prepared transactions + $lang['strpreparedxacts'] = 'Előkészített tranzakciók'; + $lang['strxactid'] = 'Tranzakció AZ'; + $lang['strgid'] = 'Globális AZ'; + + // Fulltext search + $lang['strfulltext'] = 'Teljes szövegben keres'; + $lang['strftsconfig'] = 'TSzK összeállítás'; + $lang['strftsconfigs'] = 'Összeállítások'; + $lang['strftscreateconfig'] = 'TSzK összeállítást teremt'; + $lang['strftscreatedict'] = 'Szótárt teremt'; + $lang['strftscreatedicttemplate'] = 'Szótársablont teremt'; + $lang['strftscreateparser'] = 'Elemzőt teremt'; + $lang['strftsnoconfigs'] = 'Nincs TSzK összeállítás.'; + $lang['strftsconfigdropped'] = 'TSzK összeállítás törölve.'; + $lang['strftsconfigdroppedbad'] = 'Nem sikerült törölni a TSzK összeállítást.'; + $lang['strconfdropftsconfig'] = 'Biztosan töröljük „%s” TSzK összeállítást?'; + $lang['strconfdropftsdict'] = 'Biztosan töröljük „%s” TSzK szótárt?'; + $lang['strconfdropftsmapping'] = 'Biztosan töröljük „%s” hozzárendelést „%s” TSzK összeállításból?'; + $lang['strftstemplate'] = 'Sablon'; + $lang['strftsparser'] = 'Elemző'; + $lang['strftsconfigneedsname'] = 'Meg kell adni a TSzK összeállítás nevét.'; + $lang['strftsconfigcreated'] = 'TSzK összeállítás megteremtve.'; + $lang['strftsconfigcreatedbad'] = 'Nem sikerült megteremteni a TSzK összeállítást.'; + $lang['strftsmapping'] = 'Hozzárendel'; + $lang['strftsdicts'] = 'Szótárak'; + $lang['strftsdict'] = 'Szótár'; + $lang['strftsemptymap'] = 'Üres hozzárendelés a TSzK összeállításban.'; + $lang['strftsconfigaltered'] = 'TSzK összeállítás megváltoztatva.'; + $lang['strftsconfigalteredbad'] = 'Nem sikerült a TSzK összeállítást megváltoztatni.'; + $lang['strftsconfigmap'] = 'TSzK összeállítás hozzárendelése'; + $lang['strftsparsers'] = 'TSzK elemzők'; + $lang['strftsnoparsers'] = 'Nincs TSzK elemző.'; + $lang['strftsnodicts'] = 'Nincs TSzK szótár.'; + $lang['strftsdictcreated'] = 'TSzK szótár megteremtve.'; + $lang['strftsdictcreatedbad'] = 'Nem sikerült a TSzK szótárt megteremteni.'; + $lang['strftslexize'] = 'Szókincs'; + $lang['strftsinit'] = 'Kezdés'; + $lang['strftsoptionsvalues'] = 'Opciók és értékek'; + $lang['strftsdictneedsname'] = 'Meg kell adni a TSzK szótár nevét.'; + $lang['strftsdictdropped'] = 'TSzK szótár törölve.'; + $lang['strftsdictdroppedbad'] = 'Nem sikerült a TSzK szótárt törölni.'; + $lang['strftsdictaltered'] = 'TSzK szótár megváltoztatva.'; + $lang['strftsdictalteredbad'] = 'Nem sikerült a TSzK szótárt megváltoztatni.'; + $lang['strftsaddmapping'] = 'Új hozzárendelés hozzáadása'; + $lang['strftsspecifymappingtodrop'] = 'Meg kell adni legalább egy törlendő TSzK hozzárendelést.'; + $lang['strftsspecifyconfigtoalter'] = 'Meg kell adni a megváltoztatandó TSzK összeállítást'; + $lang['strftsmappingdropped'] = 'TSzK hozzárendelés törölve.'; + $lang['strftsmappingdroppedbad'] = 'Nem sikerült a TSzK hozzárendelést törölni.'; + $lang['strftsnodictionaries'] = 'Nincs szótár.'; + $lang['strftsmappingaltered'] = 'TSzK hozzárendelés megváltoztatva.'; + $lang['strftsmappingalteredbad'] = 'Nem sikerült a TSzK hozzárendelést megváltoztatni.'; + $lang['strftsmappingadded'] = 'TSzK hozzárendelés hozzáadva.'; + $lang['strftsmappingaddedbad'] = 'Nem sikerült hozzáadni a TSzK hozzárendeléshez.'; + $lang['strftsmappingdropped'] = 'TSzK hozzárendelés törölve.'; + $lang['strftsmappingdroppedbad'] = 'Nem sikerült a TSzK hozzárendelést törölni.'; + $lang['strftstabconfigs'] = 'Összeállítások'; + $lang['strftstabdicts'] = 'Szótárak'; + $lang['strftstabparsers'] = 'Elemzők'; + $lang['strftscantparsercopy'] = 'Nem állíthat be együtt elemzőt és sablont szövegkereső beállítás közben.'; + + +?> diff --git a/php/pgadmin/lang/italian.php b/php/pgadmin/lang/italian.php new file mode 100644 index 0000000..8d2a47a --- /dev/null +++ b/php/pgadmin/lang/italian.php @@ -0,0 +1,740 @@ +'; + $lang['strfirst'] = '<< Primo'; + $lang['strlast'] = 'Ultimo >>'; + $lang['strfailed'] = 'Fallito'; + $lang['strcreate'] = 'Crea'; + $lang['strcreated'] = 'Creato'; + $lang['strcomment'] = 'Commento'; + $lang['strlength'] = 'Lunghezza'; + $lang['strdefault'] = 'Default'; + $lang['stralter'] = 'Modifica'; + $lang['strok'] = 'OK'; + $lang['strcancel'] = 'Annulla'; + $lang['strac'] = 'Abilita autocompletamento'; + $lang['strsave'] = 'Salva'; + $lang['strreset'] = 'Reset'; + $lang['strinsert'] = 'Inserisci'; + $lang['strselect'] = 'Seleziona'; + $lang['strdelete'] = 'Cancella'; + $lang['strupdate'] = 'Aggiorna'; + $lang['strreferences'] = 'Riferimenti'; + $lang['stryes'] = 'Si'; + $lang['strno'] = 'No'; + $lang['strtrue'] = 'TRUE'; + $lang['strfalse'] = 'FALSE'; + $lang['stredit'] = 'Modifica'; + $lang['strcolumn'] = 'Colonna'; + $lang['strcolumns'] = 'Colonne'; + $lang['strrows'] = 'riga(ghe)'; + $lang['strrowsaff'] = 'riga(ghe) interessata(e).'; + $lang['strobjects'] = 'oggetto(i)'; + $lang['strback'] = 'Indietro'; + $lang['strqueryresults'] = 'Risultato Query'; + $lang['strshow'] = 'Mostra'; + $lang['strempty'] = 'Svuota'; + $lang['strlanguage'] = 'Lingua'; + $lang['strencoding'] = 'Codifica'; + $lang['strvalue'] = 'Valore'; + $lang['strunique'] = 'Univoco'; + $lang['strprimary'] = 'Primaria'; + $lang['strexport'] = 'Esporta'; + $lang['strimport'] = 'Importa'; + $lang['strallowednulls'] = 'Caratteri NULL consentiti'; + $lang['strbackslashn'] = '\N'; + $lang['stremptystring'] = 'Stringa vuota'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = 'Amministratore'; + $lang['strvacuum'] = 'Vacuum'; + $lang['stranalyze'] = 'Analizza'; + $lang['strclusterindex'] = 'Clusterizza'; + $lang['strclustered'] = 'Clusterizzato?'; + $lang['strreindex'] = 'Reindicizza'; + $lang['strexecute'] = 'Esegui'; + $lang['stradd'] = 'Aggiungi'; + $lang['strevent'] = 'Evento'; + $lang['strwhere'] = 'Condizione'; + $lang['strinstead'] = 'Invece fai'; + $lang['strwhen'] = 'Quando'; + $lang['strformat'] = 'Formato'; + $lang['strdata'] = 'Dati'; + $lang['strconfirm'] = 'Conferma'; + $lang['strexpression'] = 'Espressione'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'Espandi'; + $lang['strcollapse'] = 'Raccogli'; + $lang['strexplain'] = 'Explain'; + $lang['strexplainanalyze'] = 'Explain Analyze'; + $lang['strfind'] = 'Trova'; + $lang['stroptions'] = 'Opzioni'; + $lang['strrefresh'] = 'Ricarica'; + $lang['strdownload'] = 'Scarica'; + $lang['strdownloadgzipped'] = 'Scarica compresso con gzip'; + $lang['strinfo'] = 'Informazioni'; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = 'Avanzato'; + $lang['strvariables'] = 'Variabili'; + $lang['strprocess'] = 'Processo'; + $lang['strprocesses'] = 'Processi'; + $lang['strsetting'] = 'Valore'; + $lang['streditsql'] = 'Modifica SQL'; + $lang['strruntime'] = 'Tempo di esecuzione totale: %s ms'; + $lang['strpaginate'] = 'Dividi in pagine i risultati'; + $lang['struploadscript'] = 'oppure esegui l\'upload di uno script SQL:'; + $lang['strstarttime'] = 'Inizio'; + $lang['strfile'] = 'File'; + $lang['strfileimported'] = 'File importato.'; + $lang['strtrycred'] = 'Usa queste credenziali per tutti i server'; + $lang['stractionsonmultiplelines'] = 'Azioni su righe multiple'; + $lang['strselectall'] = 'Seleziona tutti'; + $lang['strunselectall'] = 'Deseleziona tutti'; + + // Database sizes - Dimensioni dei database + $lang['strsize'] = 'Dimensione'; + $lang['strbytes'] = 'byte'; + $lang['strkb'] = 'kB'; + $lang['strmb'] = 'MB'; + $lang['strgb'] = 'GB'; + $lang['strtb'] = 'TB'; + + // Error handling - Gestione degli errori + $lang['strnoframes'] = 'Questa applicazione funziona al meglio utilizzando un browser che supporti i frame, ma pu essere usata senza frame seguendo il link sottostante.'; + $lang['strnoframeslink'] = 'Usa senza frame'; + $lang['strbadconfig'] = 'Il file config.inc.php obsoleto. necessario rigenerarlo utilizzando il nuovo file config.inc.php-dist .'; + $lang['strnotloaded'] = 'La tua installazione di PHP non supporta PostgreSQL. necessario ricompilare PHP usando l\'opzione di configurazione --with-pgsql .'; + $lang['strpostgresqlversionnotsupported'] = 'Versione di PostgreSQL non supportata. necessario aggiornarlo alla versione %s o successiva.'; + $lang['strbadschema'] = 'Schema specificato non valido.'; + $lang['strbadencoding'] = 'Impostazione della codifica del client nel database fallito.'; + $lang['strsqlerror'] = 'Errore SQL:'; + $lang['strinstatement'] = 'Nel costrutto:'; + $lang['strinvalidparam'] = 'Parametri di script non validi.'; + $lang['strnodata'] = 'Nessuna riga trovata.'; + $lang['strnoobjects'] = 'Nessun oggetto trovato.'; + $lang['strrownotunique'] = 'Nessun identificatore univoco per questa riga.'; + $lang['strnoreportsdb'] = 'Non stato creato il database dei report. Leggere il file INSTALL per istruzioni.'; + $lang['strnouploads'] = 'L\'upload dei file disabilitato.'; + $lang['strimporterror'] = 'Errore durante l\'import.'; + $lang['strimporterror-fileformat'] = 'Errore durante l\'import: determinazione automatica del formato del file fallita.'; + $lang['strimporterrorline'] = 'Errore durante l\'import alla linea %s.'; + $lang['strimporterrorline-badcolumnnum'] = 'Errore durante l\'import alla linea %s: la linea non possiede il numero corretto di colonne.'; + $lang['strimporterror-uploadedfile'] = 'Errore durante l\'import: non stato possibile caricare il file sul server'; + $lang['strcannotdumponwindows'] = 'Il dump di nomi complessi di tabelle o schemi sotto Windows non supportato.'; + $lang['strinvalidserverparam'] = 'Tentativo di connessione al server con parametri non validi, possibile che qualcuno stia cercando di forzare il sistema.'; + + // Tables - Tabelle + $lang['strtable'] = 'Tabella'; + $lang['strtables'] = 'Tabelle'; + $lang['strshowalltables'] = 'Mostra tutte le tabelle'; + $lang['strnotables'] = 'Nessuna tabella trovata.'; + $lang['strnotable'] = 'Tabella non trovata.'; + $lang['strcreatetable'] = 'Crea tabella'; + $lang['strtablename'] = 'Nome tabella'; + $lang['strtableneedsname'] = ' necessario specificare un nome per la tabella.'; + $lang['strtableneedsfield'] = ' necessario specificare almeno un campo.'; + $lang['strtableneedscols'] = ' necessario specificare un numero di colonne valido.'; + $lang['strtablecreated'] = 'Tabella creata.'; + $lang['strtablecreatedbad'] = 'Creazione della tabella fallita.'; + $lang['strconfdroptable'] = 'Eliminare la tabella "%s"?'; + $lang['strtabledropped'] = 'Tabella eliminata.'; + $lang['strtabledroppedbad'] = 'Eliminazione della tabella fallita.'; + $lang['strconfemptytable'] = 'Svuotare la tabella "%s"?'; + $lang['strtableemptied'] = 'Tabella svuotata.'; + $lang['strtableemptiedbad'] = 'Svuotamento della tabella fallito.'; + $lang['strinsertrow'] = 'Inserisci riga'; + $lang['strrowinserted'] = 'Riga inserita.'; + $lang['strrowinsertedbad'] = 'Inserimento della riga fallito.'; + $lang['strrowduplicate'] = 'Inserimento della riga fallito, tentativo di eseguire un inserimento duplicato.'; + $lang['streditrow'] = 'Modifica riga'; + $lang['strrowupdated'] = 'Riga aggiornata.'; + $lang['strrowupdatedbad'] = 'Aggiornamento della riga fallito.'; + $lang['strdeleterow'] = 'Cancella riga'; + $lang['strconfdeleterow'] = 'Cancellare questa riga?'; + $lang['strrowdeleted'] = 'Riga cancellata.'; + $lang['strrowdeletedbad'] = 'Cancellazione della riga fallita.'; + $lang['strinsertandrepeat'] = 'Inserisci e ripeti'; + $lang['strnumcols'] = 'Numero di colonne'; + $lang['strcolneedsname'] = ' necessario specificare un nome per la colonna'; + $lang['strselectallfields'] = 'Seleziona tutti i campi'; + $lang['strselectneedscol'] = ' necessario scegliere almeno una colonna.'; + $lang['strselectunary'] = 'Gli operatori unari non possono avere un valore.'; + $lang['strcolumnaltered'] = 'Colonna modificata.'; + $lang['strcolumnalteredbad'] = 'Modifica della colonna fallita.'; + $lang['strconfdropcolumn'] = 'Eliminare la colonna "%s" dalla tabella "%s"?'; + $lang['strcolumndropped'] = 'Colonna eliminata.'; + $lang['strcolumndroppedbad'] = 'Eliminazione della colonna fallita.'; + $lang['straddcolumn'] = 'Aggiungi colonna'; + $lang['strcolumnadded'] = 'Colonna aggiunta.'; + $lang['strcolumnaddedbad'] = 'Aggiunta della colonna fallita.'; + $lang['strcascade'] = 'CASCADE'; + $lang['strtablealtered'] = 'Tabella modificata.'; + $lang['strtablealteredbad'] = 'Modifica della tabella fallita.'; + $lang['strdataonly'] = 'Solo i dati'; + $lang['strstructureonly'] = 'Solo la struttura'; + $lang['strstructureanddata'] = 'Struttura e dati'; + $lang['strtabbed'] = 'Tabulato'; + $lang['strauto'] = 'Auto'; + $lang['strconfvacuumtable'] = 'Effettuare il vacuum su "%s"?'; + $lang['strestimatedrowcount'] = 'Numero stimato di righe'; + $lang['strspecifytabletoanalyze'] = ' necessario specificare almeno una tabella da analizzare'; + + // Colonne - Columns + $lang['strcolprop'] = 'Propriet della colonna'; + + // Users - Utenti + $lang['struser'] = 'Utente'; + $lang['strusers'] = 'Utenti'; + $lang['strusername'] = 'Username'; + $lang['strpassword'] = 'Password'; + $lang['strsuper'] = 'Superuser?'; + $lang['strcreatedb'] = 'Pu creare DB?'; + $lang['strexpires'] = 'Scadenza'; + $lang['strsessiondefaults'] = 'Defaults della sessione'; + $lang['strnousers'] = 'Nessun utente trovato'; + $lang['struserupdated'] = 'Utente aggiornato.'; + $lang['struserupdatedbad'] = 'Aggiornamento utente fallito.'; + $lang['strshowallusers'] = 'Mostra tutti gli utenti'; + $lang['strcreateuser'] = 'Crea utente'; + $lang['struserneedsname'] = ' necessario specificare un nome per l\'utente.'; + $lang['strusercreated'] = 'Utente creato.'; + $lang['strusercreatedbad'] = 'Creazione dell\'utente fallita.'; + $lang['strconfdropuser'] = 'Eliminare l\'utente "%s"?'; + $lang['struserdropped'] = 'Utente eliminato.'; + $lang['struserdroppedbad'] = 'Eliminazione dell\'utente fallita.'; + $lang['straccount'] = 'Account'; + $lang['strchangepassword'] = 'Modifica password'; + $lang['strpasswordchanged'] = 'Password modificata.'; + $lang['strpasswordchangedbad'] = 'Modifica della password fallita.'; + $lang['strpasswordshort'] = 'La password troppo corta.'; + $lang['strpasswordconfirm'] = 'Le due password non coincidono.'; + + // Groups - Gruppi + $lang['strgroup'] = 'Gruppo'; + $lang['strgroups'] = 'Gruppi'; + $lang['strshowallgroups'] = 'Mostra tutti i gruppi'; + $lang['strnogroup'] = 'Gruppo non trovato.'; + $lang['strnogroups'] = 'Nessun gruppo trovato.'; + $lang['strcreategroup'] = 'Crea gruppo'; + $lang['strgroupneedsname'] = ' necessario specificare un nome per il gruppo.'; + $lang['strgroupcreated'] = 'Gruppo creato.'; + $lang['strgroupcreatedbad'] = 'Creazione del gruppo fallita.'; + $lang['strconfdropgroup'] = 'Eliminare il gruppo "%s"?'; + $lang['strgroupdropped'] = 'Gruppo eliminato.'; + $lang['strgroupdroppedbad'] = 'Eliminazione del gruppo fallita.'; + $lang['strmembers'] = 'Membri'; + $lang['strmemberof'] = 'Membro di'; + $lang['stradminmembers'] = 'Membri amministratore'; + $lang['straddmember'] = 'Aggiungi membro'; + $lang['strmemberadded'] = 'Membro aggiunto.'; + $lang['strmemberaddedbad'] = 'Aggiunta del membro fallita.'; + $lang['strdropmember'] = 'Elimina membro'; + $lang['strconfdropmember'] = 'Eliminare il membro "%s" dal gruppo "%s"?'; + $lang['strmemberdropped'] = 'Membro eliminato.'; + $lang['strmemberdroppedbad'] = 'Eliminazione del membro fallita.'; + + // Ruoli - Roles + $lang['strrole'] = 'Ruolo'; + $lang['strroles'] = 'Ruoli'; + $lang['strshowallroles'] = 'Mostra tutti i ruoli'; + $lang['strnoroles'] = 'Nessun ruolo trovato.'; + $lang['strinheritsprivs'] = 'Eredita i privilegi?'; + $lang['strcreaterole'] = 'Crea ruolo'; + $lang['strcancreaterole'] = 'Pu creare ruoli?'; + $lang['strrolecreated'] = 'Ruolo creato.'; + $lang['strrolecreatedbad'] = 'Creazione del ruolo fallita.'; + $lang['strrolealtered'] = 'Ruolo modificato.'; + $lang['strrolealteredbad'] = 'Modifica del ruolo fallita.'; + $lang['strcanlogin'] = 'Pu effettuare login?'; + $lang['strconnlimit'] = 'Limite alle connessioni'; + $lang['strdroprole'] = 'Elimina ruolo'; + $lang['strconfdroprole'] = 'Eliminare il ruolo "%s"?'; + $lang['strroledropped'] = 'Ruolo eliminato.'; + $lang['strroledroppedbad'] = 'Eliminazione del ruolo fallita.'; + $lang['strnolimit'] = 'Nessun limite'; + $lang['strnever'] = 'Mai'; + $lang['strroleneedsname'] = ' necessario specificare un nome per il ruolo.'; + + // Privileges - Privilegi + $lang['strprivilege'] = 'Privilegio'; + $lang['strprivileges'] = 'Privilegi'; + $lang['strnoprivileges'] = 'Questo oggetto di default ha i privilegi del proprietario.'; + $lang['strgrant'] = 'Concedi'; + $lang['strrevoke'] = 'Revoca'; + $lang['strgranted'] = 'Privilegi concessi.'; + $lang['strgrantfailed'] = 'Concessione dei privilegi fallita.'; + $lang['strgrantbad'] = ' necessario specificare almeno un utente o gruppo ed almeno un privilegio.'; + $lang['strgrantor'] = 'Concedente'; + $lang['strasterisk'] = '*'; + + // Databases - Database + $lang['strdatabase'] = 'Database'; + $lang['strdatabases'] = 'Database'; + $lang['strshowalldatabases'] = 'Mostra tutti i database'; + $lang['strnodatabases'] = 'Nessun database trovato.'; + $lang['strcreatedatabase'] = 'Crea database'; + $lang['strdatabasename'] = 'Nome del database'; + $lang['strdatabaseneedsname'] = ' necessario specificare un nome per il database.'; + $lang['strdatabasecreated'] = 'Database creato.'; + $lang['strdatabasecreatedbad'] = 'Creazione del database fallita.'; + $lang['strconfdropdatabase'] = 'Eliminare il database "%s"?'; + $lang['strdatabasedropped'] = 'Database eliminato.'; + $lang['strdatabasedroppedbad'] = 'Eliminazione del database fallita.'; + $lang['strentersql'] = 'Inserire la query SQL da eseguire qui sotto:'; + $lang['strsqlexecuted'] = 'SQL eseguito.'; + $lang['strvacuumgood'] = 'Vacuum completato.'; + $lang['strvacuumbad'] = 'Vacuum fallito.'; + $lang['stranalyzegood'] = 'Analyze completato.'; + $lang['stranalyzebad'] = 'Analyze fallito'; + $lang['strreindexgood'] = 'Reindicizzamento completato.'; + $lang['strreindexbad'] = 'Reindicizzamento fallito.'; + $lang['strfull'] = 'Completo'; + $lang['strfreeze'] = 'Freeze'; + $lang['strforce'] = 'Forza'; + $lang['strsignalsent'] = 'Segnale inviato.'; + $lang['strsignalsentbad'] = 'Invio del segnale fallito.'; + $lang['strallobjects'] = 'Tutti gli oggetti'; + $lang['strdatabasealtered'] = 'Database modificato.'; + $lang['strdatabasealteredbad'] = 'Modifica del database fallita.'; + + // Views - Viste + $lang['strview'] = 'Vista'; + $lang['strviews'] = 'Viste'; + $lang['strshowallviews'] = 'Mostra tutte le viste'; + $lang['strnoview'] = 'Vista non trovata.'; + $lang['strnoviews'] = 'Nessuna vista trovata.'; + $lang['strcreateview'] = 'Crea vista'; + $lang['strviewname'] = 'Nome vista'; + $lang['strviewneedsname'] = ' necessario specificare un nome per la vista.'; + $lang['strviewneedsdef'] = ' necessario specificare una definizione per la vista.'; + $lang['strviewneedsfields'] = ' necessario specificare le colonne da selezionare nella vista.'; + $lang['strviewcreated'] = 'Vista creata.'; + $lang['strviewcreatedbad'] = 'Creazione della vista fallita.'; + $lang['strconfdropview'] = 'Eliminare la vista "%s"?'; + $lang['strviewdropped'] = 'Vista eliminata.'; + $lang['strviewdroppedbad'] = 'Eliminazione della vista fallita.'; + $lang['strviewupdated'] = 'Vista aggiornata.'; + $lang['strviewupdatedbad'] = 'Aggiornamento della vista fallito.'; + $lang['strviewlink'] = 'Chiavi collegate'; + $lang['strviewconditions'] = 'Condizioni aggiuntive'; + $lang['strcreateviewwiz'] = 'Crea vista tramite wizard'; + + // Sequences - Sequenze + $lang['strsequence'] = 'Sequenza'; + $lang['strsequences'] = 'Sequenze'; + $lang['strshowallsequences'] = 'Mostra tutte le sequenze'; + $lang['strnosequence'] = 'Sequenza non trovata.'; + $lang['strnosequences'] = 'Nessuna sequenza trovata.'; + $lang['strcreatesequence'] = 'Crea sequenza'; + $lang['strlastvalue'] = 'Ultimo valore'; + $lang['strincrementby'] = 'Incrementa di'; + $lang['strstartvalue'] = 'Valore iniziale'; + $lang['strmaxvalue'] = 'Valore massimo'; + $lang['strminvalue'] = 'Valore minimo'; + $lang['strcachevalue'] = 'Valori in cache'; + $lang['strcancycle'] = 'Pu ricominciare?'; + $lang['striscalled'] = 'Incrementer l\'ultimo valore prima di ritornare il prossimo valore (is_called)?'; + $lang['strsequenceneedsname'] = ' necessario specificare un nome per la sequenza.'; + $lang['strsequencecreated'] = 'Sequenza creata.'; + $lang['strsequencecreatedbad'] = 'Creazione della sequenza fallita.'; + $lang['strconfdropsequence'] = 'Eliminare la sequenza "%s"?'; + $lang['strsequencedropped'] = 'Sequenza eliminata.'; + $lang['strsequencedroppedbad'] = 'Eliminazione della sequenza fallita.'; + $lang['strsequencereset'] = 'Reset della sequenza effettuato.'; + $lang['strsequenceresetbad'] = 'Reset della sequenza fallito.'; + $lang['strsequencealtered'] = 'Sequenza modificata.'; + $lang['strsequencealteredbad'] = 'Modifica della sequenza fallita.'; + $lang['strsetval'] = 'Imposta valore'; + $lang['strsequencesetval'] = 'Valore della sequenza impostato.'; + $lang['strsequencesetvalbad'] = 'Impostazione del valore della sequenza fallito.'; + $lang['strnextval'] = 'Incrementa valore'; + $lang['strsequencenextval'] = 'Sequenza incrementata.'; + $lang['strsequencenextvalbad'] = 'Incremento della sequenza fallito.'; + + // Indexes - Indici + $lang['strindex'] = 'Indice'; + $lang['strindexes'] = 'Indici'; + $lang['strindexname'] = 'Nome dell\'indice'; + $lang['strshowallindexes'] = 'Mostra tutti gli indici'; + $lang['strnoindex'] = 'Indice non trovato.'; + $lang['strnoindexes'] = 'Nessun indice trovato.'; + $lang['strcreateindex'] = 'Crea Indice'; + $lang['strtabname'] = 'Nome del tab'; + $lang['strcolumnname'] = 'Nome della colonna'; + $lang['strindexneedsname'] = ' necessario specificare un nome per l\'indice'; + $lang['strindexneedscols'] = 'Gli indici richiedono di un numero valido di colonne.'; + $lang['strindexcreated'] = 'Indice creato'; + $lang['strindexcreatedbad'] = 'Creazione indice fallita.'; + $lang['strconfdropindex'] = 'Eliminare l\'indice "%s"?'; + $lang['strindexdropped'] = 'Indice eliminato.'; + $lang['strindexdroppedbad'] = 'Eliminazione dell\'indice fallita.'; + $lang['strkeyname'] = 'Nome della chiave'; + $lang['struniquekey'] = 'Chiave Univoca'; + $lang['strprimarykey'] = 'Chiave Primaria'; + $lang['strindextype'] = 'Tipo di indice'; + $lang['strtablecolumnlist'] = 'Colonne nella tabella'; + $lang['strindexcolumnlist'] = 'Colonne nell\'indice'; + $lang['strconfcluster'] = 'Clusterizzare "%s"?'; + $lang['strclusteredgood'] = 'Clusterizzazione completata.'; + $lang['strclusteredbad'] = 'Clusterizzazione fallita.'; + + // Rules - Regole + $lang['strrules'] = 'Regole'; + $lang['strrule'] = 'Regola'; + $lang['strshowallrules'] = 'Mostra tutte le regole'; + $lang['strnorule'] = 'Regola non trovata.'; + $lang['strnorules'] = 'Nessuna regola trovata.'; + $lang['strcreaterule'] = 'Crea regola'; + $lang['strrulename'] = 'Nome della regola'; + $lang['strruleneedsname'] = ' necessario specificare un nome per la regola.'; + $lang['strrulecreated'] = 'Regola creata.'; + $lang['strrulecreatedbad'] = 'Creazione della regola fallita.'; + $lang['strconfdroprule'] = 'Eliminare la regola "%s" su "%s"?'; + $lang['strruledropped'] = 'Regola eliminata.'; + $lang['strruledroppedbad'] = 'Eliminazione della regola fallita.'; + + // Constraints - Vincoli + $lang['strconstraint'] = 'Vincolo'; + $lang['strconstraints'] = 'Vincoli'; + $lang['strshowallconstraints'] = 'Mostra tutti i vincoli'; + $lang['strnoconstraints'] = 'Nessun vincolo trovato.'; + $lang['strcreateconstraint'] = 'Crea vincolo'; + $lang['strconstraintcreated'] = 'Vincolo creato.'; + $lang['strconstraintcreatedbad'] = 'Creazione del vincolo fallita.'; + $lang['strconfdropconstraint'] = 'Eliminare il vincolo "%s" su "%s"?'; + $lang['strconstraintdropped'] = 'Vincolo eliminato.'; + $lang['strconstraintdroppedbad'] = 'Eliminazione vincolo fallita.'; + $lang['straddcheck'] = 'Aggiungi un Check'; + $lang['strcheckneedsdefinition'] = 'Il vincolo Check necessita di una definizione.'; + $lang['strcheckadded'] = 'Vincolo Check aggiunto.'; + $lang['strcheckaddedbad'] = 'Inserimento del vincolo Check fallito.'; + $lang['straddpk'] = 'Aggiungi una chiave primaria'; + $lang['strpkneedscols'] = 'La chiave primaria richiede almeno una colonna.'; + $lang['strpkadded'] = 'Chiave primaria aggiunta.'; + $lang['strpkaddedbad'] = 'Aggiunta della chiave primaria fallita.'; + $lang['stradduniq'] = 'Aggiungi una chiave univoca'; + $lang['struniqneedscols'] = 'La chiave univoca richiede almeno una colonna.'; + $lang['struniqadded'] = 'Chiave univoca aggiunta.'; + $lang['struniqaddedbad'] = 'Aggiunta chiave univoca fallita.'; + $lang['straddfk'] = 'Aggiungi una chiave esterna'; + $lang['strfkneedscols'] = 'La chiave esterna richiede almeno una colonna.'; + $lang['strfkneedstarget'] = 'La chiave esterna richiede una tabella obiettivo.'; + $lang['strfkadded'] = 'Chiave esterna aggiunta.'; + $lang['strfkaddedbad'] = 'Aggiunta della chiave esterna fallita.'; + $lang['strfktarget'] = 'Tabella obiettivo'; + $lang['strfkcolumnlist'] = 'Colonne della chiave'; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + + // Functions - Funzioni + $lang['strfunction'] = 'Funzione'; + $lang['strfunctions'] = 'Funzioni'; + $lang['strshowallfunctions'] = 'Mostra tutte le funzioni'; + $lang['strnofunction'] = 'Funzione non trovata.'; + $lang['strnofunctions'] = 'Nessuna funzione trovata.'; + $lang['strcreateplfunction'] = 'Crea funzione SQL/PL'; + $lang['strcreateinternalfunction'] = 'Crea funzione internal'; + $lang['strcreatecfunction'] = 'Crea funzione C'; + $lang['strfunctionname'] = 'Nome della funzione'; + $lang['strreturns'] = 'Restituisce'; + $lang['strproglanguage'] = 'Linguaggio di programmazione'; + $lang['strfunctionneedsname'] = ' necessario specificare un nome per la funzione.'; + $lang['strfunctionneedsdef'] = ' necessario specificare una definizione per la funzione.'; + $lang['strfunctioncreated'] = 'Funzione creata.'; + $lang['strfunctioncreatedbad'] = 'Creazione funzione fallita.'; + $lang['strconfdropfunction'] = 'Eliminare la funzione "%s"?'; + $lang['strfunctiondropped'] = 'Funzione eliminata.'; + $lang['strfunctiondroppedbad'] = 'Eliminazione della funzione fallita.'; + $lang['strfunctionupdated'] = 'Funzione aggiornata.'; + $lang['strfunctionupdatedbad'] = 'Aggiornamento della funzione fallito.'; + $lang['strobjectfile'] = 'File oggetto'; + $lang['strlinksymbol'] = 'Simbolo di collegamento'; + $lang['strarguments'] = 'Argomenti'; + + // Triggers - Trigger + $lang['strtrigger'] = 'Trigger'; + $lang['strtriggers'] = 'Trigger'; + $lang['strshowalltriggers'] = 'Mostra tutti i trigger'; + $lang['strnotrigger'] = 'Trigger non trovato.'; + $lang['strnotriggers'] = 'Nessun trigger trovato.'; + $lang['strcreatetrigger'] = 'Crea Trigger'; + $lang['strtriggerneedsname'] = ' necessario specificare un nome per il trigger.'; + $lang['strtriggerneedsfunc'] = ' necessario specificare una funzione per il trigger.'; + $lang['strtriggercreated'] = 'Trigger creato.'; + $lang['strtriggercreatedbad'] = 'Creazione del trigger fallita.'; + $lang['strconfdroptrigger'] = 'Eliminare il trigger "%s" su "%s"?'; + $lang['strtriggerdropped'] = 'Trigger eliminato.'; + $lang['strtriggerdroppedbad'] = 'Eliminazione del trigger fallita.'; + $lang['strtriggeraltered'] = 'Trigger modificato.'; + $lang['strtriggeralteredbad'] = 'Modifica del trigger fallita.'; + $lang['strforeach'] = 'Per ogni'; + + // Types - Tipi + $lang['strtype'] = 'Tipo'; + $lang['strtypes'] = 'Tipi'; + $lang['strshowalltypes'] = 'Mostra tutti i tipi'; + $lang['strnotype'] = 'Tipo non trovato.'; + $lang['strnotypes'] = 'Nessun tipo trovato.'; + $lang['strcreatetype'] = 'Crea Tipo'; + $lang['strcreatecomptype'] = 'Crea tipo composto'; + $lang['strtypeneedsfield'] = ' necessario specificare almeno un campo.'; + $lang['strtypeneedscols'] = ' necessario specificare un numero di campi valido.'; + $lang['strtypename'] = 'Nome Tipo'; + $lang['strinputfn'] = 'Funzione di input'; + $lang['stroutputfn'] = 'Funzione di output'; + $lang['strpassbyval'] = 'Passato per valore?'; + $lang['stralignment'] = 'Allineamento'; + $lang['strelement'] = 'Elemento'; + $lang['strdelimiter'] = 'Delimitatore'; + $lang['strstorage'] = 'Memorizzazione'; + $lang['strfield'] = 'Campo'; + $lang['strnumfields'] = 'Numero di campi'; + $lang['strtypeneedsname'] = ' necessario specificare un nome per il tipo.'; + $lang['strtypeneedslen'] = ' necessario specificare una lunghezza per il tipo.'; + $lang['strtypecreated'] = 'Tipo creato'; + $lang['strtypecreatedbad'] = 'Creazione del tipo fallita.'; + $lang['strconfdroptype'] = 'Eliminare il tipo "%s"?'; + $lang['strtypedropped'] = 'Tipo eliminato.'; + $lang['strtypedroppedbad'] = 'Eliminazione del tipo fallita.'; + $lang['strflavor'] = 'Variet'; + $lang['strbasetype'] = 'Base'; + $lang['strcompositetype'] = 'Composto'; + $lang['strpseudotype'] = 'Pseudo-tipo'; + + // Schemas - Schemi + $lang['strschema'] = 'Schema'; + $lang['strschemas'] = 'Schemi'; + $lang['strshowallschemas'] = 'Mostra tutti gli schemi'; + $lang['strnoschema'] = 'Schema non trovato.'; + $lang['strnoschemas'] = 'Nessuno schema trovato.'; + $lang['strcreateschema'] = 'Crea schema'; + $lang['strschemaname'] = 'Nome dello schema'; + $lang['strschemaneedsname'] = ' necessario specificare un nome per lo schema.'; + $lang['strschemacreated'] = 'Schema creato'; + $lang['strschemacreatedbad'] = 'Creazione dello schema fallita.'; + $lang['strconfdropschema'] = 'Eliminare lo schema "%s"?'; + $lang['strschemadropped'] = 'Schema eliminato.'; + $lang['strschemadroppedbad'] = 'Eliminazione dello schema fallita.'; + $lang['strschemaaltered'] = 'Schema modificato.'; + $lang['strschemaalteredbad'] = 'Modifica dello schema fallita.'; + $lang['strsearchpath'] = 'Ordine di ricerca dello schema'; + + // Reports - Rapporti + $lang['strreport'] = 'Rapporto'; + $lang['strreports'] = 'Rapporti'; + $lang['strshowallreports'] = 'Mostra tutti i rapporti'; + $lang['strnoreports'] = 'Nessun rapporto trovato.'; + $lang['strcreatereport'] = 'Crea rapporto'; + $lang['strreportdropped'] = 'Rapporto eliminato.'; + $lang['strreportdroppedbad'] = 'Eliminazione del rapporto fallita.'; + $lang['strconfdropreport'] = 'Eliminare il rapporto "%s"?'; + $lang['strreportneedsname'] = ' necessario specificare un nome per il rapporto.'; + $lang['strreportneedsdef'] = ' necessario inserire il codice SQL per il rapporto.'; + $lang['strreportcreated'] = 'Rapporto salvato'; + $lang['strreportcreatedbad'] = 'Salvataggio del rapporto fallito.'; + + // Domains - Domini + $lang['strdomain'] = 'Dominio'; + $lang['strdomains'] = 'Domini'; + $lang['strshowalldomains'] = 'Mostra tutti i domini'; + $lang['strnodomains'] = 'Nessun dominio trovato.'; + $lang['strcreatedomain'] = 'Crea dominio'; + $lang['strdomaindropped'] = 'Dominio eliminato.'; + $lang['strdomaindroppedbad'] = 'Eliminazione del dominio fallita.'; + $lang['strconfdropdomain'] = 'Eliminare il dominio "%s"?'; + $lang['strdomainneedsname'] = ' necessario specificare un nome per il dominio.'; + $lang['strdomaincreated'] = 'Dominio creato.'; + $lang['strdomaincreatedbad'] = 'Creazione del dominio fallita.'; + $lang['strdomainaltered'] = 'Dominio modificato.'; + $lang['strdomainalteredbad'] = 'Modifica del dominio fallita.'; + + // Operators - Operatori + $lang['stroperator'] = 'Operatore'; + $lang['stroperators'] = 'Operatori'; + $lang['strshowalloperators'] = 'Mostra tutti gli operatori'; + $lang['strnooperator'] = 'Operatore non trovato.'; + $lang['strnooperators'] = 'Nessun operatore trovato.'; + $lang['strcreateoperator'] = 'Crea operatore'; + $lang['strleftarg'] = 'Tipo dell\'argomento di sinistra'; + $lang['strrightarg'] = 'Tipo dell\'argomento di destra'; + $lang['strcommutator'] = 'Commutatore'; + $lang['strnegator'] = 'Negator'; + $lang['strrestrict'] = 'Restrict'; + $lang['strjoin'] = 'Join'; + $lang['strhashes'] = 'Supporta hash join'; + $lang['strmerges'] = 'Supporta merge join'; + $lang['strleftsort'] = 'Ordinamento sinistro'; + $lang['strrightsort'] = 'Ordinamento destro'; + $lang['strlessthan'] = 'Minore'; + $lang['strgreaterthan'] = 'Maggiore'; + $lang['stroperatorneedsname'] = ' necessario specificare un nome per l\'operatore.'; + $lang['stroperatorcreated'] = 'Operatore creato'; + $lang['stroperatorcreatedbad'] = 'Creazione dell\'operatore fallita.'; + $lang['strconfdropoperator'] = 'Eliminare l\'operatore "%s"?'; + $lang['stroperatordropped'] = 'Operatore eliminato.'; + $lang['stroperatordroppedbad'] = 'Eliminazione dell\'operatore fallita.'; + + // Casts - Cast + $lang['strcasts'] = 'Cast'; + $lang['strnocasts'] = 'Nessun cast trovato.'; + $lang['strsourcetype'] = 'Tipo sorgente'; + $lang['strtargettype'] = 'Tipo destinazione'; + $lang['strimplicit'] = 'Implicito'; + $lang['strinassignment'] = 'Negli assegnamenti'; + $lang['strbinarycompat'] = '(Compatibile in binario)'; + + // Conversions - Conversioni + $lang['strconversions'] = 'Conversioni'; + $lang['strnoconversions'] = 'Nessuna conversione trovata.'; + $lang['strsourceencoding'] = 'Codifica sorgente'; + $lang['strtargetencoding'] = 'Codifica destinazione'; + + // Languages - Linguaggi + $lang['strlanguages'] = 'Linguaggi'; + $lang['strnolanguages'] = 'Nessun linguaggio trovato.'; + $lang['strtrusted'] = 'Trusted'; + + // Info + $lang['strnoinfo'] = 'Nessuna informazione disponibile.'; + $lang['strreferringtables'] = 'Tabelle referenti'; + $lang['strparenttables'] = 'Tabella padre'; + $lang['strchildtables'] = 'Tabella figlia'; + + // Aggregates - Aggregati + $lang['straggregate'] = 'Aggregato'; + $lang['straggregates'] = 'Aggregati'; + $lang['strnoaggregates'] = 'Nessun aggregato trovato.'; + $lang['stralltypes'] = '(Tutti i tipi)'; + $lang['strcreateaggregate'] = 'Crea aggregato'; + $lang['straggrsfunc'] = 'Funzione di transizione di stato'; + $lang['straggrstype'] = 'Tipo di dato per il valore di stato'; + $lang['straggrffunc'] = 'Funzione finale'; + $lang['straggrinitcond'] = 'Condizione iniziale'; + $lang['straggrsortop'] = 'Operatore di ordinamento'; + $lang['strconfdropaggregate'] = 'Eliminare l\'aggregato "%s"?'; + $lang['straggregatedropped'] = 'Aggregato eliminato.'; + $lang['straggregatedroppedbad'] = 'Eliminazione dell\'aggregato fallita.'; + $lang['straggraltered'] = 'Aggregato modificato.'; + $lang['straggralteredbad'] = 'Modifica dell\'aggregato fallita.'; + $lang['straggrneedsname'] = ' necessario specificare un nome per l\'aggregato.'; + $lang['straggrneedssfunc'] = ' necessario specificare il nome della funzione di transizione di stato per l\'aggregato.'; + $lang['straggrneedsstype'] = ' necessario specificare il tipo di dato per il valore di stato dell\'aggregato.'; + $lang['straggrcreated'] = 'Aggregato creato.'; + $lang['straggrcreatedbad'] = 'Creazione dell\'aggregato fallita.'; + $lang['straggrshowall'] = 'Mostra tutti gli aggregati'; + + // Operator classes - Classi di operatori + $lang['stropclasses'] = 'Classi di operatori'; + $lang['strnoopclasses'] = 'Nessuna classe di operatori trovata.'; + $lang['straccessmethod'] = 'Metodo di accesso'; + + // Stats and performance - Statistiche e performance + $lang['strrowperf'] = 'Performance sulle righe'; + $lang['strioperf'] = 'Performance sull\'I/O'; + $lang['stridxrowperf'] = 'Performance sulle righe per gli indici'; + $lang['stridxioperf'] = 'Performance sull\'I/O per gli indici'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Sequenziale'; + $lang['strscan'] = 'Scan'; + $lang['strread'] = 'Read'; + $lang['strfetch'] = 'Fetch'; + $lang['strheap'] = 'Heap'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST Index'; + $lang['strcache'] = 'Cache'; + $lang['strdisk'] = 'Disco'; + $lang['strrows2'] = 'Righe'; + + // Tablespaces - Tablespace + $lang['strtablespace'] = 'Tablespace'; + $lang['strtablespaces'] = 'Tablespace'; + $lang['strshowalltablespaces'] = 'Mostra tutti i tablespace'; + $lang['strnotablespaces'] = 'Nessun tablespace trovato.'; + $lang['strcreatetablespace'] = 'Crea tablespace'; + $lang['strlocation'] = 'Directory'; + $lang['strtablespaceneedsname'] = ' necessario specificare un nome per il tablespace.'; + $lang['strtablespaceneedsloc'] = ' necessario specificare una directory in cui creare il tablespace.'; + $lang['strtablespacecreated'] = 'Tablespace creato.'; + $lang['strtablespacecreatedbad'] = 'Crezione del tablespace fallita.'; + $lang['strconfdroptablespace'] = 'Eliminare il tablespace "%s"?'; + $lang['strtablespacedropped'] = 'Tablespace eliminato.'; + $lang['strtablespacedroppedbad'] = 'Eliminazione del tablespace fallita.'; + $lang['strtablespacealtered'] = 'Tablespace modificato.'; + $lang['strtablespacealteredbad'] = 'Modifica del tablespace fallita.'; + + // Slony clusters - Cluster Slony + $lang['strcluster'] = 'Cluster'; + + // Slony nodes - Nodi Slony + $lang['strid'] = 'ID'; + + // Miscellaneous - Varie + $lang['strtopbar'] = '%s in esecuzione su %s:%s -- Utente "%s"'; + $lang['strtimefmt'] = 'j M Y - g:iA'; + $lang['strhelp'] = 'Aiuto'; + $lang['strhelpicon'] = '?'; + $lang['strhelppagebrowser'] = 'Browser delle pagine di aiuto'; + $lang['strselecthelppage'] = 'Seleziona una pagina di aiuto'; + $lang['strinvalidhelppage'] = 'Pagina di aiuto non valida.'; + $lang['strlogintitle'] = 'Login su %s'; + $lang['strlogoutmsg'] = 'Logout da %s effettuato'; + $lang['strloading'] = 'Caricamento...'; + $lang['strerrorloading'] = 'Errore nel caricamento di'; + $lang['strclicktoreload'] = 'Clicca per ricaricare'; + + // Autovacuum + $lang['strautovacuum'] = 'Vacuum automatico'; + + // Prepared transactions - Transazioni preparate + $lang['strpreparedxacts'] = 'Transazioni preparate'; + $lang['strxactid'] = 'ID della transazione'; + $lang['strgid'] = 'ID globale'; +?> diff --git a/php/pgadmin/lang/japanese.php b/php/pgadmin/lang/japanese.php new file mode 100644 index 0000000..3fdc754 --- /dev/null +++ b/php/pgadmin/lang/japanese.php @@ -0,0 +1,983 @@ +>'; + $lang['strfailed'] = ''; + $lang['strcreate'] = ''; + $lang['strcreated'] = 'ޤ'; + $lang['strcomment'] = ''; + $lang['strlength'] = 'Ĺ'; + $lang['strdefault'] = 'ǥե'; + $lang['stralter'] = 'ѹ'; + $lang['strok'] = 'OK'; + $lang['strcancel'] = 'ä'; + $lang['strac'] = 'ư䴰ͭˤ'; + $lang['strsave'] = '¸'; + $lang['strreset'] = 'ꥻå'; + $lang['strinsert'] = ''; + $lang['strselect'] = ''; + $lang['strdelete'] = ''; + $lang['strupdate'] = ''; + $lang['strreferences'] = ''; + $lang['stryes'] = 'Ϥ'; + $lang['strno'] = ''; + $lang['strtrue'] = ''; + $lang['strfalse'] = ''; + $lang['stredit'] = 'Խ'; + $lang['strcolumn'] = ''; + $lang['strcolumns'] = ''; + $lang['strrows'] = '쥳'; + $lang['strrowsaff'] = 'ƶ쥳'; + $lang['strobjects'] = '֥'; + $lang['strback'] = ''; + $lang['strqueryresults'] = ''; + $lang['strshow'] = 'ɽ'; + $lang['strempty'] = 'ˤ'; + $lang['strlanguage'] = ''; + $lang['strencoding'] = '󥳡'; + $lang['strvalue'] = ''; + $lang['strunique'] = 'ˡ'; + $lang['strprimary'] = 'ץ饤ޥ'; + $lang['strexport'] = 'ݡ'; + $lang['strimport'] = 'ݡ'; + $lang['strallowednulls'] = 'NULL ʸĤ'; + $lang['strbackslashn'] = '\N'; + $lang['stremptystring'] = 'ʸ/'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = ''; + $lang['strvacuum'] = 'Х塼'; + $lang['stranalyze'] = ''; + $lang['strclusterindex'] = '饹'; +$lang['strclustered'] = 'Clustered?'; + $lang['strreindex'] = 'ƥǥå'; + $lang['strexecute'] = '¹Ԥ'; + $lang['stradd'] = 'ɲ'; + $lang['strevent'] = '٥'; + $lang['strwhere'] = 'Where'; + $lang['strinstead'] = ''; + $lang['strwhen'] = 'When'; + $lang['strformat'] = 'եޥå'; + $lang['strdata'] = 'ǡ'; + $lang['strconfirm'] = 'ǧ'; + $lang['strexpression'] = 'ɾ'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'Ÿ'; + $lang['strcollapse'] = 'Ĥ'; + $lang['strfind'] = ''; + $lang['stroptions'] = 'ץ'; + $lang['strrefresh'] = 'ɽ'; + $lang['strdownload'] = ''; + $lang['strdownloadgzipped'] = 'gzip ǰ̤ƥ'; + $lang['strinfo'] = ''; + $lang['stroids'] = 'OID '; + $lang['stradvanced'] = '٤'; + $lang['strvariables'] = 'ѿ'; + $lang['strprocess'] = 'ץ'; + $lang['strprocesses'] = 'ץ'; + $lang['strsetting'] = ''; + $lang['streditsql'] = 'SQL Խ'; + $lang['strruntime'] = '¹Ի: %s ߥ'; + $lang['strpaginate'] = '̤ΥڡʬԤ'; + $lang['struploadscript'] = 'ޤ SQL ץȤ򥢥åץ:'; + $lang['strstarttime'] = 'ϻ'; + $lang['strfile'] = 'ե'; + $lang['strfileimported'] = 'ե򥤥ݡȤޤ'; + $lang['strtrycred'] = '٤ƤΥСǤξȤ'; + $lang['stractionsonmultiplelines'] = 'ʣԤ'; + $lang['strselectall'] = '٤򤹤'; + $lang['strunselectall'] = '٤'; + $lang['strlocale'] = ''; + + // User-supplied SQL history + $lang['strhistory'] = ''; + $lang['strnohistory'] = '򤬤ޤ'; + $lang['strclearhistory'] = 'õ뤹'; + $lang['strdelhistory'] = '򤫤'; + $lang['strconfdelhistory'] = '򤫤餳׵ޤ?'; + $lang['strconfclearhistory'] = 'õޤ?'; + $lang['strnodatabaseselected'] = 'ǡ١򤷤Ƥ'; + + // Database Sizes + $lang['strsize'] = ''; + $lang['strbytes'] = 'Х'; + $lang['strkb'] = 'kB'; + $lang['strmb'] = 'MB'; + $lang['strgb'] = 'GB'; + $lang['strtb'] = 'TB'; + + // Error handling + $lang['strnoframes'] = 'ΥץꥱѤ뤿ˤϥե졼बѲǽʥ֥饦ɬפǤ'; + $lang['strnoframeslink'] = 'ե졼ƻȤ'; + $lang['strbadconfig'] = 'config.inc.php 켰Ǥ config.inc.php-dist ƺɬפޤ'; + $lang['strnotloaded'] = 'ǡ١򥵥ݡȤ褦 PHP Υѥ롦󥹥ȡ뤬Ƥޤconfigure --with-pgsql ץѤ PHP ƥѥ뤹ɬפޤ'; + $lang['strpostgresqlversionnotsupported'] = 'ΥС PostgreSQL ϥݡȤƤޤ󡣥С %s ʾ˥åץ졼ɤƤ'; + $lang['strbadschema'] = '̵Υޤꤵޤ'; + $lang['strbadencoding'] = 'ǡ١ǥ饤ȥ󥳡ɤꤷޤǤ'; + $lang['strsqlerror'] = 'SQL 顼:'; + $lang['strinstatement'] = 'ʸ:'; + $lang['strinvalidparam'] = 'ץȥѥ᡼̵Ǥ'; + $lang['strnodata'] = '쥳ɤĤޤ'; + $lang['strnoobjects'] = '֥ȤĤޤ'; + $lang['strrownotunique'] = 'Υ쥳ɤˤϰռ̻Ҥޤ'; + $lang['strnoreportsdb'] = 'ݡȥǡ١Ƥޤ󡣥ǥ쥯ȥˤ INSTALL եɤǤ'; + $lang['strnouploads'] = 'ե륢åץɤ̵Ǥ'; + $lang['strimporterror'] = 'ݡȥ顼'; + $lang['strimporterror-fileformat'] = 'ݡȥ顼: եưŪ˳Ǥޤ.'; + $lang['strimporterrorline'] = '%s ܤݡȥ顼Ǥ'; + $lang['strimporterrorline-badcolumnnum'] = '%s Ԥǥݡȥ顼: ԤäƤޤ'; + $lang['strimporterror-uploadedfile'] = 'ݡȥ顼: С˥ե򥢥åץɤ뤳ȤǤʤ⤷ޤ'; + $lang['strcannotdumponwindows'] = 'Windows Ǥʣơ֥ȥ̾ΥפϥݡȤƤޤ'; +$lang['strinvalidserverparam'] = 'Attempt to connect with invalid server parameter, possibly someone is trying to hack your system.'; + $lang['strnoserversupplied'] = 'СꤵƤޤ!'; + + // Tables + $lang['strtable'] = 'ơ֥'; + $lang['strtables'] = 'ơ֥'; + $lang['strshowalltables'] = '٤ƤΥơ֥ɽ'; + $lang['strnotables'] = 'ơ֥뤬Ĥޤ'; + $lang['strnotable'] = 'ơ֥뤬Ĥޤ'; + $lang['strcreatetable'] = 'ơ֥'; + $lang['strcreatetablelike'] = 'Υơ֥򸵤˿ơ֥'; + $lang['strcreatetablelikeparent'] = 'ơ֥'; + $lang['strcreatelikewithdefaults'] = 'DEFAULT ޤ'; + $lang['strcreatelikewithconstraints'] = 'CONSTRAINTS ޤ'; + $lang['strcreatelikewithindexes'] = 'INDEX ޤ'; + $lang['strtablename'] = 'ơ֥̾'; + $lang['strtableneedsname'] = 'ơ֥̾ꤹɬפޤ'; +$lang['strtablelikeneedslike'] = 'You must give a table to copy properties from.'; + $lang['strtableneedsfield'] = 'ʤȤĤΥեɤꤷʤФʤޤ'; + $lang['strtableneedscols'] = 'ͭʥꤷʤФʤޤ'; + $lang['strtablecreated'] = 'ơ֥ޤ'; + $lang['strtablecreatedbad'] = 'ơ֥κ˼Ԥޤ'; + $lang['strconfdroptable'] = 'ơ֥%sפ˴ޤ?'; + $lang['strtabledropped'] = 'ơ֥˴ޤ'; + $lang['strtabledroppedbad'] = 'ơ֥˴˼Ԥޤ'; + $lang['strconfemptytable'] = '˥ơ֥%sפƤ˴ޤ?'; + $lang['strtableemptied'] = 'ơ֥뤬ˤʤޤ.'; + $lang['strtableemptiedbad'] = 'ơ֥ˤǤޤǤ'; + $lang['strinsertrow'] = '쥳ɤ'; + $lang['strrowinserted'] = '쥳ɤޤ'; + $lang['strrowinsertedbad'] = '쥳ɤ˼Ԥޤ'; + $lang['strrowduplicate'] = '쥳ɤ˼Ԥʣߤޤ'; + $lang['streditrow'] = '쥳Խ'; + $lang['strrowupdated'] = '쥳ɤ򹹿ޤ'; + $lang['strrowupdatedbad'] = '쥳ɤι˼Ԥޤ'; + $lang['strdeleterow'] = '쥳ɺ'; + $lang['strconfdeleterow'] = 'ˤΥ쥳ɤޤ?'; + $lang['strrowdeleted'] = '쥳ɤޤ'; + $lang['strrowdeletedbad'] = '쥳ɤκ˼Ԥޤ'; + $lang['strinsertandrepeat'] = 'ȷ֤'; + $lang['strnumcols'] = 'ο'; + $lang['strcolneedsname'] = '̾ꤷʤФޤ'; + $lang['strselectallfields'] = '٤ƤΥեɤ򤹤'; + $lang['strselectneedscol'] = 'ʤȤ쥫ɬפǤ'; + $lang['strselectunary'] = 'ñΥڥ졼ͤĤȤǤޤ'; + $lang['strcolumnaltered'] = 'ѹޤ'; + $lang['strcolumnalteredbad'] = 'ѹ˼Ԥޤ'; + $lang['strconfdropcolumn'] = '˥%sפơ֥%sפ˴ƤǤ?'; + $lang['strcolumndropped'] = '˴ޤ'; + $lang['strcolumndroppedbad'] = '˴˼Ԥޤ'; + $lang['straddcolumn'] = 'ɲ'; + $lang['strcolumnadded'] = 'ɲäޤ'; + $lang['strcolumnaddedbad'] = 'ɲä˼Ԥޤ'; + $lang['strcascade'] = ''; + $lang['strtablealtered'] = 'ơ֥ѹޤ'; + $lang['strtablealteredbad'] = 'ơ֥ѹ˼Ԥޤ'; + $lang['strdataonly'] = 'ǡΤ'; + $lang['strstructureonly'] = '¤Τ'; + $lang['strstructureanddata'] = '¤ȥǡ'; + $lang['strtabbed'] = 'ֶڤ'; + $lang['strauto'] = 'ư'; + $lang['strconfvacuumtable'] = 'ˡ%sפХ塼षޤ?'; + $lang['strconfanalyzetable'] = '%sפʬ(ANALYZE)ޤ?'; + $lang['strestimatedrowcount'] = 'ɾѥ쥳ɿ'; + $lang['strspecifytabletoanalyze'] = 'ơ֥ϤˤϾʤȤ 1 ĻꤷʤФʤޤ'; + $lang['strspecifytabletoempty'] = 'ơ֥ˤˤϾʤȤ 1 ĻꤷʤФʤޤ'; + $lang['strspecifytabletodrop'] = 'ơ֥˴ˤϾʤȤ 1 ĻꤷʤФʤޤ'; + $lang['strspecifytabletovacuum'] = 'ơ֥Х塼हˤϾʤȤ 1 ĻꤷʤФʤޤ'; + + // Columns + $lang['strcolprop'] = 'Υץѥƥ'; + $lang['strnotableprovided'] = 'ơ֥뤬ꤵƤޤ!'; + + // Users + $lang['struser'] = '桼'; + $lang['strusers'] = '桼'; + $lang['strusername'] = '桼̾'; + $lang['strpassword'] = 'ѥ'; + $lang['strsuper'] = 'ѡ桼Ǥ?'; + $lang['strcreatedb'] = 'ǡ١ޤ?'; + $lang['strexpires'] = 'ͭ'; + $lang['strsessiondefaults'] = 'åǥե'; + $lang['strnousers'] = '桼Ĥޤ'; + $lang['struserupdated'] = '桼򹹿ޤ'; + $lang['struserupdatedbad'] = '桼ι˼Ԥޤ'; + $lang['strshowallusers'] = '٤ƤΥ桼ɽ'; + $lang['strcreateuser'] = '桼'; + $lang['struserneedsname'] = '桼̾ɬפǤ'; + $lang['strusercreated'] = '桼ޤ'; + $lang['strusercreatedbad'] = '桼κ˼Ԥޤ'; + $lang['strconfdropuser'] = '˥桼%sפ˴ޤ?'; + $lang['struserdropped'] = '桼˴ޤ'; + $lang['struserdroppedbad'] = '桼κ˴ޤ'; + $lang['straccount'] = ''; + $lang['strchangepassword'] = 'ѥѹ'; + $lang['strpasswordchanged'] = 'ѥɤѹ򤷤ޤ'; + $lang['strpasswordchangedbad'] = 'ѥɤѹ˼Ԥޤ'; + $lang['strpasswordshort'] = 'ѥɤûޤ'; + $lang['strpasswordconfirm'] = 'ѥɤγǧפޤǤ'; + + // Groups + $lang['strgroup'] = '롼'; + $lang['strgroups'] = '롼'; + $lang['strshowallgroups'] = '٤ƤΥ롼פɽ'; + $lang['strnogroup'] = '롼פޤ'; + $lang['strnogroups'] = '롼פĤޤ'; + $lang['strcreategroup'] = '롼פ'; + $lang['strgroupneedsname'] = '롼̾ꤷʤФʤޤ'; + $lang['strgroupcreated'] = '롼פޤ'; + $lang['strgroupcreatedbad'] = '롼פκ˼Ԥޤ'; + $lang['strconfdropgroup'] = '˥롼ס%sפ˴ޤ?'; + $lang['strgroupdropped'] = '롼פ˴ޤ'; + $lang['strgroupdroppedbad'] = '롼פ˴˼Ԥޤ'; + $lang['strmembers'] = 'С'; + $lang['strmemberof'] = 'Υ롼פΥС:'; + $lang['stradminmembers'] = 'С'; + $lang['straddmember'] = 'Сɲä'; + $lang['strmemberadded'] = 'Сɲäޤ'; + $lang['strmemberaddedbad'] = 'Сɲä˼Ԥޤ'; + $lang['strdropmember'] = 'С˴'; + $lang['strconfdropmember'] = '˥С%sפ򥰥롼ס%sפ˴ޤ?'; + $lang['strmemberdropped'] = 'С˴ޤ'; + $lang['strmemberdroppedbad'] = 'С˴˼Ԥޤ'; + + // Roles + $lang['strrole'] = ''; + $lang['strroles'] = ''; + $lang['strshowallroles'] = '٤ƤΥɽ'; + $lang['strnoroles'] = '뤬Ĥޤ'; + $lang['strinheritsprivs'] = 'øѤޤ?'; + $lang['strcreaterole'] = ''; + $lang['strcancreaterole'] = 'Ǥޤ?'; + $lang['strrolecreated'] = 'ޤ'; + $lang['strrolecreatedbad'] = 'κ˼Ԥޤ'; + $lang['strrolealtered'] = 'ѹޤ'; + $lang['strrolealteredbad'] = 'ѹ˼Ԥޤ'; + $lang['strcanlogin'] = 'Ǥޤ?'; + $lang['strconnlimit'] = '³'; + $lang['strdroprole'] = '˴'; + $lang['strconfdroprole'] = '˥%sפ˴ޤ?'; + $lang['strroledropped'] = '˴ޤ'; + $lang['strroledroppedbad'] = '˴˼Ԥޤ'; + $lang['strnolimit'] = '¤ʤ'; + $lang['strnever'] = 'Never'; + $lang['strroleneedsname'] = '̾ꤷʤФʤޤ'; + + // Privileges + $lang['strprivilege'] = 'ø'; + $lang['strprivileges'] = 'ø'; + $lang['strnoprivileges'] = 'Υ֥ȤøäƤޤ'; + $lang['strgrant'] = ''; + $lang['strrevoke'] = 'ѻ'; + $lang['strgranted'] = 'øͿޤ'; + $lang['strgrantfailed'] = 'øͿ˼Ԥޤ'; + $lang['strgrantbad'] = 'ʤȤͤΥ桼롼פˡʤȤҤȤĤøꤷʤФʤޤ'; + $lang['strgrantor'] = 'Ϳ'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'ǡ١'; + $lang['strdatabases'] = 'ǡ١'; + $lang['strshowalldatabases'] = '٤ƤΥǡ١ɽ'; + $lang['strnodatabases'] = 'ǡ١ޤäޤ'; + $lang['strcreatedatabase'] = 'ǡ١'; + $lang['strdatabasename'] = 'ǡ١̾'; + $lang['strdatabaseneedsname'] = 'ǡ١̾ꤷʤФʤޤ'; + $lang['strdatabasecreated'] = 'ǡ١ޤ'; + $lang['strdatabasecreatedbad'] = 'ǡ١κ˼Ԥޤ'; + $lang['strconfdropdatabase'] = '˥ǡ١%sפ˴ޤ?'; + $lang['strdatabasedropped'] = 'ǡ١˴ޤ'; + $lang['strdatabasedroppedbad'] = 'ǡ١˴˼Ԥޤ'; + $lang['strentersql'] = '˼¹ԤSQLϤޤ:'; + $lang['strsqlexecuted'] = 'SQL¹Ԥޤ'; + $lang['strvacuumgood'] = 'Х塼λޤ'; + $lang['strvacuumbad'] = 'Х塼˼Ԥޤ'; + $lang['stranalyzegood'] = 'Ϥλޤ'; + $lang['stranalyzebad'] = 'Ϥ˼Ԥޤ'; + $lang['strreindexgood'] = 'ƥǥåλޤ'; + $lang['strreindexbad'] = 'ƥǥå˼Ԥޤ'; + $lang['strfull'] = '٤'; + $lang['strfreeze'] = 'ե꡼'; + $lang['strforce'] = ''; + $lang['strsignalsent'] = 'ʥ'; + $lang['strsignalsentbad'] = 'ʥ˼Ԥޤ'; + $lang['strallobjects'] = '٤ƤΥ֥'; + $lang['strdatabasealtered'] = 'ǡ١ѹޤ'; + $lang['strdatabasealteredbad'] = 'ǡ١ѹ˼Ԥޤ'; + $lang['strspecifydatabasetodrop'] = 'ǡ١˴ˤϾʤȤ 1 ĻꤷʤФʤޤ'; + + // Views + $lang['strview'] = 'ӥ塼'; + $lang['strviews'] = 'ӥ塼'; + $lang['strshowallviews'] = '٤ƤΥӥ塼ɽ'; + $lang['strnoview'] = 'ӥ塼ޤ'; + $lang['strnoviews'] = 'ӥ塼Ĥޤ'; + $lang['strcreateview'] = 'ӥ塼'; + $lang['strviewname'] = 'ӥ塼̾'; + $lang['strviewneedsname'] = 'ӥ塼̾ꤷʤФʤޤ'; + $lang['strviewneedsdef'] = '̾ꤷʤФʤޤ'; + $lang['strviewneedsfields'] = 'ӥ塼Τ椫򤷡˾ΥꤷʤФʤޤ'; + $lang['strviewcreated'] = 'ӥ塼ޤ'; + $lang['strviewcreatedbad'] = 'ӥ塼κ˼Ԥޤ'; + $lang['strconfdropview'] = '˥ӥ塼%sפ˴ޤ?'; + $lang['strviewdropped'] = 'ӥ塼˴ޤ'; + $lang['strviewdroppedbad'] = 'ӥ塼˴˼Ԥޤ'; + $lang['strviewupdated'] = 'ӥ塼򹹿ޤ'; + $lang['strviewupdatedbad'] = 'ӥ塼ι˼Ԥޤ'; + $lang['strviewlink'] = '󥯤'; + $lang['strviewconditions'] = 'ɲþ'; + $lang['strcreateviewwiz'] = 'ɤǥӥ塼'; + $lang['strrenamedupfields'] = 'ʣܤ̾ѹ'; + $lang['strdropdupfields'] = 'ʣܤ˴'; + $lang['strerrordupfields'] = 'ʣܤΥ顼Ǥ'; + $lang['strviewaltered'] = 'ӥ塼ѹޤ'; + $lang['strviewalteredbad'] = 'ӥ塼ѹ˼Ԥޤ'; + $lang['strspecifyviewtodrop'] = 'ӥ塼˴ˤϾʤȤ 1 ĻꤷʤФʤޤ'; + + // Sequences + $lang['strsequence'] = ''; + $lang['strsequences'] = ''; + $lang['strshowallsequences'] = '٤ƤΥ󥹤ɽ'; + $lang['strnosequence'] = '󥹤ޤ'; + $lang['strnosequences'] = '󥹤Ĥޤ'; + $lang['strcreatesequence'] = '󥹤'; + $lang['strlastvalue'] = 'ǽ'; + $lang['strincrementby'] = 'ÿ'; + $lang['strstartvalue'] = ''; + $lang['strmaxvalue'] = ''; + $lang['strminvalue'] = 'Ǿ'; + $lang['strcachevalue'] = 'å'; + $lang['strlogcount'] = ''; +$lang['strcancycle'] = 'Can cycle?'; +$lang['striscalled'] = 'Will increment last value before returning next value (is_called)?'; + $lang['strsequenceneedsname'] = '̾ꤷʤФʤޤ'; + $lang['strsequencecreated'] = '󥹤ޤ'; + $lang['strsequencecreatedbad'] = '󥹤κ˼Ԥޤ'; + $lang['strconfdropsequence'] = '˥󥹡%sפ˴ޤ?'; + $lang['strsequencedropped'] = '󥹤˴ޤ'; + $lang['strsequencedroppedbad'] = '󥹤˴˼Ԥޤ'; + $lang['strsequencereset'] = '󥹥ꥻåȤԤޤ'; + $lang['strsequenceresetbad'] = '󥹤ΥꥻåȤ˼Ԥޤ'; + $lang['strsequencealtered'] = '󥹤ѹޤ'; + $lang['strsequencealteredbad'] = '󥹤ѹ˼Ԥޤ'; + $lang['strsetval'] = 'ͤꤹ'; + $lang['strsequencesetval'] = 'ͤꤷޤ'; + $lang['strsequencesetvalbad'] = 'ͤ˼Ԥޤ'; + $lang['strnextval'] = 'ͤä'; + $lang['strsequencenextval'] = 'ͤäޤ'; + $lang['strsequencenextvalbad'] = 'ͤä˼Ԥޤ'; + $lang['strspecifysequencetodrop'] = '󥹤˴ˤϾʤȤ 1 ĻꤷʤФʤޤ'; + + // Indexes + $lang['strindex'] = 'ǥå'; + $lang['strindexes'] = 'ǥå'; + $lang['strindexname'] = 'ǥå̾'; + $lang['strshowallindexes'] = '٤ƤΥǥåɽ'; + $lang['strnoindex'] = 'ǥåޤ'; + $lang['strnoindexes'] = 'ǥåĤޤ'; + $lang['strcreateindex'] = 'ǥå'; + $lang['strtabname'] = '̾'; + $lang['strcolumnname'] = '̾'; + $lang['strindexneedsname'] = 'ͭʥǥå̾ꤷʤФޤ'; + $lang['strindexneedscols'] = 'ͭʥꤷʤФޤ'; + $lang['strindexcreated'] = 'ǥåޤ'; + $lang['strindexcreatedbad'] = 'ǥåκ˼Ԥޤ'; + $lang['strconfdropindex'] = '˥ǥå%sפ˴ޤ?'; + $lang['strindexdropped'] = 'ǥå˴ޤ'; + $lang['strindexdroppedbad'] = 'ǥå˴˼Ԥޤ'; + $lang['strkeyname'] = '̾'; + $lang['struniquekey'] = 'ˡ'; + $lang['strprimarykey'] = 'ץ饤ޥꥭ'; + $lang['strindextype'] = 'ǥå'; + $lang['strtablecolumnlist'] = 'ơ֥Υ'; + $lang['strindexcolumnlist'] = 'ǥåΥ'; + $lang['strconfcluster'] = 'ˡ%sפ򥯥饹ˤޤ?'; + $lang['strclusteredgood'] = '饹λǤ'; + $lang['strclusteredbad'] = '饹˼Ԥޤ'; + + // Rules + $lang['strrules'] = '롼'; + $lang['strrule'] = '롼'; + $lang['strshowallrules'] = '٤ƤΥ롼ɽ'; + $lang['strnorule'] = '롼뤬ޤ'; + $lang['strnorules'] = '롼뤬Ĥޤ'; + $lang['strcreaterule'] = '롼'; + $lang['strrulename'] = '롼̾'; + $lang['strruleneedsname'] = '롼̾ꤷʤФʤޤ'; + $lang['strrulecreated'] = '롼ޤ'; + $lang['strrulecreatedbad'] = '롼κ˼Ԥޤ'; + $lang['strconfdroprule'] = '˥롼%sפǡ١%sפ˴ޤ?'; + $lang['strruledropped'] = '롼˴ޤ'; + $lang['strruledroppedbad'] = '롼˴˼Ԥޤ'; + + // Constraints + $lang['strconstraint'] = ''; + $lang['strconstraints'] = ''; + $lang['strshowallconstraints'] = '٤Ƥθɽ'; + $lang['strnoconstraints'] = '󤬤ޤ'; + $lang['strcreateconstraint'] = ''; + $lang['strconstraintcreated'] = 'ޤ'; + $lang['strconstraintcreatedbad'] = 'κ˼Ԥޤ'; + $lang['strconfdropconstraint'] = '˸%sפǡ١%sפ˴ޤ?'; + $lang['strconstraintdropped'] = '˴ޤ'; + $lang['strconstraintdroppedbad'] = '˴˼Ԥޤ'; + $lang['straddcheck'] = 'ɲä'; + $lang['strcheckneedsdefinition'] = 'ˤɬפǤ'; + $lang['strcheckadded'] = 'ɲäޤ'; + $lang['strcheckaddedbad'] = 'ɲä˼Ԥޤ'; + $lang['straddpk'] = 'ץ饤ޥꥭɲä'; + $lang['strpkneedscols'] = 'ץ饤ޥꥭϾʤȤ쥫ɬפȤޤ'; + $lang['strpkadded'] = 'ץ饤ޥꥭɲäޤ'; + $lang['strpkaddedbad'] = 'ץ饤ޥꥭɲä˼Ԥޤ'; + $lang['stradduniq'] = 'ˡɲä'; + $lang['struniqneedscols'] = 'ˡϾʤȤ쥫ɬפȤޤ'; + $lang['struniqadded'] = 'ˡɲäޤ'; + $lang['struniqaddedbad'] = 'ˡɲä˼Ԥޤ'; + $lang['straddfk'] = 'ɲä'; + $lang['strfkneedscols'] = 'ϾʤȤ쥫ɬפȤޤ'; + $lang['strfkneedstarget'] = 'ϥåȥơ֥ɬפȤޤ'; + $lang['strfkadded'] = 'ɲäޤ'; + $lang['strfkaddedbad'] = 'ɲä˼Ԥޤ'; + $lang['strfktarget'] = 'оݥơ֥'; + $lang['strfkcolumnlist'] = 'Υ'; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + + // Functions + $lang['strfunction'] = 'ؿ'; + $lang['strfunctions'] = 'ؿ'; + $lang['strshowallfunctions'] = '٤ƴؿɽ'; + $lang['strnofunction'] = 'ؿޤ'; + $lang['strnofunctions'] = 'ؿĤޤ'; + $lang['strcreateplfunction'] = 'SQL/PL ؿ'; + $lang['strcreateinternalfunction'] = 'ؿ'; + $lang['strcreatecfunction'] = 'C ؿ'; + $lang['strfunctionname'] = 'ؿ̾'; + $lang['strreturns'] = '֤'; + $lang['strproglanguage'] = 'ץߥ󥰸'; + $lang['strfunctionneedsname'] = 'ؿ̾ꤷʤФʤޤ'; + $lang['strfunctionneedsdef'] = 'ؿ򤷤ʤФʤꤢ'; + $lang['strfunctioncreated'] = 'ؿޤ'; + $lang['strfunctioncreatedbad'] = 'ؿκ˼Ԥޤ'; + $lang['strconfdropfunction'] = '˴ؿ%sפ˴ޤ?'; + $lang['strfunctiondropped'] = 'ؿ˴ޤ'; + $lang['strfunctiondroppedbad'] = 'ؿ˴˼Ԥޤ'; + $lang['strfunctionupdated'] = 'ؿ򹹿ޤ'; + $lang['strfunctionupdatedbad'] = 'ؿι˼Ԥޤ'; + $lang['strobjectfile'] = '֥ȥե'; + $lang['strlinksymbol'] = '󥯥ܥ'; + $lang['strarguments'] = ''; + $lang['strargmode'] = '⡼'; + $lang['strargtype'] = ''; + $lang['strargadd'] = '¾ΰɲä'; + $lang['strargremove'] = 'ΰ'; + $lang['strargnoargs'] = 'δؿϤĤΰʤǤ礦'; +$lang['strargenableargs'] = 'Enable arguments being passed to this function.'; + $lang['strargnorowabove'] = 'ιԤξ˹ԤɬפǤ'; + $lang['strargnorowbelow'] = 'ιԤβ˹ԤɬפǤ'; + $lang['strargraise'] = '˰ưޤ'; + $lang['strarglower'] = '˰ưޤ'; + $lang['strargremoveconfirm'] = 'ˤΰޤ? ᤹ȤǤޤThis CANNOT be undone'; +$lang['strfunctioncosting'] = 'Function Costing'; +$lang['strresultrows'] = 'Result Rows'; +$lang['strexecutioncost'] = 'Execution Cost'; + $lang['strspecifyfunctiontodrop'] = 'ؿ˴ˤϾʤȤ 1 ĻꤷʤФʤޤ'; + + // Triggers + $lang['strtrigger'] = 'ȥꥬ'; + $lang['strtriggers'] = 'ȥꥬ'; + $lang['strshowalltriggers'] = '٤ƤΥȥꥬɽ'; + $lang['strnotrigger'] = 'ȥꥬޤ'; + $lang['strnotriggers'] = 'ȥꥬĤޤ'; + $lang['strcreatetrigger'] = 'ȥꥬ'; + $lang['strtriggerneedsname'] = 'ȥꥬ̾ꤹɬפޤ'; + $lang['strtriggerneedsfunc'] = 'ȥꥬΤδؿꤷʤФʤޤ'; + $lang['strtriggercreated'] = 'ȥꥬޤ'; + $lang['strtriggercreatedbad'] = 'ȥꥬκ˼Ԥޤ'; + $lang['strconfdroptrigger'] = '˥ȥꥬ%sפǡ١%sפ˴ޤ?'; + $lang['strconfenabletrigger'] = 'ˡ%2$sפΥȥꥬ%1$sפͭˤޤ?'; + $lang['strconfdisabletrigger'] = 'ˡ%2$sפΥȥꥬ%1$sפ̵ˤޤ?'; + $lang['strtriggerdropped'] = 'ȥꥬ˴ޤ'; + $lang['strtriggerdroppedbad'] = 'ȥꥬ˴˼Ԥޤ'; + $lang['strtriggerenabled'] = 'ȥꥬͭˤޤ'; + $lang['strtriggerenabledbad'] = 'ȥꥬͭ˼Ԥޤ'; + $lang['strtriggerdisabled'] = 'ȥꥬ̵ˤޤ'; + $lang['strtriggerdisabledbad'] = 'ȥꥬ̵˼Ԥޤ'; + $lang['strtriggeraltered'] = 'ȥꥬѹޤ'; + $lang['strtriggeralteredbad'] = 'ȥꥬѹ˼Ԥޤ'; +$lang['strforeach'] = 'For each'; + + // Types + $lang['strtype'] = 'ǡ'; + $lang['strtypes'] = 'ǡ'; + $lang['strshowalltypes'] = '٤ƤΥǡɽ'; + $lang['strnotype'] = 'ǡޤ'; + $lang['strnotypes'] = 'ǡĤޤǤ'; + $lang['strcreatetype'] = 'ǡ'; + $lang['strcreatecomptype'] = 'ʣ緿'; +$lang['strcreateenumtype'] = 'Create enum type'; + $lang['strtypeneedsfield'] = 'ʤȤ 1 ĤΥեɤꤷʤФʤޤ'; + $lang['strtypeneedsvalue'] = 'ʤȤ 1 ĤͤꤷʤФʤޤ'; + $lang['strtypeneedscols'] = 'ͭʥեɤοꤷʤФʤޤ'; +$lang['strtypeneedsvals'] = 'You must specify a valid number of values.'; + $lang['strinputfn'] = 'ϴؿ'; + $lang['stroutputfn'] = 'ϴؿ'; +$lang['strpassbyval'] = 'Passed by val?'; + $lang['stralignment'] = '饤'; + $lang['strelement'] = ''; + $lang['strdelimiter'] = 'ǥߥ꥿'; + $lang['strstorage'] = 'ȥ졼'; + $lang['strfield'] = 'ե'; +$lang['strvalue'] = 'Value'; +$lang['strvalue'] = 'Value'; + $lang['strnumfields'] = 'եɿ'; +$lang['strnumvalues'] = 'Num. of values'; + $lang['strtypeneedsname'] = '̾ꤷʤФʤޤ'; + $lang['strtypeneedslen'] = 'ǡĹꤷʤФʤޤ'; + $lang['strtypecreated'] = 'ǡޤ'; + $lang['strtypecreatedbad'] = 'ǡκ˼Ԥޤ'; + $lang['strconfdroptype'] = '˥ǡ%sפ˴ޤ?'; + $lang['strtypedropped'] = 'ǡ˴ޤ'; + $lang['strtypedroppedbad'] = 'ǡ˴˼Ԥޤ'; + $lang['strflavor'] = ''; + $lang['strbasetype'] = ''; + $lang['strcompositetype'] = 'ʣ緿'; + $lang['strpseudotype'] = 'ǡ'; +$lang['strenum'] = 'Enum'; +$lang['strenumvalues'] = 'Enum Values'; + + // Schemas + $lang['strschema'] = ''; + $lang['strschemas'] = ''; + $lang['strshowallschemas'] = '٤ƤΥޤɽ'; + $lang['strnoschema'] = 'ޤޤ'; + $lang['strnoschemas'] = 'ޤĤޤ'; + $lang['strcreateschema'] = 'ޤ'; + $lang['strschemaname'] = '̾'; + $lang['strschemaneedsname'] = '̾ꤹɬפޤ'; + $lang['strschemacreated'] = 'ޤޤ'; + $lang['strschemacreatedbad'] = 'ޤκ˼Ԥޤ'; + $lang['strconfdropschema'] = '˥ޡ%sפ˴ޤ?'; + $lang['strschemadropped'] = 'ޤ˴ޤ'; + $lang['strschemadroppedbad'] = 'ޤ˴˼Ԥޤ'; + $lang['strschemaaltered'] = 'ޤѹޤ'; + $lang['strschemaalteredbad'] = 'ޤѹ˼Ԥޤ'; + $lang['strsearchpath'] = '޸ѥ'; + $lang['strspecifyschematodrop'] = 'ޤ˴ˤϾʤȤ 1 ĻꤷʤФʤޤ'; + + // Reports + $lang['strreport'] = 'ݡ'; + $lang['strreports'] = 'ݡ'; + $lang['strshowallreports'] = '٤ƤΥݡȤɽ'; + $lang['strnoreports'] = 'ݡȤĤޤ'; + $lang['strcreatereport'] = 'ݡȤ'; + $lang['strreportdropped'] = 'ݡȤ˴ޤ'; + $lang['strreportdroppedbad'] = 'ݡȤ˴˼Ԥޤ'; + $lang['strconfdropreport'] = '˥ݡȡ%sפ˴ޤ?'; + $lang['strreportneedsname'] = 'ݡ̾ꤹɬפޤ'; + $lang['strreportneedsdef'] = 'ݡѤSQLꤹɬפޤ'; + $lang['strreportcreated'] = 'ݡȤ¸򤷤ޤ'; + $lang['strreportcreatedbad'] = 'ݡȤ¸˼Ԥޤ'; + + // Domains + $lang['strdomain'] = 'ɥᥤ'; + $lang['strdomains'] = 'ɥᥤ'; + $lang['strshowalldomains'] = '٤ƤΥɥᥤɽ'; + $lang['strnodomains'] = 'ɥᥤ󤬤ޤ'; + $lang['strcreatedomain'] = 'ɥᥤ'; + $lang['strdomaindropped'] = 'ɥᥤ˴ޤ'; + $lang['strdomaindroppedbad'] = 'ɥᥤ˴˼Ԥޤ'; + $lang['strconfdropdomain'] = '˥ɥᥤ%sפ˴ޤ?'; + $lang['strdomainneedsname'] = 'ɥᥤ̾ꤹɬפޤ'; + $lang['strdomaincreated'] = 'ɥᥤޤ'; + $lang['strdomaincreatedbad'] = 'ɥᥤκ˼Ԥޤ'; + $lang['strdomainaltered'] = 'ɥᥤѹޤ'; + $lang['strdomainalteredbad'] = 'ɥᥤѹ˼Ԥޤ'; + + // Operators + $lang['stroperator'] = '黻'; + $lang['stroperators'] = '黻'; + $lang['strshowalloperators'] = '٤Ƥα黻Ҥɽ'; + $lang['strnooperator'] = '黻ҤĤޤ'; + $lang['strnooperators'] = '黻ҥ饹Ĥޤ'; + $lang['strcreateoperator'] = '黻Ҥޤ'; + $lang['strleftarg'] = ''; + $lang['strrightarg'] = ''; + $lang['strcommutator'] = ''; + $lang['strnegator'] = ''; + $lang['strrestrict'] = ''; + $lang['strjoin'] = ''; + $lang['strhashes'] = 'ϥå'; + $lang['strmerges'] = 'ʻ'; + $lang['strleftsort'] = ''; + $lang['strrightsort'] = ''; + $lang['strlessthan'] = '̤'; + $lang['strgreaterthan'] = 'ʾ'; + $lang['stroperatorneedsname'] = '黻̾ꤹɬפޤ'; + $lang['stroperatorcreated'] = '黻Ҥޤ'; + $lang['stroperatorcreatedbad'] = '黻Ҥκ˼Ԥޤ'; + $lang['strconfdropoperator'] = '˱黻ҡ%sפ˴ޤ?'; + $lang['stroperatordropped'] = '黻Ҥ˴ޤ'; + $lang['stroperatordroppedbad'] = '黻Ҥ˴˼Ԥޤ'; + + // Casts + $lang['strcasts'] = '㥹'; + $lang['strnocasts'] = '㥹ȤĤޤ'; + $lang['strsourcetype'] = ''; + $lang['strtargettype'] = 'åȥ'; + $lang['strimplicit'] = ''; +$lang['strinassignment'] = 'In assignment'; + $lang['strbinarycompat'] = '(Хʥ꡼ߴ)'; + + // Conversions + $lang['strconversions'] = 'Ѵ'; + $lang['strnoconversions'] = 'ѴĤޤ'; + $lang['strsourceencoding'] = 'Ѵ󥳡'; + $lang['strtargetencoding'] = 'Ѵ襨󥳡'; + + // Languages + $lang['strlanguages'] = ''; + $lang['strnolanguages'] = '줬¸ߤޤ'; +$lang['strtrusted'] = 'Trusted'; + + // Info + $lang['strnoinfo'] = 'ͭʾ󤬤ޤ'; + $lang['strreferringtables'] = 'ȥơ֥'; + $lang['strparenttables'] = 'ƥơ֥'; + $lang['strchildtables'] = 'ҥơ֥'; + + // Aggregates + $lang['straggregate'] = ''; + $lang['straggregates'] = ''; + $lang['strnoaggregates'] = 'פޤ'; + $lang['stralltypes'] = '(٤Ƥμ)'; + $lang['strcreateaggregate'] = 'פ'; + $lang['straggrbasetype'] = 'ϥǡμ'; + $lang['straggrsfunc'] = 'ܴؿ'; + $lang['straggrstype'] = '֥ǡμ'; + $lang['straggrffunc'] = 'λؿ'; + $lang['straggrinitcond'] = ''; + $lang['straggrsortop'] = ''; + $lang['strconfdropaggregate'] = '˽ס%sפ˴ޤ?'; + $lang['straggregatedropped'] = 'פ˴ޤ'; + $lang['straggregatedroppedbad'] = 'פ˴˼Ԥޤ'; + $lang['straggraltered'] = 'פѹޤ'; + $lang['straggralteredbad'] = 'פѹ˼Ԥޤ'; + $lang['straggrneedsname'] = 'פ̾ꤷʤФʤޤ'; + $lang['straggrneedsbasetype'] = 'פϥǡμꤷʤФʤޤ'; + $lang['straggrneedssfunc'] = 'פϾܴؿ̾ꤷʤФʤޤ'; + $lang['straggrneedsstype'] = 'פξͤΥǡμꤷʤФʤޤ'; + $lang['straggrcreated'] = 'פޤ'; + $lang['straggrcreatedbad'] = 'פκ˼Ԥޤ'; + $lang['straggrshowall'] = '٤Ƥνפɽ'; + + // Operator Classes + $lang['stropclasses'] = '黻ҥ饹'; + $lang['strnoopclasses'] = '黻ҥ饹Ĥޤ'; + $lang['straccessmethod'] = 'ˡ'; + + // Stats and performance + $lang['strrowperf'] = 'ԥѥեޥ'; + $lang['strioperf'] = 'I/O ѥեޥ'; + $lang['stridxrowperf'] = 'ǥåԥѥեޥ'; + $lang['stridxioperf'] = 'ǥå I/O ѥեޥ'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = '󥷥'; + $lang['strscan'] = ''; + $lang['strread'] = 'ɹ'; + $lang['strfetch'] = ''; + $lang['strheap'] = 'ҡ'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST ǥå'; + $lang['strcache'] = 'å'; + $lang['strdisk'] = 'ǥ'; + $lang['strrows2'] = ''; + + // Tablespaces + $lang['strtablespace'] = 'ơ֥'; + $lang['strtablespaces'] = 'ơ֥'; + $lang['strshowalltablespaces'] = '٤ƤΥơ֥륹ڡɽ'; + $lang['strnotablespaces'] = 'ơ֥֤Ĥޤ'; + $lang['strcreatetablespace'] = 'ơ֥֤'; + $lang['strlocation'] = ''; + $lang['strtablespaceneedsname'] = 'ơ֥̾ꤹɬפޤ'; + $lang['strtablespaceneedsloc'] = 'ơֺ֥򤹤ǥ쥯ȥꤹɬפޤ'; + $lang['strtablespacecreated'] = 'ơ֥֤ޤ'; + $lang['strtablespacecreatedbad'] = 'ơ֥֤κ˼Ԥޤ'; + $lang['strconfdroptablespace'] = '˥ơ֥֡%sפ˴ޤ?'; + $lang['strtablespacedropped'] = 'ơ֥֤˴ޤ'; + $lang['strtablespacedroppedbad'] = 'ơ֥֤˴˼Ԥޤ'; + $lang['strtablespacealtered'] = 'ơ֥֤ѹޤ'; + $lang['strtablespacealteredbad'] = 'ơ֥֤ѹ˼Ԥޤ'; + + // Slony clusters + $lang['strcluster'] = '饹'; + $lang['strnoclusters'] = '饹Ĥޤ'; + $lang['strconfdropcluster'] = '˥饹%sפ˴ޤ?'; + $lang['strclusterdropped'] = '饹˴ޤ'; + $lang['strclusterdroppedbad'] = '饹˴˼Ԥޤ'; + $lang['strinitcluster'] = '饹'; + $lang['strclustercreated'] = '饹ޤ'; + $lang['strclustercreatedbad'] = '饹ν˼Ԥޤ'; + $lang['strclusterneedsname'] = '饹̾Ϳɬפޤ'; + $lang['strclusterneedsnodeid'] = 'Ρɤ ID Ϳɬפޤ'; + + // Slony nodes + $lang['strnodes'] = 'Ρ'; + $lang['strnonodes'] = 'ΡɤĤޤ'; + $lang['strcreatenode'] = 'Ρɤ'; + $lang['strid'] = 'ID'; + $lang['stractive'] = 'ƥ'; + $lang['strnodecreated'] = 'Ρɤޤ'; + $lang['strnodecreatedbad'] = 'Ρɤκ˼Ԥޤ'; + $lang['strconfdropnode'] = '˥Ρɡ%sפ˴ޤ?'; + $lang['strnodedropped'] = 'Ρɤ˴ޤ'; + $lang['strnodedroppedbad'] = 'Ρɤ˴˼Ԥޤ'; + $lang['strfailover'] = 'ե륪С'; + $lang['strnodefailedover'] = 'Ρɤե륪Сޤ'; + $lang['strnodefailedoverbad'] = 'ΡɤΥե륪С˼Ԥޤ'; + $lang['strstatus'] = ''; +$lang['strhealthy'] = 'Healthy'; +$lang['stroutofsync'] = 'Out of Sync'; + $lang['strunknown'] = ''; + + // Slony paths + $lang['strpaths'] = 'ѥ'; + $lang['strnopaths'] = 'ѥĤޤ'; + $lang['strcreatepath'] = 'ѥ'; + $lang['strnodename'] = 'Ρ̾'; + $lang['strnodeid'] = 'Ρ ID'; + $lang['strconninfo'] = '³ʸ'; + $lang['strconnretry'] = '³κƼ¹ԤޤǤÿ'; + $lang['strpathneedsconninfo'] = 'ѥ³ʸͿɬפޤ'; + $lang['strpathneedsconnretry'] = '³κƼ¹ԤޤǤÿͿɬפޤ'; + $lang['strpathcreated'] = 'ѥޤ'; + $lang['strpathcreatedbad'] = 'ѥκ˼Ԥޤ'; + $lang['strconfdroppath'] = '˥ѥ%sפ˴ޤ?'; + $lang['strpathdropped'] = 'ѥ˴ޤ'; + $lang['strpathdroppedbad'] = 'ѥ˴˼Ԥޤ'; + + // Slony listens + $lang['strlistens'] = 'å'; + $lang['strnolistens'] = 'å󤬸Ĥޤ'; + $lang['strcreatelisten'] = 'å'; + $lang['strlistencreated'] = 'åޤ'; + $lang['strlistencreatedbad'] = 'åκ˼Ԥޤ'; + $lang['strconfdroplisten'] = '˥å%sפ˴ޤ?'; + $lang['strlistendropped'] = 'å˴ޤ'; + $lang['strlistendroppedbad'] = 'å˴˼Ԥޤ'; + + // Slony replication sets + $lang['strrepsets'] = 'ץꥱ󥻥å'; + $lang['strnorepsets'] = 'ץꥱ󥻥åȤĤޤ'; + $lang['strcreaterepset'] = 'ץꥱ󥻥åȤ'; + $lang['strrepsetcreated'] = 'ץꥱ󥻥åȤޤ'; + $lang['strrepsetcreatedbad'] = 'ץꥱ󥻥åȤκ˼Ԥޤ'; + $lang['strconfdroprepset'] = '˥ץꥱ󥻥åȡ%sפ˴ޤ?'; + $lang['strrepsetdropped'] = 'ץꥱ󥻥åȤ˴ޤ'; + $lang['strrepsetdroppedbad'] = 'ץꥱ󥻥åȤ˴˼Ԥޤ'; + $lang['strmerge'] = '礹'; + $lang['strmergeinto'] = ''; + $lang['strrepsetmerged'] = 'ץꥱ󥻥åȤ礷ޤ'; + $lang['strrepsetmergedbad'] = 'ץꥱ󥻥åȤ˼Ԥޤ'; + $lang['strmove'] = 'ư'; + $lang['strneworigin'] = 'ꥸ'; + $lang['strrepsetmoved'] = 'ץꥱ󥻥åȤưޤ'; + $lang['strrepsetmovedbad'] = 'ץꥱ󥻥åȤΰư˼Ԥޤ'; + $lang['strnewrepset'] = 'ץꥱ󥻥å'; + $lang['strlock'] = 'å'; + $lang['strlocked'] = 'å'; + $lang['strunlock'] = 'å'; + $lang['strconflockrepset'] = '˥ץꥱ󥻥åȡ%sפåޤ?'; + $lang['strrepsetlocked'] = 'ץꥱ󥻥åȤåޤ'; + $lang['strrepsetlockedbad'] = 'ץꥱ󥻥åȤΥå˼Ԥޤ'; + $lang['strconfunlockrepset'] = '˥ץꥱ󥻥åȡ%sפΥåޤ?'; + $lang['strrepsetunlocked'] = 'ץꥱ󥻥åȤޤ'; + $lang['strrepsetunlockedbad'] = 'ץꥱ󥻥åȤβ˼Ԥޤ'; + $lang['stronlyonnode'] = 'ΡɤǤΤ'; + $lang['strddlscript'] = 'DDL ץ'; + $lang['strscriptneedsbody'] = '٤ƤΥΡɾǼ¹Ԥ륹ץȤ󶡤ʤФʤޤ'; + $lang['strscriptexecuted'] = 'ץꥱ󥻥åȤ DDL ץȤ¹Ԥޤ'; + $lang['strscriptexecutedbad'] = 'ץꥱ󥻥åȤǤ DDL ץȤμ¹Ԥ˼Ԥޤ'; + $lang['strtabletriggerstoretain'] = 'Υȥꥬ Slony ˤ̵ˤʤʤǤ礦:'; + + // Slony tables in replication sets + $lang['straddtable'] = 'ơ֥ɲä'; + $lang['strtableneedsuniquekey'] = 'ɲäơ֥ϥץ饤ޥ꤫ˡ׵ᤷޤ'; + $lang['strtableaddedtorepset'] = 'ץꥱ󥻥åȤ˥ơ֥ɲäޤ'; + $lang['strtableaddedtorepsetbad'] = 'ץꥱ󥻥åȤؤΥơ֥ɲä˼Ԥޤ'; + $lang['strconfremovetablefromrepset'] = '˥ץꥱ󥻥åȡ%sפơ֥%sפޤ?'; + $lang['strtableremovedfromrepset'] = 'ץꥱ󥻥åȤơ֥ޤ'; + $lang['strtableremovedfromrepsetbad'] = 'ץꥱ󥻥åȤơ֥κ˼Ԥޤ'; + + // Slony sequences in replication sets + $lang['straddsequence'] = '󥹤ɲä'; + $lang['strsequenceaddedtorepset'] = 'ץꥱ󥻥åȤ˥󥹤ɲäޤ'; + $lang['strsequenceaddedtorepsetbad'] = 'ץꥱ󥻥åȤؤΥ󥹤ɲä˼Ԥޤ'; + $lang['strconfremovesequencefromrepset'] = '˥ץꥱ󥻥åȡ%sפ饷󥹡%sפޤ?'; + $lang['strsequenceremovedfromrepset'] = 'ץꥱ󥻥åȤ饷󥹤ޤ'; + $lang['strsequenceremovedfromrepsetbad'] = 'ץꥱ󥻥åȤ饷󥹤κ˼Ԥޤ'; + + // Slony subscriptions + $lang['strsubscriptions'] = '֥ץ'; + $lang['strnosubscriptions'] = '֥ץ󤬸Ĥޤ'; + + // Miscellaneous + $lang['strtopbar'] = 'С %2$s Υݡֹ %3$s Ǽ¹ %1$s ³ -- 桼%4$sפȤƥ'; + $lang['strtimefmt'] = 'Y ǯ n j G:i'; + $lang['strhelp'] = 'إ'; + $lang['strhelpicon'] = '?'; + $lang['strhelppagebrowser'] = 'إץڡ֥饦'; + $lang['strselecthelppage'] = 'إץڡǤ'; + $lang['strinvalidhelppage'] = '̵ʥإץڡǤ'; + $lang['strlogintitle'] = '%s ˥'; + $lang['strlogoutmsg'] = '%s Ȥޤ'; + $lang['strloading'] = 'ɤ߹...'; + $lang['strerrorloading'] = 'ɤ߹Υ顼Ǥ'; + $lang['strclicktoreload'] = 'åǺɤ߹'; + + // Autovacuum + $lang['strautovacuum'] = 'ȥХ塼'; + $lang['strturnedon'] = 'ˤ'; + $lang['strturnedoff'] = 'դˤ'; +$lang['strenabled'] = 'Enabled'; + $lang['strvacuumbasethreshold'] = 'ͤ˴ŤХ塼'; +$lang['strvacuumscalefactor'] = 'Vacuum Scale Factor'; + $lang['stranalybasethreshold'] = 'ͤ˴Ť'; +$lang['stranalyzescalefactor'] = 'Analyze Scale Factor'; +$lang['strvacuumcostdelay'] = 'Vacuum Cost Delay'; +$lang['strvacuumcostlimit'] = 'Vacuum Cost Limit'; + + // Table-level Locks + $lang['strlocks'] = 'å'; + $lang['strtransaction'] = 'ȥ󥶥 ID'; + $lang['strvirtualtransaction'] = 'ۥȥ󥶥 ID'; + $lang['strprocessid'] = 'ץ ID'; + $lang['strmode'] = 'å⡼'; +$lang['strislockheld'] = 'Is lock held?'; + + // Prepared transactions + $lang['strpreparedxacts'] = 'ץڥѤȥ󥶥'; + $lang['strxactid'] = 'ȥ󥶥 ID'; + $lang['strgid'] = ' ID'; + + // Fulltext search + $lang['strfulltext'] = 'ʸƥȸ'; + $lang['strftsconfig'] = 'FTS '; + $lang['strftsconfigs'] = ''; + $lang['strftscreateconfig'] = 'FTS κ'; + $lang['strftscreatedict'] = ''; + $lang['strftscreatedicttemplate'] = 'Υƥץ졼Ȥ'; + $lang['strftscreateparser'] = 'ѡ'; + $lang['strftsnoconfigs'] = 'FTS ꤬Ĥޤ'; + $lang['strftsconfigdropped'] = 'FTS ˴ޤ'; + $lang['strftsconfigdroppedbad'] = 'FTS ˴˼Ԥޤ'; + $lang['strconfdropftsconfig'] = ' FTS %sפ˴ޤ?'; + $lang['strconfdropftsdict'] = ' FTS %sפ˴ޤ?'; + $lang['strconfdropftsmapping'] = ' FTS %sפΥޥåס%sפ˴ޤ?'; + $lang['strftstemplate'] = 'ƥץ졼'; + $lang['strftsparser'] = 'ѡ'; + $lang['strftsconfigneedsname'] = 'FTS ˤ̾ꤹɬפޤ'; + $lang['strftsconfigcreated'] = 'FTS ޤ'; + $lang['strftsconfigcreatedbad'] = 'FTS κ˼Ԥޤ'; +$lang['strftsmapping'] = 'Mapping'; + $lang['strftsdicts'] = ''; + $lang['strftsdict'] = ''; + $lang['strftsemptymap'] = 'FTS ޥåפǤ'; +$lang['strftswithmap'] = 'With map'; +$lang['strftsmakedefault'] = 'Make default for given locale'; + $lang['strftsconfigaltered'] = 'FTS ѹޤ'; + $lang['strftsconfigalteredbad'] = 'FTS ѹ˼Ԥޤ'; + $lang['strftsconfigmap'] = 'FTS ޥå'; + $lang['strftsparsers'] = 'FTS ѡ'; + $lang['strftsnoparsers'] = 'ѤǤ FTS ѡޤ'; + $lang['strftsnodicts'] = 'ѤǤ FTS 񤬤ޤ'; + $lang['strftsdictcreated'] = 'FTS ޤ'; + $lang['strftsdictcreatedbad'] = 'FTS κ˼Ԥޤ'; +$lang['strftslexize'] = 'Lexize'; +$lang['strftsinit'] = 'Init'; + $lang['strftsoptionsvalues'] = 'ץ'; + $lang['strftsdictneedsname'] = 'FTS ̾ꤷʤФʤޤ'; + $lang['strftsdictdropped'] = 'FTS ˴ޤ'; + $lang['strftsdictdroppedbad'] = 'FTS ˴˼Ԥޤ'; + $lang['strftsdictaltered'] = 'FTS ѹޤ'; + $lang['strftsdictalteredbad'] = 'FTS ѹ˼Ԥޤ'; + $lang['strftsaddmapping'] = 'ޥåפɲä'; + $lang['strftsspecifymappingtodrop'] = 'ޥåפ˴򤹤ˤϾʤȤ 1 ĻꤷʤФʤޤ'; + $lang['strftsspecifyconfigtoalter'] = 'FTS ѹˤϻꤷʤФʤޤ'; + $lang['strftsmappingdropped'] = 'FTS ޥåפ˴ޤ'; + $lang['strftsmappingdroppedbad'] = 'FTS ޥåפ˴˼Ԥޤ'; + $lang['strftsnodictionaries'] = '񤬸Ĥޤ'; + $lang['strftsmappingaltered'] = 'FTS ޥåפѹޤ'; + $lang['strftsmappingalteredbad'] = 'FTS ޥåפѹ˼Ԥޤ'; + $lang['strftsmappingadded'] = 'FTS ޥåפɲäޤ'; + $lang['strftsmappingaddedbad'] = 'FTS ޥåפɲä˼Ԥޤ'; + $lang['strftsmappingdropped'] = 'FTS ޥåפ˴ޤ'; + $lang['strftsmappingdroppedbad'] = 'FTS ޥåפ˴˼Ԥޤ'; + $lang['strftstabconfigs'] = ''; + $lang['strftstabdicts'] = ''; + $lang['strftstabparsers'] = 'ѡ'; + + +?> diff --git a/php/pgadmin/lang/langcheck b/php/pgadmin/lang/langcheck new file mode 100644 index 0000000..78f91e4 --- /dev/null +++ b/php/pgadmin/lang/langcheck @@ -0,0 +1,65 @@ +#!/usr/local/bin/php -q +\n\n"; + echo " is the filename without the .php extension\n"; + exit; + } + elseif (!file_exists("{$_SERVER['argv'][1]}.php")) { + echo "Error: File not found.\n"; + exit; + } + + // Include english source file + include('./english.php'); + + $master = $lang; + $master_keys = array_keys($lang); + unset($lang); + + // Include target language file + include("./{$_SERVER['argv'][1]}.php"); + $slave = $lang; + $slave_keys = array_keys($lang); + + echo "Source file: english.php\n"; + echo "Target file: {$_SERVER['argv'][1]}.php\n\n"; + + // Find missing values + $diff = array_diff($master_keys, $slave_keys); + echo "Missing Strings\n"; + echo "---------------\n\n"; + if (sizeof($diff) > 0) { + foreach ($diff as $v) { + echo "\$lang['{$v}'] = '", str_replace("'", "\\'", $master[$v]), "';\n"; + } + echo "\n"; + echo "Translations: ", sizeof($master_keys) - sizeof($diff), "/", sizeof($master_keys), "\n\n"; + + } + else echo "None\n\n"; + + // Find extra values (to be deleted) + $diff = array_diff($slave_keys, $master_keys); + echo "Deleted Strings\n"; + echo "---------------\n\n"; + if (sizeof($diff) > 0) { + foreach ($diff as $v) { + echo "\$lang['{$v}'] = '", str_replace("'", "\\'", $slave[$v]), "';\n"; + } + } + else echo "None\n"; + +?> diff --git a/php/pgadmin/lang/mongol.php b/php/pgadmin/lang/mongol.php new file mode 100644 index 0000000..ddb96ac --- /dev/null +++ b/php/pgadmin/lang/mongol.php @@ -0,0 +1,541 @@ +'; + $lang['strfirst'] = '<< '; + $lang['strlast'] = '?? >>'; + $lang['strfailed'] = ''; + $lang['strcreate'] = '??'; + $lang['strcreated'] = '??'; + $lang['strcomment'] = ''; + $lang['strlength'] = ''; + $lang['strdefault'] = ' '; + $lang['stralter'] = '???'; + $lang['strok'] = 'OK'; + $lang['strcancel'] = '?? '; + $lang['strsave'] = ''; + $lang['strreset'] = ''; + $lang['strinsert'] = ' '; + $lang['strselect'] = ''; + $lang['strdelete'] = ''; + $lang['strupdate'] = ''; + $lang['strreferences'] = ''; + $lang['stryes'] = ''; + $lang['strno'] = '??'; + $lang['strtrue'] = '?'; + $lang['strfalse'] = ''; + $lang['stredit'] = ''; + $lang['strcolumns'] = ''; + $lang['strrows'] = '?'; + $lang['strobjects'] = ''; + $lang['strexample'] = ' '; + $lang['strback'] = ''; + $lang['strqueryresults'] = ' ? ?'; + $lang['strshow'] = '?'; + $lang['strempty'] = ''; + $lang['strlanguage'] = ''; + $lang['strencoding'] = ''; + $lang['strvalue'] = ''; + $lang['strunique'] = ''; + $lang['strprimary'] = '?'; + $lang['strexport'] = ''; + $lang['strimport'] = ''; + $lang['strsql'] = 'SQL'; + $lang['strgo'] = '???'; + $lang['stradmin'] = ' '; + $lang['strvacuum'] = 'Vacuum'; + $lang['stranalyze'] = '? '; + $lang['strclusterindex'] = ''; + $lang['strclustered'] = ''; + $lang['strreindex'] = ' '; + $lang['strrun'] = ''; + $lang['stradd'] = ''; + $lang['strevent'] = '??'; + $lang['strwhere'] = ''; + $lang['strinstead'] = ' '; + $lang['strwhen'] = ''; + $lang['strformat'] = ''; + $lang['strdata'] = '???'; + $lang['strconfirm'] = ''; + $lang['strexpression'] = '?'; + $lang['strellipsis'] = '...'; + $lang['strexpand'] = '???'; + $lang['strcollapse'] = ''; + $lang['strexplain'] = ''; + $lang['strfind'] = ''; + $lang['stroptions'] = ''; + $lang['strrefresh'] = ''; + $lang['strdownload'] = ' '; + $lang['strinfo'] = ''; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = ''; + + // Error handling + $lang['strbadconfig'] = ' config.inc.php . config.inc.php-dist ? ??.'; + $lang['strnotloaded'] = ' PHP PostgreSQL ?? ? . PHP ? --with-pgsql .'; + $lang['strbadschema'] = ' '; + $lang['strbadencoding'] = 'Failed to set client encoding in database.'; + $lang['strsqlerror'] = 'SQL :'; + $lang['strinstatement'] = ' :'; + $lang['strinvalidparam'] = ' .'; + $lang['strnodata'] = ' .'; + $lang['strnoobjects'] = ' .'; + $lang['strrownotunique'] = ' .'; + + // Tables + $lang['strtable'] = ''; + $lang['strtables'] = ''; + $lang['strshowalltables'] = ' '; + $lang['strnotables'] = ' .'; + $lang['strnotable'] = ' .'; + $lang['strcreatetable'] = ' '; + $lang['strtablename'] = ' '; + $lang['strtableneedsname'] = ' .'; + $lang['strtableneedsfield'] = ' .'; + $lang['strtableneedscols'] = ' .'; + $lang['strtablecreated'] = ' .'; + $lang['strtablecreatedbad'] = ' .'; + $lang['strconfdroptable'] = ' , "%s"?'; + $lang['strtabledropped'] = ' .'; + $lang['strtabledroppedbad'] = ' .'; + $lang['strconfemptytable'] = ' , "%s"?'; + $lang['strtableemptied'] = ' .'; + $lang['strtableemptiedbad'] = ' .'; + $lang['strinsertrow'] = ' '; + $lang['strrowinserted'] = ' .'; + $lang['strrowinsertedbad'] = ' .'; + $lang['streditrow'] = ' '; + $lang['strrowupdated'] = ' .'; + $lang['strrowupdatedbad'] = ' .'; + $lang['strdeleterow'] = ' '; + $lang['strconfdeleterow'] = ' , ?'; + $lang['strrowdeleted'] = ' .'; + $lang['strrowdeletedbad'] = ' .'; + $lang['strsaveandrepeat'] = ' '; + $lang['strfield'] = ''; + $lang['strfields'] = ''; + $lang['strnumfields'] = '- '; + $lang['strfieldneedsname'] = ' '; + $lang['strselectallfields'] = ' '; + $lang['strselectneedscol'] = ' '; + $lang['strselectunary'] = ' .'; + $lang['straltercolumn'] = ' '; + $lang['strcolumnaltered'] = ' .'; + $lang['strcolumnalteredbad'] = ' .'; + $lang['strconfdropcolumn'] = ' , "%s" "%s"?'; + $lang['strcolumndropped'] = ' .'; + $lang['strcolumndroppedbad'] = ' .'; + $lang['straddcolumn'] = ' '; + $lang['strcolumnadded'] = ' .'; + $lang['strcolumnaddedbad'] = ' .'; + $lang['strdataonly'] = ' '; + $lang['strcascade'] = ''; + $lang['strtablealtered'] = ' .'; + $lang['strtablealteredbad'] = ' .'; + $lang['strdataonly'] = ' '; + $lang['strstructureonly'] = ' '; + $lang['strstructureanddata'] = ' '; + + // Users + $lang['struser'] = ''; + $lang['strusers'] = ''; + $lang['strusername'] = ' '; + $lang['strpassword'] = ''; + $lang['strsuper'] = '?'; + $lang['strcreatedb'] = ' ?'; + $lang['strexpires'] = ' '; + $lang['strnousers'] = ' .'; + $lang['struserupdated'] = ' .'; + $lang['struserupdatedbad'] = ' .'; + $lang['strshowallusers'] = ' '; + $lang['strcreateuser'] = ' '; + $lang['struserneedsname'] = ' .'; + $lang['strusercreated'] = ' .'; + $lang['strusercreatedbad'] = ' .'; + $lang['strconfdropuser'] = ' , "%s"?'; + $lang['struserdropped'] = ' .'; + $lang['struserdroppedbad'] = ' .'; + $lang['straccount'] = ''; + $lang['strchangepassword'] = ' '; + $lang['strpasswordchanged'] = ' .'; + $lang['strpasswordchangedbad'] = ' .'; + $lang['strpasswordshort'] = ' .'; + $lang['strpasswordconfirm'] = ' .'; + + // Groups + $lang['strgroup'] = ''; + $lang['strgroups'] = ''; + $lang['strnogroup'] = ' .'; + $lang['strnogroups'] = ' .'; + $lang['strcreategroup'] = ' '; + $lang['strshowallgroups'] = ' '; + $lang['strgroupneedsname'] = ' .'; + $lang['strgroupcreated'] = ' .'; + $lang['strgroupcreatedbad'] = ' .'; + $lang['strconfdropgroup'] = ' , "%s"?'; + $lang['strgroupdropped'] = ' .'; + $lang['strgroupdroppedbad'] = ' .'; + $lang['strmembers'] = ''; + $lang['straddmember'] = ' '; + $lang['strmemberadded'] = ' .'; + $lang['strmemberaddedbad'] = ' .'; + $lang['strdropmember'] = ' '; + $lang['strconfdropmember'] = ' , "%s" "%s"?'; + $lang['strmemberdropped'] = ' .'; + $lang['strmemberdroppedbad'] = ' .'; + + // Privilges + $lang['strprivilege'] = ''; + $lang['strprivileges'] = ''; + $lang['strnoprivileges'] = ' .'; + $lang['strgrant'] = ''; + $lang['strrevoke'] = ''; + $lang['strgranted'] = ' .'; + $lang['strgrantfailed'] = ' .'; + $lang['strgrantbad'] = ' .'; + $lang['stralterprivs'] = ' '; + $lang['strgrantor'] = ''; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = ' '; + $lang['strdatabases'] = ' '; + $lang['strshowalldatabases'] = ' '; + $lang['strnodatabase'] = ' .'; + $lang['strnodatabases'] = ' .'; + $lang['strcreatedatabase'] = ' '; + $lang['strdatabasename'] = ' '; + $lang['strdatabaseneedsname'] = ' .'; + $lang['strdatabasecreated'] = ' .'; + $lang['strdatabasecreatedbad'] = ' .'; + $lang['strconfdropdatabase'] = ' , "%s"?'; + $lang['strdatabasedropped'] = ' .'; + $lang['strdatabasedroppedbad'] = ' .'; + $lang['strentersql'] = ' SQL- :'; + $lang['strvacuumgood'] = ' .'; + $lang['strvacuumbad'] = ' .'; + $lang['stranalyzegood'] = ' .'; + $lang['stranalyzebad'] = ' .'; + + // Views + $lang['strview'] = ''; + $lang['strviews'] = ''; + $lang['strshowallviews'] = ' '; + $lang['strnoview'] = ' .'; + $lang['strnoviews'] = ' .'; + $lang['strcreateview'] = ' '; + $lang['strviewname'] = ' '; + $lang['strviewneedsname'] = ' .'; + $lang['strviewneedsdef'] = ' .'; + $lang['strviewcreated'] = ' .'; + $lang['strviewcreatedbad'] = ' .'; + $lang['strconfdropview'] = ' , "%s"?'; + $lang['strviewdropped'] = ' .'; + $lang['strviewdroppedbad'] = ' .'; + $lang['strviewupdated'] = ' .'; + $lang['strviewupdatedbad'] = ' .'; + + // Sequences + $lang['strsequence'] = ''; + $lang['strsequences'] = ' '; + $lang['strshowallsequences'] = ' '; + $lang['strnosequence'] = ' .'; + $lang['strnosequences'] = ' .'; + $lang['strcreatesequence'] = ' '; + $lang['strlastvalue'] = ' '; + $lang['strincrementby'] = ' '; + $lang['strstartvalue'] = ' '; + $lang['strmaxvalue'] = '. '; + $lang['strminvalue'] = '. '; + $lang['strcachevalue'] = ' '; + $lang['strlogcount'] = 'Log Count'; + $lang['striscycled'] = '?'; + $lang['strsequenceneedsname'] = ' .'; + $lang['strsequencecreated'] = ' .'; + $lang['strsequencecreatedbad'] = ' .'; + $lang['strconfdropsequence'] = ' , "%s"?'; + $lang['strsequencedropped'] = ' .'; + $lang['strsequencedroppedbad'] = ' .'; + $lang['strsequencereset'] = ' .'; + $lang['strsequenceresetbad'] = ' .'; + + // Indexes + $lang['strindexes'] = ''; + $lang['strindexname'] = ' '; + $lang['strshowallindexes'] = ' '; + $lang['strnoindex'] = ' .'; + $lang['strnoindexes'] = ' .'; + $lang['strcreateindex'] = ' '; + $lang['strtabname'] = ' '; + $lang['strcolumnname'] = ' '; + $lang['strindexneedsname'] = ' '; + $lang['strindexneedscols'] = ' .'; + $lang['strindexcreated'] = ' .'; + $lang['strindexcreatedbad'] = ' .'; + $lang['strconfdropindex'] = ' , "%s"?'; + $lang['strindexdropped'] = ' .'; + $lang['strindexdroppedbad'] = ' .'; + $lang['strkeyname'] = ' '; + $lang['struniquekey'] = ' '; + $lang['strprimarykey'] = ' '; + $lang['strindextype'] = ' '; + $lang['strindexname'] = ' '; + $lang['strtablecolumnlist'] = ' '; + $lang['strindexcolumnlist'] = ' '; + $lang['strconfcluster'] = ' , "%s"?'; + $lang['strclusteredgood'] = ' .'; + $lang['strclusteredbad'] = ' .'; + + // Rules + $lang['strrules'] = ''; + $lang['strrule'] = ''; + $lang['strshowallrules'] = ' '; + $lang['strnorule'] = ' .'; + $lang['strnorules'] = ' .'; + $lang['strcreaterule'] = ' '; + $lang['strrulename'] = ' '; + $lang['strruleneedsname'] = ' .'; + $lang['strrulecreated'] = ' .'; + $lang['strrulecreatedbad'] = ' .'; + $lang['strconfdroprule'] = ' , "%s" on "%s"?'; + $lang['strruledropped'] = ' .'; + $lang['strruledroppedbad'] = ' .'; + + // Constraints + $lang['strconstraints'] = ''; + $lang['strshowallconstraints'] = ' '; + $lang['strnoconstraints'] = ' .'; + $lang['strcreateconstraint'] = ' '; + $lang['strconstraintcreated'] = ' .'; + $lang['strconstraintcreatedbad'] = ' .'; + $lang['strconfdropconstraint'] = ' , "%s" on "%s"?'; + $lang['strconstraintdropped'] = ' .'; + $lang['strconstraintdroppedbad'] = ' .'; + $lang['straddcheck'] = ' '; + $lang['strcheckneedsdefinition'] = ' .'; + $lang['strcheckadded'] = ' .'; + $lang['strcheckaddedbad'] = ' .'; + $lang['straddpk'] = ' '; + $lang['strpkneedscols'] = ' .'; + $lang['strpkadded'] = ' .'; + $lang['strpkaddedbad'] = ' .'; + $lang['stradduniq'] = ' '; + $lang['struniqneedscols'] = ' .'; + $lang['struniqadded'] = ' .'; + $lang['struniqaddedbad'] = ' .'; + $lang['straddfk'] = ' '; + $lang['strfkneedscols'] = ' .'; + $lang['strfkneedstarget'] = ' .'; + $lang['strfkadded'] = ' .'; + $lang['strfkaddedbad'] = ' .'; + $lang['strfktarget'] = ' '; + $lang['strfkcolumnlist'] = ' '; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + + // Functions + $lang['strfunction'] = ''; + $lang['strfunctions'] = ' '; + $lang['strshowallfunctions'] = ' '; + $lang['strnofunction'] = ' .'; + $lang['strnofunctions'] = ' .'; + $lang['strcreatefunction'] = ' '; + $lang['strfunctionname'] = ' '; + $lang['strreturns'] = ' '; + $lang['strarguments'] = ''; + $lang['strproglanguage'] = ' '; + $lang['strproglanguage'] = ''; + $lang['strfunctionneedsname'] = ' .'; + $lang['strfunctionneedsdef'] = ' .'; + $lang['strfunctioncreated'] = ' .'; + $lang['strfunctioncreatedbad'] = ' .'; + $lang['strconfdropfunction'] = ' , "%s"?'; + $lang['strfunctiondropped'] = ' .'; + $lang['strfunctiondroppedbad'] = ' .'; + $lang['strfunctionupdated'] = ' .'; + $lang['strfunctionupdatedbad'] = ' .'; + + // Triggers + $lang['strtrigger'] = ''; + $lang['strtriggers'] = ' '; + $lang['strshowalltriggers'] = ' '; + $lang['strnotrigger'] = ' .'; + $lang['strnotriggers'] = ' .'; + $lang['strcreatetrigger'] = ' '; + $lang['strtriggerneedsname'] = ' .'; + $lang['strtriggerneedsfunc'] = ' .'; + $lang['strtriggercreated'] = ' .'; + $lang['strtriggercreatedbad'] = ' .'; + $lang['strconfdroptrigger'] = ' , "%s" "%s"?'; + $lang['strtriggerdropped'] = ' .'; + $lang['strtriggerdroppedbad'] = ' .'; + $lang['strtriggeraltered'] = ' .'; + $lang['strtriggeralteredbad'] = ' .'; + + // Types + $lang['strtype'] = ' '; + $lang['strtypes'] = ' '; + $lang['strshowalltypes'] = ' '; + $lang['strnotype'] = ' .'; + $lang['strnotypes'] = ' .'; + $lang['strcreatetype'] = ' '; + $lang['strtypename'] = ' '; + $lang['strinputfn'] = ' '; + $lang['stroutputfn'] = ' '; + $lang['strpassbyval'] = ' ?'; + $lang['stralignment'] = ''; + $lang['strelement'] = ''; + $lang['strdelimiter'] = ''; + $lang['strstorage'] = 'Storage'; + $lang['strtypeneedsname'] = ' .'; + $lang['strtypeneedslen'] = ' .'; + $lang['strtypecreated'] = ' .'; + $lang['strtypecreatedbad'] = ' .'; + $lang['strconfdroptype'] = ' , "%s"?'; + $lang['strtypedropped'] = ' .'; + $lang['strtypedroppedbad'] = ' .'; + + // Schemas + $lang['strschema'] = ''; + $lang['strschemas'] = ''; + $lang['strshowallschemas'] = ' '; + $lang['strnoschema'] = ' .'; + $lang['strnoschemas'] = ' .'; + $lang['strcreateschema'] = ' '; + $lang['strschemaname'] = ' '; + $lang['strschemaneedsname'] = ' .'; + $lang['strschemacreated'] = ' .'; + $lang['strschemacreatedbad'] = ' .'; + $lang['strconfdropschema'] = ' , "%s"?'; + $lang['strschemadropped'] = ' .'; + $lang['strschemadroppedbad'] = ' .'; + + // Reports + $lang['strreport'] = ''; + $lang['strreports'] = ''; + $lang['strshowallreports'] = ' '; + $lang['strnoreports'] = ' .'; + $lang['strcreatereport'] = ' '; + $lang['strreportdropped'] = ' .'; + $lang['strreportdroppedbad'] = ' .'; + $lang['strconfdropreport'] = ' , "%s"?'; + $lang['strreportneedsname'] = ' .'; + $lang['strreportneedsdef'] = ' SQL- .'; + $lang['strreportcreated'] = ' .'; + $lang['strreportcreatedbad'] = ' .'; + + // Domains + $lang['strdomain'] = ''; + $lang['strdomains'] = ''; + $lang['strshowalldomains'] = ' '; + $lang['strnodomains'] = ' .'; + $lang['strcreatedomain'] = ' '; + $lang['strdomaindropped'] = ' .'; + $lang['strdomaindroppedbad'] = ' .'; + $lang['strconfdropdomain'] = ' , "%s"?'; + $lang['strdomainneedsname'] = ' .'; + $lang['strdomaincreated'] = ' .'; + $lang['strdomaincreatedbad'] = ' .'; + $lang['strdomainaltered'] = ' .'; + $lang['strdomainalteredbad'] = ' .'; + + // Operators + $lang['stroperator'] = ''; + $lang['stroperators'] = ''; + $lang['strshowalloperators'] = ' '; + $lang['strnooperator'] = ' .'; + $lang['strnooperators'] = ' .'; + $lang['strcreateoperator'] = ' '; + $lang['strleftarg'] = ' '; + $lang['strrightarg'] = ' '; + $lang['strcommutator'] = ''; + $lang['strnegator'] = ''; + $lang['strrestrict'] = ''; + $lang['strjoin'] = ''; + $lang['strhashes'] = ''; + $lang['strmerges'] = ''; + $lang['strleftsort'] = ' '; + $lang['strrightsort'] = ' '; + $lang['strlessthan'] = ''; + $lang['strgreaterthan'] = ''; + $lang['stroperatorneedsname'] = ' .'; + $lang['stroperatorcreated'] = ' '; + $lang['stroperatorcreatedbad'] = ' .'; + $lang['strconfdropoperator'] = ' , "%s"?'; + $lang['stroperatordropped'] = ' .'; + $lang['stroperatordroppedbad'] = ' .'; + + // Casts + $lang['strcasts'] = ''; + $lang['strnocasts'] = ' .'; + $lang['strsourcetype'] = ' '; + $lang['strtargettype'] = ' '; + $lang['strimplicit'] = ''; + $lang['strinassignment'] = ' '; + $lang['strbinarycompat'] = '( )'; + + // Conversions + $lang['strconversions'] = ''; + $lang['strnoconversions'] = ' .'; + $lang['strsourceencoding'] = ' '; + $lang['strtargetencoding'] = ' '; + + // Languages + $lang['strlanguages'] = ''; + $lang['strnolanguages'] = ' .'; + $lang['strtrusted'] = ''; + + // Info + $lang['strnoinfo'] = ' .'; + $lang['strreferringtables'] = ' '; + $lang['strparenttables'] = ' '; + $lang['strchildtables'] = ' '; + + // Miscellaneous + $lang['strtopbar'] = '%s %s:%s -- "%s"'; + $lang['strtimefmt'] = ' j-m-Y g:i'; + +?> + diff --git a/php/pgadmin/lang/php2po b/php/pgadmin/lang/php2po new file mode 100755 index 0000000..af21ffd --- /dev/null +++ b/php/pgadmin/lang/php2po @@ -0,0 +1,100 @@ +#!/usr/bin/php -f + $strings) +{ + fwrite($fres, "\n"); + fwrite($fres, "#. group $group\n"); + + foreach($strings as $var => $string) + { + $string = str_replace('"', '\\"', $string); + fwrite($fres, "#. str $var\n"); + fwrite($fres, "msgid \"$string\"\n"); + fwrite($fres, "msgstr \""); + if ($dst[$var]) + { + $tstring = str_replace('"', '\\"', $dst[$var]); + fwrite($fres, $tstring); + } + fwrite($fres, "\"\n\n"); + } + +} + +fclose($fres); + +?> \ No newline at end of file diff --git a/php/pgadmin/lang/po2php b/php/pgadmin/lang/po2php new file mode 100755 index 0000000..145590d --- /dev/null +++ b/php/pgadmin/lang/po2php @@ -0,0 +1,74 @@ +#!/usr/bin/php -f +\n"); + +fclose($fres); + +?> \ No newline at end of file diff --git a/php/pgadmin/lang/polish.php b/php/pgadmin/lang/polish.php new file mode 100644 index 0000000..d43f0d6 --- /dev/null +++ b/php/pgadmin/lang/polish.php @@ -0,0 +1,871 @@ +>'; + $lang['strfailed'] = 'Nieudany'; + $lang['strcreate'] = 'Utwórz'; + $lang['strcreated'] = 'Utworzony'; + $lang['strcomment'] = 'Komentarz'; + $lang['strlength'] = 'Długość'; + $lang['strdefault'] = 'Domyślny'; + $lang['stralter'] = 'Zmień'; + $lang['strok'] = 'OK'; + $lang['strcancel'] = 'Anuluj'; + $lang['strac'] = 'Włącz autouzupełnianie'; + $lang['strsave'] = 'Zapisz'; + $lang['strreset'] = 'Wyczyść'; + $lang['strinsert'] = 'Wstaw'; + $lang['strselect'] = 'Wybierz'; + $lang['strdelete'] = 'Usuń'; + $lang['strupdate'] = 'Zmień'; + $lang['strreferences'] = 'Odnośniki'; + $lang['stryes'] = 'Tak'; + $lang['strno'] = 'Nie'; + $lang['strtrue'] = 'Prawda'; + $lang['strfalse'] = 'Fałsz'; + $lang['stredit'] = 'Edycja'; + $lang['strcolumn'] = 'Kolumna'; + $lang['strcolumns'] = 'Kolumny'; + $lang['strrows'] = 'wiersz(y)'; + $lang['strrowsaff'] = 'wiersz(y) dotyczy.'; + $lang['strobjects'] = 'obiekty'; + $lang['strback'] = 'Wstecz'; + $lang['strqueryresults'] = 'Wyniki zapytania'; + $lang['strshow'] = 'Pokaż'; + $lang['strempty'] = 'Wyczyść'; + $lang['strlanguage'] = 'Język'; + $lang['strencoding'] = 'Kodowanie'; + $lang['strvalue'] = 'Wartość'; + $lang['strunique'] = 'Unikatowy'; + $lang['strprimary'] = 'Główny'; + $lang['strexport'] = 'Eksport'; + $lang['strimport'] = 'Import'; + $lang['strallowednulls'] = 'Dozwolone znaki NULL'; + $lang['strbackslashn'] = '\N'; + $lang['strnull'] = 'Null'; + $lang['stremptystring'] = 'Pusty ciąg znaków/pole'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = 'Administruj'; + $lang['strvacuum'] = 'Przeczyść'; + $lang['stranalyze'] = 'Analizuj'; + $lang['strclusterindex'] = 'Klastruj'; + $lang['strclustered'] = 'Klastrowany?'; + $lang['strreindex'] = 'Przeindeksuj'; + $lang['strrun'] = 'Uruchom'; + $lang['stradd'] = 'Dodaj'; + $lang['strremove'] = 'Usuń'; + $lang['strevent'] = 'Zdarzenie'; + $lang['strwhere'] = 'Gdzie'; + $lang['strinstead'] = 'Wykonaj zamiast'; + $lang['strwhen'] = 'Kiedy'; + $lang['strformat'] = 'Format'; + $lang['strdata'] = 'Dane'; + $lang['strconfirm'] = 'Potwierdź'; + $lang['strexpression'] = 'Wyrażenie'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'Rozwiń'; + $lang['strcollapse'] = 'Zwiń'; + $lang['strexplain'] = 'Explain'; + $lang['strexplainanalyze'] = 'Explain Analyze'; + $lang['strfind'] = 'Znajdź'; + $lang['stroptions'] = 'Opcje'; + $lang['strrefresh'] = 'Odśwież'; + $lang['strdownload'] = 'Pobierz'; + $lang['strdownloadgzipped'] = 'Pobierz skompresowane gzip-em'; + $lang['strinfo'] = 'Informacje'; + $lang['stroids'] = 'OIDy'; + $lang['stradvanced'] = 'Zaawansowane'; + $lang['strvariables'] = 'Zmienne'; + $lang['strprocess'] = 'Proces'; + $lang['strprocesses'] = 'Procesy'; + $lang['strsetting'] = 'Ustawienie'; + $lang['streditsql'] = 'Edycja zapytania SQL'; + $lang['strruntime'] = 'Całkowity czas pracy: %s ms.'; + $lang['strpaginate'] = 'Wyświetl wyniki stronami'; + $lang['struploadscript'] = 'lub załaduj skrypt SQL:'; + $lang['strstarttime'] = 'Czas początku'; + $lang['strfile'] = 'Plik'; + $lang['strfileimported'] = 'Plik został zaimportowany.'; + $lang['strtrycred'] = 'Użyj tych parametrów dla wszystkich serwerów'; + + // Database Sizes + $lang['strsize'] = 'Rozmiar'; + $lang['strbytes'] = 'bajtów'; + $lang['strkb'] = 'kB'; + $lang['strmb'] = 'MB'; + $lang['strgb'] = 'GB'; + $lang['strtb'] = 'TB'; + + // Error handling + $lang['strnoframes'] = 'Ta aplikacja najlepiej działa w przeglądarce obsługującej ramki, ale możesz jej użyć również bez ramek, klikając poniższy link.'; + $lang['strnoframeslink'] = 'Otwórz bez ramek'; + $lang['strbadconfig'] = 'Twój plik config.inc.php jest przestarzały. Musisz go utworzyć ponownie wykorzystując nowy config.inc.php-dist.'; + $lang['strnotloaded'] = 'Nie wkompilowałeś do PHP obsługi tej bazy danych.'; + $lang['strpostgresqlversionnotsupported'] = 'Nieobsługiwana wersja PostgreSQL. Uaktualnij do wersji %s lub nowszej.'; + $lang['strbadschema'] = 'Podano błędny schemat.'; + $lang['strbadencoding'] = 'Błędne kodowanie bazy.'; + $lang['strsqlerror'] = 'Błąd SQL:'; + $lang['strinstatement'] = 'W poleceniu:'; + $lang['strinvalidparam'] = 'Błędny parametr.'; + $lang['strnodata'] = 'Nie znaleziono danych.'; + $lang['strnoobjects'] = 'Nie znaleziono obiektów.'; + $lang['strrownotunique'] = 'Brak unikatowego identyfikatora dla tego wiersza.'; + $lang['strnoreportsdb'] = 'Nie utworzyłeś bazy raportów. Instrukcję znajdziesz w pliku INSTALL.'; + $lang['strnouploads'] = 'Ładowanie plików wyłączone.'; + $lang['strimporterror'] = 'Błąd importu.'; + $lang['strimporterror-fileformat'] = 'Błąd importu: Nie można automatycznie określić formatu pliku.'; + $lang['strimporterrorline'] = 'Błąd importu w linii %s.'; + $lang['strimporterrorline-badcolumnnum'] = 'Błąd importu w linii %s: Linia nie ma właściwej liczby kolumn.'; + $lang['strimporterror-uploadedfile'] = 'Błąd importu: plik nie może być załadowany na serwer.'; + $lang['strcannotdumponwindows'] = 'Zrzucanie złożonych nazw tabel i schematów pod Windows jest nie wspierane.'; + + // Tables + $lang['strtable'] = 'Tabela'; + $lang['strtables'] = 'Tabele'; + $lang['strshowalltables'] = 'Pokaż wszystkie tabele'; + $lang['strnotables'] = 'Nie znaleziono tabel.'; + $lang['strnotable'] = 'Nie znaleziono tabeli.'; + $lang['strcreatetable'] = 'Utwórz tabelę'; + $lang['strtablename'] = 'Nazwa tabeli'; + $lang['strtableneedsname'] = 'Musisz nazwać tabelę.'; + $lang['strtableneedsfield'] = 'Musisz podać przynajmniej jedno pole.'; + $lang['strtableneedscols'] = 'Musisz podać prawidłową liczbę kolumn.'; + $lang['strtablecreated'] = 'Tabela została utworzona.'; + $lang['strtablecreatedbad'] = 'Próba utworzenia tabeli się nie powiodła.'; + $lang['strconfdroptable'] = 'Czy na pewno chcesz usunąć tabelę "%s"?'; + $lang['strtabledropped'] = 'Tabela została usunięta.'; + $lang['strtabledroppedbad'] = 'Próba usunięcia tabeli się nie powiodła.'; + $lang['strconfemptytable'] = 'Czy na pewno chcesz wyczyścić tabelę "%s"?'; + $lang['strtableemptied'] = 'Tabela została wyczyszczona.'; + $lang['strtableemptiedbad'] = 'Próba wyczyszczenia tabeli się nie powiodła.'; + $lang['strinsertrow'] = 'Wstaw wiersz'; + $lang['strrowinserted'] = 'Wiersz został wstawiony.'; + $lang['strrowinsertedbad'] = 'Próba wstawienia wiersza się nie powiodła.'; + $lang['strrowduplicate'] = 'Próba wstawienia zduplikowanego wiersza.'; + $lang['streditrow'] = 'Edycja wiersza'; + $lang['strrowupdated'] = 'Wiersz został zaktualizowany.'; + $lang['strrowupdatedbad'] = 'Próba aktualizacji wiersza się nie powiodła.'; + $lang['strdeleterow'] = 'Usuń wiersz'; + $lang['strconfdeleterow'] = 'Czy na pewno chcesz usunąć ten wiersz?'; + $lang['strrowdeleted'] = 'Wiersz został usunięty.'; + $lang['strrowdeletedbad'] = 'Próba usunięcia wiersza się nie powiodła.'; + $lang['strinsertandrepeat'] = 'Wstaw i powtórz'; + $lang['strnumcols'] = 'Ilość kolumn'; + $lang['strcolneedsname'] = 'Musisz podać nazwę kolumny.'; + $lang['strselectallfields'] = 'Wybierz wszystkie pola'; + $lang['strselectneedscol'] = 'Musisz wybrać przynajmniej jedną kolumnę.'; + $lang['strselectunary'] = 'Operatory bezargumentowe (IS NULL/IS NOT NULL) nie mogą mieć podanej wartości.'; + $lang['straltercolumn'] = 'Zmień kolumnę'; + $lang['strcolumnaltered'] = 'Kolumna została zmodyfikowana.'; + $lang['strcolumnalteredbad'] = 'Próba modyfikacji kolumny się nie powiodła.'; + $lang['strconfdropcolumn'] = 'Czy na pewno chcesz usunąć kolumnę "%s" z tabeli "%s"?'; + $lang['strcolumndropped'] = 'Kolumna została usunięta.'; + $lang['strcolumndroppedbad'] = 'Próba usunięcia kolumny się nie powiodła.'; + $lang['straddcolumn'] = 'Dodaj kolumnę'; + $lang['strcolumnadded'] = 'Kolumna została dodana.'; + $lang['strcolumnaddedbad'] = 'Próba dodania kolumny się nie powiodła.'; + $lang['strcascade'] = 'CASCADE'; + $lang['strtablealtered'] = 'Tabela została zmodyfikowana.'; + $lang['strtablealteredbad'] = 'Próba modyfikacji tabeli się nie powiodła.'; + $lang['strdataonly'] = 'Tylko dane'; + $lang['strstructureonly'] = 'Tylko struktura'; + $lang['strstructureanddata'] = 'Struktura i dane'; + $lang['strtabbed'] = 'Z tabulacjami'; + $lang['strauto'] = 'Automatyczny'; + $lang['strconfvacuumtable'] = 'Czy na pewno chcesz wykonać vacuum "%s"?'; + $lang['strestimatedrowcount'] = 'Przybliżona ilość wierszy'; + + // Columns + $lang['strcolprop'] = 'Właściwości kolumny'; + + // Users + $lang['struser'] = 'Użytkownik'; + $lang['strusers'] = 'Użytkownicy'; + $lang['strusername'] = 'Nazwa użytkownika'; + $lang['strpassword'] = 'Hasło'; + $lang['strsuper'] = 'Administrator?'; + $lang['strcreatedb'] = 'Tworzenie BD?'; + $lang['strexpires'] = 'Wygasa'; + $lang['strsessiondefaults'] = 'Wartości domyślne sesji'; + $lang['strnousers'] = 'Nie znaleziono użytkowników.'; + $lang['struserupdated'] = 'Parametry użytkownika zostały zaktualizowane.'; + $lang['struserupdatedbad'] = 'Próba aktualizacji parametrów użytkownika się nie powiodła.'; + $lang['strshowallusers'] = 'Pokaż wszystkich użytkowników'; + $lang['strcreateuser'] = 'Utwórz użytkownika'; + $lang['struserneedsname'] = 'Musisz podać nazwę użytkownika.'; + $lang['strusercreated'] = 'Użytkownik został utworzony.'; + $lang['strusercreatedbad'] = 'Próba utworzenia użytkownika się nie powiodła.'; + $lang['strconfdropuser'] = 'Czy na pewno chcesz usunąć użytkownika "%s"?'; + $lang['struserdropped'] = 'Użytkownik został usunięty.'; + $lang['struserdroppedbad'] = 'Próba usunięcia użytkownika się nie powiodła.'; + $lang['straccount'] = 'Konto'; + $lang['strchangepassword'] = 'Zmień hasło'; + $lang['strpasswordchanged'] = 'Hasło zostało zmienione.'; + $lang['strpasswordchangedbad'] = 'Próba zmiany hasła się nie powiodła.'; + $lang['strpasswordshort'] = 'Hasło jest za krótkie.'; + $lang['strpasswordconfirm'] = 'Hasło i potwierdzenie muszą być takie same.'; + + // Groups + $lang['strgroup'] = 'Grupa'; + $lang['strgroups'] = 'Grupy'; + $lang['strnogroup'] = 'Nie znaleziono grupy.'; + $lang['strnogroups'] = 'Nie znaleziono grup.'; + $lang['strcreategroup'] = 'Utwórz grupę'; + $lang['strshowallgroups'] = 'Pokaż wszystkie grupy'; + $lang['strgroupneedsname'] = 'Musisz nazwać grupę.'; + $lang['strgroupcreated'] = 'Grupa została utworzona.'; + $lang['strgroupcreatedbad'] = 'Próba utworzenia grupy się nie powiodła.'; + $lang['strconfdropgroup'] = 'Czy na pewno chcesz utworzyć grupę "%s"?'; + $lang['strgroupdropped'] = 'Grupa została usunięta.'; + $lang['strgroupdroppedbad'] = 'Próba usunięcia grupy się nie powiodła.'; + $lang['strmembers'] = 'Członkowie'; + $lang['straddmember'] = 'Dodaj członka grupy'; + $lang['strmemberadded'] = 'Członek grupy został dodany.'; + $lang['strmemberaddedbad'] = 'Próba dodania członka grupy się nie powiodła.'; + $lang['strdropmember'] = 'Usuń członka grupy'; + $lang['strconfdropmember'] = 'Czy na pewno chcesz usunąć "%s" z grupy "%s"?'; + $lang['strmemberdropped'] = 'Członek grupy został usunięty.'; + $lang['strmemberdroppedbad'] = 'Próba usunięcia członka grupy się nie powiodła.'; + + // Roles + $lang['strrole'] = 'Rola'; + $lang['strroles'] = 'Role'; + $lang['strinheritsprivs'] = 'Dziedziczyć uprawnienia?'; + $lang['strcreaterole'] = 'Utwórz rolę'; + $lang['strcatupdate'] = 'Modyfikacja katalogów?'; + $lang['strcanlogin'] = 'Może się logować?'; + $lang['strmaxconnections'] = 'Maks. ilość połączeń'; + $lang['strconfdroprole'] = 'Czy na pewno chcesz usunąć rolę "%s"?'; + $lang['strroledropped'] = 'Rola została usunięta.'; + $lang['strroledroppedbad'] = 'Próba usunięcia roli się nie powiodła.'; + + // Privileges + $lang['strprivilege'] = 'Uprawnienie'; + $lang['strprivileges'] = 'Uprawnienia'; + $lang['strnoprivileges'] = 'Ten obiekt nie ma uprawnień.'; + $lang['strgrant'] = 'Nadaj'; + $lang['strrevoke'] = 'Zabierz'; + $lang['strgranted'] = 'Uprawnienia zostały nadane.'; + $lang['strgrantfailed'] = 'Próba nadania uprawnień się nie powiodła.'; + $lang['strgrantbad'] = 'Musisz podać użytkownika lub grupę, a także uprawnienia, jakie chcesz nadać.'; + $lang['strgrantor'] = 'Kto nadał'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'Baza danych'; + $lang['strdatabases'] = 'Bazy danych'; + $lang['strshowalldatabases'] = 'Pokaż wszystkie bazy danych'; + $lang['strnodatabase'] = 'Nie znaleziono bazy danych.'; + $lang['strnodatabases'] = 'Nie znaleziono żadnej bazy danych.'; + $lang['strcreatedatabase'] = 'Utwórz bazę danych'; + $lang['strdatabasename'] = 'Nazwa bazy danych'; + $lang['strdatabaseneedsname'] = 'Musisz nazwać bazę danych.'; + $lang['strdatabasecreated'] = 'Baza danych została utworzona.'; + $lang['strdatabasecreatedbad'] = 'Próba utworzenia bazy danych się nie powiodła.'; + $lang['strconfdropdatabase'] = 'Czy na pewno chcesz usunąć bazę danych "%s"?'; + $lang['strdatabasedropped'] = 'Baza danych została usunięta.'; + $lang['strdatabasedroppedbad'] = 'Próba usunięcia bazy danych się nie powiodła.'; + $lang['strentersql'] = 'Podaj polecenie SQL do wykonania:'; + $lang['strsqlexecuted'] = 'Polecenie SQL zostało wykonane.'; + $lang['strvacuumgood'] = 'Czyszczenie bazy zostało zakończone.'; + $lang['strvacuumbad'] = 'Próba czyszczenia bazy się nie powiodła.'; + $lang['stranalyzegood'] = 'Analiza bazy została zakończona.'; + $lang['stranalyzebad'] = 'Próba analizy się nie powiodła.'; + $lang['strreindexgood'] = 'Reindeksacja została zakończona.'; + $lang['strreindexbad'] = 'Próba reindeksacji się nie powiodła.'; + $lang['strfull'] = 'Pełne'; + $lang['strfreeze'] = 'Zamrożenie'; + $lang['strforce'] = 'Wymuszenie'; + $lang['strsignalsent'] = 'Sygnał został wysłany.'; + $lang['strsignalsentbad'] = 'Próba wysłania sygnału się nie powiodła.'; + $lang['strallobjects'] = 'Wszystkie obiekty'; + $lang['strdatabasealtered'] = 'Baza danych została zmieniona.'; + $lang['strdatabasealteredbad'] = 'Próba modyfikacji bazy danych się nie powiodła.'; + + // Views + $lang['strview'] = 'Widok'; + $lang['strviews'] = 'Widoki'; + $lang['strshowallviews'] = 'Pokaż wszystkie widoki'; + $lang['strnoview'] = 'Nie znaleziono widoku.'; + $lang['strnoviews'] = 'Nie znaleziono widoków.'; + $lang['strcreateview'] = 'Utwórz widok'; + $lang['strviewname'] = 'Nazwa widoku'; + $lang['strviewneedsname'] = 'Musisz nazwać widok.'; + $lang['strviewneedsdef'] = 'Musisz zdefiniować widok.'; + $lang['strviewneedsfields'] = 'Musisz podać kolumny, które mają być widoczne w widoku.'; + $lang['strviewcreated'] = 'Widok został utworzony.'; + $lang['strviewcreatedbad'] = 'Próba utworzenia widoku się nie powiodła.'; + $lang['strconfdropview'] = 'Czy na pewno chcesz usunąć widok "%s"?'; + $lang['strviewdropped'] = 'Widok został usunięty.'; + $lang['strviewdroppedbad'] = 'Próba usunięcia widoku się nie powiodła.'; + $lang['strviewupdated'] = 'Widok został zaktualizowany.'; + $lang['strviewupdatedbad'] = 'Próba aktualizacji widoku się nie powiodła.'; + $lang['strviewlink'] = 'Klucze łączące'; + $lang['strviewconditions'] = 'Dodatkowe warunki'; + $lang['strcreateviewwiz'] = 'Utwórz widok przy użyciu kreatora widoków'; + + // Sequences + $lang['strsequence'] = 'Sekwencja'; + $lang['strsequences'] = 'Sekwencje'; + $lang['strshowallsequences'] = 'Pokaż wszystkie sekwencje'; + $lang['strnosequence'] = 'Nie znaleziono sekwencji.'; + $lang['strnosequences'] = 'Nie znaleziono sekwencji.'; + $lang['strcreatesequence'] = 'Utwórz sekwencję'; + $lang['strlastvalue'] = 'Ostatnia wartość'; + $lang['strincrementby'] = 'Zwiększana o'; + $lang['strstartvalue'] = 'Wartość początkowa'; + $lang['strmaxvalue'] = 'Wartość maks.'; + $lang['strminvalue'] = 'Wartość min.'; + $lang['strcachevalue'] = 'Wartość keszowana'; + $lang['strlogcount'] = 'log_cnt'; + $lang['striscycled'] = 'czy cykliczna'; + $lang['strsequenceneedsname'] = 'Musisz nazwać sekwencję.'; + $lang['strsequencecreated'] = 'Sekwencja została utworzona.'; + $lang['strsequencecreatedbad'] = 'Próba utworzenia sekwencji się nie powiodła.'; + $lang['strconfdropsequence'] = 'Czy na pewno chcesz usunąć sekwencję "%s"?'; + $lang['strsequencedropped'] = 'Sekwencja została usunięta.'; + $lang['strsequencedroppedbad'] = 'Próba usunięcia sekwencji się nie powiodła.'; + $lang['strsequencereset'] = 'Sekwencja została wyzerowana.'; + $lang['strsequenceresetbad'] = 'Próba zerowania sekwencji się nie powiodła.'; + $lang['straltersequence'] = 'Zmień sekwencję'; + $lang['strsequencealtered'] = 'Sekwencja została zmieniona.'; + $lang['strsequencealteredbad'] = 'Próba modyfikacji sekwencji się nie powiodła.'; + $lang['strsetval'] = 'Ustaw wartość'; + $lang['strsequencesetval'] = 'Wartość sekwencji została ustawiona.'; + $lang['strsequencesetvalbad'] = 'Próba ustawienia wartości sekwencji się nie powiodła.'; + $lang['strnextval'] = 'Zwiększ wartość sekwencję'; + $lang['strsequencenextval'] = 'Wartość sekwencji została zwiększona.'; + $lang['strsequencenextvalbad'] = 'Próba zwiększenia wartości sekwencji się nie powiodła.'; + + // Indeksy + $lang['strindex'] = 'Indeks'; + $lang['strindexes'] = 'Indeksy'; + $lang['strindexname'] = 'Nazwa indeksu'; + $lang['strshowallindexes'] = 'Pokaż wszystkie indeksy'; + $lang['strnoindex'] = 'Nie znaleziono indeksu.'; + $lang['strnoindexes'] = 'Nie znaleziono indeksów.'; + $lang['strcreateindex'] = 'Utwórz indeks'; + $lang['strtabname'] = 'Tab Name'; + $lang['strcolumnname'] = 'Nazwa kolumny'; + $lang['strindexneedsname'] = 'Musisz nazwać indeks.'; + $lang['strindexneedscols'] = 'W skład indeksu musi wchodzić przynajmniej jedna kolumna.'; + $lang['strindexcreated'] = 'Indeks został utworzony.'; + $lang['strindexcreatedbad'] = 'Próba utworzenia indeksu się nie powiodła.'; + $lang['strconfdropindex'] = 'Czy na pewno chcesz usunąć indeks "%s"?'; + $lang['strindexdropped'] = 'Indeks został usunięty.'; + $lang['strindexdroppedbad'] = 'Próba usunięcia indeksu się nie powiodła.'; + $lang['strkeyname'] = 'Nazwa klucza'; + $lang['struniquekey'] = 'Klucz Unikatowy'; + $lang['strprimarykey'] = 'Klucz Główny'; + $lang['strindextype'] = 'Typ indeksu'; + $lang['strtablecolumnlist'] = 'Kolumny w tabeli'; + $lang['strindexcolumnlist'] = 'Kolumny w indeksie'; + $lang['strconfcluster'] = 'Czy na pewno chcesz zklastrować "%s"?'; + $lang['strclusteredgood'] = 'Klastrowanie zostało zakończone.'; + $lang['strclusteredbad'] = 'Próba klastrowania się nie powiodła.'; + + // Rules + $lang['strrules'] = 'Reguły'; + $lang['strrule'] = 'Reguła'; + $lang['strshowallrules'] = 'Pokaż wszystkie reguły'; + $lang['strnorule'] = 'Nie znaleziono reguły.'; + $lang['strnorules'] = 'Nie znaleziono reguł.'; + $lang['strcreaterule'] = 'Utwórz regułę'; + $lang['strrulename'] = 'Nazwa reguły'; + $lang['strruleneedsname'] = 'Musisz nazwać regułę.'; + $lang['strrulecreated'] = 'Reguła została utworzona.'; + $lang['strrulecreatedbad'] = 'Próba utworzenia reguły się nie powiodła.'; + $lang['strconfdroprule'] = 'Czy na pewno chcesz usunąć regułę "%s" na "%s"?'; + $lang['strruledropped'] = 'Reguła została usunięta.'; + $lang['strruledroppedbad'] = 'Próba usunięcia reguły się nie powiodła.'; + + // Constraints + $lang['strconstraint'] = 'Więz integralności'; + $lang['strconstraints'] = 'Więzy integralności'; + $lang['strshowallconstraints'] = 'Pokaż wszystkie więzy integralności'; + $lang['strnoconstraints'] = 'Nie znaleziono więzów integralności.'; + $lang['strcreateconstraint'] = 'Utwórz więzy integralności'; + $lang['strconstraintcreated'] = 'Więzy integralności zostały utworzone.'; + $lang['strconstraintcreatedbad'] = 'Próba utworzenia więzów integralności się nie powiodła.'; + $lang['strconfdropconstraint'] = 'Czy na pewno chcesz usunąć więzy integralności "%s" na "%s"?'; + $lang['strconstraintdropped'] = 'Więzy integralności zostały usunięte.'; + $lang['strconstraintdroppedbad'] = 'Próba usunięcia więzów integralności się nie powiodła.'; + $lang['straddcheck'] = 'Dodaj warunek'; + $lang['strcheckneedsdefinition'] = 'Musisz zdefiniować warunek.'; + $lang['strcheckadded'] = 'Warunek został dodany.'; + $lang['strcheckaddedbad'] = 'Próba dodania warunku się nie powiodła.'; + $lang['straddpk'] = 'Dodaj klucz główny'; + $lang['strpkneedscols'] = 'Klucz główny musi zawierać przynajmniej jedną kolumnę.'; + $lang['strpkadded'] = 'Klucz główny został dodany.'; + $lang['strpkaddedbad'] = 'Próba dodania klucza głównego się nie powiodła.'; + $lang['stradduniq'] = 'Dodaj klucz unikatowy'; + $lang['struniqneedscols'] = 'Klucz unikatowy musi zawierać przynajmniej jedną kolumnę.'; + $lang['struniqadded'] = 'Klucz unikatowy został dodany.'; + $lang['struniqaddedbad'] = 'Próba dodania klucza unikatowego się nie powiodła.'; + $lang['straddfk'] = 'Dodaj klucz obcy'; + $lang['strfkneedscols'] = 'Obcy klucz musi zawierać przynajmniej jedną kolumnę.'; + $lang['strfkneedstarget'] = 'Klucz obcy wymaga podania nazwy tabeli docelowej.'; + $lang['strfkadded'] = 'Klucz obcy został dodany.'; + $lang['strfkaddedbad'] = 'Próba dodania klucza obcego się nie powiodła.'; + $lang['strfktarget'] = 'Tabela docelowa'; + $lang['strfkcolumnlist'] = 'Kolumna w kluczu'; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + + // Functions + $lang['strfunction'] = 'Funkcja'; + $lang['strfunctions'] = 'Funkcje'; + $lang['strshowallfunctions'] = 'Pokaż wszystkie funkcje'; + $lang['strnofunction'] = 'Nie znaleziono funkcji.'; + $lang['strnofunctions'] = 'Nie znaleziono funkcji.'; + $lang['strcreateplfunction'] = 'Utwórz funkcję SQL/PL'; + $lang['strcreateinternalfunction'] = 'Utwórz funkcję wewnętrzną'; + $lang['strcreatecfunction'] = 'Utwórz funkcję C'; + $lang['strfunctionname'] = 'Nazwa funkcji'; + $lang['strreturns'] = 'Zwraca'; + $lang['strproglanguage'] = 'Język'; + $lang['strfunctionneedsname'] = 'Musisz nazwać funkcję.'; + $lang['strfunctionneedsdef'] = 'Musisz zdefiniować funkcję.'; + $lang['strfunctioncreated'] = 'Funkcja została utworzona.'; + $lang['strfunctioncreatedbad'] = 'Próba utworzenia funkcji się nie powiodła.'; + $lang['strconfdropfunction'] = 'Czy na pewno chcesz usunąć funkcję "%s"?'; + $lang['strfunctiondropped'] = 'Funkcja została usunięta.'; + $lang['strfunctiondroppedbad'] = 'Próba usunięcia funkcji się nie powiodła.'; + $lang['strfunctionupdated'] = 'Funkcja została zaktualizowana.'; + $lang['strfunctionupdatedbad'] = 'Próba aktualizacji funkcji się nie powiodła.'; + $lang['strobjectfile'] = 'Plik obiektów'; + $lang['strlinksymbol'] = 'Łącz symbol'; + $lang['strarguments'] = 'Argumenty'; + $lang['strargname'] = 'Nazwa'; + $lang['strargmode'] = 'Tryb'; + $lang['strargtype'] = 'Typ'; + $lang['strargadd'] = 'Dodaj nowy argument'; + $lang['strargremove'] = 'Usuń ten argument'; + $lang['strargnoargs'] = 'Ta funkcja nie będzie wymagała żadnych argumentów.'; + $lang['strargenableargs'] = 'Włącz podawanie argumentów tej funkcji.'; + $lang['strargnorowabove'] = 'Nad tym wierszem musi być wiersz.'; + $lang['strargnorowbelow'] = 'Pod tym wierszem musi być inny wiersz.'; + $lang['strargraise'] = 'Przesuń w górę.'; + $lang['strarglower'] = 'Przesuń w dół.'; + $lang['strargremoveconfirm'] = 'Czy na pewno chcesz usunąć ten argument? Tej operacji nie będzie można cofnąć.'; + + + // Triggers + $lang['strtrigger'] = 'Procedura wyzwalana'; + $lang['strtriggers'] = 'Procedury wyzwalane'; + $lang['strshowalltriggers'] = 'Pokaż wszystkie procedury wyzwalane'; + $lang['strnotrigger'] = 'Nie znaleziono procedury wyzwalanej.'; + $lang['strnotriggers'] = 'Nie znaleziono procedur wyzwalanych.'; + $lang['strcreatetrigger'] = 'Utwórz procedurę wyzwalaną'; + $lang['strtriggerneedsname'] = 'Musisz nazwać procedurę wyzwalaną.'; + $lang['strtriggerneedsfunc'] = 'Musisz podać funkcję procedury wyzwalanej.'; + $lang['strtriggercreated'] = 'Procedura wyzwalana została utworzona.'; + $lang['strtriggercreatedbad'] = 'Próba utworzenia procedury wyzwalanej się nie powiodła.'; + $lang['strconfdroptrigger'] = 'Czy na pewno chcesz usunąć procedurę "%s" wyzwalaną przez "%s"?'; + $lang['strconfenabletrigger'] = 'Czy na pewno chcesz włączyć procedurę wyzwalaną "%s" on "%s"?'; + $lang['strconfdisabletrigger'] = 'Czy na pewno chcesz wyłączyć procedurę wyzwalaną "%s" on "%s"?'; + $lang['strtriggerdropped'] = 'Procedura wyzwalana została usunięta.'; + $lang['strtriggerdroppedbad'] = 'Próba usunięcia procedury wyzwalanej się nie powiodła.'; + $lang['strtriggerenabled'] = 'Procedura wyzwalana została włączona.'; + $lang['strtriggerenabledbad'] = 'Próba włączenia procedury wyzwalanej się nie powiodła.'; + $lang['strtriggerdisabled'] = 'Procedura wyzwalana została wyłączona.'; + $lang['strtriggerdisabledbad'] = 'Próba wyłączenia procedury wyzwalanej się nie powiodła.'; + $lang['strtriggeraltered'] = 'Procedura wyzwalana została zmieniona.'; + $lang['strtriggeralteredbad'] = 'Próba modyfikacji procedury wyzwalanej się nie powiodła.'; + $lang['strforeach'] = 'Dla wszystkich'; + + // Types + $lang['strtype'] = 'Typ'; + $lang['strtypes'] = 'Typy'; + $lang['strshowalltypes'] = 'Pokaż wszystkie typy'; + $lang['strnotype'] = 'Nie znaleziono typu.'; + $lang['strnotypes'] = 'Nie znaleziono typów.'; + $lang['strcreatetype'] = 'Utwórz typ'; + $lang['strcreatecomptype'] = 'Utwórz typ złożony'; + $lang['strtypeneedsfield'] = 'Musisz podać przynajmniej jedno pole.'; + $lang['strtypeneedscols'] = 'Musisz podać poprawną ilość pól.'; + $lang['strtypename'] = 'Nazwa typu'; + $lang['strinputfn'] = 'Funkcja wejściowa'; + $lang['stroutputfn'] = 'Funkcja wyjściowa'; + $lang['strpassbyval'] = 'Przekazywany przez wartość?'; + $lang['stralignment'] = 'Wyrównanie bajtowe'; + $lang['strelement'] = 'Typ elementów'; + $lang['strdelimiter'] = 'Znak oddzielający elementy tabeli'; + $lang['strstorage'] = 'Technika przechowywania'; + $lang['strfield'] = 'Pole'; + $lang['strnumfields'] = 'Ilość pól'; + $lang['strtypeneedsname'] = 'Musisz nazwać typ.'; + $lang['strtypeneedslen'] = 'Musisz podać długość typu.'; + $lang['strtypecreated'] = 'Typ został utworzony.'; + $lang['strtypecreatedbad'] = 'Próba utworzenia typu się nie powiodła.'; + $lang['strconfdroptype'] = 'Czy na pewno chcesz usunąć typ "%s"?'; + $lang['strtypedropped'] = 'Typ został usunięty.'; + $lang['strtypedroppedbad'] = 'Próba usunięcia typu się nie powiodła.'; + $lang['strflavor'] = 'Flavor'; + $lang['strbasetype'] = 'podstawowy'; + $lang['strcompositetype'] = 'złożony'; + $lang['strpseudotype'] = 'pseudo'; + + // Schemas + $lang['strschema'] = 'Schemat'; + $lang['strschemas'] = 'Schematy'; + $lang['strshowallschemas'] = 'Pokaż wszystkie schematy'; + $lang['strnoschema'] = 'Nie znaleziono schematu.'; + $lang['strnoschemas'] = 'Nie znaleziono schematów.'; + $lang['strcreateschema'] = 'Utwórz schemat'; + $lang['strschemaname'] = 'Nazwa schematu'; + $lang['strschemaneedsname'] = 'Musisz nadać schematowi nazwę.'; + $lang['strschemacreated'] = 'Schemat został utworzony.'; + $lang['strschemacreatedbad'] = 'Próba utworzenia schematu się nie powiodła.'; + $lang['strconfdropschema'] = 'Czy na pewno chcesz usunąć schemat "%s"?'; + $lang['strschemadropped'] = 'Schemat został usunięty.'; + $lang['strschemadroppedbad'] = 'Próba usunięcia schematu się nie powiodła.'; + $lang['strschemaaltered'] = 'Schemat został zmieniony.'; + $lang['strschemaalteredbad'] = 'Próba zmiany schematu się nie powiodła.'; + $lang['strsearchpath'] = 'Ścieżka wyszukiwania schematu'; + + // Reports + $lang['strreport'] = 'Raport'; + $lang['strreports'] = 'Raporty'; + $lang['strshowallreports'] = 'Pokaż wszystkie raporty'; + $lang['strnoreports'] = 'Nie znaleziono raportów.'; + $lang['strcreatereport'] = 'Utwórz raport'; + $lang['strreportdropped'] = 'Raport został usunięty.'; + $lang['strreportdroppedbad'] = 'Próba usunięcia raportu się nie powiodła.'; + $lang['strconfdropreport'] = 'Czy na pewno chcesz usunąć raport "%s"?'; + $lang['strreportneedsname'] = 'Musisz nazwać raport.'; + $lang['strreportneedsdef'] = 'Musisz podać zapytanie SQL definiujące raport.'; + $lang['strreportcreated'] = 'Raport został utworzony.'; + $lang['strreportcreatedbad'] = 'Próba utworzenia raportu się nie powiodła.'; + + // Domeny + $lang['strdomain'] = 'Domena'; + $lang['strdomains'] = 'Domeny'; + $lang['strshowalldomains'] = 'Pokaż wszystkie domeny'; + $lang['strnodomains'] = 'Nie znaleziono domen.'; + $lang['strcreatedomain'] = 'Utwórz domenę'; + $lang['strdomaindropped'] = 'Domena została usunięta.'; + $lang['strdomaindroppedbad'] = 'Próba usunięcia domeny się nie powiodła.'; + $lang['strconfdropdomain'] = 'Czy na pewno chcesz usunąć domenę "%s"?'; + $lang['strdomainneedsname'] = 'Musisz nazwać domenę.'; + $lang['strdomaincreated'] = 'Domena została utworzona.'; + $lang['strdomaincreatedbad'] = 'Próba utworzenia domeny się nie powiodła.'; + $lang['strdomainaltered'] = 'Domena została zmieniona.'; + $lang['strdomainalteredbad'] = 'Próba modyfikacji domeny się nie powiodła.'; + + // Operators + $lang['stroperator'] = 'Operator'; + $lang['stroperators'] = 'Operatory'; + $lang['strshowalloperators'] = 'Pokaż wszystkie operatory'; + $lang['strnooperator'] = 'Nie znaleziono operatora.'; + $lang['strnooperators'] = 'Nie znaleziono operatorów.'; + $lang['strcreateoperator'] = 'Utwórz operator'; + $lang['strleftarg'] = 'Typ lewego argumentu'; + $lang['strrightarg'] = 'Typ prawego argumentu'; + $lang['strcommutator'] = 'Komutator'; + $lang['strnegator'] = 'Negacja'; + $lang['strrestrict'] = 'Zastrzeżenie'; + $lang['strjoin'] = 'Połączenie'; + $lang['strhashes'] = 'Hashes'; + $lang['strmerges'] = 'Merges'; + $lang['strleftsort'] = 'Lewe sortowanie'; + $lang['strrightsort'] = 'Prawe sortowanie'; + $lang['strlessthan'] = 'Mniej niż'; + $lang['strgreaterthan'] = 'Więcej niż'; + $lang['stroperatorneedsname'] = 'Musisz nazwać operator.'; + $lang['stroperatorcreated'] = 'Operator został utworzony.'; + $lang['stroperatorcreatedbad'] = 'Próba utworzenia operatora się nie powiodła.'; + $lang['strconfdropoperator'] = 'Czy na pewno chcesz usunąć operator "%s"?'; + $lang['stroperatordropped'] = 'Operator został usunięty.'; + $lang['stroperatordroppedbad'] = 'Próba usunięcia operatora się nie powiodła.'; + + // Casts + $lang['strcasts'] = 'Rzutowania'; + $lang['strnocasts'] = 'Nie znaleziono rzutowań.'; + $lang['strsourcetype'] = 'Typ źródłowy'; + $lang['strtargettype'] = 'Typ docelowy'; + $lang['strimplicit'] = 'Domniemany'; + $lang['strinassignment'] = 'W przydziale'; + $lang['strbinarycompat'] = '(Kompatybilny binarnie)'; + + // Conversions + $lang['strconversions'] = 'Konwersje'; + $lang['strnoconversions'] = 'Nie znaleziono konwersji.'; + $lang['strsourceencoding'] = 'Kodowanie źródłowe'; + $lang['strtargetencoding'] = 'Kodowanie docelowe'; + + // Languages + $lang['strlanguages'] = 'Języki'; + $lang['strnolanguages'] = 'Nie znaleziono języków.'; + $lang['strtrusted'] = 'Zaufany'; + + // Info + $lang['strnoinfo'] = 'Brak informacji na ten temat'; + $lang['strreferringtables'] = 'Tabele zależne'; + $lang['strparenttables'] = 'Tabela nadrzędne'; + $lang['strchildtables'] = 'Tabela podrzędna'; + + // Aggregates + $lang['straggregate'] = 'Funkcja agregująca'; + $lang['straggregates'] = 'Funkcje agregujące'; + $lang['strnoaggregates'] = 'Nie znaleziono funkcji agregujących.'; + $lang['stralltypes'] = '(Wszystkie typy)'; +$lang['straggrtransfn'] = 'Transition function'; + $lang['strcreateaggregate'] = 'Utwórz funkcję agregującą'; + $lang['straggrbasetype'] = 'Typ danych wejściowych'; +$lang['straggrsfunc'] = 'State transition function'; +$lang['straggrffunc'] = 'Final function'; + $lang['straggrinitcond'] = 'Warunek początkowy'; + $lang['straggrsortop'] = 'Operator sortowania'; + $lang['strconfdropaggregate'] = 'Czy na pewno chcesz usunąć funkcję agregującą "%s"?'; + $lang['straggregatedropped'] = 'Funkcja agregująca została usunięta.'; + $lang['straggregatedroppedbad'] = 'Próba usunięcia funkcji agregującej się nie powiodła.'; + $lang['stralteraggregate'] = 'Zmień funkcję agregującą'; + $lang['straggraltered'] = 'Funkcja agregująca została zmieniona.'; + $lang['straggralteredbad'] = 'Próba zmiany funkcji agregującej się nie powiodła.'; + $lang['straggrneedsname'] = 'Musisz podać nazwę funkcji agregującej'; + $lang['straggrneedsbasetype'] = 'Musisz podać typ danych wejściowych funkcji agregującej'; +$lang['straggrneedssfunc'] = 'You must specify the name of the state transition function for the aggregate'; +$lang['straggrneedsstype'] = 'You must specify the data type for the aggregate\'s state value'; + $lang['straggrcreated'] = 'Funkcja agregująca została utworzona.'; + $lang['straggrcreatedbad'] = 'Próba utworzenia funkcji agregującej się nie powiodła.'; + $lang['straggrshowall'] = 'Pokaż wszystkie funkcje agregujące'; + + // Operator Classes + $lang['stropclasses'] = 'Klasy operatorów'; + $lang['strnoopclasses'] = 'Nie znaleziono klas operatorów.'; + $lang['straccessmethod'] = 'Metoda dostępu'; + + // Stats and performance + $lang['strrowperf'] = 'Wydajność wierszowa'; + $lang['strioperf'] = 'Wydajność I/O'; + $lang['stridxrowperf'] = 'Wydajność indeksu wierszowego'; + $lang['stridxioperf'] = 'Wydajność indeksu We/Wy'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Sekwencyjny'; + $lang['strscan'] = 'Skanuj'; + $lang['strread'] = 'Czytaj'; + $lang['strfetch'] = 'Pobierz'; + $lang['strheap'] = 'Sterta'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'Indeks TOAST'; + $lang['strcache'] = 'Kesz'; + $lang['strdisk'] = 'Dysk'; + $lang['strrows2'] = 'Wiersze'; + + // Tablespaces + $lang['strtablespace'] = 'Przestrzeń tabel'; + $lang['strtablespaces'] = 'Przestrzenie tabel'; + $lang['strshowalltablespaces'] = 'Pokaż wszystkie przestrzenie tabel'; + $lang['strnotablespaces'] = 'Nie znaleziono przestrzeni tabel.'; + $lang['strcreatetablespace'] = 'Utwórz przestrzeń tabel'; + $lang['strlocation'] = 'Położenie'; + $lang['strtablespaceneedsname'] = 'Musisz podać nazwę przestrzeni tabel.'; + $lang['strtablespaceneedsloc'] = 'Musisz podać nazwę katalogu, w którym chcesz utworzyć przestrzeń tabel.'; + $lang['strtablespacecreated'] = 'Przestrzeń tabel została utworzona.'; + $lang['strtablespacecreatedbad'] = 'Próba utworzenia przestrzeni tabel się nie powiodła.'; + $lang['strconfdroptablespace'] = 'Czy na pewno chcesz usunąć przestrzeń tabel "%s"?'; + $lang['strtablespacedropped'] = 'Przestrzeń tabel została usunięta.'; + $lang['strtablespacedroppedbad'] = 'Próba usunięcia przestrzeni tabel się nie powiodła.'; + $lang['strtablespacealtered'] = 'Przestrzeń tabel została zmieniona.'; + $lang['strtablespacealteredbad'] = 'Próba modyfikacji przestrzeni tabel się nie powiodła.'; + + // Slony clusters + $lang['strcluster'] = 'Klaster'; + $lang['strnoclusters'] = 'Nie znaleziono klastrów.'; + $lang['strconfdropcluster'] = 'Czy na pewno chcesz usunąć klaster "%s"?'; + $lang['strclusterdropped'] = 'Klaster został usunięty.'; + $lang['strclusterdroppedbad'] = 'Próba usunięcia klastra się nie powiodła.'; + $lang['strinitcluster'] = 'Utwórz klaster'; + $lang['strclustercreated'] = 'Klaster został utworzony.'; + $lang['strclustercreatedbad'] = 'Próba utworzenia klastra się nie powiodła.'; + $lang['strclusterneedsname'] = 'Musisz podać nazwę klastra.'; + $lang['strclusterneedsnodeid'] = 'Musisz podać identyfikator lokalnego węzła.'; + + // Slony nodes + $lang['strnodes'] = 'Węzły'; + $lang['strnonodes'] = 'Nie znaleziono węzłów.'; + $lang['strcreatenode'] = 'Utwórz węzeł'; + $lang['strid'] = 'ID'; + $lang['stractive'] = 'Aktywny'; + $lang['strnodecreated'] = 'Węzeł został utworzony.'; + $lang['strnodecreatedbad'] = 'Próba utworzenia węzła się nie powiodła.'; + $lang['strconfdropnode'] = 'Czy na pewno chcesz usunąć węzeł "%s"?'; + $lang['strnodedropped'] = 'Węzeł został usunięty.'; + $lang['strnodedroppedbad'] = 'Próba usunięcia węzła się nie powiodła.'; + $lang['strfailover'] = 'Przełączenie awaryjne'; + $lang['strnodefailedover'] = 'Węzeł został przełączony awaryjnie.'; + $lang['strnodefailedoverbad'] = 'Próba awaryjnego przełączenia węzła się nie powiodła.'; + $lang['strstatus'] = 'Stan'; + $lang['strhealthy'] = 'Poprawny'; + $lang['stroutofsync'] = 'Niezsynchronizowany'; + $lang['strunknown'] = 'Nieznany'; + + + // Slony paths + $lang['strpaths'] = 'Ścieżki'; + $lang['strnopaths'] = 'Nie znaleziono ścieżek.'; + $lang['strcreatepath'] = 'Utwórz ścieżkę'; + $lang['strnodename'] = 'Nazwa węzła'; + $lang['strnodeid'] = 'Identyfikator węzła'; + $lang['strconninfo'] = 'Parametry połączenia'; + $lang['strconnretry'] = 'Czas przed próbą ponownego połączenia'; + $lang['strpathneedsconninfo'] = 'Musisz podać parametry połączenia.'; + $lang['strpathneedsconnretry'] = 'Musisz określić ilość sekund, którą należy odczekać przed ponowieniem połączenia.'; + $lang['strpathcreated'] = 'Ścieżka została utworzona.'; + $lang['strpathcreatedbad'] = 'Próba utworzenia ścieżki się nie powiodła.'; + $lang['strconfdroppath'] = 'Czy na pewno chcesz usunąć ścieżkę "%s"?'; + $lang['strpathdropped'] = 'Ścieżka została usunięta.'; + $lang['strpathdroppedbad'] = 'Próba usunięcia ścieżki się nie powiodła.'; + + // Slony listens + $lang['strlistens'] = 'Nasłuchy'; + $lang['strnolistens'] = 'Nie znaleziono nasłuchów.'; + $lang['strcreatelisten'] = 'Utwórz nasłuch'; + $lang['strlistencreated'] = 'Nasłuch został utworzony.'; + $lang['strlistencreatedbad'] = 'Próba usunięcia nasłuchu się nie powiodła.'; + $lang['strconfdroplisten'] = 'Czy na pewno chcesz usunąć nasłuch "%s"?'; + $lang['strlistendropped'] = 'Nasłuch został usunięty.'; + $lang['strlistendroppedbad'] = 'Próba usunięcia nasłuchu się nie powiodła.'; + + // Slony replication sets + $lang['strrepsets'] = 'Zbiory replikacji'; + $lang['strnorepsets'] = 'Nie znaleziono zbiorów replikacji.'; + $lang['strcreaterepset'] = 'Utwórz zbiór replikacji'; + $lang['strrepsetcreated'] = 'Zbiór replikacji został utworzony.'; + $lang['strrepsetcreatedbad'] = 'Próba utworzenia zbioru replikacji się nie powiodła.'; + $lang['strconfdroprepset'] = 'Czy na pewno chcesz usunąć zbiór replikacji "%s"?'; + $lang['strrepsetdropped'] = 'Zbiór replikacji został usunięty.'; + $lang['strrepsetdroppedbad'] = 'Próba usunięcia zbioru replikacji się nie powiodła.'; + $lang['strmerge'] = 'Połącz'; + $lang['strmergeinto'] = 'Połącz w'; + $lang['strrepsetmerged'] = 'Zbiory replikacji zostały połączone.'; + $lang['strrepsetmergedbad'] = 'Próba połączenia zbiorów replikacji się nie powiodła.'; + $lang['strmove'] = 'Przenieś'; + $lang['strneworigin'] = 'Nowe położenie'; + $lang['strrepsetmoved'] = 'Zbiór replikacji został przeniesiony.'; + $lang['strrepsetmovedbad'] = 'Próba przeniesienia zbioru replikacji się nie powiodła.'; + $lang['strnewrepset'] = 'Nowy zbiór replikacji'; + $lang['strlock'] = 'Zablokuj'; + $lang['strlocked'] = 'Zablokowany'; + $lang['strunlock'] = 'Odblokuj'; + $lang['strconflockrepset'] = 'Czy na pewno chcesz zablokować zbiór replikacji "%s"?'; + $lang['strrepsetlocked'] = 'Zbiór replikacji został zablokowany.'; + $lang['strrepsetlockedbad'] = 'Próba zablokowania zbioru replikacji się nie powiodła.'; + $lang['strconfunlockrepset'] = 'Czy na pewno chcesz odblokować zbiór replikacji "%s"?'; + $lang['strrepsetunlocked'] = 'Zbiór replikacji został odblokowany.'; + $lang['strrepsetunlockedbad'] = 'Próba odblokowania zbioru replikacji się nie powiodła.'; + $lang['strexecute'] = 'Wykonaj'; + $lang['stronlyonnode'] = 'Tylko w węźle'; + $lang['strddlscript'] = 'Skrypt DDL'; + $lang['strscriptneedsbody'] = 'Musisz podać skrypt, który należy wykonać na wszystkich węzłach.'; + $lang['strscriptexecuted'] = 'Skrypt DDL został wykonany w zbiorze replikacji.'; + $lang['strscriptexecutedbad'] = 'Próba wykonania skryptu DDL w zbiorze replikacji się nie powiodła.'; + $lang['strtabletriggerstoretain'] = 'Następujące wyzwalacze NIE zostaną wyłączone przez Slony:'; + + // Slony tables in replication sets + $lang['straddtable'] = 'Dodaj tabelę'; + $lang['strtableneedsuniquekey'] = 'Dodawana tabela musi mieć klucz główny lub unikatowy.'; + $lang['strtableaddedtorepset'] = 'Tabela została dodana do zbioru replikacji.'; + $lang['strtableaddedtorepsetbad'] = 'Próba dodania tabeli do zbioru replikacji się nie powiodła.'; + $lang['strconfremovetablefromrepset'] = 'Czy na pewno chcesz usunąć tabelę "%s" ze zbioru replikacji "%s"?'; + $lang['strtableremovedfromrepset'] = 'Tabela została usunięta ze zbioru replikacji.'; + $lang['strtableremovedfromrepsetbad'] = 'Próba usunięcia tabeli ze zbioru replikacji się nie powiodła.'; + + // Slony sequences in replication sets + $lang['straddsequence'] = 'Dodaj sekwencję'; + $lang['strsequenceaddedtorepset'] = 'Sekwencja została dodana do zbioru replikacji.'; + $lang['strsequenceaddedtorepsetbad'] = 'Próba dodania sekwencji do zbioru replikacji się nie powiodła.'; + $lang['strconfremovesequencefromrepset'] = 'Czy na pewno chcesz usunąć sekwencję "%s" ze zbioru replikacji "%s"?'; + $lang['strsequenceremovedfromrepset'] = 'Sekwencja została usunięta ze zbioru replikacji.'; + $lang['strsequenceremovedfromrepsetbad'] = 'Próba usunięcia sekwencji ze zbioru replikacji się nie powiodła.'; + + // Slony subscriptions + $lang['strsubscriptions'] = 'Subskrypcje'; + $lang['strnosubscriptions'] = 'Nie znaleziono subskrypcji.'; + + // Miscellaneous + $lang['strtopbar'] = '%s uruchomiony na %s:%s -- Jesteś zalogowany jako "%s"'; + $lang['strtimefmt'] = 'jS M, Y g:iA'; + $lang['strhelp'] = 'Pomoc'; + $lang['strhelpicon'] = '?'; + $lang['strlogintitle'] = 'Zaloguj do %s'; + $lang['strlogoutmsg'] = 'Wylogowano z %s'; + $lang['strloading'] = 'Ładuję...'; + $lang['strerrorloading'] = 'Błąd ładowania'; + $lang['strclicktoreload'] = 'Kliknij aby odświeżyć'; + + //Autovacuum + $lang['strautovacuum'] = 'Czyszczenie automatyczne'; + $lang['strturnedon'] = 'Włączone'; + $lang['strturnedoff'] = 'Wyłączone'; + $lang['strenabled'] = 'Aktywne'; + $lang['strvacuumbasethreshold'] = 'Podstawowy próg czyszczenia'; + $lang['strvacuumscalefactor'] = 'Współczynnik czyszczenia'; + $lang['stranalybasethreshold'] = 'Podstawowy próg analizy'; + $lang['stranalyzescalefactor'] = 'Współczynnik analizy'; + $lang['strvacuumcostdelay'] = 'Opóźnienie po przekroczeniu kosztu czyszczenia'; + $lang['strvacuumcostlimit'] = 'Limit kosztu czyszczenia'; + + //Table-level Locks + $lang['strlocks'] = 'Blokady'; + $lang['strtransaction'] = 'ID transakcji'; + $lang['strprocessid'] = 'ID procesu'; + $lang['strmode'] = 'Tryb blokowania'; + $lang['strislockheld'] = 'Czy blokada obowiązuje?'; + + // Prepared transactions + $lang['strpreparedxacts'] = 'Przygotowane transakcje'; + $lang['strxactid'] = 'ID transakcji'; + $lang['strgid'] = 'Globalny ID'; +?> diff --git a/php/pgadmin/lang/portuguese-br.php b/php/pgadmin/lang/portuguese-br.php new file mode 100644 index 0000000..362d9bf --- /dev/null +++ b/php/pgadmin/lang/portuguese-br.php @@ -0,0 +1,1023 @@ +'; + $lang['strfirst'] = '<< Primeiro'; + $lang['strlast'] = 'ltimo >>'; + $lang['strfailed'] = 'Falhou'; + $lang['strcreate'] = 'Criar'; + $lang['strcreated'] = 'Criado'; + $lang['strcomment'] = 'Comentrio'; + $lang['strlength'] = 'Tamanho'; + $lang['strdefault'] = 'Padro'; + $lang['stralter'] = 'Alterar'; + $lang['strok'] = 'OK'; + $lang['strcancel'] = 'Cancelar'; + $lang['strkill'] = 'Encerrar'; + $lang['strac'] = 'Habilitar AutoComplete'; + $lang['strsave'] = 'Salvar'; + $lang['strreset'] = 'Reiniciar'; + $lang['strrestart'] = 'Reinicializar'; + $lang['strinsert'] = 'Inserir'; + $lang['strselect'] = 'Selecionar'; + $lang['strdelete'] = 'Deletar'; + $lang['strupdate'] = 'Atualizar'; + $lang['strreferences'] = 'Referncias'; + $lang['stryes'] = 'Sim'; + $lang['strno'] = 'No'; + $lang['strtrue'] = 'TRUE'; + $lang['strfalse'] = 'FALSE'; + $lang['stredit'] = 'Editar'; + $lang['strcolumn'] = 'Coluna'; + $lang['strcolumns'] = 'Colunas'; + $lang['strrows'] = 'linha(s)'; + $lang['strrowsaff'] = 'linha(s) afetadas.'; + $lang['strobjects'] = 'objeto(s)'; + $lang['strback'] = 'Voltar'; + $lang['strqueryresults'] = 'Resultados da consulta'; + $lang['strshow'] = 'Exibir'; + $lang['strempty'] = 'Vazio'; + $lang['strlanguage'] = 'Linguagem'; + $lang['strencoding'] = 'Codificao'; + $lang['strvalue'] = 'Valor'; + $lang['strunique'] = 'nico(a)'; + $lang['strprimary'] = 'Primrio(a)'; + $lang['strexport'] = 'Exportar'; + $lang['strimport'] = 'Importar'; + $lang['strallowednulls'] = 'Caracteres NULL permitidos'; + $lang['strbackslashn'] = '\N'; + $lang['stremptystring'] = 'Texto/campo vazio'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = 'Administrao'; + $lang['strvacuum'] = 'Vcuo'; + $lang['stranalyze'] = 'Analisar'; + $lang['strclusterindex'] = 'Cluster'; + $lang['strclustered'] = 'Clusterizado?'; + $lang['strreindex'] = 'Reindexar'; + $lang['strexecute'] = 'Executar'; + $lang['stradd'] = 'Adicionar'; + $lang['strevent'] = 'Evento'; + $lang['strwhere'] = 'Onde'; + $lang['strinstead'] = 'Faa preferivelmente'; + $lang['strwhen'] = 'Quando'; + $lang['strformat'] = 'Formato'; + $lang['strdata'] = 'Data'; + $lang['strconfirm'] = 'Confirma'; + $lang['strexpression'] = 'Expresso'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'Expandir'; + $lang['strcollapse'] = 'Reduzir'; + $lang['strfind'] = 'Encontrar'; + $lang['stroptions'] = 'Opes'; + $lang['strrefresh'] = 'Atualizar'; + $lang['strdownload'] = 'Download'; + $lang['strdownloadgzipped'] = 'Download compactado com gzip'; + $lang['strinfo'] = 'Informaes'; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = 'Avanado'; + $lang['strvariables'] = 'Variveis'; + $lang['strprocess'] = 'Processo'; + $lang['strprocesses'] = 'Processos'; + $lang['strsetting'] = 'Valor atribudo'; + $lang['streditsql'] = 'Editar SQL'; + $lang['strruntime'] = 'Tempo de execuo total: %s ms'; + $lang['strpaginate'] = 'Paginar resultados'; + $lang['struploadscript'] = 'ou carregue o script SQL de um arquivo:'; + $lang['strstarttime'] = 'Hora de incio'; + $lang['strfile'] = 'Arquivo'; + $lang['strfileimported'] = 'Arquivo importado.'; + $lang['strtrycred'] = 'Utilizar estas credenciais para todos os servidores'; + $lang['strconfdropcred'] = 'Por motivos de segurana, a desconexo ir destruir suas informaes de login compartilhado. Tem certeza que deseja se desconectar?'; + $lang['stractionsonmultiplelines'] = 'Aes sobre mltiplas linhas'; + $lang['strselectall'] = 'Selecionar tudo'; + $lang['strunselectall'] = 'Desmarcar tudo'; + $lang['strlocale'] = 'Local'; + $lang['strcollation'] = 'Comparao'; + $lang['strctype'] = 'Tipo de codificao'; + $lang['strdefaultvalues'] = 'Valores padro'; + $lang['strnewvalues'] = 'Novos valores'; + $lang['strstart'] = 'Iniciar'; + $lang['strstop'] = 'Parar'; + $lang['strgotoppage'] = 'Topo da pgina'; + $lang['strtheme'] = 'Tema'; + + // Admin + $lang['stradminondatabase'] = 'As tarefas administrativas a seguir se aplicam em toda a base de dados %s.'; + $lang['stradminontable'] = 'As tarefas administrativas a seguir se aplicam na tabela %s.'; + + // User-supplied SQL history + $lang['strhistory'] = 'Histrico'; + $lang['strnohistory'] = 'Sem histrico.'; + $lang['strclearhistory'] = 'Limpar histrico'; + $lang['strdelhistory'] = 'Deletar do histrico'; + $lang['strconfdelhistory'] = 'Realmente remover esta entrada do histrico?'; + $lang['strconfclearhistory'] = 'Realmente limpar o histrico?'; + $lang['strnodatabaseselected'] = 'Por favor, selecione uma base de dados.'; + + // Database sizes + $lang['strnoaccess'] = 'Sem acesso'; + $lang['strsize'] = 'Tamanho'; + $lang['strbytes'] = 'bytes'; + $lang['strkb'] = 'kB'; + $lang['strmb'] = 'MB'; + $lang['strgb'] = 'GB'; + $lang['strtb'] = 'TB'; + + // Error handling + $lang['strnoframes'] = 'Esta aplicao opera melhor em um navegador com suporte a frames, mas pode ser utilizada sem frames acessando o link abaixo.'; + $lang['strnoframeslink'] = 'Utilizar sem frames'; + $lang['strbadconfig'] = 'Seu arquivo config.inc.php est desatualizado. Voc ter que ger-lo novamente a partir do novo arquivo config.inc.php-dist.'; + $lang['strnotloaded'] = 'Sua instalao do PHP no tm suporte ao PostgreSQL. Voc dever recompilar o PHP utilizando a opo de configurao --with-pgsql (GNU-Linux) ou habilitar a extenso extension=php_pgsql.dll no php.ini (Microsoft Windows).'; + $lang['strpostgresqlversionnotsupported'] = 'Verso do PostgreSQL no suportada. Por favor, atualize para a sua verso %s ou posterior.'; + $lang['strbadschema'] = 'Esquema especificado invlido.'; + $lang['strbadencoding'] = 'Falha ao atribuir a codificao do cliente na base de dados.'; + $lang['strsqlerror'] = 'Erro de SQL:'; + $lang['strinstatement'] = 'No bloco:'; + $lang['strinvalidparam'] = 'Parmetros de script invlidos.'; + $lang['strnodata'] = 'Nenhuma linha encontrada.'; + $lang['strnoobjects'] = 'Nenhum objeto encontrado.'; + $lang['strrownotunique'] = 'Nenhum identificador nico para esta linha.'; + $lang['strnoreportsdb'] = 'Voc no criou a base de dados para relatrios. Leia o arquivo INSTALL para resoluo.'; + $lang['strnouploads'] = 'O upload de arquivos est desabilitado.'; + $lang['strimporterror'] = 'Erro de importao.'; + $lang['strimporterror-fileformat'] = 'Erro de importao: Falhou ao determinar automticamente o formato do arquivo.'; + $lang['strimporterrorline'] = 'Erro de importao na linha %s.'; + $lang['strimporterrorline-badcolumnnum'] = 'Erro de importao na linha %s: Linha no possui o nmero correto de colunas.'; + $lang['strimporterror-uploadedfile'] = 'Erro de importao: O arquivo no pode ser carregado para o servidor'; + $lang['strcannotdumponwindows'] = 'O dumping de uma tabela complexa e um nome de esquema no suportado no Windows.'; + $lang['strinvalidserverparam'] = 'Tentativa de conectar com um parmetro de servidor invlido, possivelmente algum est tentando hackear o seu sistema.'; + $lang['strnoserversupplied'] = 'Nenhum servidor informado!'; + $lang['strbadpgdumppath'] = 'Erro de exportao: Falha ao executar pg_dump (caminho apontado no seu conf/config.inc.php : %s). Por favor, ajuste este diretrio na sua configurao e relogue no sistema.'; + $lang['strbadpgdumpallpath'] = 'Erro de exportao: Falha ao executar pg_dumpall (caminho apontado no seu conf/config.inc.php : %s). Por favor, este diretrio na sua configurao e relogue no sistema.'; + $lang['strconnectionfail'] = 'A conexo falhou.'; + + // Tables + $lang['strtable'] = 'Tabela'; + $lang['strtables'] = 'Tabelas'; + $lang['strshowalltables'] = 'Exibir todas as tabelas'; + $lang['strnotables'] = 'Nenhuma tabela encontrada.'; + $lang['strnotable'] = 'Nenhuma tabela encontrada.'; + $lang['strcreatetable'] = 'Criar tabela'; + $lang['strcreatetablelike'] = 'Criar tabela similar'; + $lang['strcreatetablelikeparent'] = 'Tabela de origem'; + $lang['strcreatelikewithdefaults'] = 'INCLUDE DEFAULTS'; + $lang['strcreatelikewithconstraints'] = 'INCLUDE CONSTRAINTS'; + $lang['strcreatelikewithindexes'] = 'INCLUDE INDEXES'; + $lang['strtablename'] = 'Nome da tabela'; + $lang['strtableneedsname'] = 'Voc deve informar um nome para a sua tabela.'; + $lang['strtablelikeneedslike'] = 'Voc deve informar uma tabela para copiar suas propriedades.'; + $lang['strtableneedsfield'] = 'Voc deve informar ao menos um campo.'; + $lang['strtableneedscols'] = 'Voc deve informar um nmero de colunas vlido.'; + $lang['strtablecreated'] = 'Tabela criada.'; + $lang['strtablecreatedbad'] = 'Falha ao criar a tabela.'; + $lang['strconfdroptable'] = 'Voc tm certeza que deseja deletar a tabela "%s"?'; + $lang['strtabledropped'] = 'Tabela deletada.'; + $lang['strtabledroppedbad'] = 'Falha ao deletar a tabela.'; + $lang['strconfemptytable'] = 'Voc tm certeza que deseja esvaziar a tabela "%s"?'; + $lang['strtableemptied'] = 'Tabela esvaziada.'; + $lang['strtableemptiedbad'] = 'Falha ao esvaziar a tabela.'; + $lang['strinsertrow'] = 'Inserir linha'; + $lang['strrowinserted'] = 'Linha inserida.'; + $lang['strrowinsertedbad'] = 'Falha ao inserir a linha.'; + $lang['strnofkref'] = 'No h valor correspondendo na chave estrangeira %s.'; + $lang['strrowduplicate'] = 'Falha ao inserir a linha, tentativa de insero duplicada.'; + $lang['streditrow'] = 'Editar linha'; + $lang['strrowupdated'] = 'Linha atualizada.'; + $lang['strrowupdatedbad'] = 'Falha ao atualizar a linha.'; + $lang['strdeleterow'] = 'Deletar linha'; + $lang['strconfdeleterow'] = 'Voc tm certeza que deseja deletar esta linha?'; + $lang['strrowdeleted'] = 'Linha deletada.'; + $lang['strrowdeletedbad'] = 'Falha ao deletar a linha.'; + $lang['strinsertandrepeat'] = 'Inserir & Repitir'; + $lang['strnumcols'] = 'Nmero de colunas'; + $lang['strcolneedsname'] = 'Voc deve informar um nome para a coluna'; + $lang['strselectallfields'] = 'Selecionar todos os campos'; + $lang['strselectneedscol'] = 'Voc deve exibir ao menos uma coluna.'; + $lang['strselectunary'] = 'Operadores unrios no podem ter valores.'; + $lang['strcolumnaltered'] = 'Coluna alterada.'; + $lang['strcolumnalteredbad'] = 'Falha ao alterar a coluna.'; + $lang['strconfdropcolumn'] = 'Voc tm certeza que deseja remover a coluna "%s" da tabela "%s"?'; + $lang['strcolumndropped'] = 'Coluna removida.'; + $lang['strcolumndroppedbad'] = 'Falha ao remover a coluna.'; + $lang['straddcolumn'] = 'Adicionar coluna'; + $lang['strcolumnadded'] = 'Coluna adicionada.'; + $lang['strcolumnaddedbad'] = 'Falha ao adicionar a coluna.'; + $lang['strcascade'] = 'CASCADE'; + $lang['strtablealtered'] = 'Tabela alterada.'; + $lang['strtablealteredbad'] = 'Falha ao alterar a tabela.'; + $lang['strdataonly'] = 'Somente dados'; + $lang['strstructureonly'] = 'Somente estrutura'; + $lang['strstructureanddata'] = 'Estrutura e dados'; + $lang['strtabbed'] = 'Tabulado'; + $lang['strauto'] = 'Auto'; + $lang['strconfvacuumtable'] = 'Voc tm certeza que deseja realizar vcuo em "%s"?'; + $lang['strconfanalyzetable'] = 'Voc tm certeza que deseja analizar "%s"?'; + $lang['strconfreindextable'] = 'Voc tm certeza que deseja reindexar "%s"?'; + $lang['strconfclustertable'] = 'Voc tm certeza que deseja clusterizar "%s"?'; + $lang['strestimatedrowcount'] = 'Nmero estimado de linhas'; + $lang['strspecifytabletoanalyze'] = 'Voc deve especificar ao menos uma tabela para analisar.'; + $lang['strspecifytabletoempty'] = 'Voc deve especificar ao menos uma tabela para esvaziar.'; + $lang['strspecifytabletodrop'] = 'Voc deve especificar ao menos uma tabela para deletar.'; + $lang['strspecifytabletovacuum'] = 'Voc deve especificar ao menos uma tabela para o vcuo.'; + $lang['strspecifytabletoreindex'] = 'Voc deve especificar ao menos uma tabela para reindexar.'; + $lang['strspecifytabletocluster'] = 'Voc deve especificar ao menos uma tabela para clusterizar.'; + $lang['strnofieldsforinsert'] = 'Voc no pode inserir uma linha em uma tabela sem colunas.'; + + // Columns + $lang['strcolprop'] = 'Propriedades da coluna'; + $lang['strnotableprovided'] = 'Nenhuma tabela informada!'; + + // Users + $lang['struser'] = 'Usurio'; + $lang['strusers'] = 'Usurios'; + $lang['strusername'] = 'Nome de usurio'; + $lang['strpassword'] = 'Senha'; + $lang['strsuper'] = 'Super usurio?'; + $lang['strcreatedb'] = 'Criar DB?'; + $lang['strexpires'] = 'Expira'; + $lang['strsessiondefaults'] = 'Padres de sesso'; + $lang['strnousers'] = 'Nenhum usurio encontrado.'; + $lang['struserupdated'] = 'Usurio atualizado.'; + $lang['struserupdatedbad'] = 'Falha ao atualizar usurio.'; + $lang['strshowallusers'] = 'Exibir todos os usurios'; + $lang['strcreateuser'] = 'Criar usurio'; + $lang['struserneedsname'] = 'Voc deve informar um nome para o seu usurio.'; + $lang['strusercreated'] = 'Usurio criado.'; + $lang['strusercreatedbad'] = 'Falha ao criar usurio.'; + $lang['strconfdropuser'] = 'Voc tm certeza que deseja deletar o usurio "%s"?'; + $lang['struserdropped'] = 'Usurio deletado.'; + $lang['struserdroppedbad'] = 'Falha ao deletar usurio.'; + $lang['straccount'] = 'Conta'; + $lang['strchangepassword'] = 'Alterar senha'; + $lang['strpasswordchanged'] = 'Senha alterada.'; + $lang['strpasswordchangedbad'] = 'Falha ao alterar a senha.'; + $lang['strpasswordshort'] = 'A senha muito curta.'; + $lang['strpasswordconfirm'] = 'A confirmao de senha no confere.'; + + // Groups + $lang['strgroup'] = 'Grupo'; + $lang['strgroups'] = 'Grupos'; + $lang['strshowallgroups'] = 'Exibir todos os grupos'; + $lang['strnogroup'] = 'Grupo no encontrado.'; + $lang['strnogroups'] = 'Nenhum grupo encontrado.'; + $lang['strcreategroup'] = 'Criar grupo'; + $lang['strgroupneedsname'] = 'Voc deve informar um nome para o seu grupo.'; + $lang['strgroupcreated'] = 'Grupo criado.'; + $lang['strgroupcreatedbad'] = 'Falha ao criar o grupo.'; + $lang['strconfdropgroup'] = 'Voc tm certeza que deseja deletar o grupo "%s"?'; + $lang['strgroupdropped'] = 'Grupo deletado.'; + $lang['strgroupdroppedbad'] = 'Falha ao deletar grupo.'; + $lang['strmembers'] = 'Membros'; + $lang['strmemberof'] = 'Membro de'; + $lang['stradminmembers'] = 'Membros administrativos'; + $lang['straddmember'] = 'Adicionar membros'; + $lang['strmemberadded'] = 'Membro adicionado.'; + $lang['strmemberaddedbad'] = 'Falha ao adicionar membro.'; + $lang['strdropmember'] = 'Deletar membro'; + $lang['strconfdropmember'] = 'Voc tm certeza que deseja deletar o membro "%s" do grupo "%s"?'; + $lang['strmemberdropped'] = 'Membro deletado.'; + $lang['strmemberdroppedbad'] = 'Falha ao deletar membro.'; + + // Roles + $lang['strrole'] = 'Papel'; + $lang['strroles'] = 'Papis'; + $lang['strshowallroles'] = 'Exibir todos os papis'; + $lang['strnoroles'] = 'Nenhum papel encontrado.'; + $lang['strinheritsprivs'] = 'Herdar privilgios?'; + $lang['strcreaterole'] = 'Criar papel'; + $lang['strcancreaterole'] = 'Pode criar papis?'; + $lang['strrolecreated'] = 'Papel criado.'; + $lang['strrolecreatedbad'] = 'Falha ao criar o papel.'; + $lang['strrolealtered'] = 'Papel alterado.'; + $lang['strrolealteredbad'] = 'Falha ao alterar o papel.'; + $lang['strcanlogin'] = 'Pode logar?'; + $lang['strconnlimit'] = 'Limite de conexes'; + $lang['strdroprole'] = 'Deletar papel'; + $lang['strconfdroprole'] = 'Voc tm certeza que deseja deletar o papel "%s"?'; + $lang['strroledropped'] = 'Papel deletado.'; + $lang['strroledroppedbad'] = 'Falha ao deletar o papel.'; + $lang['strnolimit'] = 'Sem limite'; + $lang['strnever'] = 'Nunca'; + $lang['strroleneedsname'] = 'Voc deve informar um nome para o papel.'; + + // Privileges + $lang['strprivilege'] = 'Privilgio'; + $lang['strprivileges'] = 'Privilgios'; + $lang['strnoprivileges'] = 'Este objeto tm os privilgios padres de proprietrio.'; + $lang['strgrant'] = 'Conceder'; + $lang['strrevoke'] = 'Revogar'; + $lang['strgranted'] = 'Privilgios alterados.'; + $lang['strgrantfailed'] = 'Falha ao alterar os privilgios.'; + $lang['strgrantbad'] = 'Voc deve informar ao menos um usurio ou grupo e ao menos um privilgio.'; + $lang['strgrantor'] = 'Provedor'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'Banco de dados'; + $lang['strdatabases'] = 'Bancos de dados'; + $lang['strshowalldatabases'] = 'Exibir todos os bancos de dados'; + $lang['strnodatabases'] = 'Nenhum banco de dados encontrado.'; + $lang['strcreatedatabase'] = 'Criar banco de dados'; + $lang['strdatabasename'] = 'Nome do banco de dados'; + $lang['strdatabaseneedsname'] = 'Voc deve informar um nome para o seu banco de dados.'; + $lang['strdatabasecreated'] = 'Banco de dados criado.'; + $lang['strdatabasecreatedbad'] = 'Falha ao criar o banco de dados.'; + $lang['strconfdropdatabase'] = 'Voc tem certeza que deseja deletar o banco de dados "%s"?'; + $lang['strdatabasedropped'] = 'Banco de dados deletado.'; + $lang['strdatabasedroppedbad'] = 'Falha ao deletar o banco de dados.'; + $lang['strentersql'] = 'Informe o SQL a executar abaixo:'; + $lang['strsqlexecuted'] = 'SQL executado.'; + $lang['strvacuumgood'] = 'Vcuo completo.'; + $lang['strvacuumbad'] = 'Falha ao realizar o vcuo.'; + $lang['stranalyzegood'] = 'Anlise completa.'; + $lang['stranalyzebad'] = 'Falha ao realizar a anlise.'; + $lang['strreindexgood'] = 'Reindexao completa.'; + $lang['strreindexbad'] = 'Falha ao executar a reindexao.'; + $lang['strfull'] = 'Completo'; + $lang['strfreeze'] = 'Congelar'; + $lang['strforce'] = 'Forar'; + $lang['strsignalsent'] = 'Sinal enviado.'; + $lang['strsignalsentbad'] = 'Falha ao enviar o sinal.'; + $lang['strallobjects'] = 'Todos os objetos'; + $lang['strdatabasealtered'] = 'Banco de dados alterado.'; + $lang['strdatabasealteredbad'] = 'Falha ao alterar o banco de dados.'; + $lang['strspecifydatabasetodrop'] = 'Voc deve especificar ao menos um banco de dados para deletar.'; + $lang['strtemplatedb'] = 'Modelo'; + $lang['strconfanalyzedatabase'] = 'Voc tm certeza que deseja analisar todas as tabelas na base de dados "%s"?'; + $lang['strconfvacuumdatabase'] = 'Voc tm certeza que deseja realizar vcuo em todas as tabelas na base de dados "%s"?'; + $lang['strconfreindexdatabase'] = 'Voc tm certeza que deseja reindexar todas as tabelas na base de dados "%s"?'; + $lang['strconfclusterdatabase'] = 'Voc tm certeza que deseja clusterizar todas as tabelas na base de dados "%s"?'; + + // Views + $lang['strview'] = 'Viso'; + $lang['strviews'] = 'Vises'; + $lang['strshowallviews'] = 'Exibir todas as vises'; + $lang['strnoview'] = 'Nenhuma viso encontrada.'; + $lang['strnoviews'] = 'Nenhuma viso encontrada.'; + $lang['strcreateview'] = 'Criar viso'; + $lang['strviewname'] = 'Nome da viso'; + $lang['strviewneedsname'] = 'Voc deve informar o nome da sua viso.'; + $lang['strviewneedsdef'] = 'Voc deve informar uma definio para a sua viso.'; + $lang['strviewneedsfields'] = 'Voc deve informar as colunas que voc deseja selecionar para a sua viso.'; + $lang['strviewcreated'] = 'Viso criada.'; + $lang['strviewcreatedbad'] = 'Falha ao criar a viso.'; + $lang['strconfdropview'] = 'Voc tm certeza que deseja deletar a viso "%s"?'; + $lang['strviewdropped'] = 'Viso deletada.'; + $lang['strviewdroppedbad'] = 'Falha ao deletar a viso.'; + $lang['strviewupdated'] = 'Viso atualizada.'; + $lang['strviewupdatedbad'] = 'Falha ao atualizar a viso.'; + $lang['strviewlink'] = 'Chaves de ligao'; + $lang['strviewconditions'] = 'Condies adicionais'; + $lang['strcreateviewwiz'] = 'Criar viso com o assistente'; + $lang['strrenamedupfields'] = 'Renomear campos duplicados'; + $lang['strdropdupfields'] = 'Deletar campos duplicados'; + $lang['strerrordupfields'] = 'Erro quando campos duplicados'; + $lang['strviewaltered'] = 'Viso alterada.'; + $lang['strviewalteredbad'] = 'Falha ao alterar a viso.'; + $lang['strspecifyviewtodrop'] = 'Voc deve informar ao menos uma viso para deletar.'; + + // Sequences + $lang['strsequence'] = 'Seqncia'; + $lang['strsequences'] = 'Seqncias'; + $lang['strshowallsequences'] = 'Exibir todas as seqncias'; + $lang['strnosequence'] = 'Nenhuma seqncia encontrada.'; + $lang['strnosequences'] = 'Nenhuma seqncia encontrada.'; + $lang['strcreatesequence'] = 'Criar seqncia'; + $lang['strlastvalue'] = 'ltimo valor'; + $lang['strincrementby'] = 'Incrementado por'; + $lang['strstartvalue'] = 'Valor inicial'; + $lang['strrestartvalue'] = 'Valor de reinicializao'; + $lang['strmaxvalue'] = 'Valor mximo'; + $lang['strminvalue'] = 'Valor mnimo'; + $lang['strcachevalue'] = 'Valor de cache'; + $lang['strlogcount'] = 'Contador do log'; + $lang['strcancycle'] = 'Pode ser cclica?'; + $lang['striscalled'] = 'Ir incrementar o ltimo valor antes de retornar o prximo valor (is_called)?'; + $lang['strsequenceneedsname'] = 'Voc deve informar um nome para a sua seqncia.'; + $lang['strsequencecreated'] = 'Seqncia criada.'; + $lang['strsequencecreatedbad'] = 'Falha ao criar a seqncia.'; + $lang['strconfdropsequence'] = 'Voc tm certeza que deseja deletar a seqncia "%s"?'; + $lang['strsequencedropped'] = 'Seqncia deletada.'; + $lang['strsequencedroppedbad'] = 'Falha ao deletar a seqncia.'; + $lang['strsequencerestart'] = 'Seqncia reinicializada.'; + $lang['strsequencerestartbad'] = 'Falha ao reinicializar a seqncia.'; + $lang['strsequencereset'] = 'Reinicializar a seqncia.'; + $lang['strsequenceresetbad'] = 'Falha ao reinicializar a seqncia.'; + $lang['strsequencealtered'] = 'Seqncia alterada.'; + $lang['strsequencealteredbad'] = 'Falha ao alterar a seqncia.'; + $lang['strsetval'] = 'Atribuir valor'; + $lang['strsequencesetval'] = 'Atribuir valor da seqncia.'; + $lang['strsequencesetvalbad'] = 'Falha ao atribuir valor da seqncia.'; + $lang['strnextval'] = 'Valor de incremento'; + $lang['strsequencenextval'] = 'Seqncia incrementada.'; + $lang['strsequencenextvalbad'] = 'Falha ao incrementar a seqncia.'; + $lang['strspecifysequencetodrop'] = 'Voc deve informar ao menos uma seqncia para deletar.'; + + // Indexes + $lang['strindex'] = 'ndice'; + $lang['strindexes'] = 'ndices'; + $lang['strindexname'] = 'Nome do ndice'; + $lang['strshowallindexes'] = 'Exibir todos os ndices'; + $lang['strnoindex'] = 'Nenhum ndice encontrado.'; + $lang['strnoindexes'] = 'Nenhum ndice encontrado.'; + $lang['strcreateindex'] = 'Criar ndice'; + $lang['strtabname'] = 'Nome da tabela'; + $lang['strcolumnname'] = 'Nome da coluna'; + $lang['strindexneedsname'] = 'Voc deve informar um nome para o seu ndice.'; + $lang['strindexneedscols'] = 'ndices requerem um nmero vlido de colunas.'; + $lang['strindexcreated'] = 'ndice criado.'; + $lang['strindexcreatedbad'] = 'Falha ao criar o ndice.'; + $lang['strconfdropindex'] = 'Voc tm certeza que deseja deletar o ndice "%s"?'; + $lang['strindexdropped'] = 'ndice deletado.'; + $lang['strindexdroppedbad'] = 'Falha ao deletar o ndice.'; + $lang['strkeyname'] = 'Nome da chave'; + $lang['struniquekey'] = 'Chave nica'; + $lang['strprimarykey'] = 'Chave primria'; + $lang['strindextype'] = 'Tipo de ndice'; + $lang['strtablecolumnlist'] = 'Colunas na tabela'; + $lang['strindexcolumnlist'] = 'Colunas no ndice'; + $lang['strclusteredgood'] = 'Clusterizao completa.'; + $lang['strclusteredbad'] = 'Falha ao clusterizar.'; + $lang['strconcurrently'] = 'Simultaneamente'; + $lang['strnoclusteravailable'] = 'Tabela no clusterizada em um ndice.'; + + // Rules + $lang['strrules'] = 'Regras'; + $lang['strrule'] = 'Regra'; + $lang['strshowallrules'] = 'Exibir todas as regras'; + $lang['strnorule'] = 'Nenhuma regra encontrada.'; + $lang['strnorules'] = 'Nenhuma regra encontrada.'; + $lang['strcreaterule'] = 'Criar regra'; + $lang['strrulename'] = 'Nome da regra'; + $lang['strruleneedsname'] = 'Voc deve informar um nome para a sua regra.'; + $lang['strrulecreated'] = 'Regra criada.'; + $lang['strrulecreatedbad'] = 'Falha ao criar a regra.'; + $lang['strconfdroprule'] = 'Voc tm certeza que deseja deletar a regra "%s" em "%s"?'; + $lang['strruledropped'] = 'Regra deletada.'; + $lang['strruledroppedbad'] = 'Falha ao deletar a regra.'; + + // Constraints + $lang['strconstraint'] = 'Restrio'; + $lang['strconstraints'] = 'Restries'; + $lang['strshowallconstraints'] = 'Exibir todas as restries'; + $lang['strnoconstraints'] = 'Nenhuma restrio encontrada.'; + $lang['strcreateconstraint'] = 'Criar restrio'; + $lang['strconstraintcreated'] = 'Restrio criada.'; + $lang['strconstraintcreatedbad'] = 'Falha ao criar a restrio.'; + $lang['strconfdropconstraint'] = 'Voc tm certeza que deseja deletar a restrio "%s" em "%s"?'; + $lang['strconstraintdropped'] = 'Restrio deletada.'; + $lang['strconstraintdroppedbad'] = 'Falha ao deletar a restrio.'; + $lang['straddcheck'] = 'Adicionar checagem'; + $lang['strcheckneedsdefinition'] = 'Checagem de restrio necessita de uma definio.'; + $lang['strcheckadded'] = 'Checagem de restrio adicionada.'; + $lang['strcheckaddedbad'] = 'Falha ao adicionar checagem de restrio.'; + $lang['straddpk'] = 'Adicionar chave primria'; + $lang['strpkneedscols'] = 'Chave primria necessita de ao menos uma coluna.'; + $lang['strpkadded'] = 'Chave primria adicionada.'; + $lang['strpkaddedbad'] = 'Falha ao adicionar chave primria.'; + $lang['stradduniq'] = 'Adicionar chave nica'; + $lang['struniqneedscols'] = 'Chave nica necessita de ao menos uma coluna.'; + $lang['struniqadded'] = 'Chave nica adicionada.'; + $lang['struniqaddedbad'] = 'Falha ao adicionar chave nica.'; + $lang['straddfk'] = 'Adicionar chave estrangeira'; + $lang['strfkneedscols'] = 'Chave estrangeira necessita de ao menos uma coluna.'; + $lang['strfkneedstarget'] = 'Chave estrangeira necessita de uma tabela alvo.'; + $lang['strfkadded'] = 'Chave estrangeira adicionada.'; + $lang['strfkaddedbad'] = 'Falha ao adicionar a chave estrangeira.'; + $lang['strfktarget'] = 'Tabela alvo'; + $lang['strfkcolumnlist'] = 'Colunas em chaves'; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + + // Functions + $lang['strfunction'] = 'Funo'; + $lang['strfunctions'] = 'Funes'; + $lang['strshowallfunctions'] = 'Exibir todas as funes'; + $lang['strnofunction'] = 'Nenhuma funo encontrada.'; + $lang['strnofunctions'] = 'Nenhuma funo encontrada.'; + $lang['strcreateplfunction'] = 'Criar funo em PL/SQL'; + $lang['strcreateinternalfunction'] = 'Criar funo interna'; + $lang['strcreatecfunction'] = 'Criar funo em C'; + $lang['strfunctionname'] = 'Nome da funo'; + $lang['strreturns'] = 'Retorno'; + $lang['strproglanguage'] = 'Linguagem de programao'; + $lang['strfunctionneedsname'] = 'Voc deve informar um nome para a sua funo.'; + $lang['strfunctionneedsdef'] = 'Voc deve informar uma definio para a sua funo.'; + $lang['strfunctioncreated'] = 'Funo criada.'; + $lang['strfunctioncreatedbad'] = 'Falha ao criar a funo.'; + $lang['strconfdropfunction'] = 'Voc tm certeza que deseja deletar a funo "%s"?'; + $lang['strfunctiondropped'] = 'Funo deletada.'; + $lang['strfunctiondroppedbad'] = 'Falha ao deletar a funo.'; + $lang['strfunctionupdated'] = 'Funo atualizada.'; + $lang['strfunctionupdatedbad'] = 'Falha ao atualizar a funo.'; + $lang['strobjectfile'] = 'Arquivo objeto'; + $lang['strlinksymbol'] = 'Smbolo de link'; + $lang['strarguments'] = 'Argumentos'; + $lang['strargmode'] = 'Modo'; + $lang['strargtype'] = 'Tipo'; + $lang['strargadd'] = 'Adicionar outro argumento'; + $lang['strargremove'] = 'Remover este argumento'; + $lang['strargnoargs'] = 'Esta funo no ir utilizar argumentos.'; + $lang['strargenableargs'] = 'Habilitar argumentos passados para esta funo.'; + $lang['strargnorowabove'] = ' preciso ter uma linha acima desta.'; + $lang['strargnorowbelow'] = ' preciso ter uma linha abaixo desta.'; + $lang['strargraise'] = 'Mover acima.'; + $lang['strarglower'] = 'Mover abaixo.'; + $lang['strargremoveconfirm'] = 'Voc tm certeza que deseja remover este argumento? Isto NO PODE ser desfeito.'; + $lang['strfunctioncosting'] = 'Custo da funo'; + $lang['strresultrows'] = 'Linhas resultantes'; + $lang['strexecutioncost'] = 'Custo de execuo'; + $lang['strspecifyfunctiontodrop'] = 'Voc deve informar ao menos uma funo para deletar.'; + + // Triggers + $lang['strtrigger'] = 'Gatilho'; + $lang['strtriggers'] = 'Gatilhos'; + $lang['strshowalltriggers'] = 'Exibir todos os gatilhos'; + $lang['strnotrigger'] = 'Nenhum gatilho encontrado.'; + $lang['strnotriggers'] = 'Nenhum gatilho encontrado.'; + $lang['strcreatetrigger'] = 'Criar gatilho'; + $lang['strtriggerneedsname'] = 'Voc deve informar um nome para o seu gatilho.'; + $lang['strtriggerneedsfunc'] = 'Voc deve informar uma funo para o seu gatilho.'; + $lang['strtriggercreated'] = 'Gatilho criado.'; + $lang['strtriggercreatedbad'] = 'Falha ao criar o gatilho.'; + $lang['strconfdroptrigger'] = 'Voc tm certeza que deseja deletar o gatilho "%s" em "%s"?'; + $lang['strconfenabletrigger'] = 'Voc tm certeza que deseja ativar o gatilho "%s" em "%s"?'; + $lang['strconfdisabletrigger'] = 'Voc tm certeza que deseja desativar o gatilho "%s" em "%s"?'; + $lang['strtriggerdropped'] = 'Gatilho deletado.'; + $lang['strtriggerdroppedbad'] = 'Falha ao deletar o gatilho.'; + $lang['strtriggerenabled'] = 'Gatilho ativado.'; + $lang['strtriggerenabledbad'] = 'Falha ao ativar o gatilho.'; + $lang['strtriggerdisabled'] = 'Gatilho desativado.'; + $lang['strtriggerdisabledbad'] = 'Falha ao desativar o gatilho.'; + $lang['strtriggeraltered'] = 'Gatilho alterado.'; + $lang['strtriggeralteredbad'] = 'Falha ao alterar o gatilho.'; + $lang['strforeach'] = 'Para cada'; + + // Types + $lang['strtype'] = 'Tipo'; + $lang['strtypes'] = 'Tipos'; + $lang['strshowalltypes'] = 'Exibir todos os tipos'; + $lang['strnotype'] = 'Nenhum tipo encontrado.'; + $lang['strnotypes'] = 'Nenhum tipo encontrado.'; + $lang['strcreatetype'] = 'Criar tipo'; + $lang['strcreatecomptype'] = 'Criar tipo composto'; + $lang['strcreateenumtype'] = 'Criar tipo enumerado'; + $lang['strtypeneedsfield'] = 'Voc deve informar ao menos um campo.'; + $lang['strtypeneedsvalue'] = 'Voc deve informar ao menos um valor.'; + $lang['strtypeneedscols'] = 'Voc deve informar um nmero vlido de campos.'; + $lang['strtypeneedsvals'] = 'Voc deve informar um nmero vlido de valores.'; + $lang['strinputfn'] = 'Funo de entrada'; + $lang['stroutputfn'] = 'Funo de sada'; + $lang['strpassbyval'] = 'Passado por valor?'; + $lang['stralignment'] = 'Alinhamento'; + $lang['strelement'] = 'Elemento'; + $lang['strdelimiter'] = 'Delimitador'; + $lang['strstorage'] = 'Armazenamento'; + $lang['strfield'] = 'Campo'; + $lang['strnumfields'] = 'Num. de campos'; + $lang['strnumvalues'] = 'Num. de valores'; + $lang['strtypeneedsname'] = 'Voc deve informar um nome para o seu tipo.'; + $lang['strtypeneedslen'] = 'Voc deve informar o tamanho para o seu tipo.'; + $lang['strtypecreated'] = 'Tipo criado.'; + $lang['strtypecreatedbad'] = 'Falha ao criar o tipo.'; + $lang['strconfdroptype'] = 'Voc tm certeza que deseja deletar o tipo "%s"?'; + $lang['strtypedropped'] = 'Tipo deletado.'; + $lang['strtypedroppedbad'] = 'Falha ao deletar o tipo.'; + $lang['strflavor'] = 'Sabor'; + $lang['strbasetype'] = 'Base'; + $lang['strcompositetype'] = 'Composto'; + $lang['strpseudotype'] = 'Pseudo'; + $lang['strenum'] = 'Enum'; + $lang['strenumvalues'] = 'Valores enum'; + + // Schemas + $lang['strschema'] = 'Esquema'; + $lang['strschemas'] = 'Esquemas'; + $lang['strshowallschemas'] = 'Exibir todos os esquemas'; + $lang['strnoschema'] = 'Nenhum esquema encontrado.'; + $lang['strnoschemas'] = 'Nenhum esquema encontrado.'; + $lang['strcreateschema'] = 'Criar esquema'; + $lang['strschemaname'] = 'Nome do esquema'; + $lang['strschemaneedsname'] = 'Voc deve informar um nome para o seu esquema.'; + $lang['strschemacreated'] = 'Esquema criado.'; + $lang['strschemacreatedbad'] = 'Falha ao criar o esquema'; + $lang['strconfdropschema'] = 'Voc tm certeza que deseja deletar o esquema "%s"?'; + $lang['strschemadropped'] = 'Esquema deletado.'; + $lang['strschemadroppedbad'] = 'Falha ao deletar o esquema.'; + $lang['strschemaaltered'] = 'Esquema alterado.'; + $lang['strschemaalteredbad'] = 'Falha ao alterar o esquema.'; + $lang['strsearchpath'] = 'Diretrio de pesquisa do esquema'; + $lang['strspecifyschematodrop'] = 'Voc deve informar ao menos um esquema para deletar.'; + + // Reports + $lang['strreport'] = 'Relatrio'; + $lang['strreports'] = 'Relatrios'; + $lang['strshowallreports'] = 'Exibir todos os relatrios'; + $lang['strnoreports'] = 'Nenhum relatrio encontrado.'; + $lang['strcreatereport'] = 'Criar relatrio'; + $lang['strreportdropped'] = 'Relatrio deletado.'; + $lang['strreportdroppedbad'] = 'Falha ao deletar o relatrio.'; + $lang['strconfdropreport'] = 'Voc tm certeza que deseja deletar o relatrio "%s"?'; + $lang['strreportneedsname'] = 'Voc deve informar um nome para o seu relatrio.'; + $lang['strreportneedsdef'] = 'Voc deve informar o SQL para o seu relatrio.'; + $lang['strreportcreated'] = 'Relatrio salvo.'; + $lang['strreportcreatedbad'] = 'Falha ao salvar o relatrio.'; + + // Domains + $lang['strdomain'] = 'Domnio'; + $lang['strdomains'] = 'Domnios'; + $lang['strshowalldomains'] = 'Exibir todos os domnios'; + $lang['strnodomains'] = 'Nenhum domnio encontrado.'; + $lang['strcreatedomain'] = 'Criar domnio'; + $lang['strdomaindropped'] = 'Domnio deletado.'; + $lang['strdomaindroppedbad'] = 'Falha ao deletar o domnio.'; + $lang['strconfdropdomain'] = 'Voc tm certeza que deseja deletar o domnio "%s"?'; + $lang['strdomainneedsname'] = 'Voc deve informar um nome para o seu domnio.'; + $lang['strdomaincreated'] = 'Domnio criado.'; + $lang['strdomaincreatedbad'] = 'Falha ao criar o domnio.'; + $lang['strdomainaltered'] = 'Domnio alterado.'; + $lang['strdomainalteredbad'] = 'Falha ao alterar o domnio.'; + + // Operators + $lang['stroperator'] = 'Operador'; + $lang['stroperators'] = 'Operadores'; + $lang['strshowalloperators'] = 'Exibir todos os operadores'; + $lang['strnooperator'] = 'Nenhum operador encontrado.'; + $lang['strnooperators'] = 'Nenhum operador encontrado.'; + $lang['strcreateoperator'] = 'Criar operador'; + $lang['strleftarg'] = 'Tipo de Arg Esquerdo'; + $lang['strrightarg'] = 'Tipo de Arg Direito'; + $lang['strcommutator'] = 'Comutador'; + $lang['strnegator'] = 'Negador'; + $lang['strrestrict'] = 'Restrito'; + $lang['strjoin'] = 'Juno'; + $lang['strhashes'] = 'Misturador'; + $lang['strmerges'] = 'Fuso'; + $lang['strleftsort'] = 'Ordenao esquerda'; + $lang['strrightsort'] = 'Ordenao direita'; + $lang['strlessthan'] = 'Menor que'; + $lang['strgreaterthan'] = 'Maior que'; + $lang['stroperatorneedsname'] = 'Voc deve informar um nome para o seu operador.'; + $lang['stroperatorcreated'] = 'Operador criado.'; + $lang['stroperatorcreatedbad'] = 'Falha ao criar o operador.'; + $lang['strconfdropoperator'] = 'Voc tm certeza que deseja deletar o operador "%s"?'; + $lang['stroperatordropped'] = 'Operador deletado.'; + $lang['stroperatordroppedbad'] = 'Falha ao deletar o operador.'; + + // Casts + $lang['strcasts'] = 'Moldes'; + $lang['strnocasts'] = 'Nenhum molde encontrado.'; + $lang['strsourcetype'] = 'Tipo fonte'; + $lang['strtargettype'] = 'Tipo alvo'; + $lang['strimplicit'] = 'Implcito'; + $lang['strinassignment'] = 'Em atribuio'; + $lang['strbinarycompat'] = '(Compatibilidade binria)'; + + // Conversions + $lang['strconversions'] = 'Converses'; + $lang['strnoconversions'] = 'Nenhuma converso encontrada.'; + $lang['strsourceencoding'] = 'Codificao fonte'; + $lang['strtargetencoding'] = 'Codificao alvo'; + + // Languages + $lang['strlanguages'] = 'Linguagens'; + $lang['strnolanguages'] = 'Nenhuma linguagem encontrada.'; + $lang['strtrusted'] = 'Confiado'; + + // Info + $lang['strnoinfo'] = 'Nenhuma informao disponvel.'; + $lang['strreferringtables'] = 'Tabelas de referncia'; + $lang['strparenttables'] = 'Tabelas pais'; + $lang['strchildtables'] = 'Tabelas filhas'; + + // Aggregates + $lang['straggregate'] = 'Agregao'; + $lang['straggregates'] = 'Agregaes'; + $lang['strnoaggregates'] = 'Nenhuma agregao encontrada.'; + $lang['stralltypes'] = '(Todos os tipos)'; + $lang['strcreateaggregate'] = 'Criar agregao'; + $lang['straggrbasetype'] = 'Tipo de dados de entrada'; + $lang['straggrsfunc'] = 'Funo de transio de estado'; + $lang['straggrstype'] = 'Tipo de dados para valor de estado'; + $lang['straggrffunc'] = 'Funo final'; + $lang['straggrinitcond'] = 'Condio inicial'; + $lang['straggrsortop'] = 'Operador de ordem'; + $lang['strconfdropaggregate'] = 'Voc tm certeza que deseja deletar a agregao "%s"?'; + $lang['straggregatedropped'] = 'Agregao deletada.'; + $lang['straggregatedroppedbad'] = 'Falha ao deletar a agregao.'; + $lang['straggraltered'] = 'Agregao alterada.'; + $lang['straggralteredbad'] = 'Falha ao alterar a agregao.'; + $lang['straggrneedsname'] = 'Voc deve informar um nome para a sua agregao.'; + $lang['straggrneedsbasetype'] = 'Voc deve informar o tipo de entrada de dados para a agregao.'; + $lang['straggrneedssfunc'] = 'Voc deve informar o nome da funo de transio de estado para a agregao.'; + $lang['straggrneedsstype'] = 'Voc deve informar o tipo de dados para o valor de estado da agregao.'; + $lang['straggrcreated'] = 'Agregao criada.'; + $lang['straggrcreatedbad'] = 'Falha ao criar a agregao.'; + $lang['straggrshowall'] = 'Exibir todas as agregaes'; + + // Operator Classes + $lang['stropclasses'] = 'Classes Op'; + $lang['strnoopclasses'] = 'Nenhuma classe operador encontrada.'; + $lang['straccessmethod'] = 'Mtodo de acesso'; + + // Stats and performance + $lang['strrowperf'] = 'Performance de linha'; + $lang['strioperf'] = 'Performance de I/O'; + $lang['stridxrowperf'] = 'ndice de Performance de linha'; + $lang['stridxioperf'] = 'ndice de Performance de I/O'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Seqncial'; + $lang['strscan'] = 'Pesquisa'; + $lang['strread'] = 'Leitura'; + $lang['strfetch'] = 'Afetado'; + $lang['strheap'] = 'Pilha'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'ndice TOAST'; + $lang['strcache'] = 'Cache'; + $lang['strdisk'] = 'Disco'; + $lang['strrows2'] = 'Linhas'; + + // Tablespaces + $lang['strtablespace'] = 'Tablespace'; + $lang['strtablespaces'] = 'Tablespaces'; + $lang['strshowalltablespaces'] = 'Exibir todos os tablespaces'; + $lang['strnotablespaces'] = 'Nenhum tablespace encontrado.'; + $lang['strcreatetablespace'] = 'Criar tablespace'; + $lang['strlocation'] = 'Localizao'; + $lang['strtablespaceneedsname'] = 'Voc deve informar um nome para o tablespace.'; + $lang['strtablespaceneedsloc'] = 'Voc deve informar um diretrio em qual ser criado o tablespace.'; + $lang['strtablespacecreated'] = 'Tablespace criado.'; + $lang['strtablespacecreatedbad'] = 'Falha ao criar o tablespace.'; + $lang['strconfdroptablespace'] = 'Voc tm certeza que deseja deletar o tablespace "%s"?'; + $lang['strtablespacedropped'] = 'Tablespace deletado.'; + $lang['strtablespacedroppedbad'] = 'Falha ao deletar o tablespace.'; + $lang['strtablespacealtered'] = 'Tablespace alterado.'; + $lang['strtablespacealteredbad'] = 'Falha ao alterar o tablespace.'; + + // Slony clusters + $lang['strcluster'] = 'Cluster'; + $lang['strnoclusters'] = 'Nenhum cluster encontrado.'; + $lang['strconfdropcluster'] = 'Voc tm certeza que deseja deletar o cluster "%s"?'; + $lang['strclusterdropped'] = 'Cluster deletado.'; + $lang['strclusterdroppedbad'] = 'Falha ao deletar o cluster.'; + $lang['strinitcluster'] = 'Inicializar cluster'; + $lang['strclustercreated'] = 'Cluster inicializado.'; + $lang['strclustercreatedbad'] = 'Falha ao inicializar cluster.'; + $lang['strclusterneedsname'] = 'Voc deve informar um nome para o cluster.'; + $lang['strclusterneedsnodeid'] = 'Voc deve informar uma ID para o nodo local.'; + + // Slony nodes + $lang['strnodes'] = 'Nodos'; + $lang['strnonodes'] = 'Nenhum nodo encontrado.'; + $lang['strcreatenode'] = 'Criar nodo'; + $lang['strid'] = 'ID'; + $lang['stractive'] = 'Ativo'; + $lang['strnodecreated'] = 'Nodo criado.'; + $lang['strnodecreatedbad'] = 'Falha ao criar nodo.'; + $lang['strconfdropnode'] = 'Voc tm certeza que deseja deletar o nodo "%s"?'; + $lang['strnodedropped'] = 'Nodo deletado.'; + $lang['strnodedroppedbad'] = 'Falha ao deletar o nodo.'; + $lang['strfailover'] = 'Failover'; + $lang['strnodefailedover'] = 'Nodo failed over.'; + $lang['strnodefailedoverbad'] = 'Falha de failover sobre o nodo.'; + $lang['strstatus'] = 'Estado'; + $lang['strhealthy'] = 'Saudvel'; + $lang['stroutofsync'] = 'Fora de sinc'; + $lang['strunknown'] = 'Desconhecido'; + + // Slony paths + $lang['strpaths'] = 'Diretrios'; + $lang['strnopaths'] = 'Nenhum diretrio encontrado.'; + $lang['strcreatepath'] = 'Criar diretrio'; + $lang['strnodename'] = 'Nome do nodo'; + $lang['strnodeid'] = 'ID do nodo'; + $lang['strconninfo'] = 'String de conexo'; + $lang['strconnretry'] = 'Segundos antes de tentar reconectar'; + $lang['strpathneedsconninfo'] = 'Voc deve informar uma string de conexo para o diretrio.'; + $lang['strpathneedsconnretry'] = 'Voc deve informar um nmero de segundos a esperar antes de tentar reconectar.'; + $lang['strpathcreated'] = 'Diretrio criado.'; + $lang['strpathcreatedbad'] = 'Falha ao criar o diretrio.'; + $lang['strconfdroppath'] = 'Voc tm certeza que deseja deletar o diretrio "%s"?'; + $lang['strpathdropped'] = 'Diretrio deletado.'; + $lang['strpathdroppedbad'] = 'Falha ao deletar o diretrio.'; + + // Slony listens + $lang['strlistens'] = 'Escutas'; + $lang['strnolistens'] = 'Nenhuma escuta encontrada.'; + $lang['strcreatelisten'] = 'Criar escuta'; + $lang['strlistencreated'] = 'Escuta criada.'; + $lang['strlistencreatedbad'] = 'Falha ao criar a escuta.'; + $lang['strconfdroplisten'] = 'Voc tm certeza que deseja deletar a escuta "%s"?'; + $lang['strlistendropped'] = 'Escuta deletada.'; + $lang['strlistendroppedbad'] = 'Falha ao deletar a escuta.'; + + // Slony replication sets + $lang['strrepsets'] = 'Conjuntos de replicao'; + $lang['strnorepsets'] = 'Nenhum conjunto de replicao encontrado.'; + $lang['strcreaterepset'] = 'Criar conjunto de replicao'; + $lang['strrepsetcreated'] = 'Conjunto de replicao criado.'; + $lang['strrepsetcreatedbad'] = 'Falha ao criar o conjunto de replicao.'; + $lang['strconfdroprepset'] = 'Voc tm certeza que deseja deletar o conjunto de replicao "%s"?'; + $lang['strrepsetdropped'] = 'Conjunto de replicao deletado.'; + $lang['strrepsetdroppedbad'] = 'Falha ao deletar o conjunto de replicao.'; + $lang['strmerge'] = 'Fundir'; + $lang['strmergeinto'] = 'Fundir em'; + $lang['strrepsetmerged'] = 'Conjuntos de replicao fundidos.'; + $lang['strrepsetmergedbad'] = 'Falha ao fundir os conjuntos de replicao.'; + $lang['strmove'] = 'Mover'; + $lang['strneworigin'] = 'Nova origem'; + $lang['strrepsetmoved'] = 'Conjunto de replicao movido.'; + $lang['strrepsetmovedbad'] = 'Falha ao mover o conjunto de replicao.'; + $lang['strnewrepset'] = 'Novo conjunto de replicao'; + $lang['strlock'] = 'Trava'; + $lang['strlocked'] = 'Travado'; + $lang['strunlock'] = 'Destravado'; + $lang['strconflockrepset'] = 'Voc tm certeza que deseja travar o conjunto de replicao "%s"?'; + $lang['strrepsetlocked'] = 'Conjunto de replicao travado.'; + $lang['strrepsetlockedbad'] = 'Falha ao travar o conjunto de replicao.'; + $lang['strconfunlockrepset'] = 'Voc tm certeza que deseja destravar o conjunto de replicao "%s"?'; + $lang['strrepsetunlocked'] = 'Conjunto de replicao destravado.'; + $lang['strrepsetunlockedbad'] = 'Falha ao destravar o conjunto de replicao.'; + $lang['stronlyonnode'] = 'Somente sobre o nodo'; + $lang['strddlscript'] = 'Script DDL'; + $lang['strscriptneedsbody'] = 'Voc deve fornecer um script para ser executado sobre todos os nodos.'; + $lang['strscriptexecuted'] = 'Script DDL executado sobre o conjunto de replicao.'; + $lang['strscriptexecutedbad'] = 'Falha ao executar o script DDL sobre o conjunto de replicao.'; + $lang['strtabletriggerstoretain'] = 'Os seguintes gatilhos NO sero desativados pelo Slony:'; + + // Slony tables in replication sets + $lang['straddtable'] = 'Adicionar Tabela'; + $lang['strtableneedsuniquekey'] = 'Tabela a ser adicionada requer uma chave primria ou nica.'; + $lang['strtableaddedtorepset'] = 'Tabela adicionada ao conjunto de replicao.'; + $lang['strtableaddedtorepsetbad'] = 'Falha ao adicionar a tabela no conjunto de replicao.'; + $lang['strconfremovetablefromrepset'] = 'Voc tm certeza que deseja deletar a tabela "%s" do conjunto de replicao "%s"?'; + $lang['strtableremovedfromrepset'] = 'Tabela deletada do conjunto de replicao.'; + $lang['strtableremovedfromrepsetbad'] = 'Falha ao deletar a tabela do conjunto de replicao.'; + + // Slony sequences in replication sets + $lang['straddsequence'] = 'Adicionar seqncia'; + $lang['strsequenceaddedtorepset'] = 'Seqncia adicionada ao conjunto de replicao.'; + $lang['strsequenceaddedtorepsetbad'] = 'Falha ao adicionar a seqncia no conjunto de replicao.'; + $lang['strconfremovesequencefromrepset'] = 'Voc tm certeza que deseja deletar a seqncia "%s" do conjunto de replicao "%s"?'; + $lang['strsequenceremovedfromrepset'] = 'Seqncia deletada do conjunto de replicao.'; + $lang['strsequenceremovedfromrepsetbad'] = 'Falha ao deletar a seqncia do conjunto de replicao.'; + + // Slony subscriptions + $lang['strsubscriptions'] = 'Subscries'; + $lang['strnosubscriptions'] = 'Nenhuma subscrio encontrada.'; + + // Miscellaneous + $lang['strtopbar'] = '%s rodando em %s:%s -- Voc est logado como usurio "%s"'; + $lang['strtimefmt'] = 'jS M, Y g:iA'; + $lang['strhelp'] = 'Ajuda'; + $lang['strhelpicon'] = '?'; + $lang['strhelppagebrowser'] = 'Navegar na pgina de ajuda'; + $lang['strselecthelppage'] = 'Selecione uma pgina de ajuda'; + $lang['strinvalidhelppage'] = 'Pgina de ajuda invlida.'; + $lang['strlogintitle'] = 'Conectado em %s'; + $lang['strlogoutmsg'] = 'Desconectado de %s'; + $lang['strloading'] = 'Carregando...'; + $lang['strerrorloading'] = 'Erro no carregamento'; + $lang['strclicktoreload'] = 'Clique para recarregar'; + + // Autovacuum + $lang['strautovacuum'] = 'Vcuo automtico'; + $lang['strturnedon'] = 'Ligado'; + $lang['strturnedoff'] = 'Desligado'; + $lang['strenabled'] = 'Ativado'; + $lang['strnovacuumconf'] = 'Nenhuma configurao de vcuo automtico encontrada.'; + $lang['strvacuumbasethreshold'] = 'Vcuo a partir do ponto inicial da base'; + $lang['strvacuumscalefactor'] = 'Vcuo por fator de escala'; + $lang['stranalybasethreshold'] = 'Analisar a partir do ponto inicial da base'; + $lang['stranalyzescalefactor'] = 'Analisar por fator de escala'; + $lang['strvacuumcostdelay'] = 'Custo de retardo do vcuo'; + $lang['strvacuumcostlimit'] = 'Custo mximo do vcuo'; + $lang['strvacuumpertable'] = 'Configurao de vcuo automtico por tabela'; + $lang['straddvacuumtable'] = 'Adicionar configurao de vcuo automtico para a tabela'; + $lang['streditvacuumtable'] = 'Editar a configurao de vcuo automtico para a tabela %s'; + $lang['strdelvacuumtable'] = 'Deletar a configurao de vcuo automtico para a tabela %s ?'; + $lang['strvacuumtablereset'] = 'Configurao de vcuo automtico para a tabela %s redefinida para os valores padro'; + $lang['strdelvacuumtablefail'] = 'Falha ao remover a configurao de vcuo automtico para a tabela %s'; + $lang['strsetvacuumtablesaved'] = 'Configurao de vcuo automtico para a tabela %s salva.'; + $lang['strsetvacuumtablefail'] = 'Configurao de vcuo automtico para a tabela %s falhou.'; + $lang['strspecifydelvacuumtable'] = 'Voc deve especificar a tabela que deseja remover os parmetros de vcuo automtico.'; + $lang['strspecifyeditvacuumtable'] = 'Voc deve especificar a tabela que deseja editar os parmetros de vcuo automtico.'; + $lang['strnotdefaultinred'] = 'Valores no padro esto em vermelho.'; + + // Table-level Locks + $lang['strlocks'] = 'Travas'; + $lang['strtransaction'] = 'ID de transao'; + $lang['strvirtualtransaction'] = 'ID de transao virtual'; + $lang['strprocessid'] = 'ID do processo'; + $lang['strmode'] = 'Modo de trava'; + $lang['strislockheld'] = 'A trava prendeu?'; + + // Prepared transactions + $lang['strpreparedxacts'] = 'Transaes preparadas'; + $lang['strxactid'] = 'ID da transao'; + $lang['strgid'] = 'ID global'; + + // Fulltext search + $lang['strfulltext'] = 'Busca por Texto Completo'; + $lang['strftsconfig'] = 'Configurao BTC'; + $lang['strftsconfigs'] = 'Configuraes'; + $lang['strftscreateconfig'] = 'Criar uma configurao BTC'; + $lang['strftscreatedict'] = 'Criar um dicionrio'; + $lang['strftscreatedicttemplate'] = 'Criar um modelo de dicionrio'; + $lang['strftscreateparser'] = 'Criar parser'; + $lang['strftsnoconfigs'] = 'Nenhuma configurao BTC encontrada.'; + $lang['strftsconfigdropped'] = 'Configurao BTC eliminada.'; + $lang['strftsconfigdroppedbad'] = 'Falha ao eliminar da configurao BTC.'; + $lang['strconfdropftsconfig'] = 'Deseja eliminar a configurao BTC "%s"?'; + $lang['strconfdropftsdict'] = 'Deseja eliminar o dicionrio BTC "%s"?'; + $lang['strconfdropftsmapping'] = 'Deseja eliminar o mapeamento "%s" da configurao BTC "%s"?'; + $lang['strftstemplate'] = 'Modelo'; + $lang['strftsparser'] = 'Parser'; + $lang['strftsconfigneedsname'] = 'Informe o nome para a sua configurao BTC.'; + $lang['strftsconfigcreated'] = 'Configurao BTC criada.'; + $lang['strftsconfigcreatedbad'] = 'Falha ao criar a configurao BTC.'; + $lang['strftsmapping'] = 'Mapeamento'; + $lang['strftsdicts'] = 'Dicionrios'; + $lang['strftsdict'] = 'Dicionrio'; + $lang['strftsemptymap'] = 'Mapa de configurao BTC vazio.'; + $lang['strftsconfigaltered'] = 'Configurao BTC alterada.'; + $lang['strftsconfigalteredbad'] = 'Falha ao alterar a configurao BTC.'; + $lang['strftsconfigmap'] = 'Mapa de configurao BTC'; + $lang['strftsparsers'] = 'Parsers BTC'; + $lang['strftsnoparsers'] = 'Nenhum parser BTC disponvel.'; + $lang['strftsnodicts'] = 'Nenhum dicionrio BTC disponvel.'; + $lang['strftsdictcreated'] = 'Dicionrio BTC criado.'; + $lang['strftsdictcreatedbad'] = 'Falha ao criar o dicionrio BTC.'; + $lang['strftslexize'] = 'Lexize'; + $lang['strftsinit'] = 'Inicializar'; + $lang['strftsoptionsvalues'] = 'Opes e valores'; + $lang['strftsdictneedsname'] = 'Informe o nome para o dicionrio BTC.'; + $lang['strftsdictdropped'] = 'Dicionrio BTC eliminado.'; + $lang['strftsdictdroppedbad'] = 'Falha ao eliminar o dicionrio BTC.'; + $lang['strftsdictaltered'] = 'Dicionrio BTC alterado.'; + $lang['strftsdictalteredbad'] = 'Falha ao alterar o dicinrio BTC.'; + $lang['strftsaddmapping'] = 'Adicionar novo mapeamento'; + $lang['strftsspecifymappingtodrop'] = 'Informe ao menos um mapeamento para eliminar.'; + $lang['strftsspecifyconfigtoalter'] = 'Informe uma configurao BTC para alterar'; + $lang['strftsmappingdropped'] = 'Mapeamento BTC eliminado.'; + $lang['strftsmappingdroppedbad'] = 'Falha ao remover o mapeamento BTC.'; + $lang['strftsnodictionaries'] = 'Nenhum dicionrio encontrado.'; + $lang['strftsmappingaltered'] = 'Mapeamento BTC alterado.'; + $lang['strftsmappingalteredbad'] = 'Falha ao alterar o mapeamento BTC.'; + $lang['strftsmappingadded'] = 'Mapeamento BTC adicionado.'; + $lang['strftsmappingaddedbad'] = 'Falha ao adicionar o mapeamento BTC.'; + $lang['strftstabconfigs'] = 'Configuraes'; + $lang['strftstabdicts'] = 'Dicionrios'; + $lang['strftstabparsers'] = 'Parsers'; + $lang['strftscantparsercopy'] = 'No possvel especificar ambos parser e modelo durante a criao da configurao de busca de texto.'; +?> diff --git a/php/pgadmin/lang/portuguese-pt.php b/php/pgadmin/lang/portuguese-pt.php new file mode 100644 index 0000000..c6b0cd1 --- /dev/null +++ b/php/pgadmin/lang/portuguese-pt.php @@ -0,0 +1,623 @@ +>'; +$lang['strtrue'] = 'VERDADEIRO'; +$lang['strfalse'] = 'FALSO'; +$lang['strcolumn'] = 'Coluna'; +$lang['strobjects'] = 'objecto(s)'; +$lang['strclustered'] = 'Conjunto?'; +$lang['strseparator'] = ': '; +$lang['strexplain'] = 'Explicao'; +$lang['strexplainanalyze'] = 'Explicao de Anlise'; +$lang['strfind'] = 'Procurar'; +$lang['stroptions'] = 'Opes'; +$lang['strrefresh'] = 'Actualizar'; +$lang['strdownload'] = 'Descarreguar'; +$lang['strdownloadgzipped'] = 'Descarregar comprimido com gzip'; +$lang['strinfo'] = 'Informao'; +$lang['stroids'] = 'OIDs'; +$lang['stradvanced'] = 'Avanado'; +$lang['strvariables'] = 'Variveis'; +$lang['strprocess'] = 'Processo'; +$lang['strprocesses'] = 'Processos'; +$lang['strsetting'] = 'Configuraes'; +$lang['streditsql'] = 'Editar SQL'; +$lang['strruntime'] = 'Tempo total decorrido: %s ms'; +$lang['strpaginate'] = 'Paginar resultados'; +$lang['struploadscript'] = 'ou upload um script SQL:'; +$lang['strstarttime'] = 'Hora de incio'; +$lang['strfile'] = 'Ficheiro'; +$lang['strfileimported'] = 'Ficheiro importado.'; +$lang['strphpversionnotsupported'] = 'Verso do PHP no suportada. Por favor actualize para a verso %s ou superior.'; +$lang['strpostgresqlversionnotsupported'] = 'Verso do PostgreSQL no suportada. Por favor actualize para a verso %s ou superior.'; +$lang['strnoobjects'] = 'No foram escontrados objectos.'; +$lang['strrownotunique'] = 'No existe identificador nico para esta linha.'; +$lang['strnoreportsdb'] = 'No criou uma base de dados de relatrio. Leia o ficheiro INSTALL para mais informaes.'; +$lang['strnouploads'] = 'Upload de ficheiros indisponvel.'; +$lang['strimporterror'] = 'Erro na importao.'; +$lang['strimporterrorline'] = 'Erro ao importar na linha %s.'; +$lang['strinsertandrepeat'] = 'Inserir & Repetir'; +$lang['strnumcols'] = 'Nmero de colunas'; +$lang['strcolneedsname'] = 'Tem de definir um nome para a coluna.'; +$lang['strselectallfields'] = 'Seleccione todos os campos'; +$lang['strselectunary'] = 'Operadores unrios no podem ter valores.'; +$lang['strtablealtered'] = 'Tabela alterada.'; +$lang['strtablealteredbad'] = 'Alterao da Tabela falhou.'; +$lang['strstructureonly'] = 'S Estrutura'; +$lang['strstructureanddata'] = 'Estrutura e dados'; +$lang['strtabbed'] = 'Tabulado'; +$lang['strauto'] = 'Auto'; +$lang['strconfvacuumtable'] = 'Tem a certeza que pretende aspirar "%s"?'; +$lang['strestimatedrowcount'] = 'Contagem de linhas Estimada'; +$lang['strsessiondefaults'] = 'Configuraes padro da sesso'; +$lang['struserneedsname'] = 'Tem de dar um nome ao seu tilizador.'; +$lang['strnogroup'] = 'Grupo no encontrado.'; +$lang['strcreategroup'] = 'Criar grupo'; +$lang['straddmember'] = 'Adicionar membro'; +$lang['strmemberadded'] = 'Membro adicionado.'; +$lang['strmemberaddedbad'] = 'Falha ao adicionar Membro.'; +$lang['strdropmember'] = 'Retirar membro'; +$lang['strconfdropmember'] = 'Tem a certeza que pretende retirar o membro "%s" do grupo "%s"?'; +$lang['strmemberdropped'] = 'Membro retirado.'; +$lang['strmemberdroppedbad'] = 'Falha ao retirar membro.'; +$lang['strgrantor'] = 'Grantor'; +$lang['strasterisk'] = '*'; +$lang['strreindexgood'] = 'Reindexao completa.'; +$lang['strreindexbad'] = 'Falha na Reindexao.'; +$lang['strfull'] = 'Cheio'; +$lang['strfreeze'] = 'Congelado'; +$lang['strforce'] = 'Forar'; +$lang['strsignalsent'] = 'Sinal enviado.'; +$lang['strsignalsentbad'] = 'Falha ao enviar sinal.'; +$lang['strallobjects'] = 'Todos os objectos'; +$lang['strviewneedsfields'] = 'Tem de especficar a coluna que pretende seleccionar para a sua vista.'; +$lang['strviewlink'] = 'ligar chaves'; +$lang['strviewconditions'] = 'Condies Adicionais'; +$lang['strcreateviewwiz'] = 'Criar vista com assistente'; +$lang['strsequencereset'] = 'Limpar sequncia.'; +$lang['strsequenceresetbad'] = 'Falha ao limpar sequncia.'; +$lang['strindex'] = 'Index'; +$lang['strconfcluster'] = 'Tem a certeza que pretende conjugar "%s"?'; +$lang['strclusteredgood'] = 'Conjugao completa.'; +$lang['strclusteredbad'] = 'Falha ao conjugar.'; +$lang['strcreateplfunction'] = 'Criar funo Create SQL/PL'; +$lang['strcreateinternalfunction'] = 'Criar funo interna'; +$lang['strcreatecfunction'] = 'Criar funo em C'; +$lang['strobjectfile'] = 'Ficheiro Objecto'; +$lang['strlinksymbol'] = 'Ligar Smbolo'; +$lang['strtriggeraltered'] = 'Trigger Alterado.'; +$lang['strtriggeralteredbad'] = 'Falha ao alterar Trigger.'; +$lang['strcreatecomptype'] = 'Criar tipo composto'; +$lang['strtypeneedsfield'] = 'Tem de especficar pelo menos um campo.'; +$lang['strtypeneedscols'] = 'Tem de especficar um nmero vlido de campos.'; +$lang['strflavor'] = 'Sabor'; +$lang['strbasetype'] = 'Base'; +$lang['strcompositetype'] = 'Compr'; +$lang['strpseudotype'] = 'Pseudo'; +$lang['strschemaaltered'] = 'Esquema Alterado.'; +$lang['strschemaalteredbad'] = 'Falha ao alterar o esquema.'; +$lang['strsearchpath'] = 'Caminho de pesquisa no esquema'; +$lang['strdomain'] = 'Domnio'; +$lang['strdomains'] = 'Domnios'; +$lang['strshowalldomains'] = 'Lista todos os domnios'; +$lang['strnodomains'] = 'No foram encontrados domnios.'; +$lang['strcreatedomain'] = 'Criar domnio'; +$lang['strdomaindropped'] = 'Eliminar domnio.'; +$lang['strdomaindroppedbad'] = 'Falha ao eliminar o domnio.'; +$lang['strconfdropdomain'] = 'Tem a certeza que pretende eliminar o dominio "%s"?'; +$lang['strdomainneedsname'] = 'Tem de especficar um nome para o seu domnio.'; +$lang['strdomaincreated'] = 'Domnio criado.'; +$lang['strdomaincreatedbad'] = 'Falha ao criar domnio.'; +$lang['strdomainaltered'] = 'Alterar domnio.'; +$lang['strdomainalteredbad'] = 'Falha ao alterar domnio.'; +$lang['stroperator'] = 'Operador'; +$lang['strshowalloperators'] = 'Lista todos os operadores'; +$lang['strnooperator'] = 'No foi encontrado o operador.'; +$lang['strnooperators'] = 'No foram encontrados operadores.'; +$lang['strcreateoperator'] = 'Criar operador'; +$lang['strleftarg'] = 'Tipo de ARGumento esquerdo'; +$lang['strrightarg'] = 'Tipo de ARGumento direito'; +$lang['strcommutator'] = 'Comutador'; +$lang['strnegator'] = 'Negador'; +$lang['strrestrict'] = 'Restrito'; +$lang['strjoin'] = 'Juntar'; +$lang['strhashes'] = 'Referncias'; +$lang['strmerges'] = 'Mesclrar'; +$lang['strleftsort'] = 'Ordenao esquerda'; +$lang['strrightsort'] = 'Ordenao direita'; +$lang['strlessthan'] = 'Menor que'; +$lang['strgreaterthan'] = 'Maior que'; +$lang['stroperatorneedsname'] = 'Tem de especficar um nome para o operador.'; +$lang['stroperatorcreated'] = 'Operador criado'; +$lang['stroperatorcreatedbad'] = 'Falha ao criar operador.'; +$lang['strconfdropoperator'] = 'Tem a certeza que pretende eliminar o operador "%s"?'; +$lang['stroperatordropped'] = 'Operador eliminado.'; +$lang['stroperatordroppedbad'] = 'Falha ao eliminar o operador.'; +$lang['strcasts'] = 'Molde'; +$lang['strnocasts'] = 'No foram encontrador moldes.'; +$lang['strsourcetype'] = 'Tipo de fonte'; +$lang['strtargettype'] = 'Tipo de alvo'; +$lang['strimplicit'] = 'Implicito'; +$lang['strinassignment'] = 'Em assignamento'; +$lang['strbinarycompat'] = '(Binario compativl)'; +$lang['strconversions'] = 'Converses'; +$lang['strnoconversions'] = 'No foram encontradas converses.'; +$lang['strsourceencoding'] = 'Codificao da fonte'; +$lang['strtargetencoding'] = 'Codificao do alvo'; +$lang['strlanguages'] = 'Lnguas'; +$lang['strnolanguages'] = 'No foram encontradas lnguas.'; +$lang['strtrusted'] = 'Confiado'; +$lang['strnoinfo'] = 'Informao indisponvel.'; +$lang['strreferringtables'] = 'Tabelas de referncia'; +$lang['strparenttables'] = 'Tabelas pai'; +$lang['strchildtables'] = 'Tabelas filho'; +$lang['strnoaggregates'] = 'No foram encontrados agregados.'; +$lang['stralltypes'] = '(Todos os tipos)'; +$lang['stropclasses'] = 'Classes Op'; +$lang['strnoopclasses'] = 'No foram encontrados operadores de classes.'; +$lang['straccessmethod'] = 'Mtodo de acesso'; +$lang['strrowperf'] = 'Performance das linhas'; +$lang['strioperf'] = 'Performance de E/S'; +$lang['stridxrowperf'] = 'Performance de indexao de linhas'; +$lang['stridxioperf'] = 'Performance em indexao E/S'; +$lang['strpercent'] = '%'; +$lang['strsequential'] = 'Sequncial'; +$lang['strscan'] = 'Pesquisar'; +$lang['strread'] = 'Lr'; +$lang['strfetch'] = 'Descarregar'; +$lang['strheap'] = 'Fila'; +$lang['strtoast'] = 'QUEIMAR'; +$lang['strtoastindex'] = 'QUEIMAR Index'; +$lang['strcache'] = 'Cache'; +$lang['strdisk'] = 'Disco'; +$lang['strrows2'] = 'Linhas'; +$lang['strtablespace'] = 'Espao de Tabela'; +$lang['strtablespaces'] = 'Espaos de Tabela'; +$lang['strshowalltablespaces'] = 'Lista todos os espaos de tabela'; +$lang['strnotablespaces'] = 'No foram encontrados espaos de tabela.'; +$lang['strcreatetablespace'] = 'Criar espao de tabela'; +$lang['strlocation'] = 'Localizao'; +$lang['strtablespaceneedsname'] = 'Tem de especficar um nome para o espao de tabela.'; +$lang['strtablespaceneedsloc'] = 'Tem de especficar um directrio no qual ir criar o espao de tabela.'; +$lang['strtablespacecreated'] = 'Espao de Tabela criado.'; +$lang['strtablespacecreatedbad'] = 'Falha ao criar espao de tabela.'; +$lang['strconfdroptablespace'] = 'Tem a certeza que pretende eliminar o espao de tabela "%s"?'; +$lang['strtablespacedropped'] = 'Espao de tabela eliminado.'; +$lang['strtablespacedroppedbad'] = 'Falha ao eliminar o espao de tabela.'; +$lang['strtablespacealtered'] = 'Espao de tabela alterado.'; +$lang['strtablespacealteredbad'] = 'Alterao do Espaamento de Tabela falhou.'; +$lang['strhelp'] = 'Ajuda'; +$lang['strhelpicon'] = '?'; + +?> diff --git a/php/pgadmin/lang/recoded/README b/php/pgadmin/lang/recoded/README new file mode 100644 index 0000000..1292467 --- /dev/null +++ b/php/pgadmin/lang/recoded/README @@ -0,0 +1,29 @@ +Translators +----------- + +Please read the TRANSLATORS file in the top directory. + +This directory contains the HTML Unicode recodings of the source +language files. These are the actual files used by phpPgAdmin +when displaying strings. + +Instructions on recoding: + +cd lang +make (eg. 'french') + +Running make with no arguments will recode all language files: + +cd lang +make + +To check your translation: + +cd lang +php langcheck (eg. 'french'); + +To synchronize your translation with english.php: + +cd lang +./synch (eg. 'polish'); + diff --git a/php/pgadmin/lang/recoded/afrikaans.php b/php/pgadmin/lang/recoded/afrikaans.php new file mode 100644 index 0000000..b0794af --- /dev/null +++ b/php/pgadmin/lang/recoded/afrikaans.php @@ -0,0 +1,635 @@ + diff --git a/php/pgadmin/lang/recoded/arabic.php b/php/pgadmin/lang/recoded/arabic.php new file mode 100644 index 0000000..7493839 --- /dev/null +++ b/php/pgadmin/lang/recoded/arabic.php @@ -0,0 +1,596 @@ + diff --git a/php/pgadmin/lang/recoded/catalan.php b/php/pgadmin/lang/recoded/catalan.php new file mode 100644 index 0000000..16f5178 --- /dev/null +++ b/php/pgadmin/lang/recoded/catalan.php @@ -0,0 +1,1023 @@ + diff --git a/php/pgadmin/lang/recoded/chinese-sim.php b/php/pgadmin/lang/recoded/chinese-sim.php new file mode 100644 index 0000000..db22ef5 --- /dev/null +++ b/php/pgadmin/lang/recoded/chinese-sim.php @@ -0,0 +1,372 @@ + diff --git a/php/pgadmin/lang/recoded/chinese-tr.php b/php/pgadmin/lang/recoded/chinese-tr.php new file mode 100644 index 0000000..e701fb2 --- /dev/null +++ b/php/pgadmin/lang/recoded/chinese-tr.php @@ -0,0 +1,598 @@ + diff --git a/php/pgadmin/lang/recoded/chinese-utf8-zh_CN.php b/php/pgadmin/lang/recoded/chinese-utf8-zh_CN.php new file mode 100644 index 0000000..30dd80f --- /dev/null +++ b/php/pgadmin/lang/recoded/chinese-utf8-zh_CN.php @@ -0,0 +1,980 @@ + diff --git a/php/pgadmin/lang/recoded/chinese-utf8-zh_TW.php b/php/pgadmin/lang/recoded/chinese-utf8-zh_TW.php new file mode 100644 index 0000000..cbae547 --- /dev/null +++ b/php/pgadmin/lang/recoded/chinese-utf8-zh_TW.php @@ -0,0 +1,990 @@ + diff --git a/php/pgadmin/lang/recoded/czech.php b/php/pgadmin/lang/recoded/czech.php new file mode 100644 index 0000000..a12983c --- /dev/null +++ b/php/pgadmin/lang/recoded/czech.php @@ -0,0 +1,1023 @@ + diff --git a/php/pgadmin/lang/recoded/danish.php b/php/pgadmin/lang/recoded/danish.php new file mode 100644 index 0000000..4cc730a --- /dev/null +++ b/php/pgadmin/lang/recoded/danish.php @@ -0,0 +1,633 @@ + diff --git a/php/pgadmin/lang/recoded/dutch.php b/php/pgadmin/lang/recoded/dutch.php new file mode 100644 index 0000000..ce44116 --- /dev/null +++ b/php/pgadmin/lang/recoded/dutch.php @@ -0,0 +1,481 @@ + diff --git a/php/pgadmin/lang/recoded/english.php b/php/pgadmin/lang/recoded/english.php new file mode 100644 index 0000000..5092406 --- /dev/null +++ b/php/pgadmin/lang/recoded/english.php @@ -0,0 +1,1024 @@ + diff --git a/php/pgadmin/lang/recoded/french.php b/php/pgadmin/lang/recoded/french.php new file mode 100644 index 0000000..12a5a08 --- /dev/null +++ b/php/pgadmin/lang/recoded/french.php @@ -0,0 +1,1024 @@ + diff --git a/php/pgadmin/lang/recoded/galician.php b/php/pgadmin/lang/recoded/galician.php new file mode 100644 index 0000000..3cda090 --- /dev/null +++ b/php/pgadmin/lang/recoded/galician.php @@ -0,0 +1,1034 @@ + diff --git a/php/pgadmin/lang/recoded/german.php b/php/pgadmin/lang/recoded/german.php new file mode 100644 index 0000000..fe62107 --- /dev/null +++ b/php/pgadmin/lang/recoded/german.php @@ -0,0 +1,978 @@ + diff --git a/php/pgadmin/lang/recoded/greek.php b/php/pgadmin/lang/recoded/greek.php new file mode 100644 index 0000000..8a04e9f --- /dev/null +++ b/php/pgadmin/lang/recoded/greek.php @@ -0,0 +1,871 @@ + diff --git a/php/pgadmin/lang/recoded/hebrew.php b/php/pgadmin/lang/recoded/hebrew.php new file mode 100644 index 0000000..aaf36e1 --- /dev/null +++ b/php/pgadmin/lang/recoded/hebrew.php @@ -0,0 +1,630 @@ + diff --git a/php/pgadmin/lang/recoded/hungarian.php b/php/pgadmin/lang/recoded/hungarian.php new file mode 100644 index 0000000..6e5c95a --- /dev/null +++ b/php/pgadmin/lang/recoded/hungarian.php @@ -0,0 +1,1027 @@ + diff --git a/php/pgadmin/lang/recoded/italian.php b/php/pgadmin/lang/recoded/italian.php new file mode 100644 index 0000000..aec8fdc --- /dev/null +++ b/php/pgadmin/lang/recoded/italian.php @@ -0,0 +1,740 @@ + diff --git a/php/pgadmin/lang/recoded/japanese.php b/php/pgadmin/lang/recoded/japanese.php new file mode 100644 index 0000000..d1004f3 --- /dev/null +++ b/php/pgadmin/lang/recoded/japanese.php @@ -0,0 +1,983 @@ + diff --git a/php/pgadmin/lang/recoded/mongol.php b/php/pgadmin/lang/recoded/mongol.php new file mode 100644 index 0000000..5d2ffb7 --- /dev/null +++ b/php/pgadmin/lang/recoded/mongol.php @@ -0,0 +1,540 @@ + diff --git a/php/pgadmin/lang/recoded/polish.php b/php/pgadmin/lang/recoded/polish.php new file mode 100644 index 0000000..564c1f4 --- /dev/null +++ b/php/pgadmin/lang/recoded/polish.php @@ -0,0 +1,871 @@ + diff --git a/php/pgadmin/lang/recoded/portuguese-br.php b/php/pgadmin/lang/recoded/portuguese-br.php new file mode 100644 index 0000000..cc8c319 --- /dev/null +++ b/php/pgadmin/lang/recoded/portuguese-br.php @@ -0,0 +1,1023 @@ + diff --git a/php/pgadmin/lang/recoded/portuguese-pt.php b/php/pgadmin/lang/recoded/portuguese-pt.php new file mode 100644 index 0000000..3bc0528 --- /dev/null +++ b/php/pgadmin/lang/recoded/portuguese-pt.php @@ -0,0 +1,623 @@ + diff --git a/php/pgadmin/lang/recoded/romanian.php b/php/pgadmin/lang/recoded/romanian.php new file mode 100644 index 0000000..e2125ea --- /dev/null +++ b/php/pgadmin/lang/recoded/romanian.php @@ -0,0 +1,884 @@ + diff --git a/php/pgadmin/lang/recoded/russian-utf8.php b/php/pgadmin/lang/recoded/russian-utf8.php new file mode 100644 index 0000000..2458375 --- /dev/null +++ b/php/pgadmin/lang/recoded/russian-utf8.php @@ -0,0 +1,1020 @@ + diff --git a/php/pgadmin/lang/recoded/russian.php b/php/pgadmin/lang/recoded/russian.php new file mode 100644 index 0000000..7d73938 --- /dev/null +++ b/php/pgadmin/lang/recoded/russian.php @@ -0,0 +1,601 @@ + diff --git a/php/pgadmin/lang/recoded/slovak.php b/php/pgadmin/lang/recoded/slovak.php new file mode 100644 index 0000000..09924fc --- /dev/null +++ b/php/pgadmin/lang/recoded/slovak.php @@ -0,0 +1,769 @@ + diff --git a/php/pgadmin/lang/recoded/spanish.php b/php/pgadmin/lang/recoded/spanish.php new file mode 100644 index 0000000..19f35b3 --- /dev/null +++ b/php/pgadmin/lang/recoded/spanish.php @@ -0,0 +1,1024 @@ + diff --git a/php/pgadmin/lang/recoded/swedish.php b/php/pgadmin/lang/recoded/swedish.php new file mode 100644 index 0000000..e103ae8 --- /dev/null +++ b/php/pgadmin/lang/recoded/swedish.php @@ -0,0 +1,580 @@ + diff --git a/php/pgadmin/lang/recoded/turkish.php b/php/pgadmin/lang/recoded/turkish.php new file mode 100644 index 0000000..82674ff --- /dev/null +++ b/php/pgadmin/lang/recoded/turkish.php @@ -0,0 +1,764 @@ + diff --git a/php/pgadmin/lang/recoded/ukrainian.php b/php/pgadmin/lang/recoded/ukrainian.php new file mode 100644 index 0000000..cca17c8 --- /dev/null +++ b/php/pgadmin/lang/recoded/ukrainian.php @@ -0,0 +1,600 @@ + diff --git a/php/pgadmin/lang/romanian.php b/php/pgadmin/lang/romanian.php new file mode 100644 index 0000000..3b11ba4 --- /dev/null +++ b/php/pgadmin/lang/romanian.php @@ -0,0 +1,884 @@ +'; + $lang['strfirst'] = '<< Început'; + $lang['strlast'] = 'Sfârşit >>'; + $lang['strfailed'] = 'Eşuat'; + $lang['strcreate'] = 'Creare'; + $lang['strcreated'] = 'Creat'; + $lang['strcomment'] = 'Comentariu'; + $lang['strlength'] = 'Lungime'; + $lang['strdefault'] = 'Implicit'; + $lang['stralter'] = 'Modificare'; + $lang['strok'] = 'OK'; + $lang['strcancel'] = 'Anulare'; + $lang['strac'] = 'Activare Auto-completare'; + $lang['strsave'] = 'Salvare'; + $lang['strreset'] = 'Reiniţializare'; + $lang['strinsert'] = 'Inserare'; + $lang['strselect'] = 'Selectare'; + $lang['strdelete'] = 'Ştergere'; + $lang['strupdate'] = 'Actualizare'; + $lang['strreferences'] = 'Referinţe'; + $lang['stryes'] = 'Da'; + $lang['strno'] = 'Nu'; + $lang['strtrue'] = 'TRUE'; + $lang['strfalse'] = 'FALSE'; + $lang['stredit'] = 'Editare'; + $lang['strcolumn'] = 'Coloană'; + $lang['strcolumns'] = 'Coloane'; + $lang['strrows'] = 'rând(uri)'; + $lang['strrowsaff'] = 'rând(uri) afectate.'; + $lang['strobjects'] = 'obiect(e)'; + $lang['strback'] = 'Înapoi'; + $lang['strqueryresults'] = 'Rezultatele interogării'; + $lang['strshow'] = 'Afişare'; + $lang['strempty'] = 'Golire'; + $lang['strlanguage'] = 'Limbă'; + $lang['strencoding'] = 'Codificare'; + $lang['strvalue'] = 'Valoare'; + $lang['strunique'] = 'Unic'; + $lang['strprimary'] = 'Primar'; + $lang['strexport'] = 'Export'; + $lang['strimport'] = 'Import'; + $lang['strallowednulls'] = 'Caractere NULL permise'; + $lang['strbackslashn'] = '\N'; + $lang['stremptystring'] = 'Şir/câmp gol'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = 'Administrare'; + $lang['strvacuum'] = 'Vacuum'; + $lang['stranalyze'] = 'Analiză'; + $lang['strclusterindex'] = 'Grupare'; + $lang['strclustered'] = 'Grupat?'; + $lang['strreindex'] = 'Re-indexare'; + $lang['strrun'] = 'Executare'; + $lang['stradd'] = 'Adăugare'; + $lang['strevent'] = 'Eveniment'; + $lang['strwhere'] = 'În schimb'; + $lang['strinstead'] = 'Execută în schimb'; + $lang['strwhen'] = 'Când'; + $lang['strformat'] = 'Format'; + $lang['strdata'] = 'Dată'; + $lang['strconfirm'] = 'Confirmare'; + $lang['strexpression'] = 'Expresie'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'Expandare'; + $lang['strcollapse'] = 'Restrângere'; + $lang['strexplain'] = 'Explicare'; + $lang['strexplainanalyze'] = 'Explicare & Analiză'; + $lang['strfind'] = 'Căutare'; + $lang['stroptions'] = 'Opţiuni'; + $lang['strrefresh'] = 'Reîmprospătare'; + $lang['strdownload'] = 'Transfer'; + $lang['strdownloadgzipped'] = 'Transfer comprimat cu gzip'; + $lang['strinfo'] = 'Info'; + $lang['stroids'] = 'OID-uri'; + $lang['stradvanced'] = 'Avansat'; + $lang['strvariables'] = 'Variabile'; + $lang['strprocess'] = 'Proces'; + $lang['strprocesses'] = 'Procese'; + $lang['strsetting'] = 'Valoare'; + $lang['streditsql'] = 'Editare SQL'; + $lang['strruntime'] = 'Timp total de rulare:%s ms'; + $lang['strpaginate'] = 'Paginare rezultate'; + $lang['struploadscript'] = 'sau încărcare script SQL:'; + $lang['strstarttime'] = 'Timp start'; + $lang['strfile'] = 'Fişier'; + $lang['strfileimported'] = 'Fişier importat'; + $lang['strtrycred'] = 'Folosiţi aceste acreditări pentru toate serverele'; + + // Database sizes + $lang['strsize'] = 'Dimensiune'; + $lang['strbytes'] = 'octeţi'; + $lang['strkb'] = 'kB'; + $lang['strmb'] = 'MB'; + $lang['strgb'] = 'GB'; + $lang['strtb'] = 'TB'; + + // Error handling + $lang['strnoframes'] = 'Această aplicaţie funcţionează cel mai bine într-un browser ce suportă frame-uri , dar poate fi folosită şi fără frame-uri, urmând legătura de mai jos.'; + $lang['strnoframeslink'] = 'Fără frame-uri'; + $lang['strbadconfig'] = 'Fişierul config.inc.php este învechit. Trebuie să-l re-generaţi folosind noul fişier config.inc.php-dist.'; + $lang['strnotloaded'] = 'Instalarea de PHP nu suportă PostgreSQL. Trebuie să re-compilaţi PHP folosind opţiunea --with-pgsql la configurare.'; + $lang['strpostgresqlversionnotsupported'] = 'Versiune de PostgreSQL ne-suportată. Actualizaţi la versiunea %s sau ulterioară.'; + $lang['strbadschema'] = 'Schemă specificată incorectă.'; + $lang['strbadencoding'] = 'Imposibil de setat codificarea client în baza de date.'; + $lang['strsqlerror'] = 'Eroare SQL:'; + $lang['strinstatement'] = 'În instrucţiunea:'; + $lang['strinvalidparam'] = 'Parametrii scriptului sunt incorecţi.'; + $lang['strnodata'] = 'Nici un rând găsit.'; + $lang['strnoobjects'] = 'Nici un obiect găsit.'; + $lang['strrownotunique'] = 'Nici un identificator unic pentru acest rând.'; + $lang['strnoreportsdb'] = 'Nu aţi creat baza de date pentru rapoarte. Citiţi fişierul INSTALL pentru instrucţiuni.'; + $lang['strnouploads'] = 'Încărcarea de fişiere este dezactivată.'; + $lang['strimporterror'] = 'Eroare la importare.'; + $lang['strimporterror-fileformat'] = 'Eroare la importare: Imposibil de determinat în mod automat formatul fişierului.'; + $lang['strimporterrorline'] = 'Eroare la importare pe linia %s.'; + $lang['strimporterrorline-badcolumnnum'] = 'Eroare la importare pe linia %s: Linia nu are numărul corect de coloane.'; + $lang['strimporterror-uploadedfile'] = 'Eroare la importare: Fişierul nu a putut fi încărcat pe server'; + $lang['strcannotdumponwindows'] = 'Descărcarea de tabele complexe şi nume de scheme în Windows nu este suportată.'; + + // Tables + $lang['strtable'] = 'Tabelă'; + $lang['strtables'] = 'Tabele'; + $lang['strshowalltables'] = 'Afişare toate tabelele'; + $lang['strnotables'] = 'Nici o tabelă găsită.'; + $lang['strnotable'] = 'Nici o tabelă găsită.'; + $lang['strcreatetable'] = 'Creare tabelă.'; + $lang['strtablename'] = 'Nume tabelă'; + $lang['strtableneedsname'] = 'Specificaţi un nume pentru tabelă.'; + $lang['strtableneedsfield'] = 'Specificaţi cel puţin un câmp.'; + $lang['strtableneedscols'] = 'Specificaţi un număr corect de coloane.'; + $lang['strtablecreated'] = 'Tabelă creată.'; + $lang['strtablecreatedbad'] = 'Creare tabelă eşuată.'; + $lang['strconfdroptable'] = 'Sigur ştergeţi tabela "%s"?'; + $lang['strtabledropped'] = 'Tabelă ştearsă.'; + $lang['strtabledroppedbad'] = 'Ştergere tabelă eşuată.'; + $lang['strconfemptytable'] = 'Sigur goliţi tabela "%s"?'; + $lang['strtableemptied'] = 'Tabelă golită.'; + $lang['strtableemptiedbad'] = 'Golire tabelă eşuată.'; + $lang['strinsertrow'] = 'Inserare rând'; + $lang['strrowinserted'] = 'Rând inserat'; + $lang['strrowinsertedbad'] = 'Inserare rând eşuată.'; + $lang['strrowduplicate'] = 'Inserare de rând eşuată, s-a încercat inserarea unui duplicat.'; + $lang['streditrow'] = 'Editare rând'; + $lang['strrowupdated'] = 'Rând actualizat.'; + $lang['strrowupdatedbad'] = 'Actualizare rând eşuată.'; + $lang['strdeleterow'] = 'Ştergere rând.'; + $lang['strconfdeleterow'] = 'Sigur ştergeţi acest rând?'; + $lang['strrowdeleted'] = 'Rând şters.'; + $lang['strrowdeletedbad'] = 'Ştergere rând eşuată.'; + $lang['strinsertandrepeat'] = 'Inserare & Repetare'; + $lang['strnumcols'] = 'Număr de coloane'; + $lang['strcolneedsname'] = 'Specificaţi un nume pentru coloană'; + $lang['strselectallfields'] = 'Selectare toate câmpurile'; + $lang['strselectneedscol'] = 'Afişaţi cel puţin o coloană.'; + $lang['strselectunary'] = 'Operatorii unari nu pot avea valori.'; + $lang['straltercolumn'] = 'Modificare coloană'; + $lang['strcolumnaltered'] = 'Coloană modificată.'; + $lang['strcolumnalteredbad'] = 'Modificare coloană eşuată.'; + $lang['strconfdropcolumn'] = 'Sigur ştergeţi coloana "%s" din tabela "%s"?'; + $lang['strcolumndropped'] = 'Coloană ştearsă.'; + $lang['strcolumndroppedbad'] = 'Ştergere coloană eşuată.'; + $lang['straddcolumn'] = 'Adăugare coloană'; + $lang['strcolumnadded'] = 'Coloană adăugată.'; + $lang['strcolumnaddedbad'] = 'Adăugare coloană eşuată.'; + $lang['strcascade'] = 'CASCADE'; + $lang['strtablealtered'] = 'Tabelă modificată.'; + $lang['strtablealteredbad'] = 'Modificare tabelă eşuată.'; + $lang['strdataonly'] = 'Numai date'; + $lang['strstructureonly'] = 'Numai structură'; + $lang['strstructureanddata'] = 'Structură şi date'; + $lang['strtabbed'] = 'Cu tab-uri'; + $lang['strauto'] = 'Automat'; + $lang['strconfvacuumtable'] = 'Sigur executaţi "vacuum" pe "%s"?'; + $lang['strestimatedrowcount'] = 'Număr estimat de rânduri'; + + // Columns + $lang['strcolprop'] = 'Proprietăţi coloană'; + + // Users + $lang['struser'] = 'Utilizator'; + $lang['strusers'] = 'Utilizatori'; + $lang['strusername'] = 'Nume utilizator'; + $lang['strpassword'] = 'Parolă'; + $lang['strsuper'] = 'Utilizator privilegiat?'; + $lang['strcreatedb'] = 'Creează BD?'; + $lang['strexpires'] = 'Expiră la'; + $lang['strsessiondefaults'] = 'Valori implicite pentru sesiune'; + $lang['strnousers'] = 'Nici un utilizator găsit.'; + $lang['struserupdated'] = 'Utilizator actualizat.'; + $lang['struserupdatedbad'] = 'Actualizare utilizator eşuată.'; + $lang['strshowallusers'] = 'Afişare toţi utilizatorii'; + $lang['strcreateuser'] = 'Creare utilizator'; + $lang['struserneedsname'] = 'Specificaţi un nume pentru utilizator.'; + $lang['strusercreated'] = 'Utilizator creat.'; + $lang['strusercreatedbad'] = 'Creare utilizator eşuată.'; + $lang['strconfdropuser'] = 'Sigur ştergeţi utilizatorul "%s"?'; + $lang['struserdropped'] = 'Utilizator şters.'; + $lang['struserdroppedbad'] = 'Ştergere utilizator eşuată.'; + $lang['straccount'] = 'Cont'; + $lang['strchangepassword'] = 'Schimbare parolă'; + $lang['strpasswordchanged'] = 'Parolă schimbată.'; + $lang['strpasswordchangedbad'] = 'Schimbare parolă eşuată.'; + $lang['strpasswordshort'] = 'Parola este prea scurtă.'; + $lang['strpasswordconfirm'] = 'Parola nu se confirmă.'; + + // Groups + $lang['strgroup'] = 'Grup'; + $lang['strgroups'] = 'Grupuri'; + $lang['strshowallgroups'] = 'Afişare toate grupurile'; + $lang['strnogroup'] = 'Grup negăsit.'; + $lang['strnogroups'] = 'Nici un grup găsit.'; + $lang['strcreategroup'] = 'Creare grup'; + $lang['strgroupneedsname'] = 'Specificaţi un nume pentru grup.'; + $lang['strgroupcreated'] = 'Grup creat.'; + $lang['strgroupcreatedbad'] = 'Creare grup eşuată.'; + $lang['strconfdropgroup'] = 'Sigur ştergeţi grupul "%s"?'; + $lang['strgroupdropped'] = 'Grup şters.'; + $lang['strgroupdroppedbad'] = 'Ştergere grup eşuată.'; + $lang['strmembers'] = 'Membri'; + $lang['strmemberof'] = 'Membru al'; + $lang['stradminmembers'] = 'Membri administratori'; + $lang['straddmember'] = 'Adăugare membru'; + $lang['strmemberadded'] = 'Membru adăugat.'; + $lang['strmemberaddedbad'] = 'Adăugare membru eşuată.'; + $lang['strdropmember'] = 'Ştergere membru'; + $lang['strconfdropmember'] = 'Sigur ştergeţi membrul "%s" din grupul "%s"?'; + $lang['strmemberdropped'] = 'Membru şters.'; + $lang['strmemberdroppedbad'] = 'Ştergere membru eşuată.'; + + // Roles + $lang['strrole'] = 'Rol'; + $lang['strroles'] = 'Roluri'; + $lang['strshowallroles'] = 'Afişare toate rolurile'; + $lang['strnoroles'] = 'Nici un rol găsit'; + $lang['strinheritsprivs'] = 'Moştenire privilegii?'; + $lang['strcreaterole'] = 'Creare rol'; + $lang['strcancreaterole'] = 'Creare rol posibilă?'; + $lang['strrolecreated'] = 'Rol creat'; + $lang['strrolecreatedbad'] = 'Creare rol eşuată'; + $lang['stralterrole'] = 'Modificare rol'; + $lang['strrolealtered'] = 'Rol modificat'; + $lang['strrolealteredbad'] = 'Modificare rol eşuată'; + $lang['strcanlogin'] = 'Autentificare posibilă?'; + $lang['strconnlimit'] = 'Limită conectare'; + $lang['strdroprole'] = 'Ştergere rol'; + $lang['strconfdroprole'] = 'Sigur ştergeţi rolul "%s"?'; + $lang['strroledropped'] = 'Rol şters'; + $lang['strroledroppedbad'] = 'Ştergere rol eşuată'; + $lang['strnolimit'] = 'Fără limită'; + $lang['strnever'] = 'Niciodată'; + $lang['strroleneedsname'] = 'Specificaţi un nume pentru rol'; + + // Privileges + $lang['strprivilege'] = 'Privilegiu'; + $lang['strprivileges'] = 'Privilegii'; + $lang['strnoprivileges'] = 'Acest obiect are privilegiile implicite ale proprietarului.'; + $lang['strgrant'] = 'Acordare'; + $lang['strrevoke'] = 'Revocare'; + $lang['strgranted'] = 'Privilegii schimbate.'; + $lang['strgrantfailed'] = 'Schimbare privilegii eşuată.'; + $lang['strgrantbad'] = 'Specificaţi cel puţin un utilizator sau grup şi cel puţin un privilegiu.'; + $lang['strgrantor'] = 'Acordat de'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'Bază de date'; + $lang['strdatabases'] = 'Baze de date'; + $lang['strshowalldatabases'] = 'Afişare toate bazele de date'; + $lang['strnodatabases'] = 'Nici o bază de date găsită.'; + $lang['strcreatedatabase'] = 'Creare bază de date'; + $lang['strdatabasename'] = 'Nume bază de date'; + $lang['strdatabaseneedsname'] = 'Specificaţi un nume pentru baza de date.'; + $lang['strdatabasecreated'] = 'Bază de date creată.'; + $lang['strdatabasecreatedbad'] = 'Creare bază de date eşuată.'; + $lang['strconfdropdatabase'] = 'Sigur ştergeţi baza de date "%s"?'; + $lang['strdatabasedropped'] = 'Bază de date ştearsă.'; + $lang['strdatabasedroppedbad'] = 'Ştergere bază de date eşuată.'; + $lang['strentersql'] = 'Introduceţi instrucţiunea SQL de executat:'; + $lang['strsqlexecuted'] = 'Instrucţiune SQL executată.'; + $lang['strvacuumgood'] = 'Vacuum terminat.'; + $lang['strvacuumbad'] = 'Vacuum eşuat.'; + $lang['stranalyzegood'] = 'Analiză terminată.'; + $lang['stranalyzebad'] = 'Analiză eşuată.'; + $lang['strreindexgood'] = 'Re-indexare terminată.'; + $lang['strreindexbad'] = 'Re-indexare eşuată.'; + $lang['strfull'] = 'Complet'; + $lang['strfreeze'] = 'Îngheţare'; + $lang['strforce'] = 'Forţare'; + $lang['strsignalsent'] = 'Semnal trimis.'; + $lang['strsignalsentbad'] = 'Trimitere semnal eşuată.'; + $lang['strallobjects'] = 'Toate obiectele'; + $lang['strdatabasealtered'] = 'Bază de date modificată.'; + $lang['strdatabasealteredbad'] = 'Modificarea bazei de date a eşuat.'; + + // Views + $lang['strview'] = 'Vizualizare'; + $lang['strviews'] = 'Vizualizări'; + $lang['strshowallviews'] = 'Afişare toate vizualizările'; + $lang['strnoview'] = 'Nici o vizualizare găsită.'; + $lang['strnoviews'] = 'Nici o vizualizare găsită.'; + $lang['strcreateview'] = 'Creare vizualizare'; + $lang['strviewname'] = 'Nume vizualizare'; + $lang['strviewneedsname'] = 'Specificaţi un nume pentru vizualizare.'; + $lang['strviewneedsdef'] = 'Specificaţi o definiţie pentru vizualizare.'; + $lang['strviewneedsfields'] = 'Specificaţi coloanele pe care le doriţi selectate în vizualizare.'; + $lang['strviewcreated'] = 'Vizualizare creată.'; + $lang['strviewcreatedbad'] = 'Creare vizualizare eşuată.'; + $lang['strconfdropview'] = 'Sigur ştergeţi vizualizarea "%s"?'; + $lang['strviewdropped'] = 'Vizualizare ştearsă.'; + $lang['strviewdroppedbad'] = 'Ştergere vizualizare eşuată.'; + $lang['strviewupdated'] = 'Vizualizare actualizată'; + $lang['strviewupdatedbad'] = 'Actualizare vizualizare eşuată.'; + $lang['strviewlink'] = 'Chei de legătură'; + $lang['strviewconditions'] = 'Condiţii suplimentare'; + $lang['strcreateviewwiz'] = 'Creare vizualizare folosind expertul'; + + // Sequences + $lang['strsequence'] = 'Secvenţă'; + $lang['strsequences'] = 'Secvenţe'; + $lang['strshowallsequences'] = 'Afişare toate secvenţele'; + $lang['strnosequence'] = 'Nici o secvenţă găsită.'; + $lang['strnosequences'] = 'Nici o secvenţă găsită.'; + $lang['strcreatesequence'] = 'Creare secvenţă'; + $lang['strlastvalue'] = 'Ultima valoare'; + $lang['strincrementby'] = 'Incrementare cu'; + $lang['strstartvalue'] = 'Valoare de start'; + $lang['strmaxvalue'] = 'Valoare maximă'; + $lang['strminvalue'] = 'Valoare minimă'; + $lang['strcachevalue'] = 'Valoare cache'; + $lang['strlogcount'] = 'Log count'; + $lang['striscycled'] = 'Ciclică?'; + $lang['strsequenceneedsname'] = 'Specificaţi un nume pentru secvenţă.'; + $lang['strsequencecreated'] = 'Secvenţă creată.'; + $lang['strsequencecreatedbad'] = 'Creare secvenţă eşuată.'; + $lang['strconfdropsequence'] = 'Sigur ştergeţi secvenţa "%s"?'; + $lang['strsequencedropped'] = 'Secvenţă ştearsă.'; + $lang['strsequencedroppedbad'] = 'Ştergere secvenţă eşuată.'; + $lang['strsequencereset'] = 'Reiniţializare secvenţă.'; + $lang['strsequenceresetbad'] = 'Reiniţializare secvenţă eşuată.'; + $lang['straltersequence'] = 'Modificare secvenţă'; + $lang['strsequencealtered'] = 'Secvenţă modificată'; + $lang['strsequencealteredbad'] = 'Modificare secvenţă eşuată'; + $lang['strsetval'] = 'Setare valoare'; + $lang['strsequencesetval'] = 'Valoare secvenţă setată'; + $lang['strsequencesetvalbad'] = 'Setare valoare secvenţă eşuată'; + $lang['strnextval'] = 'Valoare increment'; + $lang['strsequencenextval'] = 'Secvenţă incrementată'; + $lang['strsequencenextvalbad'] = 'Incremetare secvenţă eşuată'; + + // Indexes + $lang['strindex'] = 'Index'; + $lang['strindexes'] = 'Indexuri'; + $lang['strindexname'] = 'Nume index'; + $lang['strshowallindexes'] = 'Afişare toate indexurile'; + $lang['strnoindex'] = 'Nici un index găsit.'; + $lang['strnoindexes'] = 'Nici un index găsit.'; + $lang['strcreateindex'] = 'Creare index'; + $lang['strtabname'] = 'Nume tabelă'; + $lang['strcolumnname'] = 'Nume coloană'; + $lang['strindexneedsname'] = 'Specificaţi un nume pentru index.'; + $lang['strindexneedscols'] = 'Indexurile necesită un număr corect de coloane.'; + $lang['strindexcreated'] = 'Index creat'; + $lang['strindexcreatedbad'] = 'Creare index eşuată.'; + $lang['strconfdropindex'] = 'Sigur ştergeţi indexul "%s"?'; + $lang['strindexdropped'] = 'Index şters.'; + $lang['strindexdroppedbad'] = 'Ştergere index eşuată.'; + $lang['strkeyname'] = 'Nume cheie'; + $lang['struniquekey'] = 'Cheie unică'; + $lang['strprimarykey'] = 'Cheie primară'; + $lang['strindextype'] = 'Tip de index'; + $lang['strtablecolumnlist'] = 'Coloane în tabelă'; + $lang['strindexcolumnlist'] = 'Coloane în index'; + $lang['strconfcluster'] = 'Sigur grupaţi "%s"?'; + $lang['strclusteredgood'] = 'Grupare completă.'; + $lang['strclusteredbad'] = 'Grupare eşuată.'; + + // Rules + $lang['strrules'] = 'Reguli'; + $lang['strrule'] = 'Regulă'; + $lang['strshowallrules'] = 'Afişare toate regulile'; + $lang['strnorule'] = 'Nici o regulă găsită.'; + $lang['strnorules'] = 'Nici o regulă găsită.'; + $lang['strcreaterule'] = 'Creare regulă'; + $lang['strrulename'] = 'Nume regulă'; + $lang['strruleneedsname'] = 'Specificaţi un nume pentru regulă.'; + $lang['strrulecreated'] = 'Regulă creată.'; + $lang['strrulecreatedbad'] = 'Creare regulă eşuată.'; + $lang['strconfdroprule'] = 'Sigur ştergeţi regula "%s"?'; + $lang['strruledropped'] = 'Regulă ştearsă.'; + $lang['strruledroppedbad'] = 'Ştergere regulă eşuată.'; + + // Constraints + $lang['strconstraint'] = 'Restricţie'; + $lang['strconstraints'] = 'Restricţii'; + $lang['strshowallconstraints'] = 'Afişare toate restricţiile'; + $lang['strnoconstraints'] = 'Nici o restricţie găsită.'; + $lang['strcreateconstraint'] = 'Creare restricţie'; + $lang['strconstraintcreated'] = 'Restricţie creată.'; + $lang['strconstraintcreatedbad'] = 'Creare restricţie eşuată.'; + $lang['strconfdropconstraint'] = 'Sigur ştergeţi restricţia "%s"?'; + $lang['strconstraintdropped'] = 'Restricţie ştearsă.'; + $lang['strconstraintdroppedbad'] = 'Ştergere restricţie eşuată.'; + $lang['straddcheck'] = 'Adăugare verificare'; + $lang['strcheckneedsdefinition'] = 'Verificarea de restricţie necesită o definiţie.'; + $lang['strcheckadded'] = 'Verificare de restricţie adăugată.'; + $lang['strcheckaddedbad'] = 'Adăugare verificare de restricţie eşuată.'; + $lang['straddpk'] = 'Adăugare cheie primară'; + $lang['strpkneedscols'] = 'Cheia primară necesită cel puţin o coloană.'; + $lang['strpkadded'] = 'Cheie primară adăugată.'; + $lang['strpkaddedbad'] = 'Adăugare cheie primară eşuată.'; + $lang['stradduniq'] = 'Adăugare cheie unică'; + $lang['struniqneedscols'] = 'Cheia unică necesită cel puţin o coloană.'; + $lang['struniqadded'] = 'Cheie unică adăugată.'; + $lang['struniqaddedbad'] = 'Adăugare cheie unică eşuată.'; + $lang['straddfk'] = 'Adăugare cheie străină'; + $lang['strfkneedscols'] = 'Cheia străină necesită cel puţin o coloană.'; + $lang['strfkneedstarget'] = 'Cheia străină necesită o tabelă de destinaţie.'; + $lang['strfkadded'] = 'Cheie străină adăugată.'; + $lang['strfkaddedbad'] = 'Adăugare cheie străină eşuată.'; + $lang['strfktarget'] = 'Tabelă de destinaţie'; + $lang['strfkcolumnlist'] = 'Coloane în cheie'; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + + // Functions + $lang['strfunction'] = 'Funcţie'; + $lang['strfunctions'] = 'Funcţii'; + $lang['strshowallfunctions'] = 'Afişare toate funcţiile'; + $lang['strnofunction'] = 'Nici o functie găsită.'; + $lang['strnofunctions'] = 'Nici o functie găsită.'; + $lang['strcreateplfunction'] = 'Creare funcţie SQL/PL'; + $lang['strcreateinternalfunction'] = 'Creare funcţie internă'; + $lang['strcreatecfunction'] = 'Creare funcţie C'; + $lang['strfunctionname'] = 'Nume funcţie'; + $lang['strreturns'] = 'Întoarce'; + $lang['strproglanguage'] = 'Limbaj de programare'; + $lang['strfunctionneedsname'] = 'Specificaţi un nume pentru funcţie.'; + $lang['strfunctionneedsdef'] = 'Specificaţi o definiţie pentru functie.'; + $lang['strfunctioncreated'] = 'Funcţie creată.'; + $lang['strfunctioncreatedbad'] = 'Creare funcţie eşuată.'; + $lang['strconfdropfunction'] = 'Sigur ştergeţi funcţia "%s"?'; + $lang['strfunctiondropped'] = 'Funcţie ştearsă.'; + $lang['strfunctiondroppedbad'] = 'Ştergere funcţie eşuată.'; + $lang['strfunctionupdated'] = 'Funcţie actualizată.'; + $lang['strfunctionupdatedbad'] = 'Actualizare funcţie eşuată.'; + $lang['strobjectfile'] = 'Fişier obiect'; + $lang['strlinksymbol'] = 'Simbol de legătură'; + $lang['strarguments'] = 'Argumente'; + $lang['strargmode'] = 'Mod'; + $lang['strargtype'] = 'Tip'; + $lang['strargadd'] = 'Adăugare alt argument'; + $lang['strargremove'] = 'Eliminare argument'; + $lang['strargnoargs'] = 'Această funcţie nu acceptă nici un argument'; + $lang['strargenableargs'] = 'Activare argumente pasate acestei funcţii'; + $lang['strargnorowabove'] = 'Trebuie să existe un rând deasupra acestui rând'; + $lang['strargnorowbelow'] = 'Trebuie să existe un rând dedesubtul acestui rând'; + $lang['strargraise'] = 'Mutare în sus'; + $lang['strarglower'] = 'Mutare în jos'; + $lang['strargremoveconfirm'] = 'Sigur eliminaţi acest argument? Această acţiune NU poate fi revocată.'; + + // Triggers + $lang['strtrigger'] = 'Declanşator'; + $lang['strtriggers'] = 'Declanşatori'; + $lang['strshowalltriggers'] = 'Afişare toate declanşatoarele'; + $lang['strnotrigger'] = 'Nici un declanşator găsit.'; + $lang['strnotriggers'] = 'Nici un declanşator găsit.'; + $lang['strcreatetrigger'] = 'Creare declanşator'; + $lang['strtriggerneedsname'] = 'Specificaţi un nume pentru declanşator.'; + $lang['strtriggerneedsfunc'] = 'Specificaţi o funcţie pentru declanşator.'; + $lang['strtriggercreated'] = 'Declanşator creat.'; + $lang['strtriggercreatedbad'] = 'Creare declanşator eşuată.'; + $lang['strconfdroptrigger'] = 'Sigur ştergeţi declanşatorul "%s" de pe "%s"?'; + $lang['strconfenabletrigger'] = 'Sigur activaţi declanşatorul "%s" pentru "%s"?'; + $lang['strconfdisabletrigger'] = 'Sigur dezactivaţi declanşatorul "%s" pentru "%s"?'; + $lang['strtriggerdropped'] = 'Declanşator şters.'; + $lang['strtriggerdroppedbad'] = 'Ştergere declanşator eşuată.'; + $lang['strtriggerenabled'] = 'Declanşator activat'; + $lang['strtriggerenabledbad'] = 'Activare declanşator eşuată'; + $lang['strtriggerdisabled'] = 'Declanşator dezactivat'; + $lang['strtriggerdisabledbad'] = 'Dezactivare declanşator eşuată'; + $lang['strtriggeraltered'] = 'Declanşator modificat.'; + $lang['strtriggeralteredbad'] = 'Modificare declanşator eşuată.'; + $lang['strforeach'] = 'Pentru fiecare'; + + // Types + $lang['strtype'] = 'Tip'; + $lang['strtypes'] = 'Tipuri'; + $lang['strshowalltypes'] = 'Afişare toate tipurile'; + $lang['strnotype'] = 'Nici un tip găsit.'; + $lang['strnotypes'] = 'Nici un tip găsit.'; + $lang['strcreatetype'] = 'Creare tip'; + $lang['strcreatecomptype'] = 'Creare tip compus'; + $lang['strtypeneedsfield'] = 'Specificaţi cel puţin un câmp.'; + $lang['strtypeneedscols'] = 'Specificaţi un număr corect de cămpuri.'; + $lang['strtypename'] = 'Nume tip'; + $lang['strinputfn'] = 'Funcţie de intrare'; + $lang['stroutputfn'] = 'Funcţie de ieşire'; + $lang['strpassbyval'] = 'Transmis prin valoare?'; + $lang['stralignment'] = 'Aliniere'; + $lang['strelement'] = 'Element'; + $lang['strdelimiter'] = 'Delimitator'; + $lang['strstorage'] = 'Stocare'; + $lang['strfield'] = 'Câmp'; + $lang['strnumfields'] = 'Număr de câmpuri'; + $lang['strtypeneedsname'] = 'Specificaţi un nume pentru tip.'; + $lang['strtypeneedslen'] = 'Specificaţi o lungime pentru tip.'; + $lang['strtypecreated'] = 'Tip creat.'; + $lang['strtypecreatedbad'] = 'Creare tip eşuată.'; + $lang['strconfdroptype'] = 'Sigur ştergeţi tipul "%s"?'; + $lang['strtypedropped'] = 'Tip şters.'; + $lang['strtypedroppedbad'] = 'Ştergere tip eşuată.'; + $lang['strflavor'] = 'Flavor'; + $lang['strbasetype'] = 'Bază'; + $lang['strcompositetype'] = 'Compus'; + $lang['strpseudotype'] = 'Pseudo'; + + // Schemas + $lang['strschema'] = 'Schemă'; + $lang['strschemas'] = 'Scheme'; + $lang['strshowallschemas'] = 'Afişare toate schemele'; + $lang['strnoschema'] = 'Nici o schemă găsită.'; + $lang['strnoschemas'] = 'Nici o schemă găsită.'; + $lang['strcreateschema'] = 'Creare schemă'; + $lang['strschemaname'] = 'Nume schemă'; + $lang['strschemaneedsname'] = 'Specificaţi un nume pentru schemă.'; + $lang['strschemacreated'] = 'Schemă creată.'; + $lang['strschemacreatedbad'] = 'Creare schemă eşuată.'; + $lang['strconfdropschema'] = 'Sigur ştergeţi schema "%s"?'; + $lang['strschemadropped'] = 'Schemă ştearsă.'; + $lang['strschemadroppedbad'] = 'Ştergere schemă eşuată.'; + $lang['strschemaaltered'] = 'Schemă modificată.'; + $lang['strschemaalteredbad'] = 'Modificare schemă eşuată.'; + $lang['strsearchpath'] = 'Cale de căutare pentru schemă'; + + // Reports + $lang['strreport'] = 'Raport'; + $lang['strreports'] = 'Rapoarte'; + $lang['strshowallreports'] = 'Afişare toate rapoartele'; + $lang['strnoreports'] = 'Nici un raport găsit.'; + $lang['strcreatereport'] = 'Creare raport'; + $lang['strreportdropped'] = 'Report dropped.'; + $lang['strreportdroppedbad'] = 'Ştergere raport eşuată.'; + $lang['strconfdropreport'] = 'Sigur ştergeţi raportul "%s"?'; + $lang['strreportneedsname'] = 'Specificaţi un nume pentru raport.'; + $lang['strreportneedsdef'] = 'Specificaţi o instrucţiune SQL pentru raport.'; + $lang['strreportcreated'] = 'Raport salvat.'; + $lang['strreportcreatedbad'] = 'Salvare raport eşuată.'; + + // Domains + $lang['strdomain'] = 'Domeniu'; + $lang['strdomains'] = 'Domenii'; + $lang['strshowalldomains'] = 'Afişare toate domeniile'; + $lang['strnodomains'] = 'Nici un domeniu găsit.'; + $lang['strcreatedomain'] = 'Creare domeniu'; + $lang['strdomaindropped'] = 'Domeniu şters.'; + $lang['strdomaindroppedbad'] = 'Ştergere domeniu eşuată.'; + $lang['strconfdropdomain'] = 'Sigur ştergeţi domeniul "%s"?'; + $lang['strdomainneedsname'] = 'Specificaţi un nume pentru domeniu.'; + $lang['strdomaincreated'] = 'Domeniu creat.'; + $lang['strdomaincreatedbad'] = 'Creare domeniu eşuată.'; + $lang['strdomainaltered'] = 'Domeniu modificat.'; + $lang['strdomainalteredbad'] = 'Modificare domeniu eşuată.'; + + // Operators + $lang['stroperator'] = 'Operator'; + $lang['stroperators'] = 'Operatori'; + $lang['strshowalloperators'] = 'Afişare toţi operatorii'; + $lang['strnooperator'] = 'Nici un operator găsit.'; + $lang['strnooperators'] = 'Nici un operator găsit.'; + $lang['strcreateoperator'] = 'Creare operator'; + $lang['strleftarg'] = 'Tipul argumentului stâng'; + $lang['strrightarg'] = 'Tipul argumentului drept'; + $lang['strcommutator'] = 'Comutator'; + $lang['strnegator'] = 'Negator'; + $lang['strrestrict'] = 'Restrict'; + $lang['strjoin'] = 'Relaţionare'; + $lang['strhashes'] = 'Hashes'; + $lang['strmerges'] = 'Îmbină'; + $lang['strleftsort'] = 'Sortare stânga'; + $lang['strrightsort'] = 'Sortare dreapta'; + $lang['strlessthan'] = 'Mai mic decăt'; + $lang['strgreaterthan'] = 'Mai mare decăt'; + $lang['stroperatorneedsname'] = 'Specificaţi un nume pentru operator.'; + $lang['stroperatorcreated'] = 'Operator creat.'; + $lang['stroperatorcreatedbad'] = 'Creare operator eşuată.'; + $lang['strconfdropoperator'] = 'Sigur ştergeţi operatorul "%s"?'; + $lang['stroperatordropped'] = 'Operator şters.'; + $lang['stroperatordroppedbad'] = 'Ştergere operator eşuată.'; + + // Casts + $lang['strcasts'] = 'Conversii de tip'; + $lang['strnocasts'] = 'Nici o conversie de tip găsită.'; + $lang['strsourcetype'] = 'Tip sursă'; + $lang['strtargettype'] = 'Tip destinaţie'; + $lang['strimplicit'] = 'Implicit'; + $lang['strinassignment'] = 'În alocare'; + $lang['strbinarycompat'] = '(Compatibil binar)'; + + // Conversions + $lang['strconversions'] = 'Conversii'; + $lang['strnoconversions'] = 'Nici o conversie găsită.'; + $lang['strsourceencoding'] = 'Codificare sursă'; + $lang['strtargetencoding'] = 'Codificare destinaţie'; + + // Languages + $lang['strlanguages'] = 'Limbaje'; + $lang['strnolanguages'] = 'Nici un limbaj găsit.'; + $lang['strtrusted'] = 'Sigur'; + + // Info + $lang['strnoinfo'] = 'Nici o informaţie disponibilă.'; + $lang['strreferringtables'] = 'Tabele referite'; + $lang['strparenttables'] = 'Tabele părinte'; + $lang['strchildtables'] = 'Tabele copii'; + + // Aggregates + $lang['straggregate'] = 'Agregare'; + $lang['straggregates'] = 'Agregări'; + $lang['strnoaggregates'] = 'Nici o agregare găsită.'; + $lang['stralltypes'] = '(Toate tipurile)'; + $lang['straggrtransfn'] = 'Funcţie de tranziţie'; + $lang['strcreateaggregate'] = 'Creare agregare'; + $lang['straggrbasetype'] = 'Tip dată de intrare'; + $lang['straggrsfunc'] = 'Funcţie tranziţie de stare'; + $lang['straggrffunc'] = 'Funcţie finală'; + $lang['straggrinitcond'] = 'Condiţie iniţială'; + $lang['straggrsortop'] = 'Operator sortare'; + $lang['strdropaggregate'] = 'Ştergere agregare'; + $lang['strconfdropaggregate'] = 'Sigur ştergeţi agregarea "%s"?'; + $lang['straggregatedropped'] = 'Agregare ştearsă.'; + $lang['straggregatedroppedbad'] = 'Ştergere agregare eşuată.'; + $lang['stralteraggregate'] = 'Modificare agregare'; + $lang['straggraltered'] = 'Agregare modificată.'; + $lang['straggralteredbad'] = 'Modificare agregare eşuată.'; + $lang['straggrneedsname'] = 'Specificaţi un nume pentru agregare'; + $lang['straggrneedsbasetype'] = 'Specificaţi tipul de dată de intrare pentru agregare'; + $lang['straggrneedssfunc'] = 'Specificaţi numele funcţiei tranziţiei de stare pentru agregare'; + $lang['straggrneedsstype'] = 'Specificaţi tipul datei pentru valoarea stării agregării'; + $lang['straggrcreated'] = 'Agregare creată.'; + $lang['straggrcreatedbad'] = 'Creare agregare eşuată.'; + $lang['straggrshowall'] = 'Afişare toate agregările'; + + // Operator Classes + $lang['stropclasses'] = 'Clase de operatori'; + $lang['strnoopclasses'] = 'Nici o clasă de operatori găsită.'; + $lang['straccessmethod'] = 'Metodă de acces'; + + // Stats and performance + $lang['strrowperf'] = 'Performanţă rând'; + $lang['strioperf'] = 'Performanţă I/O'; + $lang['stridxrowperf'] = 'Performanţă index/rând'; + $lang['stridxioperf'] = 'Performanţă index I/O'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Secvenţial'; + $lang['strscan'] = 'Scanare'; + $lang['strread'] = 'Citire'; + $lang['strfetch'] = 'Transfer'; + $lang['strheap'] = 'Stivă'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'Index TOAST'; + $lang['strcache'] = 'Cache'; + $lang['strdisk'] = 'Disc'; + $lang['strrows2'] = 'Rânduri'; + + // Tablespaces + $lang['strtablespace'] = 'Spaţiu de tabele'; + $lang['strtablespaces'] = 'Spaţii de tabele'; + $lang['strshowalltablespaces'] = 'Afişare toate spaţiile de tabele'; + $lang['strnotablespaces'] = 'Nici un spaţiu de tabele găsit.'; + $lang['strcreatetablespace'] = 'Creare spaţiu de tabele'; + $lang['strlocation'] = 'Locaţie'; + $lang['strtablespaceneedsname'] = 'Specificaţi un nume pentru spaţiul de tabele.'; + $lang['strtablespaceneedsloc'] = 'Specificaţi directorul în care va fi creat spaţiul de tabele.'; + $lang['strtablespacecreated'] = 'Spaţiu de tabele creat.'; + $lang['strtablespacecreatedbad'] = 'Creare spaţiu de tabele eşuată.'; + $lang['strconfdroptablespace'] = 'Sigur ştergeţi spaţiul de tabele "%s"?'; + $lang['strtablespacedropped'] = 'Spaţiu de tabele şters.'; + $lang['strtablespacedroppedbad'] = 'Ştergere şpaţiu de tabele eşuată.'; + $lang['strtablespacealtered'] = 'Spaţiu de tabele modificat.'; + $lang['strtablespacealteredbad'] = 'Modificare şpaţiu de tabele eşuată.'; + + // Slony clusters + $lang['strcluster'] = 'Grupare'; + $lang['strnoclusters'] = 'Nici o grupare găsită.'; + $lang['strconfdropcluster'] = 'Sigur ştergeţi gruparea "%s"?'; + $lang['strclusterdropped'] = 'Grupare ştearsă.'; + $lang['strclusterdroppedbad'] = 'Ştergere grupare eşuată.'; + $lang['strinitcluster'] = 'Iniţializare grupare'; + $lang['strclustercreated'] = 'Grupare iniţializată.'; + $lang['strclustercreatedbad'] = 'Iniţializare grupare eşuată.'; + $lang['strclusterneedsname'] = 'Trebuie să daţi un nume grupării.'; + $lang['strclusterneedsnodeid'] = 'Trebuie să daţi un identificator nodului local.'; + + // Slony nodes + $lang['strnodes'] = 'Noduri'; + $lang['strnonodes'] = 'Nici un nod găsit.'; + $lang['strcreatenode'] = 'Creare nod'; + $lang['strid'] = 'ID'; + $lang['stractive'] = 'Activ(ă)'; + $lang['strnodecreated'] = 'Nod creat.'; + $lang['strnodecreatedbad'] = 'Creare nod eşuată.'; + $lang['strconfdropnode'] = 'Sigur ştergeţi nodul "%s"?'; + $lang['strnodedropped'] = 'Nod şters.'; + $lang['strnodedroppedbad'] = 'Ştergere nod eşuată'; + $lang['strfailover'] = 'Failover'; + $lang['strnodefailedover'] = 'Node failed over.'; + $lang['strnodefailedoverbad'] = 'Node failover failed.'; + $lang['strstatus'] = 'Stare'; + $lang['strhealthy'] = 'Intact'; + $lang['stroutofsync'] = 'Desincronizat'; + $lang['strunknown'] = 'Necunoscut'; + + // Slony paths + $lang['strpaths'] = 'Căi'; + $lang['strnopaths'] = 'Nici o cale găsită.'; + $lang['strcreatepath'] = 'Creare cale'; + $lang['strnodename'] = 'Nume nod'; + $lang['strnodeid'] = 'ID nod'; + $lang['strconninfo'] = 'Şir pentru conectare'; + $lang['strconnretry'] = 'Secunde până la o nouă încercare de conectare'; + $lang['strpathneedsconninfo'] = 'Trebuie să daţi un şir de conectare pentru cale.'; + $lang['strpathneedsconnretry'] = 'Trebuie să daţi numărul de secunde până la o nouă încercare de conectare.'; + $lang['strpathcreated'] = 'Cale creată.'; + $lang['strpathcreatedbad'] = 'Creare cale eşuată.'; + $lang['strconfdroppath'] = 'Sigur ştergeţi calea "%s"?'; + $lang['strpathdropped'] = 'Cale ştearsă.'; + $lang['strpathdroppedbad'] = 'Ştergere cale eşuată.'; + + // Slony listens + $lang['strlistens'] = 'Ascultări'; + $lang['strnolistens'] = 'Nici o ascultare găsită.'; + $lang['strcreatelisten'] = 'Creare ascultare'; + $lang['strlistencreated'] = 'Ascultare creată.'; + $lang['strlistencreatedbad'] = 'Creare ascultare eşuată.'; + $lang['strconfdroplisten'] = 'Sigur ştergeţi ascultarea "%s"?'; + $lang['strlistendropped'] = 'Ascultare ştearsă.'; + $lang['strlistendroppedbad'] = 'Ştergere ascultare eşuată.'; + + // Slony replication sets + $lang['strrepsets'] = 'Seturi de replicare'; + $lang['strnorepsets'] = 'Nici un set de replicare găsit.'; + $lang['strcreaterepset'] = 'Creare set de replicare'; + $lang['strrepsetcreated'] = 'Set de replicare creat'; + $lang['strrepsetcreatedbad'] = 'Creare set de replicare eşuată'; + $lang['strconfdroprepset'] = 'Sigur ştergeţi setul de replicare "%s"?'; + $lang['strrepsetdropped'] = 'Set de replicare şters'; + $lang['strrepsetdroppedbad'] = 'Ştergere set de replicare eşuată.'; + $lang['strmerge'] = 'Contopire'; + $lang['strmergeinto'] = 'Contopire în'; + $lang['strrepsetmerged'] = 'Seturi de replicare contopite'; + $lang['strrepsetmergedbad'] = 'Contopire seturi de replicare eşuată.'; + $lang['strmove'] = 'Mutare'; + $lang['strneworigin'] = 'Origine nouă'; + $lang['strrepsetmoved'] = 'Set de replicare mutat'; + $lang['strrepsetmovedbad'] = 'Mutare set de replicare eşuată.'; + $lang['strnewrepset'] = 'Set de replicare nou'; + $lang['strlock'] = 'Blocare'; + $lang['strlocked'] = 'Blocat'; + $lang['strunlock'] = 'Deblocare'; + $lang['strconflockrepset'] = 'Siguri blocaţi setul de replicare "%s"?'; + $lang['strrepsetlocked'] = 'Set de replicare blocat'; + $lang['strrepsetlockedbad'] = 'Blocare set de replicare eşuată.'; + $lang['strconfunlockrepset'] = 'Sigur deblocaţi setul de replicare "%s"?'; + $lang['strrepsetunlocked'] = 'Set de replicare deblocat'; + $lang['strrepsetunlockedbad'] = 'Deblocare set de replicare eşuată.'; + $lang['strexecute'] = 'Executare'; + $lang['stronlyonnode'] = 'Numai pentru nodul'; + $lang['strddlscript'] = 'Script DDL'; + $lang['strscriptneedsbody'] = 'Trebuie să furnizaţi un script care să fie executat pentru toate nodurile.'; + $lang['strscriptexecuted'] = 'Scriptul DDL pentru setul de replicare a fost executat.'; + $lang['strscriptexecutedbad'] = 'Executare script DDL pentru setul de replicare eşuată.'; + $lang['strtabletriggerstoretain'] = 'Următoarele declanşatoare NU vor fi dezactivate de Slony:'; + + // Slony tables in replication sets + $lang['straddtable'] = 'Adăugare tabelă'; + $lang['strtableneedsuniquekey'] = 'Tabela adăugată necesită o cheie primară sau unică.'; + $lang['strtableaddedtorepset'] = 'Tabelă adăugată setului de replicare.'; + $lang['strtableaddedtorepsetbad'] = 'Adăugare tabelă la setul de replicare eşuată.'; + $lang['strconfremovetablefromrepset'] = 'Sigur eliminaţi tabela "%s" din setul de replicare "%s"?'; + $lang['strtableremovedfromrepset'] = 'Tabelă eliminată din setul de replicare.'; + $lang['strtableremovedfromrepsetbad'] = 'Eliminare tabelă din setul de replicare eşuată.'; + + // Slony sequences in replication sets + $lang['straddsequence'] = 'Adăugare secvenţă'; + $lang['strsequenceaddedtorepset'] = 'Secvenţă adăugată setului de replicare.'; + $lang['strsequenceaddedtorepsetbad'] = 'Adăugare secvenţă la setul de replicare eşuată.'; + $lang['strconfremovesequencefromrepset'] = 'Sigur eliminaţi secvenţa "%s" din setul de replicare "%s"?'; + $lang['strsequenceremovedfromrepset'] = 'Secvenţă eliminată din setul de replicare.'; + $lang['strsequenceremovedfromrepsetbad'] = 'Eliminare secvenţă din setul de replicare eşuată.'; + + // Slony subscriptions + $lang['strsubscriptions'] = 'Subscriere'; + $lang['strnosubscriptions'] = 'Nici o subscriere găsită.'; + + // Miscellaneous + $lang['strtopbar'] = '%s rulând pe %s:%s -- Sunteţi autentificat ca utilizator "%s"'; + $lang['strtimefmt'] = 'jS M, Y g:iA'; + $lang['strhelp'] = 'Ajutor'; + $lang['strhelpicon'] = '?'; + $lang['strhelppagebrowser'] = 'Pagini de ajutor'; + $lang['strselecthelppage'] = 'Selectaţi o pagină de ajutor'; + $lang['strinvalidhelppage'] = 'Pagină de ajutor incorectă.'; + $lang['strlogintitle'] = 'Autentificare la %s'; + $lang['strlogoutmsg'] = 'Ieşire din %s'; + $lang['strloading'] = 'Încărcare...'; + $lang['strerrorloading'] = 'Eroare la încărcare'; + $lang['strclicktoreload'] = 'Faceţi clic pentru reîncărcare'; + + // Autovacuum + $lang['strautovacuum'] = 'Autovacuum'; + $lang['strturnedon'] = 'Pornit'; + $lang['strturnedoff'] = 'Oprit'; + $lang['strenabled'] = 'Activat'; + $lang['strvacuumbasethreshold'] = 'Vacuum Base Threshold'; + $lang['strvacuumscalefactor'] = 'Vacuum Scale Factor'; + $lang['stranalybasethreshold'] = 'Analyze Base Threshold'; + $lang['stranalyzescalefactor'] = 'Analyze Scale Factor'; + $lang['strvacuumcostdelay'] = 'Vacuum Cost Delay'; + $lang['strvacuumcostlimit'] = 'Vacuum Cost Limit'; + + // Table-level Locks + $lang['strlocks'] = 'Blocări'; + $lang['strtransaction'] = 'ID tranzacţie'; + $lang['strprocessid'] = 'ID proces'; + $lang['strmode'] = 'Mod blocare'; + $lang['strislockheld'] = 'Blocaj reţinut?'; + + // Prepared transactions + $lang['strpreparedxacts'] = 'Tranzacţii preparate'; + $lang['strxactid'] = 'ID tranzacţie'; + $lang['strgid'] = 'ID global'; + + + +?> diff --git a/php/pgadmin/lang/russian-utf8.php b/php/pgadmin/lang/russian-utf8.php new file mode 100644 index 0000000..73ad356 --- /dev/null +++ b/php/pgadmin/lang/russian-utf8.php @@ -0,0 +1,1020 @@ +'; + $lang['strfirst'] = '<< Перв.'; + $lang['strlast'] = 'Посл. >>'; + $lang['strfailed'] = 'Прервано'; + $lang['strcreate'] = 'Создать'; + $lang['strcreated'] = 'Создано'; + $lang['strcomment'] = 'Комментарий'; + $lang['strlength'] = 'Длина'; + $lang['strdefault'] = 'По умолчанию'; + $lang['stralter'] = 'Изменить'; + $lang['strok'] = 'OK'; + $lang['strcancel'] = 'Отменить'; + $lang['strkill'] = 'Убить'; + $lang['strac'] = 'Включить автодополнение'; + $lang['strsave'] = 'Сохранить'; + $lang['strreset'] = 'Сбросить'; + $lang['strinsert'] = 'Вставить'; + $lang['strselect'] = 'Выбрать'; + $lang['strdelete'] = 'Удалить'; + $lang['strupdate'] = 'Обновить'; + $lang['strreferences'] = 'Ссылки'; + $lang['stryes'] = 'Да'; + $lang['strno'] = 'Нет'; + $lang['strtrue'] = 'Истина'; + $lang['strfalse'] = 'Ложь'; + $lang['stredit'] = 'Редактировать'; + $lang['strcolumn'] = 'Атрибут'; + $lang['strcolumns'] = 'Атрибуты'; + $lang['strrows'] = 'запис(ь/и/ей)'; + $lang['strrowsaff'] = 'запис(ь/и/ей) обработано.'; + $lang['strobjects'] = 'объект(а/ов)'; + $lang['strback'] = 'Назад'; + $lang['strqueryresults'] = 'Результаты запроса'; + $lang['strshow'] = 'Показать'; + $lang['strempty'] = 'Очистить'; + $lang['strlanguage'] = 'Язык'; + $lang['strencoding'] = 'Кодировка'; + $lang['strvalue'] = 'Значение'; + $lang['strunique'] = 'Уникальный'; + $lang['strprimary'] = 'Первичный'; + $lang['strexport'] = 'Экспорт'; + $lang['strimport'] = 'Импорт'; + $lang['strallowednulls'] = 'Разрешенные NULL-символы'; + $lang['strbackslashn'] = '\N'; + $lang['stremptystring'] = 'Пустая строка/поле'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = 'Управление'; + $lang['strvacuum'] = 'Перестроить'; + $lang['stranalyze'] = 'Анализировать'; + $lang['strclusterindex'] = 'Кластеризовать'; + $lang['strclustered'] = 'Кластеризован?'; + $lang['strreindex'] = 'Перестроить индекс'; + $lang['strexecute'] = 'Выполнить'; + $lang['stradd'] = 'Добавить'; + $lang['strevent'] = 'Событие'; + $lang['strwhere'] = 'Где'; + $lang['strinstead'] = 'Делать вместо'; + $lang['strwhen'] = 'Когда'; + $lang['strformat'] = 'Формат'; + $lang['strdata'] = 'Данные'; + $lang['strconfirm'] = 'Подтвердить'; + $lang['strexpression'] = 'Выражение'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'Расширить'; + $lang['strcollapse'] = 'Свернуть'; + $lang['strfind'] = 'Найти'; + $lang['stroptions'] = 'Опции'; + $lang['strrefresh'] = 'Обновить'; + $lang['strdownload'] = 'Загрузить'; + $lang['strdownloadgzipped'] = 'Загрузить архив gzip'; + $lang['strinfo'] = 'Сведения'; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = 'Дополнительно'; + $lang['strvariables'] = 'Переменные'; + $lang['strprocess'] = 'Процесс'; + $lang['strprocesses'] = 'Процессы'; + $lang['strsetting'] = 'Опции'; + $lang['streditsql'] = 'Редактировать SQL'; + $lang['strruntime'] = 'Время выполнения: %s мсек'; + $lang['strpaginate'] = 'Нумеровать страницы с результатами'; + $lang['struploadscript'] = 'или загрузить SQL-скрипт:'; + $lang['strstarttime'] = 'Время начала'; + $lang['strfile'] = 'Файл'; + $lang['strfileimported'] = 'Файл импортирован.'; + $lang['strtrycred'] = 'Использовать эти данные аутентификации для всех серверов'; + $lang['strconfdropcred'] = 'В целях безопасности отключение уничтожит общую аутентификационную информацию. Вы действительно хотите отключится?'; + $lang['stractionsonmultiplelines'] = 'Действия над несколькими строками.'; + $lang['strselectall'] = 'Выбрать все'; + $lang['strunselectall'] = 'Отменить выбор всех'; + $lang['strlocale'] = 'Локаль'; + $lang['strcollation'] = 'Порядок сортировки строк (LC_COLLATE)'; + $lang['strctype'] = 'Классификация символов (LC_CTYPE)'; + $lang['strdefaultvalues'] = 'Значения по умолчанию'; + $lang['strnewvalues'] = 'Новые значения'; + $lang['strstart'] = 'Запустить автоматическое обновление'; + $lang['strstop'] = 'Остановить автоматическое обновление'; + $lang['strgotoppage'] = 'вверх'; + $lang['strtheme'] = 'Тема'; + + // Admin + $lang['stradminondatabase'] = 'Следующие административные задачи применяются ко всей базе данных %s.'; + $lang['stradminontable'] = 'Следующие административные задачи применяются к таблице %s.'; + + // User-supplied SQL history + $lang['strhistory'] = 'История'; + $lang['strnohistory'] = 'Нет истории.'; + $lang['strclearhistory'] = 'Очистить историю'; + $lang['strdelhistory'] = 'Удалить из истории'; + $lang['strconfdelhistory'] = 'Вы действительно хотите удалить этот запрос из истории?'; + $lang['strconfclearhistory'] = 'Вы действительно хотите очистить историю?'; + $lang['strnodatabaseselected'] = 'Пожалуйста, выберете базу данных.'; + + // Database sizes + $lang['strnoaccess'] = 'Нет доступа'; + $lang['strsize'] = 'Размер'; + $lang['strbytes'] = 'байт'; + $lang['strkb'] = 'кБ'; + $lang['strmb'] = 'МБ'; + $lang['strgb'] = 'ГБ'; + $lang['strtb'] = 'ТБ'; + + // Error handling + $lang['strnoframes'] = 'Это приложение лучше всего работает в браузере, который поддерживает фреймы, но оно может работать и без использования фреймов если перейти по ссылке ниже.'; + $lang['strnoframeslink'] = 'Использовать без фреймов'; + $lang['strbadconfig'] = 'Ваш config.inc.php является устаревшим. Вам необходимо обновить его из config.inc.php-dist.'; + $lang['strnotloaded'] = 'Ваша инсталяция PHP не поддерживает PostgreSQL. Вам необходимо пересобрать PHP, используя параметр --with-pgsql для configure.'; + $lang['strpostgresqlversionnotsupported'] = 'Версия PostgreSQL не поддерживается. Пожалуйста, обновитесь до версии %s или более поздней.'; + $lang['strbadschema'] = 'Обнаружена неверная схема.'; + $lang['strbadencoding'] = 'Ошибка при установке кодировки клиента (client encoding).'; + $lang['strsqlerror'] = 'Ошибка SQL:'; + $lang['strinstatement'] = 'В операторе:'; + $lang['strinvalidparam'] = 'Неверный параметр скрипта.'; + $lang['strnodata'] = 'Данных не найдено.'; + $lang['strnoobjects'] = 'Объектов не найдено.'; + $lang['strrownotunique'] = 'Нет уникального идентификатора для этой записи.'; + $lang['strnoreportsdb'] = 'Вы не создали базу данных отчетов. Читайте разъяснения в файле INSTALL.'; + $lang['strnouploads'] = 'Загрузка файла невозможна.'; + $lang['strimporterror'] = 'Ошибка импорта.'; + $lang['strimporterror-fileformat'] = 'Ошибка импорта: Невозможно автоматически определить формат файла.'; + $lang['strimporterrorline'] = 'Ошибка канала при импорте %s.'; + $lang['strimporterrorline-badcolumnnum'] = 'Ошибка импорта в строке %s: Строка не обладает необходимым числом атрибутов.'; + $lang['strimporterror-uploadedfile'] = 'Ошибка импорта: Файл не может быть загружен на сервер'; + $lang['strcannotdumponwindows'] = 'Экспорт таблиц и схем со сложными именами в Windows не поддерживается.'; + $lang['strinvalidserverparam'] = 'Попытка соединения с некорректным значением параметра "сервер", возможно кто-то пытается взломать вашу систему.'; + $lang['strnoserversupplied'] = 'Значение параметра "сервер" не представлено!'; + $lang['strbadpgdumppath'] = 'Ошибка экспорта: Невозможно выполнить pg_dump (указанный в conf/config.inc.php путь: %s). Пожалуйста, исправте этот путь в конфигурации и заново войдите в систему.'; + $lang['strbadpgdumpallpath'] = 'Ошибка экспорта: Невозможно выполнить pg_dumpall (указанный в conf/config.inc.php путь: %s). Пожалуйста, исправте этот путь в конфигурации и заново войдите в систему.'; + $lang['strconnectionfail'] = 'Ошибка подключения к серверу.'; + + // Tables + $lang['strtable'] = 'Таблица'; + $lang['strtables'] = 'Таблицы'; + $lang['strshowalltables'] = 'Показать все таблицы'; + $lang['strnotables'] = 'Таблиц не найдено.'; + $lang['strnotable'] = 'Таблица не обнаружена.'; + $lang['strcreatetable'] = 'Создать таблицу'; + $lang['strcreatetablelike'] = 'Создать таблицу наподобие'; + $lang['strcreatetablelikeparent'] = 'Исходная таблица'; + $lang['strcreatelikewithdefaults'] = 'включить значения по умолчанию'; + $lang['strcreatelikewithconstraints'] = 'включить ограничения'; + $lang['strcreatelikewithindexes'] = 'включить индексы'; + $lang['strtablename'] = 'Имя таблицы'; + $lang['strtableneedsname'] = 'Вам необходимо определить имя таблицы.'; + $lang['strtablelikeneedslike'] = 'Вам необходимо определить исходную таблицу.'; + $lang['strtableneedsfield'] = 'Вам необходимо определить по крайней мере одно поле.'; + $lang['strtableneedscols'] = 'Вам необходимо указать допустимое число атрибутов.'; + $lang['strtablecreated'] = 'Таблица создана.'; + $lang['strtablecreatedbad'] = 'Создание таблицы прервано.'; + $lang['strconfdroptable'] = 'Вы уверены, что хотите удалить таблицу "%s"?'; + $lang['strtabledropped'] = 'Таблица удалена.'; + $lang['strtabledroppedbad'] = 'Удаление таблицы прервано.'; + $lang['strconfemptytable'] = 'Вы уверены, что хотите очистить таблицу "%s"?'; + $lang['strtableemptied'] = 'Таблица очищена.'; + $lang['strtableemptiedbad'] = 'Очистка таблицы прервана.'; + $lang['strinsertrow'] = 'Добавить запись'; + $lang['strrowinserted'] = 'Запись добавлена.'; + $lang['strrowinsertedbad'] = 'Добавление записи прервано.'; + $lang['strnofkref'] = 'Нет соответствующего значения внешнего ключа %s.'; + $lang['strrowduplicate'] = 'Вставка строки прервана, попытка сделать дублирующую вставку.'; + $lang['streditrow'] = 'Редактировать запись'; + $lang['strrowupdated'] = 'Запись обновлена.'; + $lang['strrowupdatedbad'] = 'Обновление записи прервано.'; + $lang['strdeleterow'] = 'Удалить запись'; + $lang['strconfdeleterow'] = 'Вы уверены, что хотите удалить запись?'; + $lang['strrowdeleted'] = 'Запись удалена.'; + $lang['strrowdeletedbad'] = 'Удаление записи прервано.'; + $lang['strinsertandrepeat'] = 'Вставить и повторить'; + $lang['strnumcols'] = 'Количество атрибутов'; + $lang['strcolneedsname'] = 'Вам необходимо определить имя столбца'; + $lang['strselectallfields'] = 'Выбрать все поля'; + $lang['strselectneedscol'] = 'Вам необходимо указать по крайней мере один атрибут'; + $lang['strselectunary'] = 'Унарный оператор не может иметь величину.'; + $lang['strcolumnaltered'] = 'Атрибут изменен.'; + $lang['strcolumnalteredbad'] = 'Изменение атрибута прервано.'; + $lang['strconfdropcolumn'] = 'Вы уверены, что хотите удалить атрибут "%s" таблицы "%s"?'; + $lang['strcolumndropped'] = 'Атрибут удален.'; + $lang['strcolumndroppedbad'] = 'Удаление атрибута прервано.'; + $lang['straddcolumn'] = 'Добавить атрибут'; + $lang['strcolumnadded'] = 'Атрибут добавлен.'; + $lang['strcolumnaddedbad'] = 'Добавление атрибута прервано.'; + $lang['strcascade'] = 'Каскадом'; + $lang['strtablealtered'] = 'Таблица изменена.'; + $lang['strtablealteredbad'] = 'Изменение таблицы прервано.'; + $lang['strdataonly'] = 'Только данные'; + $lang['strstructureonly'] = 'Только структуру'; + $lang['strstructureanddata'] = 'Структуру и данные'; + $lang['strtabbed'] = 'Через табуляцию'; + $lang['strauto'] = 'Авто'; + $lang['strconfvacuumtable'] = 'Вы действительно хотите перестроить "%s"?'; + $lang['strconfanalyzetable'] = 'Вы действительно хотите произвести анализ "%s"?'; + $lang['strconfreindextable'] = 'Вы действительно хотите перестроить индекс "%s"?'; + $lang['strconfclustertable'] = 'Вы действительно хотите кластеризовать "%s"?'; + $lang['strestimatedrowcount'] = 'Предполагаемое число строк'; + $lang['strspecifytabletoanalyze'] = 'Вам необходимо указать как минимум одну таблицу для анализа.'; + $lang['strspecifytabletoempty'] = 'Вам необходимо указать как минимум одну таблицу для очистки.'; + $lang['strspecifytabletodrop'] = 'Вам необходимо указать как минимум одну таблицу для удаления.'; + $lang['strspecifytabletovacuum'] = 'Вам необходимо указать как минимум одну таблицу для перестроения.'; + $lang['strspecifytabletoreindex'] = 'Вам необходимо указать как минимум одну таблицу для перестроения индекса.'; + $lang['strspecifytabletocluster'] = 'Вам необходимо указать как минимум одну таблицу для кластеризации.'; + $lang['strnofieldsforinsert'] = 'Вы не можете вставить строку в таблицу без столбцов.'; + + // Columns + $lang['strcolprop'] = 'Свойства столбца'; + $lang['strnotableprovided'] = 'Значение параметра "таблица" не представлено!'; + + // Users + $lang['struser'] = 'Пользователь'; + $lang['strusers'] = 'Пользователи'; + $lang['strusername'] = 'Имя пользователя'; + $lang['strpassword'] = 'Пароль'; + $lang['strsuper'] = 'Суперпользователь?'; + $lang['strcreatedb'] = 'Создать базу данных?'; + $lang['strexpires'] = 'Срок действия'; + $lang['strsessiondefaults'] = 'Опции сеанса по умолчанию'; + $lang['strnousers'] = 'Нет таких пользователей.'; + $lang['struserupdated'] = 'Пользователь обновлен.'; + $lang['struserupdatedbad'] = 'Обновление пользователя прервано.'; + $lang['strshowallusers'] = 'Показать всех пользователей'; + $lang['strcreateuser'] = 'Создать пользователя'; + $lang['struserneedsname'] = 'Вы должны ввести имя пользователя.'; + $lang['strusercreated'] = 'Пользователь создан.'; + $lang['strusercreatedbad'] = 'Создание пользователя прервано.'; + $lang['strconfdropuser'] = 'Вы уверены, что хотите удалить пользователя "%s"?'; + $lang['struserdropped'] = 'Пользователь удален.'; + $lang['struserdroppedbad'] = 'Удаление пользователя прервано.'; + $lang['straccount'] = 'Аккаунт'; + $lang['strchangepassword'] = 'Изменить пароль'; + $lang['strpasswordchanged'] = 'Пароль изменен.'; + $lang['strpasswordchangedbad'] = 'Изменение пароля прервано.'; + $lang['strpasswordshort'] = 'Пароль слишком короткий.'; + $lang['strpasswordconfirm'] = 'Пароль не соответствует подтверждению.'; + + // Groups + $lang['strgroup'] = 'Группа'; + $lang['strgroups'] = 'Группы'; + $lang['strshowallgroups'] = 'Показать все группы'; + $lang['strnogroup'] = 'Группа не обнаружена.'; + $lang['strnogroups'] = 'Ни одной группы не найдено.'; + $lang['strcreategroup'] = 'Создать группу'; + $lang['strgroupneedsname'] = 'Вам необходимо указать название группы.'; + $lang['strgroupcreated'] = 'Группа создана.'; + $lang['strgroupcreatedbad'] = 'Создание группы прервано.'; + $lang['strconfdropgroup'] = 'Вы уверены, что хотите удалить группу "%s"?'; + $lang['strgroupdropped'] = 'Группа удалена.'; + $lang['strgroupdroppedbad'] = 'Удаление группы прервано.'; + $lang['strmembers'] = 'Участников'; + $lang['strmemberof'] = 'Добавить в роли'; + $lang['stradminmembers'] = 'Admin-участников'; + $lang['straddmember'] = 'Добавить участника'; + $lang['strmemberadded'] = 'Участник добавлен.'; + $lang['strmemberaddedbad'] = 'Добавление участника прервано.'; + $lang['strdropmember'] = 'Удалить участника'; + $lang['strconfdropmember'] = 'Вы уверены, что хотите удалить участника "%s" из группы "%s"?'; + $lang['strmemberdropped'] = 'Участник удален.'; + $lang['strmemberdroppedbad'] = 'Удаление участника прервано.'; + + // Roles + $lang['strrole'] = 'Роль'; + $lang['strroles'] = 'Роли'; + $lang['strshowallroles'] = 'Показать все роли'; + $lang['strnoroles'] = 'Роли не найдены.'; + $lang['strinheritsprivs'] = 'Наследовать привилегии?'; + $lang['strcreaterole'] = 'Создать роль'; + $lang['strcancreaterole'] = 'Может создавать роли?'; + $lang['strrolecreated'] = 'Роль создана.'; + $lang['strrolecreatedbad'] = 'Создание роли прервано.'; + $lang['strrolealtered'] = 'Роль изменена.'; + $lang['strrolealteredbad'] = 'Изменение роли прервано.'; + $lang['strcanlogin'] = 'Может логиниться?'; + $lang['strconnlimit'] = 'Лимит соединений'; + $lang['strdroprole'] = 'Удалить роль'; + $lang['strconfdroprole'] = 'Вы действительно хотите удалить роль "%s"?'; + $lang['strroledropped'] = 'Роль удалена.'; + $lang['strroledroppedbad'] = 'Удаление роли прервано.'; + $lang['strnolimit'] = 'Без ограничений'; + $lang['strnever'] = 'Никогда'; + $lang['strroleneedsname'] = 'Вам необходимо определить имя роли.'; + + // Privileges + $lang['strprivilege'] = 'Привилегия'; + $lang['strprivileges'] = 'Привилегии'; + $lang['strnoprivileges'] = 'Объект не имеет привилегий.'; + $lang['strgrant'] = 'Усилить'; + $lang['strrevoke'] = 'Ослабить'; + $lang['strgranted'] = 'Привилегии изменены.'; + $lang['strgrantfailed'] = 'Изменение привилегий прервано.'; + $lang['strgrantbad'] = 'Вам необходимо указать хотя бы одного пользователя или группу и хотя бы одну привилегию.'; + $lang['strgrantor'] = 'Донор'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'База данных'; + $lang['strdatabases'] = 'Базы данных'; + $lang['strshowalldatabases'] = 'Показать все базы данных'; + $lang['strnodatabases'] = 'Ни одной базы данных не найдено.'; + $lang['strcreatedatabase'] = 'Создать базу данных'; + $lang['strdatabasename'] = 'Имя базы данных'; + $lang['strdatabaseneedsname'] = 'Вам необходимо присвоить имя Вашей базе данных.'; + $lang['strdatabasecreated'] = 'База данных создана.'; + $lang['strdatabasecreatedbad'] = 'Создание базы данных прервано.'; + $lang['strconfdropdatabase'] = 'Вы уверены, что хотите уничтожить базу данных "%s"?'; + $lang['strdatabasedropped'] = 'База данных уничтожена.'; + $lang['strdatabasedroppedbad'] = 'Уничтожение базы данных прервано.'; + $lang['strentersql'] = 'Введите SQL-запрос ниже:'; + $lang['strsqlexecuted'] = 'SQL-запрос выполнен.'; + $lang['strvacuumgood'] = 'Операция перестроения завершена.'; + $lang['strvacuumbad'] = 'Операция перестроения прервана.'; + $lang['stranalyzegood'] = 'Операция анализа завершена.'; + $lang['stranalyzebad'] = 'Операция анализа прервана.'; + $lang['strreindexgood'] = 'Переиндексация завершена.'; + $lang['strreindexbad'] = 'Переиндексация прервана.'; + $lang['strfull'] = 'Полностью'; + $lang['strfreeze'] = 'Заморозить'; + $lang['strforce'] = 'Принудительно'; + $lang['strsignalsent'] = 'Сигнал отправлен.'; + $lang['strsignalsentbad'] = 'Отправка сигнала прервана.'; + $lang['strallobjects'] = 'Все объекты'; + $lang['strdatabasealtered'] = 'База данных изменена.'; + $lang['strdatabasealteredbad'] = 'Изменение базы данных прервано.'; + $lang['strspecifydatabasetodrop'] = 'Вам необходимо указать как минимум одну базу данных для удаления.'; + $lang['strtemplatedb'] = 'Шаблон'; + $lang['strconfanalyzedatabase'] = 'Вы действительно хотите анализировать все таблицы в базе данных "%s"?'; + $lang['strconfvacuumdatabase'] = 'Вы действительно хотите перестроить все таблицы в базе данных "%s"?'; + $lang['strconfreindexdatabase'] = 'Вы действительно хотите перестроить индекс всех таблиц в базе данных "%s"?'; + $lang['strconfclusterdatabase'] = 'Вы действительно хотите кластеризовать все таблицы в базе данных "%s"?'; + + // Views + $lang['strview'] = 'Представление'; + $lang['strviews'] = 'Представления'; + $lang['strshowallviews'] = 'Показать все представления'; + $lang['strnoview'] = 'Представление не найдено.'; + $lang['strnoviews'] = 'Ни одного представления не найдено.'; + $lang['strcreateview'] = 'Создать представление'; + $lang['strviewname'] = 'Имя представления'; + $lang['strviewneedsname'] = 'Вам необходимо указать имя представления.'; + $lang['strviewneedsdef'] = 'Вам необходимо определить атрибуты представления.'; + $lang['strviewneedsfields'] = 'Вам необходимо определить атрибуты для выборки в ваше представление.'; + $lang['strviewcreated'] = 'Представление создано.'; + $lang['strviewcreatedbad'] = 'Создание представления прервано.'; + $lang['strconfdropview'] = 'Вы уверены, что хотите уничтожить представление "%s"?'; + $lang['strviewdropped'] = 'Представление уничтожено.'; + $lang['strviewdroppedbad'] = 'Уничтожение представления прервано.'; + $lang['strviewupdated'] = 'Представление обновлено.'; + $lang['strviewupdatedbad'] = 'Обновление представления прервано.'; + $lang['strviewlink'] = 'Связанные ключи'; + $lang['strviewconditions'] = 'Дополнительные условия'; + $lang['strcreateviewwiz'] = 'Создать представление помощником'; + $lang['strrenamedupfields'] = 'Переименовывать поля-дубликаты'; + $lang['strdropdupfields'] = 'Удалять поля-дубликаты'; + $lang['strerrordupfields'] = 'Ошибка при появлении полей-дубликатов'; + $lang['strviewaltered'] = 'Представление изменено.'; + $lang['strviewalteredbad'] = 'Изменение представления прервано.'; + $lang['strspecifyviewtodrop'] = 'Вам необходимо определить как минимум одно представление для удаления.'; + + // Sequences + $lang['strsequence'] = 'Последовательность'; + $lang['strsequences'] = 'Последовательности'; + $lang['strshowallsequences'] = 'Показать все последовательности'; + $lang['strnosequence'] = 'Последовательность не обнаружена.'; + $lang['strnosequences'] = 'Ни одной последовательности не найдено.'; + $lang['strcreatesequence'] = 'Создать последовательность'; + $lang['strlastvalue'] = 'Последнее значение'; + $lang['strincrementby'] = 'Увеличение на'; + $lang['strstartvalue'] = 'Начальное значение'; + $lang['strmaxvalue'] = 'Макс. величина'; + $lang['strminvalue'] = 'Мин. величина'; + $lang['strcachevalue'] = 'Размер кэша'; + $lang['strlogcount'] = 'Log Count'; + $lang['strcancycle'] = 'Может зацикливаться?'; + $lang['striscalled'] = 'Увеличит последнее значение после получения следующего значения (is_called)?'; + $lang['strsequenceneedsname'] = 'Вам необходимо указать имя последовательности.'; + $lang['strsequencecreated'] = 'Последовательность создана.'; + $lang['strsequencecreatedbad'] = 'Создание последовательности прервано.'; + $lang['strconfdropsequence'] = 'Вы уверены, что хотите уничтожить последовательность "%s"?'; + $lang['strsequencedropped'] = 'Последовательность уничтожена.'; + $lang['strsequencedroppedbad'] = 'Уничтожение последовательности прервано.'; + $lang['strsequencereset'] = 'Последовательность сброшена.'; + $lang['strsequenceresetbad'] = 'Сброс последовательности прерван.'; + $lang['strsequencealtered'] = 'Последовательность изменена.'; + $lang['strsequencealteredbad'] = 'Изменение последовательности прервано.'; + $lang['strsetval'] = 'Установить значение'; + $lang['strsequencesetval'] = 'Значение последовательности установлено.'; + $lang['strsequencesetvalbad'] = 'Изменение значения последовательности прервано.'; + $lang['strnextval'] = 'Инкрементировать значение'; + $lang['strsequencenextval'] = 'Значение последовательности инкрементировано.'; + $lang['strsequencenextvalbad'] = 'Инкрементирование значения последовательности прервано.'; + $lang['strspecifysequencetodrop'] = 'Вам необходимо указать как минимун одну последовательность для удаления.'; + + // Indexes + $lang['strindex'] = 'Индекс'; + $lang['strindexes'] = 'Индексы'; + $lang['strindexname'] = 'Имя индекса'; + $lang['strshowallindexes'] = 'Показать все индексы'; + $lang['strnoindex'] = 'Индекс не обнаружен.'; + $lang['strnoindexes'] = 'Ни одного индекса не найдено.'; + $lang['strcreateindex'] = 'Создать индекс'; + $lang['strtabname'] = 'Имя таблицы'; + $lang['strcolumnname'] = 'Имя атрибута'; + $lang['strindexneedsname'] = 'Вам необходимо указать имя индекса'; + $lang['strindexneedscols'] = 'Вам необходимо указать допустимое количество атрибутов.'; + $lang['strindexcreated'] = 'Индекс создан.'; + $lang['strindexcreatedbad'] = 'Создание индекса прервано.'; + $lang['strconfdropindex'] = 'Вы уверены, что хотите уничтожить индекс "%s"?'; + $lang['strindexdropped'] = 'Индекс уничтожен.'; + $lang['strindexdroppedbad'] = 'Уничтожение индекса прервано.'; + $lang['strkeyname'] = 'Имя ключа'; + $lang['struniquekey'] = 'Уникальный ключ'; + $lang['strprimarykey'] = 'Первичный ключ'; + $lang['strindextype'] = 'Вид индекса'; + $lang['strtablecolumnlist'] = 'Атрибутов в таблице'; + $lang['strindexcolumnlist'] = 'Атрибутов в индексе'; + $lang['strclusteredgood'] = 'Кластеризация завершена.'; + $lang['strclusteredbad'] = 'Кластеризация прервана.'; + $lang['strconcurrently'] = 'Без блокировки записи (CONCURRENTLY)'; + $lang['strnoclusteravailable'] = 'Таблица не кластеризуема по индексу.'; + + // Rules + $lang['strrules'] = 'Правила'; + $lang['strrule'] = 'Правило'; + $lang['strshowallrules'] = 'Показать все правила'; + $lang['strnorule'] = 'Правило не найдено.'; + $lang['strnorules'] = 'Ни одного правила не найдено.'; + $lang['strcreaterule'] = 'Создать правило'; + $lang['strrulename'] = 'Имя правила'; + $lang['strruleneedsname'] = 'Вам необходимо указать имя правила.'; + $lang['strrulecreated'] = 'Правило создано.'; + $lang['strrulecreatedbad'] = 'Создание правила прервано.'; + $lang['strconfdroprule'] = 'Вы уверены, что хотите уничтожить правило "%s" on "%s"?'; + $lang['strruledropped'] = 'Правило уничтожено.'; + $lang['strruledroppedbad'] = 'Уничтожение правила прервано.'; + + // Constraints + $lang['strconstraint'] = 'Ограничение'; + $lang['strconstraints'] = 'Ограничения'; + $lang['strshowallconstraints'] = 'Показать все ограничения'; + $lang['strnoconstraints'] = 'Ни одного ограничения не найдено.'; + $lang['strcreateconstraint'] = 'Создать ограничение'; + $lang['strconstraintcreated'] = 'Ограничение создано.'; + $lang['strconstraintcreatedbad'] = 'Создание ограничения прервано.'; + $lang['strconfdropconstraint'] = 'Вы уверены, что хотите уничтожить ограничение "%s" on "%s"?'; + $lang['strconstraintdropped'] = 'Ограничение уничтожено.'; + $lang['strconstraintdroppedbad'] = 'Уничтожение ограничения прервано.'; + $lang['straddcheck'] = 'Добавить проверку'; + $lang['strcheckneedsdefinition'] = 'Ограничение проверки нуждается в определении.'; + $lang['strcheckadded'] = 'Ограничение проверки добавлено.'; + $lang['strcheckaddedbad'] = 'Добавление ограничения проверки прервано.'; + $lang['straddpk'] = 'Добавить первичный ключ'; + $lang['strpkneedscols'] = 'Первичный ключ должен включать хотя бы один атрибут.'; + $lang['strpkadded'] = 'Первичный ключ добавлен.'; + $lang['strpkaddedbad'] = 'Добавление первичного ключа прервано.'; + $lang['stradduniq'] = 'Добавить уникальный ключ'; + $lang['struniqneedscols'] = 'Уникальный ключ должен включать хотя бы один атрибут.'; + $lang['struniqadded'] = 'Уникальный ключ добавлен.'; + $lang['struniqaddedbad'] = 'Добавление уникального ключа прервано.'; + $lang['straddfk'] = 'Добавить внешний ключ'; + $lang['strfkneedscols'] = 'Внешний ключ должен включать хотя бы один атрибут.'; + $lang['strfkneedstarget'] = 'Внешнему ключу необходимо указать целевую таблицу.'; + $lang['strfkadded'] = 'Внешний ключ добавлен.'; + $lang['strfkaddedbad'] = 'Добавление внешнего ключа прервано.'; + $lang['strfktarget'] = 'Целевая таблица'; + $lang['strfkcolumnlist'] = 'Атрибуты в ключе'; + $lang['strondelete'] = 'при удалении'; + $lang['stronupdate'] = 'при обновлении'; + + // Functions + $lang['strfunction'] = 'Функция'; + $lang['strfunctions'] = 'Функции'; + $lang['strshowallfunctions'] = 'Показать все функции'; + $lang['strnofunction'] = 'Функция не обнаружена.'; + $lang['strnofunctions'] = 'Ни одной функции не найдено.'; + $lang['strcreateplfunction'] = 'Создать SQL/PL функцию'; + $lang['strcreateinternalfunction'] = 'Создать внутреннюю функцию'; + $lang['strcreatecfunction'] = 'Создать функцию на языке C'; + $lang['strfunctionname'] = 'Имя функции'; + $lang['strreturns'] = 'Возвращаемое значение'; + $lang['strproglanguage'] = 'Язык'; + $lang['strfunctionneedsname'] = 'Вам необходимо указать имя функции.'; + $lang['strfunctionneedsdef'] = 'Вам необходимо определить функцию.'; + $lang['strfunctioncreated'] = 'Функция создана.'; + $lang['strfunctioncreatedbad'] = 'Создание функции прервано.'; + $lang['strconfdropfunction'] = 'Вы уверены, что хотите уничтожить функцию "%s"?'; + $lang['strfunctiondropped'] = 'Функция уничтожена.'; + $lang['strfunctiondroppedbad'] = 'Уничтожение функции прервано.'; + $lang['strfunctionupdated'] = 'Функция обновлена.'; + $lang['strfunctionupdatedbad'] = 'Обновление функции прервано.'; + $lang['strobjectfile'] = 'Объектный файл'; + $lang['strlinksymbol'] = 'Символ линковки (имя функции в C)'; + $lang['strarguments'] = 'Аргументы'; + $lang['strargmode'] = 'Режим'; + $lang['strargtype'] = 'Тип'; + $lang['strargadd'] = 'Добавить еще аргумент'; + $lang['strargremove'] = 'Удалить этот аргумент'; + $lang['strargnoargs'] = 'Эта функция не будет принимать аргументов.'; + $lang['strargenableargs'] = 'Включить передачу аргументов этой функции.'; + $lang['strargnorowabove'] = 'Необходима строка выше этой строки.'; + $lang['strargnorowbelow'] = 'Необходима строка ниже этой строки.'; + $lang['strargraise'] = 'Переместить вверх.'; + $lang['strarglower'] = 'Переместить вниз.'; + $lang['strargremoveconfirm'] = 'Вы действительно хотите удалить этот аргумент? Отменить удаление невозможно.'; + $lang['strfunctioncosting'] = 'Стоимости функции'; + $lang['strresultrows'] = 'Строк в результате'; + $lang['strexecutioncost'] = 'Стоимость исполнения'; + $lang['strspecifyfunctiontodrop'] = 'Вам необходимо указать как минимум одну функцию для удаления.'; + + // Triggers + $lang['strtrigger'] = 'Триггер'; + $lang['strtriggers'] = 'Триггеры'; + $lang['strshowalltriggers'] = 'Показать все триггеры'; + $lang['strnotrigger'] = 'Триггер не обнаружен.'; + $lang['strnotriggers'] = 'Ни одного триггера не найдено.'; + $lang['strcreatetrigger'] = 'Создать триггер'; + $lang['strtriggerneedsname'] = 'Вам необходимо указать имя триггера.'; + $lang['strtriggerneedsfunc'] = 'Вам необходимо определить функцию триггера.'; + $lang['strtriggercreated'] = 'Триггер создан.'; + $lang['strtriggercreatedbad'] = 'Создание триггера прервано.'; + $lang['strconfdroptrigger'] = 'Вы уверены, что хотите уничтожить триггер "%s" на "%s"?'; + $lang['strconfenabletrigger'] = 'Вы действительно хотите включить триггер "%s" на "%s"?'; + $lang['strconfdisabletrigger'] = 'Вы действительно хотите выключить триггер "%s" на "%s"?'; + $lang['strtriggerdropped'] = 'Триггер уничтожен.'; + $lang['strtriggerdroppedbad'] = 'Уничтожение триггера прервано.'; + $lang['strtriggerenabled'] = 'Триггер включен.'; + $lang['strtriggerenabledbad'] = 'Включение триггера прервано.'; + $lang['strtriggerdisabled'] = 'Триггер выключен.'; + $lang['strtriggerdisabledbad'] = 'Выключение триггера прервано.'; + $lang['strtriggeraltered'] = 'Триггер изменен.'; + $lang['strtriggeralteredbad'] = 'Изменение триггера прервано.'; + $lang['strforeach'] = 'Для каждого'; + + // Types + $lang['strtype'] = 'Тип данных'; + $lang['strtypes'] = 'Типы данных'; + $lang['strshowalltypes'] = 'Показать все типы данных'; + $lang['strnotype'] = 'Тип данных не обнаружен.'; + $lang['strnotypes'] = 'Ни одного типа данных не найдено.'; + $lang['strcreatetype'] = 'Создать тип данных'; + $lang['strcreatecomptype'] = 'Создать композитный тип'; + $lang['strcreateenumtype'] = 'Создать перечислимый тип'; + $lang['strtypeneedsfield'] = 'Вам необходимо указать как минимум одно поле.'; + $lang['strtypeneedsvalue'] = 'Вам необходимо указать как минимум одно значение.'; + $lang['strtypeneedscols'] = 'Вам необходимо указать корректное число полей.'; + $lang['strtypeneedsvals'] = 'Вам необходимо указать корректное число значений.'; + $lang['strinputfn'] = 'Функция ввода'; + $lang['stroutputfn'] = 'Функция вывода'; + $lang['strpassbyval'] = 'Передать по значению?'; + $lang['stralignment'] = 'Выравнивание'; + $lang['strelement'] = 'Элемент'; + $lang['strdelimiter'] = 'Разделитель'; + $lang['strstorage'] = 'Хранилище'; + $lang['strfield'] = 'Поле'; + $lang['strnumfields'] = 'Кол-во полей'; + $lang['strnumvalues'] = 'Кол-во значений'; + $lang['strtypeneedsname'] = 'Вам необходимо указать имя типа данных.'; + $lang['strtypeneedslen'] = 'Вам необходимо указать размер для типа данных.'; + $lang['strtypecreated'] = 'Тип данных создан.'; + $lang['strtypecreatedbad'] = 'Создание типа данных прервано.'; + $lang['strconfdroptype'] = 'Вы уверены, что хотите уничтожить тип данных "%s"?'; + $lang['strtypedropped'] = 'Тип данных уничтожен.'; + $lang['strtypedroppedbad'] = 'Уничтожение типа данных прервано.'; + $lang['strflavor'] = 'Тип'; + $lang['strbasetype'] = 'Базовый'; + $lang['strcompositetype'] = 'Композитный'; + $lang['strpseudotype'] = 'Псевдо'; + $lang['strenum'] = 'Перечислимый'; + $lang['strenumvalues'] = 'Перечислимые значения'; + + // Schemas + $lang['strschema'] = 'Схема'; + $lang['strschemas'] = 'Схемы'; + $lang['strshowallschemas'] = 'Показать все схемы'; + $lang['strnoschema'] = 'Схема не обнаружена.'; + $lang['strnoschemas'] = 'Ни одной схемы не найдено.'; + $lang['strcreateschema'] = 'Создать схему'; + $lang['strschemaname'] = 'Имя схемы'; + $lang['strschemaneedsname'] = 'Вам необходимо указать имя схемы.'; + $lang['strschemacreated'] = 'Схема создана.'; + $lang['strschemacreatedbad'] = 'Создание схемы прервано.'; + $lang['strconfdropschema'] = 'Вы уверены, что хотите уничтожить схему "%s"?'; + $lang['strschemadropped'] = 'Схема уничтожена.'; + $lang['strschemadroppedbad'] = 'Уничтожение схемы прервано.'; + $lang['strschemaaltered'] = 'Схема обновлена.'; + $lang['strschemaalteredbad'] = 'Обновление схемы прервано.'; + $lang['strsearchpath'] = 'Пути поиска в схемах'; + $lang['strspecifyschematodrop'] = 'Вам необходимо указать как минимум одну схему для удаления.'; + + // Reports + $lang['strreport'] = 'Отчет'; + $lang['strreports'] = 'Отчеты'; + $lang['strshowallreports'] = 'Показать все отчеты'; + $lang['strnoreports'] = 'Отчетов нет.'; + $lang['strcreatereport'] = 'Создать отчет'; + $lang['strreportdropped'] = 'Отчет уничтожен.'; + $lang['strreportdroppedbad'] = 'Уничтожение отчета прервано.'; + $lang['strconfdropreport'] = 'Вы уверены, что хотите уничтожить отчет "%s"?'; + $lang['strreportneedsname'] = 'Вам необходимо указать имя отчета.'; + $lang['strreportneedsdef'] = 'Вам необходимо указать SQL-запрос для Вашего отчета.'; + $lang['strreportcreated'] = 'Отчет сохранен.'; + $lang['strreportcreatedbad'] = 'Сохранение отчета прервано.'; + + // Domains + $lang['strdomain'] = 'Домен'; + $lang['strdomains'] = 'Домены'; + $lang['strshowalldomains'] = 'Показать все домены'; + $lang['strnodomains'] = 'Ни одного домена не найдено.'; + $lang['strcreatedomain'] = 'Создать домен'; + $lang['strdomaindropped'] = 'Домен удален.'; + $lang['strdomaindroppedbad'] = 'Удаление домена прервано.'; + $lang['strconfdropdomain'] = 'Вы уверены, что хотите удалить домен "%s"?'; + $lang['strdomainneedsname'] = 'Вам необходимо указать имя домена.'; + $lang['strdomaincreated'] = 'Домен создан.'; + $lang['strdomaincreatedbad'] = 'Создание домена прервано.'; + $lang['strdomainaltered'] = 'Домен изменен.'; + $lang['strdomainalteredbad'] = 'Изменение домена прервано.'; + + // Operators + $lang['stroperator'] = 'Оператор'; + $lang['stroperators'] = 'Операторы'; + $lang['strshowalloperators'] = 'Показать все операторы'; + $lang['strnooperator'] = 'Оператор не обнаружен.'; + $lang['strnooperators'] = 'Операторы не обнаружены.'; + $lang['strcreateoperator'] = 'Создать оператор'; + $lang['strleftarg'] = 'Тип левого аргумента'; + $lang['strrightarg'] = 'Тип правого аргумента'; + $lang['strcommutator'] = 'Преобразование'; + $lang['strnegator'] = 'Отрицание'; + $lang['strrestrict'] = 'Ослабление'; + $lang['strjoin'] = 'Объединение'; + $lang['strhashes'] = 'Хеширование'; + $lang['strmerges'] = 'Слияние'; + $lang['strleftsort'] = 'Сотировка по левому'; + $lang['strrightsort'] = 'Сотировка по правому'; + $lang['strlessthan'] = 'Меньше'; + $lang['strgreaterthan'] = 'Больше'; + $lang['stroperatorneedsname'] = 'Вам необходимо указать название оператора.'; + $lang['stroperatorcreated'] = 'Оператор создан'; + $lang['stroperatorcreatedbad'] = 'Создание оператора прервано.'; + $lang['strconfdropoperator'] = 'Вы уверены, что хотите уничтожить оператор "%s"?'; + $lang['stroperatordropped'] = 'Оператор удален.'; + $lang['stroperatordroppedbad'] = 'Удаление оператора прервано.'; + + // Casts + $lang['strcasts'] = 'Образцы'; + $lang['strnocasts'] = 'Образцов не найдено.'; + $lang['strsourcetype'] = 'Тип источника'; + $lang['strtargettype'] = 'Тип приемника'; + $lang['strimplicit'] = 'Неявный'; + $lang['strinassignment'] = 'В назначении'; + $lang['strbinarycompat'] = '(двоично совместимый)'; + + // Conversions + $lang['strconversions'] = 'Преобразование'; + $lang['strnoconversions'] = 'Преобразований не найдено.'; + $lang['strsourceencoding'] = 'Кодировка источника'; + $lang['strtargetencoding'] = 'Кодировка приемника'; + + // Languages + $lang['strlanguages'] = 'Языки'; + $lang['strnolanguages'] = 'Языков не найдено.'; + $lang['strtrusted'] = 'Проверено'; + + // Info + $lang['strnoinfo'] = 'Нет доступной информации.'; + $lang['strreferringtables'] = 'Ссылающиеся таблицы'; + $lang['strparenttables'] = 'Родительские таблицы'; + $lang['strchildtables'] = 'Дочерние таблицы'; + + // Aggregates + $lang['straggregate'] = 'Агрегатное выражение'; + $lang['straggregates'] = 'Агрегатные выражения'; + $lang['strnoaggregates'] = 'Агрегатных выражений не найдено.'; + $lang['stralltypes'] = '(Все типы)'; + $lang['strcreateaggregate'] = 'Создать агрегатное выражение'; + $lang['straggrbasetype'] = 'Входной тип данных'; + $lang['straggrsfunc'] = 'Функция смены состояний'; + $lang['straggrstype'] = 'Тип переменной состояния'; + $lang['straggrffunc'] = 'Финальная функция'; + $lang['straggrinitcond'] = 'Начальное условие'; + $lang['straggrsortop'] = 'Оператор сортировки'; + $lang['strconfdropaggregate'] = 'Вы действительно хотите удалить агрегатное выражение "%s"?'; + $lang['straggregatedropped'] = 'Агрегатное выражение удалено.'; + $lang['straggregatedroppedbad'] = 'Удаление агрегатного выражения прервано.'; + $lang['straggraltered'] = 'Агрегатное выражение изменено.'; + $lang['straggralteredbad'] = 'Изменение агрегатного выражения прервано.'; + $lang['straggrneedsname'] = 'Вам необходимо определить имя агрегатного выражения.'; + $lang['straggrneedsbasetype'] = 'Вам необходимо указать входной тип данных для агрегатного выражения.'; + $lang['straggrneedssfunc'] = 'Вам необходимо укакзать имя функции смены состояний для агрегатного выражения.'; + $lang['straggrneedsstype'] = 'Вам необходимо указать тип переменной состояния для агрегатного выражения.'; + $lang['straggrcreated'] = 'Агрегатное выражение создано.'; + $lang['straggrcreatedbad'] = 'Создание агрегатного выражения прервано.'; + $lang['straggrshowall'] = 'Показать все агрегатные выражения'; + + // Operator Classes + $lang['stropclasses'] = 'Классы операторов'; + $lang['strnoopclasses'] = 'Классов операторов не найдено.'; + $lang['straccessmethod'] = 'Метод доступа'; + + // Stats and performance + $lang['strrowperf'] = 'Представление записи'; + $lang['strioperf'] = 'Представление ввода/вывода'; + $lang['stridxrowperf'] = 'Представление индекса записи'; + $lang['stridxioperf'] = 'Представление индекса ввода/вывода'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Последовательный'; + $lang['strscan'] = 'Сканировать'; + $lang['strread'] = 'Читать'; + $lang['strfetch'] = 'Извлечь'; + $lang['strheap'] = 'Мусор'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST индекс'; + $lang['strcache'] = 'Кеш'; + $lang['strdisk'] = 'Диск'; + $lang['strrows2'] = 'Записи'; + + // Tablespaces + $lang['strtablespace'] = 'Табличное пространство'; + $lang['strtablespaces'] = 'Табличные пространства'; + $lang['strshowalltablespaces'] = 'Показать все табличные пространства'; + $lang['strnotablespaces'] = 'Табличные пространства не найдены.'; + $lang['strcreatetablespace'] = 'Создать табличное пространство'; + $lang['strlocation'] = 'Расположение'; + $lang['strtablespaceneedsname'] = 'Вам необходимо определить имя табличного пространства.'; + $lang['strtablespaceneedsloc'] = 'Вам необходимо определить директорию, в которой табличное пространство буде создано.'; + $lang['strtablespacecreated'] = 'Табличное пространство создано.'; + $lang['strtablespacecreatedbad'] = 'Создание табличного пространства прервано.'; + $lang['strconfdroptablespace'] = 'Вы действительно хотите удалить табличное пространство "%s"?'; + $lang['strtablespacedropped'] = 'Табличное пространство удалено.'; + $lang['strtablespacedroppedbad'] = 'Удаление табличного пространства прервано.'; + $lang['strtablespacealtered'] = 'Табличное пространство изменено.'; + $lang['strtablespacealteredbad'] = 'Изменение табличного пространства прервано.'; + + // Slony clusters + $lang['strcluster'] = 'Кластер'; + $lang['strnoclusters'] = 'Кластеры не найдены.'; + $lang['strconfdropcluster'] = 'Вы действительно хотите удалить кластер "%s"?'; + $lang['strclusterdropped'] = 'Кластер удален.'; + $lang['strclusterdroppedbad'] = 'Удаление кластера прервано.'; + $lang['strinitcluster'] = 'Инициализировать кластер'; + $lang['strclustercreated'] = 'Кластер инициализирован.'; + $lang['strclustercreatedbad'] = 'Инициализация кластера прервана.'; + $lang['strclusterneedsname'] = 'Вам необходимо определить имя кластера.'; + $lang['strclusterneedsnodeid'] = 'Вам необходимо указать ID для локальной ноды.'; + + // Slony nodes + $lang['strnodes'] = 'Ноды'; + $lang['strnonodes'] = 'Ноды не найдены.'; + $lang['strcreatenode'] = 'Создать ноду'; + $lang['strid'] = 'ID'; + $lang['stractive'] = 'Активна'; + $lang['strnodecreated'] = 'Нода создана.'; + $lang['strnodecreatedbad'] = 'Создание ноды прервано.'; + $lang['strconfdropnode'] = 'Вы действительно хотите удалить ноду "%s"?'; + $lang['strnodedropped'] = 'Нода удалена.'; + $lang['strnodedroppedbad'] = 'Удаление ноды прервано.'; + $lang['strfailover'] = 'Перехват управления при отказе'; + $lang['strnodefailedover'] = 'Ноде будет передано управление при отказе.'; + $lang['strnodefailedoverbad'] = 'Невозможно передать управление ноде при отказе.'; + $lang['strstatus'] = 'Статус'; + $lang['strhealthy'] = 'Исправно'; + $lang['stroutofsync'] = 'Рассинхронизовано'; + $lang['strunknown'] = 'Неизвестно'; + + // Slony paths + $lang['strpaths'] = 'Пути'; + $lang['strnopaths'] = 'Пути не найдены.'; + $lang['strcreatepath'] = 'Создать путь'; + $lang['strnodename'] = 'Имя ноды'; + $lang['strnodeid'] = 'ID ноды'; + $lang['strconninfo'] = 'Строка соединения'; + $lang['strconnretry'] = 'Секунд между попытками подключения'; + $lang['strpathneedsconninfo'] = 'Вам необходимо указать строку соединения для пути.'; + $lang['strpathneedsconnretry'] = 'Вам необходимо указать число секунд ожидания перед повторной попыткой подключения'; + $lang['strpathcreated'] = 'Путь создан.'; + $lang['strpathcreatedbad'] = 'Создание пути прервано.'; + $lang['strconfdroppath'] = 'Вы действительно хотите удалить путь "%s"?'; + $lang['strpathdropped'] = 'Путь удален.'; + $lang['strpathdroppedbad'] = 'Удаление пути прервано.'; + + // Slony listens + $lang['strlistens'] = 'Прослушивания'; + $lang['strnolistens'] = 'Прослушивания не найдены.'; + $lang['strcreatelisten'] = 'Создать прослушивание'; + $lang['strlistencreated'] = 'Прослушивание создано.'; + $lang['strlistencreatedbad'] = 'Создание прослушивания прервано.'; + $lang['strconfdroplisten'] = 'Вы действительно хотите удалить прослушивание "%s"?'; + $lang['strlistendropped'] = 'Прослушивание удалено.'; + $lang['strlistendroppedbad'] = 'Удаление прослушивания прервано.'; + + // Slony replication sets + $lang['strrepsets'] = 'Репликационные наборы'; + $lang['strnorepsets'] = 'Репликационных наборов не найдено.'; + $lang['strcreaterepset'] = 'Создать репликационный набор'; + $lang['strrepsetcreated'] = 'Репликационный набор создан.'; + $lang['strrepsetcreatedbad'] = 'Создание репликационного набора прервано.'; + $lang['strconfdroprepset'] = 'Вы действительно хотите удалить репликационный набор "%s"?'; + $lang['strrepsetdropped'] = 'Репликационный набор удален.'; + $lang['strrepsetdroppedbad'] = 'Удаление репликационного набора прервано.'; + $lang['strmerge'] = 'Слить'; + $lang['strmergeinto'] = 'Слить в'; + $lang['strrepsetmerged'] = 'Репликационные наборы слиты.'; + $lang['strrepsetmergedbad'] = 'Слияние репликационных наборов прервано.'; + $lang['strmove'] = 'Переместить'; + $lang['strneworigin'] = 'Новый источник'; + $lang['strrepsetmoved'] = 'Репликационный набор перемещен.'; + $lang['strrepsetmovedbad'] = 'Перемещение репликационного набора прервано.'; + $lang['strnewrepset'] = 'Новый репликационный набор'; + $lang['strlock'] = 'Заблокировать'; + $lang['strlocked'] = 'Заблокирован'; + $lang['strunlock'] = 'Разблокировать'; + $lang['strconflockrepset'] = 'Вы действительно хотите заблокировать репликационный набор "%s"?'; + $lang['strrepsetlocked'] = 'Репликационный набор заблокирован.'; + $lang['strrepsetlockedbad'] = 'Блокирование репликационного набора прервано.'; + $lang['strconfunlockrepset'] = 'Вы действительно хотите разблокировать репликационный набор "%s"?'; + $lang['strrepsetunlocked'] = 'Репликационный набор разблокирован.'; + $lang['strrepsetunlockedbad'] = 'Разблокирование репликационного набора прервано.'; + $lang['stronlyonnode'] = 'Только на ноде'; + $lang['strddlscript'] = 'Скрипт DDL'; + $lang['strscriptneedsbody'] = 'Вам необходимо предоставить скрипт для выполнения на всех нодах.'; + $lang['strscriptexecuted'] = 'DDL скрипт репликационного набора выполнен.'; + $lang['strscriptexecutedbad'] = 'Выполнение DLL скрипта репликационного набора прервано.'; + $lang['strtabletriggerstoretain'] = 'Следующие триггеры Slony НЕ выключит:'; + + // Slony tables in replication sets + $lang['straddtable'] = 'Добавить таблицу'; + $lang['strtableneedsuniquekey'] = 'Таблица для добавления должна иметь первичный или уникальный ключ.'; + $lang['strtableaddedtorepset'] = 'Таблица добавлена в репликационный набор.'; + $lang['strtableaddedtorepsetbad'] = 'Добавление таблицы в репликационный набор прервано.'; + $lang['strconfremovetablefromrepset'] = 'Вы действительно хотите удалить таблицу "%s" из репликационного набора "%s"?'; + $lang['strtableremovedfromrepset'] = 'Таблица удалена из репликационного набора.'; + $lang['strtableremovedfromrepsetbad'] = 'Удаление таблицы из репликационного набора прервано.'; + + // Slony sequences in replication sets + $lang['straddsequence'] = 'Добавить последовательность'; + $lang['strsequenceaddedtorepset'] = 'Последовательность добавлена в репликационный набор.'; + $lang['strsequenceaddedtorepsetbad'] = 'Добавление последовательности в репликационный набор прервано.'; + $lang['strconfremovesequencefromrepset'] = 'Вы действительно хотите удалить последовательность "%s" из репликационного набора "%s"?'; + $lang['strsequenceremovedfromrepset'] = 'Последовательность удалена из репликационного набора.'; + $lang['strsequenceremovedfromrepsetbad'] = 'Удаление последовательности из репликационного набора прервано.'; + + // Slony subscriptions + $lang['strsubscriptions'] = 'Подписки'; + $lang['strnosubscriptions'] = 'Подписки не найдены.'; + + // Miscellaneous + $lang['strtopbar'] = '%s выполняется на %s:%s -- Вы зарегистрированы как "%s"'; + $lang['strtimefmt'] = ' j-m-Y g:i'; + $lang['strhelp'] = 'Помощь'; + $lang['strhelpicon'] = '?'; + $lang['strhelppagebrowser'] = 'Просмотр страниц помощи'; + $lang['strselecthelppage'] = 'Выберете страницу помощи'; + $lang['strinvalidhelppage'] = 'Неправильная страница помощи.'; + $lang['strlogintitle'] = 'Вошли на %s'; + $lang['strlogoutmsg'] = 'Вышли из %s'; + $lang['strloading'] = 'Загрузка...'; + $lang['strerrorloading'] = 'Ошибка при загрузке'; + $lang['strclicktoreload'] = 'Щелкните для перезагрузки'; + + // Autovacuum + $lang['strautovacuum'] = 'Автоматическое перестроение'; + $lang['strturnedon'] = 'Включено'; + $lang['strturnedoff'] = 'Выключено'; + $lang['strenabled'] = 'Включено'; + $lang['strnovacuumconf'] = 'Конфигурация автоматического перестроения не найдена.'; + $lang['strvacuumbasethreshold'] = 'Базовый порог перестроения'; + $lang['strvacuumscalefactor'] = 'Масштабный множитель перестроения'; + $lang['stranalybasethreshold'] = 'Базовый порог анализа'; + $lang['stranalyzescalefactor'] = 'Масштабный множитель анализа'; + $lang['strvacuumcostdelay'] = 'Задержка при превышении стоимости перестроения'; + $lang['strvacuumcostlimit'] = 'Ограничение стоимости перестроения'; + $lang['strvacuumpertable'] = 'Установки автоматического перестроения по таблицам'; + $lang['straddvacuumtable'] = 'Добавить установки автоматического перестроения для таблицы'; + $lang['streditvacuumtable'] = 'Редактировать установки автоматического перестроения для таблицы %s'; + $lang['strdelvacuumtable'] = 'Удалить установки автоматического перестроения для таблицы %s?'; + $lang['strvacuumtablereset'] = 'Сброс установок автоматического перестроения для таблицы %s к значениям по умолчанию'; + $lang['strdelvacuumtablefail'] = 'Ошибка при удалении установок автоматического перестроения для таблицы %s'; + $lang['strsetvacuumtablesaved'] = 'Установки автоматического перестроения для таблицы %s сохранены.'; + $lang['strsetvacuumtablefail'] = 'Ошибка при сохранении установок автоматического перестроения %s.'; + $lang['strspecifydelvacuumtable'] = 'Вам необходимо указать таблицу, для которой вы хотите удалить установки автоматического перестроения.'; + $lang['strspecifyeditvacuumtable'] = 'Вам необходимо указать таблицу, для которой вы хотите редактировать установки автоматического перестроения.'; + $lang['strnotdefaultinred'] = 'Значения, отличные от значений по умолчанию, отмечены красным цветом.'; + + // Table-level Locks + $lang['strlocks'] = 'Блокировки'; + $lang['strtransaction'] = 'ID транзакции'; + $lang['strvirtualtransaction'] = 'ID виртуальной транзакции'; + $lang['strprocessid'] = 'ID процесса'; + $lang['strmode'] = 'Режим блокировки'; + $lang['strislockheld'] = 'Блокировка удерживается?'; + + // Prepared transactions + $lang['strpreparedxacts'] = 'Подготовленные транзакции'; + $lang['strxactid'] = 'ID транзакции'; + $lang['strgid'] = 'Глобальный ID'; + + // Fulltext search + $lang['strfulltext'] = 'Полнотекстовый поиск (FTS)'; + $lang['strftsconfig'] = 'Конфигурация FTS'; + $lang['strftsconfigs'] = 'Конфигурации'; + $lang['strftscreateconfig'] = 'Создать конфигурацию FTS'; + $lang['strftscreatedict'] = 'Создать словарь'; + $lang['strftscreatedicttemplate'] = 'Создать шаблон словаря'; + $lang['strftscreateparser'] = 'Создать парсер'; + $lang['strftsnoconfigs'] = 'Конфигурации FTS не найдены.'; + $lang['strftsconfigdropped'] = 'Конфигурация FTS удалена.'; + $lang['strftsconfigdroppedbad'] = 'Удаление конфигурации FTS прервано.'; + $lang['strconfdropftsconfig'] = 'Вы действительно хотите удалить конфигурацию FTS "%s"?'; + $lang['strconfdropftsdict'] = 'Вы действительно хотите удалить словарь FTS "%s"?'; + $lang['strconfdropftsmapping'] = 'Вы действительно хотите удалить правило "%s" конфигурации FTS "%s"?'; + $lang['strftstemplate'] = 'Шаблон'; + $lang['strftsparser'] = 'Парсер'; + $lang['strftsconfigneedsname'] = 'Вам необходимо определить имя конфигурации FTS.'; + $lang['strftsconfigcreated'] = 'Конфигурация FTS создана.'; + $lang['strftsconfigcreatedbad'] = 'Создание конфигурации FTS прервано.'; + $lang['strftsmapping'] = 'Правила'; + $lang['strftsdicts'] = 'Словари'; + $lang['strftsdict'] = 'Словарь'; + $lang['strftsemptymap'] = 'Конфигурация правил FTS пуста.'; + $lang['strftsconfigaltered'] = 'Конфигурация FTS изменена.'; + $lang['strftsconfigalteredbad'] = 'Изменение конфигурации FTS прервано.'; + $lang['strftsconfigmap'] = 'Конфигурация правил FTS'; + $lang['strftsparsers'] = 'Парсеры FTS'; + $lang['strftsnoparsers'] = 'Нет доступных парсеров FTS.'; + $lang['strftsnodicts'] = 'Нет доступных словарей FTS.'; + $lang['strftsdictcreated'] = 'Словарь FTS создан.'; + $lang['strftsdictcreatedbad'] = 'Создание словаря FTS прервано.'; + $lang['strftslexize'] = 'Функция преобразования токена в лексему (lexize)'; + $lang['strftsinit'] = 'Функция инициализации'; + $lang['strftsoptionsvalues'] = 'Опции и значения'; + $lang['strftsdictneedsname'] = 'Вам необходимо определить имя словаря FTS.'; + $lang['strftsdictdropped'] = 'Словарь FTS удален.'; + $lang['strftsdictdroppedbad'] = 'Удаление словаря FTS прервано.'; + $lang['strftsdictaltered'] = 'Словарь FTS изменен.'; + $lang['strftsdictalteredbad'] = 'Изменение словаря FTS прервано.'; + $lang['strftsaddmapping'] = 'Добавить новое правило'; + $lang['strftsspecifymappingtodrop'] = 'Вам необходимо указать как минимум одно правило для удаления.'; + $lang['strftsspecifyconfigtoalter'] = 'Вам необходимо указать конфигурацию FTS для изменения'; + $lang['strftsmappingdropped'] = 'Правило FTS удалено.'; + $lang['strftsmappingdroppedbad'] = 'Удаление правила FTS прервано.'; + $lang['strftsnodictionaries'] = 'Словари не найдены.'; + $lang['strftsmappingaltered'] = 'Правило FTS изменено.'; + $lang['strftsmappingalteredbad'] = 'Изменение правила FTS прервано.'; + $lang['strftsmappingadded'] = 'Правило FTS добавлено.'; + $lang['strftsmappingaddedbad'] = 'Добавление правила FTS прервано.'; + $lang['strftstabconfigs'] = 'Конфигурации'; + $lang['strftstabdicts'] = 'Словари'; + $lang['strftstabparsers'] = 'Парсеры'; + $lang['strftscantparsercopy'] = 'При создании конфигурации поиска нельзя указывать одновременно парсер и шаблон.'; +?> diff --git a/php/pgadmin/lang/russian.php b/php/pgadmin/lang/russian.php new file mode 100644 index 0000000..c2e69ee --- /dev/null +++ b/php/pgadmin/lang/russian.php @@ -0,0 +1,601 @@ +'; + $lang['strfirst'] = '<< .'; + $lang['strlast'] = '. >>'; + $lang['strfailed'] = ''; + $lang['strcreate'] = ''; + $lang['strcreated'] = ''; + $lang['strcomment'] = ''; + $lang['strlength'] = ''; + $lang['strdefault'] = ' '; + $lang['stralter'] = ''; + $lang['strok'] = 'OK'; + $lang['strcancel'] = ''; + $lang['strsave'] = ''; + $lang['strreset'] = ''; + $lang['strinsert'] = ''; + $lang['strselect'] = ''; + $lang['strdelete'] = ''; + $lang['strupdate'] = ''; + $lang['strreferences'] = ''; + $lang['stryes'] = ''; + $lang['strno'] = ''; + $lang['strtrue'] = ''; + $lang['strfalse'] = ''; + $lang['stredit'] = ''; + $lang['strcolumns'] = ''; + $lang['strrows'] = '(//)'; + $lang['strrowsaff'] = '(//) .'; + $lang['strobjects'] = '(/)'; + $lang['strexample'] = ' ..'; + $lang['strback'] = ''; + $lang['strqueryresults'] = ' '; + $lang['strshow'] = ''; + $lang['strempty'] = ''; + $lang['strlanguage'] = ''; + $lang['strencoding'] = ''; + $lang['strvalue'] = ''; + $lang['strunique'] = ''; + $lang['strprimary'] = ''; + $lang['strexport'] = ''; + $lang['strimport'] = ''; + $lang['strsql'] = 'SQL'; + $lang['strgo'] = ''; + $lang['stradmin'] = ''; + $lang['strvacuum'] = ''; + $lang['stranalyze'] = ''; + $lang['strclusterindex'] = ''; + $lang['strclustered'] = '?'; + $lang['strreindex'] = ' '; + $lang['strrun'] = ''; + $lang['stradd'] = ''; + $lang['strevent'] = ''; + $lang['strwhere'] = ''; + $lang['strinstead'] = ' '; + $lang['strwhen'] = ''; + $lang['strformat'] = ''; + $lang['strdata'] = ''; + $lang['strconfirm'] = ''; + $lang['strexpression'] = ''; + $lang['strellipsis'] = '...'; + $lang['strexpand'] = ''; + $lang['strcollapse'] = ''; + $lang['strexplain'] = ''; + $lang['strexplainanalyze'] = ' '; + $lang['strfind'] = ''; + $lang['stroptions'] = ''; + $lang['strrefresh'] = ''; + $lang['strdownload'] = ''; + $lang['strdownloadgzipped'] = ' gzip'; + $lang['strinfo'] = ''; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = ''; + $lang['strvariables'] = ''; + $lang['strprocess'] = ''; + $lang['strprocesses'] = ''; + $lang['strsetting'] = ''; + $lang['streditsql'] = ' SQL'; + $lang['strruntime'] = ' : %s '; + $lang['strpaginate'] = ' '; + $lang['struploadscript'] = ' SQL-:'; + $lang['strstarttime'] = ' '; + $lang['strfile'] = ''; + $lang['strfileimported'] = ' .'; + + // Error handling + $lang['strbadconfig'] = ' config.inc.php . config.inc.php-dist.'; + $lang['strnotloaded'] = ' PHP PostgreSQL. PHP, --with-pgsql configure.'; + $lang['strbadschema'] = ' .'; + $lang['strbadencoding'] = 'Failed to set client encoding in database.'; + $lang['strsqlerror'] = ' SQL:'; + $lang['strinstatement'] = ' :'; + $lang['strinvalidparam'] = ' .'; + $lang['strnodata'] = ' .'; + $lang['strnoobjects'] = ' .'; + $lang['strrownotunique'] = ' .'; + $lang['strnoreportsdb'] = ' . INSTALL.'; + $lang['strnouploads'] = ' .'; + $lang['strimporterror'] = ' .'; + $lang['strimporterrorline'] = ' %s.'; + + // Tables + $lang['strtable'] = ''; + $lang['strtables'] = ''; + $lang['strshowalltables'] = ' '; + $lang['strnotables'] = ' .'; + $lang['strnotable'] = ' .'; + $lang['strcreatetable'] = ' '; + $lang['strtablename'] = ' '; + $lang['strtableneedsname'] = ' .'; + $lang['strtableneedsfield'] = ' .'; + $lang['strtableneedscols'] = ' .'; + $lang['strtablecreated'] = ' .'; + $lang['strtablecreatedbad'] = ' .'; + $lang['strconfdroptable'] = ' , "%s"?'; + $lang['strtabledropped'] = ' .'; + $lang['strtabledroppedbad'] = ' .'; + $lang['strconfemptytable'] = ' , "%s"?'; + $lang['strtableemptied'] = ' .'; + $lang['strtableemptiedbad'] = ' .'; + $lang['strinsertrow'] = ' '; + $lang['strrowinserted'] = ' .'; + $lang['strrowinsertedbad'] = ' .'; + $lang['streditrow'] = ' '; + $lang['strrowupdated'] = ' .'; + $lang['strrowupdatedbad'] = ' .'; + $lang['strdeleterow'] = ' '; + $lang['strconfdeleterow'] = ' , ?'; + $lang['strrowdeleted'] = ' .'; + $lang['strrowdeletedbad'] = ' .'; + $lang['strsaveandrepeat'] = ' '; + $lang['strfield'] = ''; + $lang['strfields'] = ''; + $lang['strnumfields'] = '- '; + $lang['strfieldneedsname'] = ' '; + $lang['strselectallfields'] = ' '; + $lang['strselectneedscol'] = ' '; + $lang['strselectunary'] = ' .'; + $lang['straltercolumn'] = ' '; + $lang['strcolumnaltered'] = ' .'; + $lang['strcolumnalteredbad'] = ' .'; + $lang['strconfdropcolumn'] = ' , "%s" "%s"?'; + $lang['strcolumndropped'] = ' .'; + $lang['strcolumndroppedbad'] = ' .'; + $lang['straddcolumn'] = ' '; + $lang['strcolumnadded'] = ' .'; + $lang['strcolumnaddedbad'] = ' .'; + $lang['strdataonly'] = ' '; + $lang['strcascade'] = ''; + $lang['strtablealtered'] = ' .'; + $lang['strtablealteredbad'] = ' .'; + $lang['strdataonly'] = ' '; + $lang['strstructureonly'] = ' '; + $lang['strstructureanddata'] = ' '; + $lang['strtabbed'] = ' '; + $lang['strauto'] = ''; + + // Users + $lang['struser'] = ''; + $lang['strusers'] = ''; + $lang['strusername'] = ' '; + $lang['strpassword'] = ''; + $lang['strsuper'] = '?'; + $lang['strcreatedb'] = ' ?'; + $lang['strexpires'] = ' '; + $lang['strsessiondefaults'] = ' '; + $lang['strnousers'] = ' .'; + $lang['struserupdated'] = ' .'; + $lang['struserupdatedbad'] = ' .'; + $lang['strshowallusers'] = ' '; + $lang['strcreateuser'] = ' '; + $lang['struserneedsname'] = ' .'; + $lang['strusercreated'] = ' .'; + $lang['strusercreatedbad'] = ' .'; + $lang['strconfdropuser'] = ' , "%s"?'; + $lang['struserdropped'] = ' .'; + $lang['struserdroppedbad'] = ' .'; + $lang['straccount'] = ''; + $lang['strchangepassword'] = ' '; + $lang['strpasswordchanged'] = ' .'; + $lang['strpasswordchangedbad'] = ' .'; + $lang['strpasswordshort'] = ' .'; + $lang['strpasswordconfirm'] = ' .'; + + // Groups + $lang['strgroup'] = ''; + $lang['strgroups'] = ''; + $lang['strnogroup'] = ' .'; + $lang['strnogroups'] = ' .'; + $lang['strcreategroup'] = ' '; + $lang['strshowallgroups'] = ' '; + $lang['strgroupneedsname'] = ' .'; + $lang['strgroupcreated'] = ' .'; + $lang['strgroupcreatedbad'] = ' .'; + $lang['strconfdropgroup'] = ' , "%s"?'; + $lang['strgroupdropped'] = ' .'; + $lang['strgroupdroppedbad'] = ' .'; + $lang['strmembers'] = ''; + $lang['straddmember'] = ' '; + $lang['strmemberadded'] = ' .'; + $lang['strmemberaddedbad'] = ' .'; + $lang['strdropmember'] = ' '; + $lang['strconfdropmember'] = ' , "%s" "%s"?'; + $lang['strmemberdropped'] = ' .'; + $lang['strmemberdroppedbad'] = ' .'; + + // Privilges + $lang['strprivilege'] = ''; + $lang['strprivileges'] = ''; + $lang['strnoprivileges'] = ' .'; + $lang['strgrant'] = ''; + $lang['strrevoke'] = ''; + $lang['strgranted'] = ' .'; + $lang['strgrantfailed'] = ' .'; + $lang['strgrantbad'] = ' .'; + $lang['stralterprivs'] = ' '; + $lang['strgrantor'] = ''; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = ' '; + $lang['strdatabases'] = ' '; + $lang['strshowalldatabases'] = ' '; + $lang['strnodatabase'] = ' .'; + $lang['strnodatabases'] = ' .'; + $lang['strcreatedatabase'] = ' '; + $lang['strdatabasename'] = ' '; + $lang['strdatabaseneedsname'] = ' .'; + $lang['strdatabasecreated'] = ' .'; + $lang['strdatabasecreatedbad'] = ' .'; + $lang['strconfdropdatabase'] = ' , "%s"?'; + $lang['strdatabasedropped'] = ' .'; + $lang['strdatabasedroppedbad'] = ' .'; + $lang['strentersql'] = ' SQL- :'; + $lang['strsqlexecuted'] = 'SQL- .'; + $lang['strvacuumgood'] = ' .'; + $lang['strvacuumbad'] = ' .'; + $lang['stranalyzegood'] = ' .'; + $lang['stranalyzebad'] = ' .'; + $lang['strreindexgood'] = ' .'; + $lang['strreindexbad'] = ' .'; + $lang['strfull'] = ''; + $lang['strfreeze'] = ''; + $lang['strforce'] = ''; + + // Views + $lang['strview'] = ''; + $lang['strviews'] = ''; + $lang['strshowallviews'] = ' '; + $lang['strnoview'] = ' .'; + $lang['strnoviews'] = ' .'; + $lang['strcreateview'] = ' '; + $lang['strviewname'] = ' '; + $lang['strviewneedsname'] = ' .'; + $lang['strviewneedsdef'] = ' .'; + $lang['strviewneedsfields'] = ' .'; + $lang['strviewcreated'] = ' .'; + $lang['strviewcreatedbad'] = ' .'; + $lang['strconfdropview'] = ' , "%s"?'; + $lang['strviewdropped'] = ' .'; + $lang['strviewdroppedbad'] = ' .'; + $lang['strviewupdated'] = ' .'; + $lang['strviewupdatedbad'] = ' .'; + $lang['strviewlink'] = ' '; + $lang['strviewconditions'] = ' '; + $lang['strcreateviewwiz'] = ' '; + + // Sequences + $lang['strsequence'] = ''; + $lang['strsequences'] = ' '; + $lang['strshowallsequences'] = ' '; + $lang['strnosequence'] = ' .'; + $lang['strnosequences'] = ' .'; + $lang['strcreatesequence'] = ' '; + $lang['strlastvalue'] = ' '; + $lang['strincrementby'] = ' '; + $lang['strstartvalue'] = ' '; + $lang['strmaxvalue'] = '. '; + $lang['strminvalue'] = '. '; + $lang['strcachevalue'] = ' '; + $lang['strlogcount'] = 'Log Count'; + $lang['striscycled'] = '?'; + $lang['strsequenceneedsname'] = ' .'; + $lang['strsequencecreated'] = ' .'; + $lang['strsequencecreatedbad'] = ' .'; + $lang['strconfdropsequence'] = ' , "%s"?'; + $lang['strsequencedropped'] = ' .'; + $lang['strsequencedroppedbad'] = ' .'; + $lang['strsequencereset'] = ' .'; + $lang['strsequenceresetbad'] = ' .'; + + // Indexes + $lang['strindex'] = ''; + $lang['strindexes'] = ''; + $lang['strindexname'] = ' '; + $lang['strshowallindexes'] = ' '; + $lang['strnoindex'] = ' .'; + $lang['strnoindexes'] = ' .'; + $lang['strcreateindex'] = ' '; + $lang['strtabname'] = ' '; + $lang['strcolumnname'] = ' '; + $lang['strindexneedsname'] = ' '; + $lang['strindexneedscols'] = ' .'; + $lang['strindexcreated'] = ' .'; + $lang['strindexcreatedbad'] = ' .'; + $lang['strconfdropindex'] = ' , "%s"?'; + $lang['strindexdropped'] = ' .'; + $lang['strindexdroppedbad'] = ' .'; + $lang['strkeyname'] = ' '; + $lang['struniquekey'] = ' '; + $lang['strprimarykey'] = ' '; + $lang['strindextype'] = ' '; + $lang['strindexname'] = ' '; + $lang['strtablecolumnlist'] = ' '; + $lang['strindexcolumnlist'] = ' '; + $lang['strconfcluster'] = ' , "%s"?'; + $lang['strclusteredgood'] = ' .'; + $lang['strclusteredbad'] = ' .'; + + // Rules + $lang['strrules'] = ''; + $lang['strrule'] = ''; + $lang['strshowallrules'] = ' '; + $lang['strnorule'] = ' .'; + $lang['strnorules'] = ' .'; + $lang['strcreaterule'] = ' '; + $lang['strrulename'] = ' '; + $lang['strruleneedsname'] = ' .'; + $lang['strrulecreated'] = ' .'; + $lang['strrulecreatedbad'] = ' .'; + $lang['strconfdroprule'] = ' , "%s" on "%s"?'; + $lang['strruledropped'] = ' .'; + $lang['strruledroppedbad'] = ' .'; + + // Constraints + $lang['strconstraints'] = ''; + $lang['strshowallconstraints'] = ' '; + $lang['strnoconstraints'] = ' .'; + $lang['strcreateconstraint'] = ' '; + $lang['strconstraintcreated'] = ' .'; + $lang['strconstraintcreatedbad'] = ' .'; + $lang['strconfdropconstraint'] = ' , "%s" on "%s"?'; + $lang['strconstraintdropped'] = ' .'; + $lang['strconstraintdroppedbad'] = ' .'; + $lang['straddcheck'] = ' '; + $lang['strcheckneedsdefinition'] = ' .'; + $lang['strcheckadded'] = ' .'; + $lang['strcheckaddedbad'] = ' .'; + $lang['straddpk'] = ' '; + $lang['strpkneedscols'] = ' .'; + $lang['strpkadded'] = ' .'; + $lang['strpkaddedbad'] = ' .'; + $lang['stradduniq'] = ' '; + $lang['struniqneedscols'] = ' .'; + $lang['struniqadded'] = ' .'; + $lang['struniqaddedbad'] = ' .'; + $lang['straddfk'] = ' '; + $lang['strfkneedscols'] = ' .'; + $lang['strfkneedstarget'] = ' .'; + $lang['strfkadded'] = ' .'; + $lang['strfkaddedbad'] = ' .'; + $lang['strfktarget'] = ' '; + $lang['strfkcolumnlist'] = ' '; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + + // Functions + $lang['strfunction'] = ''; + $lang['strfunctions'] = ' '; + $lang['strshowallfunctions'] = ' '; + $lang['strnofunction'] = ' .'; + $lang['strnofunctions'] = ' .'; + $lang['strcreatefunction'] = ' '; + $lang['strfunctionname'] = ' '; + $lang['strreturns'] = ' '; + $lang['strarguments'] = ''; + $lang['strproglanguage'] = ' '; + $lang['strproglanguage'] = ''; + $lang['strfunctionneedsname'] = ' .'; + $lang['strfunctionneedsdef'] = ' .'; + $lang['strfunctioncreated'] = ' .'; + $lang['strfunctioncreatedbad'] = ' .'; + $lang['strconfdropfunction'] = ' , "%s"?'; + $lang['strfunctiondropped'] = ' .'; + $lang['strfunctiondroppedbad'] = ' .'; + $lang['strfunctionupdated'] = ' .'; + $lang['strfunctionupdatedbad'] = ' .'; + + // Triggers + $lang['strtrigger'] = ''; + $lang['strtriggers'] = ' '; + $lang['strshowalltriggers'] = ' '; + $lang['strnotrigger'] = ' .'; + $lang['strnotriggers'] = ' .'; + $lang['strcreatetrigger'] = ' '; + $lang['strtriggerneedsname'] = ' .'; + $lang['strtriggerneedsfunc'] = ' .'; + $lang['strtriggercreated'] = ' .'; + $lang['strtriggercreatedbad'] = ' .'; + $lang['strconfdroptrigger'] = ' , "%s" "%s"?'; + $lang['strtriggerdropped'] = ' .'; + $lang['strtriggerdroppedbad'] = ' .'; + $lang['strtriggeraltered'] = ' .'; + $lang['strtriggeralteredbad'] = ' .'; + + // Types + $lang['strtype'] = ' '; + $lang['strtypes'] = ' '; + $lang['strshowalltypes'] = ' '; + $lang['strnotype'] = ' .'; + $lang['strnotypes'] = ' .'; + $lang['strcreatetype'] = ' '; + $lang['strtypename'] = ' '; + $lang['strinputfn'] = ' '; + $lang['stroutputfn'] = ' '; + $lang['strpassbyval'] = ' ?'; + $lang['stralignment'] = ''; + $lang['strelement'] = ''; + $lang['strdelimiter'] = ''; + $lang['strstorage'] = 'Storage'; + $lang['strtypeneedsname'] = ' .'; + $lang['strtypeneedslen'] = ' .'; + $lang['strtypecreated'] = ' .'; + $lang['strtypecreatedbad'] = ' .'; + $lang['strconfdroptype'] = ' , "%s"?'; + $lang['strtypedropped'] = ' .'; + $lang['strtypedroppedbad'] = ' .'; + + // Schemas + $lang['strschema'] = ''; + $lang['strschemas'] = ''; + $lang['strshowallschemas'] = ' '; + $lang['strnoschema'] = ' .'; + $lang['strnoschemas'] = ' .'; + $lang['strcreateschema'] = ' '; + $lang['strschemaname'] = ' '; + $lang['strschemaneedsname'] = ' .'; + $lang['strschemacreated'] = ' .'; + $lang['strschemacreatedbad'] = ' .'; + $lang['strconfdropschema'] = ' , "%s"?'; + $lang['strschemadropped'] = ' .'; + $lang['strschemadroppedbad'] = ' .'; + $lang['strschemaaltered'] = ' .'; + $lang['strschemaalteredbad'] = ' .'; + + // Reports + $lang['strreport'] = ''; + $lang['strreports'] = ''; + $lang['strshowallreports'] = ' '; + $lang['strnoreports'] = ' .'; + $lang['strcreatereport'] = ' '; + $lang['strreportdropped'] = ' .'; + $lang['strreportdroppedbad'] = ' .'; + $lang['strconfdropreport'] = ' , "%s"?'; + $lang['strreportneedsname'] = ' .'; + $lang['strreportneedsdef'] = ' SQL- .'; + $lang['strreportcreated'] = ' .'; + $lang['strreportcreatedbad'] = ' .'; + + // Domains + $lang['strdomain'] = ''; + $lang['strdomains'] = ''; + $lang['strshowalldomains'] = ' '; + $lang['strnodomains'] = ' .'; + $lang['strcreatedomain'] = ' '; + $lang['strdomaindropped'] = ' .'; + $lang['strdomaindroppedbad'] = ' .'; + $lang['strconfdropdomain'] = ' , "%s"?'; + $lang['strdomainneedsname'] = ' .'; + $lang['strdomaincreated'] = ' .'; + $lang['strdomaincreatedbad'] = ' .'; + $lang['strdomainaltered'] = ' .'; + $lang['strdomainalteredbad'] = ' .'; + + // Operators + $lang['stroperator'] = ''; + $lang['stroperators'] = ''; + $lang['strshowalloperators'] = ' '; + $lang['strnooperator'] = ' .'; + $lang['strnooperators'] = ' .'; + $lang['strcreateoperator'] = ' '; + $lang['strleftarg'] = ' '; + $lang['strrightarg'] = ' '; + $lang['strcommutator'] = ''; + $lang['strnegator'] = ''; + $lang['strrestrict'] = ''; + $lang['strjoin'] = ''; + $lang['strhashes'] = ''; + $lang['strmerges'] = ''; + $lang['strleftsort'] = ' '; + $lang['strrightsort'] = ' '; + $lang['strlessthan'] = ''; + $lang['strgreaterthan'] = ''; + $lang['stroperatorneedsname'] = ' .'; + $lang['stroperatorcreated'] = ' '; + $lang['stroperatorcreatedbad'] = ' .'; + $lang['strconfdropoperator'] = ' , "%s"?'; + $lang['stroperatordropped'] = ' .'; + $lang['stroperatordroppedbad'] = ' .'; + + // Casts + $lang['strcasts'] = ''; + $lang['strnocasts'] = ' .'; + $lang['strsourcetype'] = ' '; + $lang['strtargettype'] = ' '; + $lang['strimplicit'] = ''; + $lang['strinassignment'] = ' '; + $lang['strbinarycompat'] = '( )'; + + // Conversions + $lang['strconversions'] = ''; + $lang['strnoconversions'] = ' .'; + $lang['strsourceencoding'] = ' '; + $lang['strtargetencoding'] = ' '; + + // Languages + $lang['strlanguages'] = ''; + $lang['strnolanguages'] = ' .'; + $lang['strtrusted'] = ''; + + // Info + $lang['strnoinfo'] = ' .'; + $lang['strreferringtables'] = ' '; + $lang['strparenttables'] = ' '; + $lang['strchildtables'] = ' '; + + // Aggregates + $lang['straggregates'] = ' '; + $lang['strnoaggregates'] = ' .'; + $lang['stralltypes'] = '( )'; + + // Operator Classes + $lang['stropclasses'] = ' '; + $lang['strnoopclasses'] = ' .'; + $lang['straccessmethod'] = ' '; + + // Stats and performance + $lang['strrowperf'] = ' '; + $lang['strioperf'] = ' /'; + $lang['stridxrowperf'] = ' '; + $lang['stridxioperf'] = ' /'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = ''; + $lang['strscan'] = ''; + $lang['strread'] = ''; + $lang['strfetch'] = ''; + $lang['strheap'] = ''; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST '; + $lang['strcache'] = ''; + $lang['strdisk'] = ''; + $lang['strrows2'] = ''; + + // Miscellaneous + $lang['strtopbar'] = '%s %s:%s -- "%s"'; + $lang['strtimefmt'] = ' j-m-Y g:i'; + $lang['strhelp'] = ''; + +?> diff --git a/php/pgadmin/lang/slovak.php b/php/pgadmin/lang/slovak.php new file mode 100644 index 0000000..014cdf8 --- /dev/null +++ b/php/pgadmin/lang/slovak.php @@ -0,0 +1,769 @@ +>'; + $lang['strfailed'] = 'Chyba.'; + $lang['strcreate'] = 'Vytvoriť'; + $lang['strcreated'] = 'Vytvorené'; + $lang['strcomment'] = 'Komentár'; + $lang['strlength'] = 'Dĺžka'; + $lang['strdefault'] = 'Predvolené'; + $lang['stralter'] = 'Zmeniť'; + $lang['strok'] = 'OK'; + $lang['strcancel'] = 'Zrušiť'; + $lang['strsave'] = 'Uložiť'; + $lang['strreset'] = 'Reset'; + $lang['strinsert'] = 'Vložiť'; + $lang['strselect'] = 'Vybrať'; + $lang['strdelete'] = 'Zmazať'; + $lang['strupdate'] = 'Aktualizovať'; + $lang['strreferences'] = 'Referencie'; + $lang['stryes'] = 'Áno'; + $lang['strno'] = 'Nie'; + $lang['strtrue'] = 'True'; + $lang['strfalse'] = 'False'; + $lang['stredit'] = 'Upraviť'; + $lang['strcolumn'] = 'Stĺpec'; + $lang['strcolumns'] = 'Stĺpce'; + $lang['strrows'] = 'riadky'; + $lang['strrowsaff'] = 'riadkov ovplyvnených.'; + $lang['strobjects'] = 'objekt(y)'; + $lang['strback'] = 'Späť'; + $lang['strqueryresults'] = 'Výsledky Dotazu'; + $lang['strshow'] = 'Ukázať'; + $lang['strempty'] = 'Vyprázdniť'; + $lang['strlanguage'] = 'Jazyk'; + $lang['strencoding'] = 'Kódovanie'; + $lang['strvalue'] = 'Hodnota'; + $lang['strunique'] = 'Unikátny'; + $lang['strprimary'] = 'Primárny'; + $lang['strexport'] = 'Exportovať'; + $lang['strimport'] = 'Import'; + $lang['strallowednulls'] = 'Povolený NULL znak'; + $lang['strbackslashn'] = '\N'; + $lang['strnull'] = 'Null'; + $lang['strnull'] = 'NULL (slovo)'; + $lang['stremptystring'] = 'Prázdny reťazec/pole'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = 'Admin'; + $lang['strvacuum'] = 'Vyčistiť'; + $lang['stranalyze'] = 'Analyzovať'; + $lang['strclusterindex'] = 'Cluster'; + $lang['strclustered'] = 'Clustered?'; + $lang['strreindex'] = 'Reindex'; + $lang['strrun'] = 'Spustiť'; + $lang['stradd'] = 'Pridať'; + $lang['strremove'] = 'Zmazať'; + $lang['strevent'] = 'Prípadne'; + $lang['strwhere'] = 'Kde'; + $lang['strinstead'] = 'Urobiť Namiesto'; + $lang['strwhen'] = 'Kedy'; + $lang['strformat'] = 'Formát'; + $lang['strdata'] = 'Dáta'; + $lang['strconfirm'] = 'Potvrdiť'; + $lang['strexpression'] = 'Výraz'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'Rozšíriť'; + $lang['strcollapse'] = 'Zbaliť'; + $lang['strexplain'] = 'Vysvetliť'; + $lang['strexplainanalyze'] = 'Vysvetliť Analyze'; + $lang['strfind'] = 'Nájsť'; + $lang['stroptions'] = 'Nastavenia'; + $lang['strrefresh'] = 'Obnoviť'; + $lang['strdownload'] = 'Download'; + $lang['strdownloadgzipped'] = 'Stiahnuť skomprimované pomocou gzip'; + $lang['strinfo'] = 'Info'; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = 'Viac'; + $lang['strvariables'] = 'Premenné'; + $lang['strprocess'] = 'Proces'; + $lang['strprocesses'] = 'Procesy'; + $lang['strsetting'] = 'Nastavenie'; + $lang['streditsql'] = 'Upraviť SQL'; + $lang['strruntime'] = 'Celkový beh: %s ms'; + $lang['strpaginate'] = 'Výsledky stránkovania'; + $lang['struploadscript'] = 'alebo uploadni SQL skript:'; + $lang['strstarttime'] = 'Čas štartu'; + $lang['strfile'] = 'Súbor'; + $lang['strfileimported'] = 'Súbor importovaný.'; + $lang['strtrycred'] = 'Použiť tieto hodnoty pre všetky hodnoty'; + + // Error handling + $lang['strnoframes'] = 'Táto aplikácia funguje najlapšie s prehliadačom, ktorý podporuje technológiu frame-ov, no môže byť použitý aj takým, ktorý to nepodporuje nasledovaním tohto odkazu:'; + $lang['strnoframeslink'] = 'Nepoužívať frame-y'; + $lang['strbadconfig'] = 'Tvoj config.inc.php je zastaralý. Musíš vygenerovať nový zo súboru config.inc.php-dist.'; + $lang['strnotloaded'] = 'Tvoje PHP nie je skompilované s potrebnou podporou databáz.'; + $lang['strpostgresqlversionnotsupported'] = 'Tvoja verzia PostgreSQL nie je podporovaná. Prosím aktualizuj ju na verziu %s alebo vyššiu.'; + $lang['strbadschema'] = 'Špecifikovaná chybná schéma.'; + $lang['strbadencoding'] = 'Nastavenie kódovania v databáze zlyhalo.'; + $lang['strsqlerror'] = 'SQL chyba:'; + $lang['strinstatement'] = 'Vo výraze:'; + $lang['strinvalidparam'] = 'Chybné parametre skriptu.'; + $lang['strnodata'] = 'Nenájdené žiadne záznamy.'; + $lang['strnoobjects'] = 'Nenájdené žiadne objekty.'; + $lang['strrownotunique'] = 'Žiadny unikátny identifikárot pre tento riadok.'; + $lang['strnoreportsdb'] = 'Nebola vytvorené report databáza. Prečítaj si INSTALL súbor s pokynmi.'; + $lang['strnouploads'] = 'Upload súborov je vypnutý.'; + $lang['strimporterror'] = 'Chyba Import-u.'; + $lang['strimporterror-fileformat'] = 'Chyba importu: Automatické určenie formátu súboru zlyhalo.'; + $lang['strimporterrorline'] = 'Chyba Import-u na riadku %s.'; + $lang['strimporterrorline-badcolumnnum'] = 'Chyba importu na riadku %s: Riadok nemá správny počet stĺpcov.'; + $lang['strimporterror-uploadedfile'] = 'Chyba importu: Súbor nemôže byť upload-nutý k serveru'; + $lang['strcannotdumponwindows'] = 'Dump komplexných tabuliek a schém nie je na platforme Windows podporovaný.'; + + // Tables + $lang['strtable'] = 'Tabuľka'; + $lang['strtables'] = 'Tabuľky'; + $lang['strshowalltables'] = 'Zobraziť Všetky Tabuľky'; + $lang['strnotables'] = 'Nenájdené žiadne tabuľky.'; + $lang['strnotable'] = 'Nenájdená žiadna tabuľka.'; + $lang['strcreatetable'] = 'Vytvoriť tabuľku'; + $lang['strtablename'] = 'Názov tabuľky'; + $lang['strtableneedsname'] = 'Musíš zadať názov pre tvoju tabuľku.'; + $lang['strtableneedsfield'] = 'Musíš špecifikovať aspoň jedno pole.'; + $lang['strtableneedscols'] = 'Tabuľky vyžadujú vyhovujúci počet stĺpcov.'; + $lang['strtablecreated'] = 'Tabuľka vytvorená.'; + $lang['strtablecreatedbad'] = 'Tabuľka nebola vytvorená.'; + $lang['strconfdroptable'] = 'Naozaj chceš odstrániť tabuľku "%s"?'; + $lang['strtabledropped'] = 'Tabuľka odstránená.'; + $lang['strtabledroppedbad'] = 'Tabuľka nebola odstránená.'; + $lang['strconfemptytable'] = 'Si si istý, že chceš vyprázdniť tabuľku "%s"?'; + $lang['strtableemptied'] = 'Tabuľka vyprázdnená.'; + $lang['strtableemptiedbad'] = 'Tabuľka nebola vyprázdnená.'; + $lang['strinsertrow'] = 'Vložiť Riadok'; + $lang['strrowinserted'] = 'Riadok vložený.'; + $lang['strrowinsertedbad'] = 'Riadok nebol vložený.'; + $lang['strrowduplicate'] = 'Vloženie riadku zlyhalo, pokus o duplikátny insert.'; + $lang['streditrow'] = 'Upraviť Riadok'; + $lang['strrowupdated'] = 'Riadok upravený.'; + $lang['strrowupdatedbad'] = 'Riadok nebol upravený.'; + $lang['strdeleterow'] = 'Zmazať Riadok'; + $lang['strconfdeleterow'] = 'Si si istý, že chceš zmazať tento riadok?'; + $lang['strrowdeleted'] = 'Riadok zmazaný.'; + $lang['strrowdeletedbad'] = 'Riadok nebol zmazaný.'; + $lang['strinsertandrepeat'] = 'Vložiť & Zopakovať'; + $lang['strnumcols'] = 'Počet stĺpcov'; + $lang['strcolneedsname'] = 'Musíš zadať názov pre tvoj stĺpec'; + $lang['strselectallfields'] = 'Vybrať všetky polia'; + $lang['strselectneedscol'] = 'Musíš označiť aspoň jeden stĺpec.'; + $lang['strselectunary'] = 'Unárne operátory nemôžu mať hodnoty.'; + $lang['straltercolumn'] = 'Zmeniť Stĺpec'; + $lang['strcolumnaltered'] = 'Stĺpec zmenený.'; + $lang['strcolumnalteredbad'] = 'Stĺpec nebol zmenený.'; + $lang['strconfdropcolumn'] = 'Naozaj chceš zmazať stĺpec "%s" z tabuľky "%s"?'; + $lang['strcolumndropped'] = 'Stĺpec zmenený.'; + $lang['strcolumndroppedbad'] = 'Stĺpec nebol zmazaný.'; + $lang['straddcolumn'] = 'Pridať Stĺpec'; + $lang['strcolumnadded'] = 'Stĺpec pridaný.'; + $lang['strcolumnaddedbad'] = 'Stĺpec nebol pridaný.'; + $lang['strcascade'] = 'CASCADE'; + $lang['strtablealtered'] = 'Tabuľka zmenená.'; + $lang['strtablealteredbad'] = 'Tabuľka nebola zmenená.'; + $lang['strdataonly'] = 'Iba Dáta'; + $lang['strstructureonly'] = 'Iba Štruktúra'; + $lang['strstructureanddata'] = 'Štruktúra a Dáta'; + $lang['strtabbed'] = 'Tabbed'; + $lang['strauto'] = 'Auto'; + $lang['strconfvacuumtable'] = 'Naozaj chceš vyčistiť "%s"?'; + $lang['strestimatedrowcount'] = 'Odhadovaný počet riadkov'; + + // Users + $lang['struser'] = 'Používateľ'; + $lang['strusers'] = 'Používatelia'; + $lang['strusername'] = 'Meno používateľa'; + $lang['strpassword'] = 'Heslo'; + $lang['strsuper'] = 'Superuser?'; + $lang['strcreatedb'] = 'Vytváranie DB?'; + $lang['strexpires'] = 'Expiruje'; + $lang['strsessiondefaults'] = 'Sessions defaults'; //s cim to tak suvis??:) + $lang['strnousers'] = 'Nenájdení žiadni používatelia.'; + $lang['struserupdated'] = 'Požívatelia zmenení.'; + $lang['struserupdatedbad'] = 'Použivatelia neboli zmenení.'; + $lang['strshowallusers'] = 'Zobraziť Všetkých Používateľov'; + $lang['strcreateuser'] = 'Vytvoriť používateľa'; + $lang['struserneedsname'] = 'Musíš zadať meno pre svojho používateľa.'; + $lang['strusercreated'] = 'Používateľ vytvorený.'; + $lang['strusercreatedbad'] = 'Používateľ nebol vytvorený.'; + $lang['strconfdropuser'] = 'Naozaj chceš zmazať používateľa "%s"?'; + $lang['struserdropped'] = 'Používateľ zmazaný.'; + $lang['struserdroppedbad'] = 'Používateľ nebol zmazaný.'; + + // Groups + $lang['straccount'] = 'Konto'; + $lang['strchangepassword'] = 'Zmeniť Heslo'; + $lang['strpasswordchanged'] = 'Heslo zmenené.'; + $lang['strpasswordchangedbad'] = 'Heslo NEBOLO zmenené.'; + $lang['strpasswordshort'] = 'Heslo je príliš krátke.'; + $lang['strpasswordconfirm'] = 'Heslo sa nezhoduje so zadaným overovacím heslom.'; + + // Groups + $lang['strgroup'] = 'Skupina'; + $lang['strgroups'] = 'Skupiny'; + $lang['strnogroup'] = 'Skupina nenájdená.'; + $lang['strnogroups'] = 'Žiadne skupiny nenájdené.'; + $lang['strcreategroup'] = 'Vytvoriť Skupinu'; + $lang['strshowallgroups'] = 'Zobraziť Všetky Skupiny'; + $lang['strgroupneedsname'] = 'Musíš zadať názov pre tvoju skupinu.'; + $lang['strgroupcreated'] = 'Skupina Vytvorená.'; + $lang['strgroupcreatedbad'] = 'Skupina nebola vytvorená.'; + $lang['strconfdropgroup'] = 'Naozaj chceš zmazať skupinu "%s"?'; + $lang['strgroupdropped'] = 'Skupina zmazaná.'; + $lang['strgroupdroppedbad'] = 'Skupina nebola zmazaná.'; + $lang['strmembers'] = 'Členovia'; + $lang['straddmember'] = 'Pridať člena'; + $lang['strmemberadded'] = 'Člen pridaný.'; + $lang['strmemberaddedbad'] = 'Člen nebol pridaný.'; + $lang['strdropmember'] = 'Zmazať člena'; + $lang['strconfdropmember'] = 'Naozaj chceš zmazať cľena "%s" zo skupiny "%s"?'; + $lang['strmemberdropped'] = 'Člen zmazaný.'; + $lang['strmemberdroppedbad'] = 'Člen nebol zmazaný.'; + + // Privilges + $lang['strprivilege'] = 'Privilégiá'; + $lang['strprivileges'] = 'Privilégiá'; + $lang['strnoprivileges'] = 'Tento objekt nemá privilégiá.'; + $lang['strgrant'] = 'Povoliť'; + $lang['strrevoke'] = 'Odobrať'; + $lang['strgranted'] = 'Privilégiá pridané.'; + $lang['strgrantfailed'] = 'Privilégiá neboli pridané.'; + $lang['strgrantbad'] = 'Musíš špecifikovat aspoň jedného užívateľa/skupinu a aspoň jedno privilégium.'; + $lang['strgrantor'] = 'Prideľovateľ'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'Databáza'; + $lang['strdatabases'] = 'Databázy'; + $lang['strshowalldatabases'] = 'Zobraziť všetky databázy'; + $lang['strnodatabase'] = 'Nenájdená žiadna Databáza.'; + $lang['strnodatabases'] = 'Nenájdené žiadne Databázy.'; + $lang['strcreatedatabase'] = 'Vytvoriť databázu'; + $lang['strdatabasename'] = 'Názov databázy'; + $lang['strdatabaseneedsname'] = 'Musíš zadať názov pre tvoju databázu.'; + $lang['strdatabasecreated'] = 'Databáza vytvorená.'; + $lang['strdatabasecreatedbad'] = 'Databáza nebola vytvorená.'; + $lang['strconfdropdatabase'] = 'Naozaj chceš zmazať databázu "%s"?'; + $lang['strdatabasedropped'] = 'Databáze zmazaná.'; + $lang['strdatabasedroppedbad'] = 'Databáza nebola zmazaná.'; + $lang['strentersql'] = 'Vložiť SQL dotaz:'; + $lang['strsqlexecuted'] = 'SQL dotaz vykonaný.'; + $lang['strvacuumgood'] = 'Vyčistenie kompletné.'; + $lang['strvacuumbad'] = 'Vyčistnie zlyhalo.'; + $lang['stranalyzegood'] = 'Analyzovanie kompletné.'; + $lang['stranalyzebad'] = 'Analyzovanie zlyhalo.'; + $lang['strreindexgood'] = 'Reindex hotový.'; + $lang['strreindexbad'] = 'Reindex zlyhal.'; + $lang['strfull'] = 'Full'; //todo - konzultovat!! + $lang['strfreeze'] = 'Freeze'; //deto + $lang['strforce'] = 'Force'; // -||- + $lang['strsignalsent'] = 'Signál odoslaný.'; + $lang['strsignalsentbad'] = 'Odoslanie signálu zlyhalo.'; + $lang['strallobjects'] = 'Všetky objekty'; + $lang['strdatabasealtered'] = 'Databáza zmenená.'; + $lang['strdatabasealteredbad'] = 'Databáza nebola zmenená.'; + + // Views + $lang['strview'] = 'Náhľad'; + $lang['strviews'] = 'Náhľady'; + $lang['strshowallviews'] = 'Zobraziť Všetky Náhľady'; + $lang['strnoview'] = 'Nenájdený žiadny náhľad.'; + $lang['strnoviews'] = 'Nenájdené žiadne náhľady.'; + $lang['strcreateview'] = 'Vytvoriť Náhľad'; + $lang['strviewname'] = 'Názov náhľadu'; + $lang['strviewneedsname'] = 'Musíš zadať názov pre tvoj náhľad.'; + $lang['strviewneedsdef'] = 'Musíš zadať definíciu pre tvoj náhľad.'; + $lang['strviewneedsfields'] = 'Mušíš zvoliť stĺpce, ktoré chceš mať vo svojom náhľade.'; + $lang['strviewcreated'] = 'Náhľad vytvorený.'; + $lang['strviewcreatedbad'] = 'Náhľad nebol vytvorený.'; + $lang['strconfdropview'] = 'Naozaj chceš zmazať náhľad "%s"?'; + $lang['strviewdropped'] = 'Náhľad zmazaný.'; + $lang['strviewdroppedbad'] = 'Náhľad nebol zmazaný.'; + $lang['strviewupdated'] = 'Náhľad upravený.'; + $lang['strviewupdatedbad'] = 'Náhľad nebol upravený.'; + $lang['strviewlink'] = 'Linkujúce Kľúče'; + $lang['strviewconditions'] = 'Doplňujúce Podmienky'; + $lang['strcreateviewwiz'] = 'Vytvoriť náhľad cez \"pomocníka\"'; + + // Sequences + $lang['strsequence'] = 'Sekvencia'; + $lang['strsequences'] = 'Sekvencie'; + $lang['strshowallsequences'] = 'Zobraziť Všetky Sekvencie'; + $lang['strnosequence'] = 'Nenájdená žiadna sekvencia.'; + $lang['strnosequences'] = 'nenájdené žiadne sekvencie.'; + $lang['strcreatesequence'] = 'Vytvoriť Sekvenciu'; + $lang['strlastvalue'] = 'Posledná Hodnota'; + $lang['strincrementby'] = 'Inkrementovať od'; + $lang['strstartvalue'] = 'Start Hodnota'; + $lang['strmaxvalue'] = 'Max Hodnota'; + $lang['strminvalue'] = 'Min Hodnota'; + $lang['strcachevalue'] = 'Cache Hodnota'; + $lang['strlogcount'] = 'Log Súčet'; + $lang['striscycled'] = 'Je Cycled?'; + $lang['strsequenceneedsname'] = 'Musíš zadať názov pre tvoju sekvenciu.'; + $lang['strsequencecreated'] = 'Sekvencia vytvorená.'; + $lang['strsequencecreatedbad'] = 'Sekvencia nebola vytvorená.'; + $lang['strconfdropsequence'] = 'Naozaj chceš zmazať sekvenciu "%s"?'; + $lang['strsequencedropped'] = 'Sekvencia zmazaná.'; + $lang['strsequencedroppedbad'] = 'Sekvencia nebola zmazaná.'; + $lang['strsequencereset'] = 'Sekvencia resetovaná.'; + $lang['strsequenceresetbad'] = 'Sekvencia nebola resetovaná.'; + + // Indexes + $lang['strindex'] = 'Index'; + $lang['strindexes'] = 'Indexy'; + $lang['strindexname'] = 'Názov Indexu'; + $lang['strshowallindexes'] = 'Zobraziť Všetky Indexy'; + $lang['strnoindex'] = 'Nenájdený žiadny index.'; + $lang['strnoindexes'] = 'Nenájdené žiadne indexy.'; + $lang['strcreateindex'] = 'Vytvoriť Index'; + $lang['strtabname'] = 'Tab Meno'; + $lang['strcolumnname'] = 'Názov ståpca'; + $lang['strindexneedsname'] = 'Musíš zadať názov pre tvoj index'; + $lang['strindexneedscols'] = 'Index vyžaduje vyhovujúci počet stĺpcov.'; + $lang['strindexcreated'] = 'Index vytvorený'; + $lang['strindexcreatedbad'] = 'Index nebol vytvorený.'; + $lang['strconfdropindex'] = 'Naozaj chceš zmazať index "%s"?'; + $lang['strindexdropped'] = 'Index zmazaný.'; + $lang['strindexdroppedbad'] = 'Index nebol zmazaný.'; + $lang['strkeyname'] = 'Názov Kľúču'; + $lang['struniquekey'] = 'Unikátny Kľúč'; + $lang['strprimarykey'] = 'Primárny Kľúč'; + $lang['strindextype'] = 'Typ indexu'; + $lang['strtablecolumnlist'] = 'Stĺpce v Tabuľke'; + $lang['strindexcolumnlist'] = 'Stľpce v Indexe'; + $lang['strconfcluster'] = 'Naozaj chceš vytvoriť cluster "%s"?'; + $lang['strclusteredgood'] = 'Cluster hotový.'; + $lang['strclusteredbad'] = 'Cluster nebol vytvorený.'; + + // Rules + $lang['strrules'] = 'Pravidlá'; + $lang['strrule'] = 'Pravidlo'; + $lang['strshowallrules'] = 'Zobraziť Všetky Pravidlá'; + $lang['strnorule'] = 'Nenájdené žiadne pravidlo.'; + $lang['strnorules'] = 'Nenájdené žiadne pravidlá.'; + $lang['strcreaterule'] = 'Vytvoriť pravidlo'; + $lang['strrulename'] = 'Názov pravidla'; + $lang['strruleneedsname'] = 'Musíš zadať názov pre tvoje pravidlo.'; + $lang['strrulecreated'] = 'Pravidlo vytvorené.'; + $lang['strrulecreatedbad'] = 'Pravidlo nebolo vytvorené.'; + $lang['strconfdroprule'] = 'Naozaj chceš zmazať pravidlo "%s" na "%s"?'; + $lang['strruledropped'] = 'Pravidlo zmazané.'; + $lang['strruledroppedbad'] = 'Pravidlo nebolo zmazané.'; + + // Constraints + $lang['strconstraint'] = 'Obmedzenie'; + $lang['strconstraints'] = 'Obmedzenia'; + $lang['strshowallconstraints'] = 'Zobraziť Všetky Obmedzenia'; + $lang['strnoconstraints'] = 'Nenájdené žiadne obmedzenie.'; + $lang['strcreateconstraint'] = 'Vytvoriť Obmedzenie'; + $lang['strconstraintcreated'] = 'Obmedzenie vytvorené.'; + $lang['strconstraintcreatedbad'] = 'Obmedzenie nebolo vytvorené.'; + $lang['strconfdropconstraint'] = 'Naozaj chceš zmazať obmedzenie "%s" na "%s"?'; + $lang['strconstraintdropped'] = 'Obmedzenie zmazané.'; + $lang['strconstraintdroppedbad'] = 'Obmedzenie nebolo zmazané.'; + $lang['straddcheck'] = 'Pridať Overovanie'; + $lang['strcheckneedsdefinition'] = 'Overovanie Obmedzenia vyžaduje jeho definovanie.'; + $lang['strcheckadded'] = 'Overovanie obmedzenia pridané.'; + $lang['strcheckaddedbad'] = 'Overovanie obmedzenia nebolo pridané.'; + $lang['straddpk'] = 'Pridať Primárny Kľúč'; + $lang['strpkneedscols'] = 'Primárny kľúč vyžaduje aspoň jeden stĺpec.'; + $lang['strpkadded'] = 'Primárny kľúč pridaný.'; + $lang['strpkaddedbad'] = 'Primárny kľúč nebol pridaný.'; + $lang['stradduniq'] = 'Pridať Unikátny Kľúč'; + $lang['struniqneedscols'] = 'Unikátny kľúč vyžaduje aspoň jeden stĺpec.'; + $lang['struniqadded'] = 'Unikátny kľúč pridaný.'; + $lang['struniqaddedbad'] = 'Unikátny kľúč nebol pridaný.'; + $lang['straddfk'] = 'Pridať Cudzí Kľúč'; + $lang['strfkneedscols'] = 'Cudzí kľúč vyžaduje aspoň jeden stĺpec.'; + $lang['strfkneedstarget'] = 'Cudzí kľúč vyžaduje cieľovú tabuľku.'; + $lang['strfkadded'] = 'Cudzí kľúč pridaný.'; + $lang['strfkaddedbad'] = 'Cudzí kľúč nebol pridaný.'; + $lang['strfktarget'] = 'Cieľová tabuľka'; + $lang['strfkcolumnlist'] = 'Stľpce v kľúči'; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + + // Functions + $lang['strfunction'] = 'Funkcia'; + $lang['strfunctions'] = 'Funkcie'; + $lang['strshowallfunctions'] = 'Zobraziť vŠetky funkcie'; + $lang['strnofunction'] = 'Nenájdená žiadna funkcia.'; + $lang['strnofunctions'] = 'Nenájdené žiadne funkcie.'; + $lang['strcreateplfunction'] = 'Vytvoriť SQL/PL funkciu'; + $lang['strcreateinternalfunction'] = 'Vytvoriť internú funkciu'; + $lang['strcreatecfunction'] = 'Vytvoriť C funkciu'; + $lang['strfunctionname'] = 'Názov funkcie'; + $lang['strreturns'] = 'Vracia'; + $lang['strarguments'] = 'Argumenty'; + $lang['strproglanguage'] = 'Jazyk'; + $lang['strfunctionneedsname'] = 'Musíš zadať názov pre tvoju funkciu.'; + $lang['strfunctionneedsdef'] = 'Musíš zadať definíciu pre tvoju funkciu.'; + $lang['strfunctioncreated'] = 'Funkcia vytvorená.'; + $lang['strfunctioncreatedbad'] = 'Funkcia nebola vytvorená.'; + $lang['strconfdropfunction'] = 'Si si istý, že chceš zmazať funkciu "%s"?'; + $lang['strfunctiondropped'] = 'Funkcia zmazaná.'; + $lang['strfunctiondroppedbad'] = 'Funkcia nebola zmazaná.'; + $lang['strfunctionupdated'] = 'Funkcia upravená.'; + $lang['strfunctionupdatedbad'] = 'Funkcia nebola upravená.'; + $lang['strobjectfile'] = 'Objektový súbor'; + $lang['strlinksymbol'] = 'Link symbol'; + + // Triggers + $lang['strtrigger'] = 'Trigger'; //su to medzipravidla ?? po cesky spouste.. + $lang['strtriggers'] = 'Trigger-y'; + $lang['strshowalltriggers'] = 'Zobraziť Všetky Trigger-y'; + $lang['strnotrigger'] = 'Nenájdený žiadny Trigger.'; + $lang['strnotriggers'] = 'Nenájdené žiadne Trigger-y.'; + $lang['strcreatetrigger'] = 'Vytvoriť Trigger'; + $lang['strtriggerneedsname'] = 'Musíš zadať názov pre tvoj Trigger.'; + $lang['strtriggerneedsfunc'] = 'Musíš zadať funkciu pre tvoj Trigger.'; + $lang['strtriggercreated'] = 'Trigger vytvorený.'; + $lang['strtriggercreatedbad'] = 'Trigger nebol vytvorený.'; + $lang['strconfdroptrigger'] = 'Naozaj chceš zmazať Trigger "%s" na "%s"?'; + $lang['strtriggerdropped'] = 'Trigger zmazaný.'; + $lang['strtriggerdroppedbad'] = 'Trigger nebol zmazaný.'; + $lang['strtriggeraltered'] = 'Trigger zmenený.'; + $lang['strtriggeralteredbad'] = 'Trigger nebol zmenený.'; + $lang['strforeach'] = 'Pre každých'; + + // Types + $lang['strtype'] = 'Typ'; + $lang['strtypes'] = 'Typy'; + $lang['strshowalltypes'] = 'Zobraziť Všetky typy'; + $lang['strnotype'] = 'Nenájdený žiadny typ.'; + $lang['strnotypes'] = 'Nenájdené žiadne typy.'; + $lang['strcreatetype'] = 'Vytvoriť Typ'; + $lang['strcreatecomptype'] = 'Vytvoriť kompozitný typ'; + $lang['strtypeneedsfield'] = 'Musíš vybrať aspoň jedno pole.'; + $lang['strtypeneedscols'] = 'Musíš zadať správny počet polí.'; + $lang['strtypename'] = 'Názov typu'; + $lang['strinputfn'] = 'Vstupná funkcia'; + $lang['stroutputfn'] = 'Výstupná funkcia'; + $lang['strpassbyval'] = 'Passed by val?'; + $lang['stralignment'] = 'Alignment'; + $lang['strelement'] = 'Element'; + $lang['strdelimiter'] = 'Delimiter'; + $lang['strstorage'] = 'Storage'; + $lang['strfield'] = 'Pole'; + $lang['strnumfields'] = 'Počet polí'; + $lang['strtypeneedsname'] = 'Musíš zadať názov pre tvoj typ.'; + $lang['strtypeneedslen'] = 'Musíš zadať dĺžku pre tvoj typ.'; + $lang['strtypecreated'] = 'Typ Vytvorený'; + $lang['strtypecreatedbad'] = 'Typ nebol vytvorený.'; + $lang['strconfdroptype'] = 'Naozaj chceš zmazať typ "%s"?'; + $lang['strtypedropped'] = 'Typ zmazaný.'; + $lang['strtypedroppedbad'] = 'Typ nebol zmazaný.'; + $lang['strflavor'] = 'Flavor'; //todo + $lang['strbasetype'] = 'Základný'; + $lang['strcompositetype'] = 'Kompozitný'; + $lang['strpseudotype'] = 'Pseudo'; + + // Schemas + $lang['strschema'] = 'Schéma'; + $lang['strschemas'] = 'Schémy'; + $lang['strshowallschemas'] = 'Zobraziť Všetky Schémy'; + $lang['strnoschema'] = 'Nenájdená žiadna schéma.'; + $lang['strnoschemas'] = 'Nenájdené žiadne schémy.'; + $lang['strcreateschema'] = 'Vytvoriť Schému'; + $lang['strschemaname'] = 'Názov Schémy'; + $lang['strschemaneedsname'] = 'Musíš zadať názov pre tvoju schému.'; + $lang['strschemacreated'] = 'Schéma vytvorená'; + $lang['strschemacreatedbad'] = 'Schéma nebola vytvorená.'; + $lang['strconfdropschema'] = 'Naozaj chceš zmazať schému "%s"?'; + $lang['strschemadropped'] = 'Schéma zmazaná.'; + $lang['strschemadroppedbad'] = 'Schéma nebola zmazaná.'; + $lang['strschemaaltered'] = 'Schéma zmenená.'; + $lang['strschemaalteredbad'] = 'Schéma nebola zmenená.'; + $lang['strsearchpath'] = 'Cesta k nájdeniu Schémy'; + + // Reports + $lang['strreport'] = 'Report'; + $lang['strreports'] = 'Reporty'; + $lang['strshowallreports'] = 'Zobraziť Všetky Reporty'; + $lang['strnoreports'] = 'Nenájdené žiadne reporty.'; + $lang['strcreatereport'] = 'Vytvoriť Report'; + $lang['strreportdropped'] = 'Report zmazaný.'; + $lang['strreportdroppedbad'] = 'Report nebol zmazaný.'; + $lang['strconfdropreport'] = 'Naozaj chceš zmazať report "%s"?'; + $lang['strreportneedsname'] = 'Musíš zadať názov pre tvoj report.'; + $lang['strreportneedsdef'] = 'Musíš zadať SQL dotaz pre tvoj report.'; + $lang['strreportcreated'] = 'Report uložený.'; + $lang['strreportcreatedbad'] = 'Report nebol uložený.'; + + //Domains + $lang['strdomain'] = 'Doména'; + $lang['strdomains'] = 'Domény'; + $lang['strshowalldomains'] = 'Zobraziť Všetky Domény'; + $lang['strnodomains'] = 'Nenájdené žiadne domény.'; + $lang['strcreatedomain'] = 'Vytvoriť doménu'; + $lang['strdomaindropped'] = 'Doména zmazaná.'; + $lang['strdomaindroppedbad'] = 'Doména nebola zmazaná.'; + $lang['strconfdropdomain'] = 'Naozaj chceš zmazať doménu "%s"?'; + $lang['strdomainneedsname'] = 'Musíš zadať názov pre tvoju doménu.'; + $lang['strdomaincreated'] = 'Doména vytvorená.'; + $lang['strdomaincreatedbad'] = 'Doména nebola vytvorená.'; + $lang['strdomainaltered'] = 'Doména zmenená.'; + $lang['strdomainalteredbad'] = 'Doména nebola zmenená.'; + + //Operators + $lang['stroperator'] = 'Operátor'; + $lang['stroperators'] = 'Operátory'; + $lang['strshowalloperators'] = 'Zobraziť Všetky Operátory'; + $lang['strnooperator'] = 'Nenájdený žiadny operátor.'; + $lang['strnooperators'] = 'Nenájdené žiadne operátory.'; + $lang['strcreateoperator'] = 'Vytvoriť Operátor'; + $lang['strleftarg'] = 'Ľavý Arg Typ'; + $lang['strrightarg'] = 'Pravý Arg Typ'; + $lang['strcommutator'] = 'Komutátor'; + $lang['strnegator'] = 'Negátor'; + $lang['strrestrict'] = 'Obmedziť'; + $lang['strjoin'] = 'Join'; + $lang['strhashes'] = 'Hashes'; + $lang['strmerges'] = 'Merges'; + $lang['strleftsort'] = 'Ľavý sort'; + $lang['strrightsort'] = 'Pravý sort'; + $lang['strlessthan'] = 'Menej ako'; + $lang['strgreaterthan'] = 'Viac ako'; + $lang['stroperatorneedsname'] = 'Musíš zadať názov pre tvoj operátor.'; + $lang['stroperatorcreated'] = 'Operátor vytvorený'; + $lang['stroperatorcreatedbad'] = 'Operátor nebol vytvorený.'; + $lang['strconfdropoperator'] = 'Naozaj chceš zmazať operátor "%s"?'; + $lang['stroperatordropped'] = 'Operátor zmazaný.'; + $lang['stroperatordroppedbad'] = 'Operátor nebol zmazaný.'; + + //Casts + $lang['strcasts'] = 'Cast-y'; + $lang['strnocasts'] = 'Nenájdené žiadne Cast-y.'; + $lang['strsourcetype'] = 'Zdrojový typ'; + $lang['strtargettype'] = 'Cieľový typ'; + $lang['strimplicit'] = 'Implicitný'; + $lang['strinassignment'] = 'V priradení'; + $lang['strbinarycompat'] = '(Binárne identické)'; + + // Conversions + $lang['strconversions'] = 'Konverzie'; + $lang['strnoconversions'] = 'Nenájdené žiadne konverzie.'; + $lang['strsourceencoding'] = 'Zdojové kódovanie'; + $lang['strtargetencoding'] = 'Cieľové kódovanie'; + + // Languages + $lang['strlanguages'] = 'Jazyky'; + $lang['strnolanguages'] = 'Nenájdené žiadne jazyky.'; + $lang['strtrusted'] = 'Trusted'; + + // Info + $lang['strnoinfo'] = 'Informácie nedostupné.'; + $lang['strreferringtables'] = 'Referujúce tabuľky'; + $lang['strparenttables'] = 'Rodičovské tabuľky'; + $lang['strchildtables'] = 'Dcérske tabuľky'; + + // Aggregates + $lang['straggregates'] = 'Agregáty'; + $lang['strnoaggregates'] = 'Nenájdené žiadne agregáty.'; + $lang['stralltypes'] = '(Všetky typy)'; + + // Operator Classes + $lang['stropclasses'] = 'Op Triedy'; + $lang['strnoopclasses'] = 'Nenájdené žiadne op. triedy.'; + $lang['straccessmethod'] = 'Prístupové metódy'; + + // Stats and performance + $lang['strrowperf'] = 'Výkonnosť Riadku'; //to znie dost tupo.. + $lang['strioperf'] = 'I/O Výkon'; + $lang['stridxrowperf'] = 'Výkonnosť Indexovania Riadkov'; + $lang['stridxioperf'] = 'Index I/O Výkon'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Sekvenčný'; + $lang['strscan'] = 'Scan'; //co s tymto tu??? + $lang['strread'] = 'Načítať'; + $lang['strfetch'] = 'Získať'; + $lang['strheap'] = 'Heap'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST Index'; + $lang['strcache'] = 'Cache'; + $lang['strdisk'] = 'Disk'; + $lang['strrows2'] = 'Riadkov'; + + // Tablespaces + $lang['strtablespace'] = 'Priestor pre tabuľku'; + $lang['strtablespaces'] = 'Priestory tabuliek'; + $lang['strshowalltablespaces'] = 'Zobraziť všetky priestory pre tabuľky'; + $lang['strnotablespaces'] = 'Nenájdené žiadne priestory tabuliek.'; + $lang['strcreatetablespace'] = 'Vytvoriť priestor pre tabuľku'; + $lang['strlocation'] = 'Umiestnenie'; + $lang['strtablespaceneedsname'] = 'Musíš zadať názov priestoru tabuľky.'; + $lang['strtablespaceneedsloc'] = 'Musíš zadať adresár, vktorom sa má vytvoriť priestor pre tabuľku.'; + $lang['strtablespacecreated'] = 'Priestor pre tabuľku bol vytvorený.'; + $lang['strtablespacecreatedbad'] = 'Vytvorenie priestoru pre tabuľku zlyhalo.'; + $lang['strconfdroptablespace'] = 'Naozaj chceš odstrániť priestor tabuľky "%s"?'; + $lang['strtablespacedropped'] = 'Priestor pre tabuľku bol odstránený.'; + $lang['strtablespacedroppedbad'] = 'Odstránenie priestoru zlyhalo.'; + $lang['strtablespacealtered'] = 'Priestor tabuľky zmenený.'; + $lang['strtablespacealteredbad'] = 'Zmenenie priestoru tabuľky zlyhalo.'; + + // Slony clusters +$lang['strcluster'] = 'Cluster'; +$lang['strnoclusters'] = 'No clusters found.'; +$lang['strconfdropcluster'] = 'Are you sure you want to drop cluster "%s"?'; +$lang['strclusterdropped'] = 'Cluster dropped.'; +$lang['strclusterdroppedbad'] = 'Cluster drop failed.'; +$lang['strinitcluster'] = 'Initialize cluster'; +$lang['strclustercreated'] = 'Cluster initialized.'; +$lang['strclustercreatedbad'] = 'Cluster initialization failed.'; +$lang['strclusterneedsname'] = 'You must give a name for the cluster.'; +$lang['strclusterneedsnodeid'] = 'You must give an ID for the local node.'; + + // Slony nodes +$lang['strnodes'] = 'Nodes'; +$lang['strnonodes'] = 'No nodes found.'; +$lang['strcreatenode'] = 'Create node'; +$lang['strid'] = 'ID'; +$lang['stractive'] = 'Active'; +$lang['strnodecreated'] = 'Node created.'; +$lang['strnodecreatedbad'] = 'Node creation failed.'; +$lang['strconfdropnode'] = 'Are you sure you want to drop node "%s"?'; +$lang['strnodedropped'] = 'Node dropped.'; +$lang['strnodedroppedbad'] = 'Node drop failed'; +$lang['strfailover'] = 'Failover'; +$lang['strnodefailedover'] = 'Node failed over.'; +$lang['strnodefailedoverbad'] = 'Node failover failed.'; + + // Slony paths +$lang['strpaths'] = 'Paths'; +$lang['strnopaths'] = 'No paths found.'; +$lang['strcreatepath'] = 'Create path'; +$lang['strnodename'] = 'Node name'; +$lang['strnodeid'] = 'Node ID'; +$lang['strconninfo'] = 'Connection string'; +$lang['strconnretry'] = 'Seconds before retry to connect'; +$lang['strpathneedsconninfo'] = 'You must give a connection string for the path.'; +$lang['strpathneedsconnretry'] = 'You must give the number of seconds to wait before retry to connect.'; +$lang['strpathcreated'] = 'Path created.'; +$lang['strpathcreatedbad'] = 'Path creation failed.'; +$lang['strconfdroppath'] = 'Are you sure you want to drop path "%s"?'; +$lang['strpathdropped'] = 'Path dropped.'; +$lang['strpathdroppedbad'] = 'Path drop failed.'; + + // Slony listens +$lang['strlistens'] = 'Listens'; +$lang['strnolistens'] = 'No listens found.'; +$lang['strcreatelisten'] = 'Create listen'; +$lang['strlistencreated'] = 'Listen created.'; +$lang['strlistencreatedbad'] = 'Listen creation failed.'; +$lang['strconfdroplisten'] = 'Are you sure you want to drop listen "%s"?'; +$lang['strlistendropped'] = 'Listen dropped.'; +$lang['strlistendroppedbad'] = 'Listen drop failed.'; + + // Slony replication sets +$lang['strrepsets'] = 'Replication sets'; +$lang['strnorepsets'] = 'No replication sets found.'; +$lang['strcreaterepset'] = 'Create replication set'; +$lang['strrepsetcreated'] = 'Replication set created.'; +$lang['strrepsetcreatedbad'] = 'Replication set creation failed.'; +$lang['strconfdroprepset'] = 'Are you sure you want to drop replication set "%s"?'; +$lang['strrepsetdropped'] = 'Replication set dropped.'; +$lang['strrepsetdroppedbad'] = 'Replication set drop failed.'; +$lang['strmerge'] = 'Merge'; +$lang['strmergeinto'] = 'Merge into'; +$lang['strrepsetmerged'] = 'Replication sets merged.'; +$lang['strrepsetmergedbad'] = 'Replication sets merge failed.'; +$lang['strmove'] = 'Move'; +$lang['strneworigin'] = 'New origin'; +$lang['strrepsetmoved'] = 'Replication set moved.'; +$lang['strrepsetmovedbad'] = 'Replication set move failed.'; +$lang['strnewrepset'] = 'New replication set'; +$lang['strlock'] = 'Lock'; +$lang['strlocked'] = 'Locked'; +$lang['strunlock'] = 'Unlock'; +$lang['strconflockrepset'] = 'Are you sure you want to lock replication set "%s"?'; +$lang['strrepsetlocked'] = 'Replication set locked.'; +$lang['strrepsetlockedbad'] = 'Replication set lock failed.'; +$lang['strconfunlockrepset'] = 'Are you sure you want to unlock replication set "%s"?'; +$lang['strrepsetunlocked'] = 'Replication set unlocked.'; +$lang['strrepsetunlockedbad'] = 'Replication set unlock failed.'; +$lang['strexecute'] = 'Execute'; +$lang['stronlyonnode'] = 'Only on node'; +$lang['strddlscript'] = 'DDL script'; +$lang['strscriptneedsbody'] = 'You must supply a script to be executed on all nodes.'; +$lang['strscriptexecuted'] = 'Replication set DDL script executed.'; +$lang['strscriptexecutedbad'] = 'Failed executing replication set DDL script.'; +$lang['strtabletriggerstoretain'] = 'The following triggers will NOT be disabled by Slony:'; + + // Slony tables in replication sets +$lang['straddtable'] = 'Add table'; +$lang['strtableneedsuniquekey'] = 'Table to be added requires a primary or unique key.'; +$lang['strtableaddedtorepset'] = 'Table added to replication set.'; +$lang['strtableaddedtorepsetbad'] = 'Failed adding table to replication set.'; +$lang['strconfremovetablefromrepset'] = 'Are you sure you want to remove the table "%s" from replication set "%s"?'; +$lang['strtableremovedfromrepset'] = 'Table removed from replication set.'; +$lang['strtableremovedfromrepsetbad'] = 'Failed to remove table from replication set.'; + + // Slony sequences in replication sets +$lang['straddsequence'] = 'Add sequence'; +$lang['strsequenceaddedtorepset'] = 'Sequence added to replication set.'; +$lang['strsequenceaddedtorepsetbad'] = 'Failed adding sequence to replication set.'; +$lang['strconfremovesequencefromrepset'] = 'Are you sure you want to remove the sequence "%s" from replication set "%s"?'; +$lang['strsequenceremovedfromrepset'] = 'Sequence removed from replication set.'; +$lang['strsequenceremovedfromrepsetbad'] = 'Failed to remove sequence from replication set.'; + + // Slony subscriptions +$lang['strsubscriptions'] = 'Subscriptions'; +$lang['strnosubscriptions'] = 'No subscriptions found.'; + + // Miscellaneous + $lang['strtopbar'] = '%s beží na %s:%s -- si prihlásený ako "%s"'; + $lang['strtimefmt'] = 'jS M, Y g:iA'; + $lang['strhelp'] = 'Pomoc'; + $lang['strhelpicon'] = '?'; + $lang['strlogintitle'] = 'Prihlasujem do %s'; + $lang['strlogoutmsg'] = 'Odhlásený z %s'; + $lang['strloading'] = 'Spracuvávam...'; + $lang['strerrorloading'] = 'Chyba spracovania'; + $lang['strclicktoreload'] = 'Klikni pre obnovenie'; + +?> diff --git a/php/pgadmin/lang/spanish.php b/php/pgadmin/lang/spanish.php new file mode 100644 index 0000000..93a13bb --- /dev/null +++ b/php/pgadmin/lang/spanish.php @@ -0,0 +1,1024 @@ +>'; + $lang['strfailed'] = 'Fall'; + $lang['strcreate'] = 'Crear'; + $lang['strcreated'] = 'Creado'; + $lang['strcomment'] = 'Comentario'; + $lang['strlength'] = 'Longitud'; + $lang['strdefault'] = 'Predeterminado'; + $lang['stralter'] = 'Modificar'; + $lang['strok'] = 'Aceptar'; + $lang['strcancel'] = 'Cancelar'; + $lang['strkill'] = 'Terminar'; + $lang['strac'] = 'Activar AutoCompletado'; + $lang['strsave'] = 'Guardar'; + $lang['strreset'] = 'Reestablecer'; + $lang['strrestart'] = 'Reiniciar'; + $lang['strinsert'] = 'Insertar'; + $lang['strselect'] = 'Seleccionar'; + $lang['strdelete'] = 'Eliminar'; + $lang['strupdate'] = 'Actualizar'; + $lang['strreferences'] = 'Referencia'; + $lang['stryes'] = 'Si'; + $lang['strno'] = 'No'; + $lang['strtrue'] = 'VERDADERO'; + $lang['strfalse'] = 'FALSO'; + $lang['stredit'] = 'Editar'; + $lang['strcolumn'] = 'Columna'; + $lang['strcolumns'] = 'Columnas'; + $lang['strrows'] = 'fila(s)'; + $lang['strrowsaff'] = 'fila(s) afectadas.'; + $lang['strobjects'] = 'objeto(s)'; + $lang['strback'] = 'Atrs'; + $lang['strqueryresults'] = 'Resultado de la consulta'; + $lang['strshow'] = 'Mostrar'; + $lang['strempty'] = 'Vaciar'; + $lang['strlanguage'] = 'Idioma'; + $lang['strencoding'] = 'Codificacin'; + $lang['strvalue'] = 'Valor'; + $lang['strunique'] = 'nico'; + $lang['strprimary'] = 'Primaria'; + $lang['strexport'] = 'Exportar'; + $lang['strimport'] = 'Importar'; + $lang['strallowednulls'] = 'Permitir valores nulos (NULL)'; + $lang['strbackslashn'] = '\N'; + $lang['stremptystring'] = 'Cadena o campo vacio'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = 'Admin'; + $lang['strvacuum'] = 'Limpiar'; + $lang['stranalyze'] = 'Analizar'; + $lang['strclusterindex'] = 'Ordenar tabla'; + $lang['strclustered'] = 'Tabla Ordenada?'; + $lang['strreindex'] = 'Actualizar ndices'; + $lang['strexecute'] = 'Ejecutar'; + $lang['stradd'] = 'Agregar'; + $lang['strevent'] = 'Evento'; + $lang['strwhere'] = 'Dnde'; + $lang['strinstead'] = 'Hacer en su lugar'; + $lang['strwhen'] = 'Cundo'; + $lang['strformat'] = 'Formato'; + $lang['strdata'] = 'Dato'; + $lang['strconfirm'] = 'Confirmar'; + $lang['strexpression'] = 'Expresin'; + $lang['strellipsis'] = '?'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'Expandir'; + $lang['strcollapse'] = 'Colapsar'; + $lang['strfind'] = 'Buscar'; + $lang['stroptions'] = 'Opciones'; + $lang['strrefresh'] = 'Refrescar'; + $lang['strdownload'] = 'Bajar'; + $lang['strdownloadgzipped'] = 'Bajar comprimido con gzip'; + $lang['strinfo'] = 'Informacin'; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = 'Avanzado'; + $lang['strvariables'] = 'Variables'; + $lang['strprocess'] = 'Proceso'; + $lang['strprocesses'] = 'Procesos'; + $lang['strsetting'] = 'Configuracin'; + $lang['streditsql'] = 'Editar SQL'; + $lang['strruntime'] = 'Tiempo total de ejecucin: %s ms'; + $lang['strpaginate'] = 'Paginar resultados'; + $lang['struploadscript'] = 'o subir un script SQL:'; + $lang['strstarttime'] = 'Hora de comienzo'; + $lang['strfile'] = 'Archivo'; + $lang['strfileimported'] = 'Archivo importado.'; + $lang['strtrycred'] = 'Usar el mismo par de usuario/contrasea para todos los servidores'; + $lang['strconfdropcred'] = 'Por razones de seguridad, al desconectar se destruir tu informacin compartida. Ests seguro que desea desconectarse?'; + $lang['stractionsonmultiplelines'] = 'Acciones mltiples'; + $lang['strselectall'] = 'Seleccionar todos'; + $lang['strunselectall'] = 'Seleccionar ninguno'; + $lang['strlocale'] = 'Localizacin'; + $lang['strcollation'] = 'Colacin'; + $lang['strctype'] = 'Tipo de caracter'; + $lang['strdefaultvalues'] = 'Valores por defecto'; + $lang['strnewvalues'] = 'Nuevos valores'; + $lang['strstart'] = 'Iniciar'; + $lang['strstop'] = 'Detener'; + $lang['strgotoppage'] = 'regresar al inicio'; + $lang['strtheme'] = 'Tema'; + + // Admin + $lang['stradminondatabase'] = 'Las siguientes tareas administrativas aplican a toda la base de datos %s.'; + $lang['stradminontable'] = 'Las siguientes tareas administrativas aplican a la tabla %s.'; + + // User-supplied SQL history + $lang['strhistory'] = 'Historial'; + $lang['strnohistory'] = 'Sin historial.'; + $lang['strclearhistory'] = 'Borrar historial'; + $lang['strdelhistory'] = 'Borrar del historial'; + $lang['strconfdelhistory'] = 'Desea borrar esta solicitud del historial?'; + $lang['strconfclearhistory'] = 'Desea borrar el historial?'; + $lang['strnodatabaseselected'] = 'Por favor, seleccione una base de datos.'; + + // Database sizes + $lang['strnoaccess'] = 'Sin acceso'; + $lang['strsize'] = 'Tamao'; + $lang['strbytes'] = 'bytes'; + $lang['strkb'] = 'kB'; + $lang['strmb'] = 'MB'; + $lang['strgb'] = 'GB'; + $lang['strtb'] = 'TB'; + + // Error handling + $lang['strnoframes'] = 'Esta aplicacin funciona mejor con un navegador con soporte para marcos, pero puede usarse sin marcos siguiendo el link de abajo.'; + $lang['strnoframeslink'] = 'Usar sin marcos'; + $lang['strbadconfig'] = 'Su archivo config.inc.php est desactualizado. Deber regenerarlo a partir del nuevo archivo config.inc.php-dist.'; + $lang['strnotloaded'] = 'Su versin de PHP no tiene el soporte correcto de bases de datos.'; + $lang['strpostgresqlversionnotsupported'] = 'Su versin de PostgreSQL no est soportado. Por favor actualice a la versin %s o ms reciente.'; + $lang['strbadschema'] = 'El esquema especificado no es vlido.'; + $lang['strbadencoding'] = 'No se pudo configurar la codificacin del cliente en la base de datos.'; + $lang['strsqlerror'] = 'Error de SQL:'; + $lang['strinstatement'] = 'En la declaracin:'; + $lang['strinvalidparam'] = 'Parmetros de script no vlidos.'; + $lang['strnodata'] = 'No se encontraron filas.'; + $lang['strnoobjects'] = 'No se encontraron objetos.'; + $lang['strrownotunique'] = 'No existe un identificador nico para este registro.'; + $lang['strnoreportsdb'] = 'An no se ha creado la base de datos para los reportes. Lea las instrucciones del archivo INSTALL.'; + $lang['strnouploads'] = 'Est deshabilitada la subida de archivos.'; + $lang['strimporterror'] = 'Error de importacin.'; + $lang['strimporterror-fileformat'] = 'Error de importacion de datos: Fall al intentar determinar el formato del archivo.'; + $lang['strimporterrorline'] = 'Error de importacin en la lnea %s.'; + $lang['strimporterrorline-badcolumnnum'] = 'Error de importacin en la lnea %s: La lnea no posee la cantidad de columnas correctas.'; + $lang['strimporterror-uploadedfile'] = 'Error de importacin: No se ha podido subir el archivo al servidor'; + $lang['strcannotdumponwindows'] = 'El volcado de datos de tablas y esquemas con nombres complejos no esta soportado en Windows.'; + $lang['strinvalidserverparam'] = 'Intento de conexin con un parmetro invlido del servidor. Posiblemente alguien est intentando atacar tu sistema.'; + $lang['strnoserversupplied'] = 'No se suministr un servidor'; + $lang['strbadpgdumppath'] = 'Error de exportacin: Fall la ejecucin de execute pg_dump (segn la ruta dada en conf/config.inc.php : %s). Por favor, arregla esta ruta en tu configuracin y vuelve a iniciar sesin.'; + $lang['strbadpgdumpallpath'] = 'Error de exportacin: Fall la ejecucin de pg_dumpall (segn la ruta dada en conf/config.inc.php : %s). Por favor, arregla esta ruta en tu configuracin y vuelve a iniciar sesin.'; + $lang['strconnectionfail'] = 'No se puede conectar al servidor.'; + + // Tables + $lang['strtable'] = 'Tabla'; + $lang['strtables'] = 'Tablas'; + $lang['strshowalltables'] = 'Mostrar todas las tablas'; + $lang['strnotables'] = 'No se encontraron tablas.'; + $lang['strnotable'] = 'No se encontr la tabla.'; + $lang['strcreatetable'] = 'Crear tabla'; + $lang['strcreatetablelike'] = 'Crear una tabla a partir de una existente'; + $lang['strcreatetablelikeparent'] = 'Tabla de origen'; + $lang['strcreatelikewithdefaults'] = 'incluir valores por defecto'; + $lang['strcreatelikewithconstraints'] = 'incluir restricciones'; + $lang['strcreatelikewithindexes'] = 'incluir ndices'; + $lang['strtablename'] = 'Nombre de la tabla'; + $lang['strtableneedsname'] = 'Debe darle un nombre a la tabla.'; + $lang['strtablelikeneedslike'] = 'Debes especificar una tabla para copiar sus propiedades.'; + $lang['strtableneedsfield'] = 'Debe especificar al menos un campo.'; + $lang['strtableneedscols'] = 'Debe especificar un nmero vlido de columnas.'; + $lang['strtablecreated'] = 'Tabla creada.'; + $lang['strtablecreatedbad'] = 'Fall al tratar de crear la tabla.'; + $lang['strconfdroptable'] = 'Ests seguro que desea eliminar la tabla "%s"?'; + $lang['strtabledropped'] = 'Tabla eliminada.'; + $lang['strtabledroppedbad'] = 'Fall al tratar de eliminar la tabla.'; + $lang['strconfemptytable'] = 'Ests seguro que desea vaciar la tabla "%s"?'; + $lang['strtableemptied'] = 'Tabla vaciada.'; + $lang['strtableemptiedbad'] = 'Fall el vaciado de la tabla.'; + $lang['strinsertrow'] = 'Insertar Fila'; + $lang['strrowinserted'] = 'Fila insertada.'; + $lang['strrowinsertedbad'] = 'Fall la insercin de fila.'; + $lang['strnofkref'] = 'No se hay un valor coincidente en la clave fornea %s.'; + $lang['strrowduplicate'] = 'Fall la insercin de fila , intentado hacer una duplicacin de insercin.'; + $lang['streditrow'] = 'Editar fila'; + $lang['strrowupdated'] = 'Fila actualizada.'; + $lang['strrowupdatedbad'] = 'Fall al intentar actualizar la fila.'; + $lang['strdeleterow'] = 'Eliminar Fila'; + $lang['strconfdeleterow'] = 'Ests seguro que quiere eliminar esta fila?'; + $lang['strrowdeleted'] = 'Fila eliminada.'; + $lang['strrowdeletedbad'] = 'Fall la eliminacin de fila.'; + $lang['strinsertandrepeat'] = 'Insertar y Repite'; + $lang['strnumcols'] = 'Cantidad de columnas'; + $lang['strcolneedsname'] = 'Debe especificar un nombre para la columna'; + $lang['strselectallfields'] = 'Seleccionar todos los campos.'; + $lang['strselectneedscol'] = 'Debe elegir al menos una columna'; + $lang['strselectunary'] = 'Las operaciones unitarias no pueden tener valores.'; + $lang['strcolumnaltered'] = 'Columna Modificada.'; + $lang['strcolumnalteredbad'] = 'Fall la modificacin de columna.'; + $lang['strconfdropcolumn'] = 'Ests seguro que quiere eliminar la columna "%s" de la tabla "%s"?'; + $lang['strcolumndropped'] = 'Columna eliminada.'; + $lang['strcolumndroppedbad'] = 'Fall la eliminacin de columna.'; + $lang['straddcolumn'] = 'Agregar Columna'; + $lang['strcolumnadded'] = 'Columna agregada.'; + $lang['strcolumnaddedbad'] = 'Fall el agregado de columna.'; + $lang['strcascade'] = 'EN CASCADA'; + $lang['strtablealtered'] = 'Tabla modificada.'; + $lang['strtablealteredbad'] = 'Fall la modificacin de la Tabla.'; + $lang['strdataonly'] = 'Solamente datos'; + $lang['strstructureonly'] = 'Solo la estructura'; + $lang['strstructureanddata'] = 'Estructura y datos'; + $lang['strtabbed'] = 'Tabulado'; + $lang['strauto'] = 'Automtico'; + $lang['strconfvacuumtable'] = 'Ests seguro que quiere limpiar "%s"?'; + $lang['strconfanalyzetable'] = 'Ests seguro que quiere analizar "%s"?'; + $lang['strconfreindextable'] = 'Ests seguro que quiere actualizar los ndices "%s"?'; + $lang['strconfclustertable'] = 'Ests seguro que quiere ordenar "%s"?'; + $lang['strestimatedrowcount'] = 'Cantidad de filas'; + $lang['strspecifytabletoanalyze'] = 'Debe especificar al menos una tabla para analizar.'; + $lang['strspecifytabletoempty'] = 'Debe especificar al menos una tabla para vaciar.'; + $lang['strspecifytabletodrop'] = 'Debe especificar al menos una tabla para eliminar.'; + $lang['strspecifytabletovacuum'] = 'Debe especificar al menos una tabla para limpiar.'; + $lang['strspecifytabletoreindex'] = 'Debe especificar al menos una tabla para actualizar sus ndices.'; + $lang['strspecifytabletocluster'] = 'Debe especificar al menos una tabla para ordenar.'; + $lang['strnofieldsforinsert'] = 'No puedes insertar en la tabla una fila sin columnas.'; + + // Columns + $lang['strcolprop'] = 'Propiedades de la Columna'; + $lang['strnotableprovided'] = 'No se suministr al menos una tabla!'; + + // Users + $lang['struser'] = 'Usuario'; + $lang['strusers'] = 'Usuarios'; + $lang['strusername'] = 'Nombre de usuario'; + $lang['strpassword'] = 'Contrasea'; + $lang['strsuper'] = 'Superusuario?'; + $lang['strcreatedb'] = 'Puede crear BD?'; + $lang['strexpires'] = 'Expira'; + $lang['strsessiondefaults'] = 'Valores predeterminados de la sesin.'; + $lang['strnousers'] = 'No se encontraron usuarios.'; + $lang['struserupdated'] = 'Usuario actualizado.'; + $lang['struserupdatedbad'] = 'Fall la actualizacin del usuario.'; + $lang['strshowallusers'] = 'Mostrar todos los usuarios'; + $lang['strcreateuser'] = 'Crear usuario'; + $lang['struserneedsname'] = 'Debe dar un nombre a su usuario.'; + $lang['strusercreated'] = 'Usuario creado.'; + $lang['strusercreatedbad'] = 'Fall al crear usuario.'; + $lang['strconfdropuser'] = 'Ests seguro que quiere eliminar el usuario "%s"?'; + $lang['struserdropped'] = 'Usuario eliminado.'; + $lang['struserdroppedbad'] = 'Fall al eliminar el usuario.'; + $lang['straccount'] = 'Cuenta'; + $lang['strchangepassword'] = 'Cambiar Contrasea'; + $lang['strpasswordchanged'] = 'Contrasea modificada.'; + $lang['strpasswordchangedbad'] = 'Fall al modificar contrasea.'; + $lang['strpasswordshort'] = 'La contrasea es muy corta.'; + $lang['strpasswordconfirm'] = 'Las contraseas no coinciden.'; + + // Groups + $lang['strgroup'] = 'Grupo'; + $lang['strgroups'] = 'Grupos'; + $lang['strshowallgroups'] = 'Mostrar todos los grupos'; + $lang['strnogroup'] = 'Grupo no encontrado.'; + $lang['strnogroups'] = 'No se encontraron grupos.'; + $lang['strcreategroup'] = 'Crear Grupo'; + $lang['strgroupneedsname'] = 'Debe darle un nombre al grupo.'; + $lang['strgroupcreated'] = 'Grupo creado.'; + $lang['strgroupcreatedbad'] = 'Fall la creacin del grupo.'; + $lang['strconfdropgroup'] = 'Ests seguro que quiere eliminar el grupo "%s"?'; + $lang['strgroupdropped'] = 'Grupo eliminado.'; + $lang['strgroupdroppedbad'] = 'Fall la eliminacin del grupo.'; + $lang['strmembers'] = 'Miembros'; + $lang['strmemberof'] = 'Miembro de'; + $lang['stradminmembers'] = 'Miembros Admin '; + $lang['straddmember'] = 'Agregar un miembro'; + $lang['strmemberadded'] = 'Miembro agregado.'; + $lang['strmemberaddedbad'] = 'Fall al intentar agregar nuevo miembro.'; + $lang['strdropmember'] = 'Retirar miembro'; + $lang['strconfdropmember'] = 'Ests seguro que quiere retirar el miembro "%s" del grupo "%s"?'; + $lang['strmemberdropped'] = 'Miembro eliminado.'; + $lang['strmemberdroppedbad'] = 'Fall al intentar sacar un miembro.'; + + // Roles + $lang['strrole'] = 'Rol'; + $lang['strroles'] = 'Roles'; + $lang['strshowallroles'] = 'Mostrar todas los roles'; + $lang['strnoroles'] = 'No se encontraron roles.'; + $lang['strinheritsprivs'] = 'Hereda Privilegios?'; + $lang['strcreaterole'] = 'Crear Rol'; + $lang['strcancreaterole'] = 'Puede crear roles?'; + $lang['strrolecreated'] = 'Rol creado.'; + $lang['strrolecreatedbad'] = 'Fall al crear rol.'; + $lang['strrolealtered'] = 'Rol modificado.'; + $lang['strrolealteredbad'] = 'Fall la modificacin del rol.'; + $lang['strcanlogin'] = 'Puede iniciar sesin?'; + $lang['strconnlimit'] = 'Lmite de conexin'; + $lang['strdroprole'] = 'Eliminar rol'; + $lang['strconfdroprole'] = 'Ests seguro de que desea eliminar el rol "%s"?'; + $lang['strroledropped'] = 'Usuario eliminado.'; + $lang['strroledroppedbad'] = 'No puedo eliminar el rol.'; + $lang['strnolimit'] = 'Sin lmite'; + $lang['strnever'] = 'Nunca'; + $lang['strroleneedsname'] = 'Debe darle un nombre al rol.'; + + // Privileges + $lang['strprivilege'] = 'Privilegio'; + $lang['strprivileges'] = 'Privilegios'; + $lang['strnoprivileges'] = 'Por defecto, este objeto tiene privilegios de usuario.'; + $lang['strgrant'] = 'Otorgar'; + $lang['strrevoke'] = 'Revocar'; + $lang['strgranted'] = 'Privilegios otorgados/revocados.'; + $lang['strgrantfailed'] = 'Fall al intentar otorgar privilegios.'; + $lang['strgrantbad'] = 'Debe especificar al menos un usuario o grupo y al menos un privilegio.'; + $lang['strgrantor'] = 'Cedente'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'Base de Datos'; + $lang['strdatabases'] = 'Bases de Datos'; + $lang['strshowalldatabases'] = 'Mostrar todas las bases de datos'; + $lang['strnodatabases'] = 'No se encontraron bases de datos.'; + $lang['strcreatedatabase'] = 'Crear base de datos'; + $lang['strdatabasename'] = 'Nombre de la base de datos'; + $lang['strdatabaseneedsname'] = 'Debe darle un nombre a la base de datos.'; + $lang['strdatabasecreated'] = 'Base de datos creada.'; + $lang['strdatabasecreatedbad'] = 'Fall la creacin de la base de datos.'; + $lang['strconfdropdatabase'] = 'Ests seguro que quiere eliminar la base de datos "%s"?'; + $lang['strdatabasedropped'] = 'Base de datos eliminada.'; + $lang['strdatabasedroppedbad'] = 'Fall al eliminar la base de datos.'; + $lang['strentersql'] = 'Ingrese la sentencia de SQL para ejecutar:'; + $lang['strsqlexecuted'] = 'SQL ejecutada.'; + $lang['strvacuumgood'] = 'Limpieza completada.'; + $lang['strvacuumbad'] = 'Fall al intentar limpiar.'; + $lang['stranalyzegood'] = 'Anlisis completado.'; + $lang['stranalyzebad'] = 'Fall al intentar analizar.'; + $lang['strreindexgood'] = 'Actualizacin de ndices completada.'; + $lang['strreindexbad'] = 'Fall la actualizacin de ndices.'; + $lang['strfull'] = 'Full'; + $lang['strfreeze'] = 'Freeze'; + $lang['strforce'] = 'Force'; + $lang['strsignalsent'] = 'Seal enviada.'; + $lang['strsignalsentbad'] = 'Fall el envo de la seal.'; + $lang['strallobjects'] = 'Todos los objetos'; + $lang['strdatabasealtered'] = 'Base de Datos modificada.'; + $lang['strdatabasealteredbad'] = 'Fall al intentar modificar la base de datos.'; + $lang['strspecifydatabasetodrop'] = 'Debe especificar al menos una base de datos para eliminar.'; + $lang['strtemplatedb'] = 'Plantilla'; + $lang['strconfanalyzedatabase'] = 'Ests seguro que desea analizar todas las tablas en la base de datos "%s"?'; + $lang['strconfvacuumdatabase'] = 'Ests seguro que desea limpiar todas las tablas en la base de datos "%s"?'; + $lang['strconfreindexdatabase'] = 'Ests seguro que desea actualizar los ndices de todas las tablas en la base de datos "%s"?'; + $lang['strconfclusterdatabase'] = 'Ests seguro que desea ordenar todas las tablas en la base de datos "%s"?'; + + // Views + $lang['strview'] = 'Vista'; + $lang['strviews'] = 'Vistas'; + $lang['strshowallviews'] = 'Mostrar todas las vistas'; + $lang['strnoview'] = 'No se encontr la vista.'; + $lang['strnoviews'] = 'No se encontraron vistas.'; + $lang['strcreateview'] = 'Crear Vista'; + $lang['strviewname'] = 'Nombre de la Vista'; + $lang['strviewneedsname'] = 'Debe darle un nombre a la vista.'; + $lang['strviewneedsdef'] = 'Debe darle una definicin a su vista.'; + $lang['strviewneedsfields'] = 'Seleccione por favor los campos que desea en su vista.'; + $lang['strviewcreated'] = 'Vista creada.'; + $lang['strviewcreatedbad'] = 'Fall al crear la vista.'; + $lang['strconfdropview'] = 'Ests seguro que quiere eliminar la vista "%s"?'; + $lang['strviewdropped'] = 'Vista eliminada.'; + $lang['strviewdroppedbad'] = 'Fall al intentar eliminar la vista.'; + $lang['strviewupdated'] = 'Vista actualizada.'; + $lang['strviewupdatedbad'] = 'Fall al actualizar la vista.'; + $lang['strviewlink'] = 'Claves forneas'; + $lang['strviewconditions'] = 'Condiciones adicionales'; + $lang['strcreateviewwiz'] = 'Crear vista usando el asistente'; + $lang['strrenamedupfields'] = 'Renombrar campos duplicados'; + $lang['strdropdupfields'] = 'Eliminar campos duplicados'; + $lang['strerrordupfields'] = 'Error en campos duplicados'; + $lang['strviewaltered'] = 'Vista modificada.'; + $lang['strviewalteredbad'] = 'Fall la modificacin de la vista.'; + $lang['strspecifyviewtodrop'] = 'Debe especificar al menos una vista a eliminar.'; + + // Sequences + $lang['strsequence'] = 'Secuencia'; + $lang['strsequences'] = 'Secuencias'; + $lang['strshowallsequences'] = 'Mostrar todas las secuencias'; + $lang['strnosequence'] = 'No se encontr la secuencia.'; + $lang['strnosequences'] = 'No se encontraron secuencias.'; + $lang['strcreatesequence'] = 'Crear secuencia'; + $lang['strlastvalue'] = 'ltimo Valor'; + $lang['strincrementby'] = 'Incremento'; + $lang['strstartvalue'] = 'Valor inicial'; + $lang['strrestartvalue'] = 'Reiniciar valor'; + $lang['strmaxvalue'] = 'Valor mximo'; + $lang['strminvalue'] = 'Valor mnimo'; + $lang['strcachevalue'] = 'Valor de la cach'; + $lang['strlogcount'] = 'Registrar cuenta'; + $lang['strcancycle'] = 'Cclica?'; + $lang['striscalled'] = 'Incrementar el ltimo valor antes de ser llamado (is_called)?'; + $lang['strsequenceneedsname'] = 'Debe darle un nombre a la secuencia.'; + $lang['strsequencecreated'] = 'Secuencia creada.'; + $lang['strsequencecreatedbad'] = 'Fall la creacin de la secuencia.'; + $lang['strconfdropsequence'] = 'Ests seguro que quiere eliminar la secuencia "%s"?'; + $lang['strsequencedropped'] = 'Secuencia eliminada.'; + $lang['strsequencedroppedbad'] = 'Fall la eliminacin de la secuencia.'; + $lang['strsequencerestart'] = 'Secuencia restablecida.'; + $lang['strsequencerestartbad'] = 'Fall al restablecer la secuencia.'; + $lang['strsequencereset'] = 'Secuencia reiniciada.'; + $lang['strsequenceresetbad'] = 'Fall al intentar reiniciar la secuencia.'; + $lang['strsequencealtered'] = 'Secuencia modificada.'; + $lang['strsequencealteredbad'] = 'Fall la modificacin de la secuencia.'; + $lang['strsetval'] = 'Fijar el valor'; + $lang['strsequencesetval'] = 'Fijar el valor de la secuencia.'; + $lang['strsequencesetvalbad'] = 'Fall al fijar el valor de la secuencia.'; + $lang['strnextval'] = 'Valor de incremento'; + $lang['strsequencenextval'] = 'Secuencia incrementada.'; + $lang['strsequencenextvalbad'] = 'Fall el incremento de la secuencia.'; + $lang['strspecifysequencetodrop'] = 'Debe especificar al menos una secuencia a eliminar.'; + + // Indexes + $lang['strindex'] = 'ndice'; + $lang['strindexes'] = 'ndices'; + $lang['strindexname'] = 'Nombre del ndice'; + $lang['strshowallindexes'] = 'Mostrar Todos los ndices'; + $lang['strnoindex'] = 'No se encontr el ndice.'; + $lang['strnoindexes'] = 'No se encontraron ndices.'; + $lang['strcreateindex'] = 'Crear ndice'; + $lang['strtabname'] = 'Tab Name'; + $lang['strcolumnname'] = 'Nombre de Columna'; + $lang['strindexneedsname'] = 'Debe darle un nombre al ndice'; + $lang['strindexneedscols'] = 'Los ndices requieren un nmero vlido de columnas.'; + $lang['strindexcreated'] = 'ndice creado'; + $lang['strindexcreatedbad'] = 'Fall al crear el ndice.'; + $lang['strconfdropindex'] = 'Ests seguro que quiere eliminar el ndice "%s"?'; + $lang['strindexdropped'] = 'ndice eliminado.'; + $lang['strindexdroppedbad'] = 'Fall al eliminar el ndice.'; + $lang['strkeyname'] = 'Nombre de la clave'; + $lang['struniquekey'] = 'Clave nica'; + $lang['strprimarykey'] = 'Clave primaria'; + $lang['strindextype'] = 'Tipo de ndice'; + $lang['strtablecolumnlist'] = 'Columnas en Tabla'; + $lang['strindexcolumnlist'] = 'Columnas en el ndice'; + $lang['strclusteredgood'] = 'Ordenado completo.'; + $lang['strclusteredbad'] = 'Fall al ordenar tabla.'; + $lang['strconcurrently'] = 'Concurrente'; + $lang['strnoclusteravailable'] = 'Tabla no ordenada en un ndice.'; + + // Rules + $lang['strrules'] = 'Reglas'; + $lang['strrule'] = 'Regla'; + $lang['strshowallrules'] = 'Mostrar todas las reglas'; + $lang['strnorule'] = 'No se encontr la regla.'; + $lang['strnorules'] = 'No se encontraron reglas.'; + $lang['strcreaterule'] = 'Crear regla'; + $lang['strrulename'] = 'Nombre de regla'; + $lang['strruleneedsname'] = 'Debe darle un nombre a la regla.'; + $lang['strrulecreated'] = 'Regla creada.'; + $lang['strrulecreatedbad'] = 'Fall al crear la regla.'; + $lang['strconfdroprule'] = 'Ests seguro que quiere eliminar la regla "%s" en "%s"?'; + $lang['strruledropped'] = 'Regla eliminada.'; + $lang['strruledroppedbad'] = 'Fall al eliminar la regla.'; + + // Constraints + $lang['strconstraint'] = 'Restriccin'; + $lang['strconstraints'] = 'Restricciones'; + $lang['strshowallconstraints'] = 'Mostrar todas las restricciones'; + $lang['strnoconstraints'] = 'No se encontraron restricciones.'; + $lang['strcreateconstraint'] = 'Crear Restriccin'; + $lang['strconstraintcreated'] = 'Restriccin creada.'; + $lang['strconstraintcreatedbad'] = 'Fall al crear la Restriccin.'; + $lang['strconfdropconstraint'] = 'Ests seguro que quiere eliminar la restriccin "%s" de "%s"?'; + $lang['strconstraintdropped'] = 'Restriccin eliminada.'; + $lang['strconstraintdroppedbad'] = 'Fall al eliminar la restriccin.'; + $lang['straddcheck'] = 'Agregar chequeo'; + $lang['strcheckneedsdefinition'] = 'Restriccin de chequeo necesita una definicin.'; + $lang['strcheckadded'] = 'Restriccin de chequeo agregada.'; + $lang['strcheckaddedbad'] = 'Fall al intentar agregar restriccin de chequeo.'; + $lang['straddpk'] = 'Agregar clave primaria'; + $lang['strpkneedscols'] = 'La clave primaria necesita al menos un campo.'; + $lang['strpkadded'] = 'Clave primaria agregada.'; + $lang['strpkaddedbad'] = 'Fall al intentar crear la clave primaria.'; + $lang['stradduniq'] = 'Agregar clave nica'; + $lang['struniqneedscols'] = 'La clave nica necesita al menos un campo.'; + $lang['struniqadded'] = 'Agregar clave nica.'; + $lang['struniqaddedbad'] = 'Fall al intentar agregar la clave nica.'; + $lang['straddfk'] = 'Agregar referencia'; + $lang['strfkneedscols'] = 'La referencia necesita al menos un campo.'; + $lang['strfkneedstarget'] = 'La referencia necesita una tabla para referenciar.'; + $lang['strfkadded'] = 'Referencia agregada.'; + $lang['strfkaddedbad'] = 'Fall al agregar la referencia.'; + $lang['strfktarget'] = 'Tabla de destino'; + $lang['strfkcolumnlist'] = 'Campos en la clave'; + $lang['strondelete'] = 'AL ELIMINAR'; + $lang['stronupdate'] = 'AL ACTUALIZAR'; + + // Functions + $lang['strfunction'] = 'Funcin'; + $lang['strfunctions'] = 'Funciones'; + $lang['strshowallfunctions'] = 'Mostrar todas las funciones'; + $lang['strnofunction'] = 'No se encontr la funcin.'; + $lang['strnofunctions'] = 'No se encontraron funciones.'; + $lang['strcreateplfunction'] = 'Crear funcin SQL/PL'; + $lang['strcreateinternalfunction'] = 'Crear funcin interna'; + $lang['strcreatecfunction'] = 'Crear funcin en C'; + $lang['strfunctionname'] = 'Nombre de la funcin'; + $lang['strreturns'] = 'Devuelve'; + $lang['strproglanguage'] = 'Lenguaje de programacin'; + $lang['strfunctionneedsname'] = 'Debe darle un nombre a la funcin.'; + $lang['strfunctionneedsdef'] = 'Debe darle una definicin a la funcin.'; + $lang['strfunctioncreated'] = 'Funcin creada.'; + $lang['strfunctioncreatedbad'] = 'Fall la creacin de la funcin.'; + $lang['strconfdropfunction'] = 'Ests seguro que quiere eliminar la funcin "%s"?'; + $lang['strfunctiondropped'] = 'Funcin eliminada.'; + $lang['strfunctiondroppedbad'] = 'Fall al eliminar la funcin.'; + $lang['strfunctionupdated'] = 'Funcin actualizada.'; + $lang['strfunctionupdatedbad'] = 'Fall al actualizar la funcin.'; + $lang['strobjectfile'] = 'Archivo de objeto'; + $lang['strlinksymbol'] = 'Vinculo simblico'; + $lang['strarguments'] = 'Argumentos'; + $lang['strargmode'] = 'Modo'; + $lang['strargtype'] = 'Tipo'; + $lang['strargadd'] = 'Agregar otro argumento'; + $lang['strargremove'] = 'Eliminar este argumento'; + $lang['strargnoargs'] = 'Esta funcin no tendr argumentos.'; + $lang['strargenableargs'] = 'Habilitar argumentos pasados a esta funcin.'; + $lang['strargnorowabove'] = 'Debe existir una fila por encima de esta fila.'; + $lang['strargnorowbelow'] = 'Debe exisitr una fila por debajo de esta fila.'; + $lang['strargraise'] = 'Mover arriba.'; + $lang['strarglower'] = 'Mover abajo.'; + $lang['strargremoveconfirm'] = 'Esta seguro que quiere eliminar este argumento? Esto NO se puede deshacer.'; + $lang['strfunctioncosting'] = 'Costo de la funcin'; + $lang['strresultrows'] = 'Filas en el resultado'; + $lang['strexecutioncost'] = 'Costo de ejecucin'; + $lang['strspecifyfunctiontodrop'] = 'Debe especificar al menos una funcin a eliminar.'; + + // Triggers + $lang['strtrigger'] = 'Disparador'; + $lang['strtriggers'] = 'Disparadores'; + $lang['strshowalltriggers'] = 'Mostrar todos los disparadores'; + $lang['strnotrigger'] = 'No se encontr el disparador.'; + $lang['strnotriggers'] = 'No se encontraron disparadores.'; + $lang['strcreatetrigger'] = 'Crear Disparador'; + $lang['strtriggerneedsname'] = 'Debe darle un nombre al disparador.'; + $lang['strtriggerneedsfunc'] = 'Debe especificar una funcin para el disparador.'; + $lang['strtriggercreated'] = 'Disparador creado.'; + $lang['strtriggercreatedbad'] = 'Fall la creacin del disparador.'; + $lang['strconfdroptrigger'] = 'Ests seguro que quiere eliminar el disparador "%s" en "%s"?'; + $lang['strconfenabletrigger'] = 'Ests seguro que desea activar el disparador "%s" en "%s"?'; + $lang['strconfdisabletrigger'] = 'Ests seguro que desea desactivar el disparador "%s" en "%s"?'; + $lang['strtriggerdropped'] = 'Disparador eliminado.'; + $lang['strtriggerdroppedbad'] = 'Fall al eliminar el disparador.'; + $lang['strtriggerenabled'] = 'Disparador activado.'; + $lang['strtriggerenabledbad'] = 'Fall la activacin del disparador.'; + $lang['strtriggerdisabled'] = 'Disparador desactivado.'; + $lang['strtriggerdisabledbad'] = 'Fall la desactivacin del disparador.'; + $lang['strtriggeraltered'] = 'Disparador modificado.'; + $lang['strtriggeralteredbad'] = 'Fall la modificacin del disparador.'; + $lang['strforeach'] = 'Para cada uno'; + + // Types + $lang['strtype'] = 'Tipo de dato'; + $lang['strtypes'] = 'Tipos de datos'; + $lang['strshowalltypes'] = 'Mostrar todos los tipos'; + $lang['strnotype'] = 'No se encontr el tipo.'; + $lang['strnotypes'] = 'No se encontraron tipos.'; + $lang['strcreatetype'] = 'Crear Tipo'; + $lang['strcreatecomptype'] = 'Crear tipo compuesto'; + $lang['strcreateenumtype'] = 'Crear tipo enumerado'; + $lang['strtypeneedsfield'] = 'Debe especificar al menos un campo.'; + $lang['strtypeneedsvalue'] = 'Debe especificar al menos un valor.'; + $lang['strtypeneedscols'] = 'Tipos compuestos requieren de un nmero vlido de columnas.'; + $lang['strtypeneedsvals'] = 'Debe especificar un nmero vlido de valores.'; + $lang['strinputfn'] = 'Funcin de entrada'; + $lang['stroutputfn'] = 'Funcin de salida'; + $lang['strpassbyval'] = 'Pasar valor?'; + $lang['stralignment'] = 'Alineamiento'; + $lang['strelement'] = 'Elemento'; + $lang['strdelimiter'] = 'Delimitador'; + $lang['strstorage'] = 'Almacenamiento'; + $lang['strfield'] = 'Campo'; + $lang['strnumfields'] = 'Nmero de campos'; + $lang['strnumvalues'] = 'Nmero de valores'; + $lang['strtypeneedsname'] = 'Debe especificar un nombre para el tipo.'; + $lang['strtypeneedslen'] = 'Debe especificar una longitud para el tipo.'; + $lang['strtypecreated'] = 'Tipo creado'; + $lang['strtypecreatedbad'] = 'Fall al crear el tipo.'; + $lang['strconfdroptype'] = 'Ests seguro que quiere eliminar el tipo "%s"?'; + $lang['strtypedropped'] = 'Tipo eliminado.'; + $lang['strtypedroppedbad'] = 'Fall al eliminar el tipo.'; + $lang['strflavor'] = 'Tipo'; + $lang['strbasetype'] = 'Base'; + $lang['strcompositetype'] = 'Compuesto'; + $lang['strpseudotype'] = 'Seudo'; + $lang['strenum'] = 'Enumerado'; + $lang['strenumvalues'] = 'Valores enumerados'; + + // Schemas + $lang['strschema'] = 'Esquema'; + $lang['strschemas'] = 'Esquemas'; + $lang['strshowallschemas'] = 'Mostrar Todos los Esquemas'; + $lang['strnoschema'] = 'No se encontr el esquema.'; + $lang['strnoschemas'] = 'No se encontraron esquemas.'; + $lang['strcreateschema'] = 'Crear Esquema'; + $lang['strschemaname'] = 'Nombre del esquema'; + $lang['strschemaneedsname'] = 'Debe especificar un nombre para el esquema.'; + $lang['strschemacreated'] = 'Esquema creado'; + $lang['strschemacreatedbad'] = 'Fall al crear el esquema.'; + $lang['strconfdropschema'] = 'Ests seguro que quiere eliminar el esquema "%s"?'; + $lang['strschemadropped'] = 'Esquema eliminado.'; + $lang['strschemadroppedbad'] = 'Fall al eliminar el esquema.'; + $lang['strschemaaltered'] = 'Esquema modificado.'; + $lang['strschemaalteredbad'] = 'La modificacin del esquema fall.'; + $lang['strsearchpath'] = 'Orden de bsqueda en los esquemas'; + $lang['strspecifyschematodrop'] = 'Debe especificar al menos un esquemaa eliminar.'; + + // Reports + $lang['strreport'] = 'Reporte'; + $lang['strreports'] = 'Reportes'; + $lang['strshowallreports'] = 'Mostrar todos los reportes'; + $lang['strnoreports'] = 'No se encontr el reporte.'; + $lang['strcreatereport'] = 'Crear Reporte'; + $lang['strreportdropped'] = 'Reporte eliminado.'; + $lang['strreportdroppedbad'] = 'Fall al eliminar el Reporte.'; + $lang['strconfdropreport'] = 'Ests seguro que quiere eliminar el reporte "%s"?'; + $lang['strreportneedsname'] = 'Debe especificar un nombre para el reporte.'; + $lang['strreportneedsdef'] = 'Debe especificar un SQL para el reporte.'; + $lang['strreportcreated'] = 'Reporte guardado.'; + $lang['strreportcreatedbad'] = 'Fall al guardar el reporte.'; + + //Domains + $lang['strdomain'] = 'Dominio'; + $lang['strdomains'] = 'Dominios'; + $lang['strshowalldomains'] = 'Mostrar todos los dominios'; + $lang['strnodomains'] = 'No se encontraron dominios.'; + $lang['strcreatedomain'] = 'Crear dominio'; + $lang['strdomaindropped'] = 'Dominio eliminado.'; + $lang['strdomaindroppedbad'] = 'Fall al intentar eliminar el dominio.'; + $lang['strconfdropdomain'] = 'Esta seguro que quiere eliminar el dominio "%s"?'; + $lang['strdomainneedsname'] = 'Debe dar un nombre para el dominio.'; + $lang['strdomaincreated'] = 'Dominio creado.'; + $lang['strdomaincreatedbad'] = 'Fall al intentar crear el dominio.'; + $lang['strdomainaltered'] = 'Dominio modificado.'; + $lang['strdomainalteredbad'] = 'Fall al intentar modificar el dominio.'; + + // Operators + $lang['stroperator'] = 'Operador'; + $lang['stroperators'] = 'Operadores'; + $lang['strshowalloperators'] = 'Mostrar todos los operadores'; + $lang['strnooperator'] = 'No se encontr el operador.'; + $lang['strnooperators'] = 'No se encontraron operadores.'; + $lang['strcreateoperator'] = 'Crear Operador'; + $lang['strleftarg'] = 'Tipo de datos del arg. izquierdo'; + $lang['strrightarg'] = 'Tipo de datos del arg. derecho'; + $lang['strcommutator'] = 'Conmutador'; + $lang['strnegator'] = 'Negacin'; + $lang['strrestrict'] = 'Restringir'; + $lang['strjoin'] = 'Unin'; + $lang['strhashes'] = 'Llaves (Hash)'; + $lang['strmerges'] = 'Fusiones'; + $lang['strleftsort'] = 'Ordenado izquierdo'; + $lang['strrightsort'] = 'Ordenado derecho'; + $lang['strlessthan'] = 'Menor que'; + $lang['strgreaterthan'] = 'Mayor que'; + $lang['stroperatorneedsname'] = 'Debe darle un nombre al operador.'; + $lang['stroperatorcreated'] = 'Operador creado'; + $lang['stroperatorcreatedbad'] = 'Fall al intentar crear el operador.'; + $lang['strconfdropoperator'] = 'Ests seguro que quiere eliminar el operador "%s"?'; + $lang['stroperatordropped'] = 'Operador eliminado.'; + $lang['stroperatordroppedbad'] = 'Fall al intentar eliminar el operador.'; + + // Casts + $lang['strcasts'] = 'Conversin de tipos'; + $lang['strnocasts'] = 'No se encontraron conversiones.'; + $lang['strsourcetype'] = 'Tipo inicial'; + $lang['strtargettype'] = 'Tipo final'; + $lang['strimplicit'] = 'Implcito'; + $lang['strinassignment'] = 'En asignacin'; + $lang['strbinarycompat'] = '(Compatible con binario)'; + + // Conversions + $lang['strconversions'] = 'Conversiones'; + $lang['strnoconversions'] = 'No se encontraron conversiones.'; + $lang['strsourceencoding'] = 'Codificacin de la fuente'; + $lang['strtargetencoding'] = 'Codificacin del destino'; + + // Languages + $lang['strlanguages'] = 'Lenguajes'; + $lang['strnolanguages'] = 'No se encontraron lenguajes.'; + $lang['strtrusted'] = 'Confiable'; + + // Info + $lang['strnoinfo'] = 'No hay informacin disponible.'; + $lang['strreferringtables'] = 'Tablas referenciales'; + $lang['strparenttables'] = 'Tablas padre'; + $lang['strchildtables'] = 'Tablas hija'; + + // Aggregates + $lang['straggregate'] = 'Agregacin'; + $lang['straggregates'] = 'Agregaciones'; + $lang['strnoaggregates'] = 'No se encontraron agregaciones.'; + $lang['stralltypes'] = '(Todos los tipos)'; + $lang['strcreateaggregate'] = 'Crear Agregacin'; + $lang['straggrbasetype'] = 'Tipo del dato de entrada'; + $lang['straggrsfunc'] = 'Funcin de transicin de estado'; + $lang['straggrstype'] = 'Tipo de dato para el valor de estado'; + $lang['straggrffunc'] = 'Funcin final'; + $lang['straggrinitcond'] = 'Condicin inicial'; + $lang['straggrsortop'] = 'Operador de ordenamiento'; + $lang['strconfdropaggregate'] = 'Ests seguro que desea eliminar la agregacin "%s"?'; + $lang['straggregatedropped'] = 'Agregacin eliminada.'; + $lang['straggregatedroppedbad'] = 'Fall al intentar eliminar agregacin.'; + $lang['straggraltered'] = 'Agregacin modificada.'; + $lang['straggralteredbad'] = 'Fall la modificacin de la agregacin.'; + $lang['straggrneedsname'] = 'Debe especificar un nombre para la agregacin.'; + $lang['straggrneedsbasetype'] = 'Debe especificar un tipo de dato de entrada para la agregacin.'; + $lang['straggrneedssfunc'] = 'Debe especificar el nombre de la funcin de transicin de estado de la agregacin.'; + $lang['straggrneedsstype'] = 'Debe especificar el tipo de dato para la el valor de estado de la agregacin.'; + $lang['straggrcreated'] = 'Agregacin creada.'; + $lang['straggrcreatedbad'] = 'Fall la creacin de la agregacin.'; + $lang['straggrshowall'] = 'Mostrar todas las agregaciones'; + + // Operator Classes + $lang['stropclasses'] = 'Clases de operadores'; + $lang['strnoopclasses'] = 'No se encontraron clases de operadores.'; + $lang['straccessmethod'] = 'Mtodo de acceso'; + + // Stats and performance + $lang['strrowperf'] = 'Rendimiento de fila'; + $lang['strioperf'] = 'Rentimiento de E/S (I/O)'; + $lang['stridxrowperf'] = 'Rendimiento de ndice de la fila'; + $lang['stridxioperf'] = 'Rentimiento de E/S (I/O)'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Secuencial'; + $lang['strscan'] = 'Escanear'; + $lang['strread'] = 'Leer'; + $lang['strfetch'] = 'Extraer'; + $lang['strheap'] = 'Salto'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'Indice TOAST'; + $lang['strcache'] = 'Cach'; + $lang['strdisk'] = 'Disco'; + $lang['strrows2'] = 'Filas'; + + // Tablespaces + $lang['strtablespace'] = 'Tablespace'; + $lang['strtablespaces'] = 'Tablespaces'; + $lang['strshowalltablespaces'] = 'Mostrar todos los tablespaces'; + $lang['strnotablespaces'] = 'No se encontraron tablespaces.'; + $lang['strcreatetablespace'] = 'Crear tablespace'; + $lang['strlocation'] = 'Ubicacin'; + $lang['strtablespaceneedsname'] = 'Debe darle un nombre al tablespace.'; + $lang['strtablespaceneedsloc'] = 'Debe dar un directorio en donde crear el tablespace.'; + $lang['strtablespacecreated'] = 'Tablespace creado.'; + $lang['strtablespacecreatedbad'] = 'Fall la creacin del tablespace.'; + $lang['strconfdroptablespace'] = 'Esta seguro que quiere eliminar el tablespace "%s"?'; + $lang['strtablespacedropped'] = 'Tablespace eliminado.'; + $lang['strtablespacedroppedbad'] = 'Fall al intenta eliminar el tablespace.'; + $lang['strtablespacealtered'] = 'Tablespace modificado.'; + $lang['strtablespacealteredbad'] = 'Fall la modificacin del Tablespace.'; + + // Slony clusters + $lang['strcluster'] = 'Clster'; + $lang['strnoclusters'] = 'No se encontraron clsteres.'; + $lang['strconfdropcluster'] = 'Ests seguro que desea eliminar el clster "%s"?'; + $lang['strclusterdropped'] = 'Clster eliminado.'; + $lang['strclusterdroppedbad'] = 'Fall la eliminacin del clster.'; + $lang['strinitcluster'] = 'Inicializar clster'; + $lang['strclustercreated'] = 'Clster inicializado.'; + $lang['strclustercreatedbad'] = 'Fall la inicializacin del clster.'; + $lang['strclusterneedsname'] = 'Debe especificar un nombre para el clster.'; + $lang['strclusterneedsnodeid'] = 'Debe especificar un ID para el nodo local.'; + + // Slony nodes + $lang['strnodes'] = 'Nodos'; + $lang['strnonodes'] = 'No se encontraron los nodos.'; + $lang['strcreatenode'] = 'Crear nodo'; + $lang['strid'] = 'ID'; + $lang['stractive'] = 'Activo'; + $lang['strnodecreated'] = 'Nodo creado.'; + $lang['strnodecreatedbad'] = 'Fall la creacin del nodo.'; + $lang['strconfdropnode'] = 'Ests seguro que desea eliminar el nodo "%s"?'; + $lang['strnodedropped'] = 'Nodo eliminado.'; + $lang['strnodedroppedbad'] = 'Fall la eliminacin del nodo.'; + $lang['strfailover'] = 'Conmutacin por error'; + $lang['strnodefailedover'] = 'Conmutacin por error del nodo.'; + $lang['strnodefailedoverbad'] = 'Fall la conmutacin por error del nodo.'; + $lang['strstatus'] = 'Estado'; + $lang['strhealthy'] = 'Estable'; + $lang['stroutofsync'] = 'Fuera de sincronizacin'; + $lang['strunknown'] = 'Desconocido'; + + // Slony paths + $lang['strpaths'] = 'Rutas'; + $lang['strnopaths'] = 'No se encontraron rutas.'; + $lang['strcreatepath'] = 'Crear ruta'; + $lang['strnodename'] = 'Nombre del nodo'; + $lang['strnodeid'] = 'ID del nodo'; + $lang['strconninfo'] = 'Cadena de conexin'; + $lang['strconnretry'] = 'Segundos de espera para reintentar la conexin'; + $lang['strpathneedsconninfo'] = 'Debe suministrar una cadena de conexin para la ruta.'; + $lang['strpathneedsconnretry'] = 'Debe suministrar el nmero de segundos de espera para reintentar la conexin.'; + $lang['strpathcreated'] = 'Ruta creada.'; + $lang['strpathcreatedbad'] = 'Fall la creacin de la ruta.'; + $lang['strconfdroppath'] = 'Est seguro que desea eliminar la ruta "%s"?'; + $lang['strpathdropped'] = 'Ruta eliminada.'; + $lang['strpathdroppedbad'] = 'Fall la eliminacin de la ruta.'; + + // Slony listens + $lang['strlistens'] = 'Listens'; + $lang['strnolistens'] = 'No se encontraron listens.'; + $lang['strcreatelisten'] = 'Crear listen'; + $lang['strlistencreated'] = 'Listen creado.'; + $lang['strlistencreatedbad'] = 'Fall la creacin del listen.'; + $lang['strconfdroplisten'] = 'Esta seguro de eliminar el listen "%s"?'; + $lang['strlistendropped'] = 'Listen eliminado.'; + $lang['strlistendroppedbad'] = 'Fall la eliminacin del listen.'; + + // Slony replication sets + $lang['strrepsets'] = 'Conjuntos de Replicacin'; + $lang['strnorepsets'] = 'No se encontraron conjuntos de replicacin.'; + $lang['strcreaterepset'] = 'Crear un conjunto de replicacin'; + $lang['strrepsetcreated'] = 'Conjunto de replicacin creada.'; + $lang['strrepsetcreatedbad'] = 'Fall la creacin del conjunto de replicacin.'; + $lang['strconfdroprepset'] = 'Ests seguro que desea eliminar el conjunto de replicacin "%s"?'; + $lang['strrepsetdropped'] = 'Conjunto de replicacin eliminado.'; + $lang['strrepsetdroppedbad'] = 'Fall la eliminacin del conjunto de replicacin.'; + $lang['strmerge'] = 'Unir'; + $lang['strmergeinto'] = 'Unir a'; + $lang['strrepsetmerged'] = 'Conjuntos de replicacin unidos.'; + $lang['strrepsetmergedbad'] = 'Fall la union de los conjuntos de replicacin.'; + $lang['strmove'] = 'Mover'; + $lang['strneworigin'] = 'Origen Nuevo'; + $lang['strrepsetmoved'] = 'Mover el conjunto de replicacin.'; + $lang['strrepsetmovedbad'] = 'Fall al mover el conjunto de replicacin.'; + $lang['strnewrepset'] = 'Nuevo conjunto de replicacin'; + $lang['strlock'] = 'Bloquear'; + $lang['strlocked'] = 'Bloqueado'; + $lang['strunlock'] = 'Desbloquear'; + $lang['strconflockrepset'] = 'Ests seguro que desea bloquear el conjunto de replicacin "%s"?'; + $lang['strrepsetlocked'] = 'Conjunto de replicacin bloqueado.'; + $lang['strrepsetlockedbad'] = 'Fall el bloqueo del conjunto de replicacin.'; + $lang['strconfunlockrepset'] = 'Ests seguro que desea desbloquear el conjunto de replicacin "%s"?'; + $lang['strrepsetunlocked'] = 'Conjunto de replicacin desbloqueado.'; + $lang['strrepsetunlockedbad'] = 'Fall el desbloqueo del conjunto de replicacin.'; + $lang['stronlyonnode'] = 'Slo en el nodo'; + $lang['strddlscript'] = 'Script DDL'; + $lang['strscriptneedsbody'] = 'Debe suministrar un script para aplicar en los nodos.'; + $lang['strscriptexecuted'] = 'Ejecutado el script DDL del conjunto de replicacin.'; + $lang['strscriptexecutedbad'] = 'Fall la ejecucin del script DDL del conjunto de replicacin.'; + $lang['strtabletriggerstoretain'] = 'Los siguientes disparadores no sern desactivados por Slony:'; + + // Slony tables in replication sets + $lang['straddtable'] = 'Agregar tabla'; + $lang['strtableneedsuniquekey'] = 'La tabla a agregar requiere una clave primaria o nica.'; + $lang['strtableaddedtorepset'] = 'Tabla agregada al conjunto de replicacin.'; + $lang['strtableaddedtorepsetbad'] = 'Fall al agregar la tabla al conjunto de replicacin.'; + $lang['strconfremovetablefromrepset'] = 'Ests seguro de eliminar la tabla "%s" del conjunto de replicacin "%s"?'; + $lang['strtableremovedfromrepset'] = 'Tabla eliminada del conjunto de replicacin.'; + $lang['strtableremovedfromrepsetbad'] = 'Fall la eliminacin de la tabla del conjunto de replicacin.'; + + // Slony sequences in replication sets + $lang['straddsequence'] = 'Agregar secuencia'; + $lang['strsequenceaddedtorepset'] = 'Agregar secuencia al conjunto de replicacin.'; + $lang['strsequenceaddedtorepsetbad'] = 'Fall al agregar la secuencia al conjunto de replicacin.'; + $lang['strconfremovesequencefromrepset'] = 'Este seguro que desea eliminar la secuencia "%s" del conjunto de replicacin "%s"?'; + $lang['strsequenceremovedfromrepset'] = 'Secuencia eliminada del conjunto de replicacin.'; + $lang['strsequenceremovedfromrepsetbad'] = 'Fall la eliminacin de la secuencia del conjunto de replicacin.'; + + // Slony subscriptions + $lang['strsubscriptions'] = 'Suscripciones'; + $lang['strnosubscriptions'] = 'No se encontraron suscripciones.'; + + // Miscellaneous + $lang['strtopbar'] = '%s corriendo en %s:%s -- Usted ha iniciado sesin con el usuario "%s"'; + $lang['strtimefmt'] = 'd/m/Y, G:i:s'; + $lang['strhelp'] = 'Ayuda'; + $lang['strhelpicon'] = '?'; + $lang['strhelppagebrowser'] = 'Buscador de la pgina de ayda'; + $lang['strselecthelppage'] = 'Seleccione una pgina de ayuda'; + $lang['strinvalidhelppage'] = 'Pgina de ayuda invlida.'; + $lang['strlogintitle'] = 'Iniciar sesin en %s'; + $lang['strlogoutmsg'] = 'Saliendo de %s'; + $lang['strloading'] = 'Cargando...'; + $lang['strerrorloading'] = 'Error al cargar'; + $lang['strclicktoreload'] = 'Clic para recargar'; + + // Autovacuum + $lang['strautovacuum'] = 'Autolimpiado'; + $lang['strturnedon'] = 'Encendido'; + $lang['strturnedoff'] = 'Apagado'; + $lang['strenabled'] = 'Habilitado'; + $lang['strnovacuumconf'] = 'No se encontr configuracin para autolimpiar.'; + $lang['strvacuumbasethreshold'] = 'Umbral de limpiar'; + $lang['strvacuumscalefactor'] = 'Factor de escala de limpiado'; + $lang['stranalybasethreshold'] = 'Analizar umbral base'; + $lang['stranalyzescalefactor'] = 'Analizar Facor de Escala'; + $lang['strvacuumcostdelay'] = 'Tiempo de retraso para limpiar'; + $lang['strvacuumcostlimit'] = 'Limite del costo de limpiar'; + $lang['strvacuumpertable'] = 'Configuracin de autolimpiar de cada tabla'; + $lang['straddvacuumtable'] = 'Agregar configuracin de autolimpiar a una tabla'; + $lang['streditvacuumtable'] = 'Editar configuracin de autolimpiar para la tabla %s'; + $lang['strdelvacuumtable'] = 'Eliminar configuracin de autolimpiar para la tabla %s ?'; + $lang['strvacuumtablereset'] = 'Reiniciar configuracin de autolimpiar para la tabla %s '; + $lang['strdelvacuumtablefail'] = 'Fall al remover la configuracin de autolimpiar para la tabla %s'; + $lang['strsetvacuumtablesaved'] = 'Configuracin de autolimpiar %s guardada.'; + $lang['strsetvacuumtablefail'] = 'Fall la configuracin de autolimpiar para la tabla %s.'; + $lang['strspecifydelvacuumtable'] = 'Debe especificar la tabla a la que deseas removerle los parmetros de autolimpiar.'; + $lang['strspecifyeditvacuumtable'] = 'Debe especificar la tabla a la que deseeas editarle los parmetros de autolimpiar.'; + $lang['strnotdefaultinred'] = 'Los valores en rojo no son los valores por defecto.'; + + // Table-level Locks + $lang['strlocks'] = 'Bloqueos'; + $lang['strtransaction'] = 'ID de la transaccin'; + $lang['strvirtualtransaction'] = 'ID de la transaccin virtual'; + $lang['strprocessid'] = 'ID de proceso'; + $lang['strmode'] = 'Modo de bloqueo'; + $lang['strislockheld'] = 'Se mantiene el bloqueo?'; + + // Prepared transactions + $lang['strpreparedxacts'] = 'Transacciones preparadas'; + $lang['strxactid'] = 'ID de la Transaccin'; + $lang['strgid'] = 'ID Global'; + + // Fulltext search + $lang['strfulltext'] = 'Bsqueda de texto completo'; + $lang['strftsconfig'] = 'Configuracin de BTC'; + $lang['strftsconfigs'] = 'Configuraciones'; + $lang['strftscreateconfig'] = 'Crear configuracin de BTC'; + $lang['strftscreatedict'] = 'Crear diccionario'; + $lang['strftscreatedicttemplate'] = 'Crear plantilla de dicionario'; + $lang['strftscreateparser'] = 'Crear analizador'; + $lang['strftsnoconfigs'] = 'No se encontr configuracin de bsqueda de texto completo.'; + $lang['strftsconfigdropped'] = 'Configuracin de bsqueda de texto completo eliminada.'; + $lang['strftsconfigdroppedbad'] = 'Fall la eliminacin de la configuracin de bsqueda de texto completo.'; + $lang['strconfdropftsconfig'] = 'Ests seguro de eliminar la configuracin de bsqueda de texto completo "%s"?'; + $lang['strconfdropftsdict'] = 'Ests seguro eliminar el diccionario de BTC "%s"?'; + $lang['strconfdropftsmapping'] = 'Ests seguro de eliminar la asignacin "%s" de la configuracin de BTC "%s"?'; + $lang['strftstemplate'] = 'Plantilla'; + $lang['strftsparser'] = 'Analizador'; + $lang['strftsconfigneedsname'] = 'Debe suministrar un nombre para la configuracin de la BTC.'; + $lang['strftsconfigcreated'] = 'Configuracin de BTC creada.'; + $lang['strftsconfigcreatedbad'] = 'Fall la creacin de BTC.'; + $lang['strftsmapping'] = 'Asignacin'; + $lang['strftsdicts'] = 'Diccionarios'; + $lang['strftsdict'] = 'Diccionario'; + $lang['strftsemptymap'] = 'Configuracin vaca de la asignacin de BTC .'; + $lang['strftsconfigaltered'] = 'Configuracin de BTC modificada.'; + $lang['strftsconfigalteredbad'] = 'Fall la modificacin de la configuracin de BTC.'; + $lang['strftsconfigmap'] = 'Configuracin de asignacin de BTC'; + $lang['strftsparsers'] = 'Analizadores de BTC'; + $lang['strftsnoparsers'] = 'No hay analizadores de BTC disponibles.'; + $lang['strftsnodicts'] = 'No hay diccionarios de BTC disponibles.'; + $lang['strftsdictcreated'] = 'Diccionario de BTC creado.'; + $lang['strftsdictcreatedbad'] = 'Fall la creacin del diccionario BTC.'; + $lang['strftslexize'] = 'Analizar lxicamente'; + $lang['strftsinit'] = 'Iniciar'; + $lang['strftsoptionsvalues'] = 'Opciones y valores'; + $lang['strftsdictneedsname'] = 'Debe suministrar un nombre para el diccionario de BTC.'; + $lang['strftsdictdropped'] = 'Diccionario de BTC eliminado.'; + $lang['strftsdictdroppedbad'] = 'Fall la eliminacin del diccionario de BTC.'; + $lang['strftsdictaltered'] = 'Diccionario de BTC modificado.'; + $lang['strftsdictalteredbad'] = 'Fall la modificacin del diccionario de BTC.'; + $lang['strftsaddmapping'] = 'Agregar nueva asignacin'; + $lang['strftsspecifymappingtodrop'] = 'Debe especificar al menos una asignacin a eliminar.'; + $lang['strftsspecifyconfigtoalter'] = 'Debe especificar una configuracin de BTC a modificar'; + $lang['strftsmappingdropped'] = 'Asignacin de BTC eliminada.'; + $lang['strftsmappingdroppedbad'] = 'Fall la eliminacin de la asignacin de BTC.'; + $lang['strftsnodictionaries'] = 'No se encontrarn diccionarios.'; + $lang['strftsmappingaltered'] = 'Asignacin de BTC modificada.'; + $lang['strftsmappingalteredbad'] = 'Fall la modificacin de la asignacin de BTC.'; + $lang['strftsmappingadded'] = 'Asignacin de BTC agregada.'; + $lang['strftsmappingaddedbad'] = 'Fall la asignacin de BTC.'; + $lang['strftstabconfigs'] = 'Configuraciones'; + $lang['strftstabdicts'] = 'Diccionarios'; + $lang['strftstabparsers'] = 'Analizadores'; + $lang['strftscantparsercopy'] = 'No se puede especificar tanto el analizador como la plantilla durante la creacin de la configuracin de la bsqueda de texto.'; +?> diff --git a/php/pgadmin/lang/swedish.php b/php/pgadmin/lang/swedish.php new file mode 100644 index 0000000..b37d51d --- /dev/null +++ b/php/pgadmin/lang/swedish.php @@ -0,0 +1,580 @@ + + * Due to lack of SQL knowledge som translations may be wrong, mail me the correct one and ill fix it + * + * $Id: swedish.php,v 1.11 2007/04/24 11:42:07 soranzo Exp $ + */ + + // Language and character set + $lang['applang'] = 'Swedish'; + $lang['appcharset'] = 'ISO-8859-1'; + $lang['applocale'] = 'sv_SE'; + $lang['appdbencoding'] = 'LATIN1'; + $lang['applangdir'] = 'ltr'; + + // Welcome + $lang['strintro'] = 'Vlkommen till phpPgAdmin.'; + $lang['strppahome'] = 'phpPgAdmins Hemsida'; + $lang['strpgsqlhome'] = 'PostgreSQLs Hemsida'; + $lang['strpgsqlhome_url'] = 'http://www.postgresql.org/'; + $lang['strlocaldocs'] = 'PostgreSQLs Dokumentation (lokalt)'; + $lang['strreportbug'] = 'Rapportera ett fel'; + $lang['strviewfaq'] = 'Visa Frgor & Svar'; + $lang['strviewfaq_url'] = 'http://phppgadmin.sourceforge.net/?page=faq'; + + // Basic strings + $lang['strlogin'] = 'Logga in'; + $lang['strloginfailed'] = 'Inloggningen misslyckades'; + $lang['strlogindisallowed'] = 'Inloggningen ej tillten'; + $lang['strserver'] = 'Server'; + $lang['strlogout'] = 'Logga ut'; + $lang['strowner'] = 'gare'; + $lang['straction'] = 'tgrd'; + $lang['stractions'] = 'tgrder'; + $lang['strname'] = 'Namn'; + $lang['strdefinition'] = 'Definition'; + $lang['strproperties'] = 'Egenskaper'; + $lang['strbrowse'] = 'Blddra'; + $lang['strdrop'] = 'Ta bort'; + $lang['strdropped'] = 'Borttagen'; + $lang['strnull'] = 'Ingenting'; + $lang['strnotnull'] = 'Inte Ingenting'; + $lang['strfirst'] = '<< Frsta'; + $lang['strlast'] = 'Sista >>'; + $lang['strprev'] = 'Fregende'; + $lang['strfailed'] = 'Misslyckades'; + $lang['strnext'] = 'Nsta'; + $lang['strcreate'] = 'Skapa'; + $lang['strcreated'] = 'Skapad'; + $lang['strcomment'] = 'Kommentar'; + $lang['strlength'] = 'Lngd'; + $lang['strdefault'] = 'Standardvrde'; + $lang['stralter'] = 'ndra'; + $lang['strok'] = 'OK'; + $lang['strcancel'] = 'ngra'; + $lang['strsave'] = 'Spara'; + $lang['strreset'] = 'Nollstll'; + $lang['strinsert'] = 'Infoga'; + $lang['strselect'] = 'Vlj'; + $lang['strdelete'] = 'Radera'; + $lang['strupdate'] = 'Uppdatera'; + $lang['strreferences'] = 'Referencer'; + $lang['stryes'] = 'Ja'; + $lang['strno'] = 'Nej'; + $lang['strtrue'] = 'Sant'; + $lang['strfalse'] = 'Falskt'; + $lang['stredit'] = 'Redigera'; + $lang['strcolumns'] = 'Kolumner'; + $lang['strrows'] = 'Rad(er)'; + $lang['strrowsaff'] = 'Rad(er) Pverkade.'; + $lang['strobjects'] = 'Objekt'; + $lang['strexample'] = 't. ex.'; + $lang['strback'] = 'Bakt'; + $lang['strqueryresults'] = 'Skresultat'; + $lang['strshow'] = 'Visa'; + $lang['strempty'] = 'Tom'; + $lang['strlanguage'] = 'Sprk'; + $lang['strencoding'] = 'Kodning'; + $lang['strvalue'] = 'Vrde'; + $lang['strunique'] = 'Unik'; + $lang['strprimary'] = 'Primr'; + $lang['strexport'] = 'Exportera'; + $lang['strimport'] = 'Importera'; + $lang['strsql'] = 'SQL'; + $lang['strgo'] = 'Kr'; + $lang['stradmin'] = 'Admin'; + $lang['strvacuum'] = 'Stda upp'; + $lang['stranalyze'] = 'Analysera'; + $lang['strclusterindex'] = 'Kluster'; + $lang['strclustered'] = 'Klustrat?'; + $lang['strreindex'] = 'terindexera'; + $lang['strrun'] = 'Kr'; + $lang['stradd'] = 'Lgg till'; + $lang['strinstead'] = 'Gr Istllet'; + $lang['strevent'] = 'Hndelse'; + $lang['strformat'] = 'Format'; + $lang['strwhen'] = 'Nr'; + $lang['strdata'] = 'Data'; + $lang['strconfirm'] = 'Bekrfta'; + $lang['strexpression'] = 'Uttryck'; + $lang['strellipsis'] = '...'; + $lang['strwhere'] = 'Nr'; + $lang['strexplain'] = 'Frklara'; + $lang['strfind'] = 'Sk'; + $lang['stroptions'] = 'Alternativ'; + $lang['strrefresh'] = 'Uppdatera'; + $lang['strcollapse'] = 'Frminska'; + $lang['strexpand'] = 'Utka'; + $lang['strdownload'] = 'Ladda ner'; + $lang['strdownloadgzipped'] = 'Ladda ner komprimerat med gzip'; + $lang['strinfo'] = 'Info'; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = 'Avancerat'; + $lang['strvariables'] = 'Variabler'; + $lang['strprocess'] = 'Process'; + $lang['strprocesses'] = 'Processer'; + $lang['strsetting'] = 'Instllning'; + $lang['strparameters'] = 'Parametrar'; + + // Error handling + $lang['strnotloaded'] = 'Du har inte kompilerat in korrekt databasstd i din PHP-installation.'; + $lang['strbadconfig'] = 'Din config.inc.php r ej uppdaterad. Du mste terskapa den frn den nya config.inc.php-dist.'; + $lang['strbadencoding'] = 'Misslyckades att stta klientkodning i databasen.'; + $lang['strbadschema'] = 'Otilltet schema angett.'; + $lang['strinstatement'] = 'I pstende:'; + $lang['strsqlerror'] = 'SQL fel:'; + $lang['strinvalidparam'] = 'Otilltna scriptparametrar.'; + $lang['strnodata'] = 'Hittade inga rader.'; + $lang['strnoobjects'] = 'Hittade inga objekt.'; + $lang['strrownotunique'] = 'Ingen unik nyckel fr denna rad.'; + $lang['strnoreportsdb'] = 'Du har inte skapat ngon rapportdatabas. Ls filen INSTALL fr instruktioner.'; + + // Tables + $lang['strtable'] = 'Tabell'; + $lang['strtables'] = 'Tabeller'; + $lang['strshowalltables'] = 'Visa alla tabeller'; + $lang['strnotables'] = 'Hittade inga tabeller.'; + $lang['strnotable'] = 'Hittade ingen tabell.'; + $lang['strcreatetable'] = 'Skapa tabell'; + $lang['strtablename'] = 'Tabellnamn'; + $lang['strtableneedsname'] = 'Du mste ge ett namn till din tabell.'; + $lang['strtableneedsfield'] = 'Du mste ange minst ett flt.'; + $lang['strtableneedscols'] = 'tabeller krver ett tilltet antal kolumner.'; + $lang['strtablecreated'] = 'Tabell skapad.'; + $lang['strtablecreatedbad'] = 'Misslyckades med att skapa Tabell.'; + $lang['strconfdroptable'] = 'r du sker p att du vill ta bort tabellen "%s"?'; + $lang['strtabledropped'] = 'Tabellen borttagen.'; + $lang['strinsertrow'] = 'Infoga rad'; + $lang['strtabledroppedbad'] = 'Misslyckades med att ta bort tabellen.'; + $lang['strrowinserted'] = 'Rad infogad.'; + $lang['strconfemptytable'] = 'r du sker p att du vill tmma tabellen "%s"?'; + $lang['strrowupdated'] = 'Rad uppdaterad.'; + $lang['strrowinsertedbad'] = 'Misslyckades att infoga rad.'; + $lang['strtableemptied'] = 'Tabellen tmd.'; + $lang['strrowupdatedbad'] = 'Misslyckades att uppdatera rad.'; + $lang['streditrow'] = 'ndra rad'; + $lang['strrowdeleted'] = 'Rad raderad.'; + $lang['strrowdeletedbad'] = 'Misslyckades att radera rad.'; + $lang['strfield'] = 'Flt'; + $lang['strconfdeleterow'] = 'r du sker p att du vill ta bort denna rad?'; + $lang['strnumfields'] = 'Antal flt'; + $lang['strsaveandrepeat'] = 'Infoga & Upprepa'; + $lang['strtableemptiedbad'] = 'Misslyckades med att tmma tabellen'; + $lang['strdeleterow'] = 'Radera rad'; + $lang['strfields'] = 'Flt'; + $lang['strfieldneedsname'] = 'Du mste namnge fltet'; + $lang['strcolumndropped'] = 'Kolumn raderad.'; + $lang['strselectallfields'] = 'Vlj alla flt'; + $lang['strselectneedscol'] = 'Du mste visa minst en kolumn'; + $lang['strselectunary'] = 'Unra operander kan ej ha vrden.'; + $lang['strcolumnaltered'] = 'Kolumn ndrad.'; + $lang['straltercolumn'] = 'ndra kolumn'; + $lang['strcolumnalteredbad'] = 'Misslyckades att ndra kolumn.'; + $lang['strconfdropcolumn'] = 'r du sker p att du vill radera kolumn "%s" frn tabell "%s"?'; + $lang['strcolumndroppedbad'] = 'Misslyckades att radera kolumn.'; + $lang['straddcolumn'] = 'Lgg till kolumn'; + $lang['strcolumnadded'] = 'Kolumn inlagd.'; + $lang['strcolumnaddedbad'] = 'Misslyckades att lgga till kolumne.'; + $lang['strcascade'] = 'KASKAD'; + $lang['strdataonly'] = 'Endast Data'; + $lang['strtablealtered'] = 'Tabell ndrad.'; + $lang['strtablealteredbad'] = 'Misslyckades att ndra tabell.'; + + // Users + $lang['struser'] = 'Anvndare'; + $lang['strusers'] = 'Anvndare'; + $lang['strusername'] = 'Anvndarnamn'; + $lang['strpassword'] = 'Lsenord'; + $lang['strsuper'] = 'Superanvndare?'; + $lang['strcreatedb'] = 'Skapa Databas?'; + $lang['strexpires'] = 'Utgngsdatum'; + $lang['strsessiondefaults'] = 'Sessionsinstllningar'; + $lang['strnewname'] = 'Nytt namn'; + $lang['strnousers'] = 'Hittade inga anvndare.'; + $lang['strrename'] = 'Dp om'; + $lang['struserrenamed'] = 'Anvndarnamn ndrat.'; + $lang['struserrenamedbad'] = 'Misslyckades att dpa om anvndare.'; + $lang['struserupdated'] = 'Anvndare uppdaterad.'; + $lang['struserupdatedbad'] = 'Misslyckades att uppdatera anvndare.'; + $lang['strshowallusers'] = 'Visa alla anvndare'; + $lang['strcreateuser'] = 'Skapa anvndare'; + $lang['struserneedsname'] = 'Du mste namnge anvndaren.'; + $lang['strconfdropuser'] = 'r du sker p att du vill radera anvndaren "%s"?'; + $lang['strusercreated'] = 'Anvndare skapad.'; + $lang['strusercreatedbad'] = 'Misslyckades att skapa anvndare.'; + $lang['struserdropped'] = 'Anvndare raderad.'; + $lang['struserdroppedbad'] = 'Misslyckades att radera anvndare.'; + $lang['straccount'] = 'Konton'; + $lang['strchangepassword'] = 'ndra lsenord'; + $lang['strpasswordchanged'] = 'Lsenord ndrat.'; + $lang['strpasswordchangedbad'] = 'Misslyckades att ndra lsenord.'; + $lang['strpasswordshort'] = 'Fr f tecken i lsenordet.'; + $lang['strpasswordconfirm'] = 'Lsenordet r inte samma som bekrftelsen.'; + $lang['strgroup'] = 'Grupp'; + $lang['strgroups'] = 'Grupper'; + $lang['strnogroup'] = 'Hittade ej grupp.'; + $lang['strnogroups'] = 'Hittade inga grupper.'; + $lang['strcreategroup'] = 'Skapa grupp'; + $lang['strshowallgroups'] = 'Visa alla grupper'; + $lang['strgroupneedsname'] = 'Du mste namnge din grupp.'; + $lang['strgroupcreated'] = 'Grupp skapad.'; + $lang['strgroupdropped'] = 'Grupp raderad.'; + $lang['strgroupcreatedbad'] = 'Misslyckades att skapa grupp.'; + $lang['strconfdropgroup'] = 'r du sker p att du vill radera grupp "%s"?'; + $lang['strprivileges'] = 'Rttigheter'; + $lang['strgrant'] = 'Tillt'; + $lang['strgranted'] = 'Rttigheter ndrade.'; + $lang['strgroupdroppedbad'] = 'Misslyckades att radera grupp.'; + $lang['straddmember'] = 'Lgg till medlem'; + $lang['strmemberadded'] = 'Medlem inlagd.'; + $lang['strmemberaddedbad'] = 'Misslyckades att lgga till medlem.'; + $lang['strdropmember'] = 'Radera medlem'; + $lang['strconfdropmember'] = 'r du sker p att du vill radera medlem "%s" frn gruppen "%s"?'; + $lang['strmemberdropped'] = 'Medlem raderad.'; + $lang['strmemberdroppedbad'] = 'Misslyckades att radera medlem.'; + $lang['strprivilege'] = 'Rttighet'; + $lang['strnoprivileges'] = 'Detta objekt har standard garrttigheter.'; + $lang['strmembers'] = 'Medelemmar'; + $lang['strrevoke'] = 'Ta tillbaka'; + $lang['strgrantbad'] = 'Du mste ange minst en anvndare eller grupp och minst en rttighet.'; + $lang['strgrantfailed'] = 'Misslyckades att ndra rttigheter.'; + $lang['stralterprivs'] = 'ndra rttigheter'; + $lang['strdatabase'] = 'Databas'; + $lang['strdatabasedropped'] = 'Databas raderad.'; + $lang['strdatabases'] = 'Databaser'; + $lang['strentersql'] = 'Ange SQL att kra:'; + $lang['strgrantor'] = 'Tillstndsgivare'; + $lang['strasterisk'] = '*'; + $lang['strshowalldatabases'] = 'Visa alla databaser'; + $lang['strnodatabase'] = 'Hittade ingen databas.'; + $lang['strnodatabases'] = 'Hittade inga databaser.'; + $lang['strcreatedatabase'] = 'Skapa databas'; + $lang['strdatabasename'] = 'Databasnamn'; + $lang['strdatabaseneedsname'] = 'Du mste namnge databasen.'; + $lang['strdatabasecreated'] = 'Databas skapad.'; + $lang['strdatabasecreatedbad'] = 'Misslyckades att skapa databas.'; + $lang['strconfdropdatabase'] = 'r du sker p att du vill radera databas "%s"?'; + $lang['strdatabasedroppedbad'] = 'Misslyckades att radera databas.'; + $lang['strsqlexecuted'] = 'SQL-kommando utfrt.'; + $lang['strvacuumgood'] = 'Uppstdning utfrd.'; + $lang['strvacuumbad'] = 'Uppstdning misslyckades.'; + $lang['stranalyzegood'] = 'Analysen lyckades.'; + $lang['stranalyzebad'] = 'Analysen misslyckades.'; + $lang['strstructureonly'] = 'Endast struktur'; + $lang['strstructureanddata'] = 'Struktur och data'; + + // Views + $lang['strview'] = 'Vy'; + $lang['strviews'] = 'Vyer'; + $lang['strshowallviews'] = 'Visa alla vyer'; + $lang['strnoview'] = 'Hittade ingen vy.'; + $lang['strnoviews'] = 'Hittade inga vyer.'; + $lang['strcreateview'] = 'Skapa vy'; + $lang['strviewname'] = 'Vynamn'; + $lang['strviewneedsname'] = 'Du mste namnge Vy.'; + $lang['strviewneedsdef'] = 'Du mste ange en definition fr din vy.'; + $lang['strviewcreated'] = 'Vy skapad.'; + $lang['strviewcreatedbad'] = 'Misslyckades att skapa vy.'; + $lang['strconfdropview'] = 'r du sker p att du vill radera vyn "%s"?'; + $lang['strviewdropped'] = 'Vy raderad.'; + $lang['strviewdroppedbad'] = 'Misslyckades att radera vy.'; + $lang['strviewupdated'] = 'Vy uppdaterad.'; + $lang['strviewupdatedbad'] = 'Misslyckades att uppdatera vy.'; + $lang['strviewlink'] = 'Lnkade nycklar'; + $lang['strviewconditions'] = 'Ytterligare villkor'; + + // Sequences + $lang['strsequence'] = 'Sekvens'; + $lang['strsequences'] = 'Sekvenser'; + $lang['strshowallsequences'] = 'Visa alla sekvenser'; + $lang['strnosequence'] = 'Hittade ingen sekvens.'; + $lang['strnosequences'] = 'Hittade inga sekvenser.'; + $lang['strcreatesequence'] = 'Skapa sekvens'; + $lang['strlastvalue'] = 'Senaste vrde'; + $lang['strincrementby'] = 'ka med'; + $lang['strstartvalue'] = 'Startvrde'; + $lang['strmaxvalue'] = 'Strsta vrde'; + $lang['strminvalue'] = 'Minsta vrde'; + $lang['strcachevalue'] = 'Vrde p cache'; + $lang['strlogcount'] = 'Rkna log'; + $lang['striscycled'] = 'r upprepad?'; + $lang['strsequenceneedsname'] = 'Du mste ge ett namn till din sekvens.'; + $lang['strsequencecreated'] = 'Sekvens skapad.'; + $lang['strsequencecreatedbad'] = 'Misslyckades att skapa sekvens.'; + $lang['strconfdropsequence'] = 'r du sker p att du vill radera sekvensen "%s"?'; + $lang['strsequencedropped'] = 'Sekvensen borrtagen.'; + $lang['strsequencedroppedbad'] = 'Misslyckades att radera sekvens.'; + + // Indexes + $lang['strindex'] = 'Index'; + $lang['strindexes'] = 'Index'; + $lang['strindexname'] = 'Indexnamn'; + $lang['strshowallindexes'] = 'Visa alla index'; + $lang['strnoindex'] = 'Hittade inget index.'; + $lang['strsequencereset'] = 'Nollstll sekvens.'; + $lang['strsequenceresetbad'] = 'Misslyckades att nollstlla sekvens.'; + $lang['strnoindexes'] = 'Hittade inga index.'; + $lang['strcreateindex'] = 'Skapa index'; + $lang['strindexname'] = 'Indexnamn'; + $lang['strtabname'] = 'Tabellnamn'; + $lang['strcolumnname'] = 'Kolumnnamn'; + $lang['strindexneedsname'] = 'Du mste ge ett namn fr ditt index'; + $lang['strindexneedscols'] = 'Det krvs ett giltigt antal kolumner fr index.'; + $lang['strindexcreated'] = 'Index skapat'; + $lang['strindexcreatedbad'] = 'Misslyckades att skapa index.'; + $lang['strconfdropindex'] = 'r du sker p att du vill radera index "%s"?'; + $lang['strindexdropped'] = 'Index raderat.'; + $lang['strindexdroppedbad'] = 'Misslyckades att radera index.'; + $lang['strkeyname'] = 'Nyckelvrdesnamn'; + $lang['struniquekey'] = 'Unikt nyckelvrde'; + $lang['strprimarykey'] = 'Primrnyckel'; + $lang['strindextype'] = 'Typ av index'; + $lang['strindexname'] = 'Indexnamn'; + $lang['strtablecolumnlist'] = 'Tabellkolumner'; + $lang['strindexcolumnlist'] = 'Indexkolumner'; + $lang['strconfcluster'] = 'r du sker p att du vill klustra "%s"?'; + $lang['strclusteredgood'] = 'Klustring avslutad.'; + $lang['strclusteredbad'] = 'Klustring misslyckades.'; + + // Rules + $lang['strrules'] = 'Regler'; + $lang['strrule'] = 'Regel'; + $lang['strshowallrules'] = 'Visa alla regler'; + $lang['strnorule'] = 'Hittade ingen regel.'; + $lang['strnorules'] = 'Hittade inga regler.'; + $lang['strcreaterule'] = 'Skapa regel'; + $lang['strrulename'] = 'Regelnamn'; + $lang['strruleneedsname'] = 'Du mste ge ett namn till din regel.'; + $lang['strrulecreated'] = 'Regel skapad.'; + $lang['strrulecreatedbad'] = 'Misslyckades att skapa regel.'; + $lang['strconfdroprule'] = 'r du sker p att du vill radera regel "%s" fr "%s"?'; + $lang['strruledropped'] = 'Regel raderat.'; + $lang['strruledroppedbad'] = 'Misslyckades att radera regel.'; + + // Constraints + $lang['strconstraints'] = 'Begrnsningar'; + $lang['strshowallconstraints'] = 'Visa alla begrnsningar'; + $lang['strnoconstraints'] = 'Hittade inga begrnsningar.'; + $lang['strcreateconstraint'] = 'Skapa begrnsning'; + $lang['strconstraintcreated'] = 'Begrnsning skapad.'; + $lang['strconstraintcreatedbad'] = 'Misslyckades att skapa begrnsning.'; + $lang['strconfdropconstraint'] = 'r du sker p att du vill radera begrnsning "%s" fr "%s"?'; + $lang['strconstraintdropped'] = 'Begrnsning raderad.'; + $lang['strconstraintdroppedbad'] = 'Misslyckades att radera begrnsning.'; + $lang['straddcheck'] = 'Lgg till en koll'; + $lang['strcheckneedsdefinition'] = 'En kollbegrnsning behver definieras.'; + $lang['strcheckadded'] = 'Kollbegrnsning inlagd.'; + $lang['strcheckaddedbad'] = 'Misslyckades att lgga till en koll.'; + $lang['straddpk'] = 'Lgg till primrnyckel'; + $lang['strpkneedscols'] = 'Primrnyckel behver minst en kolumn.'; + $lang['strpkadded'] = 'Primrnyckel inlagd.'; + $lang['strpkaddedbad'] = 'Misslyckades att lgga till primrnyckel.'; + $lang['stradduniq'] = 'Lgg till Unikt nyckelvrde'; + $lang['struniqneedscols'] = 'Unikt nyckelvrde behver minst en kolumn.'; + $lang['struniqadded'] = 'Unikt nyckelvrde inlagt.'; + $lang['struniqaddedbad'] = 'Misslyckades att lgga till unikt nyckelvrde.'; + $lang['straddfk'] = 'Lgg till utomstende nyckel'; + $lang['strfkneedscols'] = 'Utomstende nyckel behver minst en kolumn.'; + $lang['strfkneedstarget'] = 'Utomstende nycket behver en mltabell.'; + $lang['strfkadded'] = 'Utomstende nyckel inlagd.'; + $lang['strfkaddedbad'] = 'Misslyckades att lgga till utomstende nyckel.'; + $lang['strfktarget'] = 'Mltabell'; + $lang['strfkcolumnlist'] = 'Kolumner i nyckel'; + $lang['strondelete'] = 'VID RADERING'; + $lang['stronupdate'] = 'VID UPPDATERING'; + + // Functions + $lang['strfunction'] = 'Funktion'; + $lang['strfunctions'] = 'Funktioner'; + $lang['strshowallfunctions'] = 'Visa alla funktioner'; + $lang['strnofunction'] = 'Hittade ingen funktion.'; + $lang['strnofunctions'] = 'Hittade inga funktioner.'; + $lang['strcreatefunction'] = 'Skapa funktion'; + $lang['strfunctionname'] = 'Funktionsnamn'; + $lang['strreturns'] = 'terger'; + $lang['strarguments'] = 'Argument'; + $lang['strfunctionneedsname'] = 'Du mste namnge din funktion.'; + $lang['strfunctionneedsdef'] = 'Du mste definiera din funktion.'; + $lang['strfunctioncreated'] = 'Funktion skapad.'; + $lang['strfunctioncreatedbad'] = 'Misslyckades att skapa funktion.'; + $lang['strconfdropfunction'] = 'r du sker p att du vill radera funktionen "%s"?'; + $lang['strproglanguage'] = 'Programmeringssprk'; + $lang['strfunctiondropped'] = 'Funktionen raderad.'; + $lang['strfunctiondroppedbad'] = 'Misslyckades att radera funktion.'; + $lang['strfunctionupdated'] = 'Funktion uppdaterad.'; + $lang['strfunctionupdatedbad'] = 'Misslyckades att uppdatera funktion.'; + + // Triggers + $lang['strtrigger'] = 'Mekanism'; + $lang['strtriggers'] = 'Mekanismer'; + $lang['strshowalltriggers'] = 'Visa alla Mekanismer'; + $lang['strnotrigger'] = 'Hittade ingen mekanism.'; + $lang['strnotriggers'] = 'Hittade inga mekanismer.'; + $lang['strcreatetrigger'] = 'Skapa mekanism'; + $lang['strtriggerneedsname'] = 'Du mste namnge din mekanism.'; + $lang['strtriggerneedsfunc'] = 'Du mste specificera en funktion fr din mekanism.'; + $lang['strtriggercreated'] = 'Mekanism skapad.'; + $lang['strtriggerdropped'] = 'Mekanism raderad.'; + $lang['strtriggercreatedbad'] = 'Misslyckades att skapa mekanism.'; + $lang['strconfdroptrigger'] = 'r du sker p att du vill radera mekanismen "%s" p "%s"?'; + $lang['strtriggerdroppedbad'] = 'Misslyckades att radera mekanism.'; + + // Types + $lang['strtype'] = 'Typ'; + $lang['strstorage'] = 'Lagring'; + $lang['strtriggeraltered'] = 'Mekanism ndrad.'; + $lang['strtriggeralteredbad'] = 'Misslyckades att ndra mekanism.'; + $lang['strtypes'] = 'Typer'; + $lang['strtypeneedslen'] = 'Du mste ange typens lngd.'; + $lang['strshowalltypes'] = 'Visa alla typer'; + $lang['strnotype'] = 'Hittade ingen typ.'; + $lang['strnotypes'] = 'Hittade inga typer.'; + $lang['strcreatetype'] = 'Skapa typ'; + $lang['strtypename'] = 'Namn p typen'; + $lang['strinputfn'] = 'Infogande funktion'; + $lang['stroutputfn'] = 'Funktion fr utvrden'; + $lang['strpassbyval'] = 'Genomgtt utvrdering?'; + $lang['stralignment'] = 'Justering'; + $lang['strelement'] = 'Element'; + $lang['strdelimiter'] = 'Avgrnsare'; + $lang['strtypeneedsname'] = 'Du mste namnge din typ.'; + $lang['strtypecreated'] = 'Typ skapad'; + $lang['strtypecreatedbad'] = 'Misslyckades att skapa typ.'; + $lang['strconfdroptype'] = 'r du sker p att du vill radera typen "%s"?'; + $lang['strtypedropped'] = 'Typ raderad.'; + $lang['strtypedroppedbad'] = 'Misslyckades att radera typ.'; + + // Schemas + $lang['strschema'] = 'Schema'; + $lang['strschemas'] = 'Scheman'; + $lang['strshowallschemas'] = 'Visa alla scheman'; + $lang['strnoschema'] = 'Hittade inget schema.'; + $lang['strnoschemas'] = 'Hittade inga scheman.'; + $lang['strcreateschema'] = 'Skapa Schema'; + $lang['strschemaname'] = 'Schemanamn'; + $lang['strschemaneedsname'] = 'Du mste namnge ditt Schema.'; + $lang['strschemacreated'] = 'Schema skapat'; + $lang['strschemacreatedbad'] = 'Misslyckades att skapa schema.'; + $lang['strconfdropschema'] = 'r du sker p att du vill radera schemat "%s"?'; + $lang['strschemadropped'] = 'Schema raderat.'; + $lang['strschemadroppedbad'] = 'Misslyckades att radera schema.'; + + // Reports + $lang['strreport'] = 'Rapport'; + $lang['strreports'] = 'Rapporter'; + $lang['strshowallreports'] = 'Visa alla rapporter'; + $lang['strtopbar'] = '%s krs p %s:%s -- Du r inloggad som anvndare "%s"'; + $lang['strtimefmt'] = 'jS M, Y g:iA'; + $lang['strnoreports'] = 'Hittade inga rapporter.'; + $lang['strcreatereport'] = 'Skapa rapport'; + $lang['strreportdropped'] = 'Rapport skapad.'; + $lang['strreportcreated'] = 'Rapport sparad.'; + $lang['strreportneedsname'] = 'Du mste namnge din rapport.'; + $lang['strreportcreatedbad'] = 'Misslyckades att spara rapport.'; + $lang['strreportdroppedbad'] = 'Misslyckades att skapa rapport.'; + $lang['strconfdropreport'] = 'r du sker p att du vill radera rapporten "%s"?'; + $lang['strreportneedsdef'] = 'Du mste ange din SQL-frga.'; + + // Domains + $lang['strdomain'] = 'Domn'; + $lang['strdomains'] = 'Domner'; + $lang['strshowalldomains'] = 'Visa alla domner'; + $lang['strnodomains'] = 'Hittade inga domner.'; + $lang['strcreatedomain'] = 'Skapa domn'; + $lang['strdomaindropped'] = 'Domn raderad.'; + $lang['strdomaindroppedbad'] = 'Misslyckades att radera domn.'; + $lang['strconfdropdomain'] = 'r du sker p att du vill radera domnen "%s"?'; + $lang['strdomainneedsname'] = 'Du mste ange ett domnnamn.'; + $lang['strdomaincreated'] = 'Domn skapad.'; + $lang['strdomaincreatedbad'] = 'Misslyckades att skapa domn.'; + $lang['strdomainaltered'] = 'Domn ndrad.'; + $lang['strdomainalteredbad'] = 'Misslyckades att ndra domn.'; + + // Operators + $lang['stroperator'] = 'Operand'; + $lang['stroperators'] = 'Operander'; + $lang['strshowalloperators'] = 'Visa alla operander'; + $lang['strnooperator'] = 'Hittade ingen operand.'; + $lang['strnooperators'] = 'Hittade inga operander.'; + $lang['strcreateoperator'] = 'Skapa operand'; + $lang['strleftarg'] = 'Arg Typ Vnster'; + $lang['strrightarg'] = 'Arg Typ Hger'; + $lang['strcommutator'] = 'Vxlare'; + $lang['strnegator'] = 'Negerande'; + $lang['strrestrict'] = 'Sprra'; + $lang['strjoin'] = 'Sl ihop'; + $lang['strhashes'] = 'Hashtabeller'; + $lang['strmerges'] = 'Sammanslagningar'; + $lang['strleftsort'] = 'Sortera vnster'; + $lang['strrightsort'] = 'Sortera hger'; + $lang['strlessthan'] = 'Mindre n'; + $lang['strgreaterthan'] = 'Strre n'; + $lang['stroperatorneedsname'] = 'Du mste namnge operanden.'; + $lang['stroperatorcreated'] = 'Operand skapad'; + $lang['stroperatorcreatedbad'] = 'Misslyckades att skapa operand.'; + $lang['strconfdropoperator'] = 'r du sker p att du vill radera operanden "%s"?'; + $lang['stroperatordropped'] = 'Operand raderad.'; + $lang['stroperatordroppedbad'] = 'Misslyckades att radera operand.'; + + // Casts + $lang['strcasts'] = 'Typomvandlingar'; + $lang['strnocasts'] = 'Hittade inga typomvandlingar.'; + $lang['strsourcetype'] = 'Klltyp'; + $lang['strtargettype'] = 'Mltyp'; + $lang['strimplicit'] = 'Implicit'; + $lang['strinassignment'] = 'Tilldelat i'; + $lang['strbinarycompat'] = '(Binrt kompatibel)'; + + // Conversions + $lang['strconversions'] = 'Omkodningar'; + $lang['strnoconversions'] = 'Hittade inga omkodningar.'; + $lang['strsourceencoding'] = 'Kllkodning'; + $lang['strtargetencoding'] = 'Mlkodning'; + + // Languages + $lang['strlanguages'] = 'Sprk'; + $lang['strnolanguages'] = 'Hittade inga sprk.'; + $lang['strtrusted'] = 'Plitlig(a)'; + + // Info + $lang['strnoinfo'] = 'Ingen information tillgnglig.'; + $lang['strreferringtables'] = 'Refererande tabeller'; + $lang['strparenttables'] = 'Ovanstende tabeller'; + $lang['strchildtables'] = 'Underliggande tabeller'; + + // Aggregates + $lang['straggregates'] = 'Sammanslagningar'; + $lang['strnoaggregates'] = 'Hittade inga sammanslagningar.'; + $lang['stralltypes'] = '(Alla typer)'; + + // Operator Classes + $lang['stropclasses'] = 'Op Klasser'; + $lang['strnoopclasses'] = 'Hittade inga operandklasser.'; + $lang['straccessmethod'] = 'Kopplingsmetod'; + + // Stats and performance + $lang['strrowperf'] = 'Radprestanda'; + $lang['strioperf'] = 'I/O Prestanda'; + $lang['stridxrowperf'] = 'Index Radprestanda'; + $lang['stridxioperf'] = 'Index I/O Prestanda'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Sekventiell'; + $lang['strscan'] = 'Scanna'; + $lang['strread'] = 'Ls'; + $lang['strfetch'] = 'Hmta'; + $lang['strheap'] = 'Bunt'; + $lang['strtoast'] = 'Brnn'; + $lang['strtoastindex'] = 'Brnn Index'; + $lang['strcache'] = 'Cache'; + $lang['strdisk'] = 'Disk'; + $lang['strrows2'] = 'Rader'; + + // Miscellaneous + $lang['strtopbar'] = '%s Krs p %s:%s -- Du r inloggad som anvndare "%s", %s'; + $lang['strtimefmt'] = 'jS M, Y g:iA'; + $lang['strhelp'] = 'Hjlp'; + +?> diff --git a/php/pgadmin/lang/synch b/php/pgadmin/lang/synch new file mode 100755 index 0000000..7e07d22 --- /dev/null +++ b/php/pgadmin/lang/synch @@ -0,0 +1,71 @@ +#!/bin/bash +# This script will synchronize language file with the master +# english translation using diff(1) utility. +# It doesn't translate strings, only inserts english versions +# to proper positions and deletes removed. And it doesn't +# synchronize commented lines. +# You need to have GNU ed and diff installed in $PATH. +# +# Usage: synch +# +# is the filename without the .php extension +# +# BTW, diff should create better ed scripts than previous +# version of synch (that one with awk code). If it will not, +# be frightened about patching Linux kernel sources ;-) + +if [ -z $1 ] ; then + echo "You must tell me which language I should synchronize." + echo -e "for example: \n\t$0 polish" + exit +fi + +if [ ! -f $1.php ] ; then + echo "Sorry, I cannot find $1.php" + exit +fi + +echo "Making backup of $1.php" +cp $1.php $1.php.old + +# Find variables names ( "$lang['strfoo']" part ) +cat english.php | awk -F"=" '{print $1}' > english.tmp +cat $1.php | awk -F"=" '{print $1}' > $1.tmp + +# diff variable names and create ed script +diff --ignore-case --ignore-all-space --ignore-blank-lines \ + --ignore-matching-lines="*" \ + --ignore-matching-lines="[^:]//" \ + --ed \ + $1.tmp english.tmp > diff.ed + +# No more need for .tmp files +rm *.tmp + +# Add english values and ed destination file +cat diff.ed | awk ' +function grep_n(what, where, n, ln) { +# Returns line with searched text + + while ( (getline line < where ) > 0 ) { + if (index(line, what)>0) { + gsub("^\t","",what); + split(line,a,"="); + print what" = "a[2]; + } +} + close(where); +} + +BEGIN { FS="=" } + +/\$lang/{ grep_n($1, "english.php") ; + next; } + + { print } +END { print "w" }' \ +| ed $1.php + +# Clean temporary files +rm diff.ed + diff --git a/php/pgadmin/lang/translations.php b/php/pgadmin/lang/translations.php new file mode 100644 index 0000000..e24154e --- /dev/null +++ b/php/pgadmin/lang/translations.php @@ -0,0 +1,84 @@ + 'Afrikaans', + 'arabic' => 'عربي', + 'catalan' => 'Català', + 'chinese-tr' => '繁體中文', + 'chinese-sim' => '简体中文', + 'chinese-utf8-zh_TW' => '正體中文(UTF-8)', + 'chinese-utf8-zh_CN' => '简体中文(UTF-8)', + 'czech' => 'Česky', + 'danish' => 'Danish', + 'dutch' => 'Nederlands', + 'english' => 'English', + 'french' => 'Français', + 'galician' => 'Galego', + 'german' => 'Deutsch', + 'greek' => 'Ελληνικά', + 'hebrew' => 'Hebrew', + 'italian' => 'Italiano', + 'japanese' => '日本語', + 'hungarian' => 'Magyar', + 'mongol' => 'Mongolian', + 'polish' => 'Polski', + 'portuguese-br' => 'Português-Brasileiro', + 'romanian' => 'Română', + 'russian' => 'Русский', + 'russian-utf8' => 'Русский (UTF-8)', + 'slovak' => 'Slovensky', + 'swedish' => 'Svenska', + 'spanish' => 'Español', + 'turkish' => 'Türkçe', + 'ukrainian' => 'Укра╖нська' + ); + + + // ISO639 language code to language file mapping. + // See http://www.w3.org/WAI/ER/IG/ert/iso639.htm for language codes + + // If it's available 'language-country', but not general + // 'language' translation (eg. 'portuguese-br', but not 'portuguese') + // specify both 'la' => 'language-country' and 'la-co' => 'language-country'. + + $availableLanguages = array( + 'af' => 'afrikaans', + 'ar' => 'arabic', + 'ca' => 'catalan', + 'zh' => 'chinese-tr', + 'zh-cn' => 'chinese-sim', + 'utf8-zh-cn' => 'chinese-utf8-cn', + 'utf8-zh-tw' => 'chinese-utf8-tw', + 'cs' => 'czech', + 'da' => 'danish', + 'nl' => 'dutch', + 'en' => 'english', + 'fr' => 'french', + 'gl' => 'galician', + 'de' => 'german', + 'el' => 'greek', + 'he' => 'hebrew', + 'it' => 'italian', + 'ja' => 'japanese', + 'hu' => 'hungarian', + 'mn' => 'mongol', + 'pl' => 'polish', + 'pt' => 'portuguese-br', + 'pt-br' => 'portuguese-br', + 'ro' => 'romanian', + 'ru' => 'russian', + 'sk' => 'slovak', + 'sv' => 'swedish', + 'es' => 'spanish', + 'tr' => 'turkish', + 'uk' => 'ukrainian' + ); +?> diff --git a/php/pgadmin/lang/turkish.php b/php/pgadmin/lang/turkish.php new file mode 100644 index 0000000..3b8ef20 --- /dev/null +++ b/php/pgadmin/lang/turkish.php @@ -0,0 +1,765 @@ +>'; + $lang['strfailed'] = 'Baarsz oldu.'; + $lang['strcreate'] = 'Yarat'; + $lang['strcreated'] = 'Yaratld'; + $lang['strcomment'] = 'Yorum'; + $lang['strlength'] = 'Uzunluk'; + $lang['strdefault'] = 'n tanml deer'; + $lang['stralter'] = 'Deitir'; + $lang['strok'] = 'Tamam'; + $lang['strcancel'] = 'ptal Et'; + $lang['strsave'] = 'Kaydet'; + $lang['strreset'] = 'Temizle'; + $lang['strinsert'] = 'Ekle'; + $lang['strselect'] = 'Se'; + $lang['strdelete'] = 'Sil'; + $lang['strupdate'] = 'Gncelle'; + $lang['strreferences'] = 'References'; + $lang['stryes'] = 'Evet'; + $lang['strno'] = 'Hayr'; + $lang['strtrue'] = 'TRUE'; + $lang['strfalse'] = 'FALSE'; + $lang['stredit'] = 'Dzenle'; + $lang['strcolumn'] = 'KolonF'; + $lang['strcolumns'] = 'Kolonlar'; + $lang['strrows'] = 'satr'; + $lang['strrowsaff'] = 'satr ilendi.'; + $lang['strobjects'] = 'nesne(ler)'; + $lang['strback'] = 'Geri'; + $lang['strqueryresults'] = 'Sorgu sonular'; + $lang['strshow'] = 'Gster'; + $lang['strempty'] = 'Boalt'; + $lang['strlanguage'] = 'Dil'; + $lang['strencoding'] = 'Karakter kodlamas'; + $lang['strvalue'] = 'Deer'; + $lang['strunique'] = 'Tekil'; + $lang['strprimary'] = 'Birincil'; + $lang['strexport'] = 'Export'; + $lang['strimport'] = 'Import'; + $lang['strallowednulls'] = 'zin verilen NULL karakterler'; + $lang['strbackslashn'] = '\N'; + $lang['strnull'] = 'Null'; + $lang['strnull'] = 'NULL (szck)'; + $lang['stremptystring'] = 'Bo metin/alan'; + $lang['strsql'] = 'SQL'; + $lang['stradmin'] = 'Ynetici'; + $lang['strvacuum'] = 'Vacuum'; + $lang['stranalyze'] = 'Analyze'; + $lang['strclusterindex'] = 'Cluster'; + $lang['strclustered'] = 'Cluster edildi mi?'; + $lang['strreindex'] = 'Reindex'; + $lang['strrun'] = 'altr'; + $lang['stradd'] = 'Ekle'; + $lang['strremove'] = 'Kaldr'; + $lang['strevent'] = 'Event'; + $lang['strwhere'] = 'Where'; + $lang['strinstead'] = 'Do Instead'; + $lang['strwhen'] = 'When'; + $lang['strformat'] = 'Format'; + $lang['strdata'] = 'Veri'; + $lang['strconfirm'] = 'Onayla'; + $lang['strexpression'] = 'fade'; + $lang['strellipsis'] = '...'; + $lang['strseparator'] = ': '; + $lang['strexpand'] = 'Genilet'; + $lang['strcollapse'] = 'Dar grnm'; + $lang['strexplain'] = 'Explain'; + $lang['strexplainanalyze'] = 'Explain Analyze'; + $lang['strfind'] = 'Bul'; + $lang['stroptions'] = 'Seenekler'; + $lang['strrefresh'] = 'Yenile'; + $lang['strdownload'] = 'ndir'; + $lang['strdownloadgzipped'] = 'gzip ile sktrlm halde indir'; + $lang['strinfo'] = 'Bilgi'; + $lang['stroids'] = 'OIDler'; + $lang['stradvanced'] = 'Gelimi'; + $lang['strvariables'] = 'Deikenler'; + $lang['strprocess'] = 'Sre'; + $lang['strprocesses'] = 'Sreler'; + $lang['strsetting'] = 'Ayar'; + $lang['streditsql'] = 'SQL Dzenle'; + $lang['strruntime'] = 'Toplam alma sresi: %s ms'; + $lang['strpaginate'] = 'Sonular sayfalandr.'; + $lang['struploadscript'] = 'ya da bir SQL betii ykleyin:'; + $lang['strstarttime'] = 'Balang zaman'; + $lang['strfile'] = 'Dosya'; + $lang['strfileimported'] = 'Dosya import edildi.'; + $lang['strtrycred'] = 'Giri bilgilerini tm sunucular iin kullan'; + + // Error handling + $lang['strnoframes'] = 'Bu uygulama en iyi olarak frame destekli bir tarayc ile kullanlabilir; ancak frameler ile kullanmak istemiyorsanz aadaki linke tklayabilirsiniz.'; + $lang['strnoframeslink'] = 'Frame olmadan kullan'; + $lang['strbadconfig'] = 'config.inc.php dosyaniz gncel deil. Bu dosyay yeni config.inc.php-dist dosyasndan yaratmanz gerekmektedir.'; + $lang['strnotloaded'] = 'PHP kurulumunuzda PostgreSQL destei bulunamamtr.'; + $lang['strpostgresqlversionnotsupported'] = 'Bu PostgreSQL srm desteklenmemektedir. Ltfen %s ya da st bir srme gncelleyiniz.'; + $lang['strbadschema'] = 'Geersiz ema.'; + $lang['strbadencoding'] = 'stemci dil kodlamasn ayarlamaya alrken bir hata olutu.'; + $lang['strsqlerror'] = 'SQL hatas:'; + $lang['strinstatement'] = 'stteki hata, aadaki ifade iinde olutu:'; + $lang['strinvalidparam'] = 'Geersiz betik parametreleri.'; + $lang['strnodata'] = 'Satr bulunamad.'; + $lang['strnoobjects'] = 'Hibir nesne bulunamad..'; + $lang['strrownotunique'] = 'Bu satr iin hibir tekil belirtici bulunamad.'; + $lang['strnoreportsdb'] = 'reports veritaban yaratmam. Ynergeler iin ltfen INSTALL dosyasn okuyunuz.'; + $lang['strnouploads'] = 'Dosya ykleme zellii etkin deil.'; + $lang['strimporterror'] = 'Import hatas.'; + $lang['strimporterror-fileformat'] = 'Import hatas: Dosya tipi otomatik olarak belirlenemedi.'; + $lang['strimporterrorline'] = '%s numaral satrda import hatas.'; +$lang['strimporterrorline-badcolumnnum'] = 'Import error on line %s: Line does not possess the correct number of columns.'; +$lang['strimporterror-uploadedfile'] = 'Import error: File could not be uploaded to the server'; +$lang['strcannotdumponwindows'] = 'Dumping of complex table and schema names on Windows is not supported.'; + + // Tables + $lang['strtable'] = 'Tablo'; + $lang['strtables'] = 'Tablolar'; + $lang['strshowalltables'] = 'Tm tablolar gster'; + $lang['strnotables'] = 'Veritabannda tablo bulunamad.'; + $lang['strnotable'] = 'Veritabannda tablo bulunamad.'; + $lang['strcreatetable'] = 'Yeni tablo yarat'; + $lang['strtablename'] = 'Tablo ad'; + $lang['strtableneedsname'] = 'Tablonuza bir ad vermeniz gerekmektedir.'; + $lang['strtableneedsfield'] = 'En az bir alan belirtmeniz gerekmektedir.'; + $lang['strtableneedscols'] = 'Geerli miktarda kolon says belirtmeniz gerekmektedir.'; + $lang['strtablecreated'] = 'Tablo yaratld.'; + $lang['strtablecreatedbad'] = 'Tablo yaratlamad.'; + $lang['strconfdroptable'] = '"%s" tablosunu kaldrmak istediinizden emin misiniz?'; + $lang['strtabledropped'] = 'Tablo kaldrld.'; + $lang['strtabledroppedbad'] = 'Tablo kaldrlamad.'; + $lang['strconfemptytable'] = '"%s" tablosunu boaltmak istediinizden emin misiniz?'; + $lang['strtableemptied'] = 'Tablo boaltld.'; + $lang['strtableemptiedbad'] = 'Tablo boaltlamad.'; + $lang['strinsertrow'] = 'Yeni kayt gir'; + $lang['strrowinserted'] = 'Yeni kayt girildi.'; + $lang['strrowinsertedbad'] = 'Yeni kayt girme ilemi baarsz oldu.'; + $lang['strrowduplicate'] = 'Satr ekleme baarsz oldu, birbirinin ayn iki kayt girilmek istendi.'; + $lang['streditrow'] = 'Kaydn ieriini deitir.'; + $lang['strrowupdated'] = 'Kayt gncellendi.'; + $lang['strrowupdatedbad'] = 'Kayt gncelleme ileme baarsz oldu.'; + $lang['strdeleterow'] = 'Kayd sil'; + $lang['strconfdeleterow'] = 'Bu kayd silmek istediinize emin misiniz?'; + $lang['strrowdeleted'] = 'Kayt silindi.'; + $lang['strrowdeletedbad'] = 'Kayt silinme ilemi baarsz oldu.'; + $lang['strinsertandrepeat'] = 'Ekle ve Tekrarla'; + $lang['strnumcols'] = 'Kolon says'; + $lang['strcolneedsname'] = 'Kolon iin bir ad vermelisiniz.'; + $lang['strselectallfields'] = 'Tm alanlar se'; + $lang['strselectneedscol'] = 'En az bir kolon iaretlemelisiniz'; + $lang['strselectunary'] = 'Unary operatrlerin deeri olamaz.'; + $lang['straltercolumn'] = 'Kolonu deitir (alter)'; + $lang['strcolumnaltered'] = 'Kolon deitirildi (alter)'; + $lang['strcolumnalteredbad'] = 'Kolon deitirilme ilemi baarsz oldu.'; + $lang['strconfdropcolumn'] = '"%s" kolonunu "%s" tablosundan silmek istediinize emin misiniz?'; + $lang['strcolumndropped'] = 'Kolon silindi.'; + $lang['strcolumndroppedbad'] = 'Kolon silme ilemi baarsz oldu.'; + $lang['straddcolumn'] = 'Yeni kolon ekle'; + $lang['strcolumnadded'] = 'Kolon eklendi.'; + $lang['strcolumnaddedbad'] = 'Kolon eklenemedi.'; + $lang['strcascade'] = 'CASCADE'; + $lang['strtablealtered'] = 'Tablo alter edildi..'; + $lang['strtablealteredbad'] = 'Tablo alteration ilemi baarsz oldu.'; + $lang['strdataonly'] = 'Sadece veri'; + $lang['strstructureonly'] = 'Sadece yap'; + $lang['strstructureanddata'] = 'Yap ve veri'; + $lang['strtabbed'] = 'Tabbed'; + $lang['strauto'] = 'Otomatik'; + $lang['strconfvacuumtable'] = '"%s" tablosunu vakumlamak istediiniz emin misiniz?'; + $lang['strestimatedrowcount'] = 'Yaklak satr says'; + + // Users + $lang['struser'] = 'Kullanc'; + $lang['strusers'] = 'Kullanclar'; + $lang['strusername'] = 'Kullanc Ad'; + $lang['strpassword'] = 'ifresi'; + $lang['strsuper'] = 'Superuser m?'; + $lang['strcreatedb'] = 'Veritaban yaratabilsin mi?'; + $lang['strexpires'] = 'Expires'; + $lang['strsessiondefaults'] = 'Oturum varsaylanlar'; + $lang['strnousers'] = 'Hibir kullanc bulunamad.'; + $lang['struserupdated'] = 'Kullanc gncellendi.'; + $lang['struserupdatedbad'] = 'Kullanc gncelleme ilemi baarsz oldu.'; + $lang['strshowallusers'] = 'Tm kullanclar gster.'; + $lang['strcreateuser'] = 'Yeni kullanc yarat'; + $lang['struserneedsname'] = 'Kullancnz iin bir ad vermelisiniz.'; + $lang['strusercreated'] = 'Kullanc yaratld.'; + $lang['strusercreatedbad'] = 'Kullanc yaratlma ilemi baarsz oldu.'; + $lang['strconfdropuser'] = '"%s" kullancsn silmek istediinize emin misiniz?'; + $lang['struserdropped'] = 'Kullanc silindi.'; + $lang['struserdroppedbad'] = 'Kullanc silme ilemi baarsz oldu.'; + $lang['straccount'] = 'Hesap'; + $lang['strchangepassword'] = 'ifre Deitir'; + $lang['strpasswordchanged'] = 'ifre deitirildi.'; + $lang['strpasswordchangedbad'] = 'ifre deitirme baarsz oldu.'; + $lang['strpasswordshort'] = 'ifre ok ksa.'; + $lang['strpasswordconfirm'] = 'ifreler uyumad.'; + + // Groups + $lang['strgroup'] = 'Grup'; + $lang['strgroups'] = 'Gruplar'; + $lang['strnogroup'] = 'Grup bulunamad.'; + $lang['strnogroups'] = 'Grup bulunamad.'; + $lang['strcreategroup'] = 'Yeni grup yarat'; + $lang['strshowallgroups'] = 'Tm gruplar gster'; + $lang['strgroupneedsname'] = 'Grup yaratabilmek iin bir ad vermelisiniz.'; + $lang['strgroupcreated'] = 'Grup yaratld.'; + $lang['strgroupcreatedbad'] = 'Grup yaratma ilemi baarsz oldu.'; + $lang['strconfdropgroup'] = '"%s" grubunu silmek istediinize emin misiniz?'; + $lang['strgroupdropped'] = 'Grup silindi.'; + $lang['strgroupdroppedbad'] = 'Grup silme ilemi baarsz oldu.'; + $lang['strmembers'] = 'yeler'; + $lang['straddmember'] = 'ye ekle'; + $lang['strmemberadded'] = 'ye eklendi.'; + $lang['strmemberaddedbad'] = 'ye ekleme baarsz oldu.'; + $lang['strdropmember'] = 'yeyi kaldr'; + $lang['strconfdropmember'] = '"%s" yesini "%s" grubundan silmek istediinize emin misiniz?'; + $lang['strmemberdropped'] = 'ye silindi.'; + $lang['strmemberdroppedbad'] = 'ye silme baarsz oldu.'; + + // Privilges + $lang['strprivilege'] = 'zni'; + $lang['strprivileges'] = 'zinler'; + $lang['strnoprivileges'] = 'Bu nesnenin bir izni yoktur.'; + $lang['strgrant'] = 'zni ver'; + $lang['strrevoke'] = 'zni kaldr'; + $lang['strgranted'] = 'zimler verildi.'; + $lang['strgrantfailed'] = 'zinlerin grant ilemi baarsz oldu.'; + + $lang['strgrantbad'] = 'En az bir kullanc ya da grup ve en az bir izin belirtmelisiniz.'; + $lang['strgrantor'] = 'Grantor'; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = 'Veritaban'; + $lang['strdatabases'] = 'Veritabanlar'; + $lang['strshowalldatabases'] = 'Tm veritabanlarn gster'; + $lang['strnodatabase'] = 'Veritaban bulunamad.'; + $lang['strnodatabases'] = 'Veritaban bulunamad.'; + $lang['strcreatedatabase'] = 'Veritaban yarat'; + $lang['strdatabasename'] = 'Veritaban ad'; + $lang['strdatabaseneedsname'] = 'Veritabannza bir ad vermelisiniz.'; + $lang['strdatabasecreated'] = 'Veritaban yaratld.'; + $lang['strdatabasecreatedbad'] = 'Veritaban yaratlamad.'; + $lang['strconfdropdatabase'] = '"%s" veritabann kaldrmak istediinize emin misiniz?'; + $lang['strdatabasedropped'] = 'Veritaban kaldrld.'; + $lang['strdatabasedroppedbad'] = 'Veritaban kaldrma baarsz oldu.'; + $lang['strentersql'] = 'Veritaban zerinde altrlacak sorgu/sorgular aaya yaznz:'; + $lang['strsqlexecuted'] = 'SQL altrld.'; + $lang['strvacuumgood'] = 'Vacuum tamamland.'; + $lang['strvacuumbad'] = 'Vacuum ilemi baarsz oldu.'; + $lang['stranalyzegood'] = 'Analyze ilemi tamamland.'; + $lang['stranalyzebad'] = 'Analyze ilemi baarsz oldu.'; + $lang['strreindexgood'] = 'Reindex tamamland.'; + $lang['strreindexbad'] = 'Reindex baarsz oldu.'; + $lang['strfull'] = 'Full'; + $lang['strfreeze'] = 'Freeze'; + $lang['strforce'] = 'Force'; + $lang['strsignalsent'] = 'Sinyal gnderildi.'; + $lang['strsignalsentbad'] = 'Sinyal gnderme ilemi baarsz oldu'; + $lang['strallobjects'] = 'Tm nesneler'; + $lang['strdatabasealtered'] = 'Veritaban deitirildi.'; + $lang['strdatabasealteredbad'] = 'Veritaban deitirme baarsz oldu.'; + + // Views + $lang['strview'] = 'View'; + $lang['strviews'] = 'Viewlar'; + $lang['strshowallviews'] = 'Tm viewlar gster'; + $lang['strnoview'] = 'Bir view bulunamad.'; + $lang['strnoviews'] = 'Bir view bulunamad.'; + $lang['strcreateview'] = 'View yarat'; + $lang['strviewname'] = 'View ad'; + $lang['strviewneedsname'] = 'View iin bir ad belirtmelisiniz.'; + $lang['strviewneedsdef'] = 'View iin bir tanm belirtmelisiniz.'; + $lang['strviewneedsfields'] = 'View iinde grnmesini istediiniz kolonlar belirtmelisiniz.'; + $lang['strviewcreated'] = 'View yaratld.'; + $lang['strviewcreatedbad'] = 'View yaratma ilemi baarsz oldu.'; + $lang['strconfdropview'] = '"%s" viewini kaldrmak istediinize emin misiniz?'; + $lang['strviewdropped'] = 'View kaldrld.'; + $lang['strviewdroppedbad'] = 'View kaldrma ilemi baarsz oldu.'; + $lang['strviewupdated'] = 'View gncellendi.'; + $lang['strviewupdatedbad'] = 'View gncelleme ilemi baarsz oldu.'; + $lang['strviewlink'] = 'Linking Keys'; + $lang['strviewconditions'] = 'Ek durumlar'; + $lang['strcreateviewwiz'] = 'Sihirbaz ile view yaratn'; + + // Sequences + $lang['strsequence'] = 'Sequence'; + $lang['strsequences'] = 'Sequences'; + $lang['strshowallsequences'] = 'Show all sequences'; + $lang['strnosequence'] = 'No sequence found.'; + $lang['strnosequences'] = 'No sequences found.'; + $lang['strcreatesequence'] = 'Create sequence'; + $lang['strlastvalue'] = 'Son deer'; + $lang['strincrementby'] = 'Arttrma deeri'; + $lang['strstartvalue'] = 'Balang Deeri'; + $lang['strmaxvalue'] = 'Max Deer'; + $lang['strminvalue'] = 'Min Deer'; + $lang['strcachevalue'] = 'Cache Deeri'; + $lang['strlogcount'] = 'Log Count'; + $lang['striscycled'] = 'Is Cycled?'; + $lang['strsequenceneedsname'] = 'Sequence iin bir ad belirtmelisiniz.'; + $lang['strsequencecreated'] = 'Sequence yaratld.'; + $lang['strsequencecreatedbad'] = 'Sequence yaratma ilemi baarsz oldu.'; + $lang['strconfdropsequence'] = '"%s" sequence ini kaldrmak istediinize emin misiniz?'; + $lang['strsequencedropped'] = 'Sequence kaldrld.'; + $lang['strsequencedroppedbad'] = 'Sequence kaldrma ilemi baarsz oldu.'; + $lang['strsequencereset'] = 'Sequence sfrland.'; + $lang['strsequenceresetbad'] = 'Sequence sfrlama baarsz oldu.'; + + // Indexes + $lang['strindex'] = 'Index'; + $lang['strindexes'] = 'Indeksler'; + $lang['strindexname'] = 'Indeks ad'; + $lang['strshowallindexes'] = 'Tm indeksleri gster'; + $lang['strnoindex'] = 'Hibir indeks bulunamad.'; + $lang['strnoindexes'] = 'Hibir indeks bulunamad.'; + $lang['strcreateindex'] = 'Indeks yarat'; + $lang['strtabname'] = 'Tab Ad'; + $lang['strcolumnname'] = 'Kolon ad'; + $lang['strindexneedsname'] = 'Indeksinize bir ad vermeniz gerekmektedir.'; + $lang['strindexneedscols'] = 'Geerli koln says vermeniz gerekmektedir.'; + $lang['strindexcreated'] = 'Indeks yaratld.'; + $lang['strindexcreatedbad'] = 'Index creation failed.'; + $lang['strconfdropindex'] = '"%s" indeksini kaldrmak istediinize emin misiniz?'; + $lang['strindexdropped'] = 'Indeks kaldrld.'; + $lang['strindexdroppedbad'] = 'Indeks kaldrlamad.'; + $lang['strkeyname'] = 'Anahtar ad'; + $lang['struniquekey'] = 'Tekil (Unique) Anahtar'; + $lang['strprimarykey'] = 'Birincil Anahtar (Primary Key)'; + $lang['strindextype'] = 'Indeksin tipi'; + $lang['strtablecolumnlist'] = 'Tablodaki kolonlar'; + $lang['strindexcolumnlist'] = 'Indeksteki kolonlar'; + $lang['strconfcluster'] = '"%s" tablosunu cluster etmek istiyor musunuz?'; + $lang['strclusteredgood'] = 'Cluster tamamland.'; + $lang['strclusteredbad'] = 'Cluster baarsz oldu.'; + + // Rules + $lang['strrules'] = 'Rules'; + $lang['strrule'] = 'Rule'; + $lang['strshowallrules'] = 'Show all Rules'; + $lang['strnorule'] = 'Rule bulunamad.'; + $lang['strnorules'] = 'Rule bulunamad.'; + $lang['strcreaterule'] = 'Rule yarat'; + $lang['strrulename'] = 'Rule ad'; + $lang['strruleneedsname'] = 'Rule iin bir ad belirtmelisiniz.'; + $lang['strrulecreated'] = 'Rule yaratld.'; + $lang['strrulecreatedbad'] = 'Rule yaratma ilemi baarsz oldu.'; + $lang['strconfdroprule'] = '"%s" kuraln "%s" tablosundan silmek istediinize emin misiniz?'; + $lang['strruledropped'] = 'Rule silindi'; + $lang['strruledroppedbad'] = 'Rule silinme ilemi baarsz oldu.'; + + // Constraints + $lang['strconstraint'] = 'Kstlama'; + $lang['strconstraints'] = 'Kstlamalar'; + $lang['strshowallconstraints'] = 'Tm kstlamalar (constraint) gster.'; + $lang['strnoconstraints'] = 'Hibir kstlama (constraint) bulunamad.'; + $lang['strcreateconstraint'] = 'Kstlama (Constraint) yarat'; + $lang['strconstraintcreated'] = 'Kstlama (Constraint) yaratld.'; + $lang['strconstraintcreatedbad'] = 'Kstlama (Constraint) yaratma ilemi baarsz oldu.'; + $lang['strconfdropconstraint'] = '"%s" zerindeki "%s" kstlamasn (constraint) kaldrmak istiyor musunuz?'; + $lang['strconstraintdropped'] = 'Kstlama (Constraint) kaldrld'; + $lang['strconstraintdroppedbad'] = 'Kstlama (Constraint) ilemi baarsz oldu.'; + $lang['straddcheck'] = 'Kontrol (Check) ekle'; + $lang['strcheckneedsdefinition'] = 'Kontrol (Check) kstlamas (constraint) iin bir tanm girilmelidir.'; + $lang['strcheckadded'] = 'Kontrol kstlamas (Check constraint) eklendi.'; + $lang['strcheckaddedbad'] = 'Kontrol kstlamas (Check constraint) ekleme ilemi baarsz oldu.'; + $lang['straddpk'] = 'Birincil Anahtar Ekle'; + $lang['strpkneedscols'] = 'Birincil anahtar iin en az bir kolon gereklidir.'; + $lang['strpkadded'] = 'Birincil anahtar eklendi.'; + $lang['strpkaddedbad'] = 'Birincil anahtar eklenemedi.'; + $lang['stradduniq'] = 'Tekil (Unique) anahtar ekle'; + $lang['struniqneedscols'] = 'Tekil anahtar yaratmak iin en az bir kolon gerekir.'; + $lang['struniqadded'] = 'Tekil anahtar eklendi.'; + $lang['struniqaddedbad'] = 'Tekil anahtar eklenemedi.'; + $lang['straddfk'] = 'kincil anahtar ekle'; + $lang['strfkneedscols'] = 'kincil anahtar yaratmak iin en az bir kolon gerekir.'; + $lang['strfkneedstarget'] = 'kincil anahtar hedef bir tablo gerektirir.'; + $lang['strfkadded'] = 'kincil anahtar eklendi.'; + $lang['strfkaddedbad'] = 'kincil anahtar eklenemedi.'; + $lang['strfktarget'] = 'Hedef tablo'; + + $lang['strfkcolumnlist'] = 'Anahtardaki kolonlar'; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + // Functions + $lang['strfunction'] = 'Fonksiyon'; + $lang['strfunctions'] = 'Fonksiyonlar'; + $lang['strshowallfunctions'] = 'Tm fonksiyonlar gster'; + $lang['strnofunction'] = 'Fonksiyon bulunamad.'; + $lang['strnofunctions'] = 'Fonksiyon bulunamad.'; + $lang['strcreateplfunction'] = 'SQL/PL fonksiyonu yarat'; + $lang['strcreateinternalfunction'] = ' (internal) fonksiyon yarat'; + $lang['strcreatecfunction'] = 'C fonksiyonu yarat'; + $lang['strfunctionname'] = 'Fonksiyon ad'; + $lang['strreturns'] = 'Dnderilen deer'; + $lang['strarguments'] = 'Argmanlar'; + $lang['strproglanguage'] = 'Dil'; + $lang['strfunctionneedsname'] = 'Fonksiyona bir ad vermelisiniz.'; + $lang['strfunctionneedsdef'] = 'Fonksiyona bir tanm vermelisiniz.'; + $lang['strfunctioncreated'] = 'Fonksiyon yaratld.'; + $lang['strfunctioncreatedbad'] = 'Fonksiyon yaratma ilemi baarsz oldu.'; + $lang['strconfdropfunction'] = '"%s" fonksiyonunu kaldrmak istediinize emin misiniz?'; + $lang['strfunctiondropped'] = 'Fonksiyon kaldrld.'; + $lang['strfunctiondroppedbad'] = 'Fonksiyon kaldrma ilemi baarsz oldu.'; + $lang['strfunctionupdated'] = 'Fonksiyon gncellendi.'; + $lang['strfunctionupdatedbad'] = 'Function gncelleme ilemi baarsz oldu.'; + $lang['strobjectfile'] = 'Nesne dosyas'; + $lang['strlinksymbol'] = 'Balant sembol'; + + // Triggers + $lang['strtrigger'] = 'Trigger'; + $lang['strtriggers'] = 'Triggerlar'; + $lang['strshowalltriggers'] = 'Tm triggerlar gster'; + $lang['strnotrigger'] = 'Trigger bulunamad.'; + $lang['strnotriggers'] = 'Trigger bulunamad.'; + $lang['strcreatetrigger'] = 'Yeni trigger yarat'; + $lang['strtriggerneedsname'] = 'Trigger iin bir ad belirtmelisiniz.'; + $lang['strtriggerneedsfunc'] = 'Trigger iin bir fonksiyon belirtmelisiniz.'; + $lang['strtriggercreated'] = 'Trigger yaratld.'; + $lang['strtriggercreatedbad'] = 'Trigger yaratlamad.'; + $lang['strconfdroptrigger'] = '"%s" triggerini "%s" tablosundan kaldrmak istediinize emin misiniz?'; + $lang['strtriggerdropped'] = 'Trigger silindi.'; + $lang['strtriggerdroppedbad'] = 'Trigger silinme ilemi baarsz oldu.'; + $lang['strtriggeraltered'] = 'Trigger deitirildi.'; + $lang['strtriggeralteredbad'] = 'Trigger deitirilme ilemi baarsz oldu.'; + $lang['strforeach'] = 'Her bir'; + + // Types + $lang['strtype'] = 'Veri tipi'; + $lang['strtypes'] = 'Veri tipleri'; + $lang['strshowalltypes'] = 'Tm veri tiplerini gster'; + $lang['strnotype'] = 'Hi veri tipi bulunamad.'; + $lang['strnotypes'] = 'Hi veri tipi bulunamad.'; + $lang['strcreatetype'] = 'Yeni veri tipi yarat'; + $lang['strcreatecomptype'] = 'Karmak veri tipi yarat'; + $lang['strtypeneedsfield'] = 'En az bir alan belirtmelisiniz.'; + $lang['strtypeneedscols'] = 'Geerli bir alan says belirtmelisiniz.'; + $lang['strtypename'] = 'Veri tipi ad'; + $lang['strinputfn'] = 'Giri (Input) fonksiyonu'; + $lang['stroutputfn'] = 'k (Output) fonksiyonu'; + $lang['strpassbyval'] = 'Passed by val?'; + $lang['stralignment'] = 'Alignment'; + $lang['strelement'] = 'Eleman'; + $lang['strdelimiter'] = 'Delimiter'; + $lang['strstorage'] = 'Storage'; + $lang['strfield'] = 'Alan'; + $lang['strnumfields'] = 'Alanlarn says'; + + $lang['strtypeneedsname'] = 'Veri tipi iin bir ad vermelisiniz.'; + $lang['strtypeneedslen'] = 'Veri tipiniz iin bir uzunluk belirtmelisiniz.'; + $lang['strtypecreated'] = 'Veri tipi yaratld'; + $lang['strtypecreatedbad'] = 'Veri tipi yaratlamad.'; + $lang['strconfdroptype'] = '"%s" veri tipini kaldrmak istediinize emin misiniz?'; + $lang['strtypedropped'] = 'Veri tipi kaldrld.'; + $lang['strtypedroppedbad'] = 'Veri tipi kaldrlamad.'; + $lang['strflavor'] = 'Flavor'; + $lang['strbasetype'] = 'Base'; + $lang['strcompositetype'] = 'Composite'; + $lang['strpseudotype'] = 'Pseudo'; + + // Schemas + $lang['strschema'] = 'ema'; + $lang['strschemas'] = 'emalar'; + $lang['strshowallschemas'] = 'Tm emalar gster'; + $lang['strnoschema'] = 'Bir ema bulunamad.'; + $lang['strnoschemas'] = 'Bir ema bulunamad.'; + $lang['strcreateschema'] = 'ema yarat'; + $lang['strschemaname'] = 'ema ad'; + $lang['strschemaneedsname'] = 'ema iin bir ad belirtmelisiniz.'; + $lang['strschemacreated'] = 'ema yaratld'; + $lang['strschemacreatedbad'] = 'ema yaratma ilemi baarsz oldu'; + $lang['strconfdropschema'] = '"%s" emasn kaldrmak istediinize emin misiniz?'; + $lang['strschemadropped'] = 'ema kaldrld.'; + $lang['strschemadroppedbad'] = 'ema kaldrma ilemi baarsz oldu.'; + $lang['strschemaaltered'] = 'Schema deitirildi.'; + $lang['strschemaalteredbad'] = 'Schema deitirilme ilemi baarsz oldu.'; + $lang['strsearchpath'] = 'ema arama yolu'; + + // Reports + $lang['strreport'] = 'Rapor'; + $lang['strreports'] = 'Raporlar'; + $lang['strshowallreports'] = 'Tm raporlar gster'; + $lang['strnoreports'] = 'Hibir rapor bulunamad'; + $lang['strcreatereport'] = 'Rapor yaratld.'; + $lang['strreportdropped'] = 'Rapor silindi'; + $lang['strreportdroppedbad'] = 'Rapor silme ii baarsz oldu.'; + $lang['strconfdropreport'] = '"%s" raporunu silmek istediinize emin misiniz?'; + $lang['strreportneedsname'] = 'Raporunuza bir ad vermelisiniz.'; + $lang['strreportneedsdef'] = 'Raporunuz iin SQL sorgular yazmalsnz.'; + $lang['strreportcreated'] = 'Rapor kaydedildi.'; + $lang['strreportcreatedbad'] = 'Rapor kaydetme baarsz oldu.'; + $lang['strdomain'] = 'Domain'; + $lang['strdomains'] = 'Domainler'; + $lang['strshowalldomains'] = 'Tm domainleri gster.'; + $lang['strnodomains'] = 'Hibir domain bulunamad.'; + $lang['strcreatedomain'] = 'Domain yarat'; + $lang['strdomaindropped'] = 'Domain silindi.'; + $lang['strdomaindroppedbad'] = 'Domain silme baarsz oldu.'; + $lang['strconfdropdomain'] = '"%s" domain\'ini silmek istediinize emin misiniz??'; + $lang['strdomainneedsname'] = 'Domain iin bir ad vermelisiniz.'; + $lang['strdomaincreated'] = 'Domain yaratld.'; + $lang['strdomaincreatedbad'] = 'Domain yaratma baarsz oldu.'; + $lang['strdomainaltered'] = 'Domain alter edildi.'; + $lang['strdomainalteredbad'] = 'Domain alter ilemi baarsz oldu.'; + + $lang['stroperator'] = 'Operatr'; + $lang['stroperators'] = 'Operatrler'; + $lang['strshowalloperators'] = 'Tm operatrleri gster'; + $lang['strnooperator'] = 'Operatr bulunamad.'; + $lang['strnooperators'] = 'Operatr bulunamad.'; + $lang['strcreateoperator'] = 'Operatr yaratld.'; + $lang['strleftarg'] = 'Sol Arg Tipi'; + $lang['strrightarg'] = 'Sa Arg Tipi'; + $lang['strcommutator'] = 'Commutator'; + $lang['strnegator'] = 'Negator'; + $lang['strrestrict'] = 'Restrict'; + $lang['strjoin'] = 'Join'; + $lang['strhashes'] = 'Hashes'; + $lang['strmerges'] = 'Merges'; + $lang['strleftsort'] = 'Left sort'; + $lang['strrightsort'] = 'Right sort'; + $lang['strlessthan'] = 'kktr'; + $lang['strgreaterthan'] = 'byktr'; + $lang['stroperatorneedsname'] = 'Operatre bir ad vermelisiniz.'; + $lang['stroperatorcreated'] = 'Operatr yaratld'; + $lang['stroperatorcreatedbad'] = 'Operatr yaratma ilemi baarsz oldu.'; + $lang['strconfdropoperator'] = '"%s" operatrn kaldrmak istediinize emin misiniz?'; + $lang['stroperatordropped'] = 'Operatr kaldrld.'; + $lang['stroperatordroppedbad'] = 'Operator kaldrma ilemi baarsz oldu.'; + + // Casts + $lang['strcasts'] = 'Casts'; + $lang['strnocasts'] = 'Hi cast bulunamad.'; + $lang['strsourcetype'] = 'Kaynak tip'; + $lang['strtargettype'] = 'Hedef tip'; + $lang['strimplicit'] = 'Implicit'; + $lang['strinassignment'] = 'In assignment'; + $lang['strbinarycompat'] = '(Binary uyumlu)'; + + // Conversions + $lang['strconversions'] = 'Dnmleri'; + $lang['strnoconversions'] = 'Hi dnm bulunamad.'; + $lang['strsourceencoding'] = 'Kaynak dil kodlamas'; + $lang['strtargetencoding'] = 'Hedef dil kodlamas'; + + // Languages + $lang['strlanguages'] = 'Diller'; + $lang['strnolanguages'] = 'Hi bir dil bulunamad.'; + $lang['strtrusted'] = 'Gvenilir'; + + // Info + $lang['strnoinfo'] = 'Hi bir bilgi yok.'; + $lang['strreferringtables'] = 'Referring tables'; + $lang['strparenttables'] = 'Parent tablolar'; + $lang['strchildtables'] = 'Child tablolar'; + + // Aggregates + $lang['straggregates'] = 'Aggregate'; + $lang['strnoaggregates'] = 'Hi aggregate bulunamad.'; + $lang['stralltypes'] = '(Tm veri tipleri)'; + $lang['stropclasses'] = 'Op snflar'; + $lang['strnoopclasses'] = 'Hi operatr snf bulunamad.'; + $lang['straccessmethod'] = 'Eriim Yntemi'; + $lang['strrowperf'] = 'Satr Baarm'; + $lang['strioperf'] = 'I/O Baarm'; + $lang['stridxrowperf'] = 'Index Satr Baarm'; + $lang['stridxioperf'] = 'Index I/O Baarm'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = 'Sequential'; + $lang['strscan'] = 'Scan'; + $lang['strread'] = 'Read'; + $lang['strfetch'] = 'Fetch'; + $lang['strheap'] = 'Heap'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST Index'; + $lang['strcache'] = 'Cache'; + $lang['strdisk'] = 'Disk'; + $lang['strrows2'] = 'Rows'; + + // Tablespaces + $lang['strtablespace'] = 'Tablespace'; + $lang['strtablespaces'] = 'Tablespaceler'; + $lang['strshowalltablespaces'] = 'Tm tablespaceleri gster'; + $lang['strnotablespaces'] = 'Hi tablespace bulunamad.'; + $lang['strcreatetablespace'] = 'Tablespace yarat'; + $lang['strlocation'] = 'Yer'; + $lang['strtablespaceneedsname'] = 'Tablespace\'e bir ad vermelisiniz.'; + $lang['strtablespaceneedsloc'] = 'Tablespace\'in yaratlaca dizini belirtmelisiniz'; + $lang['strtablespacecreated'] = 'Tablespace yaratld.'; + $lang['strtablespacecreatedbad'] = 'Tablespace yaratlamad.'; + $lang['strconfdroptablespace'] = '"%s" adl tablespace\'i kaldrmak istediinize emin misiniz?'; + $lang['strtablespacedropped'] = 'Tablespace kaldrld.'; + $lang['strtablespacedroppedbad'] = 'Tablespace kaldrlamad.'; + $lang['strtablespacealtered'] = 'Tablespace deitirildi.'; + $lang['strtablespacealteredbad'] = 'Tablespace deitirilemedi.'; + + // Slony clusters + $lang['strcluster'] = 'Kme'; + $lang['strnoclusters'] = 'Hi kme bulunamad.'; + $lang['strconfdropcluster'] = '"%s" kmesini kaldrmak istediinize emin misiniz?'; + $lang['strclusterdropped'] = 'Kme kaldrld.'; + $lang['strclusterdroppedbad'] = 'Kme kaldrma ilemi baarsz oldu.'; + $lang['strinitcluster'] = 'Kmeyi ilklendir'; + $lang['strclustercreated'] = 'Kme ilklendirildi.'; + $lang['strclustercreatedbad'] = 'Kme ilklendirme baarsz oldu.'; + $lang['strclusterneedsname'] = 'Kme iin bir ad vermelisiniz.'; + $lang['strclusterneedsnodeid'] = 'Yerel u iin bir ID vermelisiniz.'; + + // Slony nodes + $lang['strnodes'] = 'Ular'; + $lang['strnonodes'] = 'Hi u bulunamad.'; + $lang['strcreatenode'] = 'U yarat'; + $lang['strid'] = 'ID'; + $lang['stractive'] = 'Etkin'; + $lang['strnodecreated'] = 'U yaratld.'; + $lang['strnodecreatedbad'] = 'U yaratma baarsz oldu.'; + $lang['strconfdropnode'] = '"%s" adl ucu kaldrmak istediinize emin misiniz?'; + $lang['strnodedropped'] = 'U kaldrld.'; + $lang['strnodedroppedbad'] = 'U kaldrma baarsz oldu.'; + $lang['strfailover'] = 'Failover'; +$lang['strnodefailedover'] = 'Node failed over.'; +$lang['strnodefailedoverbad'] = 'Node failover failed.'; + + // Slony paths +$lang['strpaths'] = 'Paths'; +$lang['strnopaths'] = 'No paths found.'; +$lang['strcreatepath'] = 'Create path'; + $lang['strnodename'] = 'U ad'; +$lang['strnodeid'] = 'Node ID'; +$lang['strconninfo'] = 'Connection string'; + $lang['strconnretry'] = 'yeniden balanmadan nce ka saniye gerekecek'; +$lang['strpathneedsconninfo'] = 'You must give a connection string for the path.'; +$lang['strpathneedsconnretry'] = 'You must give the number of seconds to wait before retry to connect.'; +$lang['strpathcreated'] = 'Path created.'; +$lang['strpathcreatedbad'] = 'Path creation failed.'; +$lang['strconfdroppath'] = 'Are you sure you want to drop path "%s"?'; +$lang['strpathdropped'] = 'Path dropped.'; +$lang['strpathdroppedbad'] = 'Path drop failed.'; + + // Slony listens +$lang['strlistens'] = 'Listens'; +$lang['strnolistens'] = 'No listens found.'; +$lang['strcreatelisten'] = 'Create listen'; +$lang['strlistencreated'] = 'Listen created.'; +$lang['strlistencreatedbad'] = 'Listen creation failed.'; +$lang['strconfdroplisten'] = 'Are you sure you want to drop listen "%s"?'; +$lang['strlistendropped'] = 'Listen dropped.'; +$lang['strlistendroppedbad'] = 'Listen drop failed.'; + + // Slony replication sets + $lang['strrepsets'] = 'Replikasyon kmesi'; + $lang['strnorepsets'] = 'Hi replikasyon kmesi bulunamad.'; + $lang['strcreaterepset'] = 'Replikasyon kmesi yarat'; + $lang['strrepsetcreated'] = 'Replikasyon kmesi yaratld.'; + $lang['strrepsetcreatedbad'] = 'Replikasyon kmesi yaratma baarsz oldu.'; +$lang['strconfdroprepset'] = 'Are you sure you want to drop replication set "%s"?'; + $lang['strrepsetdropped'] = 'Replikasyon kmesi kaldrld.'; + $lang['strrepsetdroppedbad'] = 'Replikasyon kmesi kaldrma baarsz oldu.'; +$lang['strmerge'] = 'Merge'; +$lang['strmergeinto'] = 'Merge into'; +$lang['strrepsetmerged'] = 'Replication sets merged.'; +$lang['strrepsetmergedbad'] = 'Replication sets merge failed.'; + $lang['strmove'] = 'Ta'; +$lang['strneworigin'] = 'New origin'; + $lang['strrepsetmoved'] = 'Replikasyon kmesi tand.'; + $lang['strrepsetmovedbad'] = 'Replikasyon kmesi tama baarsz oldu.'; + $lang['strnewrepset'] = 'Yeni replikasyon kmesi'; + $lang['strlock'] = 'Kilitle'; + $lang['strlocked'] = 'Kilitlendi'; + $lang['strunlock'] = 'Kilidi a'; + $lang['strconflockrepset'] = '"%s" replikasyon kmesini kilitlemek istediinize emin misiniz?'; + $lang['strrepsetlocked'] = 'Replikasyon kmesi kilitlendi.'; + $lang['strrepsetlockedbad'] = 'Replikasyon kmesi kilitleme baarsz oldu.'; +$lang['strconfunlockrepset'] = 'Are you sure you want to unlock replication set "%s"?'; + $lang['strrepsetunlocked'] = 'Replikasyon kmesinin kilidi ald.'; +$lang['strrepsetunlockedbad'] = 'Replikasyon kmesi kilit ama baarsz oldu.'; +$lang['strexecute'] = 'Execute'; +$lang['stronlyonnode'] = 'Only on node'; + $lang['strddlscript'] = 'DDL betii'; +$lang['strscriptneedsbody'] = 'You must supply a script to be executed on all nodes.'; +$lang['strscriptexecuted'] = 'Replication set DDL script executed.'; +$lang['strscriptexecutedbad'] = 'Failed executing replication set DDL script.'; +$lang['strtabletriggerstoretain'] = 'The following triggers will NOT be disabled by Slony:'; + + // Slony tables in replication sets + $lang['straddtable'] = 'Tablo ekle'; +$lang['strtableneedsuniquekey'] = 'Table to be added requires a primary or unique key.'; +$lang['strtableaddedtorepset'] = 'Table added to replication set.'; +$lang['strtableaddedtorepsetbad'] = 'Failed adding table to replication set.'; +$lang['strconfremovetablefromrepset'] = 'Are you sure you want to remove the table "%s" from replication set "%s"?'; +$lang['strtableremovedfromrepset'] = 'Table removed from replication set.'; +$lang['strtableremovedfromrepsetbad'] = 'Failed to remove table from replication set.'; + + // Slony sequences in replication sets +$lang['straddsequence'] = 'Add sequence'; +$lang['strsequenceaddedtorepset'] = 'Sequence added to replication set.'; +$lang['strsequenceaddedtorepsetbad'] = 'Failed adding sequence to replication set.'; +$lang['strconfremovesequencefromrepset'] = 'Are you sure you want to remove the sequence "%s" from replication set "%s"?'; +$lang['strsequenceremovedfromrepset'] = 'Sequence removed from replication set.'; +$lang['strsequenceremovedfromrepsetbad'] = 'Failed to remove sequence from replication set.'; + + // Slony subscriptions + $lang['strsubscriptions'] = 'yelikler'; + $lang['strnosubscriptions'] = 'yelik bulunamad.'; + + // Miscellaneous + $lang['strtopbar'] = '%s, %s:%s zerinde alyor-- "%s" kullancs ile sisteme giri yaptnz.'; + $lang['strtimefmt'] = 'jS M, Y g:iA'; + $lang['strhelp'] = 'Yardm'; + $lang['strhelpicon'] = '?'; + $lang['strlogintitle'] = '%s\'e giri yap'; + $lang['strlogoutmsg'] = '%s\'den kld.'; + $lang['strloading'] = 'Ykleniyor...'; + $lang['strerrorloading'] = 'Ykleme hatas'; + $lang['strclicktoreload'] = 'Yeniden yklemek iin tklayn.'; + +?> + diff --git a/php/pgadmin/lang/ukrainian.php b/php/pgadmin/lang/ukrainian.php new file mode 100644 index 0000000..caa3e0b --- /dev/null +++ b/php/pgadmin/lang/ukrainian.php @@ -0,0 +1,600 @@ +'; + $lang['strfirst'] = '<< '; + $lang['strlast'] = '. >>'; + $lang['strfailed'] = ''; + $lang['strcreate'] = ''; + $lang['strcreated'] = ''; + $lang['strcomment'] = ''; + $lang['strlength'] = ''; + $lang['strdefault'] = ' '; + $lang['stralter'] = 'ͦ'; + $lang['strok'] = ''; + $lang['strcancel'] = 'ͦ'; + $lang['strsave'] = ''; + $lang['strreset'] = ''; + $lang['strinsert'] = ''; + $lang['strselect'] = ''; + $lang['strdelete'] = ''; + $lang['strupdate'] = ''; + $lang['strreferences'] = ''; + $lang['stryes'] = ''; + $lang['strno'] = ''; + $lang['strtrue'] = ''; + $lang['strfalse'] = ''; + $lang['stredit'] = ''; + $lang['strcolumns'] = ''; + $lang['strrows'] = '(/)'; + $lang['strrowsaff'] = '(/) .'; + $lang['strobjects'] = '"(/)'; + $lang['strexample'] = ' ..'; + $lang['strback'] = ''; + $lang['strqueryresults'] = ' '; + $lang['strshow'] = ''; + $lang['strempty'] = ''; + $lang['strlanguage'] = ''; + $lang['strencoding'] = ''; + $lang['strvalue'] = ''; + $lang['strunique'] = 'Φ'; + $lang['strprimary'] = ''; + $lang['strexport'] = ''; + $lang['strimport'] = ''; + $lang['strsql'] = 'SQL'; + $lang['strgo'] = ''; + $lang['stradmin'] = '̦'; + $lang['strvacuum'] = ''; + $lang['stranalyze'] = '̦'; + $lang['strclusterindex'] = ''; + $lang['strclustered'] = '?'; + $lang['strreindex'] = ' '; + $lang['strrun'] = ''; + $lang['stradd'] = ''; + $lang['strevent'] = 'Ħ'; + $lang['strwhere'] = ''; + $lang['strinstead'] = ' ͦ'; + $lang['strwhen'] = ''; + $lang['strformat'] = ''; + $lang['strdata'] = 'Φ'; + $lang['strconfirm'] = ''; + $lang['strexpression'] = ''; + $lang['strellipsis'] = '...'; + $lang['strexpand'] = ''; + $lang['strcollapse'] = ''; + $lang['strexplain'] = ''; + $lang['strexplainanalyze'] = ' ̦'; + $lang['strfind'] = ''; + $lang['stroptions'] = 'æ'; + $lang['strrefresh'] = ''; + $lang['strdownload'] = ''; + $lang['strdownloadgzipped'] = ' Ȧ gzip'; + $lang['strinfo'] = 'Ԧ'; + $lang['stroids'] = 'OIDs'; + $lang['stradvanced'] = ''; + $lang['strvariables'] = 'ͦΦ'; + $lang['strprocess'] = ''; + $lang['strprocesses'] = ''; + $lang['strsetting'] = ''; + $lang['streditsql'] = ' SQL'; + $lang['strruntime'] = ' : %s '; + $lang['strpaginate'] = ' Ҧ '; + $lang['struploadscript'] = ' SQL-:'; + $lang['strstarttime'] = ' '; + $lang['strfile'] = ''; + $lang['strfileimported'] = ' .'; + + // Error handling + $lang['strbadconfig'] = ' config.inc.php Ҧ. Ȧ config.inc.php-dist.'; + $lang['strnotloaded'] = ' æ PHP Цդ PostgreSQL. Ȧ Ц PHP, --with-pgsql configure.'; + $lang['strbadschema'] = ' .'; + $lang['strbadencoding'] = ' ڦ .'; + $lang['strsqlerror'] = ' SQL:'; + $lang['strinstatement'] = ' Ҧ:'; + $lang['strinvalidparam'] = ' .'; + $lang['strnodata'] = ' .'; + $lang['strnoobjects'] = '"Ԧ .'; + $lang['strrownotunique'] = ' Φ Ʀ .'; + $lang['strnoreportsdb'] = ' צԦ. ̦ INSTALL.'; + $lang['strnouploads'] = ' .'; + $lang['strimporterror'] = ' Φ.'; + $lang['strimporterrorline'] = ' צ %s.'; + + // Tables + $lang['strtable'] = ''; + $lang['strtables'] = 'æ'; + $lang['strshowalltables'] = ' Ӧ æ'; + $lang['strnotables'] = ' .'; + $lang['strnotable'] = ' .'; + $lang['strcreatetable'] = ' '; + $lang['strtablename'] = '" æ'; + $lang['strtableneedsname'] = ' Ȧ " æ.'; + $lang['strtableneedsfield'] = ' Ȧ .'; + $lang['strtableneedscols'] = ' Ȧ Ԧ.'; + $lang['strtablecreated'] = ' .'; + $lang['strtablecreatedbad'] = ' æ .'; + $lang['strconfdroptable'] = ' Φ, "%s"?'; + $lang['strtabledropped'] = ' .'; + $lang['strtabledroppedbad'] = ' æ .'; + $lang['strconfemptytable'] = ' Φ, "%s"?'; + $lang['strtableemptied'] = ' .'; + $lang['strtableemptiedbad'] = ' æ .'; + $lang['strinsertrow'] = ' '; + $lang['strrowinserted'] = ' .'; + $lang['strrowinsertedbad'] = ' .'; + $lang['streditrow'] = ' '; + $lang['strrowupdated'] = ' .'; + $lang['strrowupdatedbad'] = ' .'; + $lang['strdeleterow'] = ' '; + $lang['strconfdeleterow'] = ' Φ, ?'; + $lang['strrowdeleted'] = ' .'; + $lang['strrowdeletedbad'] = ' .'; + $lang['strsaveandrepeat'] = ' '; + $lang['strfield'] = ''; + $lang['strfields'] = ''; + $lang['strnumfields'] = '- ̦'; + $lang['strfieldneedsname'] = ' Ȧ '; + $lang['strselectallfields'] = ' Ӧ '; + $lang['strselectneedscol'] = ' Ȧ '; + $lang['strselectunary'] = ' .'; + $lang['straltercolumn'] = 'ͦ '; + $lang['strcolumnaltered'] = ' ͦ.'; + $lang['strcolumnalteredbad'] = 'ͦ .'; + $lang['strconfdropcolumn'] = ' Φ, "%s" æ "%s"?'; + $lang['strcolumndropped'] = ' .'; + $lang['strcolumndroppedbad'] = ' .'; + $lang['straddcolumn'] = ' '; + $lang['strcolumnadded'] = ' .'; + $lang['strcolumnaddedbad'] = ' .'; + $lang['strdataonly'] = ' Φ'; + $lang['strcascade'] = ''; + $lang['strtablealtered'] = ' ͦ.'; + $lang['strtablealteredbad'] = 'ͦ æ .'; + $lang['strdataonly'] = ' Φ'; + $lang['strstructureonly'] = ' '; + $lang['strstructureanddata'] = ' Φ'; + $lang['strtabbed'] = ' æ'; + $lang['strauto'] = ''; + + // Users + $lang['struser'] = ''; + $lang['strusers'] = 'ަ'; + $lang['strusername'] = '" '; + $lang['strpassword'] = ''; + $lang['strsuper'] = '?'; + $lang['strcreatedb'] = ' ?'; + $lang['strexpires'] = 'ͦ Ħ'; + $lang['strsessiondefaults'] = 'æ '; + $lang['strnousers'] = ' ަ.'; + $lang['struserupdated'] = ' .'; + $lang['struserupdatedbad'] = ' .'; + $lang['strshowallusers'] = ' Ӧ ަ'; + $lang['strcreateuser'] = ' '; + $lang['struserneedsname'] = ' Φ " .'; + $lang['strusercreated'] = ' .'; + $lang['strusercreatedbad'] = ' .'; + $lang['strconfdropuser'] = ' Φ, "%s"?'; + $lang['struserdropped'] = ' .'; + $lang['struserdroppedbad'] = ' .'; + $lang['straccount'] = '̦ '; + $lang['strchangepassword'] = 'ͦ '; + $lang['strpasswordchanged'] = ' ͦ.'; + $lang['strpasswordchangedbad'] = 'ͦ .'; + $lang['strpasswordshort'] = ' .'; + $lang['strpasswordconfirm'] = ' צצ Ц.'; + + // Groups + $lang['strgroup'] = ''; + $lang['strgroups'] = ''; + $lang['strnogroup'] = ' .'; + $lang['strnogroups'] = 'ϧ .'; + $lang['strcreategroup'] = ' '; + $lang['strshowallgroups'] = ' Ӧ '; + $lang['strgroupneedsname'] = ' Ȧ .'; + $lang['strgroupcreated'] = ' .'; + $lang['strgroupcreatedbad'] = ' .'; + $lang['strconfdropgroup'] = ' Φ, "%s"?'; + $lang['strgroupdropped'] = ' .'; + $lang['strgroupdroppedbad'] = ' .'; + $lang['strmembers'] = '˦'; + $lang['straddmember'] = ' '; + $lang['strmemberadded'] = ' .'; + $lang['strmemberaddedbad'] = ' .'; + $lang['strdropmember'] = ' '; + $lang['strconfdropmember'] = ' Φ, "%s" "%s"?'; + $lang['strmemberdropped'] = ' .'; + $lang['strmemberdroppedbad'] = ' .'; + + // Privileges + $lang['strprivilege'] = 'צ'; + $lang['strprivileges'] = 'צŧ'; + $lang['strnoprivileges'] = '" Ħ צ.'; + $lang['strgrant'] = ''; + $lang['strrevoke'] = ''; + $lang['strgranted'] = 'צŧ ͦ.'; + $lang['strgrantfailed'] = 'ͦ צŧ .'; + $lang['strgrantbad'] = ' Ȧ צ.'; + $lang['stralterprivs'] = 'ͦ צŧ'; + $lang['strgrantor'] = ''; + $lang['strasterisk'] = '*'; + + // Databases + $lang['strdatabase'] = ' '; + $lang['strdatabases'] = ' '; + $lang['strshowalldatabases'] = ' Ӧ '; + $lang['strnodatabase'] = ' .'; + $lang['strnodatabases'] = 'ϧ .'; + $lang['strcreatedatabase'] = ' '; + $lang['strdatabasename'] = '" '; + $lang['strdatabaseneedsname'] = ' Ȧ ϧ " ۦ ڦ .'; + $lang['strdatabasecreated'] = ' .'; + $lang['strdatabasecreatedbad'] = ' .'; + $lang['strconfdropdatabase'] = ' Φ, "%s"?'; + $lang['strdatabasedropped'] = ' .'; + $lang['strdatabasedroppedbad'] = ' .'; + $lang['strentersql'] = 'Ħ SQL-:'; + $lang['strsqlexecuted'] = 'SQL- .'; + $lang['strvacuumgood'] = 'æ .'; + $lang['strvacuumbad'] = 'æ .'; + $lang['stranalyzegood'] = ' æ ̦ .'; + $lang['stranalyzebad'] = ' æ ̦ .'; + $lang['strreindexgood'] = 'Ŧæ .'; + $lang['strreindexbad'] = 'Ŧæ .'; + $lang['strfull'] = 'Φ'; + $lang['strfreeze'] = ''; + $lang['strforce'] = ''; + + // Views + $lang['strview'] = ''; + $lang['strviews'] = ''; + $lang['strshowallviews'] = ' Ӧ '; + $lang['strnoview'] = ' .'; + $lang['strnoviews'] = ' .'; + $lang['strcreateview'] = ' '; + $lang['strviewname'] = '" '; + $lang['strviewneedsname'] = ' Ȧ " .'; + $lang['strviewneedsdef'] = ' Ȧ .'; + $lang['strviewneedsfields'] = ' Ȧ ¦ .'; + $lang['strviewcreated'] = ' .'; + $lang['strviewcreatedbad'] = ' .'; + $lang['strconfdropview'] = ' Φ, "%s"?'; + $lang['strviewdropped'] = ' .'; + $lang['strviewdroppedbad'] = ' .'; + $lang['strviewupdated'] = ' .'; + $lang['strviewupdatedbad'] = ' .'; + $lang['strviewlink'] = '"Φ ަ'; + $lang['strviewconditions'] = 'צ '; + $lang['strcreateviewwiz'] = ' , '; + + // Sequences + $lang['strsequence'] = '̦Φ'; + $lang['strsequences'] = ' ̦Ԧ'; + $lang['strshowallsequences'] = ' Ӧ ̦Ԧ'; + $lang['strnosequence'] = '̦Φ .'; + $lang['strnosequences'] = 'ϧ ̦Ԧ .'; + $lang['strcreatesequence'] = ' ̦Φ'; + $lang['strlastvalue'] = 'Τ '; + $lang['strincrementby'] = '¦ '; + $lang['strstartvalue'] = ' '; + $lang['strmaxvalue'] = '. '; + $lang['strminvalue'] = '. '; + $lang['strcachevalue'] = 'ͦ '; + $lang['strlogcount'] = 'Log Count'; + $lang['striscycled'] = '?'; + $lang['strsequenceneedsname'] = ' Ȧ " ̦Ԧ.'; + $lang['strsequencecreated'] = '̦Φ .'; + $lang['strsequencecreatedbad'] = ' ̦Ԧ .'; + $lang['strconfdropsequence'] = ' Φ, ̦Φ "%s"?'; + $lang['strsequencedropped'] = '̦Φ .'; + $lang['strsequencedroppedbad'] = ' ̦Ԧ .'; + $lang['strsequencereset'] = '̦Φ .'; + $lang['strsequenceresetbad'] = ' ̦Ԧ .'; + + // Indexes + $lang['strindex'] = ''; + $lang['strindexes'] = ''; + $lang['strindexname'] = '" '; + $lang['strshowallindexes'] = ' Ӧ '; + $lang['strnoindex'] = ' .'; + $lang['strnoindexes'] = ' .'; + $lang['strcreateindex'] = ' '; + $lang['strtabname'] = '" æ'; + $lang['strcolumnname'] = '" '; + $lang['strindexneedsname'] = ' Ȧ " '; + $lang['strindexneedscols'] = ' Ȧ ˦˦ Ԧ.'; + $lang['strindexcreated'] = ' .'; + $lang['strindexcreatedbad'] = ' .'; + $lang['strconfdropindex'] = ' Φ, "%s"?'; + $lang['strindexdropped'] = ' .'; + $lang['strindexdroppedbad'] = ' .'; + $lang['strkeyname'] = '" '; + $lang['struniquekey'] = 'Φ '; + $lang['strprimarykey'] = ' '; + $lang['strindextype'] = ' '; + $lang['strindexname'] = '" '; + $lang['strtablecolumnlist'] = 'Ԧ æ'; + $lang['strindexcolumnlist'] = 'Ԧ Ӧ'; + $lang['strconfcluster'] = ' Φ, "%s"?'; + $lang['strclusteredgood'] = 'æ .'; + $lang['strclusteredbad'] = 'æ .'; + + // Rules + $lang['strrules'] = ''; + $lang['strrule'] = ''; + $lang['strshowallrules'] = ' Ӧ '; + $lang['strnorule'] = ' .'; + $lang['strnorules'] = ' .'; + $lang['strcreaterule'] = ' '; + $lang['strrulename'] = '" '; + $lang['strruleneedsname'] = ' Ȧ " .'; + $lang['strrulecreated'] = ' .'; + $lang['strrulecreatedbad'] = ' .'; + $lang['strconfdroprule'] = ' Φ, "%s" "%s"?'; + $lang['strruledropped'] = ' .'; + $lang['strruledroppedbad'] = ' .'; + + // Constraints + $lang['strconstraints'] = ''; + $lang['strshowallconstraints'] = ' Ӧ '; + $lang['strnoconstraints'] = ' .'; + $lang['strcreateconstraint'] = ' '; + $lang['strconstraintcreated'] = ' .'; + $lang['strconstraintcreatedbad'] = ' .'; + $lang['strconfdropconstraint'] = ' Φ, "%s" "%s"?'; + $lang['strconstraintdropped'] = ' .'; + $lang['strconstraintdroppedbad'] = ' .'; + $lang['straddcheck'] = ' צ'; + $lang['strcheckneedsdefinition'] = ' צ դ .'; + $lang['strcheckadded'] = ' צ .'; + $lang['strcheckaddedbad'] = ' צ .'; + $lang['straddpk'] = ' '; + $lang['strpkneedscols'] = ' ͦ .'; + $lang['strpkadded'] = ' .'; + $lang['strpkaddedbad'] = ' .'; + $lang['stradduniq'] = ' Φ '; + $lang['struniqneedscols'] = 'Φ ͦ .'; + $lang['struniqadded'] = 'Φ .'; + $lang['struniqaddedbad'] = ' Φ .'; + $lang['straddfk'] = ' ΦΦ '; + $lang['strfkneedscols'] = 'ΦΦ ͦ .'; + $lang['strfkneedstarget'] = 'Φ צ Ȧ æ .'; + $lang['strfkadded'] = 'ΦΦ .'; + $lang['strfkaddedbad'] = ' Φ .'; + $lang['strfktarget'] = ' '; + $lang['strfkcolumnlist'] = ' ަ'; + $lang['strondelete'] = 'ON DELETE'; + $lang['stronupdate'] = 'ON UPDATE'; + + // Functions + $lang['strfunction'] = 'æ'; + $lang['strfunctions'] = ' æ'; + $lang['strshowallfunctions'] = ' Ӧ æ'; + $lang['strnofunction'] = 'æ .'; + $lang['strnofunctions'] = 'ϧ æ .'; + $lang['strcreatefunction'] = ' æ'; + $lang['strfunctionname'] = '" æ'; + $lang['strreturns'] = ', '; + $lang['strarguments'] = ''; + $lang['strproglanguage'] = ' '; + $lang['strproglanguage'] = ''; + $lang['strfunctionneedsname'] = ' Ȧ " æ.'; + $lang['strfunctionneedsdef'] = ' Ȧ æ.'; + $lang['strfunctioncreated'] = 'æ .'; + $lang['strfunctioncreatedbad'] = ' æ .'; + $lang['strconfdropfunction'] = ' Φ, æ "%s"?'; + $lang['strfunctiondropped'] = 'æ .'; + $lang['strfunctiondroppedbad'] = ' æ .'; + $lang['strfunctionupdated'] = 'æ .'; + $lang['strfunctionupdatedbad'] = ' æ .'; + + // Triggers + $lang['strtrigger'] = 'Ҧ'; + $lang['strtriggers'] = ' Ҧ'; + $lang['strshowalltriggers'] = ' Ӧ Ҧ'; + $lang['strnotrigger'] = 'Ҧ .'; + $lang['strnotriggers'] = ' Ҧ .'; + $lang['strcreatetrigger'] = ' Ҧ'; + $lang['strtriggerneedsname'] = ' Ȧ " Ҧ.'; + $lang['strtriggerneedsfunc'] = ' Ȧ æ Ҧ.'; + $lang['strtriggercreated'] = 'Ҧ .'; + $lang['strtriggercreatedbad'] = ' Ҧ .'; + $lang['strconfdroptrigger'] = ' Φ, Ҧ "%s" "%s"?'; + $lang['strtriggerdropped'] = 'Ҧ .'; + $lang['strtriggerdroppedbad'] = ' Ҧ .'; + $lang['strtriggeraltered'] = 'Ҧ ͦ.'; + $lang['strtriggeralteredbad'] = 'ͦ Ҧ .'; + + // Types + $lang['strtype'] = ' '; + $lang['strtypes'] = ' '; + $lang['strshowalltypes'] = ' Ӧ '; + $lang['strnotype'] = ' .'; + $lang['strnotypes'] = ' .'; + $lang['strcreatetype'] = ' '; + $lang['strtypename'] = '" '; + $lang['strinputfn'] = 'æ '; + $lang['stroutputfn'] = 'æ '; + $lang['strpassbyval'] = ' ?'; + $lang['stralignment'] = 'Ҧ'; + $lang['strelement'] = ''; + $lang['strdelimiter'] = 'Ħ'; + $lang['strstorage'] = 'Ҧ'; + $lang['strtypeneedsname'] = ' Ȧ " .'; + $lang['strtypeneedslen'] = ' Ȧ ͦ .'; + $lang['strtypecreated'] = ' .'; + $lang['strtypecreatedbad'] = ' .'; + $lang['strconfdroptype'] = ' Φ, "%s"?'; + $lang['strtypedropped'] = ' .'; + $lang['strtypedroppedbad'] = ' .'; + + // Schemas + $lang['strschema'] = ''; + $lang['strschemas'] = ''; + $lang['strshowallschemas'] = ' Ӧ '; + $lang['strnoschema'] = ' .'; + $lang['strnoschemas'] = 'ϧ .'; + $lang['strcreateschema'] = ' '; + $lang['strschemaname'] = '" '; + $lang['strschemaneedsname'] = ' Ȧ " .'; + $lang['strschemacreated'] = ' .'; + $lang['strschemacreatedbad'] = ' .'; + $lang['strconfdropschema'] = ' Φ, "%s"?'; + $lang['strschemadropped'] = ' .'; + $lang['strschemadroppedbad'] = ' .'; + $lang['strschemaaltered'] = ' .'; + $lang['strschemaalteredbad'] = ' .'; + + // Reports + $lang['strreport'] = 'צ'; + $lang['strreports'] = 'צ'; + $lang['strshowallreports'] = ' Ӧ צ'; + $lang['strnoreports'] = 'צԦ .'; + $lang['strcreatereport'] = ' צ'; + $lang['strreportdropped'] = 'צ .'; + $lang['strreportdroppedbad'] = ' צ .'; + $lang['strconfdropreport'] = ' Φ, צ "%s"?'; + $lang['strreportneedsname'] = ' Ȧ " צ.'; + $lang['strreportneedsdef'] = ' Ȧ SQL- צ.'; + $lang['strreportcreated'] = 'צ .'; + $lang['strreportcreatedbad'] = ' צ .'; + + // Domains + $lang['strdomain'] = ''; + $lang['strdomains'] = ''; + $lang['strshowalldomains'] = ' Ӧ '; + $lang['strnodomains'] = ' .'; + $lang['strcreatedomain'] = ' '; + $lang['strdomaindropped'] = ' .'; + $lang['strdomaindroppedbad'] = ' .'; + $lang['strconfdropdomain'] = ' Φ, "%s"?'; + $lang['strdomainneedsname'] = ' Ȧ " .'; + $lang['strdomaincreated'] = ' .'; + $lang['strdomaincreatedbad'] = ' .'; + $lang['strdomainaltered'] = ' ͦ.'; + $lang['strdomainalteredbad'] = 'ͦ .'; + + // Operators + $lang['stroperator'] = ''; + $lang['stroperators'] = ''; + $lang['strshowalloperators'] = ' Ӧ '; + $lang['strnooperator'] = ' .'; + $lang['strnooperators'] = 'Ҧ .'; + $lang['strcreateoperator'] = ' '; + $lang['strleftarg'] = ' ̦ '; + $lang['strrightarg'] = ' '; + $lang['strcommutator'] = ''; + $lang['strnegator'] = ''; + $lang['strrestrict'] = ''; + $lang['strjoin'] = '"'; + $lang['strhashes'] = ''; + $lang['strmerges'] = '"'; + $lang['strleftsort'] = ' ̦'; + $lang['strrightsort'] = ' '; + $lang['strlessthan'] = ''; + $lang['strgreaterthan'] = ''; + $lang['stroperatorneedsname'] = ' Ȧ .'; + $lang['stroperatorcreated'] = ' '; + $lang['stroperatorcreatedbad'] = ' .'; + $lang['strconfdropoperator'] = ' Φ, "%s"?'; + $lang['stroperatordropped'] = ' .'; + $lang['stroperatordroppedbad'] = ' .'; + + // Casts + $lang['strcasts'] = 'ڦæ'; + $lang['strnocasts'] = 'ڦæ .'; + $lang['strsourcetype'] = ' '; + $lang['strtargettype'] = ' '; + $lang['strimplicit'] = ''; + $lang['strinassignment'] = ' Φ'; + $lang['strbinarycompat'] = '(צ ͦ)'; + + // Conversions + $lang['strconversions'] = ''; + $lang['strnoconversions'] = ' .'; + $lang['strsourceencoding'] = ' '; + $lang['strtargetencoding'] = ' '; + + // Languages + $lang['strlanguages'] = ''; + $lang['strnolanguages'] = ' .'; + $lang['strtrusted'] = 'צ'; + + // Info + $lang['strnoinfo'] = ' ϧ æ.'; + $lang['strreferringtables'] = 'æ, '; + $lang['strparenttables'] = '˦˦ æ'; + $lang['strchildtables'] = 'ަΦ æ'; + + // Aggregates + $lang['straggregates'] = 'Φ '; + $lang['strnoaggregates'] = ' ڦ .'; + $lang['stralltypes'] = '(Ӧ )'; + + // Operator Classes + $lang['stropclasses'] = ' Ҧ'; + $lang['strnoopclasses'] = 'Ӧ Ҧ .'; + $lang['straccessmethod'] = ' '; + + // Stats and performance + $lang['strrowperf'] = ' '; + $lang['strioperf'] = ' /'; + $lang['stridxrowperf'] = ' '; + $lang['stridxioperf'] = ' /'; + $lang['strpercent'] = '%'; + $lang['strsequential'] = '̦'; + $lang['strscan'] = ''; + $lang['strread'] = ''; + $lang['strfetch'] = ''; + $lang['strheap'] = 'ͦ'; + $lang['strtoast'] = 'TOAST'; + $lang['strtoastindex'] = 'TOAST '; + $lang['strcache'] = ''; + $lang['strdisk'] = ''; + $lang['strrows2'] = ''; + + // Miscellaneous + $lang['strtopbar'] = '%s դ %s:%s -- Ť "%s"'; + $lang['strtimefmt'] = ' j-m-Y g:i'; + $lang['strhelp'] = ''; + +?> diff --git a/php/pgadmin/languages.php b/php/pgadmin/languages.php new file mode 100644 index 0000000..6ce806f --- /dev/null +++ b/php/pgadmin/languages.php @@ -0,0 +1,79 @@ +printTrail('database'); + $misc->printTabs('database','languages'); + $misc->printMsg($msg); + + $languages = $data->getLanguages(); + + $columns = array( + 'language' => array( + 'title' => $lang['strname'], + 'field' => field('lanname'), + ), + 'trusted' => array( + 'title' => $lang['strtrusted'], + 'field' => field('lanpltrusted'), + 'type' => 'yesno', + ), + 'function' => array( + 'title' => $lang['strfunction'], + 'field' => field('lanplcallf'), + ), + ); + + $actions = array(); + + $misc->printTable($languages, $columns, $actions, $lang['strnolanguages']); + } + + /** + * Generate XML for the browser tree. + */ + function doTree() { + global $misc, $data; + + $languages = $data->getLanguages(); + + $attrs = array( + 'text' => field('lanname'), + 'icon' => 'Language' + ); + + $misc->printTreeXML($languages, $attrs); + exit; + } + + if ($action == 'tree') doTree(); + + $misc->printHeader($lang['strlanguages']); + $misc->printBody(); + + switch ($action) { + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/libraries/adodb/adodb-csvlib.inc.php b/php/pgadmin/libraries/adodb/adodb-csvlib.inc.php new file mode 100644 index 0000000..1c0d081 --- /dev/null +++ b/php/pgadmin/libraries/adodb/adodb-csvlib.inc.php @@ -0,0 +1,318 @@ +FieldCount() : 0; + + if ($sql) $sql = urlencode($sql); + // metadata setup + + if ($max <= 0 || $rs->dataProvider == 'empty') { // is insert/update/delete + if (is_object($conn)) { + $sql .= ','.$conn->Affected_Rows(); + $sql .= ','.$conn->Insert_ID(); + } else + $sql .= ',,'; + + $text = "====-1,0,$sql\n"; + return $text; + } + $tt = ($rs->timeCreated) ? $rs->timeCreated : time(); + + ## changed format from ====0 to ====1 + $line = "====1,$tt,$sql\n"; + + if ($rs->databaseType == 'array') { + $rows = $rs->_array; + } else { + $rows = array(); + while (!$rs->EOF) { + $rows[] = $rs->fields; + $rs->MoveNext(); + } + } + + for($i=0; $i < $max; $i++) { + $o = $rs->FetchField($i); + $flds[] = $o; + } + + $savefetch = isset($rs->adodbFetchMode) ? $rs->adodbFetchMode : $rs->fetchMode; + $class = $rs->connection->arrayClass; + $rs2 = new $class(); + $rs2->timeCreated = $rs->timeCreated; # memcache fix + $rs2->sql = $rs->sql; + $rs2->oldProvider = $rs->dataProvider; + $rs2->InitArrayFields($rows,$flds); + $rs2->fetchMode = $savefetch; + return $line.serialize($rs2); + } + + +/** +* Open CSV file and convert it into Data. +* +* @param url file/ftp/http url +* @param err returns the error message +* @param timeout dispose if recordset has been alive for $timeout secs +* +* @return recordset, or false if error occured. If no +* error occurred in sql INSERT/UPDATE/DELETE, +* empty recordset is returned +*/ + function csv2rs($url,&$err,$timeout=0, $rsclass='ADORecordSet_array') + { + $false = false; + $err = false; + $fp = @fopen($url,'rb'); + if (!$fp) { + $err = $url.' file/URL not found'; + return $false; + } + @flock($fp, LOCK_SH); + $arr = array(); + $ttl = 0; + + if ($meta = fgetcsv($fp, 32000, ",")) { + // check if error message + if (strncmp($meta[0],'****',4) === 0) { + $err = trim(substr($meta[0],4,1024)); + fclose($fp); + return $false; + } + // check for meta data + // $meta[0] is -1 means return an empty recordset + // $meta[1] contains a time + + if (strncmp($meta[0], '====',4) === 0) { + + if ($meta[0] == "====-1") { + if (sizeof($meta) < 5) { + $err = "Corrupt first line for format -1"; + fclose($fp); + return $false; + } + fclose($fp); + + if ($timeout > 0) { + $err = " Illegal Timeout $timeout "; + return $false; + } + + $rs = new $rsclass($val=true); + $rs->fields = array(); + $rs->timeCreated = $meta[1]; + $rs->EOF = true; + $rs->_numOfFields = 0; + $rs->sql = urldecode($meta[2]); + $rs->affectedrows = (integer)$meta[3]; + $rs->insertid = $meta[4]; + return $rs; + } + # Under high volume loads, we want only 1 thread/process to _write_file + # so that we don't have 50 processes queueing to write the same data. + # We use probabilistic timeout, ahead of time. + # + # -4 sec before timeout, give processes 1/32 chance of timing out + # -2 sec before timeout, give processes 1/16 chance of timing out + # -1 sec after timeout give processes 1/4 chance of timing out + # +0 sec after timeout, give processes 100% chance of timing out + if (sizeof($meta) > 1) { + if($timeout >0){ + $tdiff = (integer)( $meta[1]+$timeout - time()); + if ($tdiff <= 2) { + switch($tdiff) { + case 4: + case 3: + if ((rand() & 31) == 0) { + fclose($fp); + $err = "Timeout 3"; + return $false; + } + break; + case 2: + if ((rand() & 15) == 0) { + fclose($fp); + $err = "Timeout 2"; + return $false; + } + break; + case 1: + if ((rand() & 3) == 0) { + fclose($fp); + $err = "Timeout 1"; + return $false; + } + break; + default: + fclose($fp); + $err = "Timeout 0"; + return $false; + } // switch + + } // if check flush cache + }// (timeout>0) + $ttl = $meta[1]; + } + //================================================ + // new cache format - use serialize extensively... + if ($meta[0] === '====1') { + // slurp in the data + $MAXSIZE = 128000; + + $text = fread($fp,$MAXSIZE); + if (strlen($text)) { + while ($txt = fread($fp,$MAXSIZE)) { + $text .= $txt; + } + } + fclose($fp); + $rs = unserialize($text); + if (is_object($rs)) $rs->timeCreated = $ttl; + else { + $err = "Unable to unserialize recordset"; + //echo htmlspecialchars($text),' !--END--!

'; + } + return $rs; + } + + $meta = false; + $meta = fgetcsv($fp, 32000, ","); + if (!$meta) { + fclose($fp); + $err = "Unexpected EOF 1"; + return $false; + } + } + + // Get Column definitions + $flds = array(); + foreach($meta as $o) { + $o2 = explode(':',$o); + if (sizeof($o2)!=3) { + $arr[] = $meta; + $flds = false; + break; + } + $fld = new ADOFieldObject(); + $fld->name = urldecode($o2[0]); + $fld->type = $o2[1]; + $fld->max_length = $o2[2]; + $flds[] = $fld; + } + } else { + fclose($fp); + $err = "Recordset had unexpected EOF 2"; + return $false; + } + + // slurp in the data + $MAXSIZE = 128000; + + $text = ''; + while ($txt = fread($fp,$MAXSIZE)) { + $text .= $txt; + } + + fclose($fp); + @$arr = unserialize($text); + //var_dump($arr); + if (!is_array($arr)) { + $err = "Recordset had unexpected EOF (in serialized recordset)"; + if (get_magic_quotes_runtime()) $err .= ". Magic Quotes Runtime should be disabled!"; + return $false; + } + $rs = new $rsclass(); + $rs->timeCreated = $ttl; + $rs->InitArrayFields($arr,$flds); + return $rs; + } + + + /** + * Save a file $filename and its $contents (normally for caching) with file locking + * Returns true if ok, false if fopen/fwrite error, 0 if rename error (eg. file is locked) + */ + function adodb_write_file($filename, $contents,$debug=false) + { + # http://www.php.net/bugs.php?id=9203 Bug that flock fails on Windows + # So to simulate locking, we assume that rename is an atomic operation. + # First we delete $filename, then we create a $tempfile write to it and + # rename to the desired $filename. If the rename works, then we successfully + # modified the file exclusively. + # What a stupid need - having to simulate locking. + # Risks: + # 1. $tempfile name is not unique -- very very low + # 2. unlink($filename) fails -- ok, rename will fail + # 3. adodb reads stale file because unlink fails -- ok, $rs timeout occurs + # 4. another process creates $filename between unlink() and rename() -- ok, rename() fails and cache updated + if (strncmp(PHP_OS,'WIN',3) === 0) { + // skip the decimal place + $mtime = substr(str_replace(' ','_',microtime()),2); + // getmypid() actually returns 0 on Win98 - never mind! + $tmpname = $filename.uniqid($mtime).getmypid(); + if (!($fd = @fopen($tmpname,'w'))) return false; + if (fwrite($fd,$contents)) $ok = true; + else $ok = false; + fclose($fd); + + if ($ok) { + @chmod($tmpname,0644); + // the tricky moment + @unlink($filename); + if (!@rename($tmpname,$filename)) { + unlink($tmpname); + $ok = 0; + } + if (!$ok) { + if ($debug) ADOConnection::outp( " Rename $tmpname ".($ok? 'ok' : 'failed')); + } + } + return $ok; + } + if (!($fd = @fopen($filename, 'a'))) return false; + if (flock($fd, LOCK_EX) && ftruncate($fd, 0)) { + if (fwrite( $fd, $contents )) $ok = true; + else $ok = false; + fclose($fd); + @chmod($filename,0644); + }else { + fclose($fd); + if ($debug)ADOConnection::outp( " Failed acquiring lock for $filename
\n"); + $ok = false; + } + + return $ok; + } +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/adodb-datadict.inc.php b/php/pgadmin/libraries/adodb/adodb-datadict.inc.php new file mode 100644 index 0000000..69060c5 --- /dev/null +++ b/php/pgadmin/libraries/adodb/adodb-datadict.inc.php @@ -0,0 +1,1032 @@ +$str

"; +$a= Lens_ParseArgs($str); +print "
";
+print_r($a);
+print "
"; +} + + +if (!function_exists('ctype_alnum')) { + function ctype_alnum($text) { + return preg_match('/^[a-z0-9]*$/i', $text); + } +} + +//Lens_ParseTest(); + +/** + Parse arguments, treat "text" (text) and 'text' as quotation marks. + To escape, use "" or '' or )) + + Will read in "abc def" sans quotes, as: abc def + Same with 'abc def'. + However if `abc def`, then will read in as `abc def` + + @param endstmtchar Character that indicates end of statement + @param tokenchars Include the following characters in tokens apart from A-Z and 0-9 + @returns 2 dimensional array containing parsed tokens. +*/ +function Lens_ParseArgs($args,$endstmtchar=',',$tokenchars='_.-') +{ + $pos = 0; + $intoken = false; + $stmtno = 0; + $endquote = false; + $tokens = array(); + $tokens[$stmtno] = array(); + $max = strlen($args); + $quoted = false; + $tokarr = array(); + + while ($pos < $max) { + $ch = substr($args,$pos,1); + switch($ch) { + case ' ': + case "\t": + case "\n": + case "\r": + if (!$quoted) { + if ($intoken) { + $intoken = false; + $tokens[$stmtno][] = implode('',$tokarr); + } + break; + } + + $tokarr[] = $ch; + break; + + case '`': + if ($intoken) $tokarr[] = $ch; + case '(': + case ')': + case '"': + case "'": + + if ($intoken) { + if (empty($endquote)) { + $tokens[$stmtno][] = implode('',$tokarr); + if ($ch == '(') $endquote = ')'; + else $endquote = $ch; + $quoted = true; + $intoken = true; + $tokarr = array(); + } else if ($endquote == $ch) { + $ch2 = substr($args,$pos+1,1); + if ($ch2 == $endquote) { + $pos += 1; + $tokarr[] = $ch2; + } else { + $quoted = false; + $intoken = false; + $tokens[$stmtno][] = implode('',$tokarr); + $endquote = ''; + } + } else + $tokarr[] = $ch; + + }else { + + if ($ch == '(') $endquote = ')'; + else $endquote = $ch; + $quoted = true; + $intoken = true; + $tokarr = array(); + if ($ch == '`') $tokarr[] = '`'; + } + break; + + default: + + if (!$intoken) { + if ($ch == $endstmtchar) { + $stmtno += 1; + $tokens[$stmtno] = array(); + break; + } + + $intoken = true; + $quoted = false; + $endquote = false; + $tokarr = array(); + + } + + if ($quoted) $tokarr[] = $ch; + else if (ctype_alnum($ch) || strpos($tokenchars,$ch) !== false) $tokarr[] = $ch; + else { + if ($ch == $endstmtchar) { + $tokens[$stmtno][] = implode('',$tokarr); + $stmtno += 1; + $tokens[$stmtno] = array(); + $intoken = false; + $tokarr = array(); + break; + } + $tokens[$stmtno][] = implode('',$tokarr); + $tokens[$stmtno][] = $ch; + $intoken = false; + } + } + $pos += 1; + } + if ($intoken) $tokens[$stmtno][] = implode('',$tokarr); + + return $tokens; +} + + +class ADODB_DataDict { + var $connection; + var $debug = false; + var $dropTable = 'DROP TABLE %s'; + var $renameTable = 'RENAME TABLE %s TO %s'; + var $dropIndex = 'DROP INDEX %s'; + var $addCol = ' ADD'; + var $alterCol = ' ALTER COLUMN'; + var $dropCol = ' DROP COLUMN'; + var $renameColumn = 'ALTER TABLE %s RENAME COLUMN %s TO %s'; // table, old-column, new-column, column-definitions (not used by default) + var $nameRegex = '\w'; + var $nameRegexBrackets = 'a-zA-Z0-9_\(\)'; + var $schema = false; + var $serverInfo = array(); + var $autoIncrement = false; + var $dataProvider; + var $invalidResizeTypes4 = array('CLOB','BLOB','TEXT','DATE','TIME'); // for changetablesql + var $blobSize = 100; /// any varchar/char field this size or greater is treated as a blob + /// in other words, we use a text area for editting. + + function GetCommentSQL($table,$col) + { + return false; + } + + function SetCommentSQL($table,$col,$cmt) + { + return false; + } + + function MetaTables() + { + if (!$this->connection->IsConnected()) return array(); + return $this->connection->MetaTables(); + } + + function MetaColumns($tab, $upper=true, $schema=false) + { + if (!$this->connection->IsConnected()) return array(); + return $this->connection->MetaColumns($this->TableName($tab), $upper, $schema); + } + + function MetaPrimaryKeys($tab,$owner=false,$intkey=false) + { + if (!$this->connection->IsConnected()) return array(); + return $this->connection->MetaPrimaryKeys($this->TableName($tab), $owner, $intkey); + } + + function MetaIndexes($table, $primary = false, $owner = false) + { + if (!$this->connection->IsConnected()) return array(); + return $this->connection->MetaIndexes($this->TableName($table), $primary, $owner); + } + + function MetaType($t,$len=-1,$fieldobj=false) + { + static $typeMap = array( + 'VARCHAR' => 'C', + 'VARCHAR2' => 'C', + 'CHAR' => 'C', + 'C' => 'C', + 'STRING' => 'C', + 'NCHAR' => 'C', + 'NVARCHAR' => 'C', + 'VARYING' => 'C', + 'BPCHAR' => 'C', + 'CHARACTER' => 'C', + 'INTERVAL' => 'C', # Postgres + 'MACADDR' => 'C', # postgres + 'VAR_STRING' => 'C', # mysql + ## + 'LONGCHAR' => 'X', + 'TEXT' => 'X', + 'NTEXT' => 'X', + 'M' => 'X', + 'X' => 'X', + 'CLOB' => 'X', + 'NCLOB' => 'X', + 'LVARCHAR' => 'X', + ## + 'BLOB' => 'B', + 'IMAGE' => 'B', + 'BINARY' => 'B', + 'VARBINARY' => 'B', + 'LONGBINARY' => 'B', + 'B' => 'B', + ## + 'YEAR' => 'D', // mysql + 'DATE' => 'D', + 'D' => 'D', + ## + 'UNIQUEIDENTIFIER' => 'C', # MS SQL Server + ## + 'TIME' => 'T', + 'TIMESTAMP' => 'T', + 'DATETIME' => 'T', + 'TIMESTAMPTZ' => 'T', + 'SMALLDATETIME' => 'T', + 'T' => 'T', + 'TIMESTAMP WITHOUT TIME ZONE' => 'T', // postgresql + ## + 'BOOL' => 'L', + 'BOOLEAN' => 'L', + 'BIT' => 'L', + 'L' => 'L', + ## + 'COUNTER' => 'R', + 'R' => 'R', + 'SERIAL' => 'R', // ifx + 'INT IDENTITY' => 'R', + ## + 'INT' => 'I', + 'INT2' => 'I', + 'INT4' => 'I', + 'INT8' => 'I', + 'INTEGER' => 'I', + 'INTEGER UNSIGNED' => 'I', + 'SHORT' => 'I', + 'TINYINT' => 'I', + 'SMALLINT' => 'I', + 'I' => 'I', + ## + 'LONG' => 'N', // interbase is numeric, oci8 is blob + 'BIGINT' => 'N', // this is bigger than PHP 32-bit integers + 'DECIMAL' => 'N', + 'DEC' => 'N', + 'REAL' => 'N', + 'DOUBLE' => 'N', + 'DOUBLE PRECISION' => 'N', + 'SMALLFLOAT' => 'N', + 'FLOAT' => 'N', + 'NUMBER' => 'N', + 'NUM' => 'N', + 'NUMERIC' => 'N', + 'MONEY' => 'N', + + ## informix 9.2 + 'SQLINT' => 'I', + 'SQLSERIAL' => 'I', + 'SQLSMINT' => 'I', + 'SQLSMFLOAT' => 'N', + 'SQLFLOAT' => 'N', + 'SQLMONEY' => 'N', + 'SQLDECIMAL' => 'N', + 'SQLDATE' => 'D', + 'SQLVCHAR' => 'C', + 'SQLCHAR' => 'C', + 'SQLDTIME' => 'T', + 'SQLINTERVAL' => 'N', + 'SQLBYTES' => 'B', + 'SQLTEXT' => 'X', + ## informix 10 + "SQLINT8" => 'I8', + "SQLSERIAL8" => 'I8', + "SQLNCHAR" => 'C', + "SQLNVCHAR" => 'C', + "SQLLVARCHAR" => 'X', + "SQLBOOL" => 'L' + ); + + if (!$this->connection->IsConnected()) { + $t = strtoupper($t); + if (isset($typeMap[$t])) return $typeMap[$t]; + return 'N'; + } + return $this->connection->MetaType($t,$len,$fieldobj); + } + + function NameQuote($name = NULL,$allowBrackets=false) + { + if (!is_string($name)) { + return FALSE; + } + + $name = trim($name); + + if ( !is_object($this->connection) ) { + return $name; + } + + $quote = $this->connection->nameQuote; + + // if name is of the form `name`, quote it + if ( preg_match('/^`(.+)`$/', $name, $matches) ) { + return $quote . $matches[1] . $quote; + } + + // if name contains special characters, quote it + $regex = ($allowBrackets) ? $this->nameRegexBrackets : $this->nameRegex; + + if ( !preg_match('/^[' . $regex . ']+$/', $name) ) { + return $quote . $name . $quote; + } + + return $name; + } + + function TableName($name) + { + if ( $this->schema ) { + return $this->NameQuote($this->schema) .'.'. $this->NameQuote($name); + } + return $this->NameQuote($name); + } + + // Executes the sql array returned by GetTableSQL and GetIndexSQL + function ExecuteSQLArray($sql, $continueOnError = true) + { + $rez = 2; + $conn = $this->connection; + $saved = $conn->debug; + foreach($sql as $line) { + + if ($this->debug) $conn->debug = true; + $ok = $conn->Execute($line); + $conn->debug = $saved; + if (!$ok) { + if ($this->debug) ADOConnection::outp($conn->ErrorMsg()); + if (!$continueOnError) return 0; + $rez = 1; + } + } + return $rez; + } + + /** + Returns the actual type given a character code. + + C: varchar + X: CLOB (character large object) or largest varchar size if CLOB is not supported + C2: Multibyte varchar + X2: Multibyte CLOB + + B: BLOB (binary large object) + + D: Date + T: Date-time + L: Integer field suitable for storing booleans (0 or 1) + I: Integer + F: Floating point number + N: Numeric or decimal number + */ + + function ActualType($meta) + { + return $meta; + } + + function CreateDatabase($dbname,$options=false) + { + $options = $this->_Options($options); + $sql = array(); + + $s = 'CREATE DATABASE ' . $this->NameQuote($dbname); + if (isset($options[$this->upperName])) + $s .= ' '.$options[$this->upperName]; + + $sql[] = $s; + return $sql; + } + + /* + Generates the SQL to create index. Returns an array of sql strings. + */ + function CreateIndexSQL($idxname, $tabname, $flds, $idxoptions = false) + { + if (!is_array($flds)) { + $flds = explode(',',$flds); + } + + foreach($flds as $key => $fld) { + # some indexes can use partial fields, eg. index first 32 chars of "name" with NAME(32) + $flds[$key] = $this->NameQuote($fld,$allowBrackets=true); + } + + return $this->_IndexSQL($this->NameQuote($idxname), $this->TableName($tabname), $flds, $this->_Options($idxoptions)); + } + + function DropIndexSQL ($idxname, $tabname = NULL) + { + return array(sprintf($this->dropIndex, $this->NameQuote($idxname), $this->TableName($tabname))); + } + + function SetSchema($schema) + { + $this->schema = $schema; + } + + function AddColumnSQL($tabname, $flds) + { + $tabname = $this->TableName ($tabname); + $sql = array(); + list($lines,$pkey,$idxs) = $this->_GenFields($flds); + // genfields can return FALSE at times + if ($lines == null) $lines = array(); + $alter = 'ALTER TABLE ' . $tabname . $this->addCol . ' '; + foreach($lines as $v) { + $sql[] = $alter . $v; + } + if (is_array($idxs)) { + foreach($idxs as $idx => $idxdef) { + $sql_idxs = $this->CreateIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']); + $sql = array_merge($sql, $sql_idxs); + } + } + return $sql; + } + + /** + * Change the definition of one column + * + * As some DBM's can't do that on there own, you need to supply the complete defintion of the new table, + * to allow, recreating the table and copying the content over to the new table + * @param string $tabname table-name + * @param string $flds column-name and type for the changed column + * @param string $tableflds='' complete defintion of the new table, eg. for postgres, default '' + * @param array/string $tableoptions='' options for the new table see CreateTableSQL, default '' + * @return array with SQL strings + */ + function AlterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') + { + $tabname = $this->TableName ($tabname); + $sql = array(); + list($lines,$pkey,$idxs) = $this->_GenFields($flds); + // genfields can return FALSE at times + if ($lines == null) $lines = array(); + $alter = 'ALTER TABLE ' . $tabname . $this->alterCol . ' '; + foreach($lines as $v) { + $sql[] = $alter . $v; + } + if (is_array($idxs)) { + foreach($idxs as $idx => $idxdef) { + $sql_idxs = $this->CreateIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']); + $sql = array_merge($sql, $sql_idxs); + } + + } + return $sql; + } + + /** + * Rename one column + * + * Some DBM's can only do this together with changeing the type of the column (even if that stays the same, eg. mysql) + * @param string $tabname table-name + * @param string $oldcolumn column-name to be renamed + * @param string $newcolumn new column-name + * @param string $flds='' complete column-defintion-string like for AddColumnSQL, only used by mysql atm., default='' + * @return array with SQL strings + */ + function RenameColumnSQL($tabname,$oldcolumn,$newcolumn,$flds='') + { + $tabname = $this->TableName ($tabname); + if ($flds) { + list($lines,$pkey,$idxs) = $this->_GenFields($flds); + // genfields can return FALSE at times + if ($lines == null) $lines = array(); + list(,$first) = each($lines); + list(,$column_def) = preg_split("/[\t ]+/",$first,2); + } + return array(sprintf($this->renameColumn,$tabname,$this->NameQuote($oldcolumn),$this->NameQuote($newcolumn),$column_def)); + } + + /** + * Drop one column + * + * Some DBM's can't do that on there own, you need to supply the complete defintion of the new table, + * to allow, recreating the table and copying the content over to the new table + * @param string $tabname table-name + * @param string $flds column-name and type for the changed column + * @param string $tableflds='' complete defintion of the new table, eg. for postgres, default '' + * @param array/string $tableoptions='' options for the new table see CreateTableSQL, default '' + * @return array with SQL strings + */ + function DropColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') + { + $tabname = $this->TableName ($tabname); + if (!is_array($flds)) $flds = explode(',',$flds); + $sql = array(); + $alter = 'ALTER TABLE ' . $tabname . $this->dropCol . ' '; + foreach($flds as $v) { + $sql[] = $alter . $this->NameQuote($v); + } + return $sql; + } + + function DropTableSQL($tabname) + { + return array (sprintf($this->dropTable, $this->TableName($tabname))); + } + + function RenameTableSQL($tabname,$newname) + { + return array (sprintf($this->renameTable, $this->TableName($tabname),$this->TableName($newname))); + } + + /** + Generate the SQL to create table. Returns an array of sql strings. + */ + function CreateTableSQL($tabname, $flds, $tableoptions=array()) + { + list($lines,$pkey,$idxs) = $this->_GenFields($flds, true); + // genfields can return FALSE at times + if ($lines == null) $lines = array(); + + $taboptions = $this->_Options($tableoptions); + $tabname = $this->TableName ($tabname); + $sql = $this->_TableSQL($tabname,$lines,$pkey,$taboptions); + + // ggiunta - 2006/10/12 - KLUDGE: + // if we are on autoincrement, and table options includes REPLACE, the + // autoincrement sequence has already been dropped on table creation sql, so + // we avoid passing REPLACE to trigger creation code. This prevents + // creating sql that double-drops the sequence + if ($this->autoIncrement && isset($taboptions['REPLACE'])) + unset($taboptions['REPLACE']); + $tsql = $this->_Triggers($tabname,$taboptions); + foreach($tsql as $s) $sql[] = $s; + + if (is_array($idxs)) { + foreach($idxs as $idx => $idxdef) { + $sql_idxs = $this->CreateIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']); + $sql = array_merge($sql, $sql_idxs); + } + } + + return $sql; + } + + + + function _GenFields($flds,$widespacing=false) + { + if (is_string($flds)) { + $padding = ' '; + $txt = $flds.$padding; + $flds = array(); + $flds0 = Lens_ParseArgs($txt,','); + $hasparam = false; + foreach($flds0 as $f0) { + $f1 = array(); + foreach($f0 as $token) { + switch (strtoupper($token)) { + case 'INDEX': + $f1['INDEX'] = ''; + // fall through intentionally + case 'CONSTRAINT': + case 'DEFAULT': + $hasparam = $token; + break; + default: + if ($hasparam) $f1[$hasparam] = $token; + else $f1[] = $token; + $hasparam = false; + break; + } + } + // 'index' token without a name means single column index: name it after column + if (array_key_exists('INDEX', $f1) && $f1['INDEX'] == '') { + $f1['INDEX'] = isset($f0['NAME']) ? $f0['NAME'] : $f0[0]; + // check if column name used to create an index name was quoted + if (($f1['INDEX'][0] == '"' || $f1['INDEX'][0] == "'" || $f1['INDEX'][0] == "`") && + ($f1['INDEX'][0] == substr($f1['INDEX'], -1))) { + $f1['INDEX'] = $f1['INDEX'][0].'idx_'.substr($f1['INDEX'], 1, -1).$f1['INDEX'][0]; + } + else + $f1['INDEX'] = 'idx_'.$f1['INDEX']; + } + // reset it, so we don't get next field 1st token as INDEX... + $hasparam = false; + + $flds[] = $f1; + + } + } + $this->autoIncrement = false; + $lines = array(); + $pkey = array(); + $idxs = array(); + foreach($flds as $fld) { + $fld = _array_change_key_case($fld); + + $fname = false; + $fdefault = false; + $fautoinc = false; + $ftype = false; + $fsize = false; + $fprec = false; + $fprimary = false; + $fnoquote = false; + $fdefts = false; + $fdefdate = false; + $fconstraint = false; + $fnotnull = false; + $funsigned = false; + $findex = ''; + $funiqueindex = false; + + //----------------- + // Parse attributes + foreach($fld as $attr => $v) { + if ($attr == 2 && is_numeric($v)) $attr = 'SIZE'; + else if (is_numeric($attr) && $attr > 1 && !is_numeric($v)) $attr = strtoupper($v); + + switch($attr) { + case '0': + case 'NAME': $fname = $v; break; + case '1': + case 'TYPE': $ty = $v; $ftype = $this->ActualType(strtoupper($v)); break; + + case 'SIZE': + $dotat = strpos($v,'.'); if ($dotat === false) $dotat = strpos($v,','); + if ($dotat === false) $fsize = $v; + else { + $fsize = substr($v,0,$dotat); + $fprec = substr($v,$dotat+1); + } + break; + case 'UNSIGNED': $funsigned = true; break; + case 'AUTOINCREMENT': + case 'AUTO': $fautoinc = true; $fnotnull = true; break; + case 'KEY': + // a primary key col can be non unique in itself (if key spans many cols...) + case 'PRIMARY': $fprimary = $v; $fnotnull = true; /*$funiqueindex = true;*/ break; + case 'DEF': + case 'DEFAULT': $fdefault = $v; break; + case 'NOTNULL': $fnotnull = $v; break; + case 'NOQUOTE': $fnoquote = $v; break; + case 'DEFDATE': $fdefdate = $v; break; + case 'DEFTIMESTAMP': $fdefts = $v; break; + case 'CONSTRAINT': $fconstraint = $v; break; + // let INDEX keyword create a 'very standard' index on column + case 'INDEX': $findex = $v; break; + case 'UNIQUE': $funiqueindex = true; break; + } //switch + } // foreach $fld + + //-------------------- + // VALIDATE FIELD INFO + if (!strlen($fname)) { + if ($this->debug) ADOConnection::outp("Undefined NAME"); + return false; + } + + $fid = strtoupper(preg_replace('/^`(.+)`$/', '$1', $fname)); + $fname = $this->NameQuote($fname); + + if (!strlen($ftype)) { + if ($this->debug) ADOConnection::outp("Undefined TYPE for field '$fname'"); + return false; + } else { + $ftype = strtoupper($ftype); + } + + $ftype = $this->_GetSize($ftype, $ty, $fsize, $fprec); + + if ($ty == 'X' || $ty == 'X2' || $ty == 'B') $fnotnull = false; // some blob types do not accept nulls + + if ($fprimary) $pkey[] = $fname; + + // some databases do not allow blobs to have defaults + if ($ty == 'X') $fdefault = false; + + // build list of indexes + if ($findex != '') { + if (array_key_exists($findex, $idxs)) { + $idxs[$findex]['cols'][] = ($fname); + if (in_array('UNIQUE', $idxs[$findex]['opts']) != $funiqueindex) { + if ($this->debug) ADOConnection::outp("Index $findex defined once UNIQUE and once not"); + } + if ($funiqueindex && !in_array('UNIQUE', $idxs[$findex]['opts'])) + $idxs[$findex]['opts'][] = 'UNIQUE'; + } + else + { + $idxs[$findex] = array(); + $idxs[$findex]['cols'] = array($fname); + if ($funiqueindex) + $idxs[$findex]['opts'] = array('UNIQUE'); + else + $idxs[$findex]['opts'] = array(); + } + } + + //-------------------- + // CONSTRUCT FIELD SQL + if ($fdefts) { + if (substr($this->connection->databaseType,0,5) == 'mysql') { + $ftype = 'TIMESTAMP'; + } else { + $fdefault = $this->connection->sysTimeStamp; + } + } else if ($fdefdate) { + if (substr($this->connection->databaseType,0,5) == 'mysql') { + $ftype = 'TIMESTAMP'; + } else { + $fdefault = $this->connection->sysDate; + } + } else if ($fdefault !== false && !$fnoquote) { + if ($ty == 'C' or $ty == 'X' or + ( substr($fdefault,0,1) != "'" && !is_numeric($fdefault))) { + + if (($ty == 'D' || $ty == 'T') && strtolower($fdefault) != 'null') { + // convert default date into database-aware code + if ($ty == 'T') + { + $fdefault = $this->connection->DBTimeStamp($fdefault); + } + else + { + $fdefault = $this->connection->DBDate($fdefault); + } + } + else + if (strlen($fdefault) != 1 && substr($fdefault,0,1) == ' ' && substr($fdefault,strlen($fdefault)-1) == ' ') + $fdefault = trim($fdefault); + else if (strtolower($fdefault) != 'null') + $fdefault = $this->connection->qstr($fdefault); + } + } + $suffix = $this->_CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned); + + // add index creation + if ($widespacing) $fname = str_pad($fname,24); + + // check for field names appearing twice + if (array_key_exists($fid, $lines)) { + ADOConnection::outp("Field '$fname' defined twice"); + } + + $lines[$fid] = $fname.' '.$ftype.$suffix; + + if ($fautoinc) $this->autoIncrement = true; + } // foreach $flds + + return array($lines,$pkey,$idxs); + } + + /** + GENERATE THE SIZE PART OF THE DATATYPE + $ftype is the actual type + $ty is the type defined originally in the DDL + */ + function _GetSize($ftype, $ty, $fsize, $fprec) + { + if (strlen($fsize) && $ty != 'X' && $ty != 'B' && strpos($ftype,'(') === false) { + $ftype .= "(".$fsize; + if (strlen($fprec)) $ftype .= ",".$fprec; + $ftype .= ')'; + } + return $ftype; + } + + + // return string must begin with space + function _CreateSuffix($fname,&$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned) + { + $suffix = ''; + if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault"; + if ($fnotnull) $suffix .= ' NOT NULL'; + if ($fconstraint) $suffix .= ' '.$fconstraint; + return $suffix; + } + + function _IndexSQL($idxname, $tabname, $flds, $idxoptions) + { + $sql = array(); + + if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) { + $sql[] = sprintf ($this->dropIndex, $idxname); + if ( isset($idxoptions['DROP']) ) + return $sql; + } + + if ( empty ($flds) ) { + return $sql; + } + + $unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : ''; + + $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname . ' '; + + if ( isset($idxoptions[$this->upperName]) ) + $s .= $idxoptions[$this->upperName]; + + if ( is_array($flds) ) + $flds = implode(', ',$flds); + $s .= '(' . $flds . ')'; + $sql[] = $s; + + return $sql; + } + + function _DropAutoIncrement($tabname) + { + return false; + } + + function _TableSQL($tabname,$lines,$pkey,$tableoptions) + { + $sql = array(); + + if (isset($tableoptions['REPLACE']) || isset ($tableoptions['DROP'])) { + $sql[] = sprintf($this->dropTable,$tabname); + if ($this->autoIncrement) { + $sInc = $this->_DropAutoIncrement($tabname); + if ($sInc) $sql[] = $sInc; + } + if ( isset ($tableoptions['DROP']) ) { + return $sql; + } + } + $s = "CREATE TABLE $tabname (\n"; + $s .= implode(",\n", $lines); + if (sizeof($pkey)>0) { + $s .= ",\n PRIMARY KEY ("; + $s .= implode(", ",$pkey).")"; + } + if (isset($tableoptions['CONSTRAINTS'])) + $s .= "\n".$tableoptions['CONSTRAINTS']; + + if (isset($tableoptions[$this->upperName.'_CONSTRAINTS'])) + $s .= "\n".$tableoptions[$this->upperName.'_CONSTRAINTS']; + + $s .= "\n)"; + if (isset($tableoptions[$this->upperName])) $s .= $tableoptions[$this->upperName]; + $sql[] = $s; + + return $sql; + } + + /** + GENERATE TRIGGERS IF NEEDED + used when table has auto-incrementing field that is emulated using triggers + */ + function _Triggers($tabname,$taboptions) + { + return array(); + } + + /** + Sanitize options, so that array elements with no keys are promoted to keys + */ + function _Options($opts) + { + if (!is_array($opts)) return array(); + $newopts = array(); + foreach($opts as $k => $v) { + if (is_numeric($k)) $newopts[strtoupper($v)] = $v; + else $newopts[strtoupper($k)] = $v; + } + return $newopts; + } + + + function _getSizePrec($size) + { + $fsize = false; + $fprec = false; + $dotat = strpos($size,'.'); + if ($dotat === false) $dotat = strpos($size,','); + if ($dotat === false) $fsize = $size; + else { + $fsize = substr($size,0,$dotat); + $fprec = substr($size,$dotat+1); + } + return array($fsize, $fprec); + } + + /** + "Florian Buzin [ easywe ]" + + This function changes/adds new fields to your table. You don't + have to know if the col is new or not. It will check on its own. + */ + function ChangeTableSQL($tablename, $flds, $tableoptions = false, $dropOldFlds=false) + { + global $ADODB_FETCH_MODE; + + $save = $ADODB_FETCH_MODE; + $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; + if ($this->connection->fetchMode !== false) $savem = $this->connection->SetFetchMode(false); + + // check table exists + $save_handler = $this->connection->raiseErrorFn; + $this->connection->raiseErrorFn = ''; + $cols = $this->MetaColumns($tablename); + $this->connection->raiseErrorFn = $save_handler; + + if (isset($savem)) $this->connection->SetFetchMode($savem); + $ADODB_FETCH_MODE = $save; + + if ( empty($cols)) { + return $this->CreateTableSQL($tablename, $flds, $tableoptions); + } + + if (is_array($flds)) { + // Cycle through the update fields, comparing + // existing fields to fields to update. + // if the Metatype and size is exactly the + // same, ignore - by Mark Newham + $holdflds = array(); + foreach($flds as $k=>$v) { + if ( isset($cols[$k]) && is_object($cols[$k]) ) { + // If already not allowing nulls, then don't change + $obj = $cols[$k]; + if (isset($obj->not_null) && $obj->not_null) + $v = str_replace('NOT NULL','',$v); + if (isset($obj->auto_increment) && $obj->auto_increment && empty($v['AUTOINCREMENT'])) + $v = str_replace('AUTOINCREMENT','',$v); + + $c = $cols[$k]; + $ml = $c->max_length; + $mt = $this->MetaType($c->type,$ml); + + if (isset($c->scale)) $sc = $c->scale; + else $sc = 99; // always force change if scale not known. + + if ($sc == -1) $sc = false; + list($fsize, $fprec) = $this->_getSizePrec($v['SIZE']); + + if ($ml == -1) $ml = ''; + if ($mt == 'X') $ml = $v['SIZE']; + if (($mt != $v['TYPE']) || ($ml != $fsize || $sc != $fprec) || (isset($v['AUTOINCREMENT']) && $v['AUTOINCREMENT'] != $obj->auto_increment)) { + $holdflds[$k] = $v; + } + } else { + $holdflds[$k] = $v; + } + } + $flds = $holdflds; + } + + + // already exists, alter table instead + list($lines,$pkey,$idxs) = $this->_GenFields($flds); + // genfields can return FALSE at times + if ($lines == null) $lines = array(); + $alter = 'ALTER TABLE ' . $this->TableName($tablename); + $sql = array(); + + foreach ( $lines as $id => $v ) { + if ( isset($cols[$id]) && is_object($cols[$id]) ) { + + $flds = Lens_ParseArgs($v,','); + + // We are trying to change the size of the field, if not allowed, simply ignore the request. + // $flds[1] holds the type, $flds[2] holds the size -postnuke addition + if ($flds && in_array(strtoupper(substr($flds[0][1],0,4)),$this->invalidResizeTypes4) + && (isset($flds[0][2]) && is_numeric($flds[0][2]))) { + if ($this->debug) ADOConnection::outp(sprintf("

%s cannot be changed to %s currently

", $flds[0][0], $flds[0][1])); + #echo "

$this->alterCol cannot be changed to $flds currently

"; + continue; + } + $sql[] = $alter . $this->alterCol . ' ' . $v; + } else { + $sql[] = $alter . $this->addCol . ' ' . $v; + } + } + + if ($dropOldFlds) { + foreach ( $cols as $id => $v ) + if ( !isset($lines[$id]) ) + $sql[] = $alter . $this->dropCol . ' ' . $v->name; + } + return $sql; + } +} // class +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/adodb-error.inc.php b/php/pgadmin/libraries/adodb/adodb-error.inc.php new file mode 100644 index 0000000..6ec614d --- /dev/null +++ b/php/pgadmin/libraries/adodb/adodb-error.inc.php @@ -0,0 +1,258 @@ + DB_ERROR_NOSUCHTABLE, + '/Relation [\"\'].*[\"\'] already exists|Cannot insert a duplicate key into (a )?unique index.*/i' => DB_ERROR_ALREADY_EXISTS, + '/divide by zero$/i' => DB_ERROR_DIVZERO, + '/pg_atoi: error in .*: can\'t parse /i' => DB_ERROR_INVALID_NUMBER, + '/ttribute [\"\'].*[\"\'] not found|Relation [\"\'].*[\"\'] does not have attribute [\"\'].*[\"\']/i' => DB_ERROR_NOSUCHFIELD, + '/parser: parse error at or near \"/i' => DB_ERROR_SYNTAX, + '/referential integrity violation/i' => DB_ERROR_CONSTRAINT, + '/Relation [\"\'].*[\"\'] already exists|Cannot insert a duplicate key into (a )?unique index.*|duplicate key.*violates unique constraint/i' + => DB_ERROR_ALREADY_EXISTS + ); + reset($error_regexps); + while (list($regexp,$code) = each($error_regexps)) { + if (preg_match($regexp, $errormsg)) { + return $code; + } + } + // Fall back to DB_ERROR if there was no mapping. + return DB_ERROR; +} + +function adodb_error_odbc() +{ +static $MAP = array( + '01004' => DB_ERROR_TRUNCATED, + '07001' => DB_ERROR_MISMATCH, + '21S01' => DB_ERROR_MISMATCH, + '21S02' => DB_ERROR_MISMATCH, + '22003' => DB_ERROR_INVALID_NUMBER, + '22008' => DB_ERROR_INVALID_DATE, + '22012' => DB_ERROR_DIVZERO, + '23000' => DB_ERROR_CONSTRAINT, + '24000' => DB_ERROR_INVALID, + '34000' => DB_ERROR_INVALID, + '37000' => DB_ERROR_SYNTAX, + '42000' => DB_ERROR_SYNTAX, + 'IM001' => DB_ERROR_UNSUPPORTED, + 'S0000' => DB_ERROR_NOSUCHTABLE, + 'S0001' => DB_ERROR_NOT_FOUND, + 'S0002' => DB_ERROR_NOSUCHTABLE, + 'S0011' => DB_ERROR_ALREADY_EXISTS, + 'S0012' => DB_ERROR_NOT_FOUND, + 'S0021' => DB_ERROR_ALREADY_EXISTS, + 'S0022' => DB_ERROR_NOT_FOUND, + 'S1000' => DB_ERROR_NOSUCHTABLE, + 'S1009' => DB_ERROR_INVALID, + 'S1090' => DB_ERROR_INVALID, + 'S1C00' => DB_ERROR_NOT_CAPABLE + ); + return $MAP; +} + +function adodb_error_ibase() +{ +static $MAP = array( + -104 => DB_ERROR_SYNTAX, + -150 => DB_ERROR_ACCESS_VIOLATION, + -151 => DB_ERROR_ACCESS_VIOLATION, + -155 => DB_ERROR_NOSUCHTABLE, + -157 => DB_ERROR_NOSUCHFIELD, + -158 => DB_ERROR_VALUE_COUNT_ON_ROW, + -170 => DB_ERROR_MISMATCH, + -171 => DB_ERROR_MISMATCH, + -172 => DB_ERROR_INVALID, + -204 => DB_ERROR_INVALID, + -205 => DB_ERROR_NOSUCHFIELD, + -206 => DB_ERROR_NOSUCHFIELD, + -208 => DB_ERROR_INVALID, + -219 => DB_ERROR_NOSUCHTABLE, + -297 => DB_ERROR_CONSTRAINT, + -530 => DB_ERROR_CONSTRAINT, + -803 => DB_ERROR_CONSTRAINT, + -551 => DB_ERROR_ACCESS_VIOLATION, + -552 => DB_ERROR_ACCESS_VIOLATION, + -922 => DB_ERROR_NOSUCHDB, + -923 => DB_ERROR_CONNECT_FAILED, + -924 => DB_ERROR_CONNECT_FAILED + ); + + return $MAP; +} + +function adodb_error_ifx() +{ +static $MAP = array( + '-201' => DB_ERROR_SYNTAX, + '-206' => DB_ERROR_NOSUCHTABLE, + '-217' => DB_ERROR_NOSUCHFIELD, + '-329' => DB_ERROR_NODBSELECTED, + '-1204' => DB_ERROR_INVALID_DATE, + '-1205' => DB_ERROR_INVALID_DATE, + '-1206' => DB_ERROR_INVALID_DATE, + '-1209' => DB_ERROR_INVALID_DATE, + '-1210' => DB_ERROR_INVALID_DATE, + '-1212' => DB_ERROR_INVALID_DATE + ); + + return $MAP; +} + +function adodb_error_oci8() +{ +static $MAP = array( + 1 => DB_ERROR_ALREADY_EXISTS, + 900 => DB_ERROR_SYNTAX, + 904 => DB_ERROR_NOSUCHFIELD, + 923 => DB_ERROR_SYNTAX, + 942 => DB_ERROR_NOSUCHTABLE, + 955 => DB_ERROR_ALREADY_EXISTS, + 1476 => DB_ERROR_DIVZERO, + 1722 => DB_ERROR_INVALID_NUMBER, + 2289 => DB_ERROR_NOSUCHTABLE, + 2291 => DB_ERROR_CONSTRAINT, + 2449 => DB_ERROR_CONSTRAINT + ); + + return $MAP; +} + +function adodb_error_mssql() +{ +static $MAP = array( + 208 => DB_ERROR_NOSUCHTABLE, + 2601 => DB_ERROR_ALREADY_EXISTS + ); + + return $MAP; +} + +function adodb_error_sqlite() +{ +static $MAP = array( + 1 => DB_ERROR_SYNTAX + ); + + return $MAP; +} + +function adodb_error_mysql() +{ +static $MAP = array( + 1004 => DB_ERROR_CANNOT_CREATE, + 1005 => DB_ERROR_CANNOT_CREATE, + 1006 => DB_ERROR_CANNOT_CREATE, + 1007 => DB_ERROR_ALREADY_EXISTS, + 1008 => DB_ERROR_CANNOT_DROP, + 1045 => DB_ERROR_ACCESS_VIOLATION, + 1046 => DB_ERROR_NODBSELECTED, + 1049 => DB_ERROR_NOSUCHDB, + 1050 => DB_ERROR_ALREADY_EXISTS, + 1051 => DB_ERROR_NOSUCHTABLE, + 1054 => DB_ERROR_NOSUCHFIELD, + 1062 => DB_ERROR_ALREADY_EXISTS, + 1064 => DB_ERROR_SYNTAX, + 1100 => DB_ERROR_NOT_LOCKED, + 1136 => DB_ERROR_VALUE_COUNT_ON_ROW, + 1146 => DB_ERROR_NOSUCHTABLE, + 1048 => DB_ERROR_CONSTRAINT, + 2002 => DB_ERROR_CONNECT_FAILED, + 2005 => DB_ERROR_CONNECT_FAILED + ); + + return $MAP; +} +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/adodb-iterator.inc.php b/php/pgadmin/libraries/adodb/adodb-iterator.inc.php new file mode 100644 index 0000000..e8b5e57 --- /dev/null +++ b/php/pgadmin/libraries/adodb/adodb-iterator.inc.php @@ -0,0 +1,30 @@ +Execute("select * from adoxyz"); + foreach($rs as $k => $v) { + echo $k; print_r($v); echo "
"; + } + + + Iterator code based on http://cvs.php.net/cvs.php/php-src/ext/spl/examples/cachingiterator.inc?login=2 + + + Moved to adodb.inc.php to improve performance. + */ + + + + + +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/adodb-lib.inc.php b/php/pgadmin/libraries/adodb/adodb-lib.inc.php new file mode 100644 index 0000000..6b2e891 --- /dev/null +++ b/php/pgadmin/libraries/adodb/adodb-lib.inc.php @@ -0,0 +1,1197 @@ + sizeof($array)) $max = sizeof($array); + else $max = $probe; + + + for ($j=0;$j < $max; $j++) { + $row = $array[$j]; + if (!$row) break; + $i = -1; + foreach($row as $v) { + $i += 1; + + if (isset($types[$i]) && $types[$i]=='C') continue; + + //print " ($i ".$types[$i]. "$v) "; + $v = trim($v); + + if (!preg_match('/^[+-]{0,1}[0-9\.]+$/',$v)) { + $types[$i] = 'C'; // once C, always C + + continue; + } + if ($j == 0) { + // If empty string, we presume is character + // test for integer for 1st row only + // after that it is up to testing other rows to prove + // that it is not an integer + if (strlen($v) == 0) $types[$i] = 'C'; + if (strpos($v,'.') !== false) $types[$i] = 'N'; + else $types[$i] = 'I'; + continue; + } + + if (strpos($v,'.') !== false) $types[$i] = 'N'; + + } + } + +} + +function adodb_transpose(&$arr, &$newarr, &$hdr, &$fobjs) +{ + $oldX = sizeof(reset($arr)); + $oldY = sizeof($arr); + + if ($hdr) { + $startx = 1; + $hdr = array('Fields'); + for ($y = 0; $y < $oldY; $y++) { + $hdr[] = $arr[$y][0]; + } + } else + $startx = 0; + + for ($x = $startx; $x < $oldX; $x++) { + if ($fobjs) { + $o = $fobjs[$x]; + $newarr[] = array($o->name); + } else + $newarr[] = array(); + + for ($y = 0; $y < $oldY; $y++) { + $newarr[$x-$startx][] = $arr[$y][$x]; + } + } +} + +// Force key to upper. +// See also http://www.php.net/manual/en/function.array-change-key-case.php +function _array_change_key_case($an_array) +{ + if (is_array($an_array)) { + $new_array = array(); + foreach($an_array as $key=>$value) + $new_array[strtoupper($key)] = $value; + + return $new_array; + } + + return $an_array; +} + +function _adodb_replace(&$zthis, $table, $fieldArray, $keyCol, $autoQuote, $has_autoinc) +{ + if (count($fieldArray) == 0) return 0; + $first = true; + $uSet = ''; + + if (!is_array($keyCol)) { + $keyCol = array($keyCol); + } + foreach($fieldArray as $k => $v) { + if ($v === null) { + $v = 'NULL'; + $fieldArray[$k] = $v; + } else if ($autoQuote && /*!is_numeric($v) /*and strncmp($v,"'",1) !== 0 -- sql injection risk*/ strcasecmp($v,$zthis->null2null)!=0) { + $v = $zthis->qstr($v); + $fieldArray[$k] = $v; + } + if (in_array($k,$keyCol)) continue; // skip UPDATE if is key + + if ($first) { + $first = false; + $uSet = "$k=$v"; + } else + $uSet .= ",$k=$v"; + } + + $where = false; + foreach ($keyCol as $v) { + if (isset($fieldArray[$v])) { + if ($where) $where .= ' and '.$v.'='.$fieldArray[$v]; + else $where = $v.'='.$fieldArray[$v]; + } + } + + if ($uSet && $where) { + $update = "UPDATE $table SET $uSet WHERE $where"; + + $rs = $zthis->Execute($update); + + + if ($rs) { + if ($zthis->poorAffectedRows) { + /* + The Select count(*) wipes out any errors that the update would have returned. + http://phplens.com/lens/lensforum/msgs.php?id=5696 + */ + if ($zthis->ErrorNo()<>0) return 0; + + # affected_rows == 0 if update field values identical to old values + # for mysql - which is silly. + + $cnt = $zthis->GetOne("select count(*) from $table where $where"); + if ($cnt > 0) return 1; // record already exists + } else { + if (($zthis->Affected_Rows()>0)) return 1; + } + } else + return 0; + } + + // print "

Error=".$this->ErrorNo().'

'; + $first = true; + foreach($fieldArray as $k => $v) { + if ($has_autoinc && in_array($k,$keyCol)) continue; // skip autoinc col + + if ($first) { + $first = false; + $iCols = "$k"; + $iVals = "$v"; + } else { + $iCols .= ",$k"; + $iVals .= ",$v"; + } + } + $insert = "INSERT INTO $table ($iCols) VALUES ($iVals)"; + $rs = $zthis->Execute($insert); + return ($rs) ? 2 : 0; +} + +// Requires $ADODB_FETCH_MODE = ADODB_FETCH_NUM +function _adodb_getmenu(&$zthis, $name,$defstr='',$blank1stItem=true,$multiple=false, + $size=0, $selectAttr='',$compareFields0=true) +{ + $hasvalue = false; + + if ($multiple or is_array($defstr)) { + if ($size==0) $size=5; + $attr = ' multiple size="'.$size.'"'; + if (!strpos($name,'[]')) $name .= '[]'; + } else if ($size) $attr = ' size="'.$size.'"'; + else $attr =''; + + $s = '\n"; +} + +// Requires $ADODB_FETCH_MODE = ADODB_FETCH_NUM +function _adodb_getmenu_gp(&$zthis, $name,$defstr='',$blank1stItem=true,$multiple=false, + $size=0, $selectAttr='',$compareFields0=true) +{ + $hasvalue = false; + + if ($multiple or is_array($defstr)) { + if ($size==0) $size=5; + $attr = ' multiple size="'.$size.'"'; + if (!strpos($name,'[]')) $name .= '[]'; + } else if ($size) $attr = ' size="'.$size.'"'; + else $attr =''; + + $s = '\n"; +} + + +/* + Count the number of records this sql statement will return by using + query rewriting heuristics... + + Does not work with UNIONs, except with postgresql and oracle. + + Usage: + + $conn->Connect(...); + $cnt = _adodb_getcount($conn, $sql); + +*/ +function _adodb_getcount(&$zthis, $sql,$inputarr=false,$secs2cache=0) +{ + $qryRecs = 0; + + if (!empty($zthis->_nestedSQL) || preg_match("/^\s*SELECT\s+DISTINCT/is", $sql) || + preg_match('/\s+GROUP\s+BY\s+/is',$sql) || + preg_match('/\s+UNION\s+/is',$sql)) { + + $rewritesql = adodb_strip_order_by($sql); + + // ok, has SELECT DISTINCT or GROUP BY so see if we can use a table alias + // but this is only supported by oracle and postgresql... + if ($zthis->dataProvider == 'oci8') { + // Allow Oracle hints to be used for query optimization, Chris Wrye + if (preg_match('#/\\*+.*?\\*\\/#', $sql, $hint)) { + $rewritesql = "SELECT ".$hint[0]." COUNT(*) FROM (".$rewritesql.")"; + } else + $rewritesql = "SELECT COUNT(*) FROM (".$rewritesql.")"; + + } else if (strncmp($zthis->databaseType,'postgres',8) == 0 || strncmp($zthis->databaseType,'mysql',5) == 0) { + $rewritesql = "SELECT COUNT(*) FROM ($rewritesql) _ADODB_ALIAS_"; + } else { + $rewritesql = "SELECT COUNT(*) FROM ($rewritesql)"; + } + } else { + // now replace SELECT ... FROM with SELECT COUNT(*) FROM + $rewritesql = preg_replace( + '/^\s*SELECT\s.*\s+FROM\s/Uis','SELECT COUNT(*) FROM ',$sql); + // fix by alexander zhukov, alex#unipack.ru, because count(*) and 'order by' fails + // with mssql, access and postgresql. Also a good speedup optimization - skips sorting! + // also see http://phplens.com/lens/lensforum/msgs.php?id=12752 + $rewritesql = adodb_strip_order_by($rewritesql); + } + + if (isset($rewritesql) && $rewritesql != $sql) { + if (preg_match('/\sLIMIT\s+[0-9]+/i',$sql,$limitarr)) $rewritesql .= $limitarr[0]; + + if ($secs2cache) { + // we only use half the time of secs2cache because the count can quickly + // become inaccurate if new records are added + $qryRecs = $zthis->CacheGetOne($secs2cache/2,$rewritesql,$inputarr); + + } else { + $qryRecs = $zthis->GetOne($rewritesql,$inputarr); + } + if ($qryRecs !== false) return $qryRecs; + } + //-------------------------------------------- + // query rewrite failed - so try slower way... + + + // strip off unneeded ORDER BY if no UNION + if (preg_match('/\s*UNION\s*/is', $sql)) $rewritesql = $sql; + else $rewritesql = $rewritesql = adodb_strip_order_by($sql); + + if (preg_match('/\sLIMIT\s+[0-9]+/i',$sql,$limitarr)) $rewritesql .= $limitarr[0]; + + if ($secs2cache) { + $rstest = $zthis->CacheExecute($secs2cache,$rewritesql,$inputarr); + if (!$rstest) $rstest = $zthis->CacheExecute($secs2cache,$sql,$inputarr); + } else { + $rstest = $zthis->Execute($rewritesql,$inputarr); + if (!$rstest) $rstest = $zthis->Execute($sql,$inputarr); + } + if ($rstest) { + $qryRecs = $rstest->RecordCount(); + if ($qryRecs == -1) { + global $ADODB_EXTENSION; + // some databases will return -1 on MoveLast() - change to MoveNext() + if ($ADODB_EXTENSION) { + while(!$rstest->EOF) { + adodb_movenext($rstest); + } + } else { + while(!$rstest->EOF) { + $rstest->MoveNext(); + } + } + $qryRecs = $rstest->_currentRow; + } + $rstest->Close(); + if ($qryRecs == -1) return 0; + } + return $qryRecs; +} + +/* + Code originally from "Cornel G" + + This code might not work with SQL that has UNION in it + + Also if you are using CachePageExecute(), there is a strong possibility that + data will get out of synch. use CachePageExecute() only with tables that + rarely change. +*/ +function _adodb_pageexecute_all_rows(&$zthis, $sql, $nrows, $page, + $inputarr=false, $secs2cache=0) +{ + $atfirstpage = false; + $atlastpage = false; + $lastpageno=1; + + // If an invalid nrows is supplied, + // we assume a default value of 10 rows per page + if (!isset($nrows) || $nrows <= 0) $nrows = 10; + + $qryRecs = false; //count records for no offset + + $qryRecs = _adodb_getcount($zthis,$sql,$inputarr,$secs2cache); + $lastpageno = (int) ceil($qryRecs / $nrows); + $zthis->_maxRecordCount = $qryRecs; + + + + // ***** Here we check whether $page is the last page or + // whether we are trying to retrieve + // a page number greater than the last page number. + if ($page >= $lastpageno) { + $page = $lastpageno; + $atlastpage = true; + } + + // If page number <= 1, then we are at the first page + if (empty($page) || $page <= 1) { + $page = 1; + $atfirstpage = true; + } + + // We get the data we want + $offset = $nrows * ($page-1); + if ($secs2cache > 0) + $rsreturn = $zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $offset, $inputarr); + else + $rsreturn = $zthis->SelectLimit($sql, $nrows, $offset, $inputarr, $secs2cache); + + + // Before returning the RecordSet, we set the pagination properties we need + if ($rsreturn) { + $rsreturn->_maxRecordCount = $qryRecs; + $rsreturn->rowsPerPage = $nrows; + $rsreturn->AbsolutePage($page); + $rsreturn->AtFirstPage($atfirstpage); + $rsreturn->AtLastPage($atlastpage); + $rsreturn->LastPageNo($lastpageno); + } + return $rsreturn; +} + +// Ivn Oliva version +function _adodb_pageexecute_no_last_page(&$zthis, $sql, $nrows, $page, $inputarr=false, $secs2cache=0) +{ + + $atfirstpage = false; + $atlastpage = false; + + if (!isset($page) || $page <= 1) { // If page number <= 1, then we are at the first page + $page = 1; + $atfirstpage = true; + } + if ($nrows <= 0) $nrows = 10; // If an invalid nrows is supplied, we assume a default value of 10 rows per page + + // ***** Here we check whether $page is the last page or whether we are trying to retrieve a page number greater than + // the last page number. + $pagecounter = $page + 1; + $pagecounteroffset = ($pagecounter * $nrows) - $nrows; + if ($secs2cache>0) $rstest = $zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $pagecounteroffset, $inputarr); + else $rstest = $zthis->SelectLimit($sql, $nrows, $pagecounteroffset, $inputarr, $secs2cache); + if ($rstest) { + while ($rstest && $rstest->EOF && $pagecounter>0) { + $atlastpage = true; + $pagecounter--; + $pagecounteroffset = $nrows * ($pagecounter - 1); + $rstest->Close(); + if ($secs2cache>0) $rstest = $zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $pagecounteroffset, $inputarr); + else $rstest = $zthis->SelectLimit($sql, $nrows, $pagecounteroffset, $inputarr, $secs2cache); + } + if ($rstest) $rstest->Close(); + } + if ($atlastpage) { // If we are at the last page or beyond it, we are going to retrieve it + $page = $pagecounter; + if ($page == 1) $atfirstpage = true; // We have to do this again in case the last page is the same as the first + //... page, that is, the recordset has only 1 page. + } + + // We get the data we want + $offset = $nrows * ($page-1); + if ($secs2cache > 0) $rsreturn = $zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $offset, $inputarr); + else $rsreturn = $zthis->SelectLimit($sql, $nrows, $offset, $inputarr, $secs2cache); + + // Before returning the RecordSet, we set the pagination properties we need + if ($rsreturn) { + $rsreturn->rowsPerPage = $nrows; + $rsreturn->AbsolutePage($page); + $rsreturn->AtFirstPage($atfirstpage); + $rsreturn->AtLastPage($atlastpage); + } + return $rsreturn; +} + +function _adodb_getupdatesql(&$zthis,&$rs, $arrFields,$forceUpdate=false,$magicq=false,$force=2) +{ + global $ADODB_QUOTE_FIELDNAMES; + + if (!$rs) { + printf(ADODB_BAD_RS,'GetUpdateSQL'); + return false; + } + + $fieldUpdatedCount = 0; + $arrFields = _array_change_key_case($arrFields); + + $hasnumeric = isset($rs->fields[0]); + $setFields = ''; + + // Loop through all of the fields in the recordset + for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++) { + // Get the field from the recordset + $field = $rs->FetchField($i); + + // If the recordset field is one + // of the fields passed in then process. + $upperfname = strtoupper($field->name); + if (adodb_key_exists($upperfname,$arrFields,$force)) { + + // If the existing field value in the recordset + // is different from the value passed in then + // go ahead and append the field name and new value to + // the update query. + + if ($hasnumeric) $val = $rs->fields[$i]; + else if (isset($rs->fields[$upperfname])) $val = $rs->fields[$upperfname]; + else if (isset($rs->fields[$field->name])) $val = $rs->fields[$field->name]; + else if (isset($rs->fields[strtolower($upperfname)])) $val = $rs->fields[strtolower($upperfname)]; + else $val = ''; + + + if ($forceUpdate || strcmp($val, $arrFields[$upperfname])) { + // Set the counter for the number of fields that will be updated. + $fieldUpdatedCount++; + + // Based on the datatype of the field + // Format the value properly for the database + $type = $rs->MetaType($field->type); + + + if ($type == 'null') { + $type = 'C'; + } + + if ((strpos($upperfname,' ') !== false) || ($ADODB_QUOTE_FIELDNAMES)) + $fnameq = $zthis->nameQuote.$upperfname.$zthis->nameQuote; + else + $fnameq = $upperfname; + + + // is_null requires php 4.0.4 + //********************************************************// + if (is_null($arrFields[$upperfname]) + || (empty($arrFields[$upperfname]) && strlen($arrFields[$upperfname]) == 0) + || $arrFields[$upperfname] === $zthis->null2null + ) + { + switch ($force) { + + //case 0: + // //Ignore empty values. This is allready handled in "adodb_key_exists" function. + //break; + + case 1: + //Set null + $setFields .= $field->name . " = null, "; + break; + + case 2: + //Set empty + $arrFields[$upperfname] = ""; + $setFields .= _adodb_column_sql($zthis, 'U', $type, $upperfname, $fnameq,$arrFields, $magicq); + break; + default: + case 3: + //Set the value that was given in array, so you can give both null and empty values + if (is_null($arrFields[$upperfname]) || $arrFields[$upperfname] === $zthis->null2null) { + $setFields .= $field->name . " = null, "; + } else { + $setFields .= _adodb_column_sql($zthis, 'U', $type, $upperfname, $fnameq,$arrFields, $magicq); + } + break; + } + //********************************************************// + } else { + //we do this so each driver can customize the sql for + //DB specific column types. + //Oracle needs BLOB types to be handled with a returning clause + //postgres has special needs as well + $setFields .= _adodb_column_sql($zthis, 'U', $type, $upperfname, $fnameq, + $arrFields, $magicq); + } + } + } + } + + // If there were any modified fields then build the rest of the update query. + if ($fieldUpdatedCount > 0 || $forceUpdate) { + // Get the table name from the existing query. + if (!empty($rs->tableName)) $tableName = $rs->tableName; + else { + preg_match("/FROM\s+".ADODB_TABLE_REGEX."/is", $rs->sql, $tableName); + $tableName = $tableName[1]; + } + // Get the full where clause excluding the word "WHERE" from + // the existing query. + preg_match('/\sWHERE\s(.*)/is', $rs->sql, $whereClause); + + $discard = false; + // not a good hack, improvements? + if ($whereClause) { + #var_dump($whereClause); + if (preg_match('/\s(ORDER\s.*)/is', $whereClause[1], $discard)); + else if (preg_match('/\s(LIMIT\s.*)/is', $whereClause[1], $discard)); + else if (preg_match('/\s(FOR UPDATE.*)/is', $whereClause[1], $discard)); + else preg_match('/\s.*(\) WHERE .*)/is', $whereClause[1], $discard); # see http://sourceforge.net/tracker/index.php?func=detail&aid=1379638&group_id=42718&atid=433976 + } else + $whereClause = array(false,false); + + if ($discard) + $whereClause[1] = substr($whereClause[1], 0, strlen($whereClause[1]) - strlen($discard[1])); + + $sql = 'UPDATE '.$tableName.' SET '.substr($setFields, 0, -2); + if (strlen($whereClause[1]) > 0) + $sql .= ' WHERE '.$whereClause[1]; + + return $sql; + + } else { + return false; + } +} + +function adodb_key_exists($key, &$arr,$force=2) +{ + if ($force<=0) { + // the following is the old behaviour where null or empty fields are ignored + return (!empty($arr[$key])) || (isset($arr[$key]) && strlen($arr[$key])>0); + } + + if (isset($arr[$key])) return true; + ## null check below + if (ADODB_PHPVER >= 0x4010) return array_key_exists($key,$arr); + return false; +} + +/** + * There is a special case of this function for the oci8 driver. + * The proper way to handle an insert w/ a blob in oracle requires + * a returning clause with bind variables and a descriptor blob. + * + * + */ +function _adodb_getinsertsql(&$zthis,&$rs,$arrFields,$magicq=false,$force=2) +{ +static $cacheRS = false; +static $cacheSig = 0; +static $cacheCols; + global $ADODB_QUOTE_FIELDNAMES; + + $tableName = ''; + $values = ''; + $fields = ''; + $recordSet = null; + $arrFields = _array_change_key_case($arrFields); + $fieldInsertedCount = 0; + + if (is_string($rs)) { + //ok we have a table name + //try and get the column info ourself. + $tableName = $rs; + + //we need an object for the recordSet + //because we have to call MetaType. + //php can't do a $rsclass::MetaType() + $rsclass = $zthis->rsPrefix.$zthis->databaseType; + $recordSet = new $rsclass(-1,$zthis->fetchMode); + $recordSet->connection = $zthis; + + if (is_string($cacheRS) && $cacheRS == $rs) { + $columns = $cacheCols; + } else { + $columns = $zthis->MetaColumns( $tableName ); + $cacheRS = $tableName; + $cacheCols = $columns; + } + } else if (is_subclass_of($rs, 'adorecordset')) { + if (isset($rs->insertSig) && is_integer($cacheRS) && $cacheRS == $rs->insertSig) { + $columns = $cacheCols; + } else { + for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++) + $columns[] = $rs->FetchField($i); + $cacheRS = $cacheSig; + $cacheCols = $columns; + $rs->insertSig = $cacheSig++; + } + $recordSet = $rs; + + } else { + printf(ADODB_BAD_RS,'GetInsertSQL'); + return false; + } + + // Loop through all of the fields in the recordset + foreach( $columns as $field ) { + $upperfname = strtoupper($field->name); + if (adodb_key_exists($upperfname,$arrFields,$force)) { + $bad = false; + if ((strpos($upperfname,' ') !== false) || ($ADODB_QUOTE_FIELDNAMES)) + $fnameq = $zthis->nameQuote.$upperfname.$zthis->nameQuote; + else + $fnameq = $upperfname; + + $type = $recordSet->MetaType($field->type); + + /********************************************************/ + if (is_null($arrFields[$upperfname]) + || (empty($arrFields[$upperfname]) && strlen($arrFields[$upperfname]) == 0) + || $arrFields[$upperfname] === $zthis->null2null + ) + { + switch ($force) { + + case 0: // we must always set null if missing + $bad = true; + break; + + case 1: + $values .= "null, "; + break; + + case 2: + //Set empty + $arrFields[$upperfname] = ""; + $values .= _adodb_column_sql($zthis, 'I', $type, $upperfname, $fnameq,$arrFields, $magicq); + break; + + default: + case 3: + //Set the value that was given in array, so you can give both null and empty values + if (is_null($arrFields[$upperfname]) || $arrFields[$upperfname] === $zthis->null2null) { + $values .= "null, "; + } else { + $values .= _adodb_column_sql($zthis, 'I', $type, $upperfname, $fnameq, $arrFields, $magicq); + } + break; + } // switch + + /*********************************************************/ + } else { + //we do this so each driver can customize the sql for + //DB specific column types. + //Oracle needs BLOB types to be handled with a returning clause + //postgres has special needs as well + $values .= _adodb_column_sql($zthis, 'I', $type, $upperfname, $fnameq, + $arrFields, $magicq); + } + + if ($bad) continue; + // Set the counter for the number of fields that will be inserted. + $fieldInsertedCount++; + + + // Get the name of the fields to insert + $fields .= $fnameq . ", "; + } + } + + + // If there were any inserted fields then build the rest of the insert query. + if ($fieldInsertedCount <= 0) return false; + + // Get the table name from the existing query. + if (!$tableName) { + if (!empty($rs->tableName)) $tableName = $rs->tableName; + else if (preg_match("/FROM\s+".ADODB_TABLE_REGEX."/is", $rs->sql, $tableName)) + $tableName = $tableName[1]; + else + return false; + } + + // Strip off the comma and space on the end of both the fields + // and their values. + $fields = substr($fields, 0, -2); + $values = substr($values, 0, -2); + + // Append the fields and their values to the insert query. + return 'INSERT INTO '.$tableName.' ( '.$fields.' ) VALUES ( '.$values.' )'; +} + + +/** + * This private method is used to help construct + * the update/sql which is generated by GetInsertSQL and GetUpdateSQL. + * It handles the string construction of 1 column -> sql string based on + * the column type. We want to do 'safe' handling of BLOBs + * + * @param string the type of sql we are trying to create + * 'I' or 'U'. + * @param string column data type from the db::MetaType() method + * @param string the column name + * @param array the column value + * + * @return string + * + */ +function _adodb_column_sql_oci8(&$zthis,$action, $type, $fname, $fnameq, $arrFields, $magicq) +{ + $sql = ''; + + // Based on the datatype of the field + // Format the value properly for the database + switch($type) { + case 'B': + //in order to handle Blobs correctly, we need + //to do some magic for Oracle + + //we need to create a new descriptor to handle + //this properly + if (!empty($zthis->hasReturningInto)) { + if ($action == 'I') { + $sql = 'empty_blob(), '; + } else { + $sql = $fnameq. '=empty_blob(), '; + } + //add the variable to the returning clause array + //so the user can build this later in + //case they want to add more to it + $zthis->_returningArray[$fname] = ':xx'.$fname.'xx'; + } else if (empty($arrFields[$fname])){ + if ($action == 'I') { + $sql = 'empty_blob(), '; + } else { + $sql = $fnameq. '=empty_blob(), '; + } + } else { + //this is to maintain compatibility + //with older adodb versions. + $sql = _adodb_column_sql($zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq,false); + } + break; + + case "X": + //we need to do some more magic here for long variables + //to handle these correctly in oracle. + + //create a safe bind var name + //to avoid conflicts w/ dupes. + if (!empty($zthis->hasReturningInto)) { + if ($action == 'I') { + $sql = ':xx'.$fname.'xx, '; + } else { + $sql = $fnameq.'=:xx'.$fname.'xx, '; + } + //add the variable to the returning clause array + //so the user can build this later in + //case they want to add more to it + $zthis->_returningArray[$fname] = ':xx'.$fname.'xx'; + } else { + //this is to maintain compatibility + //with older adodb versions. + $sql = _adodb_column_sql($zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq,false); + } + break; + + default: + $sql = _adodb_column_sql($zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq,false); + break; + } + + return $sql; +} + +function _adodb_column_sql(&$zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq, $recurse=true) +{ + + if ($recurse) { + switch($zthis->dataProvider) { + case 'postgres': + if ($type == 'L') $type = 'C'; + break; + case 'oci8': + return _adodb_column_sql_oci8($zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq); + + } + } + + switch($type) { + case "C": + case "X": + case 'B': + $val = $zthis->qstr($arrFields[$fname],$magicq); + break; + + case "D": + $val = $zthis->DBDate($arrFields[$fname]); + break; + + case "T": + $val = $zthis->DBTimeStamp($arrFields[$fname]); + break; + + case "N": + $val = $arrFields[$fname]; + if (!is_numeric($val)) $val = str_replace(',', '.', (float)$val); + break; + + case "I": + case "R": + $val = $arrFields[$fname]; + if (!is_numeric($val)) $val = (integer) $val; + break; + + default: + $val = str_replace(array("'"," ","("),"",$arrFields[$fname]); // basic sql injection defence + if (empty($val)) $val = '0'; + break; + } + + if ($action == 'I') return $val . ", "; + + + return $fnameq . "=" . $val . ", "; + +} + + + +function _adodb_debug_execute(&$zthis, $sql, $inputarr) +{ + $ss = ''; + if ($inputarr) { + foreach($inputarr as $kk=>$vv) { + if (is_string($vv) && strlen($vv)>64) $vv = substr($vv,0,64).'...'; + if (is_null($vv)) $ss .= "($kk=>null) "; + else $ss .= "($kk=>'$vv') "; + } + $ss = "[ $ss ]"; + } + $sqlTxt = is_array($sql) ? $sql[0] : $sql; + /*str_replace(', ','##1#__^LF',is_array($sql) ? $sql[0] : $sql); + $sqlTxt = str_replace(',',', ',$sqlTxt); + $sqlTxt = str_replace('##1#__^LF', ', ' ,$sqlTxt); + */ + // check if running from browser or command-line + $inBrowser = isset($_SERVER['HTTP_USER_AGENT']); + + $dbt = $zthis->databaseType; + if (isset($zthis->dsnType)) $dbt .= '-'.$zthis->dsnType; + if ($inBrowser) { + if ($ss) { + $ss = ''.htmlspecialchars($ss).''; + } + if ($zthis->debug === -1) + ADOConnection::outp( "
\n($dbt): ".htmlspecialchars($sqlTxt)."   $ss\n
\n",false); + else if ($zthis->debug !== -99) + ADOConnection::outp( "


\n($dbt): ".htmlspecialchars($sqlTxt)."   $ss\n
\n",false); + } else { + $ss = "\n ".$ss; + if ($zthis->debug !== -99) + ADOConnection::outp("-----
\n($dbt): ".$sqlTxt." $ss\n-----
\n",false); + } + + $qID = $zthis->_query($sql,$inputarr); + + /* + Alexios Fakios notes that ErrorMsg() must be called before ErrorNo() for mssql + because ErrorNo() calls Execute('SELECT @ERROR'), causing recursion + */ + if ($zthis->databaseType == 'mssql') { + // ErrorNo is a slow function call in mssql, and not reliable in PHP 4.0.6 + + if($emsg = $zthis->ErrorMsg()) { + if ($err = $zthis->ErrorNo()) { + if ($zthis->debug === -99) + ADOConnection::outp( "
\n($dbt): ".htmlspecialchars($sqlTxt)."   $ss\n
\n",false); + + ADOConnection::outp($err.': '.$emsg); + } + } + } else if (!$qID) { + + if ($zthis->debug === -99) + if ($inBrowser) ADOConnection::outp( "
\n($dbt): ".htmlspecialchars($sqlTxt)."   $ss\n
\n",false); + else ADOConnection::outp("-----
\n($dbt): ".$sqlTxt."$ss\n-----
\n",false); + + ADOConnection::outp($zthis->ErrorNo() .': '. $zthis->ErrorMsg()); + } + + if ($zthis->debug === 99) _adodb_backtrace(true,9999,2); + return $qID; +} + +# pretty print the debug_backtrace function +function _adodb_backtrace($printOrArr=true,$levels=9999,$skippy=0,$ishtml=null) +{ + if (!function_exists('debug_backtrace')) return ''; + + if ($ishtml === null) $html = (isset($_SERVER['HTTP_USER_AGENT'])); + else $html = $ishtml; + + $fmt = ($html) ? " %% line %4d, file: %s" : "%% line %4d, file: %s"; + + $MAXSTRLEN = 128; + + $s = ($html) ? '
' : '';
+	
+	if (is_array($printOrArr)) $traceArr = $printOrArr;
+	else $traceArr = debug_backtrace();
+	array_shift($traceArr);
+	array_shift($traceArr);
+	$tabs = sizeof($traceArr)-2;
+	
+	foreach ($traceArr as $arr) {
+		if ($skippy) {$skippy -= 1; continue;}
+		$levels -= 1;
+		if ($levels < 0) break;
+		
+		$args = array();
+		for ($i=0; $i < $tabs; $i++) $s .=  ($html) ? '   ' : "\t";
+		$tabs -= 1;
+		if ($html) $s .= '';
+		if (isset($arr['class'])) $s .= $arr['class'].'.';
+		if (isset($arr['args']))
+		 foreach($arr['args'] as $v) {
+			if (is_null($v)) $args[] = 'null';
+			else if (is_array($v)) $args[] = 'Array['.sizeof($v).']';
+			else if (is_object($v)) $args[] = 'Object:'.get_class($v);
+			else if (is_bool($v)) $args[] = $v ? 'true' : 'false';
+			else {
+				$v = (string) @$v;
+				$str = htmlspecialchars(str_replace(array("\r","\n"),' ',substr($v,0,$MAXSTRLEN)));
+				if (strlen($v) > $MAXSTRLEN) $str .= '...';
+				$args[] = $str;
+			}
+		}
+		$s .= $arr['function'].'('.implode(', ',$args).')';
+		
+		
+		$s .= @sprintf($fmt, $arr['line'],$arr['file'],basename($arr['file']));
+			
+		$s .= "\n";
+	}	
+	if ($html) $s .= '
'; + if ($printOrArr) print $s; + + return $s; +} +/* +function _adodb_find_from($sql) +{ + + $sql = str_replace(array("\n","\r"), ' ', $sql); + $charCount = strlen($sql); + + $inString = false; + $quote = ''; + $parentheseCount = 0; + $prevChars = ''; + $nextChars = ''; + + + for($i = 0; $i < $charCount; $i++) { + + $char = substr($sql,$i,1); + $prevChars = substr($sql,0,$i); + $nextChars = substr($sql,$i+1); + + if((($char == "'" || $char == '"' || $char == '`') && substr($prevChars,-1,1) != '\\') && $inString === false) { + $quote = $char; + $inString = true; + } + + elseif((($char == "'" || $char == '"' || $char == '`') && substr($prevChars,-1,1) != '\\') && $inString === true && $quote == $char) { + $quote = ""; + $inString = false; + } + + elseif($char == "(" && $inString === false) + $parentheseCount++; + + elseif($char == ")" && $inString === false && $parentheseCount > 0) + $parentheseCount--; + + elseif($parentheseCount <= 0 && $inString === false && $char == " " && strtoupper(substr($prevChars,-5,5)) == " FROM") + return $i; + + } +} +*/ + +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/adodb-time.inc.php b/php/pgadmin/libraries/adodb/adodb-time.inc.php new file mode 100644 index 0000000..d62f678 --- /dev/null +++ b/php/pgadmin/libraries/adodb/adodb-time.inc.php @@ -0,0 +1,1429 @@ + 4 digit year conversion. The maximum is billions of years in the +future, but this is a theoretical limit as the computation of that year +would take too long with the current implementation of adodb_mktime(). + +This library replaces native functions as follows: + +
	
+	getdate()  with  adodb_getdate()
+	date()     with  adodb_date() 
+	gmdate()   with  adodb_gmdate()
+	mktime()   with  adodb_mktime()
+	gmmktime() with  adodb_gmmktime()
+	strftime() with  adodb_strftime()
+	strftime() with  adodb_gmstrftime()
+
+ +The parameters are identical, except that adodb_date() accepts a subset +of date()'s field formats. Mktime() will convert from local time to GMT, +and date() will convert from GMT to local time, but daylight savings is +not handled currently. + +This library is independant of the rest of ADOdb, and can be used +as standalone code. + +PERFORMANCE + +For high speed, this library uses the native date functions where +possible, and only switches to PHP code when the dates fall outside +the 32-bit signed integer range. + +GREGORIAN CORRECTION + +Pope Gregory shortened October of A.D. 1582 by ten days. Thursday, +October 4, 1582 (Julian) was followed immediately by Friday, October 15, +1582 (Gregorian). + +Since 0.06, we handle this correctly, so: + +adodb_mktime(0,0,0,10,15,1582) - adodb_mktime(0,0,0,10,4,1582) + == 24 * 3600 (1 day) + +============================================================================= + +COPYRIGHT + +(c) 2003-2005 John Lim and released under BSD-style license except for code by +jackbbs, which includes adodb_mktime, adodb_get_gmt_diff, adodb_is_leap_year +and originally found at http://www.php.net/manual/en/function.mktime.php + +============================================================================= + +BUG REPORTS + +These should be posted to the ADOdb forums at + + http://phplens.com/lens/lensforum/topics.php?id=4 + +============================================================================= + +FUNCTION DESCRIPTIONS + + +** FUNCTION adodb_getdate($date=false) + +Returns an array containing date information, as getdate(), but supports +dates greater than 1901 to 2038. The local date/time format is derived from a +heuristic the first time adodb_getdate is called. + + +** FUNCTION adodb_date($fmt, $timestamp = false) + +Convert a timestamp to a formatted local date. If $timestamp is not defined, the +current timestamp is used. Unlike the function date(), it supports dates +outside the 1901 to 2038 range. + +The format fields that adodb_date supports: + +
+	a - "am" or "pm" 
+	A - "AM" or "PM" 
+	d - day of the month, 2 digits with leading zeros; i.e. "01" to "31" 
+	D - day of the week, textual, 3 letters; e.g. "Fri" 
+	F - month, textual, long; e.g. "January" 
+	g - hour, 12-hour format without leading zeros; i.e. "1" to "12" 
+	G - hour, 24-hour format without leading zeros; i.e. "0" to "23" 
+	h - hour, 12-hour format; i.e. "01" to "12" 
+	H - hour, 24-hour format; i.e. "00" to "23" 
+	i - minutes; i.e. "00" to "59" 
+	j - day of the month without leading zeros; i.e. "1" to "31" 
+	l (lowercase 'L') - day of the week, textual, long; e.g. "Friday"  
+	L - boolean for whether it is a leap year; i.e. "0" or "1" 
+	m - month; i.e. "01" to "12" 
+	M - month, textual, 3 letters; e.g. "Jan" 
+	n - month without leading zeros; i.e. "1" to "12" 
+	O - Difference to Greenwich time in hours; e.g. "+0200" 
+	Q - Quarter, as in 1, 2, 3, 4 
+	r - RFC 2822 formatted date; e.g. "Thu, 21 Dec 2000 16:01:07 +0200" 
+	s - seconds; i.e. "00" to "59" 
+	S - English ordinal suffix for the day of the month, 2 characters; 
+	   			i.e. "st", "nd", "rd" or "th" 
+	t - number of days in the given month; i.e. "28" to "31"
+	T - Timezone setting of this machine; e.g. "EST" or "MDT" 
+	U - seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)  
+	w - day of the week, numeric, i.e. "0" (Sunday) to "6" (Saturday) 
+	Y - year, 4 digits; e.g. "1999" 
+	y - year, 2 digits; e.g. "99" 
+	z - day of the year; i.e. "0" to "365" 
+	Z - timezone offset in seconds (i.e. "-43200" to "43200"). 
+	   			The offset for timezones west of UTC is always negative, 
+				and for those east of UTC is always positive. 
+
+ +Unsupported: +
+	B - Swatch Internet time 
+	I (capital i) - "1" if Daylight Savings Time, "0" otherwise.
+	W - ISO-8601 week number of year, weeks starting on Monday 
+
+
+ + +** FUNCTION adodb_date2($fmt, $isoDateString = false) +Same as adodb_date, but 2nd parameter accepts iso date, eg. + + adodb_date2('d-M-Y H:i','2003-12-25 13:01:34'); + + +** FUNCTION adodb_gmdate($fmt, $timestamp = false) + +Convert a timestamp to a formatted GMT date. If $timestamp is not defined, the +current timestamp is used. Unlike the function date(), it supports dates +outside the 1901 to 2038 range. + + +** FUNCTION adodb_mktime($hr, $min, $sec[, $month, $day, $year]) + +Converts a local date to a unix timestamp. Unlike the function mktime(), it supports +dates outside the 1901 to 2038 range. All parameters are optional. + + +** FUNCTION adodb_gmmktime($hr, $min, $sec [, $month, $day, $year]) + +Converts a gmt date to a unix timestamp. Unlike the function gmmktime(), it supports +dates outside the 1901 to 2038 range. Differs from gmmktime() in that all parameters +are currently compulsory. + +** FUNCTION adodb_gmstrftime($fmt, $timestamp = false) +Convert a timestamp to a formatted GMT date. + +** FUNCTION adodb_strftime($fmt, $timestamp = false) + +Convert a timestamp to a formatted local date. Internally converts $fmt into +adodb_date format, then echo result. + +For best results, you can define the local date format yourself. Define a global +variable $ADODB_DATE_LOCALE which is an array, 1st element is date format using +adodb_date syntax, and 2nd element is the time format, also in adodb_date syntax. + + eg. $ADODB_DATE_LOCALE = array('d/m/Y','H:i:s'); + + Supported format codes: + +
+	%a - abbreviated weekday name according to the current locale 
+	%A - full weekday name according to the current locale 
+	%b - abbreviated month name according to the current locale 
+	%B - full month name according to the current locale 
+	%c - preferred date and time representation for the current locale 
+	%d - day of the month as a decimal number (range 01 to 31) 
+	%D - same as %m/%d/%y 
+	%e - day of the month as a decimal number, a single digit is preceded by a space (range ' 1' to '31') 
+	%h - same as %b
+	%H - hour as a decimal number using a 24-hour clock (range 00 to 23) 
+	%I - hour as a decimal number using a 12-hour clock (range 01 to 12) 
+	%m - month as a decimal number (range 01 to 12) 
+	%M - minute as a decimal number 
+	%n - newline character 
+	%p - either `am' or `pm' according to the given time value, or the corresponding strings for the current locale 
+	%r - time in a.m. and p.m. notation 
+	%R - time in 24 hour notation 
+	%S - second as a decimal number 
+	%t - tab character 
+	%T - current time, equal to %H:%M:%S 
+	%x - preferred date representation for the current locale without the time 
+	%X - preferred time representation for the current locale without the date 
+	%y - year as a decimal number without a century (range 00 to 99) 
+	%Y - year as a decimal number including the century 
+	%Z - time zone or name or abbreviation 
+	%% - a literal `%' character 
+
+ + Unsupported codes: +
+	%C - century number (the year divided by 100 and truncated to an integer, range 00 to 99) 
+	%g - like %G, but without the century. 
+	%G - The 4-digit year corresponding to the ISO week number (see %V). 
+	     This has the same format and value as %Y, except that if the ISO week number belongs 
+		 to the previous or next year, that year is used instead. 
+	%j - day of the year as a decimal number (range 001 to 366) 
+	%u - weekday as a decimal number [1,7], with 1 representing Monday 
+	%U - week number of the current year as a decimal number, starting 
+	    with the first Sunday as the first day of the first week 
+	%V - The ISO 8601:1988 week number of the current year as a decimal number, 
+	     range 01 to 53, where week 1 is the first week that has at least 4 days in the 
+		 current year, and with Monday as the first day of the week. (Use %G or %g for 
+		 the year component that corresponds to the week number for the specified timestamp.) 
+	%w - day of the week as a decimal, Sunday being 0 
+	%W - week number of the current year as a decimal number, starting with the 
+	     first Monday as the first day of the first week 
+
+ +============================================================================= + +NOTES + +Useful url for generating test timestamps: + http://www.4webhelp.net/us/timestamp.php + +Possible future optimizations include + +a. Using an algorithm similar to Plauger's in "The Standard C Library" +(page 428, xttotm.c _Ttotm() function). Plauger's algorithm will not +work outside 32-bit signed range, so i decided not to implement it. + +b. Implement daylight savings, which looks awfully complicated, see + http://webexhibits.org/daylightsaving/ + + +CHANGELOG + +- 11 Feb 2008 0.33 +* Bug in 0.32 fix for hour handling. Fixed. + +- 1 Feb 2008 0.32 +* Now adodb_mktime(0,0,0,12+$m,20,2040) works properly. + +- 10 Jan 2008 0.31 +* Now adodb_mktime(0,0,0,24,1,2037) works correctly. + +- 15 July 2007 0.30 +Added PHP 5.2.0 compatability fixes. + * gmtime behaviour for 1970 has changed. We use the actual date if it is between 1970 to 2038 to get the + * timezone, otherwise we use the current year as the baseline to retrieve the timezone. + * Also the timezone's in php 5.2.* support historical data better, eg. if timezone today was +8, but + in 1970 it was +7:30, then php 5.2 return +7:30, while this library will use +8. + * + +- 19 March 2006 0.24 +Changed strftime() locale detection, because some locales prepend the day of week to the date when %c is used. + +- 10 Feb 2006 0.23 +PHP5 compat: when we detect PHP5, the RFC2822 format for gmt 0000hrs is changed from -0000 to +0000. + In PHP4, we will still use -0000 for 100% compat with PHP4. + +- 08 Sept 2005 0.22 +In adodb_date2(), $is_gmt not supported properly. Fixed. + +- 18 July 2005 0.21 +In PHP 4.3.11, the 'r' format has changed. Leading 0 in day is added. Changed for compat. +Added support for negative months in adodb_mktime(). + +- 24 Feb 2005 0.20 +Added limited strftime/gmstrftime support. x10 improvement in performance of adodb_date(). + +- 21 Dec 2004 0.17 +In adodb_getdate(), the timestamp was accidentally converted to gmt when $is_gmt is false. +Also adodb_mktime(0,0,0) did not work properly. Both fixed thx Mauro. + +- 17 Nov 2004 0.16 +Removed intval typecast in adodb_mktime() for secs, allowing: + adodb_mktime(0,0,0 + 2236672153,1,1,1934); +Suggested by Ryan. + +- 18 July 2004 0.15 +All params in adodb_mktime were formerly compulsory. Now only the hour, min, secs is compulsory. +This brings it more in line with mktime (still not identical). + +- 23 June 2004 0.14 + +Allow you to define your own daylights savings function, adodb_daylight_sv. +If the function is defined (somewhere in an include), then you can correct for daylights savings. + +In this example, we apply daylights savings in June or July, adding one hour. This is extremely +unrealistic as it does not take into account time-zone, geographic location, current year. + +function adodb_daylight_sv(&$arr, $is_gmt) +{ + if ($is_gmt) return; + $m = $arr['mon']; + if ($m == 6 || $m == 7) $arr['hours'] += 1; +} + +This is only called by adodb_date() and not by adodb_mktime(). + +The format of $arr is +Array ( + [seconds] => 0 + [minutes] => 0 + [hours] => 0 + [mday] => 1 # day of month, eg 1st day of the month + [mon] => 2 # month (eg. Feb) + [year] => 2102 + [yday] => 31 # days in current year + [leap] => # true if leap year + [ndays] => 28 # no of days in current month + ) + + +- 28 Apr 2004 0.13 +Fixed adodb_date to properly support $is_gmt. Thx to Dimitar Angelov. + +- 20 Mar 2004 0.12 +Fixed month calculation error in adodb_date. 2102-June-01 appeared as 2102-May-32. + +- 26 Oct 2003 0.11 +Because of daylight savings problems (some systems apply daylight savings to +January!!!), changed adodb_get_gmt_diff() to ignore daylight savings. + +- 9 Aug 2003 0.10 +Fixed bug with dates after 2038. +See http://phplens.com/lens/lensforum/msgs.php?id=6980 + +- 1 July 2003 0.09 +Added support for Q (Quarter). +Added adodb_date2(), which accepts ISO date in 2nd param + +- 3 March 2003 0.08 +Added support for 'S' adodb_date() format char. Added constant ADODB_ALLOW_NEGATIVE_TS +if you want PHP to handle negative timestamps between 1901 to 1969. + +- 27 Feb 2003 0.07 +All negative numbers handled by adodb now because of RH 7.3+ problems. +See http://bugs.php.net/bug.php?id=20048&edit=2 + +- 4 Feb 2003 0.06 +Fixed a typo, 1852 changed to 1582! This means that pre-1852 dates +are now correctly handled. + +- 29 Jan 2003 0.05 + +Leap year checking differs under Julian calendar (pre 1582). Also +leap year code optimized by checking for most common case first. + +We also handle month overflow correctly in mktime (eg month set to 13). + +Day overflow for less than one month's days is supported. + +- 28 Jan 2003 0.04 + +Gregorian correction handled. In PHP5, we might throw an error if +mktime uses invalid dates around 5-14 Oct 1582. Released with ADOdb 3.10. +Added limbo 5-14 Oct 1582 check, when we set to 15 Oct 1582. + +- 27 Jan 2003 0.03 + +Fixed some more month problems due to gmt issues. Added constant ADODB_DATE_VERSION. +Fixed calculation of days since start of year for <1970. + +- 27 Jan 2003 0.02 + +Changed _adodb_getdate() to inline leap year checking for better performance. +Fixed problem with time-zones west of GMT +0000. + +- 24 Jan 2003 0.01 + +First implementation. +*/ + + +/* Initialization */ + +/* + Version Number +*/ +define('ADODB_DATE_VERSION',0.33); + +$ADODB_DATETIME_CLASS = (PHP_VERSION >= 5.2); + +/* + This code was originally for windows. But apparently this problem happens + also with Linux, RH 7.3 and later! + + glibc-2.2.5-34 and greater has been changed to return -1 for dates < + 1970. This used to work. The problem exists with RedHat 7.3 and 8.0 + echo (mktime(0, 0, 0, 1, 1, 1960)); // prints -1 + + References: + http://bugs.php.net/bug.php?id=20048&edit=2 + http://lists.debian.org/debian-glibc/2002/debian-glibc-200205/msg00010.html +*/ + +if (!defined('ADODB_ALLOW_NEGATIVE_TS')) define('ADODB_NO_NEGATIVE_TS',1); + +function adodb_date_test_date($y1,$m,$d=13) +{ + $h = round(rand()% 24); + $t = adodb_mktime($h,0,0,$m,$d,$y1); + $rez = adodb_date('Y-n-j H:i:s',$t); + if ($h == 0) $h = '00'; + else if ($h < 10) $h = '0'.$h; + if ("$y1-$m-$d $h:00:00" != $rez) { + print "$y1 error, expected=$y1-$m-$d $h:00:00, adodb=$rez
"; + return false; + } + return true; +} + +function adodb_date_test_strftime($fmt) +{ + $s1 = strftime($fmt); + $s2 = adodb_strftime($fmt); + + if ($s1 == $s2) return true; + + echo "error for $fmt, strftime=$s1, adodb=$s2
"; + return false; +} + +/** + Test Suite +*/ +function adodb_date_test() +{ + + for ($m=-24; $m<=24; $m++) + echo "$m :",adodb_date('d-m-Y',adodb_mktime(0,0,0,1+$m,20,2040)),"
"; + + error_reporting(E_ALL); + print "

Testing adodb_date and adodb_mktime. version=".ADODB_DATE_VERSION.' PHP='.PHP_VERSION."

"; + @set_time_limit(0); + $fail = false; + + // This flag disables calling of PHP native functions, so we can properly test the code + if (!defined('ADODB_TEST_DATES')) define('ADODB_TEST_DATES',1); + + $t = time(); + + + $fmt = 'Y-m-d H:i:s'; + echo '
';
+	echo 'adodb: ',adodb_date($fmt,$t),'
'; + echo 'php : ',date($fmt,$t),'
'; + echo '
'; + + adodb_date_test_strftime('%Y %m %x %X'); + adodb_date_test_strftime("%A %d %B %Y"); + adodb_date_test_strftime("%H %M S"); + + $t = adodb_mktime(0,0,0); + if (!(adodb_date('Y-m-d') == date('Y-m-d'))) print 'Error in '.adodb_mktime(0,0,0).'
'; + + $t = adodb_mktime(0,0,0,6,1,2102); + if (!(adodb_date('Y-m-d',$t) == '2102-06-01')) print 'Error in '.adodb_date('Y-m-d',$t).'
'; + + $t = adodb_mktime(0,0,0,2,1,2102); + if (!(adodb_date('Y-m-d',$t) == '2102-02-01')) print 'Error in '.adodb_date('Y-m-d',$t).'
'; + + + print "

Testing gregorian <=> julian conversion

"; + $t = adodb_mktime(0,0,0,10,11,1492); + //http://www.holidayorigins.com/html/columbus_day.html - Friday check + if (!(adodb_date('D Y-m-d',$t) == 'Fri 1492-10-11')) print 'Error in Columbus landing
'; + + $t = adodb_mktime(0,0,0,2,29,1500); + if (!(adodb_date('Y-m-d',$t) == '1500-02-29')) print 'Error in julian leap years
'; + + $t = adodb_mktime(0,0,0,2,29,1700); + if (!(adodb_date('Y-m-d',$t) == '1700-03-01')) print 'Error in gregorian leap years
'; + + print adodb_mktime(0,0,0,10,4,1582).' '; + print adodb_mktime(0,0,0,10,15,1582); + $diff = (adodb_mktime(0,0,0,10,15,1582) - adodb_mktime(0,0,0,10,4,1582)); + if ($diff != 3600*24) print " Error in gregorian correction = ".($diff/3600/24)." days
"; + + print " 15 Oct 1582, Fri=".(adodb_dow(1582,10,15) == 5 ? 'Fri' : 'Error')."
"; + print " 4 Oct 1582, Thu=".(adodb_dow(1582,10,4) == 4 ? 'Thu' : 'Error')."
"; + + print "

Testing overflow

"; + + $t = adodb_mktime(0,0,0,3,33,1965); + if (!(adodb_date('Y-m-d',$t) == '1965-04-02')) print 'Error in day overflow 1
'; + $t = adodb_mktime(0,0,0,4,33,1971); + if (!(adodb_date('Y-m-d',$t) == '1971-05-03')) print 'Error in day overflow 2
'; + $t = adodb_mktime(0,0,0,1,60,1965); + if (!(adodb_date('Y-m-d',$t) == '1965-03-01')) print 'Error in day overflow 3 '.adodb_date('Y-m-d',$t).'
'; + $t = adodb_mktime(0,0,0,12,32,1965); + if (!(adodb_date('Y-m-d',$t) == '1966-01-01')) print 'Error in day overflow 4 '.adodb_date('Y-m-d',$t).'
'; + $t = adodb_mktime(0,0,0,12,63,1965); + if (!(adodb_date('Y-m-d',$t) == '1966-02-01')) print 'Error in day overflow 5 '.adodb_date('Y-m-d',$t).'
'; + $t = adodb_mktime(0,0,0,13,3,1965); + if (!(adodb_date('Y-m-d',$t) == '1966-01-03')) print 'Error in mth overflow 1
'; + + print "Testing 2-digit => 4-digit year conversion

"; + if (adodb_year_digit_check(00) != 2000) print "Err 2-digit 2000
"; + if (adodb_year_digit_check(10) != 2010) print "Err 2-digit 2010
"; + if (adodb_year_digit_check(20) != 2020) print "Err 2-digit 2020
"; + if (adodb_year_digit_check(30) != 2030) print "Err 2-digit 2030
"; + if (adodb_year_digit_check(40) != 1940) print "Err 2-digit 1940
"; + if (adodb_year_digit_check(50) != 1950) print "Err 2-digit 1950
"; + if (adodb_year_digit_check(90) != 1990) print "Err 2-digit 1990
"; + + // Test string formating + print "

Testing date formating

"; + + $fmt = '\d\a\t\e T Y-m-d H:i:s a A d D F g G h H i j l L m M n O \R\F\C2822 r s t U w y Y z Z 2003'; + $s1 = date($fmt,0); + $s2 = adodb_date($fmt,0); + if ($s1 != $s2) { + print " date() 0 failed
$s1
$s2
"; + } + flush(); + for ($i=100; --$i > 0; ) { + + $ts = 3600.0*((rand()%60000)+(rand()%60000))+(rand()%60000); + $s1 = date($fmt,$ts); + $s2 = adodb_date($fmt,$ts); + //print "$s1
$s2

"; + $pos = strcmp($s1,$s2); + + if (($s1) != ($s2)) { + for ($j=0,$k=strlen($s1); $j < $k; $j++) { + if ($s1[$j] != $s2[$j]) { + print substr($s1,$j).' '; + break; + } + } + print "Error date(): $ts

 
+  \"$s1\" (date len=".strlen($s1).")
+  \"$s2\" (adodb_date len=".strlen($s2).")

"; + $fail = true; + } + + $a1 = getdate($ts); + $a2 = adodb_getdate($ts); + $rez = array_diff($a1,$a2); + if (sizeof($rez)>0) { + print "Error getdate() $ts
"; + print_r($a1); + print "
"; + print_r($a2); + print "

"; + $fail = true; + } + } + + // Test generation of dates outside 1901-2038 + print "

Testing random dates between 100 and 4000

"; + adodb_date_test_date(100,1); + for ($i=100; --$i >= 0;) { + $y1 = 100+rand(0,1970-100); + $m = rand(1,12); + adodb_date_test_date($y1,$m); + + $y1 = 3000-rand(0,3000-1970); + adodb_date_test_date($y1,$m); + } + print '

'; + $start = 1960+rand(0,10); + $yrs = 12; + $i = 365.25*86400*($start-1970); + $offset = 36000+rand(10000,60000); + $max = 365*$yrs*86400; + $lastyear = 0; + + // we generate a timestamp, convert it to a date, and convert it back to a timestamp + // and check if the roundtrip broke the original timestamp value. + print "Testing $start to ".($start+$yrs).", or $max seconds, offset=$offset: "; + $cnt = 0; + for ($max += $i; $i < $max; $i += $offset) { + $ret = adodb_date('m,d,Y,H,i,s',$i); + $arr = explode(',',$ret); + if ($lastyear != $arr[2]) { + $lastyear = $arr[2]; + print " $lastyear "; + flush(); + } + $newi = adodb_mktime($arr[3],$arr[4],$arr[5],$arr[0],$arr[1],$arr[2]); + if ($i != $newi) { + print "Error at $i, adodb_mktime returned $newi ($ret)"; + $fail = true; + break; + } + $cnt += 1; + } + echo "Tested $cnt dates
"; + if (!$fail) print "

Passed !

"; + else print "

Failed :-(

"; +} + +/** + Returns day of week, 0 = Sunday,... 6=Saturday. + Algorithm from PEAR::Date_Calc +*/ +function adodb_dow($year, $month, $day) +{ +/* +Pope Gregory removed 10 days - October 5 to October 14 - from the year 1582 and +proclaimed that from that time onwards 3 days would be dropped from the calendar +every 400 years. + +Thursday, October 4, 1582 (Julian) was followed immediately by Friday, October 15, 1582 (Gregorian). +*/ + if ($year <= 1582) { + if ($year < 1582 || + ($year == 1582 && ($month < 10 || ($month == 10 && $day < 15)))) $greg_correction = 3; + else + $greg_correction = 0; + } else + $greg_correction = 0; + + if($month > 2) + $month -= 2; + else { + $month += 10; + $year--; + } + + $day = floor((13 * $month - 1) / 5) + + $day + ($year % 100) + + floor(($year % 100) / 4) + + floor(($year / 100) / 4) - 2 * + floor($year / 100) + 77 + $greg_correction; + + return $day - 7 * floor($day / 7); +} + + +/** + Checks for leap year, returns true if it is. No 2-digit year check. Also + handles julian calendar correctly. +*/ +function _adodb_is_leap_year($year) +{ + if ($year % 4 != 0) return false; + + if ($year % 400 == 0) { + return true; + // if gregorian calendar (>1582), century not-divisible by 400 is not leap + } else if ($year > 1582 && $year % 100 == 0 ) { + return false; + } + + return true; +} + + +/** + checks for leap year, returns true if it is. Has 2-digit year check +*/ +function adodb_is_leap_year($year) +{ + return _adodb_is_leap_year(adodb_year_digit_check($year)); +} + +/** + Fix 2-digit years. Works for any century. + Assumes that if 2-digit is more than 30 years in future, then previous century. +*/ +function adodb_year_digit_check($y) +{ + if ($y < 100) { + + $yr = (integer) date("Y"); + $century = (integer) ($yr /100); + + if ($yr%100 > 50) { + $c1 = $century + 1; + $c0 = $century; + } else { + $c1 = $century; + $c0 = $century - 1; + } + $c1 *= 100; + // if 2-digit year is less than 30 years in future, set it to this century + // otherwise if more than 30 years in future, then we set 2-digit year to the prev century. + if (($y + $c1) < $yr+30) $y = $y + $c1; + else $y = $y + $c0*100; + } + return $y; +} + +function adodb_get_gmt_diff_ts($ts) +{ + if (0 <= $ts && $ts <= 0x7FFFFFFF) { // check if number in 32-bit signed range) { + $arr = getdate($ts); + $y = $arr['year']; + $m = $arr['mon']; + $d = $arr['mday']; + return adodb_get_gmt_diff($y,$m,$d); + } else { + return adodb_get_gmt_diff(false,false,false); + } + +} + +/** + get local time zone offset from GMT. Does not handle historical timezones before 1970. +*/ +function adodb_get_gmt_diff($y,$m,$d) +{ +static $TZ,$tzo; +global $ADODB_DATETIME_CLASS; + + if (!defined('ADODB_TEST_DATES')) $y = false; + else if ($y < 1970 || $y >= 2038) $y = false; + + if ($ADODB_DATETIME_CLASS && $y !== false) { + $dt = new DateTime(); + $dt->setISODate($y,$m,$d); + if (empty($tzo)) { + $tzo = new DateTimeZone(date_default_timezone_get()); + # $tzt = timezone_transitions_get( $tzo ); + } + return -$tzo->getOffset($dt); + } else { + if (isset($TZ)) return $TZ; + $y = date('Y'); + $TZ = mktime(0,0,0,12,2,$y,0) - gmmktime(0,0,0,12,2,$y,0); + } + + return $TZ; +} + +/** + Returns an array with date info. +*/ +function adodb_getdate($d=false,$fast=false) +{ + if ($d === false) return getdate(); + if (!defined('ADODB_TEST_DATES')) { + if ((abs($d) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range + if (!defined('ADODB_NO_NEGATIVE_TS') || $d >= 0) // if windows, must be +ve integer + return @getdate($d); + } + } + return _adodb_getdate($d); +} + +/* +// generate $YRS table for _adodb_getdate() +function adodb_date_gentable($out=true) +{ + + for ($i=1970; $i >= 1600; $i-=10) { + $s = adodb_gmmktime(0,0,0,1,1,$i); + echo "$i => $s,
"; + } +} +adodb_date_gentable(); + +for ($i=1970; $i > 1500; $i--) { + +echo "
$i "; + adodb_date_test_date($i,1,1); +} + +*/ + + +$_month_table_normal = array("",31,28,31,30,31,30,31,31,30,31,30,31); +$_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31); + +function adodb_validdate($y,$m,$d) +{ +global $_month_table_normal,$_month_table_leaf; + + if (_adodb_is_leap_year($y)) $marr = $_month_table_leaf; + else $marr = $_month_table_normal; + + if ($m > 12 || $m < 1) return false; + + if ($d > 31 || $d < 1) return false; + + if ($marr[$m] < $d) return false; + + if ($y < 1000 && $y > 3000) return false; + + return true; +} + +/** + Low-level function that returns the getdate() array. We have a special + $fast flag, which if set to true, will return fewer array values, + and is much faster as it does not calculate dow, etc. +*/ +function _adodb_getdate($origd=false,$fast=false,$is_gmt=false) +{ +static $YRS; +global $_month_table_normal,$_month_table_leaf; + + $d = $origd - ($is_gmt ? 0 : adodb_get_gmt_diff_ts($origd)); + $_day_power = 86400; + $_hour_power = 3600; + $_min_power = 60; + + if ($d < -12219321600) $d -= 86400*10; // if 15 Oct 1582 or earlier, gregorian correction + + $_month_table_normal = array("",31,28,31,30,31,30,31,31,30,31,30,31); + $_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31); + + $d366 = $_day_power * 366; + $d365 = $_day_power * 365; + + if ($d < 0) { + + if (empty($YRS)) $YRS = array( + 1970 => 0, + 1960 => -315619200, + 1950 => -631152000, + 1940 => -946771200, + 1930 => -1262304000, + 1920 => -1577923200, + 1910 => -1893456000, + 1900 => -2208988800, + 1890 => -2524521600, + 1880 => -2840140800, + 1870 => -3155673600, + 1860 => -3471292800, + 1850 => -3786825600, + 1840 => -4102444800, + 1830 => -4417977600, + 1820 => -4733596800, + 1810 => -5049129600, + 1800 => -5364662400, + 1790 => -5680195200, + 1780 => -5995814400, + 1770 => -6311347200, + 1760 => -6626966400, + 1750 => -6942499200, + 1740 => -7258118400, + 1730 => -7573651200, + 1720 => -7889270400, + 1710 => -8204803200, + 1700 => -8520336000, + 1690 => -8835868800, + 1680 => -9151488000, + 1670 => -9467020800, + 1660 => -9782640000, + 1650 => -10098172800, + 1640 => -10413792000, + 1630 => -10729324800, + 1620 => -11044944000, + 1610 => -11360476800, + 1600 => -11676096000); + + if ($is_gmt) $origd = $d; + // The valid range of a 32bit signed timestamp is typically from + // Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT + // + + # old algorithm iterates through all years. new algorithm does it in + # 10 year blocks + + /* + # old algo + for ($a = 1970 ; --$a >= 0;) { + $lastd = $d; + + if ($leaf = _adodb_is_leap_year($a)) $d += $d366; + else $d += $d365; + + if ($d >= 0) { + $year = $a; + break; + } + } + */ + + $lastsecs = 0; + $lastyear = 1970; + foreach($YRS as $year => $secs) { + if ($d >= $secs) { + $a = $lastyear; + break; + } + $lastsecs = $secs; + $lastyear = $year; + } + + $d -= $lastsecs; + if (!isset($a)) $a = $lastyear; + + //echo ' yr=',$a,' ', $d,'.'; + + for (; --$a >= 0;) { + $lastd = $d; + + if ($leaf = _adodb_is_leap_year($a)) $d += $d366; + else $d += $d365; + + if ($d >= 0) { + $year = $a; + break; + } + } + /**/ + + $secsInYear = 86400 * ($leaf ? 366 : 365) + $lastd; + + $d = $lastd; + $mtab = ($leaf) ? $_month_table_leaf : $_month_table_normal; + for ($a = 13 ; --$a > 0;) { + $lastd = $d; + $d += $mtab[$a] * $_day_power; + if ($d >= 0) { + $month = $a; + $ndays = $mtab[$a]; + break; + } + } + + $d = $lastd; + $day = $ndays + ceil(($d+1) / ($_day_power)); + + $d += ($ndays - $day+1)* $_day_power; + $hour = floor($d/$_hour_power); + + } else { + for ($a = 1970 ;; $a++) { + $lastd = $d; + + if ($leaf = _adodb_is_leap_year($a)) $d -= $d366; + else $d -= $d365; + if ($d < 0) { + $year = $a; + break; + } + } + $secsInYear = $lastd; + $d = $lastd; + $mtab = ($leaf) ? $_month_table_leaf : $_month_table_normal; + for ($a = 1 ; $a <= 12; $a++) { + $lastd = $d; + $d -= $mtab[$a] * $_day_power; + if ($d < 0) { + $month = $a; + $ndays = $mtab[$a]; + break; + } + } + $d = $lastd; + $day = ceil(($d+1) / $_day_power); + $d = $d - ($day-1) * $_day_power; + $hour = floor($d /$_hour_power); + } + + $d -= $hour * $_hour_power; + $min = floor($d/$_min_power); + $secs = $d - $min * $_min_power; + if ($fast) { + return array( + 'seconds' => $secs, + 'minutes' => $min, + 'hours' => $hour, + 'mday' => $day, + 'mon' => $month, + 'year' => $year, + 'yday' => floor($secsInYear/$_day_power), + 'leap' => $leaf, + 'ndays' => $ndays + ); + } + + + $dow = adodb_dow($year,$month,$day); + + return array( + 'seconds' => $secs, + 'minutes' => $min, + 'hours' => $hour, + 'mday' => $day, + 'wday' => $dow, + 'mon' => $month, + 'year' => $year, + 'yday' => floor($secsInYear/$_day_power), + 'weekday' => gmdate('l',$_day_power*(3+$dow)), + 'month' => gmdate('F',mktime(0,0,0,$month,2,1971)), + 0 => $origd + ); +} +/* + if ($isphp5) + $dates .= sprintf('%s%04d',($gmt<=0)?'+':'-',abs($gmt)/36); + else + $dates .= sprintf('%s%04d',($gmt<0)?'+':'-',abs($gmt)/36); + break;*/ +function adodb_tz_offset($gmt,$isphp5) +{ + $zhrs = abs($gmt)/3600; + $hrs = floor($zhrs); + if ($isphp5) + return sprintf('%s%02d%02d',($gmt<=0)?'+':'-',floor($zhrs),($zhrs-$hrs)*60); + else + return sprintf('%s%02d%02d',($gmt<0)?'+':'-',floor($zhrs),($zhrs-$hrs)*60); +} + + +function adodb_gmdate($fmt,$d=false) +{ + return adodb_date($fmt,$d,true); +} + +// accepts unix timestamp and iso date format in $d +function adodb_date2($fmt, $d=false, $is_gmt=false) +{ + if ($d !== false) { + if (!preg_match( + "|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})[ -]?(([0-9]{1,2}):?([0-9]{1,2}):?([0-9\.]{1,4}))?|", + ($d), $rr)) return adodb_date($fmt,false,$is_gmt); + + if ($rr[1] <= 100 && $rr[2]<= 1) return adodb_date($fmt,false,$is_gmt); + + // h-m-s-MM-DD-YY + if (!isset($rr[5])) $d = adodb_mktime(0,0,0,$rr[2],$rr[3],$rr[1],false,$is_gmt); + else $d = @adodb_mktime($rr[5],$rr[6],$rr[7],$rr[2],$rr[3],$rr[1],false,$is_gmt); + } + + return adodb_date($fmt,$d,$is_gmt); +} + + +/** + Return formatted date based on timestamp $d +*/ +function adodb_date($fmt,$d=false,$is_gmt=false) +{ +static $daylight; +global $ADODB_DATETIME_CLASS; + + if ($d === false) return ($is_gmt)? @gmdate($fmt): @date($fmt); + if (!defined('ADODB_TEST_DATES')) { + if ((abs($d) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range + if (!defined('ADODB_NO_NEGATIVE_TS') || $d >= 0) // if windows, must be +ve integer + return ($is_gmt)? @gmdate($fmt,$d): @date($fmt,$d); + + } + } + $_day_power = 86400; + + $arr = _adodb_getdate($d,true,$is_gmt); + + if (!isset($daylight)) $daylight = function_exists('adodb_daylight_sv'); + if ($daylight) adodb_daylight_sv($arr, $is_gmt); + + $year = $arr['year']; + $month = $arr['mon']; + $day = $arr['mday']; + $hour = $arr['hours']; + $min = $arr['minutes']; + $secs = $arr['seconds']; + + $max = strlen($fmt); + $dates = ''; + + $isphp5 = PHP_VERSION >= 5; + + /* + at this point, we have the following integer vars to manipulate: + $year, $month, $day, $hour, $min, $secs + */ + for ($i=0; $i < $max; $i++) { + switch($fmt[$i]) { + case 'e': + $dates .= date('e'); + break; + case 'T': + if ($ADODB_DATETIME_CLASS) { + $dt = new DateTime(); + $dt->SetDate($year,$month,$day); + $dates .= $dt->Format('T'); + } else + $dates .= date('T'); + break; + // YEAR + case 'L': $dates .= $arr['leap'] ? '1' : '0'; break; + case 'r': // Thu, 21 Dec 2000 16:01:07 +0200 + + // 4.3.11 uses '04 Jun 2004' + // 4.3.8 uses ' 4 Jun 2004' + $dates .= gmdate('D',$_day_power*(3+adodb_dow($year,$month,$day))).', ' + . ($day<10?'0'.$day:$day) . ' '.date('M',mktime(0,0,0,$month,2,1971)).' '.$year.' '; + + if ($hour < 10) $dates .= '0'.$hour; else $dates .= $hour; + + if ($min < 10) $dates .= ':0'.$min; else $dates .= ':'.$min; + + if ($secs < 10) $dates .= ':0'.$secs; else $dates .= ':'.$secs; + + $gmt = adodb_get_gmt_diff($year,$month,$day); + + $dates .= ' '.adodb_tz_offset($gmt,$isphp5); + break; + + case 'Y': $dates .= $year; break; + case 'y': $dates .= substr($year,strlen($year)-2,2); break; + // MONTH + case 'm': if ($month<10) $dates .= '0'.$month; else $dates .= $month; break; + case 'Q': $dates .= ($month+3)>>2; break; + case 'n': $dates .= $month; break; + case 'M': $dates .= date('M',mktime(0,0,0,$month,2,1971)); break; + case 'F': $dates .= date('F',mktime(0,0,0,$month,2,1971)); break; + // DAY + case 't': $dates .= $arr['ndays']; break; + case 'z': $dates .= $arr['yday']; break; + case 'w': $dates .= adodb_dow($year,$month,$day); break; + case 'l': $dates .= gmdate('l',$_day_power*(3+adodb_dow($year,$month,$day))); break; + case 'D': $dates .= gmdate('D',$_day_power*(3+adodb_dow($year,$month,$day))); break; + case 'j': $dates .= $day; break; + case 'd': if ($day<10) $dates .= '0'.$day; else $dates .= $day; break; + case 'S': + $d10 = $day % 10; + if ($d10 == 1) $dates .= 'st'; + else if ($d10 == 2 && $day != 12) $dates .= 'nd'; + else if ($d10 == 3) $dates .= 'rd'; + else $dates .= 'th'; + break; + + // HOUR + case 'Z': + $dates .= ($is_gmt) ? 0 : -adodb_get_gmt_diff($year,$month,$day); break; + case 'O': + $gmt = ($is_gmt) ? 0 : adodb_get_gmt_diff($year,$month,$day); + + $dates .= adodb_tz_offset($gmt,$isphp5); + break; + + case 'H': + if ($hour < 10) $dates .= '0'.$hour; + else $dates .= $hour; + break; + case 'h': + if ($hour > 12) $hh = $hour - 12; + else { + if ($hour == 0) $hh = '12'; + else $hh = $hour; + } + + if ($hh < 10) $dates .= '0'.$hh; + else $dates .= $hh; + break; + + case 'G': + $dates .= $hour; + break; + + case 'g': + if ($hour > 12) $hh = $hour - 12; + else { + if ($hour == 0) $hh = '12'; + else $hh = $hour; + } + $dates .= $hh; + break; + // MINUTES + case 'i': if ($min < 10) $dates .= '0'.$min; else $dates .= $min; break; + // SECONDS + case 'U': $dates .= $d; break; + case 's': if ($secs < 10) $dates .= '0'.$secs; else $dates .= $secs; break; + // AM/PM + // Note 00:00 to 11:59 is AM, while 12:00 to 23:59 is PM + case 'a': + if ($hour>=12) $dates .= 'pm'; + else $dates .= 'am'; + break; + case 'A': + if ($hour>=12) $dates .= 'PM'; + else $dates .= 'AM'; + break; + default: + $dates .= $fmt[$i]; break; + // ESCAPE + case "\\": + $i++; + if ($i < $max) $dates .= $fmt[$i]; + break; + } + } + return $dates; +} + +/** + Returns a timestamp given a GMT/UTC time. + Note that $is_dst is not implemented and is ignored. +*/ +function adodb_gmmktime($hr,$min,$sec,$mon=false,$day=false,$year=false,$is_dst=false) +{ + return adodb_mktime($hr,$min,$sec,$mon,$day,$year,$is_dst,true); +} + +/** + Return a timestamp given a local time. Originally by jackbbs. + Note that $is_dst is not implemented and is ignored. + + Not a very fast algorithm - O(n) operation. Could be optimized to O(1). +*/ +function adodb_mktime($hr,$min,$sec,$mon=false,$day=false,$year=false,$is_dst=false,$is_gmt=false) +{ + if (!defined('ADODB_TEST_DATES')) { + + if ($mon === false) { + return $is_gmt? @gmmktime($hr,$min,$sec): @mktime($hr,$min,$sec); + } + + // for windows, we don't check 1970 because with timezone differences, + // 1 Jan 1970 could generate negative timestamp, which is illegal + $usephpfns = (1970 < $year && $year < 2038 + || !defined('ADODB_NO_NEGATIVE_TS') && (1901 < $year && $year < 2038) + ); + + + if ($usephpfns && ($year + $mon/12+$day/365.25+$hr/(24*365.25) >= 2038)) $usephpfns = false; + + if ($usephpfns) { + return $is_gmt ? + @gmmktime($hr,$min,$sec,$mon,$day,$year): + @mktime($hr,$min,$sec,$mon,$day,$year); + } + } + + $gmt_different = ($is_gmt) ? 0 : adodb_get_gmt_diff($year,$mon,$day); + + /* + # disabled because some people place large values in $sec. + # however we need it for $mon because we use an array... + $hr = intval($hr); + $min = intval($min); + $sec = intval($sec); + */ + $mon = intval($mon); + $day = intval($day); + $year = intval($year); + + + $year = adodb_year_digit_check($year); + + if ($mon > 12) { + $y = floor(($mon-1)/ 12); + $year += $y; + $mon -= $y*12; + } else if ($mon < 1) { + $y = ceil((1-$mon) / 12); + $year -= $y; + $mon += $y*12; + } + + $_day_power = 86400; + $_hour_power = 3600; + $_min_power = 60; + + $_month_table_normal = array("",31,28,31,30,31,30,31,31,30,31,30,31); + $_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31); + + $_total_date = 0; + if ($year >= 1970) { + for ($a = 1970 ; $a <= $year; $a++) { + $leaf = _adodb_is_leap_year($a); + if ($leaf == true) { + $loop_table = $_month_table_leaf; + $_add_date = 366; + } else { + $loop_table = $_month_table_normal; + $_add_date = 365; + } + if ($a < $year) { + $_total_date += $_add_date; + } else { + for($b=1;$b<$mon;$b++) { + $_total_date += $loop_table[$b]; + } + } + } + $_total_date +=$day-1; + $ret = $_total_date * $_day_power + $hr * $_hour_power + $min * $_min_power + $sec + $gmt_different; + + } else { + for ($a = 1969 ; $a >= $year; $a--) { + $leaf = _adodb_is_leap_year($a); + if ($leaf == true) { + $loop_table = $_month_table_leaf; + $_add_date = 366; + } else { + $loop_table = $_month_table_normal; + $_add_date = 365; + } + if ($a > $year) { $_total_date += $_add_date; + } else { + for($b=12;$b>$mon;$b--) { + $_total_date += $loop_table[$b]; + } + } + } + $_total_date += $loop_table[$mon] - $day; + + $_day_time = $hr * $_hour_power + $min * $_min_power + $sec; + $_day_time = $_day_power - $_day_time; + $ret = -( $_total_date * $_day_power + $_day_time - $gmt_different); + if ($ret < -12220185600) $ret += 10*86400; // if earlier than 5 Oct 1582 - gregorian correction + else if ($ret < -12219321600) $ret = -12219321600; // if in limbo, reset to 15 Oct 1582. + } + //print " dmy=$day/$mon/$year $hr:$min:$sec => " .$ret; + return $ret; +} + +function adodb_gmstrftime($fmt, $ts=false) +{ + return adodb_strftime($fmt,$ts,true); +} + +// hack - convert to adodb_date +function adodb_strftime($fmt, $ts=false,$is_gmt=false) +{ +global $ADODB_DATE_LOCALE; + + if (!defined('ADODB_TEST_DATES')) { + if ((abs($ts) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range + if (!defined('ADODB_NO_NEGATIVE_TS') || $ts >= 0) // if windows, must be +ve integer + return ($is_gmt)? @gmstrftime($fmt,$ts): @strftime($fmt,$ts); + + } + } + + if (empty($ADODB_DATE_LOCALE)) { + /* + $tstr = strtoupper(gmstrftime('%c',31366800)); // 30 Dec 1970, 1 am + $sep = substr($tstr,2,1); + $hasAM = strrpos($tstr,'M') !== false; + */ + # see http://phplens.com/lens/lensforum/msgs.php?id=14865 for reasoning, and changelog for version 0.24 + $dstr = gmstrftime('%x',31366800); // 30 Dec 1970, 1 am + $sep = substr($dstr,2,1); + $tstr = strtoupper(gmstrftime('%X',31366800)); // 30 Dec 1970, 1 am + $hasAM = strrpos($tstr,'M') !== false; + + $ADODB_DATE_LOCALE = array(); + $ADODB_DATE_LOCALE[] = strncmp($tstr,'30',2) == 0 ? 'd'.$sep.'m'.$sep.'y' : 'm'.$sep.'d'.$sep.'y'; + $ADODB_DATE_LOCALE[] = ($hasAM) ? 'h:i:s a' : 'H:i:s'; + + } + $inpct = false; + $fmtdate = ''; + for ($i=0,$max = strlen($fmt); $i < $max; $i++) { + $ch = $fmt[$i]; + if ($ch == '%') { + if ($inpct) { + $fmtdate .= '%'; + $inpct = false; + } else + $inpct = true; + } else if ($inpct) { + + $inpct = false; + switch($ch) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case 'E': + case 'O': + /* ignore format modifiers */ + $inpct = true; + break; + + case 'a': $fmtdate .= 'D'; break; + case 'A': $fmtdate .= 'l'; break; + case 'h': + case 'b': $fmtdate .= 'M'; break; + case 'B': $fmtdate .= 'F'; break; + case 'c': $fmtdate .= $ADODB_DATE_LOCALE[0].$ADODB_DATE_LOCALE[1]; break; + case 'C': $fmtdate .= '\C?'; break; // century + case 'd': $fmtdate .= 'd'; break; + case 'D': $fmtdate .= 'm/d/y'; break; + case 'e': $fmtdate .= 'j'; break; + case 'g': $fmtdate .= '\g?'; break; //? + case 'G': $fmtdate .= '\G?'; break; //? + case 'H': $fmtdate .= 'H'; break; + case 'I': $fmtdate .= 'h'; break; + case 'j': $fmtdate .= '?z'; $parsej = true; break; // wrong as j=1-based, z=0-basd + case 'm': $fmtdate .= 'm'; break; + case 'M': $fmtdate .= 'i'; break; + case 'n': $fmtdate .= "\n"; break; + case 'p': $fmtdate .= 'a'; break; + case 'r': $fmtdate .= 'h:i:s a'; break; + case 'R': $fmtdate .= 'H:i:s'; break; + case 'S': $fmtdate .= 's'; break; + case 't': $fmtdate .= "\t"; break; + case 'T': $fmtdate .= 'H:i:s'; break; + case 'u': $fmtdate .= '?u'; $parseu = true; break; // wrong strftime=1-based, date=0-based + case 'U': $fmtdate .= '?U'; $parseU = true; break;// wrong strftime=1-based, date=0-based + case 'x': $fmtdate .= $ADODB_DATE_LOCALE[0]; break; + case 'X': $fmtdate .= $ADODB_DATE_LOCALE[1]; break; + case 'w': $fmtdate .= '?w'; $parseu = true; break; // wrong strftime=1-based, date=0-based + case 'W': $fmtdate .= '?W'; $parseU = true; break;// wrong strftime=1-based, date=0-based + case 'y': $fmtdate .= 'y'; break; + case 'Y': $fmtdate .= 'Y'; break; + case 'Z': $fmtdate .= 'T'; break; + } + } else if (('A' <= ($ch) && ($ch) <= 'Z' ) || ('a' <= ($ch) && ($ch) <= 'z' )) + $fmtdate .= "\\".$ch; + else + $fmtdate .= $ch; + } + //echo "fmt=",$fmtdate,"
"; + if ($ts === false) $ts = time(); + $ret = adodb_date($fmtdate, $ts, $is_gmt); + return $ret; +} + + +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/adodb.inc.php b/php/pgadmin/libraries/adodb/adodb.inc.php new file mode 100644 index 0000000..0187f55 --- /dev/null +++ b/php/pgadmin/libraries/adodb/adodb.inc.php @@ -0,0 +1,4416 @@ +fields is available on EOF + $ADODB_FETCH_MODE, // DEFAULT, NUM, ASSOC or BOTH. Default follows native driver default... + $ADODB_GETONE_EOF, + $ADODB_QUOTE_FIELDNAMES; // Allows you to force quotes (backticks) around field names in queries generated by getinsertsql and getupdatesql. + + //============================================================================================== + // GLOBAL SETUP + //============================================================================================== + + $ADODB_EXTENSION = defined('ADODB_EXTENSION'); + + //********************************************************// + /* + Controls $ADODB_FORCE_TYPE mode. Default is ADODB_FORCE_VALUE (3). + Used in GetUpdateSql and GetInsertSql functions. Thx to Niko, nuko#mbnet.fi + + 0 = ignore empty fields. All empty fields in array are ignored. + 1 = force null. All empty, php null and string 'null' fields are changed to sql NULL values. + 2 = force empty. All empty, php null and string 'null' fields are changed to sql empty '' or 0 values. + 3 = force value. Value is left as it is. Php null and string 'null' are set to sql NULL values and empty fields '' are set to empty '' sql values. + */ + define('ADODB_FORCE_IGNORE',0); + define('ADODB_FORCE_NULL',1); + define('ADODB_FORCE_EMPTY',2); + define('ADODB_FORCE_VALUE',3); + //********************************************************// + + + if (!$ADODB_EXTENSION || ADODB_EXTENSION < 4.0) { + + define('ADODB_BAD_RS','

Bad $rs in %s. Connection or SQL invalid. Try using $connection->debug=true;

'); + + // allow [ ] @ ` " and . in table names + define('ADODB_TABLE_REGEX','([]0-9a-z_\:\"\`\.\@\[-]*)'); + + // prefetching used by oracle + if (!defined('ADODB_PREFETCH_ROWS')) define('ADODB_PREFETCH_ROWS',10); + + + /* + Controls ADODB_FETCH_ASSOC field-name case. Default is 2, use native case-names. + This currently works only with mssql, odbc, oci8po and ibase derived drivers. + + 0 = assoc lowercase field names. $rs->fields['orderid'] + 1 = assoc uppercase field names. $rs->fields['ORDERID'] + 2 = use native-case field names. $rs->fields['OrderID'] + */ + + define('ADODB_FETCH_DEFAULT',0); + define('ADODB_FETCH_NUM',1); + define('ADODB_FETCH_ASSOC',2); + define('ADODB_FETCH_BOTH',3); + + if (!defined('TIMESTAMP_FIRST_YEAR')) define('TIMESTAMP_FIRST_YEAR',100); + + // PHP's version scheme makes converting to numbers difficult - workaround + $_adodb_ver = (float) PHP_VERSION; + if ($_adodb_ver >= 5.2) { + define('ADODB_PHPVER',0x5200); + } else if ($_adodb_ver >= 5.0) { + define('ADODB_PHPVER',0x5000); + } else + die("PHP5 or later required. You are running ".PHP_VERSION); + } + + + //if (!defined('ADODB_ASSOC_CASE')) define('ADODB_ASSOC_CASE',2); + + + /** + Accepts $src and $dest arrays, replacing string $data + */ + function ADODB_str_replace($src, $dest, $data) + { + if (ADODB_PHPVER >= 0x4050) return str_replace($src,$dest,$data); + + $s = reset($src); + $d = reset($dest); + while ($s !== false) { + $data = str_replace($s,$d,$data); + $s = next($src); + $d = next($dest); + } + return $data; + } + + function ADODB_Setup() + { + GLOBAL + $ADODB_vers, // database version + $ADODB_COUNTRECS, // count number of records returned - slows down query + $ADODB_CACHE_DIR, // directory to cache recordsets + $ADODB_FETCH_MODE, + $ADODB_CACHE, + $ADODB_CACHE_CLASS, + $ADODB_FORCE_TYPE, + $ADODB_GETONE_EOF, + $ADODB_QUOTE_FIELDNAMES; + + if (empty($ADODB_CACHE_CLASS)) $ADODB_CACHE_CLASS = 'ADODB_Cache_File' ; + $ADODB_FETCH_MODE = ADODB_FETCH_DEFAULT; + $ADODB_FORCE_TYPE = ADODB_FORCE_VALUE; + $ADODB_GETONE_EOF = null; + + if (!isset($ADODB_CACHE_DIR)) { + $ADODB_CACHE_DIR = '/tmp'; //(isset($_ENV['TMP'])) ? $_ENV['TMP'] : '/tmp'; + } else { + // do not accept url based paths, eg. http:/ or ftp:/ + if (strpos($ADODB_CACHE_DIR,'://') !== false) + die("Illegal path http:// or ftp://"); + } + + + // Initialize random number generator for randomizing cache flushes + // -- note Since PHP 4.2.0, the seed becomes optional and defaults to a random value if omitted. + srand(((double)microtime())*1000000); + + /** + * ADODB version as a string. + */ + $ADODB_vers = 'V5.11 5 May 2010 (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved. Released BSD & LGPL.'; + + /** + * Determines whether recordset->RecordCount() is used. + * Set to false for highest performance -- RecordCount() will always return -1 then + * for databases that provide "virtual" recordcounts... + */ + if (!isset($ADODB_COUNTRECS)) $ADODB_COUNTRECS = true; + } + + + //============================================================================================== + // CHANGE NOTHING BELOW UNLESS YOU ARE DESIGNING ADODB + //============================================================================================== + + ADODB_Setup(); + + //============================================================================================== + // CLASS ADOFieldObject + //============================================================================================== + /** + * Helper class for FetchFields -- holds info on a column + */ + class ADOFieldObject { + var $name = ''; + var $max_length=0; + var $type=""; +/* + // additional fields by dannym... (danny_milo@yahoo.com) + var $not_null = false; + // actually, this has already been built-in in the postgres, fbsql AND mysql module? ^-^ + // so we can as well make not_null standard (leaving it at "false" does not harm anyways) + + var $has_default = false; // this one I have done only in mysql and postgres for now ... + // others to come (dannym) + var $default_value; // default, if any, and supported. Check has_default first. +*/ + } + + // for transaction handling + + function ADODB_TransMonitor($dbms, $fn, $errno, $errmsg, $p1, $p2, &$thisConnection) + { + //print "Errorno ($fn errno=$errno m=$errmsg) "; + $thisConnection->_transOK = false; + if ($thisConnection->_oldRaiseFn) { + $fn = $thisConnection->_oldRaiseFn; + $fn($dbms, $fn, $errno, $errmsg, $p1, $p2,$thisConnection); + } + } + + //------------------ + // class for caching + class ADODB_Cache_File { + + var $createdir = true; // requires creation of temp dirs + + function ADODB_Cache_File() + { + global $ADODB_INCLUDED_CSV; + if (empty($ADODB_INCLUDED_CSV)) include_once(ADODB_DIR.'/adodb-csvlib.inc.php'); + } + + // write serialised recordset to cache item/file + function writecache($filename, $contents, $debug, $secs2cache) + { + return adodb_write_file($filename, $contents,$debug); + } + + // load serialised recordset and unserialise it + function &readcache($filename, &$err, $secs2cache, $rsClass) + { + $rs = csv2rs($filename,$err,$secs2cache,$rsClass); + return $rs; + } + + // flush all items in cache + function flushall($debug=false) + { + global $ADODB_CACHE_DIR; + + $rez = false; + + if (strlen($ADODB_CACHE_DIR) > 1) { + $rez = $this->_dirFlush($ADODB_CACHE_DIR); + if ($debug) ADOConnection::outp( "flushall: $dir
\n". $rez."
"); + } + return $rez; + } + + // flush one file in cache + function flushcache($f, $debug=false) + { + if (!@unlink($f)) { + if ($debug) ADOConnection::outp( "flushcache: failed for $f"); + } + } + + function getdirname($hash) + { + global $ADODB_CACHE_DIR; + if (!isset($this->notSafeMode)) $this->notSafeMode = !ini_get('safe_mode'); + return ($this->notSafeMode) ? $ADODB_CACHE_DIR.'/'.substr($hash,0,2) : $ADODB_CACHE_DIR; + } + + // create temp directories + function createdir($hash, $debug) + { + $dir = $this->getdirname($hash); + if ($this->notSafeMode && !file_exists($dir)) { + $oldu = umask(0); + if (!@mkdir($dir,0771)) if(!is_dir($dir) && $debug) ADOConnection::outp("Cannot create $dir"); + umask($oldu); + } + + return $dir; + } + + /** + * Private function to erase all of the files and subdirectories in a directory. + * + * Just specify the directory, and tell it if you want to delete the directory or just clear it out. + * Note: $kill_top_level is used internally in the function to flush subdirectories. + */ + function _dirFlush($dir, $kill_top_level = false) + { + if(!$dh = @opendir($dir)) return; + + while (($obj = readdir($dh))) { + if($obj=='.' || $obj=='..') continue; + $f = $dir.'/'.$obj; + + if (strpos($obj,'.cache')) @unlink($f); + if (is_dir($f)) $this->_dirFlush($f, true); + } + if ($kill_top_level === true) @rmdir($dir); + return true; + } + } + + //============================================================================================== + // CLASS ADOConnection + //============================================================================================== + + /** + * Connection object. For connecting to databases, and executing queries. + */ + class ADOConnection { + // + // PUBLIC VARS + // + var $dataProvider = 'native'; + var $databaseType = ''; /// RDBMS currently in use, eg. odbc, mysql, mssql + var $database = ''; /// Name of database to be used. + var $host = ''; /// The hostname of the database server + var $user = ''; /// The username which is used to connect to the database server. + var $password = ''; /// Password for the username. For security, we no longer store it. + var $debug = false; /// if set to true will output sql statements + var $maxblobsize = 262144; /// maximum size of blobs or large text fields (262144 = 256K)-- some db's die otherwise like foxpro + var $concat_operator = '+'; /// default concat operator -- change to || for Oracle/Interbase + var $substr = 'substr'; /// substring operator + var $length = 'length'; /// string length ofperator + var $random = 'rand()'; /// random function + var $upperCase = 'upper'; /// uppercase function + var $fmtDate = "'Y-m-d'"; /// used by DBDate() as the default date format used by the database + var $fmtTimeStamp = "'Y-m-d, h:i:s A'"; /// used by DBTimeStamp as the default timestamp fmt. + var $true = '1'; /// string that represents TRUE for a database + var $false = '0'; /// string that represents FALSE for a database + var $replaceQuote = "\\'"; /// string to use to replace quotes + var $nameQuote = '"'; /// string to use to quote identifiers and names + var $charSet=false; /// character set to use - only for interbase, postgres and oci8 + var $metaDatabasesSQL = ''; + var $metaTablesSQL = ''; + var $uniqueOrderBy = false; /// All order by columns have to be unique + var $emptyDate = ' '; + var $emptyTimeStamp = ' '; + var $lastInsID = false; + //-- + var $hasInsertID = false; /// supports autoincrement ID? + var $hasAffectedRows = false; /// supports affected rows for update/delete? + var $hasTop = false; /// support mssql/access SELECT TOP 10 * FROM TABLE + var $hasLimit = false; /// support pgsql/mysql SELECT * FROM TABLE LIMIT 10 + var $readOnly = false; /// this is a readonly database - used by phpLens + var $hasMoveFirst = false; /// has ability to run MoveFirst(), scrolling backwards + var $hasGenID = false; /// can generate sequences using GenID(); + var $hasTransactions = true; /// has transactions + //-- + var $genID = 0; /// sequence id used by GenID(); + var $raiseErrorFn = false; /// error function to call + var $isoDates = false; /// accepts dates in ISO format + var $cacheSecs = 3600; /// cache for 1 hour + + // memcache + var $memCache = false; /// should we use memCache instead of caching in files + var $memCacheHost; /// memCache host + var $memCachePort = 11211; /// memCache port + var $memCacheCompress = false; /// Use 'true' to store the item compressed (uses zlib) + + var $sysDate = false; /// name of function that returns the current date + var $sysTimeStamp = false; /// name of function that returns the current timestamp + var $sysUTimeStamp = false; // name of function that returns the current timestamp accurate to the microsecond or nearest fraction + var $arrayClass = 'ADORecordSet_array'; /// name of class used to generate array recordsets, which are pre-downloaded recordsets + + var $noNullStrings = false; /// oracle specific stuff - if true ensures that '' is converted to ' ' + var $numCacheHits = 0; + var $numCacheMisses = 0; + var $pageExecuteCountRows = true; + var $uniqueSort = false; /// indicates that all fields in order by must be unique + var $leftOuter = false; /// operator to use for left outer join in WHERE clause + var $rightOuter = false; /// operator to use for right outer join in WHERE clause + var $ansiOuter = false; /// whether ansi outer join syntax supported + var $autoRollback = false; // autoRollback on PConnect(). + var $poorAffectedRows = false; // affectedRows not working or unreliable + + var $fnExecute = false; + var $fnCacheExecute = false; + var $blobEncodeType = false; // false=not required, 'I'=encode to integer, 'C'=encode to char + var $rsPrefix = "ADORecordSet_"; + + var $autoCommit = true; /// do not modify this yourself - actually private + var $transOff = 0; /// temporarily disable transactions + var $transCnt = 0; /// count of nested transactions + + var $fetchMode=false; + + var $null2null = 'null'; // in autoexecute/getinsertsql/getupdatesql, this value will be converted to a null + var $bulkBind = false; // enable 2D Execute array + // + // PRIVATE VARS + // + var $_oldRaiseFn = false; + var $_transOK = null; + var $_connectionID = false; /// The returned link identifier whenever a successful database connection is made. + var $_errorMsg = false; /// A variable which was used to keep the returned last error message. The value will + /// then returned by the errorMsg() function + var $_errorCode = false; /// Last error code, not guaranteed to be used - only by oci8 + var $_queryID = false; /// This variable keeps the last created result link identifier + + var $_isPersistentConnection = false; /// A boolean variable to state whether its a persistent connection or normal connection. */ + var $_bindInputArray = false; /// set to true if ADOConnection.Execute() permits binding of array parameters. + var $_evalAll = false; + var $_affected = false; + var $_logsql = false; + var $_transmode = ''; // transaction mode + + + + /** + * Constructor + */ + function ADOConnection() + { + die('Virtual Class -- cannot instantiate'); + } + + static function Version() + { + global $ADODB_vers; + + $ok = preg_match( '/^[Vv]([0-9\.]+)/', $ADODB_vers, $matches ); + if (!$ok) return (float) substr($ADODB_vers,1); + else return $matches[1]; + } + + /** + Get server version info... + + @returns An array with 2 elements: $arr['string'] is the description string, + and $arr[version] is the version (also a string). + */ + function ServerInfo() + { + return array('description' => '', 'version' => ''); + } + + function IsConnected() + { + return !empty($this->_connectionID); + } + + function _findvers($str) + { + if (preg_match('/([0-9]+\.([0-9\.])+)/',$str, $arr)) return $arr[1]; + else return ''; + } + + /** + * All error messages go through this bottleneck function. + * You can define your own handler by defining the function name in ADODB_OUTP. + */ + static function outp($msg,$newline=true) + { + global $ADODB_FLUSH,$ADODB_OUTP; + + if (defined('ADODB_OUTP')) { + $fn = ADODB_OUTP; + $fn($msg,$newline); + return; + } else if (isset($ADODB_OUTP)) { + $fn = $ADODB_OUTP; + $fn($msg,$newline); + return; + } + + if ($newline) $msg .= "
\n"; + + if (isset($_SERVER['HTTP_USER_AGENT']) || !$newline) echo $msg; + else echo strip_tags($msg); + + + if (!empty($ADODB_FLUSH) && ob_get_length() !== false) flush(); // do not flush if output buffering enabled - useless - thx to Jesse Mullan + + } + + function Time() + { + $rs = $this->_Execute("select $this->sysTimeStamp"); + if ($rs && !$rs->EOF) return $this->UnixTimeStamp(reset($rs->fields)); + + return false; + } + + /** + * Connect to database + * + * @param [argHostname] Host to connect to + * @param [argUsername] Userid to login + * @param [argPassword] Associated password + * @param [argDatabaseName] database + * @param [forceNew] force new connection + * + * @return true or false + */ + function Connect($argHostname = "", $argUsername = "", $argPassword = "", $argDatabaseName = "", $forceNew = false) + { + if ($argHostname != "") $this->host = $argHostname; + if ($argUsername != "") $this->user = $argUsername; + if ($argPassword != "") $this->password = 'not stored'; // not stored for security reasons + if ($argDatabaseName != "") $this->database = $argDatabaseName; + + $this->_isPersistentConnection = false; + + if ($forceNew) { + if ($rez=$this->_nconnect($this->host, $this->user, $argPassword, $this->database)) return true; + } else { + if ($rez=$this->_connect($this->host, $this->user, $argPassword, $this->database)) return true; + } + if (isset($rez)) { + $err = $this->ErrorMsg(); + if (empty($err)) $err = "Connection error to server '$argHostname' with user '$argUsername'"; + $ret = false; + } else { + $err = "Missing extension for ".$this->dataProvider; + $ret = 0; + } + if ($fn = $this->raiseErrorFn) + $fn($this->databaseType,'CONNECT',$this->ErrorNo(),$err,$this->host,$this->database,$this); + + + $this->_connectionID = false; + if ($this->debug) ADOConnection::outp( $this->host.': '.$err); + return $ret; + } + + function _nconnect($argHostname, $argUsername, $argPassword, $argDatabaseName) + { + return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabaseName); + } + + + /** + * Always force a new connection to database - currently only works with oracle + * + * @param [argHostname] Host to connect to + * @param [argUsername] Userid to login + * @param [argPassword] Associated password + * @param [argDatabaseName] database + * + * @return true or false + */ + function NConnect($argHostname = "", $argUsername = "", $argPassword = "", $argDatabaseName = "") + { + return $this->Connect($argHostname, $argUsername, $argPassword, $argDatabaseName, true); + } + + /** + * Establish persistent connect to database + * + * @param [argHostname] Host to connect to + * @param [argUsername] Userid to login + * @param [argPassword] Associated password + * @param [argDatabaseName] database + * + * @return return true or false + */ + function PConnect($argHostname = "", $argUsername = "", $argPassword = "", $argDatabaseName = "") + { + + if (defined('ADODB_NEVER_PERSIST')) + return $this->Connect($argHostname,$argUsername,$argPassword,$argDatabaseName); + + if ($argHostname != "") $this->host = $argHostname; + if ($argUsername != "") $this->user = $argUsername; + if ($argPassword != "") $this->password = 'not stored'; + if ($argDatabaseName != "") $this->database = $argDatabaseName; + + $this->_isPersistentConnection = true; + + if ($rez = $this->_pconnect($this->host, $this->user, $argPassword, $this->database)) return true; + if (isset($rez)) { + $err = $this->ErrorMsg(); + if (empty($err)) $err = "Connection error to server '$argHostname' with user '$argUsername'"; + $ret = false; + } else { + $err = "Missing extension for ".$this->dataProvider; + $ret = 0; + } + if ($fn = $this->raiseErrorFn) { + $fn($this->databaseType,'PCONNECT',$this->ErrorNo(),$err,$this->host,$this->database,$this); + } + + $this->_connectionID = false; + if ($this->debug) ADOConnection::outp( $this->host.': '.$err); + return $ret; + } + + function outp_throw($msg,$src='WARN',$sql='') + { + if (defined('ADODB_ERROR_HANDLER') && ADODB_ERROR_HANDLER == 'adodb_throw') { + adodb_throw($this->databaseType,$src,-9999,$msg,$sql,false,$this); + return; + } + ADOConnection::outp($msg); + } + + // create cache class. Code is backward compat with old memcache implementation + function _CreateCache() + { + global $ADODB_CACHE, $ADODB_CACHE_CLASS; + + if ($this->memCache) { + global $ADODB_INCLUDED_MEMCACHE; + + if (empty($ADODB_INCLUDED_MEMCACHE)) include(ADODB_DIR.'/adodb-memcache.lib.inc.php'); + $ADODB_CACHE = new ADODB_Cache_MemCache($this); + } else + $ADODB_CACHE = new $ADODB_CACHE_CLASS($this); + + } + + // Format date column in sql string given an input format that understands Y M D + function SQLDate($fmt, $col=false) + { + if (!$col) $col = $this->sysDate; + return $col; // child class implement + } + + /** + * Should prepare the sql statement and return the stmt resource. + * For databases that do not support this, we return the $sql. To ensure + * compatibility with databases that do not support prepare: + * + * $stmt = $db->Prepare("insert into table (id, name) values (?,?)"); + * $db->Execute($stmt,array(1,'Jill')) or die('insert failed'); + * $db->Execute($stmt,array(2,'Joe')) or die('insert failed'); + * + * @param sql SQL to send to database + * + * @return return FALSE, or the prepared statement, or the original sql if + * if the database does not support prepare. + * + */ + function Prepare($sql) + { + return $sql; + } + + /** + * Some databases, eg. mssql require a different function for preparing + * stored procedures. So we cannot use Prepare(). + * + * Should prepare the stored procedure and return the stmt resource. + * For databases that do not support this, we return the $sql. To ensure + * compatibility with databases that do not support prepare: + * + * @param sql SQL to send to database + * + * @return return FALSE, or the prepared statement, or the original sql if + * if the database does not support prepare. + * + */ + function PrepareSP($sql,$param=true) + { + return $this->Prepare($sql,$param); + } + + /** + * PEAR DB Compat + */ + function Quote($s) + { + return $this->qstr($s,false); + } + + /** + Requested by "Karsten Dambekalns" + */ + function QMagic($s) + { + return $this->qstr($s,get_magic_quotes_gpc()); + } + + function q(&$s) + { + #if (!empty($this->qNull)) if ($s == 'null') return $s; + $s = $this->qstr($s,false); + } + + /** + * PEAR DB Compat - do not use internally. + */ + function ErrorNative() + { + return $this->ErrorNo(); + } + + + /** + * PEAR DB Compat - do not use internally. + */ + function nextId($seq_name) + { + return $this->GenID($seq_name); + } + + /** + * Lock a row, will escalate and lock the table if row locking not supported + * will normally free the lock at the end of the transaction + * + * @param $table name of table to lock + * @param $where where clause to use, eg: "WHERE row=12". If left empty, will escalate to table lock + */ + function RowLock($table,$where,$col='1 as adodbignore') + { + return false; + } + + function CommitLock($table) + { + return $this->CommitTrans(); + } + + function RollbackLock($table) + { + return $this->RollbackTrans(); + } + + /** + * PEAR DB Compat - do not use internally. + * + * The fetch modes for NUMERIC and ASSOC for PEAR DB and ADODB are identical + * for easy porting :-) + * + * @param mode The fetchmode ADODB_FETCH_ASSOC or ADODB_FETCH_NUM + * @returns The previous fetch mode + */ + function SetFetchMode($mode) + { + $old = $this->fetchMode; + $this->fetchMode = $mode; + + if ($old === false) { + global $ADODB_FETCH_MODE; + return $ADODB_FETCH_MODE; + } + return $old; + } + + + /** + * PEAR DB Compat - do not use internally. + */ + function Query($sql, $inputarr=false) + { + $rs = $this->Execute($sql, $inputarr); + if (!$rs && defined('ADODB_PEAR')) return ADODB_PEAR_Error(); + return $rs; + } + + + /** + * PEAR DB Compat - do not use internally + */ + function LimitQuery($sql, $offset, $count, $params=false) + { + $rs = $this->SelectLimit($sql, $count, $offset, $params); + if (!$rs && defined('ADODB_PEAR')) return ADODB_PEAR_Error(); + return $rs; + } + + + /** + * PEAR DB Compat - do not use internally + */ + function Disconnect() + { + return $this->Close(); + } + + /* + Returns placeholder for parameter, eg. + $DB->Param('a') + + will return ':a' for Oracle, and '?' for most other databases... + + For databases that require positioned params, eg $1, $2, $3 for postgresql, + pass in Param(false) before setting the first parameter. + */ + function Param($name,$type='C') + { + return '?'; + } + + /* + InParameter and OutParameter are self-documenting versions of Parameter(). + */ + function InParameter(&$stmt,&$var,$name,$maxLen=4000,$type=false) + { + return $this->Parameter($stmt,$var,$name,false,$maxLen,$type); + } + + /* + */ + function OutParameter(&$stmt,&$var,$name,$maxLen=4000,$type=false) + { + return $this->Parameter($stmt,$var,$name,true,$maxLen,$type); + + } + + + /* + Usage in oracle + $stmt = $db->Prepare('select * from table where id =:myid and group=:group'); + $db->Parameter($stmt,$id,'myid'); + $db->Parameter($stmt,$group,'group',64); + $db->Execute(); + + @param $stmt Statement returned by Prepare() or PrepareSP(). + @param $var PHP variable to bind to + @param $name Name of stored procedure variable name to bind to. + @param [$isOutput] Indicates direction of parameter 0/false=IN 1=OUT 2= IN/OUT. This is ignored in oci8. + @param [$maxLen] Holds an maximum length of the variable. + @param [$type] The data type of $var. Legal values depend on driver. + + */ + function Parameter(&$stmt,&$var,$name,$isOutput=false,$maxLen=4000,$type=false) + { + return false; + } + + + function IgnoreErrors($saveErrs=false) + { + if (!$saveErrs) { + $saveErrs = array($this->raiseErrorFn,$this->_transOK); + $this->raiseErrorFn = false; + return $saveErrs; + } else { + $this->raiseErrorFn = $saveErrs[0]; + $this->_transOK = $saveErrs[1]; + } + } + + /** + Improved method of initiating a transaction. Used together with CompleteTrans(). + Advantages include: + + a. StartTrans/CompleteTrans is nestable, unlike BeginTrans/CommitTrans/RollbackTrans. + Only the outermost block is treated as a transaction.
+ b. CompleteTrans auto-detects SQL errors, and will rollback on errors, commit otherwise.
+ c. All BeginTrans/CommitTrans/RollbackTrans inside a StartTrans/CompleteTrans block + are disabled, making it backward compatible. + */ + function StartTrans($errfn = 'ADODB_TransMonitor') + { + if ($this->transOff > 0) { + $this->transOff += 1; + return true; + } + + $this->_oldRaiseFn = $this->raiseErrorFn; + $this->raiseErrorFn = $errfn; + $this->_transOK = true; + + if ($this->debug && $this->transCnt > 0) ADOConnection::outp("Bad Transaction: StartTrans called within BeginTrans"); + $ok = $this->BeginTrans(); + $this->transOff = 1; + return $ok; + } + + + /** + Used together with StartTrans() to end a transaction. Monitors connection + for sql errors, and will commit or rollback as appropriate. + + @autoComplete if true, monitor sql errors and commit and rollback as appropriate, + and if set to false force rollback even if no SQL error detected. + @returns true on commit, false on rollback. + */ + function CompleteTrans($autoComplete = true) + { + if ($this->transOff > 1) { + $this->transOff -= 1; + return true; + } + $this->raiseErrorFn = $this->_oldRaiseFn; + + $this->transOff = 0; + if ($this->_transOK && $autoComplete) { + if (!$this->CommitTrans()) { + $this->_transOK = false; + if ($this->debug) ADOConnection::outp("Smart Commit failed"); + } else + if ($this->debug) ADOConnection::outp("Smart Commit occurred"); + } else { + $this->_transOK = false; + $this->RollbackTrans(); + if ($this->debug) ADOCOnnection::outp("Smart Rollback occurred"); + } + + return $this->_transOK; + } + + /* + At the end of a StartTrans/CompleteTrans block, perform a rollback. + */ + function FailTrans() + { + if ($this->debug) + if ($this->transOff == 0) { + ADOConnection::outp("FailTrans outside StartTrans/CompleteTrans"); + } else { + ADOConnection::outp("FailTrans was called"); + adodb_backtrace(); + } + $this->_transOK = false; + } + + /** + Check if transaction has failed, only for Smart Transactions. + */ + function HasFailedTrans() + { + if ($this->transOff > 0) return $this->_transOK == false; + return false; + } + + /** + * Execute SQL + * + * @param sql SQL statement to execute, or possibly an array holding prepared statement ($sql[0] will hold sql text) + * @param [inputarr] holds the input data to bind to. Null elements will be set to null. + * @return RecordSet or false + */ + function Execute($sql,$inputarr=false) + { + if ($this->fnExecute) { + $fn = $this->fnExecute; + $ret = $fn($this,$sql,$inputarr); + if (isset($ret)) return $ret; + } + if ($inputarr) { + if (!is_array($inputarr)) $inputarr = array($inputarr); + + $element0 = reset($inputarr); + # is_object check because oci8 descriptors can be passed in + $array_2d = $this->bulkBind && is_array($element0) && !is_object(reset($element0)); + //remove extra memory copy of input -mikefedyk + unset($element0); + + if (!is_array($sql) && !$this->_bindInputArray) { + $sqlarr = explode('?',$sql); + $nparams = sizeof($sqlarr)-1; + if (!$array_2d) $inputarr = array($inputarr); + foreach($inputarr as $arr) { + $sql = ''; $i = 0; + //Use each() instead of foreach to reduce memory usage -mikefedyk + while(list(, $v) = each($arr)) { + $sql .= $sqlarr[$i]; + // from Ron Baldwin + // Only quote string types + $typ = gettype($v); + if ($typ == 'string') + //New memory copy of input created here -mikefedyk + $sql .= $this->qstr($v); + else if ($typ == 'double') + $sql .= str_replace(',','.',$v); // locales fix so 1.1 does not get converted to 1,1 + else if ($typ == 'boolean') + $sql .= $v ? $this->true : $this->false; + else if ($typ == 'object') { + if (method_exists($v, '__toString')) $sql .= $this->qstr($v->__toString()); + else $sql .= $this->qstr((string) $v); + } else if ($v === null) + $sql .= 'NULL'; + else + $sql .= $v; + $i += 1; + + if ($i == $nparams) break; + } // while + if (isset($sqlarr[$i])) { + $sql .= $sqlarr[$i]; + if ($i+1 != sizeof($sqlarr)) $this->outp_throw( "Input Array does not match ?: ".htmlspecialchars($sql),'Execute'); + } else if ($i != sizeof($sqlarr)) + $this->outp_throw( "Input array does not match ?: ".htmlspecialchars($sql),'Execute'); + + $ret = $this->_Execute($sql); + if (!$ret) return $ret; + } + } else { + if ($array_2d) { + if (is_string($sql)) + $stmt = $this->Prepare($sql); + else + $stmt = $sql; + + foreach($inputarr as $arr) { + $ret = $this->_Execute($stmt,$arr); + if (!$ret) return $ret; + } + } else { + $ret = $this->_Execute($sql,$inputarr); + } + } + } else { + $ret = $this->_Execute($sql,false); + } + + return $ret; + } + + + function _Execute($sql,$inputarr=false) + { + if ($this->debug) { + global $ADODB_INCLUDED_LIB; + if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); + $this->_queryID = _adodb_debug_execute($this, $sql,$inputarr); + } else { + $this->_queryID = @$this->_query($sql,$inputarr); + } + + /************************ + // OK, query executed + *************************/ + + if ($this->_queryID === false) { // error handling if query fails + if ($this->debug == 99) adodb_backtrace(true,5); + $fn = $this->raiseErrorFn; + if ($fn) { + $fn($this->databaseType,'EXECUTE',$this->ErrorNo(),$this->ErrorMsg(),$sql,$inputarr,$this); + } + $false = false; + return $false; + } + + if ($this->_queryID === true) { // return simplified recordset for inserts/updates/deletes with lower overhead + $rsclass = $this->rsPrefix.'empty'; + $rs = (class_exists($rsclass)) ? new $rsclass(): new ADORecordSet_empty(); + + return $rs; + } + + // return real recordset from select statement + $rsclass = $this->rsPrefix.$this->databaseType; + $rs = new $rsclass($this->_queryID,$this->fetchMode); + $rs->connection = $this; // Pablo suggestion + $rs->Init(); + if (is_array($sql)) $rs->sql = $sql[0]; + else $rs->sql = $sql; + if ($rs->_numOfRows <= 0) { + global $ADODB_COUNTRECS; + if ($ADODB_COUNTRECS) { + if (!$rs->EOF) { + $rs = $this->_rs2rs($rs,-1,-1,!is_array($sql)); + $rs->_queryID = $this->_queryID; + } else + $rs->_numOfRows = 0; + } + } + return $rs; + } + + function CreateSequence($seqname='adodbseq',$startID=1) + { + if (empty($this->_genSeqSQL)) return false; + return $this->Execute(sprintf($this->_genSeqSQL,$seqname,$startID)); + } + + function DropSequence($seqname='adodbseq') + { + if (empty($this->_dropSeqSQL)) return false; + return $this->Execute(sprintf($this->_dropSeqSQL,$seqname)); + } + + /** + * Generates a sequence id and stores it in $this->genID; + * GenID is only available if $this->hasGenID = true; + * + * @param seqname name of sequence to use + * @param startID if sequence does not exist, start at this ID + * @return 0 if not supported, otherwise a sequence id + */ + function GenID($seqname='adodbseq',$startID=1) + { + if (!$this->hasGenID) { + return 0; // formerly returns false pre 1.60 + } + + $getnext = sprintf($this->_genIDSQL,$seqname); + + $holdtransOK = $this->_transOK; + + $save_handler = $this->raiseErrorFn; + $this->raiseErrorFn = ''; + @($rs = $this->Execute($getnext)); + $this->raiseErrorFn = $save_handler; + + if (!$rs) { + $this->_transOK = $holdtransOK; //if the status was ok before reset + $createseq = $this->Execute(sprintf($this->_genSeqSQL,$seqname,$startID)); + $rs = $this->Execute($getnext); + } + if ($rs && !$rs->EOF) $this->genID = reset($rs->fields); + else $this->genID = 0; // false + + if ($rs) $rs->Close(); + + return $this->genID; + } + + /** + * @param $table string name of the table, not needed by all databases (eg. mysql), default '' + * @param $column string name of the column, not needed by all databases (eg. mysql), default '' + * @return the last inserted ID. Not all databases support this. + */ + function Insert_ID($table='',$column='') + { + if ($this->_logsql && $this->lastInsID) return $this->lastInsID; + if ($this->hasInsertID) return $this->_insertid($table,$column); + if ($this->debug) { + ADOConnection::outp( '

Insert_ID error

'); + adodb_backtrace(); + } + return false; + } + + + /** + * Portable Insert ID. Pablo Roca + * + * @return the last inserted ID. All databases support this. But aware possible + * problems in multiuser environments. Heavy test this before deploying. + */ + function PO_Insert_ID($table="", $id="") + { + if ($this->hasInsertID){ + return $this->Insert_ID($table,$id); + } else { + return $this->GetOne("SELECT MAX($id) FROM $table"); + } + } + + /** + * @return # rows affected by UPDATE/DELETE + */ + function Affected_Rows() + { + if ($this->hasAffectedRows) { + if ($this->fnExecute === 'adodb_log_sql') { + if ($this->_logsql && $this->_affected !== false) return $this->_affected; + } + $val = $this->_affectedrows(); + return ($val < 0) ? false : $val; + } + + if ($this->debug) ADOConnection::outp( '

Affected_Rows error

',false); + return false; + } + + + /** + * @return the last error message + */ + function ErrorMsg() + { + if ($this->_errorMsg) return '!! '.strtoupper($this->dataProvider.' '.$this->databaseType).': '.$this->_errorMsg; + else return ''; + } + + + /** + * @return the last error number. Normally 0 means no error. + */ + function ErrorNo() + { + return ($this->_errorMsg) ? -1 : 0; + } + + function MetaError($err=false) + { + include_once(ADODB_DIR."/adodb-error.inc.php"); + if ($err === false) $err = $this->ErrorNo(); + return adodb_error($this->dataProvider,$this->databaseType,$err); + } + + function MetaErrorMsg($errno) + { + include_once(ADODB_DIR."/adodb-error.inc.php"); + return adodb_errormsg($errno); + } + + /** + * @returns an array with the primary key columns in it. + */ + function MetaPrimaryKeys($table, $owner=false) + { + // owner not used in base class - see oci8 + $p = array(); + $objs = $this->MetaColumns($table); + if ($objs) { + foreach($objs as $v) { + if (!empty($v->primary_key)) + $p[] = $v->name; + } + } + if (sizeof($p)) return $p; + if (function_exists('ADODB_VIEW_PRIMARYKEYS')) + return ADODB_VIEW_PRIMARYKEYS($this->databaseType, $this->database, $table, $owner); + return false; + } + + /** + * @returns assoc array where keys are tables, and values are foreign keys + */ + function MetaForeignKeys($table, $owner=false, $upper=false) + { + return false; + } + /** + * Choose a database to connect to. Many databases do not support this. + * + * @param dbName is the name of the database to select + * @return true or false + */ + function SelectDB($dbName) + {return false;} + + + /** + * Will select, getting rows from $offset (1-based), for $nrows. + * This simulates the MySQL "select * from table limit $offset,$nrows" , and + * the PostgreSQL "select * from table limit $nrows offset $offset". Note that + * MySQL and PostgreSQL parameter ordering is the opposite of the other. + * eg. + * SelectLimit('select * from table',3); will return rows 1 to 3 (1-based) + * SelectLimit('select * from table',3,2); will return rows 3 to 5 (1-based) + * + * Uses SELECT TOP for Microsoft databases (when $this->hasTop is set) + * BUG: Currently SelectLimit fails with $sql with LIMIT or TOP clause already set + * + * @param sql + * @param [offset] is the row to start calculations from (1-based) + * @param [nrows] is the number of rows to get + * @param [inputarr] array of bind variables + * @param [secs2cache] is a private parameter only used by jlim + * @return the recordset ($rs->databaseType == 'array') + */ + function SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0) + { + if ($this->hasTop && $nrows > 0) { + // suggested by Reinhard Balling. Access requires top after distinct + // Informix requires first before distinct - F Riosa + $ismssql = (strpos($this->databaseType,'mssql') !== false); + if ($ismssql) $isaccess = false; + else $isaccess = (strpos($this->databaseType,'access') !== false); + + if ($offset <= 0) { + + // access includes ties in result + if ($isaccess) { + $sql = preg_replace( + '/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop.' '.((integer)$nrows).' ',$sql); + + if ($secs2cache != 0) { + $ret = $this->CacheExecute($secs2cache, $sql,$inputarr); + } else { + $ret = $this->Execute($sql,$inputarr); + } + return $ret; // PHP5 fix + } else if ($ismssql){ + $sql = preg_replace( + '/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop.' '.((integer)$nrows).' ',$sql); + } else { + $sql = preg_replace( + '/(^\s*select\s)/i','\\1 '.$this->hasTop.' '.((integer)$nrows).' ',$sql); + } + } else { + $nn = $nrows + $offset; + if ($isaccess || $ismssql) { + $sql = preg_replace( + '/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop.' '.$nn.' ',$sql); + } else { + $sql = preg_replace( + '/(^\s*select\s)/i','\\1 '.$this->hasTop.' '.$nn.' ',$sql); + } + } + } + + // if $offset>0, we want to skip rows, and $ADODB_COUNTRECS is set, we buffer rows + // 0 to offset-1 which will be discarded anyway. So we disable $ADODB_COUNTRECS. + global $ADODB_COUNTRECS; + + $savec = $ADODB_COUNTRECS; + $ADODB_COUNTRECS = false; + + + if ($secs2cache != 0) $rs = $this->CacheExecute($secs2cache,$sql,$inputarr); + else $rs = $this->Execute($sql,$inputarr); + + $ADODB_COUNTRECS = $savec; + if ($rs && !$rs->EOF) { + $rs = $this->_rs2rs($rs,$nrows,$offset); + } + //print_r($rs); + return $rs; + } + + /** + * Create serializable recordset. Breaks rs link to connection. + * + * @param rs the recordset to serialize + */ + function SerializableRS(&$rs) + { + $rs2 = $this->_rs2rs($rs); + $ignore = false; + $rs2->connection = $ignore; + + return $rs2; + } + + /** + * Convert database recordset to an array recordset + * input recordset's cursor should be at beginning, and + * old $rs will be closed. + * + * @param rs the recordset to copy + * @param [nrows] number of rows to retrieve (optional) + * @param [offset] offset by number of rows (optional) + * @return the new recordset + */ + function &_rs2rs(&$rs,$nrows=-1,$offset=-1,$close=true) + { + if (! $rs) { + $false = false; + return $false; + } + $dbtype = $rs->databaseType; + if (!$dbtype) { + $rs = $rs; // required to prevent crashing in 4.2.1, but does not happen in 4.3.1 -- why ? + return $rs; + } + if (($dbtype == 'array' || $dbtype == 'csv') && $nrows == -1 && $offset == -1) { + $rs->MoveFirst(); + $rs = $rs; // required to prevent crashing in 4.2.1, but does not happen in 4.3.1-- why ? + return $rs; + } + $flds = array(); + for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++) { + $flds[] = $rs->FetchField($i); + } + + $arr = $rs->GetArrayLimit($nrows,$offset); + //print_r($arr); + if ($close) $rs->Close(); + + $arrayClass = $this->arrayClass; + + $rs2 = new $arrayClass(); + $rs2->connection = $this; + $rs2->sql = $rs->sql; + $rs2->dataProvider = $this->dataProvider; + $rs2->InitArrayFields($arr,$flds); + $rs2->fetchMode = isset($rs->adodbFetchMode) ? $rs->adodbFetchMode : $rs->fetchMode; + return $rs2; + } + + /* + * Return all rows. Compat with PEAR DB + */ + function GetAll($sql, $inputarr=false) + { + $arr = $this->GetArray($sql,$inputarr); + return $arr; + } + + function GetAssoc($sql, $inputarr=false,$force_array = false, $first2cols = false) + { + $rs = $this->Execute($sql, $inputarr); + if (!$rs) { + $false = false; + return $false; + } + $arr = $rs->GetAssoc($force_array,$first2cols); + return $arr; + } + + function CacheGetAssoc($secs2cache, $sql=false, $inputarr=false,$force_array = false, $first2cols = false) + { + if (!is_numeric($secs2cache)) { + $first2cols = $force_array; + $force_array = $inputarr; + } + $rs = $this->CacheExecute($secs2cache, $sql, $inputarr); + if (!$rs) { + $false = false; + return $false; + } + $arr = $rs->GetAssoc($force_array,$first2cols); + return $arr; + } + + /** + * Return first element of first row of sql statement. Recordset is disposed + * for you. + * + * @param sql SQL statement + * @param [inputarr] input bind array + */ + function GetOne($sql,$inputarr=false) + { + global $ADODB_COUNTRECS,$ADODB_GETONE_EOF; + $crecs = $ADODB_COUNTRECS; + $ADODB_COUNTRECS = false; + + $ret = false; + $rs = $this->Execute($sql,$inputarr); + if ($rs) { + if ($rs->EOF) $ret = $ADODB_GETONE_EOF; + else $ret = reset($rs->fields); + + $rs->Close(); + } + $ADODB_COUNTRECS = $crecs; + return $ret; + } + + // $where should include 'WHERE fld=value' + function GetMedian($table, $field,$where = '') + { + $total = $this->GetOne("select count(*) from $table $where"); + if (!$total) return false; + + $midrow = (integer) ($total/2); + $rs = $this->SelectLimit("select $field from $table $where order by 1",1,$midrow); + if ($rs && !$rs->EOF) return reset($rs->fields); + return false; + } + + + function CacheGetOne($secs2cache,$sql=false,$inputarr=false) + { + global $ADODB_GETONE_EOF; + $ret = false; + $rs = $this->CacheExecute($secs2cache,$sql,$inputarr); + if ($rs) { + if ($rs->EOF) $ret = $ADODB_GETONE_EOF; + else $ret = reset($rs->fields); + $rs->Close(); + } + + return $ret; + } + + function GetCol($sql, $inputarr = false, $trim = false) + { + + $rs = $this->Execute($sql, $inputarr); + if ($rs) { + $rv = array(); + if ($trim) { + while (!$rs->EOF) { + $rv[] = trim(reset($rs->fields)); + $rs->MoveNext(); + } + } else { + while (!$rs->EOF) { + $rv[] = reset($rs->fields); + $rs->MoveNext(); + } + } + $rs->Close(); + } else + $rv = false; + return $rv; + } + + function CacheGetCol($secs, $sql = false, $inputarr = false,$trim=false) + { + $rs = $this->CacheExecute($secs, $sql, $inputarr); + if ($rs) { + $rv = array(); + if ($trim) { + while (!$rs->EOF) { + $rv[] = trim(reset($rs->fields)); + $rs->MoveNext(); + } + } else { + while (!$rs->EOF) { + $rv[] = reset($rs->fields); + $rs->MoveNext(); + } + } + $rs->Close(); + } else + $rv = false; + + return $rv; + } + + function Transpose(&$rs,$addfieldnames=true) + { + $rs2 = $this->_rs2rs($rs); + $false = false; + if (!$rs2) return $false; + + $rs2->_transpose($addfieldnames); + return $rs2; + } + + /* + Calculate the offset of a date for a particular database and generate + appropriate SQL. Useful for calculating future/past dates and storing + in a database. + + If dayFraction=1.5 means 1.5 days from now, 1.0/24 for 1 hour. + */ + function OffsetDate($dayFraction,$date=false) + { + if (!$date) $date = $this->sysDate; + return '('.$date.'+'.$dayFraction.')'; + } + + + /** + * + * @param sql SQL statement + * @param [inputarr] input bind array + */ + function GetArray($sql,$inputarr=false) + { + global $ADODB_COUNTRECS; + + $savec = $ADODB_COUNTRECS; + $ADODB_COUNTRECS = false; + $rs = $this->Execute($sql,$inputarr); + $ADODB_COUNTRECS = $savec; + if (!$rs) + if (defined('ADODB_PEAR')) { + $cls = ADODB_PEAR_Error(); + return $cls; + } else { + $false = false; + return $false; + } + $arr = $rs->GetArray(); + $rs->Close(); + return $arr; + } + + function CacheGetAll($secs2cache,$sql=false,$inputarr=false) + { + $arr = $this->CacheGetArray($secs2cache,$sql,$inputarr); + return $arr; + } + + function CacheGetArray($secs2cache,$sql=false,$inputarr=false) + { + global $ADODB_COUNTRECS; + + $savec = $ADODB_COUNTRECS; + $ADODB_COUNTRECS = false; + $rs = $this->CacheExecute($secs2cache,$sql,$inputarr); + $ADODB_COUNTRECS = $savec; + + if (!$rs) + if (defined('ADODB_PEAR')) { + $cls = ADODB_PEAR_Error(); + return $cls; + } else { + $false = false; + return $false; + } + $arr = $rs->GetArray(); + $rs->Close(); + return $arr; + } + + function GetRandRow($sql, $arr= false) + { + $rezarr = $this->GetAll($sql, $arr); + $sz = sizeof($rezarr); + return $rezarr[abs(rand()) % $sz]; + } + + /** + * Return one row of sql statement. Recordset is disposed for you. + * + * @param sql SQL statement + * @param [inputarr] input bind array + */ + function GetRow($sql,$inputarr=false) + { + global $ADODB_COUNTRECS; + $crecs = $ADODB_COUNTRECS; + $ADODB_COUNTRECS = false; + + $rs = $this->Execute($sql,$inputarr); + + $ADODB_COUNTRECS = $crecs; + if ($rs) { + if (!$rs->EOF) $arr = $rs->fields; + else $arr = array(); + $rs->Close(); + return $arr; + } + + $false = false; + return $false; + } + + function CacheGetRow($secs2cache,$sql=false,$inputarr=false) + { + $rs = $this->CacheExecute($secs2cache,$sql,$inputarr); + if ($rs) { + if (!$rs->EOF) $arr = $rs->fields; + else $arr = array(); + + $rs->Close(); + return $arr; + } + $false = false; + return $false; + } + + /** + * Insert or replace a single record. Note: this is not the same as MySQL's replace. + * ADOdb's Replace() uses update-insert semantics, not insert-delete-duplicates of MySQL. + * Also note that no table locking is done currently, so it is possible that the + * record be inserted twice by two programs... + * + * $this->Replace('products', array('prodname' =>"'Nails'","price" => 3.99), 'prodname'); + * + * $table table name + * $fieldArray associative array of data (you must quote strings yourself). + * $keyCol the primary key field name or if compound key, array of field names + * autoQuote set to true to use a hueristic to quote strings. Works with nulls and numbers + * but does not work with dates nor SQL functions. + * has_autoinc the primary key is an auto-inc field, so skip in insert. + * + * Currently blob replace not supported + * + * returns 0 = fail, 1 = update, 2 = insert + */ + + function Replace($table, $fieldArray, $keyCol, $autoQuote=false, $has_autoinc=false) + { + global $ADODB_INCLUDED_LIB; + if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); + + return _adodb_replace($this, $table, $fieldArray, $keyCol, $autoQuote, $has_autoinc); + } + + + /** + * Will select, getting rows from $offset (1-based), for $nrows. + * This simulates the MySQL "select * from table limit $offset,$nrows" , and + * the PostgreSQL "select * from table limit $nrows offset $offset". Note that + * MySQL and PostgreSQL parameter ordering is the opposite of the other. + * eg. + * CacheSelectLimit(15,'select * from table',3); will return rows 1 to 3 (1-based) + * CacheSelectLimit(15,'select * from table',3,2); will return rows 3 to 5 (1-based) + * + * BUG: Currently CacheSelectLimit fails with $sql with LIMIT or TOP clause already set + * + * @param [secs2cache] seconds to cache data, set to 0 to force query. This is optional + * @param sql + * @param [offset] is the row to start calculations from (1-based) + * @param [nrows] is the number of rows to get + * @param [inputarr] array of bind variables + * @return the recordset ($rs->databaseType == 'array') + */ + function CacheSelectLimit($secs2cache,$sql,$nrows=-1,$offset=-1,$inputarr=false) + { + if (!is_numeric($secs2cache)) { + if ($sql === false) $sql = -1; + if ($offset == -1) $offset = false; + // sql, nrows, offset,inputarr + $rs = $this->SelectLimit($secs2cache,$sql,$nrows,$offset,$this->cacheSecs); + } else { + if ($sql === false) $this->outp_throw("Warning: \$sql missing from CacheSelectLimit()",'CacheSelectLimit'); + $rs = $this->SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache); + } + return $rs; + } + + + /** + * Flush cached recordsets that match a particular $sql statement. + * If $sql == false, then we purge all files in the cache. + */ + + /** + * Flush cached recordsets that match a particular $sql statement. + * If $sql == false, then we purge all files in the cache. + */ + function CacheFlush($sql=false,$inputarr=false) + { + global $ADODB_CACHE_DIR, $ADODB_CACHE; + + if (empty($ADODB_CACHE)) return false; + + if (!$sql) { + $ADODB_CACHE->flushall($this->debug); + return; + } + + $f = $this->_gencachename($sql.serialize($inputarr),false); + return $ADODB_CACHE->flushcache($f, $this->debug); + } + + + /** + * Private function to generate filename for caching. + * Filename is generated based on: + * + * - sql statement + * - database type (oci8, ibase, ifx, etc) + * - database name + * - userid + * - setFetchMode (adodb 4.23) + * + * When not in safe mode, we create 256 sub-directories in the cache directory ($ADODB_CACHE_DIR). + * Assuming that we can have 50,000 files per directory with good performance, + * then we can scale to 12.8 million unique cached recordsets. Wow! + */ + function _gencachename($sql,$createdir) + { + global $ADODB_CACHE, $ADODB_CACHE_DIR; + + if ($this->fetchMode === false) { + global $ADODB_FETCH_MODE; + $mode = $ADODB_FETCH_MODE; + } else { + $mode = $this->fetchMode; + } + $m = md5($sql.$this->databaseType.$this->database.$this->user.$mode); + if (!$ADODB_CACHE->createdir) return $m; + if (!$createdir) $dir = $ADODB_CACHE->getdirname($m); + else $dir = $ADODB_CACHE->createdir($m, $this->debug); + + return $dir.'/adodb_'.$m.'.cache'; + } + + + /** + * Execute SQL, caching recordsets. + * + * @param [secs2cache] seconds to cache data, set to 0 to force query. + * This is an optional parameter. + * @param sql SQL statement to execute + * @param [inputarr] holds the input data to bind to + * @return RecordSet or false + */ + function CacheExecute($secs2cache,$sql=false,$inputarr=false) + { + global $ADODB_CACHE; + + if (empty($ADODB_CACHE)) $this->_CreateCache(); + + if (!is_numeric($secs2cache)) { + $inputarr = $sql; + $sql = $secs2cache; + $secs2cache = $this->cacheSecs; + } + + if (is_array($sql)) { + $sqlparam = $sql; + $sql = $sql[0]; + } else + $sqlparam = $sql; + + + $md5file = $this->_gencachename($sql.serialize($inputarr),true); + $err = ''; + + if ($secs2cache > 0){ + $rs = $ADODB_CACHE->readcache($md5file,$err,$secs2cache,$this->arrayClass); + $this->numCacheHits += 1; + } else { + $err='Timeout 1'; + $rs = false; + $this->numCacheMisses += 1; + } + + if (!$rs) { + // no cached rs found + if ($this->debug) { + if (get_magic_quotes_runtime() && !$this->memCache) { + ADOConnection::outp("Please disable magic_quotes_runtime - it corrupts cache files :("); + } + if ($this->debug !== -1) ADOConnection::outp( " $md5file cache failure: $err (see sql below)"); + } + + $rs = $this->Execute($sqlparam,$inputarr); + + if ($rs) { + + $eof = $rs->EOF; + $rs = $this->_rs2rs($rs); // read entire recordset into memory immediately + $rs->timeCreated = time(); // used by caching + $txt = _rs2serialize($rs,false,$sql); // serialize + + $ok = $ADODB_CACHE->writecache($md5file,$txt,$this->debug, $secs2cache); + if (!$ok) { + if ($ok === false) { + $em = 'Cache write error'; + $en = -32000; + + if ($fn = $this->raiseErrorFn) { + $fn($this->databaseType,'CacheExecute', $en, $em, $md5file,$sql,$this); + } + } else { + $em = 'Cache file locked warning'; + $en = -32001; + // do not call error handling for just a warning + } + + if ($this->debug) ADOConnection::outp( " ".$em); + } + if ($rs->EOF && !$eof) { + $rs->MoveFirst(); + //$rs = csv2rs($md5file,$err); + $rs->connection = $this; // Pablo suggestion + } + + } else if (!$this->memCache) + $ADODB_CACHE->flushcache($md5file); + } else { + $this->_errorMsg = ''; + $this->_errorCode = 0; + + if ($this->fnCacheExecute) { + $fn = $this->fnCacheExecute; + $fn($this, $secs2cache, $sql, $inputarr); + } + // ok, set cached object found + $rs->connection = $this; // Pablo suggestion + if ($this->debug){ + if ($this->debug == 99) adodb_backtrace(); + $inBrowser = isset($_SERVER['HTTP_USER_AGENT']); + $ttl = $rs->timeCreated + $secs2cache - time(); + $s = is_array($sql) ? $sql[0] : $sql; + if ($inBrowser) $s = ''.htmlspecialchars($s).''; + + ADOConnection::outp( " $md5file reloaded, ttl=$ttl [ $s ]"); + } + } + return $rs; + } + + + /* + Similar to PEAR DB's autoExecute(), except that + $mode can be 'INSERT' or 'UPDATE' or DB_AUTOQUERY_INSERT or DB_AUTOQUERY_UPDATE + If $mode == 'UPDATE', then $where is compulsory as a safety measure. + + $forceUpdate means that even if the data has not changed, perform update. + */ + function AutoExecute($table, $fields_values, $mode = 'INSERT', $where = FALSE, $forceUpdate=true, $magicq=false) + { + $false = false; + $sql = 'SELECT * FROM '.$table; + if ($where!==FALSE) $sql .= ' WHERE '.$where; + else if ($mode == 'UPDATE' || $mode == 2 /* DB_AUTOQUERY_UPDATE */) { + $this->outp_throw('AutoExecute: Illegal mode=UPDATE with empty WHERE clause','AutoExecute'); + return $false; + } + + $rs = $this->SelectLimit($sql,1); + if (!$rs) return $false; // table does not exist + $rs->tableName = $table; + $rs->sql = $sql; + + switch((string) $mode) { + case 'UPDATE': + case '2': + $sql = $this->GetUpdateSQL($rs, $fields_values, $forceUpdate, $magicq); + break; + case 'INSERT': + case '1': + $sql = $this->GetInsertSQL($rs, $fields_values, $magicq); + break; + default: + $this->outp_throw("AutoExecute: Unknown mode=$mode",'AutoExecute'); + return $false; + } + $ret = false; + if ($sql) $ret = $this->Execute($sql); + if ($ret) $ret = true; + return $ret; + } + + + /** + * Generates an Update Query based on an existing recordset. + * $arrFields is an associative array of fields with the value + * that should be assigned. + * + * Note: This function should only be used on a recordset + * that is run against a single table and sql should only + * be a simple select stmt with no groupby/orderby/limit + * + * "Jonathan Younger" + */ + function GetUpdateSQL(&$rs, $arrFields,$forceUpdate=false,$magicq=false,$force=null) + { + global $ADODB_INCLUDED_LIB; + + //********************************************************// + //This is here to maintain compatibility + //with older adodb versions. Sets force type to force nulls if $forcenulls is set. + if (!isset($force)) { + global $ADODB_FORCE_TYPE; + $force = $ADODB_FORCE_TYPE; + } + //********************************************************// + + if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); + return _adodb_getupdatesql($this,$rs,$arrFields,$forceUpdate,$magicq,$force); + } + + /** + * Generates an Insert Query based on an existing recordset. + * $arrFields is an associative array of fields with the value + * that should be assigned. + * + * Note: This function should only be used on a recordset + * that is run against a single table. + */ + function GetInsertSQL(&$rs, $arrFields,$magicq=false,$force=null) + { + global $ADODB_INCLUDED_LIB; + if (!isset($force)) { + global $ADODB_FORCE_TYPE; + $force = $ADODB_FORCE_TYPE; + + } + if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); + return _adodb_getinsertsql($this,$rs,$arrFields,$magicq,$force); + } + + + /** + * Update a blob column, given a where clause. There are more sophisticated + * blob handling functions that we could have implemented, but all require + * a very complex API. Instead we have chosen something that is extremely + * simple to understand and use. + * + * Note: $blobtype supports 'BLOB' and 'CLOB', default is BLOB of course. + * + * Usage to update a $blobvalue which has a primary key blob_id=1 into a + * field blobtable.blobcolumn: + * + * UpdateBlob('blobtable', 'blobcolumn', $blobvalue, 'blob_id=1'); + * + * Insert example: + * + * $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); + * $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1'); + */ + + function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') + { + return $this->Execute("UPDATE $table SET $column=? WHERE $where",array($val)) != false; + } + + /** + * Usage: + * UpdateBlob('TABLE', 'COLUMN', '/path/to/file', 'ID=1'); + * + * $blobtype supports 'BLOB' and 'CLOB' + * + * $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); + * $conn->UpdateBlob('blobtable','blobcol',$blobpath,'id=1'); + */ + function UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB') + { + $fd = fopen($path,'rb'); + if ($fd === false) return false; + $val = fread($fd,filesize($path)); + fclose($fd); + return $this->UpdateBlob($table,$column,$val,$where,$blobtype); + } + + function BlobDecode($blob) + { + return $blob; + } + + function BlobEncode($blob) + { + return $blob; + } + + function SetCharSet($charset) + { + return false; + } + + function IfNull( $field, $ifNull ) + { + return " CASE WHEN $field is null THEN $ifNull ELSE $field END "; + } + + function LogSQL($enable=true) + { + include_once(ADODB_DIR.'/adodb-perf.inc.php'); + + if ($enable) $this->fnExecute = 'adodb_log_sql'; + else $this->fnExecute = false; + + $old = $this->_logsql; + $this->_logsql = $enable; + if ($enable && !$old) $this->_affected = false; + return $old; + } + + function GetCharSet() + { + return false; + } + + /** + * Usage: + * UpdateClob('TABLE', 'COLUMN', $var, 'ID=1', 'CLOB'); + * + * $conn->Execute('INSERT INTO clobtable (id, clobcol) VALUES (1, null)'); + * $conn->UpdateClob('clobtable','clobcol',$clob,'id=1'); + */ + function UpdateClob($table,$column,$val,$where) + { + return $this->UpdateBlob($table,$column,$val,$where,'CLOB'); + } + + // not the fastest implementation - quick and dirty - jlim + // for best performance, use the actual $rs->MetaType(). + function MetaType($t,$len=-1,$fieldobj=false) + { + + if (empty($this->_metars)) { + $rsclass = $this->rsPrefix.$this->databaseType; + $this->_metars = new $rsclass(false,$this->fetchMode); + $this->_metars->connection = $this; + } + return $this->_metars->MetaType($t,$len,$fieldobj); + } + + + /** + * Change the SQL connection locale to a specified locale. + * This is used to get the date formats written depending on the client locale. + */ + function SetDateLocale($locale = 'En') + { + $this->locale = $locale; + switch (strtoupper($locale)) + { + case 'EN': + $this->fmtDate="'Y-m-d'"; + $this->fmtTimeStamp = "'Y-m-d H:i:s'"; + break; + + case 'US': + $this->fmtDate = "'m-d-Y'"; + $this->fmtTimeStamp = "'m-d-Y H:i:s'"; + break; + + case 'PT_BR': + case 'NL': + case 'FR': + case 'RO': + case 'IT': + $this->fmtDate="'d-m-Y'"; + $this->fmtTimeStamp = "'d-m-Y H:i:s'"; + break; + + case 'GE': + $this->fmtDate="'d.m.Y'"; + $this->fmtTimeStamp = "'d.m.Y H:i:s'"; + break; + + default: + $this->fmtDate="'Y-m-d'"; + $this->fmtTimeStamp = "'Y-m-d H:i:s'"; + break; + } + } + + /** + * GetActiveRecordsClass Performs an 'ALL' query + * + * @param mixed $class This string represents the class of the current active record + * @param mixed $table Table used by the active record object + * @param mixed $whereOrderBy Where, order, by clauses + * @param mixed $bindarr + * @param mixed $primkeyArr + * @param array $extra Query extras: limit, offset... + * @param mixed $relations Associative array: table's foreign name, "hasMany", "belongsTo" + * @access public + * @return void + */ + function GetActiveRecordsClass( + $class, $table,$whereOrderBy=false,$bindarr=false, $primkeyArr=false, + $extra=array(), + $relations=array()) + { + global $_ADODB_ACTIVE_DBS; + ## reduce overhead of adodb.inc.php -- moved to adodb-active-record.inc.php + ## if adodb-active-recordx is loaded -- should be no issue as they will probably use Find() + if (!isset($_ADODB_ACTIVE_DBS))include_once(ADODB_DIR.'/adodb-active-record.inc.php'); + return adodb_GetActiveRecordsClass($this, $class, $table, $whereOrderBy, $bindarr, $primkeyArr, $extra, $relations); + } + + function GetActiveRecords($table,$where=false,$bindarr=false,$primkeyArr=false) + { + $arr = $this->GetActiveRecordsClass('ADODB_Active_Record', $table, $where, $bindarr, $primkeyArr); + return $arr; + } + + /** + * Close Connection + */ + function Close() + { + $rez = $this->_close(); + $this->_connectionID = false; + return $rez; + } + + /** + * Begin a Transaction. Must be followed by CommitTrans() or RollbackTrans(). + * + * @return true if succeeded or false if database does not support transactions + */ + function BeginTrans() + { + if ($this->debug) ADOConnection::outp("BeginTrans: Transactions not supported for this driver"); + return false; + } + + /* set transaction mode */ + function SetTransactionMode( $transaction_mode ) + { + $transaction_mode = $this->MetaTransaction($transaction_mode, $this->dataProvider); + $this->_transmode = $transaction_mode; + } +/* +http://msdn2.microsoft.com/en-US/ms173763.aspx +http://dev.mysql.com/doc/refman/5.0/en/innodb-transaction-isolation.html +http://www.postgresql.org/docs/8.1/interactive/sql-set-transaction.html +http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_10005.htm +*/ + function MetaTransaction($mode,$db) + { + $mode = strtoupper($mode); + $mode = str_replace('ISOLATION LEVEL ','',$mode); + + switch($mode) { + + case 'READ UNCOMMITTED': + switch($db) { + case 'oci8': + case 'oracle': + return 'ISOLATION LEVEL READ COMMITTED'; + default: + return 'ISOLATION LEVEL READ UNCOMMITTED'; + } + break; + + case 'READ COMMITTED': + return 'ISOLATION LEVEL READ COMMITTED'; + break; + + case 'REPEATABLE READ': + switch($db) { + case 'oci8': + case 'oracle': + return 'ISOLATION LEVEL SERIALIZABLE'; + default: + return 'ISOLATION LEVEL REPEATABLE READ'; + } + break; + + case 'SERIALIZABLE': + return 'ISOLATION LEVEL SERIALIZABLE'; + break; + + default: + return $mode; + } + } + + /** + * If database does not support transactions, always return true as data always commited + * + * @param $ok set to false to rollback transaction, true to commit + * + * @return true/false. + */ + function CommitTrans($ok=true) + { return true;} + + + /** + * If database does not support transactions, rollbacks always fail, so return false + * + * @return true/false. + */ + function RollbackTrans() + { return false;} + + + /** + * return the databases that the driver can connect to. + * Some databases will return an empty array. + * + * @return an array of database names. + */ + function MetaDatabases() + { + global $ADODB_FETCH_MODE; + + if ($this->metaDatabasesSQL) { + $save = $ADODB_FETCH_MODE; + $ADODB_FETCH_MODE = ADODB_FETCH_NUM; + + if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); + + $arr = $this->GetCol($this->metaDatabasesSQL); + if (isset($savem)) $this->SetFetchMode($savem); + $ADODB_FETCH_MODE = $save; + + return $arr; + } + + return false; + } + + + /** + * @param ttype can either be 'VIEW' or 'TABLE' or false. + * If false, both views and tables are returned. + * "VIEW" returns only views + * "TABLE" returns only tables + * @param showSchema returns the schema/user with the table name, eg. USER.TABLE + * @param mask is the input mask - only supported by oci8 and postgresql + * + * @return array of tables for current database. + */ + function MetaTables($ttype=false,$showSchema=false,$mask=false) + { + global $ADODB_FETCH_MODE; + + + $false = false; + if ($mask) { + return $false; + } + if ($this->metaTablesSQL) { + $save = $ADODB_FETCH_MODE; + $ADODB_FETCH_MODE = ADODB_FETCH_NUM; + + if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); + + $rs = $this->Execute($this->metaTablesSQL); + if (isset($savem)) $this->SetFetchMode($savem); + $ADODB_FETCH_MODE = $save; + + if ($rs === false) return $false; + $arr = $rs->GetArray(); + $arr2 = array(); + + if ($hast = ($ttype && isset($arr[0][1]))) { + $showt = strncmp($ttype,'T',1); + } + + for ($i=0; $i < sizeof($arr); $i++) { + if ($hast) { + if ($showt == 0) { + if (strncmp($arr[$i][1],'T',1) == 0) $arr2[] = trim($arr[$i][0]); + } else { + if (strncmp($arr[$i][1],'V',1) == 0) $arr2[] = trim($arr[$i][0]); + } + } else + $arr2[] = trim($arr[$i][0]); + } + $rs->Close(); + return $arr2; + } + return $false; + } + + + function _findschema(&$table,&$schema) + { + if (!$schema && ($at = strpos($table,'.')) !== false) { + $schema = substr($table,0,$at); + $table = substr($table,$at+1); + } + } + + /** + * List columns in a database as an array of ADOFieldObjects. + * See top of file for definition of object. + * + * @param $table table name to query + * @param $normalize makes table name case-insensitive (required by some databases) + * @schema is optional database schema to use - not supported by all databases. + * + * @return array of ADOFieldObjects for current table. + */ + function MetaColumns($table,$normalize=true) + { + global $ADODB_FETCH_MODE; + + $false = false; + + if (!empty($this->metaColumnsSQL)) { + + $schema = false; + $this->_findschema($table,$schema); + + $save = $ADODB_FETCH_MODE; + $ADODB_FETCH_MODE = ADODB_FETCH_NUM; + if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); + $rs = $this->Execute(sprintf($this->metaColumnsSQL,($normalize)?strtoupper($table):$table)); + if (isset($savem)) $this->SetFetchMode($savem); + $ADODB_FETCH_MODE = $save; + if ($rs === false || $rs->EOF) return $false; + + $retarr = array(); + while (!$rs->EOF) { //print_r($rs->fields); + $fld = new ADOFieldObject(); + $fld->name = $rs->fields[0]; + $fld->type = $rs->fields[1]; + if (isset($rs->fields[3]) && $rs->fields[3]) { + if ($rs->fields[3]>0) $fld->max_length = $rs->fields[3]; + $fld->scale = $rs->fields[4]; + if ($fld->scale>0) $fld->max_length += 1; + } else + $fld->max_length = $rs->fields[2]; + + if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; + else $retarr[strtoupper($fld->name)] = $fld; + $rs->MoveNext(); + } + $rs->Close(); + return $retarr; + } + return $false; + } + + /** + * List indexes on a table as an array. + * @param table table name to query + * @param primary true to only show primary keys. Not actually used for most databases + * + * @return array of indexes on current table. Each element represents an index, and is itself an associative array. + + Array ( + [name_of_index] => Array + ( + [unique] => true or false + [columns] => Array + ( + [0] => firstname + [1] => lastname + ) + ) + */ + function MetaIndexes($table, $primary = false, $owner = false) + { + $false = false; + return $false; + } + + /** + * List columns names in a table as an array. + * @param table table name to query + * + * @return array of column names for current table. + */ + function MetaColumnNames($table, $numIndexes=false,$useattnum=false /* only for postgres */) + { + $objarr = $this->MetaColumns($table); + if (!is_array($objarr)) { + $false = false; + return $false; + } + $arr = array(); + if ($numIndexes) { + $i = 0; + if ($useattnum) { + foreach($objarr as $v) + $arr[$v->attnum] = $v->name; + + } else + foreach($objarr as $v) $arr[$i++] = $v->name; + } else + foreach($objarr as $v) $arr[strtoupper($v->name)] = $v->name; + + return $arr; + } + + /** + * Different SQL databases used different methods to combine strings together. + * This function provides a wrapper. + * + * param s variable number of string parameters + * + * Usage: $db->Concat($str1,$str2); + * + * @return concatenated string + */ + function Concat() + { + $arr = func_get_args(); + return implode($this->concat_operator, $arr); + } + + + /** + * Converts a date "d" to a string that the database can understand. + * + * @param d a date in Unix date time format. + * + * @return date string in database date format + */ + function DBDate($d, $isfld=false) + { + if (empty($d) && $d !== 0) return 'null'; + if ($isfld) return $d; + + if (is_object($d)) return $d->format($this->fmtDate); + + + if (is_string($d) && !is_numeric($d)) { + if ($d === 'null' || strncmp($d,"'",1) === 0) return $d; + if ($this->isoDates) return "'$d'"; + $d = ADOConnection::UnixDate($d); + } + + return adodb_date($this->fmtDate,$d); + } + + function BindDate($d) + { + $d = $this->DBDate($d); + if (strncmp($d,"'",1)) return $d; + + return substr($d,1,strlen($d)-2); + } + + function BindTimeStamp($d) + { + $d = $this->DBTimeStamp($d); + if (strncmp($d,"'",1)) return $d; + + return substr($d,1,strlen($d)-2); + } + + + /** + * Converts a timestamp "ts" to a string that the database can understand. + * + * @param ts a timestamp in Unix date time format. + * + * @return timestamp string in database timestamp format + */ + function DBTimeStamp($ts,$isfld=false) + { + if (empty($ts) && $ts !== 0) return 'null'; + if ($isfld) return $ts; + if (is_object($ts)) return $ts->format($this->fmtTimeStamp); + + # strlen(14) allows YYYYMMDDHHMMSS format + if (!is_string($ts) || (is_numeric($ts) && strlen($ts)<14)) + return adodb_date($this->fmtTimeStamp,$ts); + + if ($ts === 'null') return $ts; + if ($this->isoDates && strlen($ts) !== 14) return "'$ts'"; + + $ts = ADOConnection::UnixTimeStamp($ts); + return adodb_date($this->fmtTimeStamp,$ts); + } + + /** + * Also in ADORecordSet. + * @param $v is a date string in YYYY-MM-DD format + * + * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format + */ + static function UnixDate($v) + { + if (is_object($v)) { + // odbtp support + //( [year] => 2004 [month] => 9 [day] => 4 [hour] => 12 [minute] => 44 [second] => 8 [fraction] => 0 ) + return adodb_mktime($v->hour,$v->minute,$v->second,$v->month,$v->day, $v->year); + } + + if (is_numeric($v) && strlen($v) !== 8) return $v; + if (!preg_match( "|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})|", + ($v), $rr)) return false; + + if ($rr[1] <= TIMESTAMP_FIRST_YEAR) return 0; + // h-m-s-MM-DD-YY + return @adodb_mktime(0,0,0,$rr[2],$rr[3],$rr[1]); + } + + + /** + * Also in ADORecordSet. + * @param $v is a timestamp string in YYYY-MM-DD HH-NN-SS format + * + * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format + */ + static function UnixTimeStamp($v) + { + if (is_object($v)) { + // odbtp support + //( [year] => 2004 [month] => 9 [day] => 4 [hour] => 12 [minute] => 44 [second] => 8 [fraction] => 0 ) + return adodb_mktime($v->hour,$v->minute,$v->second,$v->month,$v->day, $v->year); + } + + if (!preg_match( + "|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})[ ,-]*(([0-9]{1,2}):?([0-9]{1,2}):?([0-9\.]{1,4}))?|", + ($v), $rr)) return false; + + if ($rr[1] <= TIMESTAMP_FIRST_YEAR && $rr[2]<= 1) return 0; + + // h-m-s-MM-DD-YY + if (!isset($rr[5])) return adodb_mktime(0,0,0,$rr[2],$rr[3],$rr[1]); + return @adodb_mktime($rr[5],$rr[6],$rr[7],$rr[2],$rr[3],$rr[1]); + } + + /** + * Also in ADORecordSet. + * + * Format database date based on user defined format. + * + * @param v is the character date in YYYY-MM-DD format, returned by database + * @param fmt is the format to apply to it, using date() + * + * @return a date formated as user desires + */ + + function UserDate($v,$fmt='Y-m-d',$gmt=false) + { + $tt = $this->UnixDate($v); + + // $tt == -1 if pre TIMESTAMP_FIRST_YEAR + if (($tt === false || $tt == -1) && $v != false) return $v; + else if ($tt == 0) return $this->emptyDate; + else if ($tt == -1) { // pre-TIMESTAMP_FIRST_YEAR + } + + return ($gmt) ? adodb_gmdate($fmt,$tt) : adodb_date($fmt,$tt); + + } + + /** + * + * @param v is the character timestamp in YYYY-MM-DD hh:mm:ss format + * @param fmt is the format to apply to it, using date() + * + * @return a timestamp formated as user desires + */ + function UserTimeStamp($v,$fmt='Y-m-d H:i:s',$gmt=false) + { + if (!isset($v)) return $this->emptyTimeStamp; + # strlen(14) allows YYYYMMDDHHMMSS format + if (is_numeric($v) && strlen($v)<14) return ($gmt) ? adodb_gmdate($fmt,$v) : adodb_date($fmt,$v); + $tt = $this->UnixTimeStamp($v); + // $tt == -1 if pre TIMESTAMP_FIRST_YEAR + if (($tt === false || $tt == -1) && $v != false) return $v; + if ($tt == 0) return $this->emptyTimeStamp; + return ($gmt) ? adodb_gmdate($fmt,$tt) : adodb_date($fmt,$tt); + } + + function escape($s,$magic_quotes=false) + { + return $this->addq($s,$magic_quotes); + } + + /** + * Quotes a string, without prefixing nor appending quotes. + */ + function addq($s,$magic_quotes=false) + { + if (!$magic_quotes) { + + if ($this->replaceQuote[0] == '\\'){ + // only since php 4.0.5 + $s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\0"),$s); + //$s = str_replace("\0","\\\0", str_replace('\\','\\\\',$s)); + } + return str_replace("'",$this->replaceQuote,$s); + } + + // undo magic quotes for " + $s = str_replace('\\"','"',$s); + + if ($this->replaceQuote == "\\'" || ini_get('magic_quotes_sybase')) // ' already quoted, no need to change anything + return $s; + else {// change \' to '' for sybase/mssql + $s = str_replace('\\\\','\\',$s); + return str_replace("\\'",$this->replaceQuote,$s); + } + } + + /** + * Correctly quotes a string so that all strings are escaped. We prefix and append + * to the string single-quotes. + * An example is $db->qstr("Don't bother",magic_quotes_runtime()); + * + * @param s the string to quote + * @param [magic_quotes] if $s is GET/POST var, set to get_magic_quotes_gpc(). + * This undoes the stupidity of magic quotes for GPC. + * + * @return quoted string to be sent back to database + */ + function qstr($s,$magic_quotes=false) + { + if (!$magic_quotes) { + + if ($this->replaceQuote[0] == '\\'){ + // only since php 4.0.5 + $s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\0"),$s); + //$s = str_replace("\0","\\\0", str_replace('\\','\\\\',$s)); + } + return "'".str_replace("'",$this->replaceQuote,$s)."'"; + } + + // undo magic quotes for " + $s = str_replace('\\"','"',$s); + + if ($this->replaceQuote == "\\'" || ini_get('magic_quotes_sybase')) // ' already quoted, no need to change anything + return "'$s'"; + else {// change \' to '' for sybase/mssql + $s = str_replace('\\\\','\\',$s); + return "'".str_replace("\\'",$this->replaceQuote,$s)."'"; + } + } + + + /** + * Will select the supplied $page number from a recordset, given that it is paginated in pages of + * $nrows rows per page. It also saves two boolean values saying if the given page is the first + * and/or last one of the recordset. Added by Ivn Oliva to provide recordset pagination. + * + * See readme.htm#ex8 for an example of usage. + * + * @param sql + * @param nrows is the number of rows per page to get + * @param page is the page number to get (1-based) + * @param [inputarr] array of bind variables + * @param [secs2cache] is a private parameter only used by jlim + * @return the recordset ($rs->databaseType == 'array') + * + * NOTE: phpLens uses a different algorithm and does not use PageExecute(). + * + */ + function PageExecute($sql, $nrows, $page, $inputarr=false, $secs2cache=0) + { + global $ADODB_INCLUDED_LIB; + if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); + if ($this->pageExecuteCountRows) $rs = _adodb_pageexecute_all_rows($this, $sql, $nrows, $page, $inputarr, $secs2cache); + else $rs = _adodb_pageexecute_no_last_page($this, $sql, $nrows, $page, $inputarr, $secs2cache); + return $rs; + } + + + /** + * Will select the supplied $page number from a recordset, given that it is paginated in pages of + * $nrows rows per page. It also saves two boolean values saying if the given page is the first + * and/or last one of the recordset. Added by Ivn Oliva to provide recordset pagination. + * + * @param secs2cache seconds to cache data, set to 0 to force query + * @param sql + * @param nrows is the number of rows per page to get + * @param page is the page number to get (1-based) + * @param [inputarr] array of bind variables + * @return the recordset ($rs->databaseType == 'array') + */ + function CachePageExecute($secs2cache, $sql, $nrows, $page,$inputarr=false) + { + /*switch($this->dataProvider) { + case 'postgres': + case 'mysql': + break; + default: $secs2cache = 0; break; + }*/ + $rs = $this->PageExecute($sql,$nrows,$page,$inputarr,$secs2cache); + return $rs; + } + +} // end class ADOConnection + + + + //============================================================================================== + // CLASS ADOFetchObj + //============================================================================================== + + /** + * Internal placeholder for record objects. Used by ADORecordSet->FetchObj(). + */ + class ADOFetchObj { + }; + + //============================================================================================== + // CLASS ADORecordSet_empty + //============================================================================================== + + class ADODB_Iterator_empty implements Iterator { + + private $rs; + + function __construct($rs) + { + $this->rs = $rs; + } + function rewind() + { + } + + function valid() + { + return !$this->rs->EOF; + } + + function key() + { + return false; + } + + function current() + { + return false; + } + + function next() + { + } + + function __call($func, $params) + { + return call_user_func_array(array($this->rs, $func), $params); + } + + function hasMore() + { + return false; + } + + } + + + /** + * Lightweight recordset when there are no records to be returned + */ + class ADORecordSet_empty implements IteratorAggregate + { + var $dataProvider = 'empty'; + var $databaseType = false; + var $EOF = true; + var $_numOfRows = 0; + var $fields = false; + var $connection = false; + function RowCount() {return 0;} + function RecordCount() {return 0;} + function PO_RecordCount(){return 0;} + function Close(){return true;} + function FetchRow() {return false;} + function FieldCount(){ return 0;} + function Init() {} + function getIterator() {return new ADODB_Iterator_empty($this);} + } + + //============================================================================================== + // DATE AND TIME FUNCTIONS + //============================================================================================== + if (!defined('ADODB_DATE_VERSION')) include(ADODB_DIR.'/adodb-time.inc.php'); + + //============================================================================================== + // CLASS ADORecordSet + //============================================================================================== + + class ADODB_Iterator implements Iterator { + + private $rs; + + function __construct($rs) + { + $this->rs = $rs; + } + function rewind() + { + $this->rs->MoveFirst(); + } + + function valid() + { + return !$this->rs->EOF; + } + + function key() + { + return $this->rs->_currentRow; + } + + function current() + { + return $this->rs->fields; + } + + function next() + { + $this->rs->MoveNext(); + } + + function __call($func, $params) + { + return call_user_func_array(array($this->rs, $func), $params); + } + + + function hasMore() + { + return !$this->rs->EOF; + } + + } + + + + /** + * RecordSet class that represents the dataset returned by the database. + * To keep memory overhead low, this class holds only the current row in memory. + * No prefetching of data is done, so the RecordCount() can return -1 ( which + * means recordcount not known). + */ + class ADORecordSet implements IteratorAggregate { + /* + * public variables + */ + var $dataProvider = "native"; + var $fields = false; /// holds the current row data + var $blobSize = 100; /// any varchar/char field this size or greater is treated as a blob + /// in other words, we use a text area for editing. + var $canSeek = false; /// indicates that seek is supported + var $sql; /// sql text + var $EOF = false; /// Indicates that the current record position is after the last record in a Recordset object. + + var $emptyTimeStamp = ' '; /// what to display when $time==0 + var $emptyDate = ' '; /// what to display when $time==0 + var $debug = false; + var $timeCreated=0; /// datetime in Unix format rs created -- for cached recordsets + + var $bind = false; /// used by Fields() to hold array - should be private? + var $fetchMode; /// default fetch mode + var $connection = false; /// the parent connection + /* + * private variables + */ + var $_numOfRows = -1; /** number of rows, or -1 */ + var $_numOfFields = -1; /** number of fields in recordset */ + var $_queryID = -1; /** This variable keeps the result link identifier. */ + var $_currentRow = -1; /** This variable keeps the current row in the Recordset. */ + var $_closed = false; /** has recordset been closed */ + var $_inited = false; /** Init() should only be called once */ + var $_obj; /** Used by FetchObj */ + var $_names; /** Used by FetchObj */ + + var $_currentPage = -1; /** Added by Ivn Oliva to implement recordset pagination */ + var $_atFirstPage = false; /** Added by Ivn Oliva to implement recordset pagination */ + var $_atLastPage = false; /** Added by Ivn Oliva to implement recordset pagination */ + var $_lastPageNo = -1; + var $_maxRecordCount = 0; + var $datetime = false; + + /** + * Constructor + * + * @param queryID this is the queryID returned by ADOConnection->_query() + * + */ + function ADORecordSet($queryID) + { + $this->_queryID = $queryID; + } + + function getIterator() + { + return new ADODB_Iterator($this); + } + + /* this is experimental - i don't really know what to return... */ + function __toString() + { + include_once(ADODB_DIR.'/toexport.inc.php'); + return _adodb_export($this,',',',',false,true); + } + + + function Init() + { + if ($this->_inited) return; + $this->_inited = true; + if ($this->_queryID) @$this->_initrs(); + else { + $this->_numOfRows = 0; + $this->_numOfFields = 0; + } + if ($this->_numOfRows != 0 && $this->_numOfFields && $this->_currentRow == -1) { + + $this->_currentRow = 0; + if ($this->EOF = ($this->_fetch() === false)) { + $this->_numOfRows = 0; // _numOfRows could be -1 + } + } else { + $this->EOF = true; + } + } + + + /** + * Generate a SELECT tag string from a recordset, and return the string. + * If the recordset has 2 cols, we treat the 1st col as the containing + * the text to display to the user, and 2nd col as the return value. Default + * strings are compared with the FIRST column. + * + * @param name name of SELECT tag + * @param [defstr] the value to hilite. Use an array for multiple hilites for listbox. + * @param [blank1stItem] true to leave the 1st item in list empty + * @param [multiple] true for listbox, false for popup + * @param [size] #rows to show for listbox. not used by popup + * @param [selectAttr] additional attributes to defined for SELECT tag. + * useful for holding javascript onChange='...' handlers. + & @param [compareFields0] when we have 2 cols in recordset, we compare the defstr with + * column 0 (1st col) if this is true. This is not documented. + * + * @return HTML + * + * changes by glen.davies@cce.ac.nz to support multiple hilited items + */ + function GetMenu($name,$defstr='',$blank1stItem=true,$multiple=false, + $size=0, $selectAttr='',$compareFields0=true) + { + global $ADODB_INCLUDED_LIB; + if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); + return _adodb_getmenu($this, $name,$defstr,$blank1stItem,$multiple, + $size, $selectAttr,$compareFields0); + } + + + + /** + * Generate a SELECT tag string from a recordset, and return the string. + * If the recordset has 2 cols, we treat the 1st col as the containing + * the text to display to the user, and 2nd col as the return value. Default + * strings are compared with the SECOND column. + * + */ + function GetMenu2($name,$defstr='',$blank1stItem=true,$multiple=false,$size=0, $selectAttr='') + { + return $this->GetMenu($name,$defstr,$blank1stItem,$multiple, + $size, $selectAttr,false); + } + + /* + Grouped Menu + */ + function GetMenu3($name,$defstr='',$blank1stItem=true,$multiple=false, + $size=0, $selectAttr='') + { + global $ADODB_INCLUDED_LIB; + if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); + return _adodb_getmenu_gp($this, $name,$defstr,$blank1stItem,$multiple, + $size, $selectAttr,false); + } + + /** + * return recordset as a 2-dimensional array. + * + * @param [nRows] is the number of rows to return. -1 means every row. + * + * @return an array indexed by the rows (0-based) from the recordset + */ + function GetArray($nRows = -1) + { + global $ADODB_EXTENSION; if ($ADODB_EXTENSION) { + $results = adodb_getall($this,$nRows); + return $results; + } + $results = array(); + $cnt = 0; + while (!$this->EOF && $nRows != $cnt) { + $results[] = $this->fields; + $this->MoveNext(); + $cnt++; + } + return $results; + } + + function GetAll($nRows = -1) + { + $arr = $this->GetArray($nRows); + return $arr; + } + + /* + * Some databases allow multiple recordsets to be returned. This function + * will return true if there is a next recordset, or false if no more. + */ + function NextRecordSet() + { + return false; + } + + /** + * return recordset as a 2-dimensional array. + * Helper function for ADOConnection->SelectLimit() + * + * @param offset is the row to start calculations from (1-based) + * @param [nrows] is the number of rows to return + * + * @return an array indexed by the rows (0-based) from the recordset + */ + function GetArrayLimit($nrows,$offset=-1) + { + if ($offset <= 0) { + $arr = $this->GetArray($nrows); + return $arr; + } + + $this->Move($offset); + + $results = array(); + $cnt = 0; + while (!$this->EOF && $nrows != $cnt) { + $results[$cnt++] = $this->fields; + $this->MoveNext(); + } + + return $results; + } + + + /** + * Synonym for GetArray() for compatibility with ADO. + * + * @param [nRows] is the number of rows to return. -1 means every row. + * + * @return an array indexed by the rows (0-based) from the recordset + */ + function GetRows($nRows = -1) + { + $arr = $this->GetArray($nRows); + return $arr; + } + + /** + * return whole recordset as a 2-dimensional associative array if there are more than 2 columns. + * The first column is treated as the key and is not included in the array. + * If there is only 2 columns, it will return a 1 dimensional array of key-value pairs unless + * $force_array == true. + * + * @param [force_array] has only meaning if we have 2 data columns. If false, a 1 dimensional + * array is returned, otherwise a 2 dimensional array is returned. If this sounds confusing, + * read the source. + * + * @param [first2cols] means if there are more than 2 cols, ignore the remaining cols and + * instead of returning array[col0] => array(remaining cols), return array[col0] => col1 + * + * @return an associative array indexed by the first column of the array, + * or false if the data has less than 2 cols. + */ + function GetAssoc($force_array = false, $first2cols = false) + { + global $ADODB_EXTENSION; + + $cols = $this->_numOfFields; + if ($cols < 2) { + $false = false; + return $false; + } + $numIndex = isset($this->fields[0]); + $results = array(); + + if (!$first2cols && ($cols > 2 || $force_array)) { + if ($ADODB_EXTENSION) { + if ($numIndex) { + while (!$this->EOF) { + $results[trim($this->fields[0])] = array_slice($this->fields, 1); + adodb_movenext($this); + } + } else { + while (!$this->EOF) { + // Fix for array_slice re-numbering numeric associative keys + $keys = array_slice(array_keys($this->fields), 1); + $sliced_array = array(); + + foreach($keys as $key) { + $sliced_array[$key] = $this->fields[$key]; + } + + $results[trim(reset($this->fields))] = $sliced_array; + adodb_movenext($this); + } + } + } else { + if ($numIndex) { + while (!$this->EOF) { + $results[trim($this->fields[0])] = array_slice($this->fields, 1); + $this->MoveNext(); + } + } else { + while (!$this->EOF) { + // Fix for array_slice re-numbering numeric associative keys + $keys = array_slice(array_keys($this->fields), 1); + $sliced_array = array(); + + foreach($keys as $key) { + $sliced_array[$key] = $this->fields[$key]; + } + + $results[trim(reset($this->fields))] = $sliced_array; + $this->MoveNext(); + } + } + } + } else { + if ($ADODB_EXTENSION) { + // return scalar values + if ($numIndex) { + while (!$this->EOF) { + // some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string + $results[trim(($this->fields[0]))] = $this->fields[1]; + adodb_movenext($this); + } + } else { + while (!$this->EOF) { + // some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string + $v1 = trim(reset($this->fields)); + $v2 = ''.next($this->fields); + $results[$v1] = $v2; + adodb_movenext($this); + } + } + } else { + if ($numIndex) { + while (!$this->EOF) { + // some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string + $results[trim(($this->fields[0]))] = $this->fields[1]; + $this->MoveNext(); + } + } else { + while (!$this->EOF) { + // some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string + $v1 = trim(reset($this->fields)); + $v2 = ''.next($this->fields); + $results[$v1] = $v2; + $this->MoveNext(); + } + } + } + } + + $ref = $results; # workaround accelerator incompat with PHP 4.4 :( + return $ref; + } + + + /** + * + * @param v is the character timestamp in YYYY-MM-DD hh:mm:ss format + * @param fmt is the format to apply to it, using date() + * + * @return a timestamp formated as user desires + */ + function UserTimeStamp($v,$fmt='Y-m-d H:i:s') + { + if (is_numeric($v) && strlen($v)<14) return adodb_date($fmt,$v); + $tt = $this->UnixTimeStamp($v); + // $tt == -1 if pre TIMESTAMP_FIRST_YEAR + if (($tt === false || $tt == -1) && $v != false) return $v; + if ($tt === 0) return $this->emptyTimeStamp; + return adodb_date($fmt,$tt); + } + + + /** + * @param v is the character date in YYYY-MM-DD format, returned by database + * @param fmt is the format to apply to it, using date() + * + * @return a date formated as user desires + */ + function UserDate($v,$fmt='Y-m-d') + { + $tt = $this->UnixDate($v); + // $tt == -1 if pre TIMESTAMP_FIRST_YEAR + if (($tt === false || $tt == -1) && $v != false) return $v; + else if ($tt == 0) return $this->emptyDate; + else if ($tt == -1) { // pre-TIMESTAMP_FIRST_YEAR + } + return adodb_date($fmt,$tt); + } + + + /** + * @param $v is a date string in YYYY-MM-DD format + * + * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format + */ + static function UnixDate($v) + { + return ADOConnection::UnixDate($v); + } + + + /** + * @param $v is a timestamp string in YYYY-MM-DD HH-NN-SS format + * + * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format + */ + static function UnixTimeStamp($v) + { + return ADOConnection::UnixTimeStamp($v); + } + + + /** + * PEAR DB Compat - do not use internally + */ + function Free() + { + return $this->Close(); + } + + + /** + * PEAR DB compat, number of rows + */ + function NumRows() + { + return $this->_numOfRows; + } + + + /** + * PEAR DB compat, number of cols + */ + function NumCols() + { + return $this->_numOfFields; + } + + /** + * Fetch a row, returning false if no more rows. + * This is PEAR DB compat mode. + * + * @return false or array containing the current record + */ + function FetchRow() + { + if ($this->EOF) { + $false = false; + return $false; + } + $arr = $this->fields; + $this->_currentRow++; + if (!$this->_fetch()) $this->EOF = true; + return $arr; + } + + + /** + * Fetch a row, returning PEAR_Error if no more rows. + * This is PEAR DB compat mode. + * + * @return DB_OK or error object + */ + function FetchInto(&$arr) + { + if ($this->EOF) return (defined('PEAR_ERROR_RETURN')) ? new PEAR_Error('EOF',-1): false; + $arr = $this->fields; + $this->MoveNext(); + return 1; // DB_OK + } + + + /** + * Move to the first row in the recordset. Many databases do NOT support this. + * + * @return true or false + */ + function MoveFirst() + { + if ($this->_currentRow == 0) return true; + return $this->Move(0); + } + + + /** + * Move to the last row in the recordset. + * + * @return true or false + */ + function MoveLast() + { + if ($this->_numOfRows >= 0) return $this->Move($this->_numOfRows-1); + if ($this->EOF) return false; + while (!$this->EOF) { + $f = $this->fields; + $this->MoveNext(); + } + $this->fields = $f; + $this->EOF = false; + return true; + } + + + /** + * Move to next record in the recordset. + * + * @return true if there still rows available, or false if there are no more rows (EOF). + */ + function MoveNext() + { + if (!$this->EOF) { + $this->_currentRow++; + if ($this->_fetch()) return true; + } + $this->EOF = true; + /* -- tested error handling when scrolling cursor -- seems useless. + $conn = $this->connection; + if ($conn && $conn->raiseErrorFn && ($errno = $conn->ErrorNo())) { + $fn = $conn->raiseErrorFn; + $fn($conn->databaseType,'MOVENEXT',$errno,$conn->ErrorMsg().' ('.$this->sql.')',$conn->host,$conn->database); + } + */ + return false; + } + + + /** + * Random access to a specific row in the recordset. Some databases do not support + * access to previous rows in the databases (no scrolling backwards). + * + * @param rowNumber is the row to move to (0-based) + * + * @return true if there still rows available, or false if there are no more rows (EOF). + */ + function Move($rowNumber = 0) + { + $this->EOF = false; + if ($rowNumber == $this->_currentRow) return true; + if ($rowNumber >= $this->_numOfRows) + if ($this->_numOfRows != -1) $rowNumber = $this->_numOfRows-2; + + if ($this->canSeek) { + + if ($this->_seek($rowNumber)) { + $this->_currentRow = $rowNumber; + if ($this->_fetch()) { + return true; + } + } else { + $this->EOF = true; + return false; + } + } else { + if ($rowNumber < $this->_currentRow) return false; + global $ADODB_EXTENSION; + if ($ADODB_EXTENSION) { + while (!$this->EOF && $this->_currentRow < $rowNumber) { + adodb_movenext($this); + } + } else { + + while (! $this->EOF && $this->_currentRow < $rowNumber) { + $this->_currentRow++; + + if (!$this->_fetch()) $this->EOF = true; + } + } + return !($this->EOF); + } + + $this->fields = false; + $this->EOF = true; + return false; + } + + + /** + * Get the value of a field in the current row by column name. + * Will not work if ADODB_FETCH_MODE is set to ADODB_FETCH_NUM. + * + * @param colname is the field to access + * + * @return the value of $colname column + */ + function Fields($colname) + { + return $this->fields[$colname]; + } + + function GetAssocKeys($upper=true) + { + $this->bind = array(); + for ($i=0; $i < $this->_numOfFields; $i++) { + $o = $this->FetchField($i); + if ($upper === 2) $this->bind[$o->name] = $i; + else $this->bind[($upper) ? strtoupper($o->name) : strtolower($o->name)] = $i; + } + } + + /** + * Use associative array to get fields array for databases that do not support + * associative arrays. Submitted by Paolo S. Asioli paolo.asioli#libero.it + * + * If you don't want uppercase cols, set $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC + * before you execute your SQL statement, and access $rs->fields['col'] directly. + * + * $upper 0 = lowercase, 1 = uppercase, 2 = whatever is returned by FetchField + */ + function GetRowAssoc($upper=1) + { + $record = array(); + // if (!$this->fields) return $record; + + if (!$this->bind) { + $this->GetAssocKeys($upper); + } + + foreach($this->bind as $k => $v) { + $record[$k] = $this->fields[$v]; + } + + return $record; + } + + + /** + * Clean up recordset + * + * @return true or false + */ + function Close() + { + // free connection object - this seems to globally free the object + // and not merely the reference, so don't do this... + // $this->connection = false; + if (!$this->_closed) { + $this->_closed = true; + return $this->_close(); + } else + return true; + } + + /** + * synonyms RecordCount and RowCount + * + * @return the number of rows or -1 if this is not supported + */ + function RecordCount() {return $this->_numOfRows;} + + + /* + * If we are using PageExecute(), this will return the maximum possible rows + * that can be returned when paging a recordset. + */ + function MaxRecordCount() + { + return ($this->_maxRecordCount) ? $this->_maxRecordCount : $this->RecordCount(); + } + + /** + * synonyms RecordCount and RowCount + * + * @return the number of rows or -1 if this is not supported + */ + function RowCount() {return $this->_numOfRows;} + + + /** + * Portable RecordCount. Pablo Roca + * + * @return the number of records from a previous SELECT. All databases support this. + * + * But aware possible problems in multiuser environments. For better speed the table + * must be indexed by the condition. Heavy test this before deploying. + */ + function PO_RecordCount($table="", $condition="") { + + $lnumrows = $this->_numOfRows; + // the database doesn't support native recordcount, so we do a workaround + if ($lnumrows == -1 && $this->connection) { + IF ($table) { + if ($condition) $condition = " WHERE " . $condition; + $resultrows = $this->connection->Execute("SELECT COUNT(*) FROM $table $condition"); + if ($resultrows) $lnumrows = reset($resultrows->fields); + } + } + return $lnumrows; + } + + + /** + * @return the current row in the recordset. If at EOF, will return the last row. 0-based. + */ + function CurrentRow() {return $this->_currentRow;} + + /** + * synonym for CurrentRow -- for ADO compat + * + * @return the current row in the recordset. If at EOF, will return the last row. 0-based. + */ + function AbsolutePosition() {return $this->_currentRow;} + + /** + * @return the number of columns in the recordset. Some databases will set this to 0 + * if no records are returned, others will return the number of columns in the query. + */ + function FieldCount() {return $this->_numOfFields;} + + + /** + * Get the ADOFieldObject of a specific column. + * + * @param fieldoffset is the column position to access(0-based). + * + * @return the ADOFieldObject for that column, or false. + */ + function FetchField($fieldoffset = -1) + { + // must be defined by child class + + $false = false; + return $false; + } + + /** + * Get the ADOFieldObjects of all columns in an array. + * + */ + function FieldTypesArray() + { + $arr = array(); + for ($i=0, $max=$this->_numOfFields; $i < $max; $i++) + $arr[] = $this->FetchField($i); + return $arr; + } + + /** + * Return the fields array of the current row as an object for convenience. + * The default case is lowercase field names. + * + * @return the object with the properties set to the fields of the current row + */ + function FetchObj() + { + $o = $this->FetchObject(false); + return $o; + } + + /** + * Return the fields array of the current row as an object for convenience. + * The default case is uppercase. + * + * @param $isupper to set the object property names to uppercase + * + * @return the object with the properties set to the fields of the current row + */ + function FetchObject($isupper=true) + { + if (empty($this->_obj)) { + $this->_obj = new ADOFetchObj(); + $this->_names = array(); + for ($i=0; $i <$this->_numOfFields; $i++) { + $f = $this->FetchField($i); + $this->_names[] = $f->name; + } + } + $i = 0; + if (PHP_VERSION >= 5) $o = clone($this->_obj); + else $o = $this->_obj; + + for ($i=0; $i <$this->_numOfFields; $i++) { + $name = $this->_names[$i]; + if ($isupper) $n = strtoupper($name); + else $n = $name; + + $o->$n = $this->Fields($name); + } + return $o; + } + + /** + * Return the fields array of the current row as an object for convenience. + * The default is lower-case field names. + * + * @return the object with the properties set to the fields of the current row, + * or false if EOF + * + * Fixed bug reported by tim@orotech.net + */ + function FetchNextObj() + { + $o = $this->FetchNextObject(false); + return $o; + } + + + /** + * Return the fields array of the current row as an object for convenience. + * The default is upper case field names. + * + * @param $isupper to set the object property names to uppercase + * + * @return the object with the properties set to the fields of the current row, + * or false if EOF + * + * Fixed bug reported by tim@orotech.net + */ + function FetchNextObject($isupper=true) + { + $o = false; + if ($this->_numOfRows != 0 && !$this->EOF) { + $o = $this->FetchObject($isupper); + $this->_currentRow++; + if ($this->_fetch()) return $o; + } + $this->EOF = true; + return $o; + } + + /** + * Get the metatype of the column. This is used for formatting. This is because + * many databases use different names for the same type, so we transform the original + * type to our standardised version which uses 1 character codes: + * + * @param t is the type passed in. Normally is ADOFieldObject->type. + * @param len is the maximum length of that field. This is because we treat character + * fields bigger than a certain size as a 'B' (blob). + * @param fieldobj is the field object returned by the database driver. Can hold + * additional info (eg. primary_key for mysql). + * + * @return the general type of the data: + * C for character < 250 chars + * X for teXt (>= 250 chars) + * B for Binary + * N for numeric or floating point + * D for date + * T for timestamp + * L for logical/Boolean + * I for integer + * R for autoincrement counter/integer + * + * + */ + function MetaType($t,$len=-1,$fieldobj=false) + { + if (is_object($t)) { + $fieldobj = $t; + $t = $fieldobj->type; + $len = $fieldobj->max_length; + } + // changed in 2.32 to hashing instead of switch stmt for speed... + static $typeMap = array( + 'VARCHAR' => 'C', + 'VARCHAR2' => 'C', + 'CHAR' => 'C', + 'C' => 'C', + 'STRING' => 'C', + 'NCHAR' => 'C', + 'NVARCHAR' => 'C', + 'VARYING' => 'C', + 'BPCHAR' => 'C', + 'CHARACTER' => 'C', + 'INTERVAL' => 'C', # Postgres + 'MACADDR' => 'C', # postgres + 'VAR_STRING' => 'C', # mysql + ## + 'LONGCHAR' => 'X', + 'TEXT' => 'X', + 'NTEXT' => 'X', + 'M' => 'X', + 'X' => 'X', + 'CLOB' => 'X', + 'NCLOB' => 'X', + 'LVARCHAR' => 'X', + ## + 'BLOB' => 'B', + 'IMAGE' => 'B', + 'BINARY' => 'B', + 'VARBINARY' => 'B', + 'LONGBINARY' => 'B', + 'B' => 'B', + ## + 'YEAR' => 'D', // mysql + 'DATE' => 'D', + 'D' => 'D', + ## + 'UNIQUEIDENTIFIER' => 'C', # MS SQL Server + ## + 'SMALLDATETIME' => 'T', + 'TIME' => 'T', + 'TIMESTAMP' => 'T', + 'DATETIME' => 'T', + 'TIMESTAMPTZ' => 'T', + 'T' => 'T', + 'TIMESTAMP WITHOUT TIME ZONE' => 'T', // postgresql + ## + 'BOOL' => 'L', + 'BOOLEAN' => 'L', + 'BIT' => 'L', + 'L' => 'L', + ## + 'COUNTER' => 'R', + 'R' => 'R', + 'SERIAL' => 'R', // ifx + 'INT IDENTITY' => 'R', + ## + 'INT' => 'I', + 'INT2' => 'I', + 'INT4' => 'I', + 'INT8' => 'I', + 'INTEGER' => 'I', + 'INTEGER UNSIGNED' => 'I', + 'SHORT' => 'I', + 'TINYINT' => 'I', + 'SMALLINT' => 'I', + 'I' => 'I', + ## + 'LONG' => 'N', // interbase is numeric, oci8 is blob + 'BIGINT' => 'N', // this is bigger than PHP 32-bit integers + 'DECIMAL' => 'N', + 'DEC' => 'N', + 'REAL' => 'N', + 'DOUBLE' => 'N', + 'DOUBLE PRECISION' => 'N', + 'SMALLFLOAT' => 'N', + 'FLOAT' => 'N', + 'NUMBER' => 'N', + 'NUM' => 'N', + 'NUMERIC' => 'N', + 'MONEY' => 'N', + + ## informix 9.2 + 'SQLINT' => 'I', + 'SQLSERIAL' => 'I', + 'SQLSMINT' => 'I', + 'SQLSMFLOAT' => 'N', + 'SQLFLOAT' => 'N', + 'SQLMONEY' => 'N', + 'SQLDECIMAL' => 'N', + 'SQLDATE' => 'D', + 'SQLVCHAR' => 'C', + 'SQLCHAR' => 'C', + 'SQLDTIME' => 'T', + 'SQLINTERVAL' => 'N', + 'SQLBYTES' => 'B', + 'SQLTEXT' => 'X', + ## informix 10 + "SQLINT8" => 'I8', + "SQLSERIAL8" => 'I8', + "SQLNCHAR" => 'C', + "SQLNVCHAR" => 'C', + "SQLLVARCHAR" => 'X', + "SQLBOOL" => 'L' + ); + + $tmap = false; + $t = strtoupper($t); + $tmap = (isset($typeMap[$t])) ? $typeMap[$t] : 'N'; + switch ($tmap) { + case 'C': + + // is the char field is too long, return as text field... + if ($this->blobSize >= 0) { + if ($len > $this->blobSize) return 'X'; + } else if ($len > 250) { + return 'X'; + } + return 'C'; + + case 'I': + if (!empty($fieldobj->primary_key)) return 'R'; + return 'I'; + + case false: + return 'N'; + + case 'B': + if (isset($fieldobj->binary)) + return ($fieldobj->binary) ? 'B' : 'X'; + return 'B'; + + case 'D': + if (!empty($this->connection) && !empty($this->connection->datetime)) return 'T'; + return 'D'; + + default: + if ($t == 'LONG' && $this->dataProvider == 'oci8') return 'B'; + return $tmap; + } + } + + + function _close() {} + + /** + * set/returns the current recordset page when paginating + */ + function AbsolutePage($page=-1) + { + if ($page != -1) $this->_currentPage = $page; + return $this->_currentPage; + } + + /** + * set/returns the status of the atFirstPage flag when paginating + */ + function AtFirstPage($status=false) + { + if ($status != false) $this->_atFirstPage = $status; + return $this->_atFirstPage; + } + + function LastPageNo($page = false) + { + if ($page != false) $this->_lastPageNo = $page; + return $this->_lastPageNo; + } + + /** + * set/returns the status of the atLastPage flag when paginating + */ + function AtLastPage($status=false) + { + if ($status != false) $this->_atLastPage = $status; + return $this->_atLastPage; + } + +} // end class ADORecordSet + + //============================================================================================== + // CLASS ADORecordSet_array + //============================================================================================== + + /** + * This class encapsulates the concept of a recordset created in memory + * as an array. This is useful for the creation of cached recordsets. + * + * Note that the constructor is different from the standard ADORecordSet + */ + + class ADORecordSet_array extends ADORecordSet + { + var $databaseType = 'array'; + + var $_array; // holds the 2-dimensional data array + var $_types; // the array of types of each column (C B I L M) + var $_colnames; // names of each column in array + var $_skiprow1; // skip 1st row because it holds column names + var $_fieldobjects; // holds array of field objects + var $canSeek = true; + var $affectedrows = false; + var $insertid = false; + var $sql = ''; + var $compat = false; + /** + * Constructor + * + */ + function ADORecordSet_array($fakeid=1) + { + global $ADODB_FETCH_MODE,$ADODB_COMPAT_FETCH; + + // fetch() on EOF does not delete $this->fields + $this->compat = !empty($ADODB_COMPAT_FETCH); + $this->ADORecordSet($fakeid); // fake queryID + $this->fetchMode = $ADODB_FETCH_MODE; + } + + function _transpose($addfieldnames=true) + { + global $ADODB_INCLUDED_LIB; + + if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); + $hdr = true; + + $fobjs = $addfieldnames ? $this->_fieldobjects : false; + adodb_transpose($this->_array, $newarr, $hdr, $fobjs); + //adodb_pr($newarr); + + $this->_skiprow1 = false; + $this->_array = $newarr; + $this->_colnames = $hdr; + + adodb_probetypes($newarr,$this->_types); + + $this->_fieldobjects = array(); + + foreach($hdr as $k => $name) { + $f = new ADOFieldObject(); + $f->name = $name; + $f->type = $this->_types[$k]; + $f->max_length = -1; + $this->_fieldobjects[] = $f; + } + $this->fields = reset($this->_array); + + $this->_initrs(); + + } + + /** + * Setup the array. + * + * @param array is a 2-dimensional array holding the data. + * The first row should hold the column names + * unless paramter $colnames is used. + * @param typearr holds an array of types. These are the same types + * used in MetaTypes (C,B,L,I,N). + * @param [colnames] array of column names. If set, then the first row of + * $array should not hold the column names. + */ + function InitArray($array,$typearr,$colnames=false) + { + $this->_array = $array; + $this->_types = $typearr; + if ($colnames) { + $this->_skiprow1 = false; + $this->_colnames = $colnames; + } else { + $this->_skiprow1 = true; + $this->_colnames = $array[0]; + } + $this->Init(); + } + /** + * Setup the Array and datatype file objects + * + * @param array is a 2-dimensional array holding the data. + * The first row should hold the column names + * unless paramter $colnames is used. + * @param fieldarr holds an array of ADOFieldObject's. + */ + function InitArrayFields(&$array,&$fieldarr) + { + $this->_array = $array; + $this->_skiprow1= false; + if ($fieldarr) { + $this->_fieldobjects = $fieldarr; + } + $this->Init(); + } + + function GetArray($nRows=-1) + { + if ($nRows == -1 && $this->_currentRow <= 0 && !$this->_skiprow1) { + return $this->_array; + } else { + $arr = ADORecordSet::GetArray($nRows); + return $arr; + } + } + + function _initrs() + { + $this->_numOfRows = sizeof($this->_array); + if ($this->_skiprow1) $this->_numOfRows -= 1; + + $this->_numOfFields =(isset($this->_fieldobjects)) ? + sizeof($this->_fieldobjects):sizeof($this->_types); + } + + /* Use associative array to get fields array */ + function Fields($colname) + { + $mode = isset($this->adodbFetchMode) ? $this->adodbFetchMode : $this->fetchMode; + + if ($mode & ADODB_FETCH_ASSOC) { + if (!isset($this->fields[$colname]) && !is_null($this->fields[$colname])) $colname = strtolower($colname); + return $this->fields[$colname]; + } + if (!$this->bind) { + $this->bind = array(); + for ($i=0; $i < $this->_numOfFields; $i++) { + $o = $this->FetchField($i); + $this->bind[strtoupper($o->name)] = $i; + } + } + return $this->fields[$this->bind[strtoupper($colname)]]; + } + + function FetchField($fieldOffset = -1) + { + if (isset($this->_fieldobjects)) { + return $this->_fieldobjects[$fieldOffset]; + } + $o = new ADOFieldObject(); + $o->name = $this->_colnames[$fieldOffset]; + $o->type = $this->_types[$fieldOffset]; + $o->max_length = -1; // length not known + + return $o; + } + + function _seek($row) + { + if (sizeof($this->_array) && 0 <= $row && $row < $this->_numOfRows) { + $this->_currentRow = $row; + if ($this->_skiprow1) $row += 1; + $this->fields = $this->_array[$row]; + return true; + } + return false; + } + + function MoveNext() + { + if (!$this->EOF) { + $this->_currentRow++; + + $pos = $this->_currentRow; + + if ($this->_numOfRows <= $pos) { + if (!$this->compat) $this->fields = false; + } else { + if ($this->_skiprow1) $pos += 1; + $this->fields = $this->_array[$pos]; + return true; + } + $this->EOF = true; + } + + return false; + } + + function _fetch() + { + $pos = $this->_currentRow; + + if ($this->_numOfRows <= $pos) { + if (!$this->compat) $this->fields = false; + return false; + } + if ($this->_skiprow1) $pos += 1; + $this->fields = $this->_array[$pos]; + return true; + } + + function _close() + { + return true; + } + + } // ADORecordSet_array + + //============================================================================================== + // HELPER FUNCTIONS + //============================================================================================== + + /** + * Synonym for ADOLoadCode. Private function. Do not use. + * + * @deprecated + */ + function ADOLoadDB($dbType) + { + return ADOLoadCode($dbType); + } + + /** + * Load the code for a specific database driver. Private function. Do not use. + */ + function ADOLoadCode($dbType) + { + global $ADODB_LASTDB; + + if (!$dbType) return false; + $db = strtolower($dbType); + switch ($db) { + case 'ado': + if (PHP_VERSION >= 5) $db = 'ado5'; + $class = 'ado'; + break; + case 'ifx': + case 'maxsql': $class = $db = 'mysqlt'; break; + case 'postgres': + case 'postgres8': + case 'pgsql': $class = $db = 'postgres7'; break; + default: + $class = $db; break; + } + + $file = ADODB_DIR."/drivers/adodb-".$db.".inc.php"; + @include_once($file); + $ADODB_LASTDB = $class; + if (class_exists("ADODB_" . $class)) return $class; + + //ADOConnection::outp(adodb_pr(get_declared_classes(),true)); + if (!file_exists($file)) ADOConnection::outp("Missing file: $file"); + else ADOConnection::outp("Syntax error in file: $file"); + return false; + } + + /** + * synonym for ADONewConnection for people like me who cannot remember the correct name + */ + function NewADOConnection($db='') + { + $tmp = ADONewConnection($db); + return $tmp; + } + + /** + * Instantiate a new Connection class for a specific database driver. + * + * @param [db] is the database Connection object to create. If undefined, + * use the last database driver that was loaded by ADOLoadCode(). + * + * @return the freshly created instance of the Connection class. + */ + function ADONewConnection($db='') + { + GLOBAL $ADODB_NEWCONNECTION, $ADODB_LASTDB; + + if (!defined('ADODB_ASSOC_CASE')) define('ADODB_ASSOC_CASE',2); + $errorfn = (defined('ADODB_ERROR_HANDLER')) ? ADODB_ERROR_HANDLER : false; + $false = false; + if (($at = strpos($db,'://')) !== FALSE) { + $origdsn = $db; + $fakedsn = 'fake'.substr($origdsn,$at); + if (($at2 = strpos($origdsn,'@/')) !== FALSE) { + // special handling of oracle, which might not have host + $fakedsn = str_replace('@/','@adodb-fakehost/',$fakedsn); + } + + if ((strpos($origdsn, 'sqlite')) !== FALSE) { + // special handling for SQLite, it only might have the path to the database file. + // If you try to connect to a SQLite database using a dsn like 'sqlite:///path/to/database', the 'parse_url' php function + // will throw you an exception with a message such as "unable to parse url" + list($scheme, $path) = explode('://', $origdsn); + $dsna['scheme'] = $scheme; + if ($qmark = strpos($path,'?')) { + $dsn['query'] = substr($path,$qmark+1); + $path = substr($path,0,$qmark); + } + $dsna['path'] = '/' . urlencode($path); + } else + $dsna = @parse_url($fakedsn); + + if (!$dsna) { + return $false; + } + $dsna['scheme'] = substr($origdsn,0,$at); + if ($at2 !== FALSE) { + $dsna['host'] = ''; + } + + if (strncmp($origdsn,'pdo',3) == 0) { + $sch = explode('_',$dsna['scheme']); + if (sizeof($sch)>1) { + + $dsna['host'] = isset($dsna['host']) ? rawurldecode($dsna['host']) : ''; + if ($sch[1] == 'sqlite') + $dsna['host'] = rawurlencode($sch[1].':'.rawurldecode($dsna['host'])); + else + $dsna['host'] = rawurlencode($sch[1].':host='.rawurldecode($dsna['host'])); + $dsna['scheme'] = 'pdo'; + } + } + + $db = @$dsna['scheme']; + if (!$db) return $false; + $dsna['host'] = isset($dsna['host']) ? rawurldecode($dsna['host']) : ''; + $dsna['user'] = isset($dsna['user']) ? rawurldecode($dsna['user']) : ''; + $dsna['pass'] = isset($dsna['pass']) ? rawurldecode($dsna['pass']) : ''; + $dsna['path'] = isset($dsna['path']) ? rawurldecode(substr($dsna['path'],1)) : ''; # strip off initial / + + if (isset($dsna['query'])) { + $opt1 = explode('&',$dsna['query']); + foreach($opt1 as $k => $v) { + $arr = explode('=',$v); + $opt[$arr[0]] = isset($arr[1]) ? rawurldecode($arr[1]) : 1; + } + } else $opt = array(); + } + /* + * phptype: Database backend used in PHP (mysql, odbc etc.) + * dbsyntax: Database used with regards to SQL syntax etc. + * protocol: Communication protocol to use (tcp, unix etc.) + * hostspec: Host specification (hostname[:port]) + * database: Database to use on the DBMS server + * username: User name for login + * password: Password for login + */ + if (!empty($ADODB_NEWCONNECTION)) { + $obj = $ADODB_NEWCONNECTION($db); + + } + + if(empty($obj)) { + + if (!isset($ADODB_LASTDB)) $ADODB_LASTDB = ''; + if (empty($db)) $db = $ADODB_LASTDB; + + if ($db != $ADODB_LASTDB) $db = ADOLoadCode($db); + + if (!$db) { + if (isset($origdsn)) $db = $origdsn; + if ($errorfn) { + // raise an error + $ignore = false; + $errorfn('ADONewConnection', 'ADONewConnection', -998, + "could not load the database driver for '$db'", + $db,false,$ignore); + } else + ADOConnection::outp( "

ADONewConnection: Unable to load database driver '$db'

",false); + + return $false; + } + + $cls = 'ADODB_'.$db; + if (!class_exists($cls)) { + adodb_backtrace(); + return $false; + } + + $obj = new $cls(); + } + + # constructor should not fail + if ($obj) { + if ($errorfn) $obj->raiseErrorFn = $errorfn; + if (isset($dsna)) { + if (isset($dsna['port'])) $obj->port = $dsna['port']; + foreach($opt as $k => $v) { + switch(strtolower($k)) { + case 'new': + $nconnect = true; $persist = true; break; + case 'persist': + case 'persistent': $persist = $v; break; + case 'debug': $obj->debug = (integer) $v; break; + #ibase + case 'role': $obj->role = $v; break; + case 'dialect': $obj->dialect = (integer) $v; break; + case 'charset': $obj->charset = $v; $obj->charSet=$v; break; + case 'buffers': $obj->buffers = $v; break; + case 'fetchmode': $obj->SetFetchMode($v); break; + #ado + case 'charpage': $obj->charPage = $v; break; + #mysql, mysqli + case 'clientflags': $obj->clientFlags = $v; break; + #mysql, mysqli, postgres + case 'port': $obj->port = $v; break; + #mysqli + case 'socket': $obj->socket = $v; break; + #oci8 + case 'nls_date_format': $obj->NLS_DATE_FORMAT = $v; break; + case 'cachesecs': $obj->cacheSecs = $v; break; + case 'memcache': + $varr = explode(':',$v); + $vlen = sizeof($varr); + if ($vlen == 0) break; + $obj->memCache = true; + $obj->memCacheHost = explode(',',$varr[0]); + if ($vlen == 1) break; + $obj->memCachePort = $varr[1]; + if ($vlen == 2) break; + $obj->memCacheCompress = $varr[2] ? true : false; + break; + } + } + if (empty($persist)) + $ok = $obj->Connect($dsna['host'], $dsna['user'], $dsna['pass'], $dsna['path']); + else if (empty($nconnect)) + $ok = $obj->PConnect($dsna['host'], $dsna['user'], $dsna['pass'], $dsna['path']); + else + $ok = $obj->NConnect($dsna['host'], $dsna['user'], $dsna['pass'], $dsna['path']); + + if (!$ok) return $false; + } + } + return $obj; + } + + + + // $perf == true means called by NewPerfMonitor(), otherwise for data dictionary + function _adodb_getdriver($provider,$drivername,$perf=false) + { + switch ($provider) { + case 'odbtp': if (strncmp('odbtp_',$drivername,6)==0) return substr($drivername,6); + case 'odbc' : if (strncmp('odbc_',$drivername,5)==0) return substr($drivername,5); + case 'ado' : if (strncmp('ado_',$drivername,4)==0) return substr($drivername,4); + case 'native': break; + default: + return $provider; + } + + switch($drivername) { + case 'mysqlt': + case 'mysqli': + $drivername='mysql'; + break; + case 'postgres7': + case 'postgres8': + $drivername = 'postgres'; + break; + case 'firebird15': $drivername = 'firebird'; break; + case 'oracle': $drivername = 'oci8'; break; + case 'access': if ($perf) $drivername = ''; break; + case 'db2' : break; + case 'sapdb' : break; + default: + $drivername = 'generic'; + break; + } + return $drivername; + } + + function NewPerfMonitor(&$conn) + { + $false = false; + $drivername = _adodb_getdriver($conn->dataProvider,$conn->databaseType,true); + if (!$drivername || $drivername == 'generic') return $false; + include_once(ADODB_DIR.'/adodb-perf.inc.php'); + @include_once(ADODB_DIR."/perf/perf-$drivername.inc.php"); + $class = "Perf_$drivername"; + if (!class_exists($class)) return $false; + $perf = new $class($conn); + + return $perf; + } + + function NewDataDictionary(&$conn,$drivername=false) + { + $false = false; + if (!$drivername) $drivername = _adodb_getdriver($conn->dataProvider,$conn->databaseType); + + include_once(ADODB_DIR.'/adodb-lib.inc.php'); + include_once(ADODB_DIR.'/adodb-datadict.inc.php'); + $path = ADODB_DIR."/datadict/datadict-$drivername.inc.php"; + + if (!file_exists($path)) { + ADOConnection::outp("Dictionary driver '$path' not available"); + return $false; + } + include_once($path); + $class = "ADODB2_$drivername"; + $dict = new $class(); + $dict->dataProvider = $conn->dataProvider; + $dict->connection = $conn; + $dict->upperName = strtoupper($drivername); + $dict->quote = $conn->nameQuote; + if (!empty($conn->_connectionID)) + $dict->serverInfo = $conn->ServerInfo(); + + return $dict; + } + + + + /* + Perform a print_r, with pre tags for better formatting. + */ + function adodb_pr($var,$as_string=false) + { + if ($as_string) ob_start(); + + if (isset($_SERVER['HTTP_USER_AGENT'])) { + echo "
\n";print_r($var);echo "
\n"; + } else + print_r($var); + + if ($as_string) { + $s = ob_get_contents(); + ob_end_clean(); + return $s; + } + } + + /* + Perform a stack-crawl and pretty print it. + + @param printOrArr Pass in a boolean to indicate print, or an $exception->trace array (assumes that print is true then). + @param levels Number of levels to display + */ + function adodb_backtrace($printOrArr=true,$levels=9999,$ishtml=null) + { + global $ADODB_INCLUDED_LIB; + if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php'); + return _adodb_backtrace($printOrArr,$levels,0,$ishtml); + } + + +} +?> diff --git a/php/pgadmin/libraries/adodb/drivers/adodb-postgres.inc.php b/php/pgadmin/libraries/adodb/drivers/adodb-postgres.inc.php new file mode 100644 index 0000000..6f580ff --- /dev/null +++ b/php/pgadmin/libraries/adodb/drivers/adodb-postgres.inc.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/drivers/adodb-postgres64.inc.php b/php/pgadmin/libraries/adodb/drivers/adodb-postgres64.inc.php new file mode 100644 index 0000000..5597d51 --- /dev/null +++ b/php/pgadmin/libraries/adodb/drivers/adodb-postgres64.inc.php @@ -0,0 +1,1071 @@ + + jlim - changed concat operator to || and data types to MetaType to match documented pgsql types + see http://www.postgresql.org/devel-corner/docs/postgres/datatype.htm + 22 Nov 2000 jlim - added changes to FetchField() and MetaTables() contributed by "raser" + 27 Nov 2000 jlim - added changes to _connect/_pconnect from ideas by "Lennie" + 15 Dec 2000 jlim - added changes suggested by Additional code changes by "Eric G. Werk" egw@netguide.dk. + 31 Jan 2002 jlim - finally installed postgresql. testing + 01 Mar 2001 jlim - Freek Dijkstra changes, also support for text type + + See http://www.varlena.com/varlena/GeneralBits/47.php + + -- What indexes are on my table? + select * from pg_indexes where tablename = 'tablename'; + + -- What triggers are on my table? + select c.relname as "Table", t.tgname as "Trigger Name", + t.tgconstrname as "Constraint Name", t.tgenabled as "Enabled", + t.tgisconstraint as "Is Constraint", cc.relname as "Referenced Table", + p.proname as "Function Name" + from pg_trigger t, pg_class c, pg_class cc, pg_proc p + where t.tgfoid = p.oid and t.tgrelid = c.oid + and t.tgconstrrelid = cc.oid + and c.relname = 'tablename'; + + -- What constraints are on my table? + select r.relname as "Table", c.conname as "Constraint Name", + contype as "Constraint Type", conkey as "Key Columns", + confkey as "Foreign Columns", consrc as "Source" + from pg_class r, pg_constraint c + where r.oid = c.conrelid + and relname = 'tablename'; + +*/ + +// security - hide paths +if (!defined('ADODB_DIR')) die(); + +function adodb_addslashes($s) +{ + $len = strlen($s); + if ($len == 0) return "''"; + if (strncmp($s,"'",1) === 0 && substr($s,$len-1) == "'") return $s; // already quoted + + return "'".addslashes($s)."'"; +} + +class ADODB_postgres64 extends ADOConnection{ + var $databaseType = 'postgres64'; + var $dataProvider = 'postgres'; + var $hasInsertID = true; + var $_resultid = false; + var $concat_operator='||'; + var $metaDatabasesSQL = "select datname from pg_database where datname not in ('template0','template1') order by 1"; + var $metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%' + and tablename not in ('sql_features', 'sql_implementation_info', 'sql_languages', + 'sql_packages', 'sql_sizing', 'sql_sizing_profiles') + union + select viewname,'V' from pg_views where viewname not like 'pg\_%'"; + //"select tablename from pg_tables where tablename not like 'pg_%' order by 1"; + var $isoDates = true; // accepts dates in ISO format + var $sysDate = "CURRENT_DATE"; + var $sysTimeStamp = "CURRENT_TIMESTAMP"; + var $blobEncodeType = 'C'; + var $metaColumnsSQL = "SELECT a.attname,t.typname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,a.attnum + FROM pg_class c, pg_attribute a,pg_type t + WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s')) and a.attname not like '....%%' +AND a.attnum > 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum"; + + // used when schema defined + var $metaColumnsSQL1 = "SELECT a.attname, t.typname, a.attlen, a.atttypmod, a.attnotnull, a.atthasdef, a.attnum +FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n +WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s')) + and c.relnamespace=n.oid and n.nspname='%s' + and a.attname not like '....%%' AND a.attnum > 0 + AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum"; + + // get primary key etc -- from Freek Dijkstra + var $metaKeySQL = "SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key + FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.oid = i.indrelid AND ic.oid = i.indexrelid AND (i.indkey[0] = a.attnum OR i.indkey[1] = a.attnum OR i.indkey[2] = a.attnum OR i.indkey[3] = a.attnum OR i.indkey[4] = a.attnum OR i.indkey[5] = a.attnum OR i.indkey[6] = a.attnum OR i.indkey[7] = a.attnum) AND a.attrelid = bc.oid AND bc.relname = '%s'"; + + var $hasAffectedRows = true; + var $hasLimit = false; // set to true for pgsql 7 only. support pgsql/mysql SELECT * FROM TABLE LIMIT 10 + // below suggested by Freek Dijkstra + var $true = 'TRUE'; // string that represents TRUE for a database + var $false = 'FALSE'; // string that represents FALSE for a database + var $fmtDate = "'Y-m-d'"; // used by DBDate() as the default date format used by the database + var $fmtTimeStamp = "'Y-m-d H:i:s'"; // used by DBTimeStamp as the default timestamp fmt. + var $hasMoveFirst = true; + var $hasGenID = true; + var $_genIDSQL = "SELECT NEXTVAL('%s')"; + var $_genSeqSQL = "CREATE SEQUENCE %s START %s"; + var $_dropSeqSQL = "DROP SEQUENCE %s"; + var $metaDefaultsSQL = "SELECT d.adnum as num, d.adsrc as def from pg_attrdef d, pg_class c where d.adrelid=c.oid and c.relname='%s' order by d.adnum"; + var $random = 'random()'; /// random function + var $autoRollback = true; // apparently pgsql does not autorollback properly before php 4.3.4 + // http://bugs.php.net/bug.php?id=25404 + + var $uniqueIisR = true; + var $_bindInputArray = false; // requires postgresql 7.3+ and ability to modify database + var $disableBlobs = false; // set to true to disable blob checking, resulting in 2-5% improvement in performance. + + // The last (fmtTimeStamp is not entirely correct: + // PostgreSQL also has support for time zones, + // and writes these time in this format: "2001-03-01 18:59:26+02". + // There is no code for the "+02" time zone information, so I just left that out. + // I'm not familiar enough with both ADODB as well as Postgres + // to know what the concequences are. The other values are correct (wheren't in 0.94) + // -- Freek Dijkstra + + function ADODB_postgres64() + { + // changes the metaColumnsSQL, adds columns: attnum[6] + } + + function ServerInfo() + { + if (isset($this->version)) return $this->version; + + $arr['description'] = $this->GetOne("select version()"); + $arr['version'] = ADOConnection::_findvers($arr['description']); + $this->version = $arr; + return $arr; + } + + function IfNull( $field, $ifNull ) + { + return " coalesce($field, $ifNull) "; + } + + // get the last id - never tested + function pg_insert_id($tablename,$fieldname) + { + $result=pg_exec($this->_connectionID, "SELECT last_value FROM ${tablename}_${fieldname}_seq"); + if ($result) { + $arr = @pg_fetch_row($result,0); + pg_freeresult($result); + if (isset($arr[0])) return $arr[0]; + } + return false; + } + +/* Warning from http://www.php.net/manual/function.pg-getlastoid.php: +Using a OID as a unique identifier is not generally wise. +Unless you are very careful, you might end up with a tuple having +a different OID if a database must be reloaded. */ + function _insertid($table,$column) + { + if (!is_resource($this->_resultid) || get_resource_type($this->_resultid) !== 'pgsql result') return false; + $oid = pg_getlastoid($this->_resultid); + // to really return the id, we need the table and column-name, else we can only return the oid != id + return empty($table) || empty($column) ? $oid : $this->GetOne("SELECT $column FROM $table WHERE oid=".(int)$oid); + } + +// I get this error with PHP before 4.0.6 - jlim +// Warning: This compilation does not support pg_cmdtuples() in adodb-postgres.inc.php on line 44 + function _affectedrows() + { + if (!is_resource($this->_resultid) || get_resource_type($this->_resultid) !== 'pgsql result') return false; + return pg_cmdtuples($this->_resultid); + } + + + // returns true/false + function BeginTrans() + { + if ($this->transOff) return true; + $this->transCnt += 1; + return @pg_Exec($this->_connectionID, "begin ".$this->_transmode); + } + + function RowLock($tables,$where,$col='1 as adodbignore') + { + if (!$this->transCnt) $this->BeginTrans(); + return $this->GetOne("select $col from $tables where $where for update"); + } + + // returns true/false. + function CommitTrans($ok=true) + { + if ($this->transOff) return true; + if (!$ok) return $this->RollbackTrans(); + + $this->transCnt -= 1; + return @pg_Exec($this->_connectionID, "commit"); + } + + // returns true/false + function RollbackTrans() + { + if ($this->transOff) return true; + $this->transCnt -= 1; + return @pg_Exec($this->_connectionID, "rollback"); + } + + function MetaTables($ttype=false,$showSchema=false,$mask=false) + { + $info = $this->ServerInfo(); + if ($info['version'] >= 7.3) { + $this->metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%' + and schemaname not in ( 'pg_catalog','information_schema') + union + select viewname,'V' from pg_views where viewname not like 'pg\_%' and schemaname not in ( 'pg_catalog','information_schema') "; + } + if ($mask) { + $save = $this->metaTablesSQL; + $mask = $this->qstr(strtolower($mask)); + if ($info['version']>=7.3) + $this->metaTablesSQL = " +select tablename,'T' from pg_tables where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema') + union +select viewname,'V' from pg_views where viewname like $mask and schemaname not in ( 'pg_catalog','information_schema') "; + else + $this->metaTablesSQL = " +select tablename,'T' from pg_tables where tablename like $mask + union +select viewname,'V' from pg_views where viewname like $mask"; + } + $ret = ADOConnection::MetaTables($ttype,$showSchema); + + if ($mask) { + $this->metaTablesSQL = $save; + } + return $ret; + } + + + // if magic quotes disabled, use pg_escape_string() + function qstr($s,$magic_quotes=false) + { + if (is_bool($s)) return $s ? 'true' : 'false'; + + if (!$magic_quotes) { + if (ADODB_PHPVER >= 0x5200) { + return "'".pg_escape_string($this->_connectionID,$s)."'"; + } + if (ADODB_PHPVER >= 0x4200) { + return "'".pg_escape_string($s)."'"; + } + if ($this->replaceQuote[0] == '\\'){ + $s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\\000"),$s); + } + return "'".str_replace("'",$this->replaceQuote,$s)."'"; + } + + // undo magic quotes for " + $s = str_replace('\\"','"',$s); + return "'$s'"; + } + + + + // Format date column in sql string given an input format that understands Y M D + function SQLDate($fmt, $col=false) + { + if (!$col) $col = $this->sysTimeStamp; + $s = 'TO_CHAR('.$col.",'"; + + $len = strlen($fmt); + for ($i=0; $i < $len; $i++) { + $ch = $fmt[$i]; + switch($ch) { + case 'Y': + case 'y': + $s .= 'YYYY'; + break; + case 'Q': + case 'q': + $s .= 'Q'; + break; + + case 'M': + $s .= 'Mon'; + break; + + case 'm': + $s .= 'MM'; + break; + case 'D': + case 'd': + $s .= 'DD'; + break; + + case 'H': + $s.= 'HH24'; + break; + + case 'h': + $s .= 'HH'; + break; + + case 'i': + $s .= 'MI'; + break; + + case 's': + $s .= 'SS'; + break; + + case 'a': + case 'A': + $s .= 'AM'; + break; + + case 'w': + $s .= 'D'; + break; + + case 'l': + $s .= 'DAY'; + break; + + case 'W': + $s .= 'WW'; + break; + + default: + // handle escape characters... + if ($ch == '\\') { + $i++; + $ch = substr($fmt,$i,1); + } + if (strpos('-/.:;, ',$ch) !== false) $s .= $ch; + else $s .= '"'.$ch.'"'; + + } + } + return $s. "')"; + } + + + + /* + * Load a Large Object from a file + * - the procedure stores the object id in the table and imports the object using + * postgres proprietary blob handling routines + * + * contributed by Mattia Rossi mattia@technologist.com + * modified for safe mode by juraj chlebec + */ + function UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB') + { + pg_exec ($this->_connectionID, "begin"); + + $fd = fopen($path,'r'); + $contents = fread($fd,filesize($path)); + fclose($fd); + + $oid = pg_lo_create($this->_connectionID); + $handle = pg_lo_open($this->_connectionID, $oid, 'w'); + pg_lo_write($handle, $contents); + pg_lo_close($handle); + + // $oid = pg_lo_import ($path); + pg_exec($this->_connectionID, "commit"); + $rs = ADOConnection::UpdateBlob($table,$column,$oid,$where,$blobtype); + $rez = !empty($rs); + return $rez; + } + + /* + * Deletes/Unlinks a Blob from the database, otherwise it + * will be left behind + * + * Returns TRUE on success or FALSE on failure. + * + * contributed by Todd Rogers todd#windfox.net + */ + function BlobDelete( $blob ) + { + pg_exec ($this->_connectionID, "begin"); + $result = @pg_lo_unlink($blob); + pg_exec ($this->_connectionID, "commit"); + return( $result ); + } + + /* + Hueristic - not guaranteed to work. + */ + function GuessOID($oid) + { + if (strlen($oid)>16) return false; + return is_numeric($oid); + } + + /* + * If an OID is detected, then we use pg_lo_* to open the oid file and read the + * real blob from the db using the oid supplied as a parameter. If you are storing + * blobs using bytea, we autodetect and process it so this function is not needed. + * + * contributed by Mattia Rossi mattia@technologist.com + * + * see http://www.postgresql.org/idocs/index.php?largeobjects.html + * + * Since adodb 4.54, this returns the blob, instead of sending it to stdout. Also + * added maxsize parameter, which defaults to $db->maxblobsize if not defined. + */ + function BlobDecode($blob,$maxsize=false,$hastrans=true) + { + if (!$this->GuessOID($blob)) return $blob; + + if ($hastrans) @pg_exec($this->_connectionID,"begin"); + $fd = @pg_lo_open($this->_connectionID,$blob,"r"); + if ($fd === false) { + if ($hastrans) @pg_exec($this->_connectionID,"commit"); + return $blob; + } + if (!$maxsize) $maxsize = $this->maxblobsize; + $realblob = @pg_loread($fd,$maxsize); + @pg_loclose($fd); + if ($hastrans) @pg_exec($this->_connectionID,"commit"); + return $realblob; + } + + /* + See http://www.postgresql.org/idocs/index.php?datatype-binary.html + + NOTE: SQL string literals (input strings) must be preceded with two backslashes + due to the fact that they must pass through two parsers in the PostgreSQL + backend. + */ + function BlobEncode($blob) + { + if (ADODB_PHPVER >= 0x5200) return pg_escape_bytea($this->_connectionID, $blob); + if (ADODB_PHPVER >= 0x4200) return pg_escape_bytea($blob); + + /*92=backslash, 0=null, 39=single-quote*/ + $badch = array(chr(92),chr(0),chr(39)); # \ null ' + $fixch = array('\\\\134','\\\\000','\\\\047'); + return adodb_str_replace($badch,$fixch,$blob); + + // note that there is a pg_escape_bytea function only for php 4.2.0 or later + } + + // assumes bytea for blob, and varchar for clob + function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') + { + + if ($blobtype == 'CLOB') { + return $this->Execute("UPDATE $table SET $column=" . $this->qstr($val) . " WHERE $where"); + } + // do not use bind params which uses qstr(), as blobencode() already quotes data + return $this->Execute("UPDATE $table SET $column='".$this->BlobEncode($val)."'::bytea WHERE $where"); + } + + function OffsetDate($dayFraction,$date=false) + { + if (!$date) $date = $this->sysDate; + else if (strncmp($date,"'",1) == 0) { + $len = strlen($date); + if (10 <= $len && $len <= 12) $date = 'date '.$date; + else $date = 'timestamp '.$date; + } + + + return "($date+interval'".($dayFraction * 1440)." minutes')"; + #return "($date+interval'$dayFraction days')"; + } + + + // for schema support, pass in the $table param "$schema.$tabname". + // converts field names to lowercase, $upper is ignored + // see http://phplens.com/lens/lensforum/msgs.php?id=14018 for more info + function MetaColumns($table,$normalize=true) + { + global $ADODB_FETCH_MODE; + + $schema = false; + $false = false; + $this->_findschema($table,$schema); + + if ($normalize) $table = strtolower($table); + + $save = $ADODB_FETCH_MODE; + $ADODB_FETCH_MODE = ADODB_FETCH_NUM; + if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); + + if ($schema) $rs = $this->Execute(sprintf($this->metaColumnsSQL1,$table,$table,$schema)); + else $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table,$table)); + if (isset($savem)) $this->SetFetchMode($savem); + $ADODB_FETCH_MODE = $save; + + if ($rs === false) { + return $false; + } + if (!empty($this->metaKeySQL)) { + // If we want the primary keys, we have to issue a separate query + // Of course, a modified version of the metaColumnsSQL query using a + // LEFT JOIN would have been much more elegant, but postgres does + // not support OUTER JOINS. So here is the clumsy way. + + $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; + + $rskey = $this->Execute(sprintf($this->metaKeySQL,($table))); + // fetch all result in once for performance. + $keys = $rskey->GetArray(); + if (isset($savem)) $this->SetFetchMode($savem); + $ADODB_FETCH_MODE = $save; + + $rskey->Close(); + unset($rskey); + } + + $rsdefa = array(); + if (!empty($this->metaDefaultsSQL)) { + $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; + $sql = sprintf($this->metaDefaultsSQL, ($table)); + $rsdef = $this->Execute($sql); + if (isset($savem)) $this->SetFetchMode($savem); + $ADODB_FETCH_MODE = $save; + + if ($rsdef) { + while (!$rsdef->EOF) { + $num = $rsdef->fields['num']; + $s = $rsdef->fields['def']; + if (strpos($s,'::')===false && substr($s, 0, 1) == "'") { /* quoted strings hack... for now... fixme */ + $s = substr($s, 1); + $s = substr($s, 0, strlen($s) - 1); + } + + $rsdefa[$num] = $s; + $rsdef->MoveNext(); + } + } else { + ADOConnection::outp( "==> SQL => " . $sql); + } + unset($rsdef); + } + + $retarr = array(); + while (!$rs->EOF) { + $fld = new ADOFieldObject(); + $fld->name = $rs->fields[0]; + $fld->type = $rs->fields[1]; + $fld->max_length = $rs->fields[2]; + $fld->attnum = $rs->fields[6]; + + if ($fld->max_length <= 0) $fld->max_length = $rs->fields[3]-4; + if ($fld->max_length <= 0) $fld->max_length = -1; + if ($fld->type == 'numeric') { + $fld->scale = $fld->max_length & 0xFFFF; + $fld->max_length >>= 16; + } + // dannym + // 5 hasdefault; 6 num-of-column + $fld->has_default = ($rs->fields[5] == 't'); + if ($fld->has_default) { + $fld->default_value = $rsdefa[$rs->fields[6]]; + } + + //Freek + $fld->not_null = $rs->fields[4] == 't'; + + + // Freek + if (is_array($keys)) { + foreach($keys as $key) { + if ($fld->name == $key['column_name'] AND $key['primary_key'] == 't') + $fld->primary_key = true; + if ($fld->name == $key['column_name'] AND $key['unique_key'] == 't') + $fld->unique = true; // What name is more compatible? + } + } + + if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld; + else $retarr[($normalize) ? strtoupper($fld->name) : $fld->name] = $fld; + + $rs->MoveNext(); + } + $rs->Close(); + if (empty($retarr)) + return $false; + else + return $retarr; + + } + + function MetaIndexes ($table, $primary = FALSE, $owner = false) + { + global $ADODB_FETCH_MODE; + + $schema = false; + $this->_findschema($table,$schema); + + if ($schema) { // requires pgsql 7.3+ - pg_namespace used. + $sql = ' +SELECT c.relname as "Name", i.indisunique as "Unique", i.indkey as "Columns" +FROM pg_catalog.pg_class c +JOIN pg_catalog.pg_index i ON i.indexrelid=c.oid +JOIN pg_catalog.pg_class c2 ON c2.oid=i.indrelid + ,pg_namespace n +WHERE (c2.relname=\'%s\' or c2.relname=lower(\'%s\')) and c.relnamespace=c2.relnamespace and c.relnamespace=n.oid and n.nspname=\'%s\''; + } else { + $sql = ' +SELECT c.relname as "Name", i.indisunique as "Unique", i.indkey as "Columns" +FROM pg_catalog.pg_class c +JOIN pg_catalog.pg_index i ON i.indexrelid=c.oid +JOIN pg_catalog.pg_class c2 ON c2.oid=i.indrelid +WHERE (c2.relname=\'%s\' or c2.relname=lower(\'%s\'))'; + } + + if ($primary == FALSE) { + $sql .= ' AND i.indisprimary=false;'; + } + + $save = $ADODB_FETCH_MODE; + $ADODB_FETCH_MODE = ADODB_FETCH_NUM; + if ($this->fetchMode !== FALSE) { + $savem = $this->SetFetchMode(FALSE); + } + + $rs = $this->Execute(sprintf($sql,$table,$table,$schema)); + if (isset($savem)) { + $this->SetFetchMode($savem); + } + $ADODB_FETCH_MODE = $save; + + if (!is_object($rs)) { + $false = false; + return $false; + } + + $col_names = $this->MetaColumnNames($table,true,true); + //3rd param is use attnum, + // see http://sourceforge.net/tracker/index.php?func=detail&aid=1451245&group_id=42718&atid=433976 + $indexes = array(); + while ($row = $rs->FetchRow()) { + $columns = array(); + foreach (explode(' ', $row[2]) as $col) { + $columns[] = $col_names[$col]; + } + + $indexes[$row[0]] = array( + 'unique' => ($row[1] == 't'), + 'columns' => $columns + ); + } + return $indexes; + } + + // returns true or false + // + // examples: + // $db->Connect("host=host1 user=user1 password=secret port=4341"); + // $db->Connect('host1','user1','secret'); + function _connect($str,$user='',$pwd='',$db='',$ctype=0) + { + + if (!function_exists('pg_connect')) return null; + + $this->_errorMsg = false; + + if ($user || $pwd || $db) { + $user = adodb_addslashes($user); + $pwd = adodb_addslashes($pwd); + if (strlen($db) == 0) $db = 'template1'; + $db = adodb_addslashes($db); + if ($str) { + $host = explode(":", $str); + if ($host[0]) $str = "host=".adodb_addslashes($host[0]); + else $str = ''; + if (isset($host[1])) $str .= " port=$host[1]"; + else if (!empty($this->port)) $str .= " port=".$this->port; + } + if ($user) $str .= " user=".$user; + if ($pwd) $str .= " password=".$pwd; + if ($db) $str .= " dbname=".$db; + } + + //if ($user) $linea = "user=$user host=$linea password=$pwd dbname=$db port=5432"; + + if ($ctype === 1) { // persistent + $this->_connectionID = pg_pconnect($str); + } else { + if ($ctype === -1) { // nconnect, we trick pgsql ext by changing the connection str + static $ncnt; + + if (empty($ncnt)) $ncnt = 1; + else $ncnt += 1; + + $str .= str_repeat(' ',$ncnt); + } + $this->_connectionID = @pg_connect($str); + } + if ($this->_connectionID === false) return false; + $this->Execute("set datestyle='ISO'"); + + $info = $this->ServerInfo(); + $this->pgVersion = (float) substr($info['version'],0,3); + if ($this->pgVersion >= 7.1) { // good till version 999 + $this->_nestedSQL = true; + } + return true; + } + + function _nconnect($argHostname, $argUsername, $argPassword, $argDatabaseName) + { + return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabaseName,-1); + } + + // returns true or false + // + // examples: + // $db->PConnect("host=host1 user=user1 password=secret port=4341"); + // $db->PConnect('host1','user1','secret'); + function _pconnect($str,$user='',$pwd='',$db='') + { + return $this->_connect($str,$user,$pwd,$db,1); + } + + + // returns queryID or false + function _query($sql,$inputarr=false) + { + $this->_errorMsg = false; + if ($inputarr) { + /* + It appears that PREPARE/EXECUTE is slower for many queries. + + For query executed 1000 times: + "select id,firstname,lastname from adoxyz + where firstname not like ? and lastname not like ? and id = ?" + + with plan = 1.51861286163 secs + no plan = 1.26903700829 secs + + + + */ + $plan = 'P'.md5($sql); + + $execp = ''; + foreach($inputarr as $v) { + if ($execp) $execp .= ','; + if (is_string($v)) { + if (strncmp($v,"'",1) !== 0) $execp .= $this->qstr($v); + } else { + $execp .= $v; + } + } + + if ($execp) $exsql = "EXECUTE $plan ($execp)"; + else $exsql = "EXECUTE $plan"; + + + $rez = @pg_exec($this->_connectionID,$exsql); + if (!$rez) { + # Perhaps plan does not exist? Prepare/compile plan. + $params = ''; + foreach($inputarr as $v) { + if ($params) $params .= ','; + if (is_string($v)) { + $params .= 'VARCHAR'; + } else if (is_integer($v)) { + $params .= 'INTEGER'; + } else { + $params .= "REAL"; + } + } + $sqlarr = explode('?',$sql); + //print_r($sqlarr); + $sql = ''; + $i = 1; + foreach($sqlarr as $v) { + $sql .= $v.' $'.$i; + $i++; + } + $s = "PREPARE $plan ($params) AS ".substr($sql,0,strlen($sql)-2); + //adodb_pr($s); + $rez = pg_exec($this->_connectionID,$s); + //echo $this->ErrorMsg(); + } + if ($rez) + $rez = pg_exec($this->_connectionID,$exsql); + } else { + //adodb_backtrace(); + $rez = pg_exec($this->_connectionID,$sql); + } + // check if no data returned, then no need to create real recordset + if ($rez && pg_numfields($rez) <= 0) { + if (is_resource($this->_resultid) && get_resource_type($this->_resultid) === 'pgsql result') { + pg_freeresult($this->_resultid); + } + $this->_resultid = $rez; + return true; + } + + return $rez; + } + + function _errconnect() + { + if (defined('DB_ERROR_CONNECT_FAILED')) return DB_ERROR_CONNECT_FAILED; + else return 'Database connection failed'; + } + + /* Returns: the last error message from previous database operation */ + function ErrorMsg() + { + if ($this->_errorMsg !== false) return $this->_errorMsg; + if (ADODB_PHPVER >= 0x4300) { + if (!empty($this->_resultid)) { + $this->_errorMsg = @pg_result_error($this->_resultid); + if ($this->_errorMsg) return $this->_errorMsg; + } + + if (!empty($this->_connectionID)) { + $this->_errorMsg = @pg_last_error($this->_connectionID); + } else $this->_errorMsg = $this->_errconnect(); + } else { + if (empty($this->_connectionID)) $this->_errconnect(); + else $this->_errorMsg = @pg_errormessage($this->_connectionID); + } + return $this->_errorMsg; + } + + function ErrorNo() + { + $e = $this->ErrorMsg(); + if (strlen($e)) { + return ADOConnection::MetaError($e); + } + return 0; + } + + // returns true or false + function _close() + { + if ($this->transCnt) $this->RollbackTrans(); + if ($this->_resultid) { + @pg_freeresult($this->_resultid); + $this->_resultid = false; + } + @pg_close($this->_connectionID); + $this->_connectionID = false; + return true; + } + + + /* + * Maximum size of C field + */ + function CharMax() + { + return 1000000000; // should be 1 Gb? + } + + /* + * Maximum size of X field + */ + function TextMax() + { + return 1000000000; // should be 1 Gb? + } + + +} + +/*-------------------------------------------------------------------------------------- + Class Name: Recordset +--------------------------------------------------------------------------------------*/ + +class ADORecordSet_postgres64 extends ADORecordSet{ + var $_blobArr; + var $databaseType = "postgres64"; + var $canSeek = true; + function ADORecordSet_postgres64($queryID,$mode=false) + { + if ($mode === false) { + global $ADODB_FETCH_MODE; + $mode = $ADODB_FETCH_MODE; + } + switch ($mode) + { + case ADODB_FETCH_NUM: $this->fetchMode = PGSQL_NUM; break; + case ADODB_FETCH_ASSOC:$this->fetchMode = PGSQL_ASSOC; break; + + case ADODB_FETCH_DEFAULT: + case ADODB_FETCH_BOTH: + default: $this->fetchMode = PGSQL_BOTH; break; + } + $this->adodbFetchMode = $mode; + $this->ADORecordSet($queryID); + } + + function GetRowAssoc($upper=true) + { + if ($this->fetchMode == PGSQL_ASSOC && !$upper) return $this->fields; + $row = ADORecordSet::GetRowAssoc($upper); + return $row; + } + + function _initrs() + { + global $ADODB_COUNTRECS; + $qid = $this->_queryID; + $this->_numOfRows = ($ADODB_COUNTRECS)? @pg_numrows($qid):-1; + $this->_numOfFields = @pg_numfields($qid); + + // cache types for blob decode check + // apparently pg_fieldtype actually performs an sql query on the database to get the type. + if (empty($this->connection->noBlobs)) + for ($i=0, $max = $this->_numOfFields; $i < $max; $i++) { + if (pg_fieldtype($qid,$i) == 'bytea') { + $this->_blobArr[$i] = pg_fieldname($qid,$i); + } + } + } + + /* Use associative array to get fields array */ + function Fields($colname) + { + if ($this->fetchMode != PGSQL_NUM) return @$this->fields[$colname]; + + if (!$this->bind) { + $this->bind = array(); + for ($i=0; $i < $this->_numOfFields; $i++) { + $o = $this->FetchField($i); + $this->bind[strtoupper($o->name)] = $i; + } + } + return $this->fields[$this->bind[strtoupper($colname)]]; + } + + function FetchField($off = 0) + { + // offsets begin at 0 + + $o= new ADOFieldObject(); + $o->name = @pg_fieldname($this->_queryID,$off); + $o->type = @pg_fieldtype($this->_queryID,$off); + $o->max_length = @pg_fieldsize($this->_queryID,$off); + return $o; + } + + function _seek($row) + { + return @pg_fetch_row($this->_queryID,$row); + } + + function _decode($blob) + { + if ($blob === NULL) return NULL; + eval('$realblob="'.adodb_str_replace(array('"','$'),array('\"','\$'),$blob).'";'); + return $realblob; + } + + function _fixblobs() + { + if ($this->fetchMode == PGSQL_NUM || $this->fetchMode == PGSQL_BOTH) { + foreach($this->_blobArr as $k => $v) { + $this->fields[$k] = ADORecordSet_postgres64::_decode($this->fields[$k]); + } + } + if ($this->fetchMode == PGSQL_ASSOC || $this->fetchMode == PGSQL_BOTH) { + foreach($this->_blobArr as $k => $v) { + $this->fields[$v] = ADORecordSet_postgres64::_decode($this->fields[$v]); + } + } + } + + // 10% speedup to move MoveNext to child class + function MoveNext() + { + if (!$this->EOF) { + $this->_currentRow++; + if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) { + $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode); + if (is_array($this->fields) && $this->fields) { + if (isset($this->_blobArr)) $this->_fixblobs(); + return true; + } + } + $this->fields = false; + $this->EOF = true; + } + return false; + } + + function _fetch() + { + + if ($this->_currentRow >= $this->_numOfRows && $this->_numOfRows >= 0) + return false; + + $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode); + + if ($this->fields && isset($this->_blobArr)) $this->_fixblobs(); + + return (is_array($this->fields)); + } + + function _close() + { + return @pg_freeresult($this->_queryID); + } + + function MetaType($t,$len=-1,$fieldobj=false) + { + if (is_object($t)) { + $fieldobj = $t; + $t = $fieldobj->type; + $len = $fieldobj->max_length; + } + switch (strtoupper($t)) { + case 'MONEY': // stupid, postgres expects money to be a string + case 'INTERVAL': + case 'CHAR': + case 'CHARACTER': + case 'VARCHAR': + case 'NAME': + case 'BPCHAR': + case '_VARCHAR': + case 'INET': + case 'MACADDR': + if ($len <= $this->blobSize) return 'C'; + + case 'TEXT': + return 'X'; + + case 'IMAGE': // user defined type + case 'BLOB': // user defined type + case 'BIT': // This is a bit string, not a single bit, so don't return 'L' + case 'VARBIT': + case 'BYTEA': + return 'B'; + + case 'BOOL': + case 'BOOLEAN': + return 'L'; + + case 'DATE': + return 'D'; + + + case 'TIMESTAMP WITHOUT TIME ZONE': + case 'TIME': + case 'DATETIME': + case 'TIMESTAMP': + case 'TIMESTAMPTZ': + return 'T'; + + case 'SMALLINT': + case 'BIGINT': + case 'INTEGER': + case 'INT8': + case 'INT4': + case 'INT2': + if (isset($fieldobj) && + empty($fieldobj->primary_key) && (!$this->connection->uniqueIisR || empty($fieldobj->unique))) return 'I'; + + case 'OID': + case 'SERIAL': + return 'R'; + + default: + return 'N'; + } + } + +} +?> diff --git a/php/pgadmin/libraries/adodb/drivers/adodb-postgres7.inc.php b/php/pgadmin/libraries/adodb/drivers/adodb-postgres7.inc.php new file mode 100644 index 0000000..eecfdc3 --- /dev/null +++ b/php/pgadmin/libraries/adodb/drivers/adodb-postgres7.inc.php @@ -0,0 +1,313 @@ +ADODB_postgres64(); + if (ADODB_ASSOC_CASE !== 2) { + $this->rsPrefix .= 'assoc_'; + } + $this->_bindInputArray = PHP_VERSION >= 5.1; + } + + + // the following should be compat with postgresql 7.2, + // which makes obsolete the LIMIT limit,offset syntax + function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) + { + $offsetStr = ($offset >= 0) ? " OFFSET ".((integer)$offset) : ''; + $limitStr = ($nrows >= 0) ? " LIMIT ".((integer)$nrows) : ''; + if ($secs2cache) + $rs = $this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr); + else + $rs = $this->Execute($sql."$limitStr$offsetStr",$inputarr); + + return $rs; + } + /* + function Prepare($sql) + { + $info = $this->ServerInfo(); + if ($info['version']>=7.3) { + return array($sql,false); + } + return $sql; + } + */ + + /* + I discovered that the MetaForeignKeys method no longer worked for Postgres 8.3. + I went ahead and modified it to work for both 8.2 and 8.3. + Please feel free to include this change in your next release of adodb. + William Kolodny [William.Kolodny#gt-t.net] + */ + function MetaForeignKeys($table, $owner=false, $upper=false) + { + $sql=" + SELECT fum.ftblname AS lookup_table, split_part(fum.rf, ')'::text, 1) AS lookup_field, + fum.ltable AS dep_table, split_part(fum.lf, ')'::text, 1) AS dep_field + FROM ( + SELECT fee.ltable, fee.ftblname, fee.consrc, split_part(fee.consrc,'('::text, 2) AS lf, + split_part(fee.consrc, '('::text, 3) AS rf + FROM ( + SELECT foo.relname AS ltable, foo.ftblname, + pg_get_constraintdef(foo.oid) AS consrc + FROM ( + SELECT c.oid, c.conname AS name, t.relname, ft.relname AS ftblname + FROM pg_constraint c + JOIN pg_class t ON (t.oid = c.conrelid) + JOIN pg_class ft ON (ft.oid = c.confrelid) + JOIN pg_namespace nft ON (nft.oid = ft.relnamespace) + LEFT JOIN pg_description ds ON (ds.objoid = c.oid) + JOIN pg_namespace n ON (n.oid = t.relnamespace) + WHERE c.contype = 'f'::\"char\" + ORDER BY t.relname, n.nspname, c.conname, c.oid + ) foo + ) fee) fum + WHERE fum.ltable='".strtolower($table)."' + ORDER BY fum.ftblname, fum.ltable, split_part(fum.lf, ')'::text, 1) + "; + $rs = $this->Execute($sql); + + if (!$rs || $rs->EOF) return false; + + $a = array(); + while (!$rs->EOF) { + if ($upper) { + $a[strtoupper($rs->Fields('lookup_table'))][] = strtoupper(str_replace('"','',$rs->Fields('dep_field').'='.$rs->Fields('lookup_field'))); + } else { + $a[$rs->Fields('lookup_table')][] = str_replace('"','',$rs->Fields('dep_field').'='.$rs->Fields('lookup_field')); + } + $rs->MoveNext(); + } + + return $a; + + } + + // from Edward Jaramilla, improved version - works on pg 7.4 + function _old_MetaForeignKeys($table, $owner=false, $upper=false) + { + $sql = 'SELECT t.tgargs as args + FROM + pg_trigger t,pg_class c,pg_proc p + WHERE + t.tgenabled AND + t.tgrelid = c.oid AND + t.tgfoid = p.oid AND + p.proname = \'RI_FKey_check_ins\' AND + c.relname = \''.strtolower($table).'\' + ORDER BY + t.tgrelid'; + + $rs = $this->Execute($sql); + + if (!$rs || $rs->EOF) return false; + + $arr = $rs->GetArray(); + $a = array(); + foreach($arr as $v) { + $data = explode(chr(0), $v['args']); + $size = count($data)-1; //-1 because the last node is empty + for($i = 4; $i < $size; $i++) { + if ($upper) + $a[strtoupper($data[2])][] = strtoupper($data[$i].'='.$data[++$i]); + else + $a[$data[2]][] = $data[$i].'='.$data[++$i]; + } + } + return $a; + } + + function _query($sql,$inputarr=false) + { + if (! $this->_bindInputArray) { + // We don't have native support for parameterized queries, so let's emulate it at the parent + return ADODB_postgres64::_query($sql, $inputarr); + } + $this->_errorMsg = false; + // -- added Cristiano da Cunha Duarte + if ($inputarr) { + $sqlarr = explode('?',trim($sql)); + $sql = ''; + $i = 1; + $last = sizeof($sqlarr)-1; + foreach($sqlarr as $v) { + if ($last < $i) $sql .= $v; + else $sql .= $v.' $'.$i; + $i++; + } + + $rez = pg_query_params($this->_connectionID,$sql, $inputarr); + } else { + $rez = pg_query($this->_connectionID,$sql); + } + // check if no data returned, then no need to create real recordset + if ($rez && pg_numfields($rez) <= 0) { + if (is_resource($this->_resultid) && get_resource_type($this->_resultid) === 'pgsql result') { + pg_freeresult($this->_resultid); + } + $this->_resultid = $rez; + return true; + } + return $rez; + } + + // this is a set of functions for managing client encoding - very important if the encodings + // of your database and your output target (i.e. HTML) don't match + //for instance, you may have UNICODE database and server it on-site as WIN1251 etc. + // GetCharSet - get the name of the character set the client is using now + // the functions should work with Postgres 7.0 and above, the set of charsets supported + // depends on compile flags of postgres distribution - if no charsets were compiled into the server + // it will return 'SQL_ANSI' always + function GetCharSet() + { + //we will use ADO's builtin property charSet + $this->charSet = @pg_client_encoding($this->_connectionID); + if (!$this->charSet) { + return false; + } else { + return $this->charSet; + } + } + + // SetCharSet - switch the client encoding + function SetCharSet($charset_name) + { + $this->GetCharSet(); + if ($this->charSet !== $charset_name) { + $if = pg_set_client_encoding($this->_connectionID, $charset_name); + if ($if == "0" & $this->GetCharSet() == $charset_name) { + return true; + } else return false; + } else return true; + } + +} + +/*-------------------------------------------------------------------------------------- + Class Name: Recordset +--------------------------------------------------------------------------------------*/ + +class ADORecordSet_postgres7 extends ADORecordSet_postgres64{ + + var $databaseType = "postgres7"; + + + function ADORecordSet_postgres7($queryID,$mode=false) + { + $this->ADORecordSet_postgres64($queryID,$mode); + } + + // 10% speedup to move MoveNext to child class + function MoveNext() + { + if (!$this->EOF) { + $this->_currentRow++; + if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) { + $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode); + + if (is_array($this->fields)) { + if ($this->fields && isset($this->_blobArr)) $this->_fixblobs(); + return true; + } + } + $this->fields = false; + $this->EOF = true; + } + return false; + } + +} + +class ADORecordSet_assoc_postgres7 extends ADORecordSet_postgres64{ + + var $databaseType = "postgres7"; + + + function ADORecordSet_assoc_postgres7($queryID,$mode=false) + { + $this->ADORecordSet_postgres64($queryID,$mode); + } + + function _fetch() + { + if ($this->_currentRow >= $this->_numOfRows && $this->_numOfRows >= 0) + return false; + + $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode); + + if ($this->fields) { + if (isset($this->_blobArr)) $this->_fixblobs(); + $this->_updatefields(); + } + + return (is_array($this->fields)); + } + + // Create associative array + function _updatefields() + { + if (ADODB_ASSOC_CASE == 2) return; // native + + $arr = array(); + $lowercase = (ADODB_ASSOC_CASE == 0); + + foreach($this->fields as $k => $v) { + if (is_integer($k)) $arr[$k] = $v; + else { + if ($lowercase) + $arr[strtolower($k)] = $v; + else + $arr[strtoupper($k)] = $v; + } + } + $this->fields = $arr; + } + + function MoveNext() + { + if (!$this->EOF) { + $this->_currentRow++; + if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) { + $this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode); + + if (is_array($this->fields)) { + if ($this->fields) { + if (isset($this->_blobArr)) $this->_fixblobs(); + + $this->_updatefields(); + } + return true; + } + } + + + $this->fields = false; + $this->EOF = true; + } + return false; + } +} +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/drivers/adodb-postgres8.inc.php b/php/pgadmin/libraries/adodb/drivers/adodb-postgres8.inc.php new file mode 100644 index 0000000..3134e3c --- /dev/null +++ b/php/pgadmin/libraries/adodb/drivers/adodb-postgres8.inc.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-ar.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-ar.inc.php new file mode 100644 index 0000000..4b75095 --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-ar.inc.php @@ -0,0 +1,33 @@ + +$ADODB_LANG_ARRAY = array ( + 'LANG' => 'ar', + DB_ERROR => ' ', + DB_ERROR_ALREADY_EXISTS => ' ', + DB_ERROR_CANNOT_CREATE => ' ', + DB_ERROR_CANNOT_DELETE => ' ', + DB_ERROR_CANNOT_DROP => ' ', + DB_ERROR_CONSTRAINT => ' ', + DB_ERROR_DIVZERO => ' ', + DB_ERROR_INVALID => ' ', + DB_ERROR_INVALID_DATE => ' ', + DB_ERROR_INVALID_NUMBER => ' ', + DB_ERROR_MISMATCH => ' ', + DB_ERROR_NODBSELECTED => ' ', + DB_ERROR_NOSUCHFIELD => ' ', + DB_ERROR_NOSUCHTABLE => ' ', + DB_ERROR_NOT_CAPABLE => ' ', + DB_ERROR_NOT_FOUND => ' ', + DB_ERROR_NOT_LOCKED => ' ', + DB_ERROR_SYNTAX => ' ', + DB_ERROR_UNSUPPORTED => ' ', + DB_ERROR_VALUE_COUNT_ON_ROW => ' ', + DB_ERROR_INVALID_DSN => 'DSN ', + DB_ERROR_CONNECT_FAILED => ' ', + 0 => ' ', // DB_OK + DB_ERROR_NEED_MORE_DATA => ' ', + DB_ERROR_EXTENSION_NOT_FOUND=> ' ', + DB_ERROR_NOSUCHDB => ' ', + DB_ERROR_ACCESS_VIOLATION => ' ' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-bg.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-bg.inc.php new file mode 100644 index 0000000..ee307c1 --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-bg.inc.php @@ -0,0 +1,37 @@ + +*/ + +$ADODB_LANG_ARRAY = array ( + 'LANG' => 'bg', + DB_ERROR => ' ', + DB_ERROR_ALREADY_EXISTS => ' ', + DB_ERROR_CANNOT_CREATE => ' ', + DB_ERROR_CANNOT_DELETE => ' ', + DB_ERROR_CANNOT_DROP => ' ', + DB_ERROR_CONSTRAINT => ' ', + DB_ERROR_DIVZERO => ' ', + DB_ERROR_INVALID => '', + DB_ERROR_INVALID_DATE => ' ', + DB_ERROR_INVALID_NUMBER => ' ', + DB_ERROR_MISMATCH => ' ', + DB_ERROR_NODBSELECTED => ' ', + DB_ERROR_NOSUCHFIELD => ' ', + DB_ERROR_NOSUCHTABLE => ' ', + DB_ERROR_NOT_CAPABLE => 'DB backend not capable', + DB_ERROR_NOT_FOUND => ' ', + DB_ERROR_NOT_LOCKED => ' ', + DB_ERROR_SYNTAX => ' ', + DB_ERROR_UNSUPPORTED => ' ', + DB_ERROR_VALUE_COUNT_ON_ROW => ' ', + DB_ERROR_INVALID_DSN => ' DSN', + DB_ERROR_CONNECT_FAILED => ' ', + 0 => ' ', // DB_OK + DB_ERROR_NEED_MORE_DATA => ' ', + DB_ERROR_EXTENSION_NOT_FOUND=> ' ', + DB_ERROR_NOSUCHDB => ' ', + DB_ERROR_ACCESS_VIOLATION => ' ' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-bgutf8.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-bgutf8.inc.php new file mode 100644 index 0000000..5281ed5 --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-bgutf8.inc.php @@ -0,0 +1,37 @@ + +*/ + +$ADODB_LANG_ARRAY = array ( + 'LANG' => 'bgutf8', + DB_ERROR => 'неизвестна грешка', + DB_ERROR_ALREADY_EXISTS => 'вече съществува', + DB_ERROR_CANNOT_CREATE => 'не може да бъде създадена', + DB_ERROR_CANNOT_DELETE => 'не може да бъде изтрита', + DB_ERROR_CANNOT_DROP => 'не може да бъде унищожена', + DB_ERROR_CONSTRAINT => 'нарушено условие', + DB_ERROR_DIVZERO => 'деление на нула', + DB_ERROR_INVALID => 'неправилно', + DB_ERROR_INVALID_DATE => 'некоректна дата или час', + DB_ERROR_INVALID_NUMBER => 'невалиден номер', + DB_ERROR_MISMATCH => 'погрешна употреба', + DB_ERROR_NODBSELECTED => 'не е избрана база данни', + DB_ERROR_NOSUCHFIELD => 'несъществуващо поле', + DB_ERROR_NOSUCHTABLE => 'несъществуваща таблица', + DB_ERROR_NOT_CAPABLE => 'DB backend not capable', + DB_ERROR_NOT_FOUND => 'не е намерена', + DB_ERROR_NOT_LOCKED => 'не е заключена', + DB_ERROR_SYNTAX => 'грешен синтаксис', + DB_ERROR_UNSUPPORTED => 'не се поддържа', + DB_ERROR_VALUE_COUNT_ON_ROW => 'некоректен брой колони в реда', + DB_ERROR_INVALID_DSN => 'невалиден DSN', + DB_ERROR_CONNECT_FAILED => 'връзката не може да бъде осъществена', + 0 => 'няма грешки', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'предоставените данни са недостатъчни', + DB_ERROR_EXTENSION_NOT_FOUND=> 'разширението не е намерено', + DB_ERROR_NOSUCHDB => 'несъществуваща база данни', + DB_ERROR_ACCESS_VIOLATION => 'нямате достатъчно права' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-ca.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-ca.inc.php new file mode 100644 index 0000000..3640ebd --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-ca.inc.php @@ -0,0 +1,34 @@ + 'ca', + DB_ERROR => 'error desconegut', + DB_ERROR_ALREADY_EXISTS => 'ja existeix', + DB_ERROR_CANNOT_CREATE => 'no es pot crear', + DB_ERROR_CANNOT_DELETE => 'no es pot esborrar', + DB_ERROR_CANNOT_DROP => 'no es pot eliminar', + DB_ERROR_CONSTRAINT => 'violaci de constraint', + DB_ERROR_DIVZERO => 'divisi per zero', + DB_ERROR_INVALID => 'no s vlid', + DB_ERROR_INVALID_DATE => 'la data o l\'hora no sn vlides', + DB_ERROR_INVALID_NUMBER => 'el nombre no s vlid', + DB_ERROR_MISMATCH => 'no hi ha coincidncia', + DB_ERROR_NODBSELECTED => 'cap base de dades seleccionada', + DB_ERROR_NOSUCHFIELD => 'camp inexistent', + DB_ERROR_NOSUCHTABLE => 'taula inexistent', + DB_ERROR_NOT_CAPABLE => 'l\'execuci secundria de DB no pot', + DB_ERROR_NOT_FOUND => 'no trobat', + DB_ERROR_NOT_LOCKED => 'no blocat', + DB_ERROR_SYNTAX => 'error de sintaxi', + DB_ERROR_UNSUPPORTED => 'no suportat', + DB_ERROR_VALUE_COUNT_ON_ROW => 'el nombre de columnes no coincideix amb el nombre de valors en la fila', + DB_ERROR_INVALID_DSN => 'el DSN no s vlid', + DB_ERROR_CONNECT_FAILED => 'connexi fallida', + 0 => 'cap error', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'les dades subministrades sn insuficients', + DB_ERROR_EXTENSION_NOT_FOUND=> 'extensi no trobada', + DB_ERROR_NOSUCHDB => 'base de dades inexistent', + DB_ERROR_ACCESS_VIOLATION => 'permisos insuficients' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-cn.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-cn.inc.php new file mode 100644 index 0000000..eb8c7de --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-cn.inc.php @@ -0,0 +1,35 @@ + 'cn', + DB_ERROR => 'δ֪', + DB_ERROR_ALREADY_EXISTS => 'Ѿ', + DB_ERROR_CANNOT_CREATE => 'ܴ', + DB_ERROR_CANNOT_DELETE => 'ɾ', + DB_ERROR_CANNOT_DROP => 'ܶ', + DB_ERROR_CONSTRAINT => 'Լ', + DB_ERROR_DIVZERO => '0', + DB_ERROR_INVALID => 'Ч', + DB_ERROR_INVALID_DATE => 'Чڻʱ', + DB_ERROR_INVALID_NUMBER => 'Ч', + DB_ERROR_MISMATCH => 'ƥ', + DB_ERROR_NODBSELECTED => 'ûݿⱻѡ', + DB_ERROR_NOSUCHFIELD => 'ûӦֶ', + DB_ERROR_NOSUCHTABLE => 'ûӦı', + DB_ERROR_NOT_CAPABLE => 'ݿ̨', + DB_ERROR_NOT_FOUND => 'ûз', + DB_ERROR_NOT_LOCKED => 'ûб', + DB_ERROR_SYNTAX => '﷨', + DB_ERROR_UNSUPPORTED => '֧', + DB_ERROR_VALUE_COUNT_ON_ROW => 'ۼֵ', + DB_ERROR_INVALID_DSN => 'ЧԴ (DSN)', + DB_ERROR_CONNECT_FAILED => 'ʧ', + 0 => 'ûд', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'ṩݲܷҪ', + DB_ERROR_EXTENSION_NOT_FOUND=> 'չûб', + DB_ERROR_NOSUCHDB => 'ûӦݿ', + DB_ERROR_ACCESS_VIOLATION => 'ûкʵȨ' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-cz.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-cz.inc.php new file mode 100644 index 0000000..2424c24 --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-cz.inc.php @@ -0,0 +1,40 @@ + + +$ADODB_LANG_ARRAY = array ( + 'LANG' => 'cz', + DB_ERROR => 'neznm chyba', + DB_ERROR_ALREADY_EXISTS => 'ji? existuje', + DB_ERROR_CANNOT_CREATE => 'nelze vytvo?it', + DB_ERROR_CANNOT_DELETE => 'nelze smazat', + DB_ERROR_CANNOT_DROP => 'nelze odstranit', + DB_ERROR_CONSTRAINT => 'poru?en omezujc podmnky', + DB_ERROR_DIVZERO => 'd?len nulou', + DB_ERROR_INVALID => 'neplatn', + DB_ERROR_INVALID_DATE => 'neplatn datum nebo ?as', + DB_ERROR_INVALID_NUMBER => 'neplatn ?slo', + DB_ERROR_MISMATCH => 'nesouhlas', + DB_ERROR_NODBSELECTED => '?dn databze nen vybrna', + DB_ERROR_NOSUCHFIELD => 'pole nenalezeno', + DB_ERROR_NOSUCHTABLE => 'tabulka nenalezena', + DB_ERROR_NOT_CAPABLE => 'nepodporovno', + DB_ERROR_NOT_FOUND => 'nenalezeno', + DB_ERROR_NOT_LOCKED => 'nezam?eno', + DB_ERROR_SYNTAX => 'syntaktick chyba', + DB_ERROR_UNSUPPORTED => 'nepodporovno', + DB_ERROR_VALUE_COUNT_ON_ROW => '', + DB_ERROR_INVALID_DSN => 'neplatn DSN', + DB_ERROR_CONNECT_FAILED => 'p?ipojen selhalo', + 0 => 'bez chyb', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'mlo zdrojovch dat', + DB_ERROR_EXTENSION_NOT_FOUND=> 'roz??en nenalezeno', + DB_ERROR_NOSUCHDB => 'databze neexistuje', + DB_ERROR_ACCESS_VIOLATION => 'nedostate?n prva' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-da.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-da.inc.php new file mode 100644 index 0000000..ca0e72d --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-da.inc.php @@ -0,0 +1,33 @@ + 'da', + DB_ERROR => 'ukendt fejl', + DB_ERROR_ALREADY_EXISTS => 'eksisterer allerede', + DB_ERROR_CANNOT_CREATE => 'kan ikke oprette', + DB_ERROR_CANNOT_DELETE => 'kan ikke slette', + DB_ERROR_CANNOT_DROP => 'kan ikke droppe', + DB_ERROR_CONSTRAINT => 'begrænsning krænket', + DB_ERROR_DIVZERO => 'division med nul', + DB_ERROR_INVALID => 'ugyldig', + DB_ERROR_INVALID_DATE => 'ugyldig dato eller klokkeslet', + DB_ERROR_INVALID_NUMBER => 'ugyldigt tal', + DB_ERROR_MISMATCH => 'mismatch', + DB_ERROR_NODBSELECTED => 'ingen database valgt', + DB_ERROR_NOSUCHFIELD => 'felt findes ikke', + DB_ERROR_NOSUCHTABLE => 'tabel findes ikke', + DB_ERROR_NOT_CAPABLE => 'DB backend opgav', + DB_ERROR_NOT_FOUND => 'ikke fundet', + DB_ERROR_NOT_LOCKED => 'ikke låst', + DB_ERROR_SYNTAX => 'syntaksfejl', + DB_ERROR_UNSUPPORTED => 'ikke understøttet', + DB_ERROR_VALUE_COUNT_ON_ROW => 'resulterende antal felter svarer ikke til forespørgslens antal felter', + DB_ERROR_INVALID_DSN => 'ugyldig DSN', + DB_ERROR_CONNECT_FAILED => 'tilslutning mislykkedes', + 0 => 'ingen fejl', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'utilstrækkelige data angivet', + DB_ERROR_EXTENSION_NOT_FOUND=> 'udvidelse ikke fundet', + DB_ERROR_NOSUCHDB => 'database ikke fundet', + DB_ERROR_ACCESS_VIOLATION => 'utilstrækkelige rettigheder' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-de.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-de.inc.php new file mode 100644 index 0000000..244cb2f --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-de.inc.php @@ -0,0 +1,33 @@ + +$ADODB_LANG_ARRAY = array ( + 'LANG' => 'de', + DB_ERROR => 'Unbekannter Fehler', + DB_ERROR_ALREADY_EXISTS => 'existiert bereits', + DB_ERROR_CANNOT_CREATE => 'kann nicht erstellen', + DB_ERROR_CANNOT_DELETE => 'kann nicht löschen', + DB_ERROR_CANNOT_DROP => 'Tabelle oder Index konnte nicht gelöscht werden', + DB_ERROR_CONSTRAINT => 'Constraint Verletzung', + DB_ERROR_DIVZERO => 'Division durch Null', + DB_ERROR_INVALID => 'ung¨ltig', + DB_ERROR_INVALID_DATE => 'ung¨ltiges Datum oder Zeit', + DB_ERROR_INVALID_NUMBER => 'ung¨ltige Zahl', + DB_ERROR_MISMATCH => 'Unverträglichkeit', + DB_ERROR_NODBSELECTED => 'keine Dantebank ausgewählt', + DB_ERROR_NOSUCHFIELD => 'Feld nicht vorhanden', + DB_ERROR_NOSUCHTABLE => 'Tabelle nicht vorhanden', + DB_ERROR_NOT_CAPABLE => 'Funktion nicht installiert', + DB_ERROR_NOT_FOUND => 'nicht gefunden', + DB_ERROR_NOT_LOCKED => 'nicht gesperrt', + DB_ERROR_SYNTAX => 'Syntaxfehler', + DB_ERROR_UNSUPPORTED => 'nicht Unterst¨tzt', + DB_ERROR_VALUE_COUNT_ON_ROW => 'Anzahl der zur¨ckgelieferten Felder entspricht nicht der Anzahl der Felder in der Abfrage', + DB_ERROR_INVALID_DSN => 'ung¨ltiger DSN', + DB_ERROR_CONNECT_FAILED => 'Verbindung konnte nicht hergestellt werden', + 0 => 'kein Fehler', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'Nicht gen¨gend Daten geliefert', + DB_ERROR_EXTENSION_NOT_FOUND=> 'erweiterung nicht gefunden', + DB_ERROR_NOSUCHDB => 'keine Datenbank', + DB_ERROR_ACCESS_VIOLATION => 'ungen¨gende Rechte' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-en.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-en.inc.php new file mode 100644 index 0000000..6895995 --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-en.inc.php @@ -0,0 +1,33 @@ + 'en', + DB_ERROR => 'unknown error', + DB_ERROR_ALREADY_EXISTS => 'already exists', + DB_ERROR_CANNOT_CREATE => 'can not create', + DB_ERROR_CANNOT_DELETE => 'can not delete', + DB_ERROR_CANNOT_DROP => 'can not drop', + DB_ERROR_CONSTRAINT => 'constraint violation', + DB_ERROR_DIVZERO => 'division by zero', + DB_ERROR_INVALID => 'invalid', + DB_ERROR_INVALID_DATE => 'invalid date or time', + DB_ERROR_INVALID_NUMBER => 'invalid number', + DB_ERROR_MISMATCH => 'mismatch', + DB_ERROR_NODBSELECTED => 'no database selected', + DB_ERROR_NOSUCHFIELD => 'no such field', + DB_ERROR_NOSUCHTABLE => 'no such table', + DB_ERROR_NOT_CAPABLE => 'DB backend not capable', + DB_ERROR_NOT_FOUND => 'not found', + DB_ERROR_NOT_LOCKED => 'not locked', + DB_ERROR_SYNTAX => 'syntax error', + DB_ERROR_UNSUPPORTED => 'not supported', + DB_ERROR_VALUE_COUNT_ON_ROW => 'value count on row', + DB_ERROR_INVALID_DSN => 'invalid DSN', + DB_ERROR_CONNECT_FAILED => 'connect failed', + 0 => 'no error', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'insufficient data supplied', + DB_ERROR_EXTENSION_NOT_FOUND=> 'extension not found', + DB_ERROR_NOSUCHDB => 'no such database', + DB_ERROR_ACCESS_VIOLATION => 'insufficient permissions' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-es.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-es.inc.php new file mode 100644 index 0000000..1e0afbb --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-es.inc.php @@ -0,0 +1,33 @@ + +$ADODB_LANG_ARRAY = array ( + 'LANG' => 'es', + DB_ERROR => 'error desconocido', + DB_ERROR_ALREADY_EXISTS => 'ya existe', + DB_ERROR_CANNOT_CREATE => 'imposible crear', + DB_ERROR_CANNOT_DELETE => 'imposible borrar', + DB_ERROR_CANNOT_DROP => 'imposible hacer drop', + DB_ERROR_CONSTRAINT => 'violacion de constraint', + DB_ERROR_DIVZERO => 'division por cero', + DB_ERROR_INVALID => 'invalido', + DB_ERROR_INVALID_DATE => 'fecha u hora invalida', + DB_ERROR_INVALID_NUMBER => 'numero invalido', + DB_ERROR_MISMATCH => 'error', + DB_ERROR_NODBSELECTED => 'no hay base de datos seleccionada', + DB_ERROR_NOSUCHFIELD => 'campo invalido', + DB_ERROR_NOSUCHTABLE => 'tabla no existe', + DB_ERROR_NOT_CAPABLE => 'capacidad invalida para esta DB', + DB_ERROR_NOT_FOUND => 'no encontrado', + DB_ERROR_NOT_LOCKED => 'no bloqueado', + DB_ERROR_SYNTAX => 'error de sintaxis', + DB_ERROR_UNSUPPORTED => 'no soportado', + DB_ERROR_VALUE_COUNT_ON_ROW => 'la cantidad de columnas no corresponden a la cantidad de valores', + DB_ERROR_INVALID_DSN => 'DSN invalido', + DB_ERROR_CONNECT_FAILED => 'fallo la conexion', + 0 => 'sin error', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'insuficientes datos', + DB_ERROR_EXTENSION_NOT_FOUND=> 'extension no encontrada', + DB_ERROR_NOSUCHDB => 'base de datos no encontrada', + DB_ERROR_ACCESS_VIOLATION => 'permisos insuficientes' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-esperanto.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-esperanto.inc.php new file mode 100644 index 0000000..16ca00e --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-esperanto.inc.php @@ -0,0 +1,35 @@ + 'eo', + DB_ERROR => 'nekonata eraro', + DB_ERROR_ALREADY_EXISTS => 'jam ekzistas', + DB_ERROR_CANNOT_CREATE => 'maleblas krei', + DB_ERROR_CANNOT_DELETE => 'maleblas elimini', + DB_ERROR_CANNOT_DROP => 'maleblas elimini (drop)', + DB_ERROR_CONSTRAINT => 'rompo de kondicxoj de provo', + DB_ERROR_DIVZERO => 'divido per 0 (nul)', + DB_ERROR_INVALID => 'malregule', + DB_ERROR_INVALID_DATE => 'malregula dato kaj tempo', + DB_ERROR_INVALID_NUMBER => 'malregula nombro', + DB_ERROR_MISMATCH => 'eraro', + DB_ERROR_NODBSELECTED => 'datumbazo ne elektita', + DB_ERROR_NOSUCHFIELD => 'ne ekzistas kampo', + DB_ERROR_NOSUCHTABLE => 'ne ekzistas tabelo', + DB_ERROR_NOT_CAPABLE => 'DBMS ne povas', + DB_ERROR_NOT_FOUND => 'ne trovita', + DB_ERROR_NOT_LOCKED => 'ne blokita', + DB_ERROR_SYNTAX => 'sintaksa eraro', + DB_ERROR_UNSUPPORTED => 'ne apogata', + DB_ERROR_VALUE_COUNT_ON_ROW => 'nombrilo de valoroj en linio', + DB_ERROR_INVALID_DSN => 'malregula DSN-o', + DB_ERROR_CONNECT_FAILED => 'konekto malsukcesa', + 0 => 'cxio bone', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'ne suficxe da datumo', + DB_ERROR_EXTENSION_NOT_FOUND=> 'etendo ne trovita', + DB_ERROR_NOSUCHDB => 'datumbazo ne ekzistas', + DB_ERROR_ACCESS_VIOLATION => 'ne suficxe da rajto por atingo' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-fa.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-fa.inc.php new file mode 100644 index 0000000..5594313 --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-fa.inc.php @@ -0,0 +1,35 @@ + */ + +$ADODB_LANG_ARRAY = array ( + 'LANG' => 'fa', + DB_ERROR => 'خطای ناشناخته', + DB_ERROR_ALREADY_EXISTS => 'وجود دارد', + DB_ERROR_CANNOT_CREATE => 'امکان create وجود ندارد', + DB_ERROR_CANNOT_DELETE => 'امکان حذف وجود ندارد', + DB_ERROR_CANNOT_DROP => 'امکان drop وجود ندارد', + DB_ERROR_CONSTRAINT => 'نقض شرط', + DB_ERROR_DIVZERO => 'تقسیم بر صفر', + DB_ERROR_INVALID => 'نامعتبر', + DB_ERROR_INVALID_DATE => 'زمان یا تاریخ نامعتبر', + DB_ERROR_INVALID_NUMBER => 'عدد نامعتبر', + DB_ERROR_MISMATCH => 'عدم مطابقت', + DB_ERROR_NODBSELECTED => 'بانک اطلاعاتی انتخاب نشده است', + DB_ERROR_NOSUCHFIELD => 'چنین ستونی وجود ندارد', + DB_ERROR_NOSUCHTABLE => 'چنین جدولی وجود ندارد', + DB_ERROR_NOT_CAPABLE => 'backend بانک اطلاعاتی قادر نیست', + DB_ERROR_NOT_FOUND => 'پیدا نشد', + DB_ERROR_NOT_LOCKED => 'قفل نشده', + DB_ERROR_SYNTAX => 'خطای دستوری', + DB_ERROR_UNSUPPORTED => 'پشتیبانی نمی شود', + DB_ERROR_VALUE_COUNT_ON_ROW => 'شمارش مقادیر روی ردیف', + DB_ERROR_INVALID_DSN => 'DSN نامعتبر', + DB_ERROR_CONNECT_FAILED => 'ارتباط برقرار نشد', + 0 => 'بدون خطا', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'داده ناکافی است', + DB_ERROR_EXTENSION_NOT_FOUND=> 'extension پیدا نشد', + DB_ERROR_NOSUCHDB => 'چنین بانک اطلاعاتی وجود ندارد', + DB_ERROR_ACCESS_VIOLATION => 'حق دسترسی ناکافی' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-fr.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-fr.inc.php new file mode 100644 index 0000000..066a2a5 --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-fr.inc.php @@ -0,0 +1,33 @@ + 'fr', + DB_ERROR => 'erreur inconnue', + DB_ERROR_ALREADY_EXISTS => 'existe déjà', + DB_ERROR_CANNOT_CREATE => 'crétion impossible', + DB_ERROR_CANNOT_DELETE => 'effacement impossible', + DB_ERROR_CANNOT_DROP => 'suppression impossible', + DB_ERROR_CONSTRAINT => 'violation de contrainte', + DB_ERROR_DIVZERO => 'division par zéro', + DB_ERROR_INVALID => 'invalide', + DB_ERROR_INVALID_DATE => 'date ou heure invalide', + DB_ERROR_INVALID_NUMBER => 'nombre invalide', + DB_ERROR_MISMATCH => 'erreur de concordance', + DB_ERROR_NODBSELECTED => 'pas de base de donnéessélectionnée', + DB_ERROR_NOSUCHFIELD => 'nom de colonne invalide', + DB_ERROR_NOSUCHTABLE => 'table ou vue inexistante', + DB_ERROR_NOT_CAPABLE => 'fonction optionnelle non installée', + DB_ERROR_NOT_FOUND => 'pas trouvé', + DB_ERROR_NOT_LOCKED => 'non verrouillé', + DB_ERROR_SYNTAX => 'erreur de syntaxe', + DB_ERROR_UNSUPPORTED => 'non supporté', + DB_ERROR_VALUE_COUNT_ON_ROW => 'valeur insérée trop grande pour colonne', + DB_ERROR_INVALID_DSN => 'DSN invalide', + DB_ERROR_CONNECT_FAILED => 'échec à la connexion', + 0 => "pas d'erreur", // DB_OK + DB_ERROR_NEED_MORE_DATA => 'données fournies insuffisantes', + DB_ERROR_EXTENSION_NOT_FOUND=> 'extension non trouvée', + DB_ERROR_NOSUCHDB => 'base de données inconnue', + DB_ERROR_ACCESS_VIOLATION => 'droits insuffisants' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-hu.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-hu.inc.php new file mode 100644 index 0000000..d6f0ef8 --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-hu.inc.php @@ -0,0 +1,34 @@ + +$ADODB_LANG_ARRAY = array ( + 'LANG' => 'hu', + DB_ERROR => 'ismeretlen hiba', + DB_ERROR_ALREADY_EXISTS => 'mr ltezik', + DB_ERROR_CANNOT_CREATE => 'nem sikerlt ltrehozni', + DB_ERROR_CANNOT_DELETE => 'nem sikerlt trlni', + DB_ERROR_CANNOT_DROP => 'nem sikerlt eldobni', + DB_ERROR_CONSTRAINT => 'szablyok megszegse', + DB_ERROR_DIVZERO => 'oszts nullval', + DB_ERROR_INVALID => 'rvnytelen', + DB_ERROR_INVALID_DATE => 'rvnytelen dtum vagy id', + DB_ERROR_INVALID_NUMBER => 'rvnytelen szm', + DB_ERROR_MISMATCH => 'nem megfelel', + DB_ERROR_NODBSELECTED => 'nincs kivlasztott adatbzis', + DB_ERROR_NOSUCHFIELD => 'nincs ilyen mez', + DB_ERROR_NOSUCHTABLE => 'nincs ilyen tbla', + DB_ERROR_NOT_CAPABLE => 'DB backend nem tmogatja', + DB_ERROR_NOT_FOUND => 'nem tallhat', + DB_ERROR_NOT_LOCKED => 'nincs lezrva', + DB_ERROR_SYNTAX => 'szintaktikai hiba', + DB_ERROR_UNSUPPORTED => 'nem tmogatott', + DB_ERROR_VALUE_COUNT_ON_ROW => 'soron vgzett rtk szmlls', + DB_ERROR_INVALID_DSN => 'hibs DSN', + DB_ERROR_CONNECT_FAILED => 'sikertelen csatlakozs', + 0 => 'nincs hiba', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'tl kevs az adat', + DB_ERROR_EXTENSION_NOT_FOUND=> 'bvtmny nem tallhat', + DB_ERROR_NOSUCHDB => 'nincs ilyen adatbzis', + DB_ERROR_ACCESS_VIOLATION => 'nincs jogosultsg' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-it.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-it.inc.php new file mode 100644 index 0000000..20c5b93 --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-it.inc.php @@ -0,0 +1,34 @@ + 'it', + DB_ERROR => 'errore sconosciuto', + DB_ERROR_ALREADY_EXISTS => 'esiste già', + DB_ERROR_CANNOT_CREATE => 'non posso creare', + DB_ERROR_CANNOT_DELETE => 'non posso cancellare', + DB_ERROR_CANNOT_DROP => 'non posso eliminare', + DB_ERROR_CONSTRAINT => 'violazione constraint', + DB_ERROR_DIVZERO => 'divisione per zero', + DB_ERROR_INVALID => 'non valido', + DB_ERROR_INVALID_DATE => 'data od ora non valida', + DB_ERROR_INVALID_NUMBER => 'numero non valido', + DB_ERROR_MISMATCH => 'diversi', + DB_ERROR_NODBSELECTED => 'nessun database selezionato', + DB_ERROR_NOSUCHFIELD => 'nessun campo trovato', + DB_ERROR_NOSUCHTABLE => 'nessuna tabella trovata', + DB_ERROR_NOT_CAPABLE => 'DB backend non abilitato', + DB_ERROR_NOT_FOUND => 'non trovato', + DB_ERROR_NOT_LOCKED => 'non bloccato', + DB_ERROR_SYNTAX => 'errore di sintassi', + DB_ERROR_UNSUPPORTED => 'non supportato', + DB_ERROR_VALUE_COUNT_ON_ROW => 'valore inserito troppo grande per una colonna', + DB_ERROR_INVALID_DSN => 'DSN non valido', + DB_ERROR_CONNECT_FAILED => 'connessione fallita', + 0 => 'nessun errore', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'dati inseriti insufficienti', + DB_ERROR_EXTENSION_NOT_FOUND=> 'estensione non trovata', + DB_ERROR_NOSUCHDB => 'database non trovato', + DB_ERROR_ACCESS_VIOLATION => 'permessi insufficienti' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-nl.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-nl.inc.php new file mode 100644 index 0000000..abe77b5 --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-nl.inc.php @@ -0,0 +1,33 @@ + 'nl', + DB_ERROR => 'onbekende fout', + DB_ERROR_ALREADY_EXISTS => 'bestaat al', + DB_ERROR_CANNOT_CREATE => 'kan niet aanmaken', + DB_ERROR_CANNOT_DELETE => 'kan niet wissen', + DB_ERROR_CANNOT_DROP => 'kan niet verwijderen', + DB_ERROR_CONSTRAINT => 'constraint overtreding', + DB_ERROR_DIVZERO => 'poging tot delen door nul', + DB_ERROR_INVALID => 'ongeldig', + DB_ERROR_INVALID_DATE => 'ongeldige datum of tijd', + DB_ERROR_INVALID_NUMBER => 'ongeldig nummer', + DB_ERROR_MISMATCH => 'is incorrect', + DB_ERROR_NODBSELECTED => 'geen database geselecteerd', + DB_ERROR_NOSUCHFIELD => 'onbekend veld', + DB_ERROR_NOSUCHTABLE => 'onbekende tabel', + DB_ERROR_NOT_CAPABLE => 'database systeem is niet tot uitvoer in staat', + DB_ERROR_NOT_FOUND => 'niet gevonden', + DB_ERROR_NOT_LOCKED => 'niet vergrendeld', + DB_ERROR_SYNTAX => 'syntaxis fout', + DB_ERROR_UNSUPPORTED => 'niet ondersteund', + DB_ERROR_VALUE_COUNT_ON_ROW => 'waarde telling op rij', + DB_ERROR_INVALID_DSN => 'ongeldige DSN', + DB_ERROR_CONNECT_FAILED => 'connectie mislukt', + 0 => 'geen fout', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'onvoldoende data gegeven', + DB_ERROR_EXTENSION_NOT_FOUND=> 'extensie niet gevonden', + DB_ERROR_NOSUCHDB => 'onbekende database', + DB_ERROR_ACCESS_VIOLATION => 'onvoldoende rechten' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-pl.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-pl.inc.php new file mode 100644 index 0000000..9d9e390 --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-pl.inc.php @@ -0,0 +1,35 @@ + + +$ADODB_LANG_ARRAY = array ( + 'LANG' => 'pl', + DB_ERROR => 'niezidentyfikowany bd', + DB_ERROR_ALREADY_EXISTS => 'ju istniej', + DB_ERROR_CANNOT_CREATE => 'nie mona stworzy', + DB_ERROR_CANNOT_DELETE => 'nie mona usun', + DB_ERROR_CANNOT_DROP => 'nie mona porzuci', + DB_ERROR_CONSTRAINT => 'pogwacenie uprawnie', + DB_ERROR_DIVZERO => 'dzielenie przez zero', + DB_ERROR_INVALID => 'bdny', + DB_ERROR_INVALID_DATE => 'bdna godzina lub data', + DB_ERROR_INVALID_NUMBER => 'bdny numer', + DB_ERROR_MISMATCH => 'niedopasowanie', + DB_ERROR_NODBSELECTED => 'baza danych nie zostaa wybrana', + DB_ERROR_NOSUCHFIELD => 'nie znaleziono pola', + DB_ERROR_NOSUCHTABLE => 'nie znaleziono tabeli', + DB_ERROR_NOT_CAPABLE => 'nie zdolny', + DB_ERROR_NOT_FOUND => 'nie znaleziono', + DB_ERROR_NOT_LOCKED => 'nie zakmnity', + DB_ERROR_SYNTAX => 'bd skadni', + DB_ERROR_UNSUPPORTED => 'nie obsuguje', + DB_ERROR_VALUE_COUNT_ON_ROW => 'warto liczona w szeregu', + DB_ERROR_INVALID_DSN => 'bdny DSN', + DB_ERROR_CONNECT_FAILED => 'poczenie nie zostao zrealizowane', + 0 => 'brak bdw', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'niedostateczna ilo informacji', + DB_ERROR_EXTENSION_NOT_FOUND=> 'nie znaleziono rozszerzenia', + DB_ERROR_NOSUCHDB => 'nie znaleziono bazy', + DB_ERROR_ACCESS_VIOLATION => 'niedostateczne uprawnienia' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-pt-br.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-pt-br.inc.php new file mode 100644 index 0000000..cd28f7e --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-pt-br.inc.php @@ -0,0 +1,35 @@ + 'pt-br', + DB_ERROR => 'erro desconhecido', + DB_ERROR_ALREADY_EXISTS => 'j existe', + DB_ERROR_CANNOT_CREATE => 'impossvel criar', + DB_ERROR_CANNOT_DELETE => 'impossvel exclur', + DB_ERROR_CANNOT_DROP => 'impossvel remover', + DB_ERROR_CONSTRAINT => 'violao do confinamente', + DB_ERROR_DIVZERO => 'diviso por zero', + DB_ERROR_INVALID => 'invlido', + DB_ERROR_INVALID_DATE => 'data ou hora invlida', + DB_ERROR_INVALID_NUMBER => 'nmero invlido', + DB_ERROR_MISMATCH => 'erro', + DB_ERROR_NODBSELECTED => 'nenhum banco de dados selecionado', + DB_ERROR_NOSUCHFIELD => 'campo invlido', + DB_ERROR_NOSUCHTABLE => 'tabela inexistente', + DB_ERROR_NOT_CAPABLE => 'capacidade invlida para este BD', + DB_ERROR_NOT_FOUND => 'no encontrado', + DB_ERROR_NOT_LOCKED => 'no bloqueado', + DB_ERROR_SYNTAX => 'erro de sintaxe', + DB_ERROR_UNSUPPORTED => +'no suportado', + DB_ERROR_VALUE_COUNT_ON_ROW => 'a quantidade de colunas no corresponde ao de valores', + DB_ERROR_INVALID_DSN => 'DSN invlido', + DB_ERROR_CONNECT_FAILED => 'falha na conexo', + 0 => 'sem erro', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'dados insuficientes', + DB_ERROR_EXTENSION_NOT_FOUND=> 'extenso no encontrada', + DB_ERROR_NOSUCHDB => 'banco de dados no encontrado', + DB_ERROR_ACCESS_VIOLATION => 'permisso insuficiente' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-ro.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-ro.inc.php new file mode 100644 index 0000000..bcd7d13 --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-ro.inc.php @@ -0,0 +1,35 @@ + */ + +$ADODB_LANG_ARRAY = array ( + 'LANG' => 'ro', + DB_ERROR => 'eroare necunoscuta', + DB_ERROR_ALREADY_EXISTS => 'deja exista', + DB_ERROR_CANNOT_CREATE => 'nu se poate creea', + DB_ERROR_CANNOT_DELETE => 'nu se poate sterge', + DB_ERROR_CANNOT_DROP => 'nu se poate executa drop', + DB_ERROR_CONSTRAINT => 'violare de constrain', + DB_ERROR_DIVZERO => 'se divide la zero', + DB_ERROR_INVALID => 'invalid', + DB_ERROR_INVALID_DATE => 'data sau timp invalide', + DB_ERROR_INVALID_NUMBER => 'numar invalid', + DB_ERROR_MISMATCH => 'nepotrivire-mismatch', + DB_ERROR_NODBSELECTED => 'nu exista baza de date selectata', + DB_ERROR_NOSUCHFIELD => 'camp inexistent', + DB_ERROR_NOSUCHTABLE => 'tabela inexistenta', + DB_ERROR_NOT_CAPABLE => 'functie optionala neinstalata', + DB_ERROR_NOT_FOUND => 'negasit', + DB_ERROR_NOT_LOCKED => 'neblocat', + DB_ERROR_SYNTAX => 'eroare de sintaxa', + DB_ERROR_UNSUPPORTED => 'nu e suportat', + DB_ERROR_VALUE_COUNT_ON_ROW => 'valoare prea mare pentru coloana', + DB_ERROR_INVALID_DSN => 'DSN invalid', + DB_ERROR_CONNECT_FAILED => 'conectare esuata', + 0 => 'fara eroare', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'data introduse insuficiente', + DB_ERROR_EXTENSION_NOT_FOUND=> 'extensie negasita', + DB_ERROR_NOSUCHDB => 'nu exista baza de date', + DB_ERROR_ACCESS_VIOLATION => 'permisiuni insuficiente' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-ru1251.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-ru1251.inc.php new file mode 100644 index 0000000..3a20538 --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-ru1251.inc.php @@ -0,0 +1,35 @@ + 'ru1251', + DB_ERROR => ' ', + DB_ERROR_ALREADY_EXISTS => ' ', + DB_ERROR_CANNOT_CREATE => ' ', + DB_ERROR_CANNOT_DELETE => ' ', + DB_ERROR_CANNOT_DROP => ' (drop)', + DB_ERROR_CONSTRAINT => ' ', + DB_ERROR_DIVZERO => ' 0', + DB_ERROR_INVALID => '', + DB_ERROR_INVALID_DATE => ' ', + DB_ERROR_INVALID_NUMBER => ' ', + DB_ERROR_MISMATCH => '', + DB_ERROR_NODBSELECTED => ' ', + DB_ERROR_NOSUCHFIELD => ' ', + DB_ERROR_NOSUCHTABLE => ' ', + DB_ERROR_NOT_CAPABLE => ' ', + DB_ERROR_NOT_FOUND => ' ', + DB_ERROR_NOT_LOCKED => ' ', + DB_ERROR_SYNTAX => ' ', + DB_ERROR_UNSUPPORTED => ' ', + DB_ERROR_VALUE_COUNT_ON_ROW => ' ', + DB_ERROR_INVALID_DSN => ' DSN', + DB_ERROR_CONNECT_FAILED => ' ', + 0 => ' ', // DB_OK + DB_ERROR_NEED_MORE_DATA => ' ', + DB_ERROR_EXTENSION_NOT_FOUND=> ' ', + DB_ERROR_NOSUCHDB => ' ', + DB_ERROR_ACCESS_VIOLATION => ' ' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-sv.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-sv.inc.php new file mode 100644 index 0000000..a9fd698 --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-sv.inc.php @@ -0,0 +1,33 @@ + 'en', + DB_ERROR => 'Oknt fel', + DB_ERROR_ALREADY_EXISTS => 'finns redan', + DB_ERROR_CANNOT_CREATE => 'kan inte skapa', + DB_ERROR_CANNOT_DELETE => 'kan inte ta bort', + DB_ERROR_CANNOT_DROP => 'kan inte slppa', + DB_ERROR_CONSTRAINT => 'begrnsning krnkt', + DB_ERROR_DIVZERO => 'division med noll', + DB_ERROR_INVALID => 'ogiltig', + DB_ERROR_INVALID_DATE => 'ogiltigt datum eller tid', + DB_ERROR_INVALID_NUMBER => 'ogiltigt tal', + DB_ERROR_MISMATCH => 'felaktig matchning', + DB_ERROR_NODBSELECTED => 'ingen databas vald', + DB_ERROR_NOSUCHFIELD => 'inget sdant flt', + DB_ERROR_NOSUCHTABLE => 'ingen sdan tabell', + DB_ERROR_NOT_CAPABLE => 'DB backend klarar det inte', + DB_ERROR_NOT_FOUND => 'finns inte', + DB_ERROR_NOT_LOCKED => 'inte lst', + DB_ERROR_SYNTAX => 'syntaxfel', + DB_ERROR_UNSUPPORTED => 'stds ej', + DB_ERROR_VALUE_COUNT_ON_ROW => 'vrde rknat p rad', + DB_ERROR_INVALID_DSN => 'ogiltig DSN', + DB_ERROR_CONNECT_FAILED => 'anslutning misslyckades', + 0 => 'inget fel', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'otillrckligt med data angivet', + DB_ERROR_EXTENSION_NOT_FOUND=> 'utkning hittades ej', + DB_ERROR_NOSUCHDB => 'ingen sdan databas', + DB_ERROR_ACCESS_VIOLATION => 'otillrckliga rttigheter' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb-uk1251.inc.php b/php/pgadmin/libraries/adodb/lang/adodb-uk1251.inc.php new file mode 100644 index 0000000..675016d --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb-uk1251.inc.php @@ -0,0 +1,35 @@ + 'uk1251', + DB_ERROR => ' ', + DB_ERROR_ALREADY_EXISTS => ' ', + DB_ERROR_CANNOT_CREATE => ' ', + DB_ERROR_CANNOT_DELETE => ' ', + DB_ERROR_CANNOT_DROP => ' (drop)', + DB_ERROR_CONSTRAINT => ' ', + DB_ERROR_DIVZERO => ' 0', + DB_ERROR_INVALID => '', + DB_ERROR_INVALID_DATE => ' ', + DB_ERROR_INVALID_NUMBER => ' ', + DB_ERROR_MISMATCH => '', + DB_ERROR_NODBSELECTED => ' ', + DB_ERROR_NOSUCHFIELD => ' ', + DB_ERROR_NOSUCHTABLE => ' ', + DB_ERROR_NOT_CAPABLE => ' ', + DB_ERROR_NOT_FOUND => ' ', + DB_ERROR_NOT_LOCKED => ' ', + DB_ERROR_SYNTAX => ' ', + DB_ERROR_UNSUPPORTED => ' ', + DB_ERROR_VALUE_COUNT_ON_ROW => ' ', + DB_ERROR_INVALID_DSN => ' DSN', + DB_ERROR_CONNECT_FAILED => '\' ', + 0 => ' ', // DB_OK + DB_ERROR_NEED_MORE_DATA => ' ', + DB_ERROR_EXTENSION_NOT_FOUND=> ' ', + DB_ERROR_NOSUCHDB => ' ', + DB_ERROR_ACCESS_VIOLATION => ' ' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/lang/adodb_th.inc.php b/php/pgadmin/libraries/adodb/lang/adodb_th.inc.php new file mode 100644 index 0000000..3fdd997 --- /dev/null +++ b/php/pgadmin/libraries/adodb/lang/adodb_th.inc.php @@ -0,0 +1,33 @@ + +$ADODB_LANG_ARRAY = array ( + 'LANG' => 'th', + DB_ERROR => 'error ไม่รู้สาเหตุ', + DB_ERROR_ALREADY_EXISTS => 'มี?ล้ว', + DB_ERROR_CANNOT_CREATE => 'สร้างไม่ได้', + DB_ERROR_CANNOT_DELETE => 'ลบไม่ได้', + DB_ERROR_CANNOT_DROP => 'drop ไม่ได้', + DB_ERROR_CONSTRAINT => 'constraint violation', + DB_ERROR_DIVZERO => 'หา?ด้วยสู?', + DB_ERROR_INVALID => 'ไม่ valid', + DB_ERROR_INVALID_DATE => 'วันที่ เวลา ไม่ valid', + DB_ERROR_INVALID_NUMBER => 'เลขไม่ valid', + DB_ERROR_MISMATCH => 'mismatch', + DB_ERROR_NODBSELECTED => 'ไม่ได้เลือ??านข้อมูล', + DB_ERROR_NOSUCHFIELD => 'ไม่มีฟีลด์นี้', + DB_ERROR_NOSUCHTABLE => 'ไม่มีตารางนี้', + DB_ERROR_NOT_CAPABLE => 'DB backend not capable', + DB_ERROR_NOT_FOUND => 'ไม่พบ', + DB_ERROR_NOT_LOCKED => 'ไม่ได้ล๊อ?', + DB_ERROR_SYNTAX => 'ผิด syntax', + DB_ERROR_UNSUPPORTED => 'ไม่ support', + DB_ERROR_VALUE_COUNT_ON_ROW => 'value count on row', + DB_ERROR_INVALID_DSN => 'invalid DSN', + DB_ERROR_CONNECT_FAILED => 'ไม่สามารถ connect', + 0 => 'no error', // DB_OK + DB_ERROR_NEED_MORE_DATA => 'ข้อมูลไม่เพียงพอ', + DB_ERROR_EXTENSION_NOT_FOUND=> 'ไม่พบ extension', + DB_ERROR_NOSUCHDB => 'ไม่มีข้อมูลนี้', + DB_ERROR_ACCESS_VIOLATION => 'permissions ไม่พอ' +); +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/license.txt b/php/pgadmin/libraries/adodb/license.txt new file mode 100755 index 0000000..2353871 --- /dev/null +++ b/php/pgadmin/libraries/adodb/license.txt @@ -0,0 +1,182 @@ +ADOdb is dual licensed using BSD and LGPL. + +In plain English, you do not need to distribute your application in source code form, nor do you need to distribute ADOdb source code, provided you follow the rest of terms of the BSD license. + +For more info about ADOdb, visit http://adodb.sourceforge.net/ + +BSD Style-License +================= + +Copyright (c) 2000, 2001, 2002, 2003, 2004 John Lim +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list +of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this list +of conditions and the following disclaimer in the documentation and/or other materials +provided with the distribution. + +Neither the name of the John Lim nor the names of its contributors may be used to +endorse or promote products derived from this software without specific prior written +permission. + +DISCLAIMER: +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +JOHN LIM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +========================================================== +GNU LESSER GENERAL PUBLIC LICENSE +Version 2.1, February 1999 + +Copyright (C) 1991, 1999 Free Software Foundation, Inc. +59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + +Preamble +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. + +This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. + +When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. + +To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. + +For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. + +We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. + +To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. + +Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. + +Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. + +When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. + +We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. + +For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. + +In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. + +Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. + +The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. + + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". + +A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. + +The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) + +"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. + +1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + +a) The modified work must itself be a software library. +b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. +c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. +d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. +(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. + +Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. + +This option is useful when you wish to copy part of the code of the Library into a program that is not a library. + +4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. + +If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. + +5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. + +However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. + +When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. + +If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) + +Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. + +6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. + +You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: + + +a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) +b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. +c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. +d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. +e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. +For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. + +7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: + + +a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. +b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. +8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. + +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. + +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. + +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/readme.txt b/php/pgadmin/libraries/adodb/readme.txt new file mode 100755 index 0000000..97bdd9e --- /dev/null +++ b/php/pgadmin/libraries/adodb/readme.txt @@ -0,0 +1,62 @@ +>> ADODB Library for PHP4 + +(c) 2000-2004 John Lim (jlim@natsoft.com.my) + +Released under both BSD and GNU Lesser GPL library license. +This means you can use it in proprietary products. + + +>> Introduction + +PHP's database access functions are not standardised. This creates a +need for a database class library to hide the differences between the +different databases (encapsulate the differences) so we can easily +switch databases. + +We currently support MySQL, Interbase, Sybase, PostgreSQL, Oracle, +Microsoft SQL server, Foxpro ODBC, Access ODBC, Informix, DB2, +Sybase SQL Anywhere, generic ODBC and Microsoft's ADO. + +We hope more people will contribute drivers to support other databases. + + +>> Documentation and Examples + +Refer to the adodb/docs directory for full documentation and examples. +There is also a tutorial tute.htm that contrasts ADODB code with +mysql code. + + +>>> Files +Adodb.inc.php is the main file. You need to include only this file. + +Adodb-*.inc.php are the database specific driver code. + +Test.php contains a list of test commands to exercise the class library. + +Adodb-session.php is the PHP4 session handling code. + +Testdatabases.inc.php contains the list of databases to apply the tests on. + +Benchmark.php is a simple benchmark to test the throughput of a simple SELECT +statement for databases described in testdatabases.inc.php. The benchmark +tables are created in test.php. + +readme.htm is the main documentation. + +tute.htm is the tutorial. + + +>> More Info + +For more information, including installation see readme.htm +or visit + http://adodb.sourceforge.net/ + + +>> Feature Requests and Bug Reports + +Email to jlim@natsoft.com.my + + + \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/toexport.inc.php b/php/pgadmin/libraries/adodb/toexport.inc.php new file mode 100644 index 0000000..6975b51 --- /dev/null +++ b/php/pgadmin/libraries/adodb/toexport.inc.php @@ -0,0 +1,134 @@ +FieldTypesArray(); + reset($fieldTypes); + $i = 0; + while(list(,$o) = each($fieldTypes)) { + + $v = ($o) ? $o->name : 'Field'.($i++); + if ($escquote) $v = str_replace($quote,$escquotequote,$v); + $v = strip_tags(str_replace("\n", $replaceNewLine, str_replace("\r\n",$replaceNewLine,str_replace($sep,$sepreplace,$v)))); + $elements[] = $v; + + } + $s .= implode($sep, $elements).$NEWLINE; + } + $hasNumIndex = isset($rs->fields[0]); + + $line = 0; + $max = $rs->FieldCount(); + + while (!$rs->EOF) { + $elements = array(); + $i = 0; + + if ($hasNumIndex) { + for ($j=0; $j < $max; $j++) { + $v = $rs->fields[$j]; + if (!is_object($v)) $v = trim($v); + else $v = 'Object'; + if ($escquote) $v = str_replace($quote,$escquotequote,$v); + $v = strip_tags(str_replace("\n", $replaceNewLine, str_replace("\r\n",$replaceNewLine,str_replace($sep,$sepreplace,$v)))); + + if (strpos($v,$sep) !== false || strpos($v,$quote) !== false) $elements[] = "$quote$v$quote"; + else $elements[] = $v; + } + } else { // ASSOCIATIVE ARRAY + foreach($rs->fields as $v) { + if ($escquote) $v = str_replace($quote,$escquotequote,trim($v)); + $v = strip_tags(str_replace("\n", $replaceNewLine, str_replace("\r\n",$replaceNewLine,str_replace($sep,$sepreplace,$v)))); + + if (strpos($v,$sep) !== false || strpos($v,$quote) !== false) $elements[] = "$quote$v$quote"; + else $elements[] = $v; + } + } + $s .= implode($sep, $elements).$NEWLINE; + $rs->MoveNext(); + $line += 1; + if ($fp && ($line % $BUFLINES) == 0) { + if ($fp === true) echo $s; + else fwrite($fp,$s); + $s = ''; + } + } + + if ($fp) { + if ($fp === true) echo $s; + else fwrite($fp,$s); + $s = ''; + } + + return $s; +} +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/adodb/tohtml.inc.php b/php/pgadmin/libraries/adodb/tohtml.inc.php new file mode 100644 index 0000000..7624566 --- /dev/null +++ b/php/pgadmin/libraries/adodb/tohtml.inc.php @@ -0,0 +1,201 @@ + +*/ + +// specific code for tohtml +GLOBAL $gSQLMaxRows,$gSQLBlockRows,$ADODB_ROUND; + +$ADODB_ROUND=4; // rounding +$gSQLMaxRows = 1000; // max no of rows to download +$gSQLBlockRows=20; // max no of rows per table block + +// RecordSet to HTML Table +//------------------------------------------------------------ +// Convert a recordset to a html table. Multiple tables are generated +// if the number of rows is > $gSQLBlockRows. This is because +// web browsers normally require the whole table to be downloaded +// before it can be rendered, so we break the output into several +// smaller faster rendering tables. +// +// $rs: the recordset +// $ztabhtml: the table tag attributes (optional) +// $zheaderarray: contains the replacement strings for the headers (optional) +// +// USAGE: +// include('adodb.inc.php'); +// $db = ADONewConnection('mysql'); +// $db->Connect('mysql','userid','password','database'); +// $rs = $db->Execute('select col1,col2,col3 from table'); +// rs2html($rs, 'BORDER=2', array('Title1', 'Title2', 'Title3')); +// $rs->Close(); +// +// RETURNS: number of rows displayed + + +function rs2html(&$rs,$ztabhtml=false,$zheaderarray=false,$htmlspecialchars=true,$echo = true) +{ +$s ='';$rows=0;$docnt = false; +GLOBAL $gSQLMaxRows,$gSQLBlockRows,$ADODB_ROUND; + + if (!$rs) { + printf(ADODB_BAD_RS,'rs2html'); + return false; + } + + if (! $ztabhtml) $ztabhtml = "BORDER='1' WIDTH='98%'"; + //else $docnt = true; + $typearr = array(); + $ncols = $rs->FieldCount(); + $hdr = "\n\n"; + for ($i=0; $i < $ncols; $i++) { + $field = $rs->FetchField($i); + if ($field) { + if ($zheaderarray) $fname = $zheaderarray[$i]; + else $fname = htmlspecialchars($field->name); + $typearr[$i] = $rs->MetaType($field->type,$field->max_length); + //print " $field->name $field->type $typearr[$i] "; + } else { + $fname = 'Field '.($i+1); + $typearr[$i] = 'C'; + } + if (strlen($fname)==0) $fname = ' '; + $hdr .= ""; + } + $hdr .= "\n"; + if ($echo) print $hdr."\n\n"; + else $html = $hdr; + + // smart algorithm - handles ADODB_FETCH_MODE's correctly by probing... + $numoffset = isset($rs->fields[0]) ||isset($rs->fields[1]) || isset($rs->fields[2]); + while (!$rs->EOF) { + + $s .= "\n"; + + for ($i=0; $i < $ncols; $i++) { + if ($i===0) $v=($numoffset) ? $rs->fields[0] : reset($rs->fields); + else $v = ($numoffset) ? $rs->fields[$i] : next($rs->fields); + + $type = $typearr[$i]; + switch($type) { + case 'D': + if (strpos($v,':') !== false); + else { + if (empty($v)) { + $s .= "\n"; + } else { + $s .= " \n"; + } + break; + } + case 'T': + if (empty($v)) $s .= "\n"; + else $s .= " \n"; + break; + + case 'N': + if (abs(abs($v) - round($v,0)) < 0.00000001) + $v = round($v); + else + $v = round($v,$ADODB_ROUND); + case 'I': + $vv = stripslashes((trim($v))); + if (strlen($vv) == 0) $vv .= ' '; + $s .= " \n"; + + break; + /* + case 'B': + if (substr($v,8,2)=="BM" ) $v = substr($v,8); + $mtime = substr(str_replace(' ','_',microtime()),2); + $tmpname = "tmp/".uniqid($mtime).getmypid(); + $fd = @fopen($tmpname,'a'); + @ftruncate($fd,0); + @fwrite($fd,$v); + @fclose($fd); + if (!function_exists ("mime_content_type")) { + function mime_content_type ($file) { + return exec("file -bi ".escapeshellarg($file)); + } + } + $t = mime_content_type($tmpname); + $s .= (substr($t,0,5)=="image") ? " \\n" : " \\n"; + break; + */ + + default: + if ($htmlspecialchars) $v = htmlspecialchars(trim($v)); + $v = trim($v); + if (strlen($v) == 0) $v = ' '; + $s .= " \n"; + + } + } // for + $s .= "\n\n"; + + $rows += 1; + if ($rows >= $gSQLMaxRows) { + $rows = "

Truncated at $gSQLMaxRows

"; + break; + } // switch + + $rs->MoveNext(); + + // additional EOF check to prevent a widow header + if (!$rs->EOF && $rows % $gSQLBlockRows == 0) { + + //if (connection_aborted()) break;// not needed as PHP aborts script, unlike ASP + if ($echo) print $s . "
$fname
  ".$rs->UserDate($v,"D d, M Y") ."   ".$rs->UserTimeStamp($v,"D d, M Y, H:i:s") ."".$vv ."$t$t". str_replace("\n",'
',stripslashes($v)) ."
\n\n"; + else $html .= $s ."\n\n"; + $s = $hdr; + } + } // while + + if ($echo) print $s."\n\n"; + else $html .= $s."\n\n"; + + if ($docnt) if ($echo) print "

".$rows." Rows

"; + + return ($echo) ? $rows : $html; + } + +// pass in 2 dimensional array +function arr2html(&$arr,$ztabhtml='',$zheaderarray='') +{ + if (!$ztabhtml) $ztabhtml = 'BORDER=1'; + + $s = "";//';print_r($arr); + + if ($zheaderarray) { + $s .= ''; + for ($i=0; $i\n"; + } else $s .= " \n"; + $s .= "\n\n"; + } + $s .= '
 
'; + print $s; +} + +?> \ No newline at end of file diff --git a/php/pgadmin/libraries/decorator.inc.php b/php/pgadmin/libraries/decorator.inc.php new file mode 100644 index 0000000..38642cd --- /dev/null +++ b/php/pgadmin/libraries/decorator.inc.php @@ -0,0 +1,233 @@ + 2) { + $v = func_get_args(); + array_shift($v); + return new UrlDecorator($base, new ArrayMergeDecorator($v)); + } + return new UrlDecorator($base, $vars); +} + +function noEscape($value) { + if (is_a($value, 'Decorator')) { + $value->esc = false; + return $value; + } + return new Decorator($value, false); +} + +function replace($str, $params) { + return new replaceDecorator($str, $params); +} + +// Resolving functions: + +function value(&$var, &$fields, $esc = null) { + if (is_a($var, 'Decorator')) { + $val = $var->value($fields); + if (!$var->esc) $esc = null; + } else { + $val =& $var; + } + if (is_string($val)) { + switch($esc) { + case 'xml': + return strtr($val, array( + '&' => '&', + "'" => ''', '"' => '"', + '<' => '<', '>' => '>' + )); + case 'html': + return htmlspecialchars($val); + case 'url': + return urlencode($val); + } + } + return $val; +} + +function value_xml(&$var, &$fields) { + return value($var, $fields, 'xml'); +} + +function value_xml_attr($attr, &$var, &$fields) { + $val = value($var, $fields, 'xml'); + if (!empty($val)) + return " {$attr}=\"{$val}\""; + else + return ''; +} + +function value_url(&$var, &$fields) { + return value($var, $fields, 'url'); +} + +// Underlying classes: + +class Decorator +{ + var $esc = true; + + function Decorator($value, $esc = true) { + $this->v = $value; + $this->esc = $esc; + } + + function value($fields) { + return $this->v; + } +} + +class FieldDecorator extends Decorator +{ + function FieldDecorator($fieldName, $default = null) { + $this->f = $fieldName; + if ($default !== null) $this->d = $default; + } + + function value($fields) { + return isset($fields[$this->f]) ? $fields[$this->f] : (isset($this->d) ? $this->d : null); + } +} + +class ArrayMergeDecorator extends Decorator +{ + function ArrayMergeDecorator($arrays) { + $this->m = $arrays; + } + + function value($fields) { + $accum = array(); + foreach($this->m as $var) { + $accum = array_merge($accum, value($var, $fields)); + } + return $accum; + } +} + +class ConcatDecorator extends Decorator +{ + function ConcatDecorator($values) { + $this->c = $values; + } + + function value($fields) { + $accum = ''; + foreach($this->c as $var) { + $accum .= value($var, $fields); + } + return trim($accum); + } +} + +class CallbackDecorator extends Decorator +{ + function CallbackDecorator($callback, $param = null) { + $this->fn = $callback; + $this->p = $param; + } + + function value($fields) { + return call_user_func($this->fn, $fields, $this->p); + } +} + +class IfEmptyDecorator extends Decorator +{ + function IfEmptyDecorator($value, $empty, $full = null) { + $this->v = $value; + $this->e = $empty; + if ($full !== null) $this->f = $full; + } + + function value($fields) { + $val = value($this->v, $fields); + if (empty($val)) + return value($this->e, $fields); + else + return isset($this->f) ? value($this->f, $fields) : $val; + } +} + +class UrlDecorator extends Decorator +{ + function UrlDecorator($base, $queryVars = null) { + $this->b = $base; + if ($queryVars !== null) + $this->q = $queryVars; + } + + function value($fields) { + $url = value($this->b, $fields); + + if ($url === false) return ''; + + if (!empty($this->q)) { + $queryVars = value($this->q, $fields); + + $sep = '?'; + foreach ($queryVars as $var => $value) { + $url .= $sep . value_url($var, $fields) . '=' . value_url($value, $fields); + $sep = '&'; + } + } + return $url; + } +} + +class replaceDecorator extends Decorator +{ + function replaceDecorator($str, $params) { + $this->s = $str; + $this->p = $params; + } + + function value($fields) { + $str = $this->s; + foreach ($this->p as $k => $v) { + $str = str_replace($k, value($v, $fields), $str); + } + return $str; + } +} +?> diff --git a/php/pgadmin/libraries/errorhandler.inc.php b/php/pgadmin/libraries/errorhandler.inc.php new file mode 100644 index 0000000..fd9420b --- /dev/null +++ b/php/pgadmin/libraries/errorhandler.inc.php @@ -0,0 +1,77 @@ +{$lang['strsqlerror']}
" . $misc->printVal($errmsg,'errormsg') . "

+

{$lang['strinstatement']}
" . $misc->printVal($sql) . "

+ "; + echo "
{$s}

\n"; + + break; + + case 'PCONNECT': + case 'CONNECT': + $_failed = true; + global $_reload_browser; + $_reload_browser = true; + unset($_SESSION['sharedUsername']); + unset($_SESSION['sharedPassword']); + unset($_SESSION['webdbLogin'][$_REQUEST['server']]); + $msg = $lang['strloginfailed']; + include('./login.php'); + exit; + break; + default: + $s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)\n"; + echo "
{$s}

\n"; + break; + } + /* + * Log connection error somewhere + * 0 message is sent to PHP's system logger, using the Operating System's system + * logging mechanism or a file, depending on what the error_log configuration + * directive is set to. + * 1 message is sent by email to the address in the destination parameter. + * This is the only message type where the fourth parameter, extra_headers is used. + * This message type uses the same internal function as mail() does. + * 2 message is sent through the PHP debugging connection. + * This option is only available if remote debugging has been enabled. + * In this case, the destination parameter specifies the host name or IP address + * and optionally, port number, of the socket receiving the debug information. + * 3 message is appended to the file destination + */ + if (defined('ADODB_ERROR_LOG_TYPE')) { + $t = date('Y-m-d H:i:s'); + if (defined('ADODB_ERROR_LOG_DEST')) + error_log("($t) $s", ADODB_ERROR_LOG_TYPE, ADODB_ERROR_LOG_DEST); + else + error_log("($t) $s", ADODB_ERROR_LOG_TYPE); + } +} +?> diff --git a/php/pgadmin/libraries/highlight.php b/php/pgadmin/libraries/highlight.php new file mode 100644 index 0000000..74b93e3 --- /dev/null +++ b/php/pgadmin/libraries/highlight.php @@ -0,0 +1,1114 @@ +\\0'; + } + + $search[] = "/(\\bclass\s)/"; + $replace[] = '\\0'; + + return preg_replace($search, $replace, $text); +} + + +function preproc_replace($preproc, $text) +{ + foreach ($preproc as $proc) + { + $search[] = "/(\\s*#\s*$proc\\b)/"; + $replace[] = '\\0'; + } + + return preg_replace($search, $replace, $text); +} + + +function sch_syntax_helper($text) +{ + return $text; +} + + +function syntax_highlight_helper($text, $language) +{ + $preproc = array(); + $preproc["C++"] = array( + "if", "ifdef", "ifndef", "elif", "else", + "endif", "include", "define", "undef", "line", + "error", "pragma"); + $preproc["C89"] = & $preproc["C++"]; + $preproc["C"] = & $preproc["C89"]; + + $keywords = array( + "C++" => array( + "asm", "auto", "bool", "break", "case", + "catch", "char", /*class*/ "const", "const_cast", + "continue", "default", "delete", "do", "double", + "dynamic_cast", "else", "enum", "explicit", "export", + "extern", "false", "float", "for", "friend", + "goto", "if", "inline", "int", "long", + "mutable", "namespace", "new", "operator", "private", + "protected", "public", "register", "reinterpret_cast", "return", + "short", "signed", "sizeof", "static", "static_cast", + "struct", "switch", "template", "this", "throw", + "true", "try", "typedef", "typeid", "typename", + "union", "unsigned", "using", "virtual", "void", + "volatile", "wchar_t", "while"), + + "C89" => array( + "auto", "break", "case", "char", "const", + "continue", "default", "do", "double", "else", + "enum", "extern", "float", "for", "goto", + "if", "int", "long", "register", "return", + "short", "signed", "sizeof", "static", "struct", + "switch", "typedef", "union", "unsigned", "void", + "volatile", "while"), + + "C" => array( + "auto", "break", "case", "char", "const", + "continue", "default", "do", "double", "else", + "enum", "extern", "float", "for", "goto", + "if", "int", "long", "register", "return", + "short", "signed", "sizeof", "static", "struct", + "switch", "typedef", "union", "unsigned", "void", + "volatile", "while", "__restrict","_Bool"), + + "PHP" => array( + "and", "or", "xor", "__FILE__", "__LINE__", + "array", "as", "break", "case", "cfunction", + /*class*/ "const", "continue", "declare", "default", + "die", "do", "echo", "else", "elseif", + "empty", "enddeclare", "endfor", "endforeach", "endif", + "endswitch", "endwhile", "eval", "exit", "extends", + "for", "foreach", "function", "global", "if", + "include", "include_once", "isset", "list", "new", + "old_function", "print", "require", "require_once", "return", + "static", "switch", "unset", "use", "var", + "while", "__FUNCTION__", "__CLASS__"), + + "Perl" => array( + "-A", "-B", "-C", "-M", "-O", + "-R", "-S", "-T", "-W", "-X", + "-b", "-c", "-d", "-e", "-f", + "-g", "-k", "-l", "-o", "-p", + "-r", "-s", "-t", "-u", "-w", + "-x", "-z", "ARGV", "DATA", "ENV", + "SIG", "STDERR", "STDIN", "STDOUT", "atan2", + "bind", "binmode", "bless", "caller", "chdir", + "chmod", "chomp", "chop", "chown", "chr", + "chroot", "close", "closedir", "cmp", "connect", + "continue", "cos", "crypt", "dbmclose", "dbmopen", + "defined", "delete", "die", "do", "dump", + "each", "else", "elsif", "endgrent", "endhostent", + "endnetent", "endprotent", "endpwent", "endservent", "eof", + "eq", "eval", "exec", "exists", "exit", + "exp", "fcntl", "fileno", "flock", "for", + "foreach", "fork", "format", "formline", "ge", + "getc", "getgrent", "getgrid", "getgrnam", "gethostbyaddr", + "gethostbyname","gethostent", "getlogin", "getnetbyaddr", "getnetbyname", + "getnetent", "getpeername", "getpgrp", "getppid", "getpriority", + "getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam", + "getpwuid", "getservbyname","getservbyport","getservent","getsockname", + "getsockopt", "glob", "gmtime", "goto", "grep", + /*gt*/ "hex", "if", "import", "index", + "int", "ioctl", "join", "keys", "kill", + "last", "lc", "lcfirst", "le", "length", + "link", "listen", "local", "localtime", "log", + "lstat", /*lt*/ "m", "map", "mkdir", + "msgctl", "msgget", "msgrcv", "msgsnd", "my", + "ne", "next", "no", "oct", "open", + "opendir", "ord", "pack", "package", "pipe", + "pop", "pos", "print", "printf", "push", + "q", "qq", "quotemeta","qw", "qx", + "rand", "read", "readdir", "readlink", "recv", + "redo", "ref", "refname", "require", "reset", + "return", "reverse", "rewinddir","rindex", "rmdir", + "s", "scalar", "seek", "seekdir", "select", + "semctl", "semget", "semop", "send", "setgrent", + "sethostent", "setnetent", "setpgrp", "setpriority", "setprotoent", + "setpwent", "setservent", "setsockopt","shift", "shmctl", + "shmget", "shmread", "shmwrite", "shutdown", "sin", + "sleep", "socket", "socketpair","sort", "splice", + "split", "sprintf", "sqrt", "srand", "stat", + "study", "sub", "substr", "symlink", "syscall", + "sysopen", "sysread", "system", "syswrite", "tell", + "telldir", "tie", "tied", "time", "times", + "tr", "truncate", "uc", "ucfirst", "umask", + "undef", "unless", "unlink", "unpack", "unshift", + "untie", "until", "use", "utime", "values", + "vec", "wait", "waitpid", "wantarray", "warn", + "while", "write", "y", "or", "and", + "not"), + + "Java" => array( + "abstract", "boolean", "break", "byte", "case", + "catch", "char", /*class*/ "const", "continue", + "default", "do", "double", "else", "extends", + "final", "finally", "float", "for", "goto", + "if", "implements", "import", "instanceof", "int", + "interface", "long", "native", "new", "package", + "private", "protected", "public", "return", "short", + "static", "strictfp", "super", "switch", "synchronized", + "this", "throw", "throws", "transient", "try", + "void", "volatile", "while"), + + "VB" => array( + "AddressOf", "Alias", "And", "Any", "As", + "Binary", "Boolean", "ByRef", "Byte", "ByVal", + "Call", "Case", "CBool", "CByte", "CCur", + "CDate", "CDbl", "CInt", "CLng", "Close", + "Const", "CSng", "CStr", "Currency", "CVar", + "CVErr", "Date", "Debug", "Declare", "DefBool", + "DefByte", "DefCur", "DefDate", "DefDbl", "DefInt", + "DefLng", "DefObj", "DefSng", "DefStr", "DefVar", + "Dim", "Do", "Double", "Each", "Else", + "End", "Enum", "Eqv", "Erase", "Error", + "Event", "Exit", "For", "Friend", "Function", + "Get", "Get", "Global", "GoSub", "GoTo", + "If", "Imp", "Implements","In", "Input", + "Integer", "Is", "LBound", "Len", "Let", + "Lib", "Like", "Line", "Lock", "Long", + "Loop", "LSet", "Mod", "Name", "Next", + "Not", "Nothing", "Null", "Object", "On", + "Open", "Option Base 1","Option Compare Binary", + "Option Compare Database", "Option Compare Text", "Option Explicit", + "Option Private Module", "Optional", "Or", "Output", + "ParamArray", "Preserve", "Print", "Private", "Property", + "Public", "Put", "RaiseEvent","Random", "Read", + "ReDim", "Resume", "Return", "RSet", "Seek", + "Select", "Set", "Single", "Spc", "Static", + "Step", "Stop", "String", "Sub", "Tab", + "Then", "To", "Type", "UBound", "Unlock", + "Variant", "Wend", "While", "With", "WithEvents", + "Write", "Xor"), + + "C#" => array( + "abstract", "as", "base", "bool", "break", + "byte", "case", "catch", "char", "checked", + /*class*/ "const", "continue", "decimal", "default", + "delegate", "do", "double", "else", "enum", + "event", "explicit", "extern", "false", "finally", + "fixed", "float", "for", "foreach", "goto", + "if", "implicit", "in", "int", "interface", + "internal", "is", "lock", "long", "namespace", + "new", "null", "object", "operator", "out", + "override", "params", "private", "protected", "public", + "readonly", "ref", "return", "sbyte", "sealed", + "short", "sizeof", "stackalloc","static", "string", + "struct", "switch", "this", "throw", "true", + "try", "typeof", "uint", "ulong", "unchecked", + "unsafe", "ushort", "using", "virtual", "volatile", + "void", "while"), + + "Ruby" => array( + "alias", "and", "begin", "break", "case", + /*class*/ "def", "defined", "do", "else", + "elsif", "end", "ensure", "false", "for", + "if", "in", "module", "next", "module", + "next", "nil", "not", "or", "redo", + "rescue", "retry", "return", "self", "super", + "then", "true", "undef", "unless", "until", + "when", "while", "yield"), + + "Python" => array( + "and", "assert", "break", /*"class",*/ "continue", + "def", "del", "elif", "else", "except", + "exec", "finally", "for", "from", "global", + "if", "import", "in", "is", "lambda", + "not", "or", "pass", "print", "raise", + "return", "try", "while", "yield"), + + "Pascal" => array( + "Absolute", "Abstract", "All", "And", "And_then", + "Array", "Asm", "Begin", "Bindable", "Case", + /*"Class",*/ "Const", "Constructor","Destructor", "Div", + "Do", "Downto", "Else", "End", "Export", + "File", "For", "Function", "Goto", "If", + "Import", "Implementation","Inherited","In", "Inline", + "Interface", "Is", "Label", "Mod", "Module", + "Nil", "Not", "Object", "Of", "Only", + "Operator", "Or", "Or_else", "Otherwise", "Packed", + "Pow", "Procedure", "Program", "Property", "Protected", + "Qualified", "Record", "Repeat", "Restricted", "Set", + "Shl", "Shr", "Then", "To", "Type", + "Unit", "Until", "Uses", "Value", "Var", + "View", "Virtual", "While", "With", "Xor"), + + "mIRC" => array( + ), + + "PL/I" => array( + "A", "ABS", "ACOS", "%ACTIVATE", "ACTUALCOUNT", + "ADD", "ADDR", "ADDREL", "ALIGNED", "ALLOCATE", + "ALLOC", "ALLOCATION", "ALLOCN", "ANY", "ANYCONDITION", + "APPEND", "AREA", "ASIN", "ATAN", "ATAND", + "ATANH", "AUTOMATIC", "AUTO", "B", "B1", + "B2", "B3", "B4", "BACKUP_DATE", "BASED", + "BATCH", "BEGIN", "BINARY", "BIN", "BIT", + "BLOCK_BOUNDARY_FORMAT", "BLOCK_IO", "BLOCK_SIZE", "BOOL", + "BUCKET_SIZE", "BUILTIN", "BY", "BYTE", "BYTESIZE", + "CALL", "CANCEL_CONTROL_O", "CARRIAGE_RETURN_FORMAT", + "CEIL", "CHAR", "CHARACTER", "CLOSE", "COLLATE", "COLUMN", + "CONDITION", "CONTIGUOUS", "CONTIGUOUS_BEST_TRY", "CONTROLLED", + "CONVERSION", "COPY", "COS", "COSD", "COSH", + "CREATION_DATE", "CURRENT_POSITION", "DATE", + "DATETIME", "%DEACTIVATE", "DECIMAL", "DEC", "%DECLARE", + "%DCL", "DECLARE", "DCL", "DECODE", "DEFAULT_FILE_NAME", + "DEFERRED_WRITE", "DEFINED", "DEF", "DELETE", + "DESCRIPTOR", "%DICTIONARY", "DIMENSION","DIM", "DIRECT", + "DISPLAY", "DIVIDE", "%DO", "DO", "E", + "EDIT", "%ELSE", "ELSE", "EMPTY", "ENCODE", + "%END", "END", "ENDFILE", "ENDPAGE", "ENTRY", + "ENVIRONMENT", "ENV", "%ERROR", "ERROR", "EVERY", + "EXP", "EXPIRATION_DATE", "EXTEND", "EXTENSION_SIZE", + "EXTERNAL", "EXT", "F", "FAST_DELETE", "%FATAL", + "FILE", "FILE_ID", "FILE_ID_TO", "FILE_SIZE", + "FINISH", "FIXED", "FIXEDOVERFLOW", "FOFL", + "FIXED_CONTROL_FROM", "FIXED_CONTROL_SIZE", "FIXED_CONTROL_SIZE_TO", + "FIXED_CONTROL_TO", "FIXED_LENGTH_RECORDS", "FLOAT", + "FLOOR", "FLUSH", "FORMAT", "FREE", "FROM", + "GET", "GLOBALDEF", "GLOBALREF", "%GOTO", + "GOTO", "GO", "TO", "GROUP_PROTETION", "HBOUND", + "HIGH", "INDENT", "%IF", "IF", "IGNORE_LINE_MARKS", + "IN", "%INCLUDE", "INDEX", "INDEXED", "INDEX_NUMBER", + "%INFORM", "INFORM", "INITIAL", "INIT", "INITIAL_FILL", + "INPUT", "INT", "INTERNAL", "INTO", "KEY", + "KEYED", "KEYFROM", "KEYTO", "LABEL", "LBOUND", + "LEAVE", "LENGTH", "LIKE", "LINE", "LINENO", + "LINESIZE", "%LIST", "LIST", "LOCK_ON_READ", "LOCK_ON_WRITE", + "LOG", "LOG10", "LOG2", "LOW", "LTRIM", + "MAIN", "MANUAL_UNLOCKING", "MATCH_GREATER", + "MATCH_GREATER_EQUAL", "MATCH_NEXT", "MATCH_NEXT_EQUAL", + "MAX", "MAXIMUM_RECORD_NUMBER", "MAXIMUM_RECORD_SIZE", + "MAXLENGTH", "MEMBER", "MIN", "MOD", "MULTIBLOCK_COUNT", + "MULTIBUFFER_COUNT", "MULTIPLY", "NEXT_VOLUME", "%NOLIST", + "NOLOCK", "NONEXISTENT_RECORD", "NONRECURSIVE", "NONVARYING", + "NONVAR", "NORESCAN", "NO_ECHO", "NO_FILTER", "NO_SHARE", + "NULL", "OFFSET", "ON", "ONARGSLIST", "ONCHAR", + "ONCODE", "ONFILE", "ONKEY", "ONSOURCE", "OPEN", + "OPTIONAL", "OPTIONS", "OTHERWISE","OTHER", "OUTPUT", + "OVERFLOW", "OFL", "OWNER_GROUP", "OWNER_ID", + "OWNER_MEMBER", "OWNER_PROTECTION", "P", "%PAGE", + "PAGE", "PAGENO", "PAGESIZE", "PARAMETER", "PARM", + "PICTURE", "PIC", "POINTER", "PTR", "POSINT", + "POSITION", "POS", "PRECISION","PREC", "PRESENT", + "PRINT", "PRINTER_FORMAT", "%PROCEDURE", "%PROC", + "PROCEDURE", "PROC", "PROD", "PROMPT", "PURGE_TYPE_AHEAD", + "PUT", "R", "RANK", "READ", "READONLY", + "READ_AHEAD", "READ_CHECK", "READ_REGARDLESS", "RECORD", + "RECORD_ID", "RECORD_ID_ACCESS", "RECORD_ID_TO", "RECURSIVE", + "REFER", "REFERENCE", "RELEASE", "REPEAT", "%REPLACE", + "RESCAN", "RESIGNAL", "RETRIEVAL_POINTERS", "%RETURN", + "RETURN", "RETURNS", "REVERSE", "REVERT", "REVISION_DATE", + "REWIND", "REWIND_ON_CLOSE", "REWIND_ON_OPEN", + "REWRITE", "ROUND", "RTRIM", "%SBTTL", "SCALARVARYING", + "SEARCH", "SELECT", "SEQUENTIAL", "SEQL", + "SET", "SHARED_READ", "SHARED_WRITE", "SIGN", + "SIGNAL", "SIN", "SIND", "SINH", "SIZE", + "SKIP", "SNAP", "SOME", "SPACEBLOCK", "SPOOL", + "SQRT", "STATEMENT", "STATIC", "STOP", "STORAGE", + "STREAM", "STRING", "STRINGRANGE", "STRG", + "STRUCTURE", "SUBSCRIPTRANGE", "SUBRG", "SUBSTR", + "SUBTRACT", "SUM", "SUPERCEDE","SYSIN", "SYSPRINT", + "SYSTEM", "SYSTEM_PROTECTION", "TAB", "TAN", + "TAND", "TANH", "TEMPORARY","%THEN", "THEN", + "TIME", "TIMEOUT_PERIOD", "%TITLE", "TITLE", + "TO", "TRANSLATE", "TRIM", "TRUNC", "TRUNCATE", + "UNALIGNED", "UNAL", "UNDEFINED","UNDF", "UNDERFLOW", + "UFL", "UNION", "UNSPEC", "UNTIL", "UPDATE", + "USER_OPEN", "VALID", "VALUE", "VAL", "VARIABLE", + "VARIANT", "VARYING", "VAR", "VAXCONDITION", "VERIFY", + "WAIT_FOR_RECORD", "%WARN", "WARN", "WHEN", + "WHILE", "WORLD_PROTECTION", "WRITE", "WRITE_BEHIND", + "WRITE_CHECK", "X", "ZERODIVIDE"), + + "SQL" => array( + "abort", "abs", "absolute", "access", + "action", "ada", "add", "admin", + "after", "aggregate", "alias", "all", + "allocate", "alter", "analyse", "analyze", + "and", "any", "are", "array", + "as", "asc", "asensitive", "assertion", + "assignment", "asymmetric", "at", "atomic", + "authorization", "avg", "backward", "before", + "begin", "between", "bigint", "binary", + "bit", "bitvar", "bit_length", "blob", + "boolean", "both", "breadth", "by", + "c", "cache", "call", "called", + "cardinality", "cascade", "cascaded", "case", + "cast", "catalog", "catalog_name", "chain", + "char", "character", "characteristics", "character_length", + "character_set_catalog", "character_set_name", "character_set_schema", "char_length", + "check", "checked", "checkpoint", /* "class", */ + "class_origin", "clob", "close", "cluster", + "coalesce", "cobol", "collate", "collation", + "collation_catalog", "collation_name", "collation_schema", "column", + "column_name", "command_function", "command_function_code", "comment", + "commit", "committed", "completion", "condition_number", + "connect", "connection", "connection_name", "constraint", + "constraints", "constraint_catalog", "constraint_name", "constraint_schema", + "constructor", "contains", "continue", "conversion", + "convert", "copy", "corresponding", "count", + "create", "createdb", "createuser", "cross", + "cube", "current", "current_date", "current_path", + "current_role", "current_time", "current_timestamp", "current_user", + "cursor", "cursor_name", "cycle", "data", + "database", "date", "datetime_interval_code", "datetime_interval_precision", + "day", "deallocate", "dec", "decimal", + "declare", "default", "defaults", "deferrable", + "deferred", "defined", "definer", "delete", + "delimiter", "delimiters", "depth", "deref", + "desc", "describe", "descriptor", "destroy", + "destructor", "deterministic", "diagnostics", "dictionary", + "disconnect", "dispatch", "distinct", "do", + "domain", "double", "drop", "dynamic", + "dynamic_function", "dynamic_function_code", "each", "else", + "encoding", "encrypted", "end", "end-exec", + "equals", "escape", "every", "except", + "exception", "excluding", "exclusive", "exec", + "execute", "existing", "exists", "explain", + "external", "extract", "false", "fetch", + "final", "first", "float", "for", + "force", "foreign", "fortran", "forward", + "found", "free", "freeze", "from", + "full", "function", "g", "general", + "generated", "get", "global", "go", + "goto", "grant", "granted", "group", + "grouping", "handler", "having", "hierarchy", + "hold", "host", "hour", "identity", + "ignore", "ilike", "immediate", "immutable", + "implementation", "implicit", "in", "including", + "increment", "index", "indicator", "infix", + "inherits", "initialize", "initially", "inner", + "inout", "input", "insensitive", "insert", + "instance", "instantiable", "instead", "int", + "integer", "intersect", "interval", "into", + "invoker", "is", "isnull", "isolation", + "iterate", "join", "k", "key", + "key_member", "key_type", "lancompiler", "language", + "large", "last", "lateral", "leading", + "left", "length", "less", "level", + "like", "limit", "listen", "load", + "local", "localtime", "localtimestamp", "location", + "locator", "lock", "lower", "m", + "map", "match", "max", "maxvalue", + "message_length", "message_octet_length", "message_text", "method", + "min", "minute", "minvalue", "mod", + "mode", "modifies", "modify", "module", + "month", "more", "move", "mumps", + "name", "names", "national", "natural", + "nchar", "nclob", "new", "next", + "no", "nocreatedb", "nocreateuser", "none", + "not", "nothing", "notify", "notnull", + "null", "nullable", "nullif", "number", + "numeric", "object", "octet_length", "of", + "off", "offset", "oids", "old", + "on", "only", "open", "operation", + "operator", "option", "options", "or", + "order", "ordinality", "out", "outer", + "output", "overlaps", "overlay", "overriding", + "owner", "pad", "parameter", "parameters", + "parameter_mode", "parameter_name", "parameter_ordinal_position", "parameter_specific_catalog", + "parameter_specific_name", "parameter_specific_schema", "partial", "pascal", + "password", "path", "pendant", "placing", + "pli", "position", "postfix", "precision", + "prefix", "preorder", "prepare", "preserve", + "primary", "prior", "privileges", "procedural", + "procedure", "public", "read", "reads", + "real", "recheck", "recursive", "ref", + "references", "referencing", "reindex", "relative", + "rename", "repeatable", "replace", "reset", + "restart", "restrict", "result", "return", + "returned_length", "returned_octet_length", "returned_sqlstate", "returns", + "revoke", "right", "role", "rollback", + "rollup", "routine", "routine_catalog", "routine_name", + "routine_schema", "row", "rows", "row_count", + "rule", "savepoint", "scale", "schema", + "schema_name", "scope", "scroll", "search", + "second", "section", "security", "select", + "self", "sensitive", "sequence", "serializable", + "server_name", "session", "session_user", "set", + "setof", "sets", "share", "show", + "similar", "simple", "size", "smallint", + "some", "source", "space", "specific", + "specifictype", "specific_name", "sql", "sqlcode", + "sqlerror", "sqlexception", "sqlstate", "sqlwarning", + "stable", "start", "state", "statement", + "static", "statistics", "stdin", "stdout", + "storage", "strict", "structure", "style", + "subclass_origin", "sublist", "substring", "sum", + "symmetric", "sysid", "system", "system_user", + "table", "table_name", "temp", "template", + "temporary", "terminate", "text", "than", "then", + "time", "timestamp", "timezone_hour", "timezone_minute", + "to", "toast", "trailing", "transaction", + "transactions_committed", "transactions_rolled_back", "transaction_active", "transform", + "transforms", "translate", "translation", "treat", + "trigger", "trigger_catalog", "trigger_name", "trigger_schema", + "trim", "true", "truncate", "trusted", + "type", "uncommitted", "under", "unencrypted", + "union", "unique", "unknown", "unlisten", + "unnamed", "unnest", "until", "update", + "upper", "usage", "user", "user_defined_type_catalog", + "user_defined_type_name", "user_defined_type_schema", "using", "vacuum", + "valid", "validator", "value", "values", + "varchar", "variable", "varying", "verbose", + "version", "view", "volatile", "when", + "whenever", "where", "with", "without", + "work", "write", "year", "zone") + + ); + + $case_insensitive = array( + "VB" => true, + "Pascal" => true, + "PL/I" => true, + "SQL" => true + ); + $ncs = false; + if (array_key_exists($language, $case_insensitive)) + $ncs = true; + + $text = (array_key_exists($language, $preproc))? + preproc_replace($preproc[$language], $text) : + $text; + $text = (array_key_exists($language, $keywords))? + keyword_replace($keywords[$language], $text, $ncs) : + $text; + + return $text; +} + + +function rtrim1($span, $lang, $ch) +{ + return syntax_highlight_helper(substr($span, 0, -1), $lang); +} + + +function rtrim1_htmlesc($span, $lang, $ch) +{ + return htmlspecialchars(substr($span, 0, -1)); +} + + +function sch_rtrim1($span, $lang, $ch) +{ + return sch_syntax_helper(substr($span, 0, -1)); +} + + +function rtrim2($span, $lang, $ch) +{ + return substr($span, 0, -2); +} + + +function syn_proc($span, $lang, $ch) +{ + return syntax_highlight_helper($span, $lang); +} + +function dash_putback($span, $lang, $ch) +{ + return syntax_highlight_helper('-' . $span, $lang); +} + +function slash_putback($span, $lang, $ch) +{ + return syntax_highlight_helper('/' . $span, $lang); +} + +function slash_putback_rtrim1($span, $lang, $ch) +{ + return rtrim1('/' . $span, $lang, $ch); +} + +function lparen_putback($span, $lang, $ch) +{ + return syntax_highlight_helper('(' . $span, $lang); +} + +function lparen_putback_rtrim1($span, $lang, $ch) +{ + return rtrim1('(' . $span, $lang, $ch); +} + +function prepend_xml_opentag($span, $lang, $ch) +{ + return '<' . $span; +} + +function proc_void($span, $lang, $ch) +{ + return $span; +} + + +/** + * Syntax highlight function + * Does the bulk of the syntax highlighting by lexing the input + * string, then calling the helper function to highlight keywords. + */ +function syntax_highlight($text, $language) +{ + if ($language == "Plain Text") return $text; + + define("normal_text", 1, true); + define("dq_literal", 2, true); + define("dq_escape", 3, true); + define("sq_literal", 4, true); + define("sq_escape", 5, true); + define("slash_begin", 6, true); + define("star_comment", 7, true); + define("star_end", 8, true); + define("line_comment", 9, true); + define("html_entity", 10, true); + define("lc_escape", 11, true); + define("block_comment",12, true); + define("paren_begin", 13, true); + define("dash_begin", 14, true); + define("bt_literal", 15, true); + define("bt_escape", 16, true); + define("xml_tag_begin",17, true); + define("xml_tag", 18, true); + define("xml_pi", 19, true); + define("sch_normal", 20, true); + define("sch_stresc", 21, true); + define("sch_idexpr", 22, true); + define("sch_numlit", 23, true); + define("sch_chrlit", 24, true); + define("sch_strlit", 25, true); + + $initial_state["Scheme"] = sch_normal; + + $sch[sch_normal][0] = sch_normal; + $sch[sch_normal]['"'] = sch_strlit; + $sch[sch_normal]["#"] = sch_chrlit; + $sch[sch_normal]["0"] = sch_numlit; + $sch[sch_normal]["1"] = sch_numlit; + $sch[sch_normal]["2"] = sch_numlit; + $sch[sch_normal]["3"] = sch_numlit; + $sch[sch_normal]["4"] = sch_numlit; + $sch[sch_normal]["5"] = sch_numlit; + $sch[sch_normal]["6"] = sch_numlit; + $sch[sch_normal]["7"] = sch_numlit; + $sch[sch_normal]["8"] = sch_numlit; + $sch[sch_normal]["9"] = sch_numlit; + + $sch[sch_strlit]['"'] = sch_normal; + $sch[sch_strlit]["\n"] = sch_normal; + $sch[sch_strlit]["\\"] = sch_stresc; + $sch[sch_strlit][0] = sch_strlit; + + $sch[sch_chrlit][" "] = sch_normal; + $sch[sch_chrlit]["\t"] = sch_normal; + $sch[sch_chrlit]["\n"] = sch_normal; + $sch[sch_chrlit]["\r"] = sch_normal; + $sch[sch_chrlit][0] = sch_chrlit; + + $sch[sch_numlit][" "] = sch_normal; + $sch[sch_numlit]["\t"] = sch_normal; + $sch[sch_numlit]["\n"] = sch_normal; + $sch[sch_numlit]["\r"] = sch_normal; + $sch[sch_numlit][0] = sch_numlit; + + // + // State transitions for C + // + $c89[normal_text]["\""] = dq_literal; + $c89[normal_text]["'"] = sq_literal; + $c89[normal_text]["/"] = slash_begin; + $c89[normal_text][0] = normal_text; + + $c89[dq_literal]["\""] = normal_text; + $c89[dq_literal]["\n"] = normal_text; + $c89[dq_literal]["\\"] = dq_escape; + $c89[dq_literal][0] = dq_literal; + + $c89[dq_escape][0] = dq_literal; + + $c89[sq_literal]["'"] = normal_text; + $c89[sq_literal]["\n"] = normal_text; + $c89[sq_literal]["\\"] = sq_escape; + $c89[sq_literal][0] = sq_literal; + + $c89[sq_escape][0] = sq_literal; + + $c89[slash_begin]["*"] = star_comment; + $c89[slash_begin][0] = normal_text; + + $c89[star_comment]["*"] = star_end; + $c89[star_comment][0] = star_comment; + + $c89[star_end]["/"] = normal_text; + $c89[star_end]["*"] = star_end; + $c89[star_end][0] = star_comment; + + // + // State transitions for C++ + // Inherit transitions from C, and add line comment support + // + $cpp = $c89; + $cpp[slash_begin]["/"] = line_comment; + $cpp[line_comment]["\n"] = normal_text; + $cpp[line_comment]["\\"] = lc_escape; + $cpp[line_comment][0] = line_comment; + + $cpp[lc_escape]["\r"] = lc_escape; + $cpp[lc_escape][0] = line_comment; + + // + // State transitions for C99. + // C99 supports line comments like C++ + // + $c99 = $cpp; + + // State transitions for PL/I + // Kinda like C + $pli = $c89; + + // + // State transitions for PHP + // Inherit transitions from C++, and add perl-style line comment support + $php = $cpp; + $php[normal_text]["#"] = line_comment; + $php[sq_literal]["\n"] = sq_literal; + $php[dq_literal]["\n"] = dq_literal; + + // + // State transitions for Perl + $perl[normal_text]["#"] = line_comment; + $perl[normal_text]["\""] = dq_literal; + $perl[normal_text]["'"] = sq_literal; + $perl[normal_text][0] = normal_text; + + $perl[dq_literal]["\""] = normal_text; + $perl[dq_literal]["\\"] = dq_escape; + $perl[dq_literal][0] = dq_literal; + + $perl[dq_escape][0] = dq_literal; + + $perl[sq_literal]["'"] = normal_text; + $perl[sq_literal]["\\"] = sq_escape; + $perl[sq_literal][0] = sq_literal; + + $perl[sq_escape][0] = sq_literal; + + $perl[line_comment]["\n"] = normal_text; + $perl[line_comment][0] = line_comment; + + $mirc[normal_text]["\""] = dq_literal; + $mirc[normal_text][";"] = line_comment; + $mirc[normal_text][0] = normal_text; + + $mirc[dq_literal]["\""] = normal_text; + $mirc[dq_literal]["\\"] = dq_escape; + $mirc[dq_literal][0] = dq_literal; + + $mirc[dq_escape][0] = dq_literal; + + $mirc[line_comment]["\n"] = normal_text; + $mirc[line_comment][0] = line_comment; + + $ruby = $perl; + + $python = $perl; + + $java = $cpp; + + $vb = $perl; + $vb[normal_text]["#"] = normal_text; + $vb[normal_text]["'"] = line_comment; + + $cs = $java; + + $pascal = $c89; + $pascal[normal_text]["("] = paren_begin; + $pascal[normal_text]["/"] = slash_begin; + $pascal[normal_text]["{"] = block_comment; + + $pascal[paren_begin]["*"] = star_comment; + $pascal[paren_begin]["'"] = sq_literal; + $pascal[paren_begin]['"'] = dq_literal; + $pascal[paren_begin][0] = normal_text; + + $pascal[slash_begin]["'"] = sq_literal; + $pascal[slash_begin]['"'] = dq_literal; + $pascal[slash_begin]['/'] = line_comment; + $pascal[slash_begin][0] = normal_text; + + $pascal[star_comment]["*"] = star_end; + $pascal[star_comment][0] = star_comment; + + $pascal[block_comment]["}"] = normal_text; + $pascal[block_comment][0] = block_comment; + + $pascal[line_comment]["\n"] = normal_text; + $pascal[line_comment][0] = line_comment; + + $pascal[star_end][")"] = normal_text; + $pascal[star_end]["*"] = star_end; + $pascal[star_end][0] = star_comment; + + $sql[normal_text]['"'] = dq_literal; + $sql[normal_text]["'"] = sq_literal; + $sql[normal_text]['`'] = bt_literal; + $sql[normal_text]['-'] = dash_begin; + $sql[normal_text][0] = normal_text; + + $sql[dq_literal]['"'] = normal_text; + $sql[dq_literal]['\\'] = dq_escape; + $sql[dq_literal][0] = dq_literal; + + $sql[sq_literal]["'"] = normal_text; + $sql[sq_literal]['\\'] = sq_escape; + $sql[sq_literal][0] = sq_literal; + + $sql[bt_literal]['`'] = normal_text; + $sql[bt_literal]['\\'] = bt_escape; + $sql[bt_literal][0] = bt_literal; + + $sql[dq_escape][0] = dq_literal; + $sql[sq_escape][0] = sq_literal; + $sql[bt_escape][0] = bt_literal; + + $sql[dash_begin]["-"] = line_comment; + $sql[dash_begin][0] = normal_text; + + $sql[line_comment]["\n"] = normal_text; + $sql[line_comment]["\\"] = lc_escape; + $sql[line_comment][0] = line_comment; + + $sql[lc_escape]["\r"] = lc_escape; + $sql[lc_escape][0] = line_comment; + + $xml[normal_text]["<"] = xml_tag_begin; + $xml[normal_text]["&"] = html_entity; + $xml[normal_text][0] = normal_text; + $xml[html_entity][";"] = normal_text; + $xml[html_entity]["<"] = xml_tag_begin; + $xml[html_entity][0] = html_entity; + $xml[xml_tag_begin]["?"] = xml_pi; + $xml[xml_tag_begin]["!"] = line_comment; + $xml[xml_tag_begin][0] = xml_tag; + $xml[xml_tag][">"] = normal_text; + $xml[xml_tag]["\""] = dq_literal; + $xml[xml_tag]["'"] = sq_literal; + $xml[xml_tag][0] = xml_tag; + $xml[xml_pi][">"] = normal_text; + $xml[xml_pi][0] = xml_tag; + $xml[line_comment][">"] = normal_text; + $xml[line_comment][0] = line_comment; + $xml[dq_literal]["\""] = xml_tag; + $xml[dq_literal]["&"] = dq_escape; + $xml[dq_literal][0] = dq_literal; + $xml[sq_literal]["'"] = xml_tag; + $xml[sq_literal]["&"] = sq_escape; + $xml[sq_literal][0] = sq_literal; + $xml[dq_escape][";"] = dq_literal; + $xml[dq_escape][0] = dq_escape; + + // + // Main state transition table + // + $states = array( + "C89" => $c89, + "C" => $c99, + "C++" => $cpp, + "PHP" => $php, + "Perl" => $perl, + "Java" => $java, + "VB" => $vb, + "C#" => $cs, + "Ruby" => $ruby, + "Python" => $python, + "Pascal" => $pascal, + "mIRC" => $mirc, + "PL/I" => $pli, + "SQL" => $sql, + "XML" => $xml, + "Scheme" => $sch + ); + + + // + // Process functions + // + $process["C89"][normal_text][sq_literal] = "rtrim1"; + $process["C89"][normal_text][dq_literal] = "rtrim1"; + $process["C89"][normal_text][slash_begin] = "rtrim1"; + $process["C89"][normal_text][0] = "syn_proc"; + + $process["C89"][slash_begin][star_comment] = "rtrim1"; + $process["C89"][slash_begin][0] = "slash_putback"; + + $process["Scheme"][sch_normal][sch_strlit] = "sch_rtrim1"; + $process["Scheme"][sch_normal][sch_chrlit] = "sch_rtrim1"; + $process["Scheme"][sch_normal][sch_numlit] = "sch_rtrim1"; + + $process["SQL"][normal_text][sq_literal] = "rtrim1"; + $process["SQL"][normal_text][dq_literal] = "rtrim1"; + $process["SQL"][normal_text][bt_literal] = "rtrim1"; + $process["SQL"][normal_text][dash_begin] = "rtrim1"; + $process["SQL"][normal_text][0] = "syn_proc"; + + $process["SQL"][dash_begin][line_comment] = "rtrim1"; + $process["SQL"][dash_begin][0] = "dash_putback"; + + $process["PL/I"] = $process["C89"]; + + $process["C++"] = $process["C89"]; + $process["C++"][slash_begin][line_comment] = "rtrim1"; + + $process["C"] = $process["C++"]; + + $process["PHP"] = $process["C++"]; + $process["PHP"][normal_text][line_comment] = "rtrim1"; + + $process["Perl"][normal_text][sq_literal] = "rtrim1"; + $process["Perl"][normal_text][dq_literal] = "rtrim1"; + $process["Perl"][normal_text][line_comment] = "rtrim1"; + $process["Perl"][normal_text][0] = "syn_proc"; + + $process["Ruby"] = $process["Perl"]; + $process["Python"] = $process["Perl"]; + + $process["mIRC"][normal_text][dq_literal] = "rtrim1"; + $process["mIRC"][normal_text][line_comment] = "rtrim1"; + $process["mIRC"][normal_text][0] = "syn_proc"; + + $process["VB"] = $process["Perl"]; + + $process["Java"] = $process["C++"]; + + $process["C#"] = $process["Java"]; + + $process["Pascal"] = $process["C++"]; + $process["Pascal"][normal_text][line_comment] = "rtrim1"; + $process["Pascal"][normal_text][block_comment] = "rtrim1"; + $process["Pascal"][normal_text][paren_begin] = "rtrim1"; + $process["Pascal"][slash_begin][sq_literal] = "slash_putback_rtrim1"; + $process["Pascal"][slash_begin][dq_literal] = "slash_putback_rtrim1"; + $process["Pascal"][slash_begin][0] = "slash_putback"; + $process["Pascal"][paren_begin][sq_literal] = "lparen_putback_rtrim1"; + $process["Pascal"][paren_begin][dq_literal] = "lparen_putback_rtrim1"; + $process["Pascal"][paren_begin][star_comment] = "rtrim1"; + $process["Pascal"][paren_begin][0] = "lparen_putback"; + + $process["XML"][normal_text][xml_tag_begin] = "rtrim1"; + $process["XML"][normal_text][html_entity] = "rtrim1"; + $process["XML"][html_entity][xml_tag_begin] = "rtrim1"; + $process["XML"][html_entity][0] = "proc_void"; + $process["XML"][xml_tag_begin][xml_tag] = "prepend_xml_opentag"; + $process["XML"][xml_tag_begin][xml_pi] = "rtrim1"; + $process["XML"][xml_tag_begin][line_comment] = "rtrim1"; + $process["XML"][line_comment][normal_text] = "rtrim1_htmlesc"; + $process["XML"][xml_tag][normal_text] = "rtrim1"; + $process["XML"][xml_tag][dq_literal] = "rtrim1"; + $process["XML"][dq_literal][xml_tag] = "rtrim1"; + $process["XML"][dq_literal][dq_escape] = "rtrim1"; + + $process_end["C89"] = "syntax_highlight_helper"; + $process_end["C++"] = $process_end["C89"]; + $process_end["C"] = $process_end["C89"]; + $process_end["PHP"] = $process_end["C89"]; + $process_end["Perl"] = $process_end["C89"]; + $process_end["Java"] = $process_end["C89"]; + $process_end["VB"] = $process_end["C89"]; + $process_end["C#"] = $process_end["C89"]; + $process_end["Ruby"] = $process_end["C89"]; + $process_end["Python"] = $process_end["C89"]; + $process_end["Pascal"] = $process_end["C89"]; + $process_end["mIRC"] = $process_end["C89"]; + $process_end["PL/I"] = $process_end["C89"]; + $process_end["SQL"] = $process_end["C89"]; + $process_end["Scheme"] = "sch_syntax_helper"; + + + $edges["C89"][normal_text .",". dq_literal] = '"'; + $edges["C89"][normal_text .",". sq_literal] = '\''; + $edges["C89"][slash_begin .",". star_comment] = '/*'; + $edges["C89"][dq_literal .",". normal_text] = ''; + $edges["C89"][sq_literal .",". normal_text] = ''; + $edges["C89"][star_end .",". normal_text] = ''; + + $edges["Scheme"][sch_normal .",". sch_strlit] = '"'; + $edges["Scheme"][sch_normal .",". sch_numlit] = ''; + $edges["Scheme"][sch_normal .",". sch_chrlit] = '#'; + $edges["Scheme"][sch_strlit .",". sch_normal] = ''; + $edges["Scheme"][sch_numlit .",". sch_normal] = ''; + $edges["Scheme"][sch_chrlit .",". sch_normal] = ''; + + $edges["SQL"][normal_text .",". dq_literal] = '"'; + $edges["SQL"][normal_text .",". sq_literal] = '\''; + $edges["SQL"][dash_begin .",". line_comment] = '--'; + $edges["SQL"][normal_text .",". bt_literal] = '`'; + $edges["SQL"][dq_literal .",". normal_text] = ''; + $edges["SQL"][sq_literal .",". normal_text] = ''; + $edges["SQL"][line_comment .",". normal_text] = ''; + + $edges["PL/I"] = $edges["C89"]; + + $edges["C++"] = $edges["C89"]; + $edges["C++"][slash_begin .",". line_comment] = '//'; + $edges["C++"][line_comment .",". normal_text] = ''; + + $edges["C"] = $edges["C++"]; + + $edges["PHP"] = $edges["C++"]; + $edges["PHP"][normal_text .",". line_comment] = '#'; + + $edges["Perl"][normal_text .",". dq_literal] = '"'; + $edges["Perl"][normal_text .",". sq_literal] = '\''; + $edges["Perl"][dq_literal .",". normal_text] = ''; + $edges["Perl"][sq_literal .",". normal_text] = ''; + $edges["Perl"][normal_text .",". line_comment] = '#'; + $edges["Perl"][line_comment .",". normal_text] = ''; + + $edges["Ruby"] = $edges["Perl"]; + + $edges["Python"] = $edges["Perl"]; + + $edges["mIRC"][normal_text .",". dq_literal] = '"'; + $edges["mIRC"][normal_text .",". line_comment] = ';'; + $edges["mIRC"][dq_literal .",". normal_text] = ''; + $edges["mIRC"][line_comment .",". normal_text] = ''; + + $edges["VB"] = $edges["Perl"]; + $edges["VB"][normal_text .",". line_comment] = '\''; + + $edges["Java"] = $edges["C++"]; + + $edges["C#"] = $edges["Java"]; + + $edges["Pascal"] = $edges["C89"]; + $edges["Pascal"][paren_begin .",". star_comment] = '(*'; + $edges["Pascal"][paren_begin .",". dq_literal] = '"'; + $edges["Pascal"][paren_begin .",". sq_literal] = '\''; + $edges["Pascal"][slash_begin .",". dq_literal] = '"'; + $edges["Pascal"][slash_begin .",". sq_literal] = '\''; + $edges["Pascal"][slash_begin .",". line_comment] = '//'; + $edges["Pascal"][normal_text . "," . block_comment] = '{'; + $edges["Pascal"][line_comment . "," . normal_text] = ''; + $edges["Pascal"][block_comment . "," . normal_text] = ''; + + $edges["XML"][normal_text . "," . html_entity] = '&'; + $edges["XML"][html_entity . "," . normal_text] = ''; + $edges["XML"][html_entity . "," . xml_tag_begin] = ''; + $edges["XML"][xml_tag . "," . normal_text] = '>'; + $edges["XML"][xml_tag_begin . "," . xml_pi] = '<?'; + $edges["XML"][xml_tag_begin . "," . line_comment] = '<!'; + $edges["XML"][line_comment . "," . normal_text] = '>'; + $edges["XML"][xml_tag .",". dq_literal] = '"'; + $edges["XML"][dq_literal . "," . xml_tag] = '"'; + $edges["XML"][dq_literal . "," . dq_escape] = '&'; + $edges["XML"][dq_escape . "," . dq_literal] = ''; + $edges["XML"][xml_tag .",". sq_literal] = '\''; + $edges["XML"][sq_literal . "," . xml_tag] = '\''; + $edges["XML"][sq_literal . "," . sq_escape] = '&'; + $edges["XML"][sq_escape . "," . sq_literal] = ''; + + // + // The State Machine + // + if (array_key_exists($language, $initial_state)) + $state = $initial_state[$language]; + else + $state = normal_text; + $output = ""; + $span = ""; + while (strlen($text) > 0) + { + $ch = substr($text, 0, 1); + $text = substr($text, 1); + + $oldstate = $state; + $state = (array_key_exists($ch, $states[$language][$state]))? + $states[$language][$state][$ch] : + $states[$language][$state][0]; + + $span .= $ch; + + if ($oldstate != $state) + { + if (array_key_exists($language, $process) && + array_key_exists($oldstate, $process[$language])) + { + if (array_key_exists($state, $process[$language][$oldstate])) + { + $pf = $process[$language][$oldstate][$state]; + $output .= $pf($span, $language, $ch); + } + else + { + $pf = $process[$language][$oldstate][0]; + $output .= $pf($span, $language, $ch); + } + } + else + { + $output .= $span; + } + + if (array_key_exists($language, $edges) && + array_key_exists("$oldstate,$state", $edges[$language])) + $output .= $edges[$language]["$oldstate,$state"]; + + $span = ""; + } + } + + if (array_key_exists($language, $process_end) && $state == normal_text) + $output .= $process_end[$language]($span, $language); + else + $output .= $span; + + if ($state != normal_text) + { + if (array_key_exists($language, $edges) && + array_key_exists("$state," . normal_text, $edges[$language])) + $output .= $edges[$language]["$state," . normal_text]; + } + + return $output; +} + +?> diff --git a/php/pgadmin/libraries/js/jquery.js b/php/pgadmin/libraries/js/jquery.js new file mode 100644 index 0000000..8f3ca2e --- /dev/null +++ b/php/pgadmin/libraries/js/jquery.js @@ -0,0 +1,167 @@ +/*! + * jQuery JavaScript Library v1.4.4 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu Nov 11 19:04:53 2010 -0500 + */ +(function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h= +h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;kd)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La, +"`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this, +e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a, +"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+ +a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/, +C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j, +s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this, +j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length}, +toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j=== +-1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false; +if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload", +b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&& +!F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&& +l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H
a";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"), +k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false, +scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent= +false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom= +1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="
";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="
t
";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display= +"none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h= +c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando); +else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one"; +if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true}, +attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&& +b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0}; +c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem, +arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid= +d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+ +c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType=== +8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k=== +"click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+ +d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired= +B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type=== +"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]=== +0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}}); +(function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3]; +break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr, +q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h= +l;g.sort(w);if(h)for(var i=1;i0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n, +m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled=== +true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"=== +g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return in[3]-0},nth:function(g,i,n){return n[3]- +0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()=== +i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]]; +if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m, +g);else if(typeof g.length==="number")for(var p=g.length;n";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g); +n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&& +function(){var g=k,i=t.createElement("div");i.innerHTML="

";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F|| +p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g= +t.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition? +function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n0)for(var h=d;h0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h= +h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context): +c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a, +2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a, +b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&& +e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/\s]+\/)>/g,P={option:[1, +""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= +c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, +wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, +prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, +this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null; +else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1>");try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append", +prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument|| +b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]===""&&!x?r.childNodes:[];for(o=k.length- +1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script")))); +d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i, +jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true, +zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b), +h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b); +if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f= +d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left; +e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/)<[^<]*)*<\/script>/gi, +ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b=== +"object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("
").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&& +!this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})}, +getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html", +script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data|| +!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache= +false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset; +A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type", +b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&& +c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d|| +c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]= +encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess", +[b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"), +e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}}); +if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show", +3),a,b,d);else{d=0;for(var e=this.length;d=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b, +d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a* +Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)} +var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true; +this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide|| +this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a= +c.timers,b=0;b-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a, +e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&& +c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=fa(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=fa(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase(); +c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(l){var k=c(this);k[d](e.call(this,l,k[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+ +b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}})})(window); diff --git a/php/pgadmin/libraries/lib.inc.php b/php/pgadmin/libraries/lib.inc.php new file mode 100644 index 0000000..20859c3 --- /dev/null +++ b/php/pgadmin/libraries/lib.inc.php @@ -0,0 +1,263 @@ +stripVar($_GET); + $misc->stripVar($_POST); + $misc->stripVar($_COOKIE); + $misc->stripVar($_REQUEST); + } + + // This has to be deferred until after stripVar above + $misc->setHREF(); + $misc->setForm(); + + // Enforce PHP environment + ini_set('magic_quotes_runtime', 0); + ini_set('magic_quotes_sybase', 0); + ini_set('arg_separator.output', '&'); + + // If login action is set, then set session variables + if (isset($_POST['loginServer']) && isset($_POST['loginUsername']) && + isset($_POST['loginPassword_'.md5($_POST['loginServer'])])) { + + $_server_info = $misc->getServerInfo($_POST['loginServer']); + + $_server_info['username'] = $_POST['loginUsername']; + $_server_info['password'] = $_POST['loginPassword_'.md5($_POST['loginServer'])]; + + $misc->setServerInfo(null, $_server_info, $_POST['loginServer']); + + // Check for shared credentials + if (isset($_POST['loginShared'])) { + $_SESSION['sharedUsername'] = $_POST['loginUsername']; + $_SESSION['sharedPassword'] = $_POST['loginPassword_'.md5($_POST['loginServer'])]; + } + + $_reload_browser = true; + } + + /* select the theme */ + unset($_theme); + $conf['theme'] = 'default'; + + // 1. Check for the theme from a request var + if (isset($_REQUEST['theme']) && is_file("./themes/{$_REQUEST['theme']}/global.css")) { + /* save the selected theme in cookie for a year */ + setcookie('ppaTheme', $_REQUEST['theme'], time()+31536000); + $_theme = $_SESSION['ppaTheme'] = $conf['theme'] = $_REQUEST['theme']; + } + + // 2. Check for theme session var + if (!isset($_theme) && isset($_SESSION['ppaTheme']) && is_file("./themes/{$_SESSION['ppaTheme']}/global.css")) { + $conf['theme'] = $_SESSION['ppaTheme']; + } + + // 3. Check for theme in cookie var + if (!isset($_theme) && isset($_COOKIE['ppaTheme']) && is_file("./themes/{$_COOKIE['ppaTheme']}/global.css")) { + $conf['theme'] = $_COOKIE['ppaTheme']; + } + + // Determine language file to import: + unset($_language); + + // 1. Check for the language from a request var + if (isset($_REQUEST['language']) && isset($appLangFiles[$_REQUEST['language']])) { + /* save the selected language in cookie for a year */ + setcookie('webdbLanguage', $_REQUEST['language'], time()+31536000); + $_language = $_REQUEST['language']; + } + + // 2. Check for language session var + if (!isset($_language) && isset($_SESSION['webdbLanguage']) && isset($appLangFiles[$_SESSION['webdbLanguage']])) { + $_language = $_SESSION['webdbLanguage']; + } + + // 3. Check for language in cookie var + if (!isset($_language) && isset($_COOKIE['webdbLanguage']) && isset($appLangFiles[$_COOKIE['webdbLanguage']])) { + $_language = $_COOKIE['webdbLanguage']; + } + + // 4. Check for acceptable languages in HTTP_ACCEPT_LANGUAGE var + if (!isset($_language) && $conf['default_lang'] == 'auto' && isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { + // extract acceptable language tags + // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4) + preg_match_all('/\s*([a-z]{1,8}(?:-[a-z]{1,8})*)(?:;q=([01](?:.[0-9]{0,3})?))?\s*(?:,|$)/', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']), $_m, PREG_SET_ORDER); + foreach($_m as $_l) { // $_l[1] = language tag, [2] = quality + if (!isset($_l[2])) $_l[2] = 1; // Default quality to 1 + if ($_l[2] > 0 && $_l[2] <= 1 && isset($availableLanguages[$_l[1]])) { + // Build up array of (quality => language_file) + $_acceptLang[$_l[2]] = $availableLanguages[$_l[1]]; + } + } + unset($_m); + unset($_l); + if (isset($_acceptLang)) { + // Sort acceptable languages by quality + krsort($_acceptLang, SORT_NUMERIC); + $_language = reset($_acceptLang); + unset($_acceptLang); + } + } + + // 5. Otherwise resort to the default set in the config file + if (!isset($_language) && $conf['default_lang'] != 'auto' && isset($appLangFiles[$conf['default_lang']])) { + $_language = $conf['default_lang']; + } + + // Import the language file + if (isset($_language)) { + include("./lang/recoded/{$_language}.php"); + $_SESSION['webdbLanguage'] = $_language; + } + + // Check for config file version mismatch + if (!isset($conf['version']) || $conf['base_version'] > $conf['version']) { + echo $lang['strbadconfig']; + exit; + } + + // Check database support is properly compiled in + if (!function_exists('pg_connect')) { + echo $lang['strnotloaded']; + exit; + } + + // Create data accessor object, if necessary + if (!isset($_no_db_connection)) { + if (!isset($_REQUEST['server'])) { + echo $lang['strnoserversupplied']; + exit; + } + $_server_info = $misc->getServerInfo(); + + /* starting with PostgreSQL 9.0, we can set the application name */ + if(isset($_server_info['pgVersion']) && $_server_info['pgVersion'] >= 9) + putenv("PGOPTIONS=--application_name={$appName}_{$appVersion}"); + + // Redirect to the login form if not logged in + if (!isset($_server_info['username'])) { + include('./login.php'); + exit; + } + + // Connect to the current database, or if one is not specified + // then connect to the default database. + if (isset($_REQUEST['database'])) + $_curr_db = $_REQUEST['database']; + else + $_curr_db = $_server_info['defaultdb']; + + include_once('./classes/database/Connection.php'); + + // Connect to database and set the global $data variable + $data = $misc->getDatabaseAccessor($_curr_db); + + // If schema is defined and database supports schemas, then set the + // schema explicitly. + if (isset($_REQUEST['database']) && isset($_REQUEST['schema'])) { + $status = $data->setSchema($_REQUEST['schema']); + if ($status != 0) { + echo $lang['strbadschema']; + exit; + } + } + + // Get database encoding + $dbEncoding = $data->getDatabaseEncoding(); + + // Set client encoding to database encoding + if ($dbEncoding != '') { + // Explicitly change client encoding if it's different to server encoding. + if (function_exists('pg_client_encoding')) + $currEncoding = pg_client_encoding($data->conn->_connectionID); + elseif (function_exists('pg_clientencoding')) + $currEncoding = pg_clientencoding($data->conn->_connectionID); + else + $currEncoding = null; + + if ($currEncoding != $dbEncoding) { + $status = $data->setClientEncoding($dbEncoding); + if ($status != 0 && $status != -99) { + echo $lang['strbadencoding']; + exit; + } + } + + // Override $lang['appcharset'] + if (isset($data->codemap[$dbEncoding])) + $lang['appcharset'] = $data->codemap[$dbEncoding]; + else + $lang['appcharset'] = $dbEncoding; + } + + + // Load Slony if required + if ($_server_info['slony_support']) { + include('./classes/plugins/Slony.php'); + $slony = new Slony(); + } + } + + if (!function_exists("htmlspecialchars_decode")) { + function htmlspecialchars_decode($string, $quote_style = ENT_COMPAT) { + return strtr($string, array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style))); + } + } +?> diff --git a/php/pgadmin/links.js b/php/pgadmin/links.js new file mode 100644 index 0000000..adedec4 --- /dev/null +++ b/php/pgadmin/links.js @@ -0,0 +1,16 @@ +/** + * Function for updating browser frame and topbar frame so that sqledit window + * pops up with properly selected database. + * + * $Id: links.js,v 1.4 2004/07/13 15:24:41 jollytoad Exp $ + */ +function updateLinks(getVars) { + var topbarLink = 'topbar.php' + getVars; + var browserLink = 'browser.php' + getVars; + var detailLink = 'redirect.php' + getVars + 'section=database'; + + parent.frames.topbar.location = topbarLink; + parent.frames.detail.location = detailLink; + parent.frames.browser.location = browserLink; +} + diff --git a/php/pgadmin/login.php b/php/pgadmin/login.php new file mode 100644 index 0000000..cdcf311 --- /dev/null +++ b/php/pgadmin/login.php @@ -0,0 +1,67 @@ +printHeader($lang['strlogin']); + $misc->printBody(); + $misc->printTrail('root'); + + $server_info = $misc->getServerInfo($_REQUEST['server']); + + $misc->printTitle(sprintf($lang['strlogintitle'], $server_info['desc'])); + + if (isset($msg)) $misc->printMsg($msg); + + $md5_server = md5($_REQUEST['server']); +?> + +
+ $val) { + if (substr($key,0,5) == 'login') continue; + echo "\n"; + } +?> + +
+ + + + + + + + + + 1) : ?> +

/>

+ +

+ + + + +printFooter(); +?> diff --git a/php/pgadmin/logout.php b/php/pgadmin/logout.php new file mode 100644 index 0000000..faed8dc --- /dev/null +++ b/php/pgadmin/logout.php @@ -0,0 +1,18 @@ + diff --git a/php/pgadmin/multiactionform.js b/php/pgadmin/multiactionform.js new file mode 100644 index 0000000..1950608 --- /dev/null +++ b/php/pgadmin/multiactionform.js @@ -0,0 +1,9 @@ +function checkAll(bool) { + + var inputs = document.getElementById('multi_form').getElementsByTagName('input'); + + for (var i=0; iprintTrail('schema'); + $misc->printTabs('schema','opclasses'); + $misc->printMsg($msg); + + $opclasses = $data->getOpClasses(); + + $columns = array( + 'accessmethod' => array( + 'title' => $lang['straccessmethod'], + 'field' => field('amname'), + ), + 'opclass' => array( + 'title' => $lang['strname'], + 'field' => field('opcname'), + ), + 'type' => array( + 'title' => $lang['strtype'], + 'field' => field('opcintype'), + ), + 'default' => array( + 'title' => $lang['strdefault'], + 'field' => field('opcdefault'), + 'type' => 'yesno', + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('opccomment'), + ), + ); + + $actions = array(); + + $misc->printTable($opclasses, $columns, $actions, $lang['strnoopclasses']); + } + + /** + * Generate XML for the browser tree. + */ + function doTree() { + global $misc, $data; + + $opclasses = $data->getOpClasses(); + + // OpClass prototype: "op_class/access_method" + $proto = concat(field('opcname'),'/',field('amname')); + + $attrs = array( + 'text' => $proto, + 'icon' => 'OperatorClass', + 'toolTip'=> field('opccomment'), + ); + + $misc->printTreeXML($opclasses, $attrs); + exit; + } + + if ($action == 'tree') doTree(); + + $misc->printHeader($lang['stropclasses']); + $misc->printBody(); + + switch ($action) { + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/operators.php b/php/pgadmin/operators.php new file mode 100644 index 0000000..1447519 --- /dev/null +++ b/php/pgadmin/operators.php @@ -0,0 +1,221 @@ +printTrail('operator'); + $misc->printTitle($lang['strproperties'],'pg.operator'); + $misc->printMsg($msg); + + $oprdata = $data->getOperator($_REQUEST['operator_oid']); + $oprdata->fields['oprcanhash'] = $data->phpBool($oprdata->fields['oprcanhash']); + + if ($oprdata->recordCount() > 0) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + /* these field only exists in 8.2 and before in pg_catalog */ + if (isset($oprdata->fields['oprlsortop'])) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + else { + echo "\n"; + echo "\n"; + } + echo "
{$lang['strname']}", $misc->printVal($oprdata->fields['oprname']), "
{$lang['strleftarg']}", $misc->printVal($oprdata->fields['oprleftname']), "
{$lang['strrightarg']}", $misc->printVal($oprdata->fields['oprrightname']), "
{$lang['strcommutator']}", $misc->printVal($oprdata->fields['oprcom']), "
{$lang['strnegator']}", $misc->printVal($oprdata->fields['oprnegate']), "
{$lang['strjoin']}", $misc->printVal($oprdata->fields['oprjoin']), "
{$lang['strhashes']}", ($oprdata->fields['oprcanhash']) ? $lang['stryes'] : $lang['strno'], "
{$lang['strmerges']}", ($oprdata->fields['oprlsortop'] !== '0' && $oprdata->fields['oprrsortop'] !== '0') ? $lang['stryes'] : $lang['strno'], "
{$lang['strrestrict']}", $misc->printVal($oprdata->fields['oprrest']), "
{$lang['strleftsort']}", $misc->printVal($oprdata->fields['oprlsortop']), "
{$lang['strrightsort']}", $misc->printVal($oprdata->fields['oprrsortop']), "
{$lang['strlessthan']}", $misc->printVal($oprdata->fields['oprltcmpop']), "
{$lang['strgreaterthan']}", $misc->printVal($oprdata->fields['oprgtcmpop']), "
{$lang['strmerges']}", $data->phpBool($oprdata->fields['oprcanmerge']) ? $lang['stryes'] : $lang['strno'], "
\n"; + + echo "

href}\">{$lang['strshowalloperators']}

\n"; + } + else + doDefault($lang['strinvalidparam']); + } + + /** + * Show confirmation of drop and perform actual drop + */ + function doDrop($confirm) { + global $data, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('operator'); + $misc->printTitle($lang['strdrop'], 'pg.operator.drop'); + + echo "

", sprintf($lang['strconfdropoperator'], $misc->printVal($_REQUEST['operator'])), "

\n"; + + echo "
\n"; + echo "

\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + $status = $data->dropOperator($_POST['operator_oid'], isset($_POST['cascade'])); + if ($status == 0) + doDefault($lang['stroperatordropped']); + else + doDefault($lang['stroperatordroppedbad']); + } + + } + + /** + * Show default list of operators in the database + */ + function doDefault($msg = '') { + global $data, $conf, $misc; + global $lang; + + $misc->printTrail('schema'); + $misc->printTabs('schema','operators'); + $misc->printMsg($msg); + + $operators = $data->getOperators(); + + $columns = array( + 'operator' => array( + 'title' => $lang['stroperator'], + 'field' => field('oprname'), + 'url' => "operators.php?action=properties&{$misc->href}&", + 'vars' => array('operator' => 'oprname', 'operator_oid' => 'oid'), + ), + 'leftarg' => array( + 'title' => $lang['strleftarg'], + 'field' => field('oprleftname'), + ), + 'rightarg' => array( + 'title' => $lang['strrightarg'], + 'field' => field('oprrightname'), + ), + 'returns' => array( + 'title' => $lang['strreturns'], + 'field' => field('resultname'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('oprcomment'), + ), + ); + + $actions = array( + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "operators.php?action=confirm_drop&{$misc->href}&", + 'vars' => array('operator' => 'oprname', 'operator_oid' => 'oid'), + ), + ); + + $misc->printTable($operators, $columns, $actions, $lang['strnooperators']); + +// echo "

href}\">{$lang['strcreateoperator']}

\n"; + } + + /** + * Generate XML for the browser tree. + */ + function doTree() { + global $misc, $data; + + $operators = $data->getOperators(); + + // Operator prototype: "type operator type" + $proto = concat(field('oprleftname'), ' ', field('oprname'), ' ', field('oprrightname')); + + $reqvars = $misc->getRequestVars('operator'); + + $attrs = array( + 'text' => $proto, + 'icon' => 'Operator', + 'toolTip'=> field('oprcomment'), + 'action' => url('operators.php', + $reqvars, + array( + 'action' => 'properties', + 'operator' => $proto, + 'operator_oid' => field('oid') + ) + ) + ); + + $misc->printTreeXML($operators, $attrs); + exit; + } + + if ($action == 'tree') doTree(); + + $misc->printHeader($lang['stroperators']); + $misc->printBody(); + + switch ($action) { + case 'save_create': + if (isset($_POST['cancel'])) doDefault(); + else doSaveCreate(); + break; + case 'create': + doCreate(); + break; + case 'drop': + if (isset($_POST['cancel'])) doDefault(); + else doDrop(false); + break; + case 'confirm_drop': + doDrop(true); + break; + case 'properties': + doProperties(); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/plugin_slony.php b/php/pgadmin/plugin_slony.php new file mode 100644 index 0000000..850c2a1 --- /dev/null +++ b/php/pgadmin/plugin_slony.php @@ -0,0 +1,2240 @@ +href if present + if (isset($_REQUEST['slony_cluster'])) { + $misc->href .= '&slony_cluster=' . urlencode($_REQUEST['slony_cluster']); + } + + /** + * Generate the somewhat complex Slony tree + * @param string $subject The tree node to return + */ + function doTree($subject) { + global $misc, $data, $lang, $slony; + + $reqvars = $misc->getRequestVars('database'); + if (isset($slony)) + $reqvars['slony_cluster'] = $slony->slony_cluster; + + // Determine what actual tree we are building + switch ($subject) { + case 'clusters': + // Clusters + + // Enabled check here is just a hack. + if ($slony->isEnabled()) { + $tabs = array('cluster' => array ( + 'title' => $slony->slony_cluster, + 'url' => 'plugin_slony.php', + 'urlvars' => array('subject' => 'clusters_top'), + 'icon' => 'Cluster', + )); + } + else $tabs = array(); + + $items = $misc->adjustTabsForTree($tabs); + + $attrs = array( + 'text' => noEscape(field('title')), + 'icon' => field('icon'), + 'action' => url(field('url'), + $reqvars, + array('action' => 'cluster_properties') + ), + 'branch' => url(field('url'), + $reqvars, + field('urlvars'), + array('action' => 'clusters_top') + ), + ); + + $misc->printTreeXML($items, $attrs); + + break; + case 'clusters_top': + // Top level Nodes and Replication sets folders + $tabs = array('nodes' => array ( + 'title' => $lang['strnodes'], + 'url' => 'plugin_slony.php', + 'urlvars' => array('subject' => 'nodes'), + 'icon' => 'Nodes', + )); + + $items = $misc->adjustTabsForTree($tabs); + + $attrs = array( + 'text' => noEscape(field('title')), + 'icon' => field('icon'), + 'action' => url(field('url'), + $reqvars, + field('urlvars', array()), + array( + 'action' => 'nodes_properties' + ) + ), + 'branch' => url(field('url'), + $reqvars, + field('urlvars'), + array('action' => 'nodes') + ), + 'nofoot' => true + ); + + $misc->printTreeXML($items, $attrs); + + $tabs = array('sets' => array ( + 'title' => $lang['strrepsets'], + 'url' => 'plugin_slony.php', + 'urlvars' => array('subject' => 'sets'), + 'icon' => 'ReplicationSets', + )); + + $items = $misc->adjustTabsForTree($tabs); + + $attrs = array( + 'text' => noEscape(field('title')), + 'icon' => field('icon'), + 'action' => url(field('url'), + $reqvars, + field('urlvars', array()), + array('action' => 'sets_properties') + ), + 'branch' => url(field('url'), + $reqvars, + field('urlvars'), + array('action' => 'sets') + ), + 'nohead' => true + ); + + $misc->printTreeXML($items, $attrs); + + break; + case 'nodes': + $nodes = $slony->getNodes(); + + $attrs = array( + 'text' => field('no_comment'), + 'icon' => 'Node', + 'action' => url('plugin_slony.php', + $reqvars, + array( + 'subject' => 'slony_node', + 'action' => 'node_properties', + 'no_id' => field('no_id'), + 'no_name' => field('no_comment'), + 'slony_cluster' => $slony->slony_cluster + ) + ), + 'branch' => url('plugin_slony.php', + $reqvars, + array( + 'action' => 'nodes_top', + 'no_id' => field('no_id') + ) + ) + ); + + $misc->printTreeXML($nodes, $attrs); + + break; + case 'nodes_top': + // Nodes paths and listens entries + + $tabs = array('paths' => array ( + 'title' => $lang['strpaths'], + 'url' => 'plugin_slony.php', + 'urlvars' => array('subject' => 'paths'), + 'icon' => 'Paths', + )); + + $items = $misc->adjustTabsForTree($tabs); + + $attrs = array( + 'text' => noEscape(field('title')), + 'icon' => field('icon'), + 'action' => url(field('url'), + $reqvars, + field('urlvars', array()), + array('action' => 'paths_properties', 'no_id' => $_REQUEST['no_id']) + ), + 'branch' => url(field('url'), + $reqvars, + field('urlvars'), + array('action' => 'paths', 'no_id' => $_REQUEST['no_id']) + ), + 'nofoot' => true + ); + + $misc->printTreeXML($items, $attrs); + + $tabs = array('listens' => array ( + 'title' => $lang['strlistens'], + 'url' => 'plugin_slony.php', + 'urlvars' => array('subject' => 'listens'), + 'icon' => 'Listens', + )); + + $items = $misc->adjustTabsForTree($tabs); + + $attrs = array( + 'text' => noEscape(field('title')), + 'icon' => field('icon'), + 'action' => url(field('url'), + $reqvars, + field('urlvars', array()), + array('action' => 'listens_properties', 'no_id' => $_REQUEST['no_id']) + ), + 'branch' => url(field('url'), + $reqvars, + field('urlvars'), + array('action' => 'listens', 'no_id' => $_REQUEST['no_id']) + ), + 'nohead' => true + ); + + $misc->printTreeXML($items, $attrs); + + break; + case 'paths': + $tables = $slony->getPaths($_REQUEST['no_id']); + + $attrs = array( + 'text' => field('no_comment'), + 'icon' => 'Path', + 'action' => url('plugin_slony.php', + $reqvars, + array('no_id' => field('pa_client'), 'path_id' => field('no_id'), 'action' => 'path_properties') + ) + ); + + $misc->printTreeXML($tables, $attrs); + + break; + case 'listens': + $tables = $slony->getListens($_REQUEST['no_id']); + + $attrs = array( + 'text' => field('no_comment'), + 'icon' => 'Listen', + 'action' => url('plugin_slony.php', + $reqvars, + array('no_id' => field('li_receiver'), 'listen_id' => field('no_id'), 'action' => 'listen_properties') + ) + ); + + $misc->printTreeXML($tables, $attrs); + + break; + case 'sets': + $sets = $slony->getReplicationSets(); + + $attrs = array( + 'text' => field('set_comment'), + 'icon' => 'AvailableReplicationSet', + 'action' => url('plugin_slony.php', + $reqvars, + array( + 'action' => 'set_properties', + 'set_id' => field('set_id') + ) + ), + 'branch' => url('plugin_slony.php', + $reqvars, + array( + 'action' => 'sets_top', + 'set_id' => field('set_id') + ) + ) + ); + + $misc->printTreeXML($sets, $attrs); + break; + case 'sets_top': + // Top level Nodes and Replication sets folders + + $tabs = array('sequences' => array ( + 'title' => $lang['strsequences'], + 'url' => 'plugin_slony.php', + 'urlvars' => array('subject' => 'sequences'), + 'icon' => 'Sequences' + )); + + $items = $misc->adjustTabsForTree($tabs); + + $attrs = array( + 'text' => noEscape(field('title')), + 'icon' => field('icon'), + 'action' => url(field('url'), + $reqvars, + field('urlvars', array()), + array('action' => 'sequences_properties', 'set_id' => $_REQUEST['set_id']) + ), + 'branch' => url(field('url'), + $reqvars, + field('urlvars'), + array('action' => 'sequences', 'set_id' => $_REQUEST['set_id']) + ), + 'nofoot' => true + ); + + $misc->printTreeXML($items, $attrs); + + $tabs = array('tables' => array ( + 'title' => $lang['strtables'], + 'url' => 'plugin_slony.php', + 'urlvars' => array('subject' => 'tables'), + 'icon' => 'Tables', + )); + + $items = $misc->adjustTabsForTree($tabs); + + $attrs = array( + 'text' => noEscape(field('title')), + 'icon' => field('icon'), + 'action' => url(field('url'), + $reqvars, + field('urlvars', array()), + array('action' => 'tables_properties', 'set_id' => $_REQUEST['set_id']) + ), + 'branch' => url(field('url'), + $reqvars, + field('urlvars'), + array('action' => 'tables', 'set_id' => $_REQUEST['set_id']) + ), + 'nohead' => true, + 'nofoot' => true + ); + + $misc->printTreeXML($items, $attrs); + + $tabs = array('subscriptions' => array ( + 'title' => $lang['strsubscriptions'], + 'url' => 'plugin_slony.php', + 'urlvars' => array('subject' => 'subscriptions'), + 'icon' => 'Subscriptions', + )); + + $items = $misc->adjustTabsForTree($tabs); + + $attrs = array( + 'text' => noEscape(field('title')), + 'icon' => field('icon'), + 'action' => url(field('url'), + $reqvars, + field('urlvars', array()), + array('action' => 'subscriptions_properties', 'set_id' => $_REQUEST['set_id']) + ), + 'branch' => url(field('url'), + $reqvars, + field('urlvars'), + array('action' => 'subscriptions', 'set_id' => $_REQUEST['set_id']) + ), + 'nohead' => true + ); + + $misc->printTreeXML($items, $attrs); + + break; + case 'sequences': + $tables = $slony->getSequences($_REQUEST['set_id']); + + $reqvars = $misc->getRequestVars('sequence'); + + $attrs = array( + 'text' => field('qualname'), + 'icon' => 'Sequence', + 'toolTip'=> field('seqcomment'), + 'action' => url('sequences.php', + $reqvars, + array ( + 'action' => 'properties', + 'sequence' => field('seqname'), + 'schema' => field('nspname') + ) + ) + ); + + $misc->printTreeXML($tables, $attrs); + + break; + case 'tables': + $tables = $slony->getTables($_REQUEST['set_id']); + + $reqvars = $misc->getRequestVars('table'); + + $attrs = array( + 'text' => field('qualname'), + 'icon' => 'Table', + 'toolTip'=> field('relcomment'), + 'action' => url('redirect.php', + $reqvars, + array('table' => field('relname'), 'schema' => field('nspname')) + ) + ); + + $misc->printTreeXML($tables, $attrs); + + break; + case 'subscriptions': + $tables = $slony->getSubscribedNodes($_REQUEST['set_id']); + + $attrs = array( + 'text' => field('no_comment'), + 'icon' => 'AvailableSubscription', + 'action' => url('plugin_slony.php', + $reqvars, + array('set_id' => field('sub_set'), 'no_id' => field('no_id'), 'action' => 'subscription_properties') + ) + ); + + $misc->printTreeXML($tables, $attrs); + + break; + } + + exit; + } + + /** + * Display the slony clusters (we only support one) + */ + function doClusters($msg = '') { + global $slony, $misc; + global $lang; + + $misc->printTrail('database'); + $misc->printTabs('database', 'slony'); + $misc->printMsg($msg); + + $clusters = $slony->getClusters(); + + $columns = array( + 'no_name' => array( + 'title' => $lang['strcluster'], + 'field' => field('cluster'), + 'url' => "plugin_slony.php?{$misc->href}&action=cluster_properties&", + 'vars' => array('slony_cluster' => 'cluster'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'no_comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('comment'), + ) + ); + + $actions = array ( + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "plugin_slony.php?{$misc->href}&action=confirm_drop_cluster&", + 'vars' => array('slony_cluster' => 'cluster'), + ) + ); + + $misc->printTable($clusters, $columns, $actions, $lang['strnoclusters']); + + if ($clusters->recordCount() == 0) { + echo "

href}\">{$lang['strinitcluster']}

\n"; + } + } + + // CLUSTERS + + /** + * Display the properties of a slony cluster + */ + function doCluster($msg = '') { + global $data, $slony, $misc; + global $lang; + + $misc->printTrail('slony_cluster'); + $misc->printTabs('slony_cluster', 'properties'); + $misc->printMsg($msg); + + // Fetch the cluster information + $cluster = $slony->getCluster(); + + if (is_object($cluster) && $cluster->recordCount() > 0) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
{$lang['strname']}", $misc->printVal($slony->slony_cluster), "
Local Node ID", $misc->printVal($cluster->fields['no_id']), "
Local Node", $misc->printVal($cluster->fields['no_comment']), "
Version", $misc->printVal($cluster->fields['version']), "
{$lang['strowner']}", $misc->printVal($slony->slony_owner), "
{$lang['strcomment']}
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + } + + /** + * Displays a screen where they can enter a new cluster + */ + function doCreateCluster($confirm, $msg = '') { + global $data, $slony, $misc; + global $lang; + + if ($confirm) { + if (!isset($_POST['cluster'])) $_POST['cluster'] = ''; + if (!isset($_POST['no_id'])) $_POST['no_id'] = '1'; + if (!isset($_POST['no_comment'])) $_POST['no_comment'] = ''; + + $misc->printTrail('slony_clusters'); + $misc->printTitle($lang['strinitcluster']); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "
{$lang['strcluster']}_maxNameLen}\" value=\"", + htmlspecialchars($_POST['cluster']), "\" />
{$lang['strid']}
{$lang['strcomment']}
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + if (trim($_POST['cluster']) == '') { + doCreateCluster(true, $lang['strclusterneedsname']); + return; + } + elseif (trim($_POST['no_id']) == '') { + doCreateCluster(true, $lang['strclusterneedsnodeid']); + return; + } + + $status = $slony->initCluster($_POST['cluster'], $_POST['no_id'], $_POST['no_comment']); + if ($status == 0) + doClusters($lang['strclustercreated']); + else + doCreateCluster(true, $lang['strclustercreatedbad'] . ':' . $status); + } + } + + /** + * Show confirmation of drop and perform actual drop of a cluster + */ + function doDropCluster($confirm) { + global $slony, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('slony_cluster'); + $misc->printTitle($lang['strdrop']); + + echo "

", sprintf($lang['strconfdropcluster'], $misc->printVal($slony->slony_cluster)), "

\n"; + + echo "
\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $slony->dropCluster(); + if ($status == 0) + doClusters($lang['strclusterdropped']); + else + doClusters($lang['strclusterdroppedbad']); + } + } + + // NODES + + /** + * List all the nodes + */ + function doNodes($msg = '') { + global $slony, $misc; + global $lang; + + $misc->printTrail('slony_cluster'); + $misc->printTabs('slony_cluster', 'nodes'); + $misc->printMsg($msg); + + $nodes = $slony->getNodes(); + + $columns = array( + 'no_name' => array( + 'title' => $lang['strname'], + 'field' => field('no_comment'), + 'url' => "plugin_slony.php?{$misc->href}&action=node_properties&subject=slony_node&", + 'vars' => array('no_id' => 'no_id', 'no_name' => 'no_comment'), + ), + 'no_status' => array( + 'title' => $lang['strstatus'], + 'field' => field('no_status'), + 'type' => 'slonystatus', + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'no_comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('no_comment'), + ) + ); + + $actions = array ( + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "plugin_slony.php?{$misc->href}&action=confirm_drop_node&subject=slony_node&", + 'vars' => array('no_id' => 'no_id', 'no_name' => 'no_comment'), + ) + ); + + $misc->printTable($nodes, $columns, $actions, $lang['strnonodes']); + + echo "

href}\">{$lang['strcreatenode']}

\n"; + } + + /** + * Display the properties of a node + */ + function doNode($msg = '') { + global $data, $slony, $misc; + global $lang; + + $misc->printTrail('slony_node'); + $misc->printTitle($lang['strproperties']); + $misc->printMsg($msg); + + // Fetch the node information + $node = $slony->getNode($_REQUEST['no_id']); + + if (is_object($node) && $node->recordCount() > 0) { + // Show comment if any + if ($node->fields['no_comment'] !== null) + echo "

", $misc->printVal($node->fields['no_comment']), "

\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
{$lang['strname']}", $misc->printVal($node->fields['no_comment']), "
{$lang['strid']}", $misc->printVal($node->fields['no_id']), "
{$lang['stractive']}", ($data->phpBool($node->fields['no_active'])) ? $lang['stryes'] : $lang['strno'], "
{$lang['strcomment']}", $misc->printVal($node->fields['no_comment']), "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + + echo "

href}&no_id={$_REQUEST['no_id']}\">{$lang['strdrop']}

\n"; + } + + /** + * Displays a screen where they can enter a new node + */ + function doCreateNode($confirm, $msg = '') { + global $slony, $misc; + global $lang; + + if ($confirm) { + if (!isset($_POST['nodeid'])) $_POST['nodeid'] = ''; + if (!isset($_POST['nodecomment'])) $_POST['nodecomment'] = ''; + + $misc->printTrail('slony_nodes'); + $misc->printTitle($lang['strcreatenode']); + $misc->printMsg($msg); + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + echo "\t\n"; + echo "
{$lang['strid']}
{$lang['strcomment']}
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + $status = $slony->createNode($_POST['nodeid'], $_POST['nodecomment']); + if ($status == 0) + doNodes($lang['strnodecreated']); + else + doCreateNode(true, $lang['strnodecreatedbad']); + } + } + + /** + * Show confirmation of drop and perform actual drop of a node + */ + function doDropNode($confirm) { + global $slony, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('slony_cluster'); + $misc->printTitle($lang['strdrop']); + + echo "

", sprintf($lang['strconfdropnode'], $misc->printVal($_REQUEST['no_id'])), "

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $slony->dropNode($_REQUEST['no_id']); + if ($status == 0) + doNodes($lang['strnodedropped']); + else + doNodes($lang['strnodedroppedbad']); + } + } + + // PATHS + + /** + * List all the paths + */ + function doPaths($msg = '') { + global $slony, $misc; + global $lang; + + $misc->printTrail('database'); + $misc->printMsg($msg); + + $paths = $slony->getPaths($_REQUEST['no_id']); + + $columns = array( + 'no_name' => array( + 'title' => $lang['strname'], + 'field' => field('no_comment'), + 'url' => "plugin_slony.php?{$misc->href}&action=path_properties&", + 'vars' => array('no_id' => 'pa_client', 'path_id' => 'no_id'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'no_comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('no_comment'), + ) + ); + + $actions = array ( + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "plugin_slony.php?{$misc->href}&action=confirm_drop_path&", + 'vars' => array('no_id' => 'pa_client', 'path_id' => 'no_id'), + ) + ); + + $misc->printTable($paths, $columns, $actions, $lang['strnopaths']); + + echo "

href}&no_id={$_REQUEST['no_id']}\">{$lang['strcreatepath']}

\n"; + } + + /** + * Display the properties of a path + */ + function doPath($msg = '') { + global $data, $slony, $misc; + global $lang; + + $misc->printTrail('slony_path'); + $misc->printTitle($lang['strproperties']); + $misc->printMsg($msg); + + // Fetch the path information + $path = $slony->getPath($_REQUEST['no_id'], $_REQUEST['path_id']); + + if (is_object($path) && $path->recordCount() > 0) { + // Show comment if any + if ($path->fields['no_comment'] !== null) + echo "

", $misc->printVal($path->fields['no_comment']), "

\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
{$lang['strnodename']}", $misc->printVal($path->fields['no_comment']), "
{$lang['strnodeid']}", $misc->printVal($path->fields['no_id']), "
{$lang['strconninfo']}", $misc->printVal($path->fields['pa_conninfo']), "
{$lang['strconnretry']}", $misc->printVal($path->fields['pa_connretry']), "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + + echo "

href}&no_id={$_REQUEST['no_id']}&path_id={$_REQUEST['path_id']}\">{$lang['strdrop']}

\n"; + } + + /** + * Displays a screen where they can enter a new path + */ + function doCreatePath($confirm, $msg = '') { + global $data, $slony, $misc; + global $lang; + + if ($confirm) { + if (!isset($_POST['pathserver'])) $_POST['pathserver'] = ''; + if (!isset($_POST['pathconn'])) $_POST['pathconn'] = ''; + if (!isset($_POST['pathretry'])) $_POST['pathretry'] = '10'; + + // Fetch all servers + $nodes = $slony->getNodes(); + + $misc->printTrail('slony_paths'); + $misc->printTitle($lang['strcreatepath']); + $misc->printMsg($msg); + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + echo "\t\n"; + echo "
{$lang['strnodename']}\n\t\t\t\n\t\t
{$lang['strconninfo']}_maxNameLen}\" value=\"", + htmlspecialchars($_POST['pathconn']), "\" />
{$lang['strconnretry']}_maxNameLen}\" value=\"", + htmlspecialchars($_POST['pathretry']), "\" />
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + if (trim($_POST['pathconn']) == '') { + doCreatePath(true, $lang['strpathneedsconninfo']); + return; + } + elseif (trim($_POST['pathretry']) == '') { + doCreatePath(true, $lang['strpathneedsconnretry']); + return; + } + + $status = $slony->createPath($_POST['no_id'], $_POST['pathserver'], $_POST['pathconn'], $_POST['pathretry']); + if ($status == 0) + doPaths($lang['strpathcreated']); + else + doCreatePath(true, $lang['strpathcreatedbad']); + } + } + + /** + * Show confirmation of drop and perform actual drop of a path + */ + function doDropPath($confirm) { + global $slony, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('slony_cluster'); + $misc->printTitle($lang['strdrop']); + + echo "

", sprintf($lang['strconfdroppath'], $misc->printVal($_REQUEST['path_id'])), "

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $slony->dropPath($_REQUEST['no_id'], $_REQUEST['path_id']); + if ($status == 0) + doPaths($lang['strpathdropped']); + else + doPaths($lang['strpathdroppedbad']); + } + } + + // LISTENS + + /** + * List all the listens + */ + function doListens($msg = '') { + global $slony, $misc; + global $lang; + + $misc->printTrail('database'); + $misc->printMsg($msg); + + $listens = $slony->getListens($_REQUEST['no_id']); + + $columns = array( + 'no_name' => array( + 'title' => $lang['strname'], + 'field' => field('no_comment'), + 'url' => "plugin_slony.php?{$misc->href}&action=listen_properties&", + 'vars' => array('no_id' => 'li_receiver', 'listen_id' => 'no_id', 'origin_id' => 'li_origin'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'no_comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('no_comment'), + ) + ); + + $actions = array ( + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "plugin_slony.php?{$misc->href}&action=confirm_drop_listen&", + 'vars' => array('no_id' => 'li_receiver', 'listen_id' => 'no_id', 'origin_id' => 'li_origin'), + ) + + ); + + $misc->printTable($listens, $columns, $actions, $lang['strnolistens']); + + echo "

href}&no_id={$_REQUEST['no_id']}\">{$lang['strcreatelisten']}

\n"; + } + + /** + * Display the properties of a listen + */ + function doListen($msg = '') { + global $data, $slony, $misc; + global $lang; + + $misc->printTrail('slony_path'); + $misc->printTitle($lang['strproperties']); + $misc->printMsg($msg); + + // Fetch the listen information + $listen = $slony->getListen($_REQUEST['no_id'], $_REQUEST['listen_id']); + + if (is_object($listen) && $listen->recordCount() > 0) { + // Show comment if any + if ($listen->fields['no_comment'] !== null) + echo "

", $misc->printVal($listen->fields['no_comment']), "

\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Provider", $misc->printVal($listen->fields['no_comment']), "
Provider ID", $misc->printVal($listen->fields['li_provider']), "
Origin", $misc->printVal($listen->fields['origin']), "
Origin ID", $misc->printVal($listen->fields['li_origin']), "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + + echo "

href}&no_id={$_REQUEST['no_id']}&listen_id={$_REQUEST['listen_id']}&origin_id={$listen->fields['li_origin']}\">{$lang['strdrop']}

\n"; + } + + /** + * Displays a screen where they can enter a new listen + */ + function doCreateListen($confirm, $msg = '') { + global $data, $slony, $misc; + global $lang; + + if ($confirm) { + if (!isset($_POST['listenorigin'])) $_POST['listenorigin'] = ''; + if (!isset($_POST['listenprovider'])) $_POST['listenprovider'] = ''; + + // Fetch all servers + $nodes = $slony->getNodes(); + + $misc->printTrail('slony_listens'); + $misc->printTitle($lang['strcreatelisten']); + $misc->printMsg($msg); + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n"; + echo "
Origin\n\t\t\t\n\t\t
Provider\n\t\t\t\n\t\t
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + $status = $slony->createListen($_POST['no_id'], $_POST['listenorigin'], $_POST['listenprovider']); + if ($status == 0) + doListens($lang['strlistencreated']); + else + doCreateListen(true, $lang['strlistencreatedbad']); + } + } + + /** + * Show confirmation of drop and perform actual drop of a listen + */ + function doDropListen($confirm) { + global $slony, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('slony_cluster'); + $misc->printTitle($lang['strdrop']); + + echo "

", sprintf($lang['strconfdroplisten'], $misc->printVal($_REQUEST['listen_id'])), "

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $slony->dropListen($_REQUEST['no_id'], $_REQUEST['origin_id'], $_REQUEST['listen_id']); + if ($status == 0) + doListens($lang['strlistendropped']); + else + doListens($lang['strlistendroppedbad']); + } + } + + // REPLICATION SETS + + /** + * List all the replication sets + */ + function doReplicationSets($msg = '') { + global $slony, $misc; + global $lang; + + $misc->printTrail('slony_cluster'); + $misc->printTabs('slony_cluster', 'sets'); + $misc->printMsg($msg); + + $sets = $slony->getReplicationSets(); + + $columns = array( + 'set_name' => array( + 'title' => $lang['strname'], + 'field' => field('set_comment'), + 'url' => "plugin_slony.php?{$misc->href}&action=set_properties&", + 'vars' => array('set_id' => 'set_id'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'set_comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('set_comment'), + ) + ); + + $actions = array ( + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "plugin_slony.php?{$misc->href}&action=confirm_drop_set&", + 'vars' => array('set_id' => 'set_id'), + ), + 'lock' => array( + 'title' => $lang['strlock'], + 'url' => "plugin_slony.php?{$misc->href}&action=confirm_lock_set&", + 'vars' => array('set_id' => 'set_id'), + ), + 'unlock' => array( + 'title' => $lang['strunlock'], + 'url' => "plugin_slony.php?{$misc->href}&action=confirm_unlock_set&", + 'vars' => array('set_id' => 'set_id'), + ), + 'merge' => array( + 'title' => $lang['strmerge'], + 'url' => "plugin_slony.php?{$misc->href}&action=merge_set&", + 'vars' => array('set_id' => 'set_id'), + ), + 'move' => array( + 'title' => $lang['strmove'], + 'url' => "plugin_slony.php?{$misc->href}&action=move_set&", + 'vars' => array('set_id' => 'set_id'), + ), + 'execute' => array( + 'title' => $lang['strexecute'], + 'url' => "plugin_slony.php?{$misc->href}&action=execute_set&", + 'vars' => array('set_id' => 'set_id'), + ) + ); + + $misc->printTable($sets, $columns, $actions, $lang['strnorepsets']); + + echo "

href}\">{$lang['strcreaterepset']}

\n"; + } + + /** + * Display the properties of a replication set + */ + function doReplicationSet($msg = '') { + global $data, $slony, $misc; + global $lang; + + $misc->printTrail('slony_set'); + $misc->printTitle($lang['strproperties']); + $misc->printMsg($msg); + + // Fetch the set information + $set = $slony->getReplicationSet($_REQUEST['set_id']); + + if (is_object($set) && $set->recordCount() > 0) { + // Show comment if any + if ($set->fields['set_comment'] !== null) + echo "

", $misc->printVal($set->fields['set_comment']), "

\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
{$lang['strname']}", $misc->printVal($set->fields['set_comment']), "
{$lang['strid']}", $misc->printVal($set->fields['set_id']), "
{$lang['strlocked']}", ($data->phpBool($set->fields['is_locked'])) ? $lang['stryes'] : $lang['strno'], "
Origin ID", $misc->printVal($set->fields['set_origin']), "
Origin Node", $misc->printVal($set->fields['no_comment']), "
Subscriptions", $misc->printVal($set->fields['subscriptions']), "
{$lang['strcomment']}", $misc->printVal($set->fields['set_comment']), "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + + echo "\n"; + } + + /** + * Displays a screen where they can enter a new set + */ + function doCreateReplicationSet($confirm, $msg = '') { + global $slony, $misc; + global $lang; + + if ($confirm) { + if (!isset($_POST['setid'])) $_POST['setid'] = ''; + if (!isset($_POST['setcomment'])) $_POST['setcomment'] = ''; + + $misc->printTrail('slony_sets'); + $misc->printTitle($lang['strcreaterepset']); + $misc->printMsg($msg); + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + echo "\t\n"; + echo "
{$lang['strid']}
{$lang['strcomment']}
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + $status = $slony->createReplicationSet($_POST['setid'], $_POST['setcomment']); + if ($status == 0) + doReplicationSets($lang['strrepsetcreated']); + else + doCreateReplicationSet(true, $lang['strrepsetcreatedbad']); + } + } + + /** + * Show confirmation of drop and perform actual drop of a set + */ + function doDropReplicationSet($confirm) { + global $slony, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('slony_cluster'); + $misc->printTitle($lang['strdrop']); + + echo "

", sprintf($lang['strconfdroprepset'], $misc->printVal($_REQUEST['set_id'])), "

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $slony->dropReplicationSet($_REQUEST['set_id']); + if ($status == 0) + doReplicationSet($lang['strrepsetdropped']); + else + doReplicationSet($lang['strrepsetdroppedbad']); + } + } + + /** + * Show confirmation of lock and perform actual lock of a set + */ + function doLockReplicationSet($confirm) { + global $slony, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('slony_cluster'); + $misc->printTitle($lang['strlock']); + + echo "

", sprintf($lang['strconflockrepset'], $misc->printVal($_REQUEST['set_id'])), "

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $slony->lockReplicationSet($_REQUEST['set_id'], true); + if ($status == 0) + doReplicationSet($lang['strrepsetlocked']); + else + doReplicationSet($lang['strrepsetlockedbad']); + } + } + + /** + * Show confirmation of unlock and perform actual unlock of a set + */ + function doUnlockReplicationSet($confirm) { + global $slony, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('slony_cluster'); + $misc->printTitle($lang['strunlock']); + + echo "

", sprintf($lang['strconfunlockrepset'], $misc->printVal($_REQUEST['set_id'])), "

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $slony->lockReplicationSet($_REQUEST['set_id'], false); + if ($status == 0) + doReplicationSets($lang['strrepsetunlocked']); + else + doReplicationSets($lang['strrepsetunlockedbad']); + } + } + + /** + * Displays a screen where they can merge one set into another + */ + function doMergeReplicationSet($confirm, $msg = '') { + global $slony, $misc; + global $lang; + + if ($confirm) { + if (!isset($_POST['target'])) $_POST['target'] = ''; + + $sets = $slony->getReplicationSets(); + + $misc->printTrail('slony_sets'); + $misc->printTitle($lang['strmerge']); + $misc->printMsg($msg); + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\n"; + echo "
{$lang['strmergeinto']}
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + $status = $slony->mergeReplicationSet($_POST['set_id'], $_POST['target']); + if ($status == 0) + doReplicationSet($lang['strrepsetmerged']); + else + doMergeReplicationSet(true, $lang['strrepsetmergedbad']); + } + } + + /** + * Displays a screen where they can move one set into another + */ + function doMoveReplicationSet($confirm, $msg = '') { + global $slony, $misc; + global $lang; + + if ($confirm) { + if (!isset($_POST['new_origin'])) $_POST['new_origin'] = ''; + + $nodes = $slony->getNodes(); + $set = $slony->getReplicationSet($_REQUEST['set_id']); + + $misc->printTrail('slony_sets'); + $misc->printTitle($lang['strmove']); + $misc->printMsg($msg); + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\n"; + echo "
{$lang['strneworigin']}
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + $status = $slony->moveReplicationSet($_POST['set_id'], $_POST['new_origin']); + if ($status == 0) + doReplicationSet($lang['strrepsetmoved']); + else + doMoveReplicationSet(true, $lang['strrepsetmovedbad']); + } + } + + /** + * Displays a screen where they can enter a DDL script to + * be executed on all or a particular node, for this set. + */ + function doExecuteReplicationSet($confirm, $msg = '') { + global $slony, $misc; + global $lang; + + if ($confirm) { + if (!isset($_POST['script'])) $_POST['script'] = ''; + + $nodes = $slony->getNodes(); + + $misc->printTrail('slony_sets'); + $misc->printTitle($lang['strexecute']); + $misc->printMsg($msg); + + echo "
\n"; + echo $misc->form; + echo "\n"; + /* Slony 1.1 only + echo "\t\n\t\t\n"; + echo "\n"; + */ + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "
{$lang['stronlyonnode']}
{$lang['strddlscript']}
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + if (trim($_POST['script']) == '') { + doExecuteReplicationSet(true, $lang['strscriptneedsbody']); + return; + } + + $status = $slony->executeReplicationSet($_POST['set_id'], $_POST['script']); + if ($status == 0) + doReplicationSet($lang['strscriptexecuted']); + else + doExecuteReplicationSet(true, $lang['strscriptexecutedbad']); + } + } + + // TABLES + + /** + * List all the tables in a replication set + */ + function doTables($msg = '') { + global $data, $slony, $misc; + global $lang; + + $misc->printTrail('database'); + $misc->printMsg($msg); + + $tables = $slony->getTables($_REQUEST['set_id']); + + $columns = array( + 'table' => array( + 'title' => $lang['strtable'], + 'field' => field('qualname'), + 'url' => "redirect.php?subject=table&{$misc->href}&", + 'vars' => array('table' => 'relname', 'schema' => 'nspname'), + ), + 'owner' => array( + 'title' => $lang['strowner'], + 'field' => field('relowner'), + ), + 'tablespace' => array( + 'title' => $lang['strtablespace'], + 'field' => field('tablespace'), + ), + 'tuples' => array( + 'title' => $lang['strestimatedrowcount'], + 'field' => field('reltuples'), + 'type' => 'numeric', + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('relcomment'), + ), + ); + + $actions = array( + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "plugin_slony.php?{$misc->href}&action=confirm_drop_table&set_id={$_REQUEST['set_id']}&", + 'vars' => array('tab_id' => 'tab_id', 'qualname' => 'qualname'), + ), + 'move' => array( + 'title' => $lang['strmove'], + 'url' => "plugin_slony.php?{$misc->href}&action=move_table&set_id={$_REQUEST['set_id']}&stage=1&", + 'vars' => array('tab_id' => 'tab_id'), + ) + ); + + if (!$data->hasTablespaces()) unset($columns['tablespace']); + + $misc->printTable($tables, $columns, $actions, $lang['strnotables']); + + echo "

href}\">{$lang['straddtable']}

\n"; + } + + /** + * Displays a screen where they can add a table to a + * replication set. + */ + function doAddTable($stage, $msg = '') { + global $data, $slony, $misc; + global $lang; + + switch ($stage) { + case 1: + if (!isset($_POST['tab_id'])) $_POST['tab_id'] = ''; + if (!isset($_POST['comment'])) $_POST['comment'] = ''; + + $tables = $slony->getNonRepTables(); + + $misc->printTrail('slony_sets'); + $misc->printTitle($lang['straddtable']); + $misc->printMsg($msg); + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + echo "\t\n"; + echo "
{$lang['strtable']}
{$lang['strid']}
{$lang['strcomment']}
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + break; + case 2: + // Unserialize table and fetch. This is a bit messy + // because the table could be in another schema. + $_REQUEST['target'] = unserialize($_REQUEST['target']); + $data->setSchema($_REQUEST['target']['schemaname']); + // Get indexes + $indexes = $data->getIndexes($_REQUEST['target']['tablename'], true); + if ($indexes->recordCount() == 0) { + doAddTable(1, $lang['strtableneedsuniquekey']); + return; + } + + // Get triggers + $triggers = $data->getTriggers($_REQUEST['target']['tablename']); + + // If only one index and no triggers then jump to next step + if ($indexes->recordCount() == 1 && $triggers->recordCount() == 0) { + $_REQUEST['idxname'] = $indexes->fields['indname']; + $_REQUEST['nspname'] = $_REQUEST['target']['schemaname']; + $_REQUEST['relname'] = $_REQUEST['target']['tablename']; + $_REQUEST['target'] = serialize($_REQUEST['target']); + doAddTable(3); + return; + } + + $misc->printTrail('slony_sets'); + $misc->printTitle($lang['straddtable']); + $misc->printMsg($msg); + + echo "
\n"; + echo $misc->form; + echo "\n"; + if ($indexes->recordCount() > 1) { + echo "\t\n\t\t\n"; + echo "\n"; + } + else { + echo "fields['indname']), "\" />\n"; + } + if ($triggers->recordCount() > 0) { + echo "\t\n\t\t\n"; + echo "\n"; + } + echo "
{$lang['strindex']}
{$lang['strtriggers']}

{$lang['strtabletriggerstoretain']}

\n"; + while (!$triggers->EOF) { + echo "fields['tgname']), "]\" name=\"storedtriggers[", htmlspecialchars($triggers->fields['tgname']), "]\">"; + echo "
\n"; + $triggers->moveNext(); + } + echo "
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + break; + case 3: + if (!isset($_REQUEST['storedtriggers'])) $_REQUEST['storedtriggers'] = array(); + $status = $slony->addTable($_REQUEST['set_id'], $_REQUEST['tab_id'], $_REQUEST['nspname'], $_REQUEST['relname'], + $_REQUEST['idxname'], $_REQUEST['comment'], array_keys($_REQUEST['storedtriggers'])); + if ($status == 0) + doTables($lang['strtableaddedtorepset']); + else + doAddTable(2, $lang['strtableaddedtorepsetbad']); + break; + } + } + + /** + * Displays a screen where they can move a table to a + * replication set. + */ + function doMoveTable($stage, $msg = '') { + global $data, $slony, $misc; + global $lang; + + switch ($stage) { + case 1: + if (!isset($_POST['new_set_id'])) $_POST['new_set_id'] = ''; + + $sets = $slony->getReplicationSets(); + + $misc->printTrail('slony_sets'); + $misc->printTitle($lang['strmove']); + $misc->printMsg($msg); + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\n"; + echo "
{$lang['strnewrepset']}
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + break; + case 2: + $status = $slony->moveTable($_REQUEST['tab_id'], $_REQUEST['new_set_id']); + if ($status == 0) + doTables('Table moved to replication set.'); + else + doMoveTable(1, 'Failed moving table to replication set.'); + break; + } + } + + /** + * Show confirmation of drop and perform actual drop of a table from a + * replication set. + */ + function doDropTable($confirm) { + global $slony, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('slony_cluster'); + $misc->printTitle($lang['strdrop']); + + echo "

", sprintf($lang['strconfremovetablefromrepset'], + $misc->printVal($_REQUEST['qualname']), $misc->printVal($_REQUEST['set_id'])), "

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $slony->dropTable($_REQUEST['tab_id']); + if ($status == 0) + doTables($lang['strtableremovedfromrepset']); + else + doTables($lang['strtableremovedfromrepsetbad']); + } + } + + // SEQUENCES + + /** + * List all the sequences in a replication set + */ + function doSequences($msg = '') { + global $data, $slony, $misc; + global $lang; + + $misc->printTrail('database'); + $misc->printMsg($msg); + + $sequences = $slony->getSequences($_REQUEST['set_id']); + + $columns = array( + 'sequence' => array( + 'title' => $lang['strsequence'], + 'field' => field('qualname'), + 'url' => "sequences.php?action=properties&{$misc->href}&", + 'vars' => array('sequence' => 'seqname', 'schema' => 'nspname'), + ), + 'owner' => array( + 'title' => $lang['strowner'], + 'field' => field('seqowner'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('seqcomment'), + ), + ); + + $actions = array( + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "plugin_slony.php?{$misc->href}&action=confirm_drop_sequence&set_id={$_REQUEST['set_id']}&", + 'vars' => array('seq_id' => 'seq_id', 'qualname' => 'qualname'), + ), + 'move' => array( + 'title' => $lang['strmove'], + 'url' => "plugin_slony.php?{$misc->href}&action=move_sequence&set_id={$_REQUEST['set_id']}&stage=1&", + 'vars' => array('seq_id' => 'seq_id'), + ) + ); + + $misc->printTable($sequences, $columns, $actions, $lang['strnosequences']); + + echo "

href}\">{$lang['straddsequence']}

\n"; + } + + /** + * Displays a screen where they can add a sequence to a + * replication set. + */ + function doAddSequence($stage, $msg = '') { + global $data, $slony, $misc; + global $lang; + + switch ($stage) { + case 1: + if (!isset($_POST['seq_id'])) $_POST['seq_id'] = ''; + if (!isset($_POST['comment'])) $_POST['comment'] = ''; + + $sequences = $data->getSequences(true); + + $misc->printTrail('slony_sets'); + $misc->printTitle($lang['straddsequence']); + $misc->printMsg($msg); + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + echo "\t\n"; + echo "
{$lang['strsequence']}
{$lang['strid']}
{$lang['strcomment']}
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + break; + case 2: + // Unserialize sequence. + $_REQUEST['target'] = unserialize($_REQUEST['target']); + + $status = $slony->addSequence($_REQUEST['set_id'], $_REQUEST['seq_id'], + $_REQUEST['target']['schemaname'] . '.' . $_REQUEST['target']['sequencename'], + $_REQUEST['comment']); + if ($status == 0) + doSequences($lang['strsequenceaddedtorepset']); + else + doAddSequence(1, $lang['strsequenceaddedtorepsetbad']); + break; + } + } + + /** + * Show confirmation of drop and perform actual drop of a sequence from a + * replication set. + */ + function doDropSequence($confirm) { + global $slony, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('slony_cluster'); + $misc->printTitle($lang['strdrop']); + + echo "

", sprintf($lang['strconfremovesequencefromrepset'], + $misc->printVal($_REQUEST['qualname']), $misc->printVal($_REQUEST['set_id'])), "

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $slony->dropSequence($_REQUEST['seq_id']); + if ($status == 0) + doSequences($lang['strsequenceremovedfromrepset']); + else + doSequences($lang['strsequenceremovedfromrepsetbad']); + } + } + + /** + * Displays a screen where they can move a sequence to a + * replication set. + */ + function doMoveSequence($stage, $msg = '') { + global $data, $slony, $misc; + global $lang; + + switch ($stage) { + case 1: + if (!isset($_POST['new_set_id'])) $_POST['new_set_id'] = ''; + + $sets = $slony->getReplicationSets(); + + $misc->printTrail('slony_sets'); + $misc->printTitle($lang['strmove']); + $misc->printMsg($msg); + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\t\n\t\t{$lang['strnewrepset']}\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + break; + case 2: + $status = $slony->moveSequence($_REQUEST['seq_id'], $_REQUEST['new_set_id']); + if ($status == 0) + doSequences('Sequence moved to replication set.'); + else + doMoveSequence(1, 'Failed moving sequence to replication set.'); + break; + } + } + + // SUBSCRIPTIONS + + /** + * List all the subscriptions + */ + function doSubscriptions($msg = '') { + global $slony, $misc; + global $lang; + + $misc->printTrail('database'); + $misc->printMsg($msg); + + $subscriptions = $slony->getSubscribedNodes($_REQUEST['set_id']); + + $columns = array( + 'no_name' => array( + 'title' => $lang['strname'], + 'field' => field('no_comment'), + 'url' => "plugin_slony.php?{$misc->href}&action=subscription_properties&", + 'vars' => array('set_id' => 'sub_set', 'no_id' => 'no_id'), + ), + 'no_comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('no_comment'), + ) + ); + + $actions = array (); + + $misc->printTable($subscriptions, $columns, $actions, $lang['strnosubscriptions']); + } + + /** + * Display the properties of a subscription + */ + function doSubscription($msg = '') { + global $data, $slony, $misc; + global $lang; + + $misc->printTrail('slony_subscription'); + $misc->printTitle($lang['strproperties']); + $misc->printMsg($msg); + + // Fetch the subscription information + $subscription = $slony->getSubscription($_REQUEST['set_id'], $_REQUEST['no_id']); + + if (is_object($subscription) && $subscription->recordCount() > 0) { + // Show comment if any + if ($subscription->fields['receiver'] !== null) + echo "

", $misc->printVal($subscription->fields['receiver']), "

\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Provider ID", $misc->printVal($subscription->fields['sub_provider']), "
Provider Name", $misc->printVal($subscription->fields['provider']), "
Receiver ID", $misc->printVal($subscription->fields['sub_receiver']), "
Receiver Name", $misc->printVal($subscription->fields['receiver']), "
{$lang['stractive']}", ($data->phpBool($subscription->fields['sub_active'])) ? $lang['stryes'] : $lang['strno'], "
May Forward", ($data->phpBool($subscription->fields['sub_forward'])) ? $lang['stryes'] : $lang['strno'], "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + } + + // Tree actions + if ($action == 'tree') doTree('clusters'); + elseif ($action == 'clusters_top') doTree('clusters_top'); + elseif ($action == 'nodes') doTree('nodes'); + elseif ($action == 'nodes_top') doTree('nodes_top'); + elseif ($action == 'paths') doTree('paths'); + elseif ($action == 'listens') doTree('listens'); + elseif ($action == 'sets') doTree('sets'); + elseif ($action == 'sets_top') doTree('sets_top'); + elseif ($action == 'subscriptions') doTree('subscriptions'); + elseif ($action == 'sequences') doTree('sequences'); + elseif ($action == 'tables') doTree('tables'); + + $misc->printHeader('Slony'); + $misc->printBody(); + + switch ($action) { + case 'save_create_cluster': + if (isset($_POST['cancel'])) doClusters(); + else doCreateCluster(false); + break; + case 'create_cluster': + doCreateCluster(true); + break; + case 'drop_cluster': + if (isset($_POST['cancel'])) doClusters(); + else doDropCluster(false); + break; + case 'confirm_drop_cluster': + doDropCluster(true); + break; + case 'nodes_properties': + doNodes(); + break; + case 'node_properties': + doNode(); + break; + case 'save_create_node': + if (isset($_POST['cancel'])) doNodes(); + else doCreateNode(false); + break; + case 'create_node': + doCreateNode(true); + break; + case 'drop_node': + if (isset($_POST['cancel'])) doNodes(); + else doDropNode(false); + break; + case 'confirm_drop_node': + doDropNode(true); + break; + case 'failover_node': + if (isset($_POST['cancel'])) doNodes(); + else doFailoverNode(false); + break; + case 'confirm_failover_node': + doFailoverNode(true); + break; + case 'paths_properties': + doPaths(); + break; + case 'path_properties': + doPath(); + break; + case 'save_create_path': + if (isset($_POST['cancel'])) doPaths(); + else doCreatePath(false); + break; + case 'create_path': + doCreatePath(true); + break; + case 'drop_path': + if (isset($_POST['cancel'])) doPaths(); + else doDropPath(false); + break; + case 'confirm_drop_path': + doDropPath(true); + break; + case 'listens_properties': + doListens(); + break; + case 'listen_properties': + doListen(); + break; + case 'save_create_listen': + if (isset($_POST['cancel'])) doListens(); + else doCreateListen(false); + break; + case 'create_listen': + doCreateListen(true); + break; + case 'drop_listen': + if (isset($_POST['cancel'])) doListens(); + else doDropListen(false); + break; + case 'confirm_drop_listen': + doDropListen(true); + break; + case 'sets_properties': + doReplicationSets(); + break; + case 'set_properties': + doReplicationSet(); + break; + case 'save_create_set': + if (isset($_POST['cancel'])) doReplicationSets(); + else doCreateReplicationSet(false); + break; + case 'create_set': + doCreateReplicationSet(true); + break; + case 'drop_set': + if (isset($_POST['cancel'])) doReplicationSets(); + else doDropReplicationSet(false); + break; + case 'confirm_drop_set': + doDropReplicationSet(true); + break; + case 'lock_set': + if (isset($_POST['cancel'])) doReplicationSets(); + else doLockReplicationSet(false); + break; + case 'confirm_lock_set': + doLockReplicationSet(true); + break; + case 'unlock_set': + if (isset($_POST['cancel'])) doReplicationSets(); + else doUnlockReplicationSet(false); + break; + case 'confirm_unlock_set': + doUnlockReplicationSet(true); + break; + case 'save_merge_set': + if (isset($_POST['cancel'])) doReplicationSet(); + else doMergeReplicationSet(false); + break; + case 'merge_set': + doMergeReplicationSet(true); + break; + case 'save_move_set': + if (isset($_POST['cancel'])) doReplicationSet(); + else doMoveReplicationSet(false); + break; + case 'move_set': + doMoveReplicationSet(true); + break; + case 'save_execute_set': + if (isset($_POST['cancel'])) doReplicationSet(); + else doExecuteReplicationSet(false); + break; + case 'execute_set': + doExecuteReplicationSet(true); + break; + case 'tables_properties': + doTables(); + break; + case 'add_table': + if (isset($_REQUEST['cancel'])) doTables(); + else doAddTable($_REQUEST['stage']); + break; + case 'drop_table': + if (isset($_POST['cancel'])) doTables(); + else doDropTable(false); + break; + case 'confirm_drop_table': + doDropTable(true); + break; + case 'move_table': + if (isset($_REQUEST['cancel'])) doTables(); + else doMoveTable($_REQUEST['stage']); + break; + case 'sequences_properties': + doSequences(); + break; + case 'add_sequence': + if (isset($_REQUEST['cancel'])) doSequences(); + else doAddSequence($_REQUEST['stage']); + break; + case 'drop_sequence': + if (isset($_POST['cancel'])) doSequences(); + else doDropSequence(false); + break; + case 'confirm_drop_sequence': + doDropSequence(true); + break; + case 'move_sequence': + if (isset($_REQUEST['cancel'])) doSequences(); + else doMoveSequence($_REQUEST['stage']); + break; + case 'subscriptions_properties': + doSubscriptions(); + break; + case 'subscription_properties': + doSubscription(); + break; + case 'cluster_properties': + doCluster(); + break; + case 'clusters_properties': + default: + doClusters(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/privileges.php b/php/pgadmin/privileges.php new file mode 100644 index 0000000..451bb2d --- /dev/null +++ b/php/pgadmin/privileges.php @@ -0,0 +1,289 @@ +getUsers(); + // Get groups from the database + $groups = $data->getGroups(); + + $misc->printTrail($_REQUEST['subject']); + + switch ($mode) { + case 'grant': + $misc->printTitle($lang['strgrant'],'pg.privilege.grant'); + break; + case 'revoke': + $misc->printTitle($lang['strrevoke'],'pg.privilege.revoke'); + break; + } + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + // Grant option + if ($data->hasGrantOption()) { + echo "\n"; + echo "\n"; + } + echo "
{$lang['strusers']}
{$lang['strgroups']}\n"; + echo "\n"; + // Only show groups if there are groups! + if ($groups->recordCount() > 0) { + echo "
\n"; + } + echo "
{$lang['strprivileges']}\n"; + foreach ($data->privlist[$_REQUEST['subject']] as $v) { + $v = htmlspecialchars($v); + echo "
\n"; + } + echo "
{$lang['stroptions']}\n"; + if ($mode == 'grant') { + echo "\n"; + } + elseif ($mode == 'revoke') { + echo "
\n"; + echo "
\n"; + } + echo "
\n"; + + echo "

\n"; + echo "\n"; + echo "\n"; + if (isset($_REQUEST[$_REQUEST['subject'].'_oid'])) + echo "\n"; + echo "\n"; + if ($_REQUEST['subject'] == 'column') + echo "\n"; + echo $misc->form; + if ($mode == 'grant') + echo "\n"; + elseif ($mode == 'revoke') + echo "\n"; + echo "

"; + echo "
\n"; + } + else { + // Determine whether object should be ref'd by name or oid. + if (isset($_REQUEST[$_REQUEST['subject'].'_oid'])) + $object = $_REQUEST[$_REQUEST['subject'].'_oid']; + else + $object = $_REQUEST[$_REQUEST['subject']]; + + if (isset($_REQUEST['table'])) $table = $_REQUEST['table']; + else $table = null; + $status = $data->setPrivileges(($mode == 'grant') ? 'GRANT' : 'REVOKE', $_REQUEST['subject'], $object, + isset($_REQUEST['public']), $_REQUEST['username'], $_REQUEST['groupname'], array_keys($_REQUEST['privilege']), + isset($_REQUEST['grantoption']), isset($_REQUEST['cascade']), $table); + + if ($status == 0) + doDefault($lang['strgranted']); + elseif ($status == -3 || $status == -4) + doAlter(true, $_REQUEST['mode'], $lang['strgrantbad']); + else + doAlter(true, $_REQUEST['mode'], $lang['strgrantfailed']); + } + } + + /** + * Show permissions on a database, namespace, relation, language or function + */ + function doDefault($msg = '') { + global $data, $misc, $database; + global $lang; + + $misc->printTrail($_REQUEST['subject']); + + # @@@FIXME: This switch is just a temporary solution, + # need a better way, maybe every type of object should + # have a tab bar??? + switch ($_REQUEST['subject']) { + case 'server': + case 'database': + case 'schema': + case 'table': + case 'column': + case 'view': + $misc->printTabs($_REQUEST['subject'], 'privileges'); + break; + default: + $misc->printTitle($lang['strprivileges'], 'pg.privilege'); + } + $misc->printMsg($msg); + + // Determine whether object should be ref'd by name or oid. + if (isset($_REQUEST[$_REQUEST['subject'].'_oid'])) + $object = $_REQUEST[$_REQUEST['subject'].'_oid']; + else + $object = $_REQUEST[$_REQUEST['subject']]; + + // Get the privileges on the object, given its type + if ($_REQUEST['subject'] == 'column') + $privileges = $data->getPrivileges($object, 'column', $_REQUEST['table']); + else + $privileges = $data->getPrivileges($object, $_REQUEST['subject']); + + if (sizeof($privileges) > 0) { + echo "\n"; + if ($data->hasRoles()) + echo ""; + else + echo ""; + + foreach ($data->privlist[$_REQUEST['subject']] as $v2) { + // Skip over ALL PRIVILEGES + if ($v2 == 'ALL PRIVILEGES') continue; + echo "\n"; + } + if ($data->hasGrantOption()) { + echo ""; + } + echo "\n"; + + // Loop over privileges, outputting them + $i = 0; + foreach ($privileges as $v) { + $id = (($i % 2) == 0 ? '1' : '2'); + echo "\n"; + if (!$data->hasRoles()) + echo "\n"; + echo "\n"; + foreach ($data->privlist[$_REQUEST['subject']] as $v2) { + // Skip over ALL PRIVILEGES + if ($v2 == 'ALL PRIVILEGES') continue; + echo "\n"; + } + if ($data->hasGrantOption()) { + echo "\n"; + } + echo "\n"; + $i++; + } + + echo "
{$lang['strrole']}
{$lang['strtype']}{$lang['struser']}/{$lang['strgroup']}{$v2}{$lang['strgrantor']}
", $misc->printVal($v[0]), "", $misc->printVal($v[1]), ""; + if (in_array($v2, $v[2])) + echo $lang['stryes']; + else + echo $lang['strno']; + // If we have grant option for this, end mark + if ($data->hasGrantOption() && in_array($v2, $v[4])) echo $lang['strasterisk']; + echo "", $misc->printVal($v[3]), "
"; + } + else { + echo "

{$lang['strnoprivileges']}

\n"; + } + + // Links for granting to a user or group + switch ($_REQUEST['subject']) { + case 'table': + case 'view': + case 'sequence': + case 'function': + case 'tablespace': + $allurl = "{$_REQUEST['subject']}s.php"; + $alltxt = $lang["strshowall{$_REQUEST['subject']}s"]; + break; + case 'schema': + $allurl = "database.php"; + $alltxt = $lang["strshowallschemas"]; + break; + case 'database': + $allurl = 'all_db.php'; + $alltxt = $lang['strshowalldatabases']; + break; + } + + $subject = htmlspecialchars(urlencode($_REQUEST['subject'])); + $object = htmlspecialchars(urlencode($_REQUEST[$_REQUEST['subject']])); + + if ($_REQUEST['subject'] == 'function') { + $objectoid = $_REQUEST[$_REQUEST['subject'].'_oid']; + $alterurl = "privileges.php?action=alter&{$misc->href}&{$subject}={$object}&{$subject}_oid={$objectoid}&subject={$subject}&mode="; + } + else if ($_REQUEST['subject'] == 'column') { + $alterurl = "privileges.php?action=alter&{$misc->href}&{$subject}={$object}" + ."&subject={$subject}&table=". urlencode($_REQUEST['table']) ."&mode="; + } + else { + $alterurl = "privileges.php?action=alter&{$misc->href}&{$subject}={$object}&subject={$subject}&mode="; + } + + echo "\n"; + } + + $misc->printHeader($lang['strprivileges']); + $misc->printBody(); + + switch ($action) { + case 'save': + if (isset($_REQUEST['cancel'])) doDefault(); + else doAlter(false, $_REQUEST['mode']); + break; + case 'alter': + doAlter(true, $_REQUEST['mode']); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/redirect.php b/php/pgadmin/redirect.php new file mode 100644 index 0000000..7048596 --- /dev/null +++ b/php/pgadmin/redirect.php @@ -0,0 +1,27 @@ +getLastTabURL($subject); + + // Load query vars into superglobal arrays + if (isset($url['urlvars'])) { + $vars = array(); + parse_str(value(url($url['url'], $url['urlvars']), $_REQUEST), $vars); + array_shift($vars); + + /* parse_str function is affected by magic_quotes_gpc */ + if (ini_get('magic_quotes_gpc')) { + $misc->stripVar($vars); + } + + $_REQUEST = array_merge($_REQUEST, $vars); + $_GET = array_merge($_GET, $vars); + } + + require $url['url']; +?> diff --git a/php/pgadmin/reports.php b/php/pgadmin/reports.php new file mode 100644 index 0000000..5150c6b --- /dev/null +++ b/php/pgadmin/reports.php @@ -0,0 +1,348 @@ +getReport($_REQUEST['report_id']); + if ($_REQUEST['action'] == 'edit') { + $_POST['report_name'] = $report->fields['report_name']; + $_POST['db_name'] = $report->fields['db_name']; + $_POST['descr'] = $report->fields['descr']; + $_POST['report_sql'] = $report->fields['report_sql']; + if ($report->fields['paginate'] == 't') { + $_POST['paginate'] = TRUE; + } + } + + // Get a list of available databases + $databases = $data->getDatabases(); + + $_REQUEST['report'] = $report->fields['report_name']; + $misc->printTrail('report'); + $misc->printTitle($lang['stredit']); + $misc->printMsg($msg); + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
{$lang['strname']}_maxNameLen}\" value=\"", + htmlspecialchars($_POST['report_name']), "\" />
{$lang['strdatabase']}
{$lang['strcomment']}
{$lang['strsql']}
\n"; + echo "\n"; + echo "

\n"; + echo "\n"; + echo "

\n"; + echo "fields['report_id']}\" />\n"; + echo "
\n"; + } + + /** + * Saves changes to a report + */ + function doSaveEdit() { + global $reportsdb, $lang; + + if (!isset($_POST['report_name'])) $_POST['report_name'] = ''; + if (!isset($_POST['db_name'])) $_POST['db_name'] = ''; + if (!isset($_POST['descr'])) $_POST['descr'] = ''; + if (!isset($_POST['report_sql'])) $_POST['report_sql'] = ''; + + // Check that they've given a name and a definition + if ($_POST['report_name'] == '') doEdit($lang['strreportneedsname']); + elseif ($_POST['report_sql'] == '') doEdit($lang['strreportneedsdef']); + else { + $status = $reportsdb->alterReport($_POST['report_id'], $_POST['report_name'], $_POST['db_name'], + $_POST['descr'], $_POST['report_sql'], isset($_POST['paginate'])); + if ($status == 0) + doDefault($lang['strreportcreated']); + else + doEdit($lang['strreportcreatedbad']); + } + } + + /** + * Display read-only properties of a report + */ + function doProperties($msg = '') { + global $data, $reportsdb, $misc; + global $lang; + + $report = $reportsdb->getReport($_REQUEST['report_id']); + + $_REQUEST['report'] = $report->fields['report_name']; + $misc->printTrail('report'); + $misc->printTitle($lang['strproperties']); + $misc->printMsg($msg); + + if ($report->recordCount() == 1) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
{$lang['strname']}", $misc->printVal($report->fields['report_name']), "
{$lang['strdatabase']}", $misc->printVal($report->fields['db_name']), "
{$lang['strcomment']}", $misc->printVal($report->fields['descr']), "
{$lang['strsql']}", $misc->printVal($report->fields['report_sql']), "
\n"; + } + else echo "

{$lang['strinvalidparam']}

\n"; + + echo "\n"; + } + + /** + * Displays a screen where they can enter a new report + */ + function doCreate($msg = '') { + global $data, $reportsdb, $misc; + global $lang; + + if (!isset($_REQUEST['report_name'])) $_REQUEST['report_name'] = ''; + if (!isset($_REQUEST['db_name'])) $_REQUEST['db_name'] = ''; + if (!isset($_REQUEST['descr'])) $_REQUEST['descr'] = ''; + if (!isset($_REQUEST['report_sql'])) $_REQUEST['report_sql'] = ''; + + if (isset($_REQUEST['database'])) { + $_REQUEST['db_name'] = $_REQUEST['database']; + unset($_REQUEST['database']); + $misc->setForm(); + } + + $databases = $data->getDatabases(); + + $misc->printTrail('server'); + $misc->printTitle($lang['strcreatereport']); + $misc->printMsg($msg); + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
{$lang['strname']}_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['report_name']), "\" />
{$lang['strdatabase']}
{$lang['strcomment']}
{$lang['strsql']}
\n"; + echo "\n"; + echo "

\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + + /** + * Actually creates the new report in the database + */ + function doSaveCreate() { + global $reportsdb, $lang; + + if (!isset($_POST['report_name'])) $_POST['report_name'] = ''; + if (!isset($_POST['db_name'])) $_POST['db_name'] = ''; + if (!isset($_POST['descr'])) $_POST['descr'] = ''; + if (!isset($_POST['report_sql'])) $_POST['report_sql'] = ''; + + // Check that they've given a name and a definition + if ($_POST['report_name'] == '') doCreate($lang['strreportneedsname']); + elseif ($_POST['report_sql'] == '') doCreate($lang['strreportneedsdef']); + else { + $status = $reportsdb->createReport($_POST['report_name'], $_POST['db_name'], + $_POST['descr'], $_POST['report_sql'], isset($_POST['paginate'])); + if ($status == 0) + doDefault($lang['strreportcreated']); + else + doCreate($lang['strreportcreatedbad']); + } + } + + /** + * Show confirmation of drop and perform actual drop + */ + function doDrop($confirm) { + global $reportsdb, $misc; + global $lang; + + if ($confirm) { + // Fetch report from the database + $report = $reportsdb->getReport($_REQUEST['report_id']); + + $_REQUEST['report'] = $report->fields['report_name']; + $misc->printTrail('report'); + $misc->printTitle($lang['strdrop']); + + echo "

", sprintf($lang['strconfdropreport'], $misc->printVal($report->fields['report_name'])), "

\n"; + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $reportsdb->dropReport($_POST['report_id']); + if ($status == 0) + doDefault($lang['strreportdropped']); + else + doDefault($lang['strreportdroppedbad']); + } + + } + + /** + * Show default list of reports in the database + */ + function doDefault($msg = '') { + global $data, $misc, $reportsdb; + global $lang; + + $misc->printTrail('server'); + $misc->printTabs('server','reports'); + $misc->printMsg($msg); + + $reports = $reportsdb->getReports(); + + $columns = array( + 'report' => array( + 'title' => $lang['strreport'], + 'field' => field('report_name'), + 'url' => "reports.php?action=properties&{$misc->href}&", + 'vars' => array('report_id' => 'report_id'), + ), + 'database' => array( + 'title' => $lang['strdatabase'], + 'field' => field('db_name'), + ), + 'created' => array( + 'title' => $lang['strcreated'], + 'field' => field('date_created'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('descr'), + ), + ); + + $return_url = urlencode("reports.php?{$misc->href}"); + + $actions = array( + 'run' => array( + 'title' => $lang['strexecute'], + 'url' => "sql.php?subject=report&{$misc->href}&return_url={$return_url}&return_desc=".urlencode($lang['strback'])."&", + 'vars' => array('report' => 'report_name', 'database' => 'db_name', 'reportid' => 'report_id', 'paginate' => 'paginate'), + ), + 'edit' => array( + 'title' => $lang['stredit'], + 'url' => "reports.php?action=edit&{$misc->href}&", + 'vars' => array('report_id' => 'report_id'), + ), + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "reports.php?action=confirm_drop&{$misc->href}&", + 'vars' => array('report_id' => 'report_id'), + ), + ); + + $misc->printTable($reports, $columns, $actions, $lang['strnoreports']); + + echo "

href}\">{$lang['strcreatereport']}

\n"; + } + + $misc->printHeader($lang['strreports']); + $misc->printBody(); + + // Create a database accessor for the reports database + include_once('./classes/Reports.php'); + $reportsdb = new Reports($status); + if ($status != 0) { + $misc->printTrail('server'); + $misc->printTabs('server','reports'); + $misc->printMsg($lang['strnoreportsdb']); + } + else { + switch ($action) { + case 'save_edit': + if (isset($_POST['cancel'])) doDefault(); + else doSaveEdit(); + break; + case 'edit': + doEdit(); + break; + case 'properties': + doProperties(); + break; + case 'save_create': + if (isset($_POST['cancel'])) doDefault(); + else doSaveCreate(); + break; + case 'create': + doCreate(); + break; + case 'drop': + if (isset($_POST['drop'])) doDrop(false); + else doDefault(); + break; + case 'confirm_drop': + doDrop(true); + break; + default: + doDefault(); + break; + } + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/robots.txt b/php/pgadmin/robots.txt new file mode 100644 index 0000000..223518b --- /dev/null +++ b/php/pgadmin/robots.txt @@ -0,0 +1,8 @@ +# Prevent web robots from indexing your phpPgAdmin installation +# See: http://www.searchengineworld.com/robots/robots_tutorial.htm +# +# $Id: robots.txt,v 1.1 2003/09/01 03:02:17 chriskl Exp $ + +User-agent: * +Disallow: / + diff --git a/php/pgadmin/roles.php b/php/pgadmin/roles.php new file mode 100644 index 0000000..5d0d35f --- /dev/null +++ b/php/pgadmin/roles.php @@ -0,0 +1,669 @@ +printTrail('role'); + $misc->printTitle($lang['strcreaterole'],'pg.role.create'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + $roles = $data->getRoles(); + if ($roles->recordCount() > 0) { + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + $roles->moveFirst(); + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + $roles->moveFirst(); + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + } + + echo "
{$lang['strname']}_maxNameLen}\" name=\"formRolename\" value=\"", htmlspecialchars($_POST['formRolename']), "\" />
{$lang['strpassword']}
{$lang['strconfirm']}
{$lang['strconnlimit']}
{$lang['strexpires']}
{$lang['strmemberof']}\n"; + echo "\t\t\t\n"; + echo "\t\t
{$lang['strmembers']}\n"; + echo "\t\t\t\n"; + echo "\t\t
{$lang['stradminmembers']}\n"; + echo "\t\t\t\n"; + echo "\t\t
\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + + /** + * Actually creates the new role in the database + */ + function doSaveCreate() { + global $data, $lang; + + if(!isset($_POST['memberof'])) $_POST['memberof'] = array(); + if(!isset($_POST['members'])) $_POST['members'] = array(); + if(!isset($_POST['adminmembers'])) $_POST['adminmembers'] = array(); + + // Check data + if ($_POST['formRolename'] == '') + doCreate($lang['strroleneedsname']); + else if ($_POST['formPassword'] != $_POST['formConfirm']) + doCreate($lang['strpasswordconfirm']); + else { + $status = $data->createRole($_POST['formRolename'], $_POST['formPassword'], isset($_POST['formSuper']), + isset($_POST['formCreateDB']), isset($_POST['formCreateRole']), isset($_POST['formInherits']), + isset($_POST['formCanLogin']), $_POST['formConnLimit'], $_POST['formExpires'], $_POST['memberof'], $_POST['members'], + $_POST['adminmembers']); + if ($status == 0) + doDefault($lang['strrolecreated']); + else + doCreate($lang['strrolecreatedbad']); + } + } + + /** + * Function to allow alter a role + */ + function doAlter($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('role'); + $misc->printTitle($lang['stralter'],'pg.role.alter'); + $misc->printMsg($msg); + + $roledata = $data->getRole($_REQUEST['rolename']); + + if ($roledata->recordCount() > 0) { + $server_info = $misc->getServerInfo(); + $canRename = $data->hasUserRename() && ($_REQUEST['rolename'] != $server_info['username']); + $roledata->fields['rolsuper'] = $data->phpBool($roledata->fields['rolsuper']); + $roledata->fields['rolcreatedb'] = $data->phpBool($roledata->fields['rolcreatedb']); + $roledata->fields['rolcreaterole'] = $data->phpBool($roledata->fields['rolcreaterole']); + $roledata->fields['rolinherit'] = $data->phpBool($roledata->fields['rolinherit']); + $roledata->fields['rolcanlogin'] = $data->phpBool($roledata->fields['rolcanlogin']); + + if (!isset($_POST['formExpires'])){ + if ($canRename) $_POST['formNewRoleName'] = $roledata->fields['rolname']; + if ($roledata->fields['rolsuper']) $_POST['formSuper'] = ''; + if ($roledata->fields['rolcreatedb']) $_POST['formCreateDB'] = ''; + if ($roledata->fields['rolcreaterole']) $_POST['formCreateRole'] = ''; + if ($roledata->fields['rolinherit']) $_POST['formInherits'] = ''; + if ($roledata->fields['rolcanlogin']) $_POST['formCanLogin'] = ''; + $_POST['formConnLimit'] = $roledata->fields['rolconnlimit'] == '-1' ? '' : $roledata->fields['rolconnlimit']; + $_POST['formExpires'] = $roledata->fields['rolvaliduntil'] == 'infinity' ? '' : $roledata->fields['rolvaliduntil']; + $_POST['formPassword'] = ''; + } + + echo "
\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + if (!isset($_POST['memberof'])) + { + $memberof = $data->getMemberOf($_REQUEST['rolename']); + if ($memberof->recordCount() > 0) { + $i = 0; + while (!$memberof->EOF) { + $_POST['memberof'][$i++] = $memberof->fields['rolname']; + $memberof->moveNext(); + } + } + else + $_POST['memberof'] = array(); + $memberofold = implode(',', $_POST['memberof']); + } + if (!isset($_POST['members'])) + { + $members = $data->getMembers($_REQUEST['rolename']); + if ($members->recordCount() > 0) { + $i = 0; + while (!$members->EOF) { + $_POST['members'][$i++] = $members->fields['rolname']; + $members->moveNext(); + } + } + else + $_POST['members'] = array(); + $membersold = implode(',', $_POST['members']); + } + if (!isset($_POST['adminmembers'])) + { + $adminmembers = $data->getMembers($_REQUEST['rolename'], 't'); + if ($adminmembers->recordCount() > 0) { + $i = 0; + while (!$adminmembers->EOF) { + $_POST['adminmembers'][$i++] = $adminmembers->fields['rolname']; + $adminmembers->moveNext(); + } + } + else + $_POST['adminmembers'] = array(); + $adminmembersold = implode(',', $_POST['adminmembers']); + } + + $roles = $data->getRoles($_REQUEST['rolename']); + if ($roles->recordCount() > 0) { + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + $roles->moveFirst(); + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + $roles->moveFirst(); + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + } + echo "
{$lang['strname']}", ($canRename ? "_maxNameLen}\" value=\"" . htmlspecialchars($_POST['formNewRoleName']) . "\" />" : $misc->printVal($roledata->fields['rolname'])), "
{$lang['strpassword']}
{$lang['strconfirm']}
{$lang['strconnlimit']}
{$lang['strexpires']}
{$lang['strmemberof']}\n"; + echo "\t\t\t\n"; + echo "\t\t
{$lang['strmembers']}\n"; + echo "\t\t\t\n"; + echo "\t\t
{$lang['stradminmembers']}\n"; + echo "\t\t\t\n"; + echo "\t\t
\n"; + + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + } + + /** + * Function to save after editing a role + */ + function doSaveAlter() { + global $data, $lang; + + if(!isset($_POST['memberof'])) $_POST['memberof'] = array(); + if(!isset($_POST['members'])) $_POST['members'] = array(); + if(!isset($_POST['adminmembers'])) $_POST['adminmembers'] = array(); + + // Check name and password + if (isset($_POST['formNewRoleName']) && $_POST['formNewRoleName'] == '') + doAlter($lang['strroleneedsname']); + else if ($_POST['formPassword'] != $_POST['formConfirm']) + doAlter($lang['strpasswordconfirm']); + else { + if (isset($_POST['formNewRoleName'])) $status = $data->setRenameRole($_POST['rolename'], $_POST['formPassword'], isset($_POST['formSuper']), isset($_POST['formCreateDB']), isset($_POST['formCreateRole']), isset($_POST['formInherits']), isset($_POST['formCanLogin']), $_POST['formConnLimit'], $_POST['formExpires'], $_POST['memberof'], $_POST['members'], $_POST['adminmembers'], $_POST['memberofold'], $_POST['membersold'], $_POST['adminmembersold'], $_POST['formNewRoleName']); + else $status = $data->setRole($_POST['rolename'], $_POST['formPassword'], isset($_POST['formSuper']), isset($_POST['formCreateDB']), isset($_POST['formCreateRole']), isset($_POST['formInherits']), isset($_POST['formCanLogin']), $_POST['formConnLimit'], $_POST['formExpires'], $_POST['memberof'], $_POST['members'], $_POST['adminmembers'], $_POST['memberofold'], $_POST['membersold'], $_POST['adminmembersold']); + if ($status == 0) + doDefault($lang['strrolealtered']); + else + doAlter($lang['strrolealteredbad']); + } + } + + /** + * Show confirmation of drop a role and perform actual drop + */ + function doDrop($confirm) { + global $data, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('role'); + $misc->printTitle($lang['strdroprole'],'pg.role.drop'); + + echo "

", sprintf($lang['strconfdroprole'], $misc->printVal($_REQUEST['rolename'])), "

\n"; + + echo "
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + $status = $data->dropRole($_REQUEST['rolename']); + if ($status == 0) + doDefault($lang['strroledropped']); + else + doDefault($lang['strroledroppedbad']); + } + } + + /** + * Show the properties of a role + */ + function doProperties($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('role'); + $misc->printTitle($lang['strproperties'],'pg.role'); + $misc->printMsg($msg); + + $roledata = $data->getRole($_REQUEST['rolename']); + if($roledata->recordCount() > 0 ) { + $roledata->fields['rolsuper'] = $data->phpBool($roledata->fields['rolsuper']); + $roledata->fields['rolcreatedb'] = $data->phpBool($roledata->fields['rolcreatedb']); + $roledata->fields['rolcreaterole'] = $data->phpBool($roledata->fields['rolcreaterole']); + $roledata->fields['rolinherit'] = $data->phpBool($roledata->fields['rolinherit']); + $roledata->fields['rolcanlogin'] = $data->phpBool($roledata->fields['rolcanlogin']); + + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "
DescriptionValue
{$lang['strname']}", htmlspecialchars($_REQUEST['rolename']), "
{$lang['strsuper']}", (($roledata->fields['rolsuper']) ? $lang['stryes'] : $lang['strno']), "
{$lang['strcreatedb']}", (($roledata->fields['rolcreatedb']) ? $lang['stryes'] : $lang['strno']), "
{$lang['strcancreaterole']}", (($roledata->fields['rolcreaterole']) ? $lang['stryes'] : $lang['strno']), "
{$lang['strinheritsprivs']}", (($roledata->fields['rolinherit']) ? $lang['stryes'] : $lang['strno']), "
{$lang['strcanlogin']}", (($roledata->fields['rolcanlogin']) ? $lang['stryes'] : $lang['strno']), "
{$lang['strconnlimit']}", ($roledata->fields['rolconnlimit'] == '-1' ? $lang['strnolimit'] : $misc->printVal($roledata->fields['rolconnlimit'])), "
{$lang['strexpires']}", ($roledata->fields['rolvaliduntil'] == 'infinity' || is_null($roledata->fields['rolvaliduntil']) ? $lang['strnever'] : $misc->printVal($roledata->fields['rolvaliduntil'])), "
{$lang['strsessiondefaults']}", $misc->printVal($roledata->fields['rolconfig']), "
{$lang['strmemberof']}"; + $memberof = $data->getMemberOf($_REQUEST['rolename']); + if ($memberof->recordCount() > 0) { + while (!$memberof->EOF) { + echo $misc->printVal($memberof->fields['rolname']), "
\n"; + $memberof->moveNext(); + } + } + echo "
{$lang['strmembers']}"; + $members = $data->getMembers($_REQUEST['rolename']); + if ($members->recordCount() > 0) { + while (!$members->EOF) { + echo $misc->printVal($members->fields['rolname']), "
\n"; + $members->moveNext(); + } + } + echo "
{$lang['stradminmembers']}"; + $adminmembers = $data->getMembers($_REQUEST['rolename'], 't'); + if ($adminmembers->recordCount() > 0) { + while (!$adminmembers->EOF) { + echo $misc->printVal($adminmembers->fields['rolname']), "
\n"; + $adminmembers->moveNext(); + } + } + echo "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + + echo "\n"; + } + + /** + * If a role is not a superuser role, then we have an 'account management' + * page for change his password, etc. We don't prevent them from + * messing with the URL to gain access to other role admin stuff, because + * the PostgreSQL permissions will prevent them changing anything anyway. + */ + function doAccount($msg = '') { + global $data, $misc; + global $lang; + + $server_info = $misc->getServerInfo(); + + $roledata = $data->getRole($server_info['username']); + $_REQUEST['rolename'] = $server_info['username']; + + $misc->printTrail('role'); + $misc->printTabs('server','account'); + $misc->printMsg($msg); + + if ($roledata->recordCount() > 0) { + $roledata->fields['rolsuper'] = $data->phpBool($roledata->fields['rolsuper']); + $roledata->fields['rolcreatedb'] = $data->phpBool($roledata->fields['rolcreatedb']); + $roledata->fields['rolcreaterole'] = $data->phpBool($roledata->fields['rolcreaterole']); + $roledata->fields['rolinherit'] = $data->phpBool($roledata->fields['rolinherit']); + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n
{$lang['strname']}{$lang['strsuper']}{$lang['strcreatedb']}{$lang['strcancreaterole']}{$lang['strinheritsprivs']}{$lang['strconnlimit']}{$lang['strexpires']}{$lang['strsessiondefaults']}
", $misc->printVal($roledata->fields['rolname']), "", $misc->printVal($roledata->fields['rolsuper'], 'yesno'), "", $misc->printVal($roledata->fields['rolcreatedb'], 'yesno'), "", $misc->printVal($roledata->fields['rolcreaterole'], 'yesno'), "", $misc->printVal($roledata->fields['rolinherit'], 'yesno'), "", ($roledata->fields['rolconnlimit'] == '-1' ? $lang['strnolimit'] : $misc->printVal($roledata->fields['rolconnlimit'])), "", ($roledata->fields['rolvaliduntil'] == 'infinity' || is_null($roledata->fields['rolvaliduntil']) ? $lang['strnever'] : $misc->printVal($roledata->fields['rolvaliduntil'])), "", $misc->printVal($roledata->fields['rolconfig']), "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + + echo "

href}\">{$lang['strchangepassword']}

\n"; + } + + /** + * Show confirmation of change password and actually change password + */ + function doChangePassword($confirm, $msg = '') { + global $data, $misc; + global $lang, $conf; + + $server_info = $misc->getServerInfo(); + + if ($confirm) { + $_REQUEST['rolename'] = $server_info['username']; + $misc->printTrail('role'); + $misc->printTitle($lang['strchangepassword'],'pg.role.alter'); + $misc->printMsg($msg); + + if (!isset($_POST['password'])) $_POST['password'] = ''; + if (!isset($_POST['confirm'])) $_POST['confirm'] = ''; + + echo "
\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "
{$lang['strpassword']}
{$lang['strconfirm']}
\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "

\n"; + } + else { + // Check that password is minimum length + if (strlen($_POST['password']) < $conf['min_password_length']) + doChangePassword(true, $lang['strpasswordshort']); + // Check that password matches confirmation password + elseif ($_POST['password'] != $_POST['confirm']) + doChangePassword(true, $lang['strpasswordconfirm']); + else { + $status = $data->changePassword($server_info['username'], $_POST['password']); + if ($status == 0) + doAccount($lang['strpasswordchanged']); + else + doAccount($lang['strpasswordchangedbad']); + } + } + } + + + /** + * Show default list of roles in the database + */ + function doDefault($msg = '') { + global $data, $misc; + global $lang; + + function renderRoleConnLimit($val) { + global $lang; + return $val == '-1' ? $lang['strnolimit'] : htmlspecialchars($val); + } + + function renderRoleExpires($val) { + global $lang; + return $val == 'infinity' ? $lang['strnever'] : htmlspecialchars($val); + } + + $misc->printTrail('server'); + $misc->printTabs('server','roles'); + $misc->printMsg($msg); + + $roles = $data->getRoles(); + + $columns = array( + 'role' => array( + 'title' => $lang['strrole'], + 'field' => field('rolname'), + 'url' => "redirect.php?subject=role&action=properties&{$misc->href}&", + 'vars' => array('rolename' => 'rolname'), + ), + 'superuser' => array( + 'title' => $lang['strsuper'], + 'field' => field('rolsuper'), + 'type' => 'yesno', + ), + 'createdb' => array( + 'title' => $lang['strcreatedb'], + 'field' => field('rolcreatedb'), + 'type' => 'yesno', + ), + 'createrole' => array( + 'title' => $lang['strcancreaterole'], + 'field' => field('rolcreaterole'), + 'type' => 'yesno', + ), + 'inherits' => array( + 'title' => $lang['strinheritsprivs'], + 'field' => field('rolinherit'), + 'type' => 'yesno', + ), + 'canloging' => array( + 'title' => $lang['strcanlogin'], + 'field' => field('rolcanlogin'), + 'type' => 'yesno', + ), + 'connlimit' => array( + 'title' => $lang['strconnlimit'], + 'field' => field('rolconnlimit'), + 'type' => 'callback', + 'params'=> array('function' => 'renderRoleConnLimit') + ), + 'expires' => array( + 'title' => $lang['strexpires'], + 'field' => field('rolvaliduntil'), + 'type' => 'callback', + 'params'=> array('function' => 'renderRoleExpires', 'null' => $lang['strnever']), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + ); + + $actions = array( + 'alter' => array( + 'title' => $lang['stralter'], + 'url' => "roles.php?action=alter&{$misc->href}&", + 'vars' => array('rolename' => 'rolname'), + ), + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "roles.php?action=confirm_drop&{$misc->href}&", + 'vars' => array('rolename' => 'rolname'), + ), + ); + + $misc->printTable($roles, $columns, $actions, $lang['strnoroles']); + + echo "

href}\">{$lang['strcreaterole']}

\n"; + + } + + $misc->printHeader($lang['strroles']); + $misc->printBody(); + + switch ($action) { + case 'create': + doCreate(); + break; + case 'save_create': + if (isset($_POST['create'])) doSaveCreate(); + else doDefault(); + break; + case 'alter': + doAlter(); + break; + case 'save_alter': + if (isset($_POST['alter'])) doSaveAlter(); + else doDefault(); + break; + case 'confirm_drop': + doDrop(true); + break; + case 'drop': + if (isset($_POST['drop'])) doDrop(false); + else doDefault(); + break; + case 'properties': + doProperties(); + break; + case 'confchangepassword': + doChangePassword(true); + break; + case 'changepassword': + if (isset($_REQUEST['ok'])) doChangePassword(false); + else doAccount(); + break; + case 'account': + doAccount(); + break; + default: + doDefault(); + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/rules.php b/php/pgadmin/rules.php new file mode 100644 index 0000000..871dd19 --- /dev/null +++ b/php/pgadmin/rules.php @@ -0,0 +1,207 @@ +printTrail($_REQUEST['subject']); + $misc->printTitle($lang['strcreaterule'],'pg.rule.create'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
{$lang['strname']}_maxNameLen}\" value=\"", + htmlspecialchars($_POST['name']), "\" />
{$lang['strevent']}
{$lang['strwhere']}
"; + echo "\n"; + echo "
{$lang['straction']}"; + echo "
\n"; + echo "\n"; + echo "()
\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "

\n"; + echo "

\n"; + echo "
\n"; + + } + else { + if (trim($_POST['name']) == '') + createRule(true, $lang['strruleneedsname']); + else { + $status = $data->createRule($_POST['name'], + $_POST['event'], $_POST[$_POST['subject']], $_POST['where'], + isset($_POST['instead']), $_POST['type'], $_POST['raction']); + if ($status == 0) + doDefault($lang['strrulecreated']); + else + createRule(true, $lang['strrulecreatedbad']); + } + } + } + + /** + * Show confirmation of drop and perform actual drop + */ + function doDrop($confirm) { + global $data, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail($_REQUEST['subject']); + $misc->printTitle($lang['strdrop'],'pg.rule.drop'); + + echo "

", sprintf($lang['strconfdroprule'], $misc->printVal($_REQUEST['rule']), + $misc->printVal($_REQUEST[$_REQUEST['reltype']])), "

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $data->dropRule($_POST['rule'], $_POST[$_POST['subject']], isset($_POST['cascade'])); + if ($status == 0) + doDefault($lang['strruledropped']); + else + doDefault($lang['strruledroppedbad']); + } + + } + + /** + * List all the rules on the table + */ + function doDefault($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail($_REQUEST['subject']); + $misc->printTabs($_REQUEST['subject'], 'rules'); + $misc->printMsg($msg); + + $rules = $data->getRules($_REQUEST[$_REQUEST['subject']]); + + $columns = array( + 'rule' => array( + 'title' => $lang['strname'], + 'field' => field('rulename'), + ), + 'definition' => array( + 'title' => $lang['strdefinition'], + 'field' => field('definition'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + ); + + $subject = urlencode($_REQUEST['subject']); + $object = urlencode($_REQUEST[$_REQUEST['subject']]); + + $actions = array( + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "rules.php?action=confirm_drop&{$misc->href}&reltype={$subject}&{$subject}={$object}&subject=rule&", + 'vars' => array('rule' => 'rulename'), + ), + ); + + $misc->printTable($rules, $columns, $actions, $lang['strnorules']); + + echo "

href}&{$subject}={$object}&subject={$subject}\">{$lang['strcreaterule']}

\n"; + } + + function doTree() { + global $misc, $data; + + $rules = $data->getRules($_REQUEST[$_REQUEST['subject']]); + + $reqvars = $misc->getRequestVars($_REQUEST['subject']); + + $attrs = array( + 'text' => field('rulename'), + 'icon' => 'Rule', + ); + + $misc->printTreeXML($rules, $attrs); + exit; + } + + if ($action == 'tree') doTree(); + + // Different header if we're view rules or table rules + $misc->printHeader($_REQUEST[$_REQUEST['subject']] . ' - ' . $lang['strrules']); + $misc->printBody(); + + switch ($action) { + case 'create_rule': + createRule(true); + break; + case 'save_create_rule': + if (isset($_POST['cancel'])) doDefault(); + else createRule(false); + break; + case 'drop': + if (isset($_POST['yes'])) doDrop(false); + else doDefault(); + break; + case 'confirm_drop': + doDrop(true); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/schemas.php b/php/pgadmin/schemas.php new file mode 100644 index 0000000..bd2cdfe --- /dev/null +++ b/php/pgadmin/schemas.php @@ -0,0 +1,447 @@ +printTrail('database'); + $misc->printTabs('database','schemas'); + $misc->printMsg($msg); + + // Check that the DB actually supports schemas + $schemas = $data->getSchemas(); + + $columns = array( + 'schema' => array( + 'title' => $lang['strschema'], + 'field' => field('nspname'), + 'url' => "redirect.php?subject=schema&{$misc->href}&", + 'vars' => array('schema' => 'nspname'), + ), + 'owner' => array( + 'title' => $lang['strowner'], + 'field' => field('nspowner'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('nspcomment'), + ), + ); + + $actions = array( + 'multiactions' => array( + 'keycols' => array('nsp' => 'nspname'), + 'url' => 'schemas.php', + ), + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "schemas.php?action=drop&{$misc->href}&", + 'vars' => array('nsp' => 'nspname'), + 'multiaction' => 'drop', + ), + 'privileges' => array( + 'title' => $lang['strprivileges'], + 'url' => "privileges.php?subject=schema&{$misc->href}&", + 'vars' => array('schema' => 'nspname'), + ), + 'alter' => array( + 'title' => $lang['stralter'], + 'url' => "schemas.php?action=alter&{$misc->href}&", + 'vars' => array('schema' => 'nspname'), + ), + ); + + if (!$data->hasAlterSchema()) unset($actions['alter']); + + $misc->printTable($schemas, $columns, $actions, $lang['strnoschemas']); + + echo "

href}\">{$lang['strcreateschema']}

\n"; + } + + /** + * Displays a screen where they can enter a new schema + */ + function doCreate($msg = '') { + global $data, $misc; + global $lang; + + $server_info = $misc->getServerInfo(); + + if (!isset($_POST['formName'])) $_POST['formName'] = ''; + if (!isset($_POST['formAuth'])) $_POST['formAuth'] = $server_info['username']; + if (!isset($_POST['formSpc'])) $_POST['formSpc'] = ''; + if (!isset($_POST['formComment'])) $_POST['formComment'] = ''; + + // Fetch all users from the database + $users = $data->getUsers(); + + $misc->printTrail('database'); + $misc->printTitle($lang['strcreateschema'],'pg.schema.create'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + // Owner + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + echo "
{$lang['strname']}_maxNameLen}\" value=\"", + htmlspecialchars($_POST['formName']), "\" />
{$lang['strowner']}\n\t\t\t\n\t\t
{$lang['strcomment']}
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + + /** + * Actually creates the new schema in the database + */ + function doSaveCreate() { + global $data, $lang, $_reload_browser; + + // Check that they've given a name + if ($_POST['formName'] == '') doCreate($lang['strschemaneedsname']); + else { + $status = $data->createSchema($_POST['formName'], $_POST['formAuth'], $_POST['formComment']); + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['strschemacreated']); + } + else + doCreate($lang['strschemacreatedbad']); + } + } + + /** + * Display a form to permit editing schema properies. + * TODO: permit changing owner + */ + function doAlter($msg = '') { + global $data, $misc, $lang; + + $misc->printTrail('schema'); + $misc->printTitle($lang['stralter'],'pg.schema.alter'); + $misc->printMsg($msg); + + $schema = $data->getSchemaByName($_REQUEST['schema']); + if ($schema->recordCount() > 0) { + if (!isset($_POST['comment'])) $_POST['comment'] = $schema->fields['nspcomment']; + if (!isset($_POST['schema'])) $_POST['schema'] = $_REQUEST['schema']; + if (!isset($_POST['name'])) $_POST['name'] = $_REQUEST['schema']; + if (!isset($_POST['owner'])) $_POST['owner'] = $schema->fields['ownername']; + + echo "
\n"; + echo "\n"; + + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + + if ($data->hasAlterSchemaOwner()) { + $users = $data->getUsers(); + echo "\n"; + echo "\n"; + } + else + echo ""; + + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; + echo "
{$lang['strname']}"; + echo "\t\t\t_maxNameLen}\" value=\"", + htmlspecialchars($_POST['name']), "\" />\n"; + echo "\t\t
{$lang['strowner']}
{$lang['strcomment']}
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } else { + echo "

{$lang['strnodata']}

\n"; + } + } + + /** + * Save the form submission containing changes to a schema + */ + function doSaveAlter($msg = '') { + global $data, $misc, $lang, $_reload_browser; + + $status = $data->updateSchema($_POST['schema'], $_POST['comment'], $_POST['name'], $_POST['owner']); + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['strschemaaltered']); + } + else + doAlter($lang['strschemaalteredbad']); + } + + /** + * Show confirmation of drop and perform actual drop + */ + function doDrop($confirm) { + global $data, $misc; + global $lang, $_reload_browser; + + if (empty($_REQUEST['nsp']) && empty($_REQUEST['ma'])) { + doDefault($lang['strspecifyschematodrop']); + exit(); + } + + if ($confirm) { + $misc->printTrail('schema'); + $misc->printTitle($lang['strdrop'],'pg.schema.drop'); + + echo "
\n"; + //If multi drop + if (isset($_REQUEST['ma'])) { + foreach($_REQUEST['ma'] as $v) { + $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES)); + echo '

', sprintf($lang['strconfdropschema'], $misc->printVal($a['nsp'])), "

\n"; + echo '\n"; + } + } + else { + echo "

", sprintf($lang['strconfdropschema'], $misc->printVal($_REQUEST['nsp'])), "

\n"; + echo "\n"; + } + + echo "

\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + if (is_array($_POST['nsp'])) { + $msg=''; + $status = $data->beginTransaction(); + if ($status == 0) { + foreach($_POST['nsp'] as $s) { + $status = $data->dropSchema($s, isset($_POST['cascade'])); + if ($status == 0) + $msg.= sprintf('%s: %s
', htmlentities($s), $lang['strschemadropped']); + else { + $data->endTransaction(); + doDefault(sprintf('%s%s: %s
', $msg, htmlentities($s), $lang['strschemadroppedbad'])); + return; + } + } + } + if($data->endTransaction() == 0) { + // Everything went fine, back to the Default page.... + $_reload_browser = true; + doDefault($msg); + } + else doDefault($lang['strschemadroppedbad']); + } + else{ + $status = $data->dropSchema($_POST['nsp'], isset($_POST['cascade'])); + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['strschemadropped']); + } + else + doDefault($lang['strschemadroppedbad']); + } + } + } + + /** + * Displays options for database download + */ + function doExport($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('schema'); + $misc->printTabs('schema','export'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\n"; + // Data only + echo "\n"; + echo "\n"; + echo "\n\n"; + echo "\n\n"; + // Structure only + echo "\n"; + echo "\n\n"; + // Structure and data + echo "\n"; + echo "\n"; + echo "\n\n"; + echo "\n\n"; + echo "\n\n"; + echo "
{$lang['strformat']}{$lang['stroptions']}
"; + echo "{$lang['strformat']}\n
"; + echo "{$lang['strformat']}\n
\n"; + + echo "

{$lang['stroptions']}

\n"; + echo "

\n"; + echo "
\n"; + // MSIE cannot download gzip in SSL mode - it's just broken + if (!(strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE') && isset($_SERVER['HTTPS']))) { + echo "
\n"; + } + echo "

\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "

\n"; + echo "
\n"; + } + + + + /** + * Generate XML for the browser tree. + */ + function doTree() { + global $misc, $data, $lang, $slony; + + $schemas = $data->getSchemas(); + + $reqvars = $misc->getRequestVars('schema'); + + $attrs = array( + 'text' => field('nspname'), + 'icon' => 'Schema', + 'toolTip'=> field('nspcomment'), + 'action' => url('redirect.php', + $reqvars, + array( + 'subject' => 'schema', + 'schema' => field('nspname') + ) + ), + 'branch' => url('schemas.php', + $reqvars, + array( + 'action' => 'subtree', + 'schema' => field('nspname') + ) + ), + ); + + $misc->printTreeXML($schemas, $attrs); + + exit; + } + + function doSubTree() { + global $misc, $data, $lang; + + $tabs = $misc->getNavTabs('schema'); + + $items = $misc->adjustTabsForTree($tabs); + + $reqvars = $misc->getRequestVars('schema'); + + $attrs = array( + 'text' => noEscape(field('title')), + 'icon' => field('icon'), + 'action' => url(field('url'), + $reqvars, + field('urlvars', array()) + ), + 'branch' => url(field('url'), + $reqvars, + field('urlvars'), + array('action' => 'tree') + ) + ); + + $misc->printTreeXML($items, $attrs); + exit; + } + + if ($action == 'tree') doTree(); + if ($action == 'subtree') doSubTree(); + + $misc->printHeader($lang['strschemas']); + $misc->printBody(); + + if (isset($_POST['cancel'])) $action = ''; + + switch ($action) { + case 'create': + if (isset($_POST['create'])) doSaveCreate(); + else doCreate(); + break; + case 'alter': + if (isset($_POST['alter'])) doSaveAlter(); + else doAlter(); + break; + case 'drop': + if (isset($_POST['drop'])) doDrop(false); + else doDrop(true); + break; + case 'export': + doExport(); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/sequences.php b/php/pgadmin/sequences.php new file mode 100644 index 0000000..d01127b --- /dev/null +++ b/php/pgadmin/sequences.php @@ -0,0 +1,608 @@ +printTrail('schema'); + $misc->printTabs('schema', 'sequences'); + $misc->printMsg($msg); + + // Get all sequences + $sequences = $data->getSequences(); + + $columns = array( + 'sequence' => array( + 'title' => $lang['strsequence'], + 'field' => field('seqname'), + 'url' => "sequences.php?action=properties&{$misc->href}&", + 'vars' => array('sequence' => 'seqname'), + ), + 'owner' => array( + 'title' => $lang['strowner'], + 'field' => field('seqowner'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('seqcomment'), + ), + ); + + $actions = array( + 'multiactions' => array( + 'keycols' => array('sequence' => 'seqname'), + 'url' => 'sequences.php', + ), + 'alter' => array( + 'title' => $lang['stralter'], + 'url' => "sequences.php?action=confirm_alter&{$misc->href}&subject=sequence&", + 'vars' => array('sequence' => 'seqname'), + ), + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "sequences.php?action=confirm_drop&{$misc->href}&", + 'vars' => array('sequence' => 'seqname'), + 'multiaction' => 'confirm_drop', + ), + 'privileges' => array( + 'title' => $lang['strprivileges'], + 'url' => "privileges.php?{$misc->href}&subject=sequence&", + 'vars' => array('sequence' => 'seqname'), + ), + ); + + $misc->printTable($sequences, $columns, $actions, $lang['strnosequences']); + + echo "

href}\">{$lang['strcreatesequence']}

\n"; + } + + /** + * Generate XML for the browser tree. + */ + function doTree() { + global $misc, $data; + + $sequences = $data->getSequences(); + + $reqvars = $misc->getRequestVars('sequence'); + + $attrs = array( + 'text' => field('seqname'), + 'icon' => 'Sequence', + 'toolTip'=> field('seqcomment'), + 'action' => url('sequences.php', + $reqvars, + array ( + 'action' => 'properties', + 'sequence' => field('seqname') + ) + ) + ); + + $misc->printTreeXML($sequences, $attrs); + exit; + } + + /** + * Display the properties of a sequence + */ + function doProperties($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('sequence'); + $misc->printTitle($lang['strproperties'],'pg.sequence'); + $misc->printMsg($msg); + + // Fetch the sequence information + $sequence = $data->getSequence($_REQUEST['sequence']); + + if (is_object($sequence) && $sequence->recordCount() > 0) { + $sequence->fields['is_cycled'] = $data->phpBool($sequence->fields['is_cycled']); + $sequence->fields['is_called'] = $data->phpBool($sequence->fields['is_called']); + + // Show comment if any + if ($sequence->fields['seqcomment'] !== null) + echo "

", $misc->printVal($sequence->fields['seqcomment']), "

\n"; + + echo ""; + echo ""; + if ($data->hasAlterSequenceStart()) { + echo ""; + } + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + if ($data->hasAlterSequenceStart()) { + echo ""; + } + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "
{$lang['strname']}{$lang['strstartvalue']}{$lang['strlastvalue']}{$lang['strincrementby']}{$lang['strmaxvalue']}{$lang['strminvalue']}{$lang['strcachevalue']}{$lang['strlogcount']}{$lang['strcancycle']}{$lang['striscalled']}
", $misc->printVal($sequence->fields['seqname']), "", $misc->printVal($sequence->fields['start_value']), "", $misc->printVal($sequence->fields['last_value']), "", $misc->printVal($sequence->fields['increment_by']), "", $misc->printVal($sequence->fields['max_value']), "", $misc->printVal($sequence->fields['min_value']), "", $misc->printVal($sequence->fields['cache_value']), "", $misc->printVal($sequence->fields['log_cnt']), "", ($sequence->fields['is_cycled'] ? $lang['stryes'] : $lang['strno']), "", ($sequence->fields['is_called'] ? $lang['stryes'] : $lang['strno']), "
"; + + echo "\n"; + } + else echo "

{$lang['strnodata']}

\n"; + } + + /** + * Drop a sequence + */ + function doDrop($confirm, $msg = '') { + global $data, $misc; + global $lang; + + if (empty($_REQUEST['sequence']) && empty($_REQUEST['ma'])) { + doDefault($lang['strspecifysequencetodrop']); + exit(); + } + + if ($confirm) { + $misc->printTrail('sequence'); + $misc->printTitle($lang['strdrop'],'pg.sequence.drop'); + $misc->printMsg($msg); + + echo "
\n"; + + //If multi drop + if (isset($_REQUEST['ma'])) { + foreach($_REQUEST['ma'] as $v) { + $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES)); + echo "

", sprintf($lang['strconfdropsequence'], $misc->printVal($a['sequence'])), "

\n"; + printf('', htmlspecialchars($a['sequence'])); + } + } else { + echo "

", sprintf($lang['strconfdropsequence'], $misc->printVal($_REQUEST['sequence'])), "

\n"; + echo "\n"; + } + + echo "

\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + if (is_array($_POST['sequence'])) { + $msg=''; + $status = $data->beginTransaction(); + if ($status == 0) { + foreach($_POST['sequence'] as $s) { + $status = $data->dropSequence($s, isset($_POST['cascade'])); + if ($status == 0) + $msg.= sprintf('%s: %s
', htmlentities($s), $lang['strsequencedropped']); + else { + $data->endTransaction(); + doDefault(sprintf('%s%s: %s
', $msg, htmlentities($s), $lang['strsequencedroppedbad'])); + return; + } + } + } + if($data->endTransaction() == 0) { + // Everything went fine, back to the Default page.... + $_reload_browser = true; + doDefault($msg); + } + else doDefault($lang['strsequencedroppedbad']); + } + else{ + $status = $data->dropSequence($_POST['sequence'], isset($_POST['cascade'])); + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['strsequencedropped']); + } + else + doDrop(true, $lang['strsequencedroppedbad']); + } + } + } + + /** + * Displays a screen where they can enter a new sequence + */ + function doCreateSequence($msg = '') { + global $data, $misc; + global $lang; + + if (!isset($_POST['formSequenceName'])) $_POST['formSequenceName'] = ''; + if (!isset($_POST['formIncrement'])) $_POST['formIncrement'] = ''; + if (!isset($_POST['formMinValue'])) $_POST['formMinValue'] = ''; + if (!isset($_POST['formMaxValue'])) $_POST['formMaxValue'] = ''; + if (!isset($_POST['formStartValue'])) $_POST['formStartValue'] = ''; + if (!isset($_POST['formCacheValue'])) $_POST['formCacheValue'] = ''; + + $misc->printTrail('schema'); + $misc->printTitle($lang['strcreatesequence'],'pg.sequence.create'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "
{$lang['strname']}_maxNameLen}\" value=\"", + htmlspecialchars($_POST['formSequenceName']), "\" />
{$lang['strincrementby']}
{$lang['strminvalue']}
{$lang['strmaxvalue']}
{$lang['strstartvalue']}
{$lang['strcachevalue']}
\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + + /** + * Actually creates the new sequence in the database + */ + function doSaveCreateSequence() { + global $data; + global $lang; + + // Check that they've given a name and at least one column + if ($_POST['formSequenceName'] == '') doCreateSequence($lang['strsequenceneedsname']); + else { + $status = $data->createSequence($_POST['formSequenceName'], + $_POST['formIncrement'], $_POST['formMinValue'], + $_POST['formMaxValue'], $_POST['formStartValue'], + $_POST['formCacheValue'], isset($_POST['formCycledValue'])); + if ($status == 0) { + doDefault($lang['strsequencecreated']); + } else { + doCreateSequence($lang['strsequencecreatedbad']); + } + } + } + + /** + * Restarts a sequence + */ + function doRestart() { + global $data; + global $lang; + + $status = $data->restartSequence($_REQUEST['sequence']); + if ($status == 0) + doProperties($lang['strsequencerestart']); + else + doProperties($lang['strsequencerestartbad']); + } + + /** + * Resets a sequence + */ + function doReset() { + global $data; + global $lang; + + $status = $data->resetSequence($_REQUEST['sequence']); + if ($status == 0) + doProperties($lang['strsequencereset']); + else + doProperties($lang['strsequenceresetbad']); + } + + /** + * Set Nextval of a sequence + */ + function doNextval() { + global $data; + global $lang; + + $status = $data->nextvalSequence($_REQUEST['sequence']); + if ($status == 0) + doProperties($lang['strsequencenextval']); + else + doProperties($lang['strsequencenextvalbad']); + } + + /** + * Function to save after 'setval'ing a sequence + */ + function doSaveSetval() { + global $data, $lang, $_reload_browser; + + $status = $data->setvalSequence($_POST['sequence'], $_POST['nextvalue']); + if ($status == 0) + doProperties($lang['strsequencesetval']); + else + doProperties($lang['strsequencesetvalbad']); + } + + /** + * Function to allow 'setval'ing of a sequence + */ + function doSetval($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('sequence'); + $misc->printTitle($lang['strsetval'], 'pg.sequence'); + $misc->printMsg($msg); + + // Fetch the sequence information + $sequence = $data->getSequence($_REQUEST['sequence']); + + if (is_object($sequence) && $sequence->recordCount() > 0) { + echo "
\n"; + echo ""; + echo "\n"; + echo "\n"; + echo "
{$lang['strlastvalue']}"; + echo "_maxNameLen}\" value=\"", + $misc->printVal($sequence->fields['last_value']), "\" />
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + } + + /** + * Function to save after altering a sequence + */ + function doSaveAlter() { + global $data, $lang, $_reload_browser, $misc; + + + if (!isset($_POST['owner'])) $_POST['owner'] = null; + if (!isset($_POST['newschema'])) $_POST['newschema'] = null; + if (!isset($_POST['formIncrement'])) $_POST['formIncrement'] = null; + if (!isset($_POST['formMinValue'])) $_POST['formMinValue'] = null; + if (!isset($_POST['formMaxValue'])) $_POST['formMaxValue'] = null; + if (!isset($_POST['formStartValue'])) $_POST['formStartValue'] = null; + if (!isset($_POST['formRestartValue'])) $_POST['formRestartValue'] = null; + if (!isset($_POST['formCacheValue'])) $_POST['formCacheValue'] = null; + if (!isset($_POST['formCycledValue'])) $_POST['formCycledValue'] = null; + + $status = $data->alterSequence($_POST['sequence'], $_POST['name'], $_POST['comment'], $_POST['owner'], + $_POST['newschema'], $_POST['formIncrement'], $_POST['formMinValue'], $_POST['formMaxValue'], + $_POST['formRestartValue'], $_POST['formCacheValue'], isset($_POST['formCycledValue']), $_POST['formStartValue']); + + if ($status == 0) { + if ($_POST['sequence'] != $_POST['name']) { + // Jump them to the new view name + $_REQUEST['sequence'] = $_POST['name']; + // Force a browser reload + $_reload_browser = true; + } + if (!empty($_POST['newschema']) && ($_POST['newschema'] != $data->_schema)) { + // Jump them to the new sequence schema + $misc->setCurrentSchema($_POST['newschema']); + $_reload_browser = true; + } + doProperties($lang['strsequencealtered']); + } + else + doProperties($lang['strsequencealteredbad']); + } + + /** + * Function to allow altering of a sequence + */ + function doAlter($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('sequence'); + $misc->printTitle($lang['stralter'], 'pg.sequence.alter'); + $misc->printMsg($msg); + + // Fetch the sequence information + $sequence = $data->getSequence($_REQUEST['sequence']); + + if (is_object($sequence) && $sequence->recordCount() > 0) { + if (!isset($_POST['name'])) $_POST['name'] = $_REQUEST['sequence']; + if (!isset($_POST['comment'])) $_POST['comment'] = $sequence->fields['seqcomment']; + if (!isset($_POST['owner'])) $_POST['owner'] = $sequence->fields['seqowner']; + if (!isset($_POST['newschema'])) $_POST['newschema'] = $sequence->fields['nspname']; + + // Handle Checkbox Value + $sequence->fields['is_cycled'] = $data->phpBool($sequence->fields['is_cycled']); + if ($sequence->fields['is_cycled']) $_POST['formCycledValue'] = 'on'; + + echo "
\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + $server_info = $misc->getServerInfo(); + if ($data->isSuperUser($server_info['username'])) { + // Fetch all users + $users = $data->getUsers(); + + echo "\n"; + echo "\n"; + } + + if ($data->hasAlterSequenceSchema()) { + $schemas = $data->getSchemas(); + echo "\n"; + echo "\n"; + } + + echo "\n"; + echo "\n"; + + if ($data->hasAlterSequenceStart()) { + echo "\n"; + echo "\n"; + } + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "
{$lang['strname']}"; + echo "_maxNameLen}\" value=\"", + htmlspecialchars($_POST['name']), "\" />
{$lang['strowner']}
{$lang['strschema']}
{$lang['strcomment']}"; + echo "
{$lang['strstartvalue']}fields['start_value']), "\" />
{$lang['strrestartvalue']}fields['last_value']), "\" />
{$lang['strincrementby']}fields['increment_by']), "\" />
{$lang['strmaxvalue']}fields['max_value']), "\" />
{$lang['strminvalue']}fields['min_value']), "\" />
{$lang['strcachevalue']}fields['cache_value']), "\" />
\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + } + + if ($action == 'tree') doTree(); + + // Print header + $misc->printHeader($lang['strsequences']); + $misc->printBody(); + + switch($action) { + case 'create': + doCreateSequence(); + break; + case 'save_create_sequence': + if (isset($_POST['create'])) doSaveCreateSequence(); + else doDefault(); + break; + case 'properties': + doProperties(); + break; + case 'drop': + if (isset($_POST['drop'])) doDrop(false); + else doDefault(); + break; + case 'confirm_drop': + doDrop(true); + break; + case 'restart': + doRestart(); + break; + case 'reset': + doReset(); + break; + case 'nextval': + doNextval(); + break; + case 'setval': + if (isset($_POST['setval'])) doSaveSetval(); + else doDefault(); + break; + case 'confirm_setval': + doSetval(); + break; + case 'alter': + if (isset($_POST['alter'])) doSaveAlter(); + else doDefault(); + break; + case 'confirm_alter': + doAlter(); + break; + default: + doDefault(); + break; + } + + // Print footer + $misc->printFooter(); + +?> diff --git a/php/pgadmin/servers.php b/php/pgadmin/servers.php new file mode 100644 index 0000000..2b6ea30 --- /dev/null +++ b/php/pgadmin/servers.php @@ -0,0 +1,185 @@ +getServerInfo($_REQUEST['logoutServer']); + $misc->setServerInfo(null, null, $_REQUEST['logoutServer']); + + unset($_SESSION['sharedUsername'], $_SESSION['sharedPassword']); + + doDefault(sprintf($lang['strlogoutmsg'], $server_info['desc'])); + + $_reload_browser = true; + } + + function doDefault($msg = '') { + global $conf, $misc; + global $lang; + + $misc->printTabs('root','servers'); + $misc->printMsg($msg); + + $group = isset($_GET['group']) ? $_GET['group'] : false; + + $servers = $misc->getServers(true, $group); + + function svPre(&$rowdata, $actions) { + $actions['logout']['disable'] = empty($rowdata->fields['username']); + return $actions; + } + + $columns = array( + 'server' => array( + 'title' => $lang['strserver'], + 'field' => field('desc'), + 'url' => "redirect.php?subject=server&", + 'vars' => array('server' => 'id'), + ), + 'host' => array( + 'title' => $lang['strhost'], + 'field' => field('host'), + ), + 'port' => array( + 'title' => $lang['strport'], + 'field' => field('port'), + ), + 'username' => array( + 'title' => $lang['strusername'], + 'field' => field('username'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + ); + + $actions = array( + 'logout' => array( + 'title' => $lang['strlogout'], + 'url' => "servers.php?action=logout&", + 'vars' => array('logoutServer' => 'id'), + ), + ); + + if (($group !== false) and isset($conf['srv_groups'][$group])) { + printf("

{$lang['strgroupservers']}

", htmlentities($conf['srv_groups'][$group]['desc'])); + $actions['logout']['url'] .= "group=" . htmlentities($group) . "&"; + } + + $misc->printTable($servers, $columns, $actions, $lang['strnoobjects'], 'svPre'); + + if (isset($conf['srv_groups'])) { + echo "
\n"; + } + } + + function doTree($group = false) { + global $misc; + + $servers = $misc->getServers(true, $group); + + $reqvars = $misc->getRequestVars('server'); + + $attrs = array( + 'text' => field('desc'), + + // Show different icons for logged in/out + 'icon' => ifempty(field('username'), 'DisconnectedServer', 'Server'), + + 'toolTip'=> field('id'), + + 'action' => url('redirect.php', + $reqvars, + array('server' => field('id')) + ), + + // Only create a branch url if the user has + // logged into the server. + 'branch' => ifempty(field('username'), false, + url('all_db.php', + $reqvars, + array( + 'action' => 'tree', + 'server' => field('id') + ) + ) + ), + ); + + $misc->printTreeXML($servers, $attrs); + exit; + } + + function doGroupsTree() { + global $misc; + + $groups = $misc->getServersGroups(); + + function escape($fields) { + global $lang; + if ($fields['id'] === 'all') { + return $lang['strallservers']; + } + else return value(field('desc'), $fields, 'xml'); + } + + $attrs = array( + 'text' => noEscape(callback('escape')), + 'icon' => 'Servers', + 'action' => url('servers.php', + array( + 'group' => field('id') + ) + ), + 'branch' => url('servers.php', + array( + 'action' => 'tree', + 'group' => field('id') + ) + ) + ); + + $misc->printTreeXML($groups, $attrs); + exit; + } + + if ($action == 'tree') { + if (isset($_GET['group'])) doTree($_GET['group']); + else doTree(false); + } + + if ($action == 'groupstree') doGroupsTree(); + + $misc->printHeader($lang['strservers']); + $misc->printBody(); + $misc->printTrail('root'); + + switch ($action) { + case 'logout': + doLogout(); + break; + default: + doDefault($msg); + break; + } + + $misc->printFooter(); +?> diff --git a/php/pgadmin/sql.php b/php/pgadmin/sql.php new file mode 100644 index 0000000..8280e3d --- /dev/null +++ b/php/pgadmin/sql.php @@ -0,0 +1,224 @@ +getLastError())), "
\n"; + } + else { + // Print query results + switch (pg_result_status($rs)) { + case PGSQL_TUPLES_OK: + // If rows returned, then display the results + $num_fields = pg_numfields($rs); + echo "

\n"; + for ($k = 0; $k < $num_fields; $k++) { + echo ""; + } + + $i = 0; + $row = pg_fetch_row($rs); + while ($row !== false) { + $id = (($i % 2) == 0 ? '1' : '2'); + echo "\n"; + foreach ($row as $k => $v) { + echo ""; + } + echo "\n"; + $row = pg_fetch_row($rs); + $i++; + }; + echo "
", $misc->printVal(pg_fieldname($rs, $k)), "
", $misc->printVal($v, pg_fieldtype($rs, $k), array('null' => true)), "

\n"; + echo $i, " {$lang['strrows']}

\n"; + break; + case PGSQL_COMMAND_OK: + // If we have the command completion tag + if (version_compare(phpversion(), '4.3', '>=')) { + echo htmlspecialchars(pg_result_status($rs, PGSQL_STATUS_STRING)), "
\n"; + } + // Otherwise if any rows have been affected + elseif ($data->conn->Affected_Rows() > 0) { + echo $data->conn->Affected_Rows(), " {$lang['strrowsaff']}
\n"; + } + // Otherwise output nothing... + break; + case PGSQL_EMPTY_QUERY: + break; + default: + break; + } + } + } + + // We need to store the query in a session for editing purposes + // We avoid GPC vars to avoid truncating long queries + // If we came from a report, we need to look up the query + if (isset($_REQUEST['subject']) && $_REQUEST['subject'] == 'report' ) { + global $data, $misc; + include_once('./classes/Reports.php'); + $reportsdb = new Reports($status); + $report = $reportsdb->getReport($_REQUEST['reportid']); + $_SESSION['sqlquery'] = $report->fields['report_sql']; + } + elseif (isset($_POST['query'])) { + // Or maybe we came from an sql form + $_SESSION['sqlquery'] = $_POST['query']; + } else { + echo "could not find the query!!"; + } + + // Pagination maybe set by a get link that has it as FALSE, + // if that's the case, unset the variable. + + if (isset($_REQUEST['paginate']) && $_REQUEST['paginate'] == 'f') { + unset($_REQUEST['paginate']); + unset($_POST['paginate']); + unset($_GET['paginate']); + } + // Check to see if pagination has been specified. In that case, send to display + // script for pagination + /* if a file is given or the request is an explain, do not paginate */ + if (isset($_REQUEST['paginate']) && !(isset($_FILES['script']) && $_FILES['script']['size'] > 0) + && (preg_match('/^\s*explain/i', $_SESSION['sqlquery']) == 0)) { + include('./display.php'); + exit; + } + + $subject = isset($_REQUEST['subject'])? $_REQUEST['subject'] : ''; + $misc->printHeader($lang['strqueryresults']); + $misc->printBody(); + $misc->printTrail('database'); + $misc->printTitle($lang['strqueryresults']); + + // Set the schema search path + if (isset($_REQUEST['search_path'])) { + if ($data->setSearchPath(array_map('trim',explode(',',$_REQUEST['search_path']))) != 0) { + $misc->printFooter(); + exit; + } + } + + // May as well try to time the query + if (function_exists('microtime')) { + list($usec, $sec) = explode(' ', microtime()); + $start_time = ((float)$usec + (float)$sec); + } + else $start_time = null; + // Execute the query. If it's a script upload, special handling is necessary + if (isset($_FILES['script']) && $_FILES['script']['size'] > 0) + $data->executeScript('script', 'sqlCallback'); + else { + // Set fetch mode to NUM so that duplicate field names are properly returned + $data->conn->setFetchMode(ADODB_FETCH_NUM); + $rs = $data->conn->Execute($_SESSION['sqlquery']); + + // $rs will only be an object if there is no error + if (is_object($rs)) { + // Request was run, saving it in history + if(!isset($_REQUEST['nohistory'])) + $misc->saveScriptHistory($_SESSION['sqlquery']); + + // Now, depending on what happened do various things + + // First, if rows returned, then display the results + if ($rs->recordCount() > 0) { + echo "\n"; + foreach ($rs->fields as $k => $v) { + $finfo = $rs->fetchField($k); + echo ""; + } + echo "\n"; + $i = 0; + while (!$rs->EOF) { + $id = (($i % 2) == 0 ? '1' : '2'); + echo "\n"; + foreach ($rs->fields as $k => $v) { + $finfo = $rs->fetchField($k); + echo ""; + } + echo "\n"; + $rs->moveNext(); + $i++; + } + echo "
", $misc->printVal($finfo->name), "
", $misc->printVal($v, $finfo->type, array('null' => true)), "
\n"; + echo "

", $rs->recordCount(), " {$lang['strrows']}

\n"; + } + // Otherwise if any rows have been affected + elseif ($data->conn->Affected_Rows() > 0) { + echo "

", $data->conn->Affected_Rows(), " {$lang['strrowsaff']}

\n"; + } + // Otherwise nodata to print + else echo '

', $lang['strnodata'], "

\n"; + } + } + + // May as well try to time the query + if ($start_time !== null) { + list($usec, $sec) = explode(' ', microtime()); + $end_time = ((float)$usec + (float)$sec); + // Get duration in milliseconds, round to 3dp's + $duration = number_format(($end_time - $start_time) * 1000, 3); + } + else $duration = null; + + // Reload the browser as we may have made schema changes + $_reload_browser = true; + + // Display duration if we know it + if ($duration !== null) { + echo "

", sprintf($lang['strruntime'], $duration), "

\n"; + } + + echo "

{$lang['strsqlexecuted']}

\n"; + + echo "\n"; + + $misc->printFooter(); +?> diff --git a/php/pgadmin/sql/reports-pgsql.sql b/php/pgadmin/sql/reports-pgsql.sql new file mode 100644 index 0000000..1272a76 --- /dev/null +++ b/php/pgadmin/sql/reports-pgsql.sql @@ -0,0 +1,27 @@ +-- SQL script to create reports database for PostgreSQL +-- +-- To run, type: psql template1 < reports-pgsql.sql +-- +-- $Id: reports-pgsql.sql,v 1.4 2007/04/16 11:02:36 mr-russ Exp $ + +CREATE DATABASE phppgadmin; + +\connect phppgadmin + +CREATE TABLE ppa_reports ( + report_id SERIAL, + report_name varchar(255) NOT NULL, + db_name varchar(255) NOT NULL, + date_created date DEFAULT NOW() NOT NULL, + created_by varchar(255) NOT NULL, + descr text, + report_sql text NOT NULL, + paginate boolean NOT NULL, + PRIMARY KEY (report_id) +); + +-- Allow everyone to do everything with reports. This may +-- or may not be what you want. +GRANT SELECT,INSERT,UPDATE,DELETE ON ppa_reports TO PUBLIC; +GRANT SELECT,UPDATE ON ppa_reports_report_id_seq TO PUBLIC; + diff --git a/php/pgadmin/sqledit.php b/php/pgadmin/sqledit.php new file mode 100644 index 0000000..de1773b --- /dev/null +++ b/php/pgadmin/sqledit.php @@ -0,0 +1,145 @@ +printConnection($onchange); + } + + /** + * Searches for a named database object + */ + function doFind() { + global $data, $misc; + global $lang, $conf; + + if (!isset($_REQUEST['term'])) $_REQUEST['term'] = ''; + if (!isset($_REQUEST['filter'])) $_REQUEST['filter'] = ''; + + $misc->printHeader($lang['strfind']); + + // Bring to the front always + echo "\n"; + + $misc->printTabs($misc->getNavTabs('popup'), 'find'); + + echo "
\n"; + _printConnection(); + echo "

_maxNameLen}\" />\n"; + + // Output list of filters. This is complex due to all the 'has' and 'conf' feature possibilities + echo "\n"; + + echo "\n"; + echo "

\n"; + echo "
\n"; + + // Default focus + $misc->setFocus('forms[0].term'); + } + + /** + * Allow execution of arbitrary SQL statements on a database + */ + function doDefault() { + global $data, $misc; + global $lang; + + if (!isset($_SESSION['sqlquery'])) $_SESSION['sqlquery'] = ''; + + $misc->printHeader($lang['strsql']); + + // Bring to the front always + echo "\n"; + + $misc->printTabs($misc->getNavTabs('popup'), 'sql'); + + echo "
\n"; + _printConnection(); + echo "\n"; + if (!isset($_REQUEST['search_path'])) + $_REQUEST['search_path'] = implode(',',$data->getSearchPath()); + + echo "

\n"; + + echo "\n"; + echo "

\n"; + + echo "

\n"; + echo "

\n"; + echo "
\n"; + + // Default focus + $misc->setFocus('forms[0].query'); + } + + switch ($action) { + case 'find': + doFind(); + break; + case 'sql': + default: + doDefault(); + break; + } + + // Set the name of the window + $misc->setWindowName('sqledit'); + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/tables.js b/php/pgadmin/tables.js new file mode 100644 index 0000000..a805a8b --- /dev/null +++ b/php/pgadmin/tables.js @@ -0,0 +1,18 @@ +var predefined_lengths = null; +var sizesLength = false; + +function checkLengths(sValue,idx) { + if(predefined_lengths) { + if(sizesLength==false) { + sizesLength = predefined_lengths.length; + } + for(var i=0;igetDefaultWithOid(); + if ($default_with_oids == 'off') $_REQUEST['withoutoids'] = 'on'; + } + + if (!isset($_REQUEST['name'])) $_REQUEST['name'] = ''; + if (!isset($_REQUEST['fields'])) $_REQUEST['fields'] = ''; + if (!isset($_REQUEST['tblcomment'])) $_REQUEST['tblcomment'] = ''; + if (!isset($_REQUEST['spcname'])) $_REQUEST['spcname'] = ''; + + switch ($_REQUEST['stage']) { + case 1: + // Fetch all tablespaces from the database + if ($data->hasTablespaces()) $tablespaces = $data->getTablespaces(); + + $misc->printTrail('schema'); + $misc->printTitle($lang['strcreatetable'], 'pg.table.create'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + // Tablespace (if there are any) + if ($data->hasTablespaces() && $tablespaces->recordCount() > 0) { + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + } + + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + echo "
{$lang['strname']}_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['name']), "\" />
{$lang['strnumcols']}_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['fields']), "\" />
{$lang['stroptions']}
{$lang['strtablespace']}\n\t\t\t\n\t\t
{$lang['strcomment']}
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + break; + case 2: + global $lang; + + // Check inputs + $fields = trim($_REQUEST['fields']); + if (trim($_REQUEST['name']) == '') { + $_REQUEST['stage'] = 1; + doCreate($lang['strtableneedsname']); + return; + } + elseif ($fields == '' || !is_numeric($fields) || $fields != (int)$fields || $fields < 1) { + $_REQUEST['stage'] = 1; + doCreate($lang['strtableneedscols']); + return; + } + + $types = $data->getTypes(true, false, true); + $types_for_js = array(); + + $misc->printTrail('schema'); + $misc->printTitle($lang['strcreatetable'], 'pg.table.create'); + $misc->printMsg($msg); + + echo ""; + echo "
\n"; + + // Output table header + echo "\n"; + echo "\t"; + echo ""; + echo ""; + echo "\n"; + + for ($i = 0; $i < $_REQUEST['fields']; $i++) { + if (!isset($_REQUEST['field'][$i])) $_REQUEST['field'][$i] = ''; + if (!isset($_REQUEST['length'][$i])) $_REQUEST['length'][$i] = ''; + if (!isset($_REQUEST['default'][$i])) $_REQUEST['default'][$i] = ''; + if (!isset($_REQUEST['colcomment'][$i])) $_REQUEST['colcomment'][$i] = ''; + + echo "\t\n\t\t\n"; + echo "\t\t\n"; + echo "\t\t"; + } + + // Output array type selector + echo "\t\t\n"; + + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n\t\n"; + } + echo "
{$lang['strcolumn']}{$lang['strtype']}{$lang['strlength']}{$lang['strnotnull']}{$lang['struniquekey']}{$lang['strprimarykey']}{$lang['strdefault']}{$lang['strcomment']}
", $i + 1, ". _maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['field'][$i]), "\" />\n\t\t\t\n\t\t\n"; + if($i==0) { // only define js types array once + $predefined_size_types = array_intersect($data->predefined_size_types,array_keys($types_for_js)); + $escaped_predef_types = array(); // the JS escaped array elements + foreach($predefined_size_types as $value) { + $escaped_predef_types[] = "'{$value}'"; + } + echo "\n\t\n\t\t\t\n\t\t + +
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + if (isset($_REQUEST['withoutoids'])) { + echo "\n"; + } + echo "\n"; + if (isset($_REQUEST['spcname'])) { + echo "\n"; + } + echo "\n"; + echo "

\n"; + echo "
\n"; + + break; + case 3: + global $data, $lang, $_reload_browser; + + if (!isset($_REQUEST['notnull'])) $_REQUEST['notnull'] = array(); + if (!isset($_REQUEST['uniquekey'])) $_REQUEST['uniquekey'] = array(); + if (!isset($_REQUEST['primarykey'])) $_REQUEST['primarykey'] = array(); + if (!isset($_REQUEST['length'])) $_REQUEST['length'] = array(); + // Default tablespace to null if it isn't set + if (!isset($_REQUEST['spcname'])) $_REQUEST['spcname'] = null; + + // Check inputs + $fields = trim($_REQUEST['fields']); + if (trim($_REQUEST['name']) == '') { + $_REQUEST['stage'] = 1; + doCreate($lang['strtableneedsname']); + return; + } + elseif ($fields == '' || !is_numeric($fields) || $fields != (int)$fields || $fields <= 0) { + $_REQUEST['stage'] = 1; + doCreate($lang['strtableneedscols']); + return; + } + + $status = $data->createTable($_REQUEST['name'], $_REQUEST['fields'], $_REQUEST['field'], + $_REQUEST['type'], $_REQUEST['array'], $_REQUEST['length'], $_REQUEST['notnull'], $_REQUEST['default'], + isset($_REQUEST['withoutoids']), $_REQUEST['colcomment'], $_REQUEST['tblcomment'], $_REQUEST['spcname'], + $_REQUEST['uniquekey'], $_REQUEST['primarykey']); + + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['strtablecreated']); + } + elseif ($status == -1) { + $_REQUEST['stage'] = 2; + doCreate($lang['strtableneedsfield']); + return; + } + else { + $_REQUEST['stage'] = 2; + doCreate($lang['strtablecreatedbad']); + return; + } + break; + default: + echo "

{$lang['strinvalidparam']}

\n"; + } + } + + /** + * Dsiplay a screen where user can create a table from an existing one. + * We don't have to check if pg supports schema cause create table like + * is available under pg 7.4+ which has schema. + */ + function doCreateLike($confirm, $msg = '') { + global $data, $misc, $lang; + + if (!$confirm) { + + include_once('./classes/Gui.php'); + + if (!isset($_REQUEST['name'])) $_REQUEST['name'] = ''; + if (!isset($_REQUEST['like'])) $_REQUEST['like'] = ''; + if (!isset($_REQUEST['tablespace'])) $_REQUEST['tablespace'] = ''; + + $misc->printTrail('schema'); + $misc->printTitle($lang['strcreatetable'], 'pg.table.create'); + $misc->printMsg($msg); + + $tbltmp = $data->getTables(true); + $tbltmp = $tbltmp->getArray(); + + $tables = array(); + $tblsel = ''; + foreach ($tbltmp as $a) { + $data->fieldClean($a['nspname']); + $data->fieldClean($a['relname']); + $tables["\"{$a['nspname']}\".\"{$a['relname']}\""] = serialize(array('schema' => $a['nspname'], 'table' => $a['relname'])); + if ($_REQUEST['like'] == $tables["\"{$a['nspname']}\".\"{$a['relname']}\""]) + $tblsel = htmlspecialchars($tables["\"{$a['nspname']}\".\"{$a['relname']}\""]); + } + + unset($tbltmp); + + echo "
\n"; + echo "\n\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + if ($data->hasTablespaces()) { + $tblsp_ = $data->getTablespaces(); + if ($tblsp_->recordCount() > 0) { + $tblsp_ = $tblsp_->getArray(); + $tblsp = array(); + foreach($tblsp_ as $a) $tblsp[$a['spcname']] = $a['spcname']; + + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + } + } + echo "\t\n\t\t\n\t\t\n\t\n"; + echo "
{$lang['strname']}_maxNameLen}\" value=\"", htmlspecialchars($_REQUEST['name']), "\" />
{$lang['strcreatetablelikeparent']}"; + echo GUI::printCombo($tables, 'like', true, $tblsel, false); + echo "
{$lang['strtablespace']}"; + echo GUI::printCombo($tblsp, 'tablespace', true, $_REQUEST['tablespace'], false); + echo "
{$lang['stroptions']}"; + echo ""; + if ($data->hasCreateTableLikeWithConstraints()) { + echo "
"; + } + if ($data->hasCreateTableLikeWithIndexes()) { + echo "
"; + } + echo "
"; + + echo "\n"; + echo $misc->form; + echo "

\n"; + echo "

\n"; + echo "
\n"; + } + else { + global $_reload_browser; + + if (trim($_REQUEST['name']) == '') { + doCreateLike(false, $lang['strtableneedsname']); + return; + } + if (trim($_REQUEST['like']) == '') { + doCreateLike(false, $lang['strtablelikeneedslike']); + return; + } + + if (!isset($_REQUEST['tablespace'])) $_REQUEST['tablespace'] = ''; + + $status = $data->createTableLike($_REQUEST['name'], unserialize($_REQUEST['like']), isset($_REQUEST['withdefaults']), + isset($_REQUEST['withconstraints']), isset($_REQUEST['withindexes']), $_REQUEST['tablespace']); + + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['strtablecreated']); + } + else { + doCreateLike(false, $lang['strtablecreatedbad']); + return; + } + } + } + + /** + * Ask for select parameters and perform select + */ + function doSelectRows($confirm, $msg = '') { + global $data, $misc, $_no_output; + global $lang; + + if ($confirm) { + $misc->printTrail('table'); + $misc->printTitle($lang['strselect'], 'pg.sql.select'); + $misc->printMsg($msg); + + $attrs = $data->getTableAttributes($_REQUEST['table']); + + echo "
\n"; + if ($attrs->recordCount() > 0) { + // JavaScript for select all feature + echo "\n"; + + echo "\n"; + + // Output table header + echo ""; + echo ""; + echo ""; + + $i = 0; + while (!$attrs->EOF) { + $attrs->fields['attnotnull'] = $data->phpBool($attrs->fields['attnotnull']); + // Set up default value if there isn't one already + if (!isset($_REQUEST['values'][$attrs->fields['attname']])) + $_REQUEST['values'][$attrs->fields['attname']] = null; + if (!isset($_REQUEST['ops'][$attrs->fields['attname']])) + $_REQUEST['ops'][$attrs->fields['attname']] = null; + // Continue drawing row + $id = (($i % 2) == 0 ? '1' : '2'); + echo "\n"; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + $i++; + $attrs->moveNext(); + } + // Select all checkbox + echo ""; + echo "
{$lang['strshow']}{$lang['strcolumn']}{$lang['strtype']}{$lang['stroperator']}{$lang['strvalue']}
"; + echo "fields['attname']), "]\"", + isset($_REQUEST['show'][$attrs->fields['attname']]) ? ' checked="checked"' : '', " />", $misc->printVal($attrs->fields['attname']), "", $misc->printVal($data->formatType($attrs->fields['type'], $attrs->fields['atttypmod'])), ""; + echo "\n", $data->printField("values[{$attrs->fields['attname']}]", + $_REQUEST['values'][$attrs->fields['attname']], $attrs->fields['type']), "
\n"; + } + else echo "

{$lang['strinvalidparam']}

\n"; + + echo "

\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + if (!isset($_POST['show'])) $_POST['show'] = array(); + if (!isset($_POST['values'])) $_POST['values'] = array(); + if (!isset($_POST['nulls'])) $_POST['nulls'] = array(); + + // Verify that they haven't supplied a value for unary operators + foreach ($_POST['ops'] as $k => $v) { + if ($data->selectOps[$v] == 'p' && $_POST['values'][$k] != '') { + doSelectRows(true, $lang['strselectunary']); + return; + } + } + + if (sizeof($_POST['show']) == 0) + doSelectRows(true, $lang['strselectneedscol']); + else { + // Generate query SQL + $query = $data->getSelectSQL($_REQUEST['table'], array_keys($_POST['show']), + $_POST['values'], $_POST['ops']); + $_REQUEST['query'] = $query; + $_REQUEST['return_url'] = "tables.php?action=confselectrows&{$misc->href}&table={$_REQUEST['table']}"; + $_REQUEST['return_desc'] = $lang['strback']; + + $_no_output = true; + include('./display.php'); + exit; + } + } + } + + /** + * Ask for insert parameters and then actually insert row + */ + function doInsertRow($confirm, $msg = '') { + global $data, $misc, $conf; + global $lang; + + if ($confirm) { + $misc->printTrail('table'); + $misc->printTitle($lang['strinsertrow'], 'pg.sql.insert'); + $misc->printMsg($msg); + + $attrs = $data->getTableAttributes($_REQUEST['table']); + + if (($conf['autocomplete'] != 'disable')) { + $fksprops = $misc->getAutocompleteFKProperties($_REQUEST['table']); + if ($fksprops !== false) + echo $fksprops['code']; + } + else $fksprops = false; + + echo "
\n"; + if ($attrs->recordCount() > 0) { + echo "\n"; + + // Output table header + echo ""; + echo ""; + echo ""; + + $i = 0; + $fields = array(); + while (!$attrs->EOF) { + $fields[$attrs->fields['attnum']] = $attrs->fields['attname']; + $attrs->fields['attnotnull'] = $data->phpBool($attrs->fields['attnotnull']); + // Set up default value if there isn't one already + if (!isset($_REQUEST['values'][$attrs->fields['attnum']])) + $_REQUEST['values'][$attrs->fields['attnum']] = $attrs->fields['adsrc']; + // Default format to 'VALUE' if there is no default, + // otherwise default to 'EXPRESSION' + if (!isset($_REQUEST['format'][$attrs->fields['attnum']])) + $_REQUEST['format'][$attrs->fields['attnum']] = ($attrs->fields['adsrc'] === null) ? 'VALUE' : 'EXPRESSION'; + // Continue drawing row + $id = (($i % 2) == 0 ? '1' : '2'); + echo "\n"; + echo ""; + echo ""; + echo "\n"; + echo ""; + } + else { + echo " "; + } + echo "\n"; + echo "\n"; + $i++; + $attrs->moveNext(); + } + echo "
{$lang['strcolumn']}{$lang['strtype']}{$lang['strformat']}{$lang['strnull']}{$lang['strvalue']}
", $misc->printVal($attrs->fields['attname']), "\n"; + echo $misc->printVal($data->formatType($attrs->fields['type'], $attrs->fields['atttypmod'])); + echo "fields['attnum']}]\" value=\"", + htmlspecialchars($attrs->fields['type']), "\" />\n"; + echo "\n"; + // Output null box if the column allows nulls (doesn't look at CHECKs or ASSERTIONS) + if (!$attrs->fields['attnotnull']) { + echo "fields['attnum']}]\"", + isset($_REQUEST['nulls'][$attrs->fields['attnum']]) ? ' checked="checked"' : '', " />fields['attnum']}\" style=\"white-space:nowrap;\">"; + if (($fksprops !== false) && isset($fksprops['byfield'][$attrs->fields['attnum']])) { + echo $data->printField("values[{$attrs->fields['attnum']}]", $_REQUEST['values'][$attrs->fields['attnum']], 'fktype'/*force FK*/, + array( + 'id' => "attr_{$attrs->fields['attnum']}", + 'autocomplete' => 'off' + ) + ); + } + else { + echo $data->printField("values[{$attrs->fields['attnum']}]", $_REQUEST['values'][$attrs->fields['attnum']], $attrs->fields['type']); + } + echo "
\n"; + + if (!isset($_SESSION['counter'])) { $_SESSION['counter'] = 0; } + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + + if($fksprops !== false) { + if ($conf['autocomplete'] != 'default off') + echo "\n"; + else + echo "\n"; + } + echo "

\n"; + } + else { + echo "

{$lang['strnofieldsforinsert']}

\n"; + echo "\n"; + } + echo $misc->form; + echo "
\n"; + } + else { + if (!isset($_POST['values'])) $_POST['values'] = array(); + if (!isset($_POST['nulls'])) $_POST['nulls'] = array(); + $_POST['fields'] = unserialize(htmlspecialchars_decode($_POST['fields'], ENT_QUOTES)); + + if ($_SESSION['counter']++ == $_POST['protection_counter']) { + $status = $data->insertRow($_POST['table'], $_POST['fields'], $_POST['values'], + $_POST['nulls'], $_POST['format'], $_POST['types']); + if ($status == 0) { + if (isset($_POST['insert'])) + doDefault($lang['strrowinserted']); + else { + $_REQUEST['values'] = array(); + $_REQUEST['nulls'] = array(); + doInsertRow(true, $lang['strrowinserted']); + } + } + else + doInsertRow(true, $lang['strrowinsertedbad']); + } else + doInsertRow(true, $lang['strrowduplicate']); + } + + } + + /** + * Show confirmation of empty and perform actual empty + */ + function doEmpty($confirm) { + global $data, $misc; + global $lang; + + if (empty($_REQUEST['table']) && empty($_REQUEST['ma'])) { + doDefault($lang['strspecifytabletoempty']); + exit(); + } + + if ($confirm) { + if (isset($_REQUEST['ma'])) { + $misc->printTrail('schema'); + $misc->printTitle($lang['strempty'],'pg.table.empty'); + + echo "
\n"; + foreach ($_REQUEST['ma'] as $v) { + $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES)); + echo "

", sprintf($lang['strconfemptytable'], $misc->printVal($a['table'])), "

\n"; + printf('', htmlspecialchars($a['table'])); + } + } // END mutli empty + else { + $misc->printTrail('table'); + $misc->printTitle($lang['strempty'],'pg.table.empty'); + + echo "

", sprintf($lang['strconfemptytable'], $misc->printVal($_REQUEST['table'])), "

\n"; + + echo "\n"; + echo "\n"; + } // END not mutli empty + + echo "\n"; + echo $misc->form; + echo " \n"; + echo "
\n"; + } // END if confirm + else { // Do Empty + if (is_array($_REQUEST['table'])) { + $msg=''; + foreach($_REQUEST['table'] as $t) { + $status = $data->emptyTable($t); + if ($status == 0) + $msg.= sprintf('%s: %s
', htmlentities($t), $lang['strtableemptied']); + else { + doDefault(sprintf('%s%s: %s
', $msg, htmlentities($t), $lang['strtableemptiedbad'])); + return; + } + } + doDefault($msg); + } // END mutli empty + else { + $status = $data->emptyTable($_POST['table']); + if ($status == 0) + doDefault($lang['strtableemptied']); + else + doDefault($lang['strtableemptiedbad']); + } // END not mutli empty + } // END do Empty + } + + /** + * Show confirmation of drop and perform actual drop + */ + function doDrop($confirm) { + global $data, $misc; + global $lang, $_reload_browser; + + if (empty($_REQUEST['table']) && empty($_REQUEST['ma'])) { + doDefault($lang['strspecifytabletodrop']); + exit(); + } + + if ($confirm) { + //If multi drop + if (isset($_REQUEST['ma'])) { + + $misc->printTrail('schema'); + $misc->printTitle($lang['strdrop'], 'pg.table.drop'); + + echo "
\n"; + foreach($_REQUEST['ma'] as $v) { + $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES)); + echo "

", sprintf($lang['strconfdroptable'], $misc->printVal($a['table'])), "

\n"; + printf('', htmlspecialchars($a['table'])); + } + } else { + + $misc->printTrail('table'); + $misc->printTitle($lang['strdrop'], 'pg.table.drop'); + + echo "

", sprintf($lang['strconfdroptable'], $misc->printVal($_REQUEST['table'])), "

\n"; + + echo "\n"; + echo "\n"; + }// END if multi drop + + echo "\n"; + echo $misc->form; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + } // END confirm + else { + //If multi drop + if (is_array($_REQUEST['table'])) { + $msg=''; + $status = $data->beginTransaction(); + if ($status == 0) { + foreach($_REQUEST['table'] as $t) { + $status = $data->dropTable($t, isset($_POST['cascade'])); + if ($status == 0) + $msg.= sprintf('%s: %s
', htmlentities($t), $lang['strtabledropped']); + else { + $data->endTransaction(); + doDefault(sprintf('%s%s: %s
', $msg, htmlentities($t), $lang['strtabledroppedbad'])); + return; + } + } + } + if($data->endTransaction() == 0) { + // Everything went fine, back to the Default page.... + $_reload_browser = true; + doDefault($msg); + } + else doDefault($lang['strtabledroppedbad']); + } else { + $status = $data->dropTable($_POST['table'], isset($_POST['cascade'])); + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['strtabledropped']); + } + else + doDefault($lang['strtabledroppedbad']); + } + } // END DROP + }// END Function + + /** + * Show default list of tables in the database + */ + function doDefault($msg = '') { + global $data, $conf, $misc, $data; + global $lang; + + $misc->printTrail('schema'); + $misc->printTabs('schema','tables'); + $misc->printMsg($msg); + + $tables = $data->getTables(); + + $columns = array( + 'table' => array( + 'title' => $lang['strtable'], + 'field' => field('relname'), + 'url' => "redirect.php?subject=table&{$misc->href}&", + 'vars' => array('table' => 'relname'), + ), + 'owner' => array( + 'title' => $lang['strowner'], + 'field' => field('relowner'), + ), + 'tablespace' => array( + 'title' => $lang['strtablespace'], + 'field' => field('tablespace') + ), + 'tuples' => array( + 'title' => $lang['strestimatedrowcount'], + 'field' => field('reltuples'), + 'type' => 'numeric' + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('relcomment'), + ), + ); + + $actions = array( + 'multiactions' => array( + 'keycols' => array('table' => 'relname'), + 'url' => 'tables.php', + 'default' => 'analyze', + ), + 'browse' => array( + 'title' => $lang['strbrowse'], + 'url' => "display.php?{$misc->href}&subject=table&return_url=".urlencode("tables.php?{$misc->href}")."&return_desc=".urlencode($lang['strback'])."&", + 'vars' => array('table' => 'relname'), + ), + 'select' => array( + 'title' => $lang['strselect'], + 'url' => "tables.php?action=confselectrows&{$misc->href}&", + 'vars' => array('table' => 'relname'), + ), + 'insert' => array( + 'title' => $lang['strinsert'], + 'url' => "tables.php?action=confinsertrow&{$misc->href}&", + 'vars' => array('table' => 'relname'), + ), + 'empty' => array( + 'title' => $lang['strempty'], + 'url' => "tables.php?action=confirm_empty&{$misc->href}&", + 'vars' => array('table' => 'relname'), + 'multiaction' => 'confirm_empty', + ), + 'alter' => array( + 'title' => $lang['stralter'], + 'url' => "tblproperties.php?action=confirm_alter&{$misc->href}&", + 'vars' => array('table' => 'relname'), + ), + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "tables.php?action=confirm_drop&{$misc->href}&", + 'vars' => array('table' => 'relname'), + 'multiaction' => 'confirm_drop', + ), + 'vacuum' => array( + 'title' => $lang['strvacuum'], + 'url' => "tables.php?action=confirm_vacuum&{$misc->href}&", + 'vars' => array('table' => 'relname'), + 'multiaction' => 'confirm_vacuum', + ), + 'analyze' => array( + 'title' => $lang['stranalyze'], + 'url' => "tables.php?action=confirm_analyze&{$misc->href}&", + 'vars' => array('table' => 'relname'), + 'multiaction' => 'confirm_analyze', + ), + 'reindex' => array( + 'title' => $lang['strreindex'], + 'url' => "tables.php?action=confirm_reindex&{$misc->href}&", + 'vars' => array('table' => 'relname'), + 'multiaction' => 'confirm_reindex', + ), + //'cluster' TODO ? + ); + + if (!$data->hasTablespaces()) unset($columns['tablespace']); + + $misc->printTable($tables, $columns, $actions, $lang['strnotables']); + + echo "\n"; + } + + require('./admin.php'); + + /** + * Generate XML for the browser tree. + */ + function doTree() { + global $misc, $data; + + $tables = $data->getTables(); + + $reqvars = $misc->getRequestVars('table'); + + $attrs = array( + 'text' => field('relname'), + 'icon' => 'Table', + 'iconAction' => url('display.php', + $reqvars, + array('table' => field('relname')) + ), + 'toolTip'=> field('relcomment'), + 'action' => url('redirect.php', + $reqvars, + array('table' => field('relname')) + ), + 'branch' => url('tables.php', + $reqvars, + array ( + 'action' => 'subtree', + 'table' => field('relname') + ) + ) + ); + + $misc->printTreeXML($tables, $attrs); + exit; + } + + function doSubTree() { + global $misc, $data; + + $tabs = $misc->getNavTabs('table'); + $items = $misc->adjustTabsForTree($tabs); + $reqvars = $misc->getRequestVars('table'); + + $attrs = array( + 'text' => noEscape(field('title')), + 'icon' => field('icon'), + 'action' => url( + field('url'), + $reqvars, + field('urlvars'), + array('table' => $_REQUEST['table']) + ), + 'branch' => ifempty( + field('branch'), '', url( + field('url'), + $reqvars, + array( + 'action' => 'tree', + 'table' => $_REQUEST['table'] + ) + ) + ), + ); + + $misc->printTreeXML($items, $attrs); + exit; + } + + if ($action == 'tree') doTree(); + if ($action == 'subtree') dosubTree(); + + $misc->printHeader($lang['strtables']); + $misc->printBody(); + + switch ($action) { + case 'create': + if (isset($_POST['cancel'])) doDefault(); + else doCreate(); + break; + case 'createlike': + doCreateLike(false); + break; + case 'confcreatelike': + if (isset($_POST['cancel'])) doDefault(); + else doCreateLike(true); + break; + case 'selectrows': + if (!isset($_POST['cancel'])) doSelectRows(false); + else doDefault(); + break; + case 'confselectrows': + doSelectRows(true); + break; + case 'insertrow': + if (!isset($_POST['cancel'])) doInsertRow(false); + else doDefault(); + break; + case 'confinsertrow': + doInsertRow(true); + break; + case 'empty': + if (isset($_POST['empty'])) doEmpty(false); + else doDefault(); + break; + case 'confirm_empty': + doEmpty(true); + break; + case 'drop': + if (isset($_POST['drop'])) doDrop(false); + else doDefault(); + break; + case 'confirm_drop': + doDrop(true); + break; + default: + if (adminActions($action, 'table') === false) doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/tablespaces.php b/php/pgadmin/tablespaces.php new file mode 100644 index 0000000..5e2ffb7 --- /dev/null +++ b/php/pgadmin/tablespaces.php @@ -0,0 +1,295 @@ +printTrail('tablespace'); + $misc->printTitle($lang['stralter'],'pg.tablespace.alter'); + $misc->printMsg($msg); + + // Fetch tablespace info + $tablespace = $data->getTablespace($_REQUEST['tablespace']); + // Fetch all users + $users = $data->getUsers(); + + if ($tablespace->recordCount() > 0) { + + if (!isset($_POST['name'])) $_POST['name'] = $tablespace->fields['spcname']; + if (!isset($_POST['owner'])) $_POST['owner'] = $tablespace->fields['spcowner']; + if (!isset($_POST['comment'])) { + $_POST['comment'] = ($data->hasSharedComments()) ? $tablespace->fields['spccomment'] : ''; + } + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + if ($data->hasSharedComments()){ + echo "\n"; + echo "\n"; + } + echo "
{$lang['strname']}"; + echo "_maxNameLen}\" value=\"", + htmlspecialchars($_POST['name']), "\" />
{$lang['strowner']}
{$lang['strcomment']}"; + echo "
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + } + + /** + * Function to save after altering a tablespace + */ + function doSaveAlter() { + global $data, $lang; + + // Check data + if (trim($_POST['name']) == '') + doAlter($lang['strtablespaceneedsname']); + else { + $status = $data->alterTablespace($_POST['tablespace'], $_POST['name'], $_POST['owner'], $_POST['comment']); + if ($status == 0) { + // If tablespace has been renamed, need to change to the new name + if ($_POST['tablespace'] != $_POST['name']) { + // Jump them to the new table name + $_REQUEST['tablespace'] = $_POST['name']; + } + doDefault($lang['strtablespacealtered']); + } + else + doAlter($lang['strtablespacealteredbad']); + } + } + + /** + * Show confirmation of drop and perform actual drop + */ + function doDrop($confirm) { + global $data, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('tablespace'); + $misc->printTitle($lang['strdrop'],'pg.tablespace.drop'); + + echo "

", sprintf($lang['strconfdroptablespace'], $misc->printVal($_REQUEST['tablespace'])), "

\n"; + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $data->droptablespace($_REQUEST['tablespace']); + if ($status == 0) + doDefault($lang['strtablespacedropped']); + else + doDefault($lang['strtablespacedroppedbad']); + } + } + + /** + * Displays a screen where they can enter a new tablespace + */ + function doCreate($msg = '') { + global $data, $misc, $spcname; + global $lang; + + $server_info = $misc->getServerInfo(); + + if (!isset($_POST['formSpcname'])) $_POST['formSpcname'] = ''; + if (!isset($_POST['formOwner'])) $_POST['formOwner'] = $server_info['username']; + if (!isset($_POST['formLoc'])) $_POST['formLoc'] = ''; + if (!isset($_POST['formComment'])) $_POST['formComment'] = ''; + + // Fetch all users + $users = $data->getUsers(); + + $misc->printTrail('server'); + $misc->printTitle($lang['strcreatetablespace'],'pg.tablespace.create'); + $misc->printMsg($msg); + + echo "
\n"; + echo $misc->form; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + // Comments (if available) + if ($data->hasSharedComments()) { + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + } + echo "
{$lang['strname']}_maxNameLen}\" value=\"", htmlspecialchars($_POST['formSpcname']), "\" />
{$lang['strowner']}
{$lang['strlocation']}
{$lang['strcomment']}
\n"; + echo "

\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + + /** + * Actually creates the new tablespace in the cluster + */ + function doSaveCreate() { + global $data; + global $lang; + + // Check data + if (trim($_POST['formSpcname']) == '') + doCreate($lang['strtablespaceneedsname']); + elseif (trim($_POST['formLoc']) == '') + doCreate($lang['strtablespaceneedsloc']); + else { + // Default comment to blank if it isn't set + if (!isset($_POST['formComment'])) $_POST['formComment'] = null; + + $status = $data->createTablespace($_POST['formSpcname'], $_POST['formOwner'], $_POST['formLoc'], $_POST['formComment']); + if ($status == 0) + doDefault($lang['strtablespacecreated']); + else + doCreate($lang['strtablespacecreatedbad']); + } + } + + /** + * Show default list of tablespaces in the cluster + */ + function doDefault($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('server'); + $misc->printTabs('server','tablespaces'); + $misc->printMsg($msg); + + $tablespaces = $data->getTablespaces(); + + $columns = array( + 'database' => array( + 'title' => $lang['strname'], + 'field' => field('spcname') + ), + 'owner' => array( + 'title' => $lang['strowner'], + 'field' => field('spcowner') + ), + 'location' => array( + 'title' => $lang['strlocation'], + 'field' => field('spclocation') + ), + 'actions' => array( + 'title' => $lang['stractions'] + ) + ); + + if ($data->hasSharedComments()) { + $columns['comment'] = array( + 'title' => $lang['strcomment'], + 'field' => field('spccomment'), + ); + } + + + + $actions = array( + 'alter' => array( + 'title' => $lang['stralter'], + 'url' => "tablespaces.php?action=edit&{$misc->href}&", + 'vars' => array('tablespace' => 'spcname') + ), + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "tablespaces.php?action=confirm_drop&{$misc->href}&", + 'vars' => array('tablespace' => 'spcname') + ), + 'privileges' => array( + 'title' => $lang['strprivileges'], + 'url' => "privileges.php?subject=tablespace&{$misc->href}&", + 'vars' => array('tablespace' => 'spcname') + ) + ); + + $misc->printTable($tablespaces, $columns, $actions, $lang['strnotablespaces']); + + echo "

href}\">{$lang['strcreatetablespace']}

\n"; + + } + + $misc->printHeader($lang['strtablespaces']); + $misc->printBody(); + + switch ($action) { + case 'save_create': + if (isset($_REQUEST['cancel'])) doDefault(); + else doSaveCreate(); + break; + case 'create': + doCreate(); + break; + case 'drop': + if (isset($_REQUEST['cancel'])) doDefault(); + else doDrop(false); + break; + case 'confirm_drop': + doDrop(true); + break; + case 'save_edit': + if (isset($_REQUEST['cancel'])) doDefault(); + else doSaveAlter(); + break; + case 'edit': + doAlter(); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/tblproperties.php b/php/pgadmin/tblproperties.php new file mode 100644 index 0000000..2b98efc --- /dev/null +++ b/php/pgadmin/tblproperties.php @@ -0,0 +1,622 @@ +alterTable($_POST['table'], $_POST['name'], $_POST['owner'], $_POST['newschema'], $_POST['comment'], $_POST['tablespace']); + if ($status == 0) { + // If table has been renamed, need to change to the new name and + // reload the browser frame. + if ($_POST['table'] != $_POST['name']) { + // Jump them to the new table name + $_REQUEST['table'] = $_POST['name']; + // Force a browser reload + $_reload_browser = true; + } + // If schema has changed, need to change to the new schema and reload the browser + if (!empty($_POST['newschema']) && ($_POST['newschema'] != $data->_schema)) { + // Jump them to the new sequence schema + $misc->setCurrentSchema($_POST['newschema']); + $_reload_browser = true; + } + doDefault($lang['strtablealtered']); + } + else + doAlter($lang['strtablealteredbad']); + } + + /** + * Function to allow altering of a table + */ + function doAlter($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('table'); + $misc->printTitle($lang['stralter'], 'pg.table.alter'); + $misc->printMsg($msg); + + // Fetch table info + $table = $data->getTable($_REQUEST['table']); + // Fetch all users + $users = $data->getUsers(); + // Fetch all tablespaces from the database + if ($data->hasTablespaces()) $tablespaces = $data->getTablespaces(true); + + if ($table->recordCount() > 0) { + + if (!isset($_POST['name'])) $_POST['name'] = $table->fields['relname']; + if (!isset($_POST['owner'])) $_POST['owner'] = $table->fields['relowner']; + if (!isset($_POST['newschema'])) $_POST['newschema'] = $table->fields['nspname']; + if (!isset($_POST['comment'])) $_POST['comment'] = $table->fields['relcomment']; + if ($data->hasTablespaces() && !isset($_POST['tablespace'])) $_POST['tablespace'] = $table->fields['tablespace']; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + $server_info = $misc->getServerInfo(); + if ($data->isSuperUser($server_info['username'])) { + echo "\n"; + echo "\n"; + } + + if ($data->hasAlterTableSchema()) { + $schemas = $data->getSchemas(); + echo "\n"; + echo "\n"; + } + + // Tablespace (if there are any) + if ($data->hasTablespaces() && $tablespaces->recordCount() > 0) { + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + } + + echo "\n"; + echo "\n"; + echo "
{$lang['strname']}"; + echo "_maxNameLen}\" value=\"", + htmlspecialchars($_POST['name'], ENT_QUOTES), "\" />
{$lang['strowner']}
{$lang['strschema']}
{$lang['strtablespace']}\n\t\t\t\n\t\t
{$lang['strcomment']}"; + echo "
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + } + + function doExport($msg = '') { + global $data, $misc; + global $lang; + + // Determine whether or not the table has an object ID + $hasID = $data->hasObjectID($_REQUEST['table']); + + $misc->printTrail('table'); + $misc->printTabs('table','export'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\n"; + // Data only + echo "\n"; + echo "\n"; + echo "\n\n"; + if ($hasID) { + echo "\n\n"; + } + // Structure only + echo "\n"; + echo "\n\n"; + // Structure and data + echo "\n"; + echo "\n"; + echo "\n\n"; + echo "\n\n"; + if ($hasID) { + echo "\n\n"; + } + echo "
{$lang['strformat']}{$lang['stroptions']}
"; + echo "{$lang['strformat']}\n
"; + echo "{$lang['strformat']}\n
\n"; + + echo "

{$lang['stroptions']}

\n"; + echo "

\n"; + echo "

\n"; + + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + + function doImport($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('table'); + $misc->printTabs('table','import'); + $misc->printMsg($msg); + + // Check that file uploads are enabled + if (ini_get('file_uploads')) { + // Don't show upload option if max size of uploads is zero + $max_size = $misc->inisizeToBytes(ini_get('upload_max_filesize')); + if (is_double($max_size) && $max_size > 0) { + echo "
\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "
{$lang['strformat']}
{$lang['strallowednulls']}
\n"; + echo "\t\t
\n"; + echo "\t\t
{$lang['strfile']}"; + echo "
\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + } + else echo "

{$lang['strnouploads']}

\n"; + } + + /** + * Displays a screen where they can add a column + */ + function doAddColumn($msg = '') { + global $data, $misc, $_reload_browser; + global $lang; + + if (!isset($_REQUEST['stage'])) $_REQUEST['stage'] = 1; + + switch ($_REQUEST['stage']) { + case 1: + // Set variable defaults + if (!isset($_POST['field'])) $_POST['field'] = ''; + if (!isset($_POST['type'])) $_POST['type'] = ''; + if (!isset($_POST['array'])) $_POST['array'] = ''; + if (!isset($_POST['length'])) $_POST['length'] = ''; + if (!isset($_POST['default'])) $_POST['default'] = ''; + if (!isset($_POST['comment'])) $_POST['comment'] = ''; + + // Fetch all available types + $types = $data->getTypes(true, false, true); + $types_for_js = array(); + + $misc->printTrail('table'); + $misc->printTitle($lang['straddcolumn'], 'pg.column.add'); + $misc->printMsg($msg); + + echo ""; + echo "
\n"; + + // Output table header + echo "\n"; + echo "\n\n"; + echo "\n"; + if ($data->hasCreateFieldWithConstraints()) + echo "\n\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + // Output array type selector + echo "\n"; + $predefined_size_types = array_intersect($data->predefined_size_types, $types_for_js); + $escaped_predef_types = array(); // the JS escaped array elements + foreach($predefined_size_types as $value) { + $escaped_predef_types[] = "'{$value}'"; + } + + echo "\n"; + // Support for adding column with not null and default + if ($data->hasCreateFieldWithConstraints()) { + echo "\n"; + echo "\n"; + } + echo "\n"; + echo "
{$lang['strname']}{$lang['strtype']}{$lang['strlength']}{$lang['strnotnull']}{$lang['strdefault']}{$lang['strcomment']}
_maxNameLen}\" value=\"", + htmlspecialchars($_POST['field']), "\" />
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + if (!$data->hasCreateFieldWithConstraints()) { + echo "\n"; + } + echo "\n"; + echo "

\n"; + echo "
\n"; + echo "\n"; + break; + case 2: + // Check inputs + if (trim($_POST['field']) == '') { + $_REQUEST['stage'] = 1; + doAddColumn($lang['strcolneedsname']); + return; + } + if (!isset($_POST['length'])) $_POST['length'] = ''; + $status = $data->addColumn($_POST['table'], $_POST['field'], + $_POST['type'], $_POST['array'] != '', $_POST['length'], isset($_POST['notnull']), + $_POST['default'], $_POST['comment']); + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['strcolumnadded']); + } + else { + $_REQUEST['stage'] = 1; + doAddColumn($lang['strcolumnaddedbad']); + return; + } + break; + default: + echo "

{$lang['strinvalidparam']}

\n"; + } + } + + /** + * Show confirmation of drop column and perform actual drop + */ + function doDrop($confirm) { + global $data, $database, $misc, $_reload_browser; + global $lang; + + if ($confirm) { + $misc->printTrail('column'); + $misc->printTitle($lang['strdrop'], 'pg.column.drop'); + + echo "

", sprintf($lang['strconfdropcolumn'], $misc->printVal($_REQUEST['column']), + $misc->printVal($_REQUEST['table'])), "

\n"; + + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $data->dropColumn($_POST['table'], $_POST['column'], isset($_POST['cascade'])); + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['strcolumndropped']); + } + else + doDefault($lang['strcolumndroppedbad']); + } + + } + + function doTree() { + global $misc, $data; + + $columns = $data->getTableAttributes($_REQUEST['table']); + $reqvars = $misc->getRequestVars('column'); + + $attrs = array ( + 'text' => field('attname'), + 'action' => url('colproperties.php', + $reqvars, + array( + 'table' => $_REQUEST['table'], + 'column' => field('attname') + ) + ), + 'icon' => 'Column', + 'iconAction' => url('display.php', + $reqvars, + array( + 'table' => $_REQUEST['table'], + 'column' => field('attname'), + 'query' => replace( + 'SELECT "%column%", count(*) AS "count" FROM "%table%" GROUP BY "%column%" ORDER BY "%column%"', + array ( + '%column%' => field('attname'), + '%table%' => $_REQUEST['table'] + ) + ) + ) + ), + 'toolTip'=> field('comment') + ); + + $misc->printTreeXML($columns, $attrs); + + exit; + } + + if ($action == 'tree') doTree(); + + /** + * Show default list of columns in the table + */ + function doDefault($msg = '') { + global $data, $conf, $misc; + global $lang; + + function attPre(&$rowdata, $actions) { + global $data; + $rowdata->fields['+type'] = $data->formatType($rowdata->fields['type'], $rowdata->fields['atttypmod']); + $attname = $rowdata->fields['attname']; + $table = $_REQUEST['table']; + $data->fieldClean($attname); + $data->fieldClean($table); + + $actions['browse']['url'] .= 'query=' . urlencode("SELECT \"{$attname}\", count(*) AS \"count\" + FROM \"{$table}\" GROUP BY \"{$attname}\" ORDER BY \"{$attname}\"") . '&'; + return $actions; + } + + $misc->printTrail('table'); + $misc->printTabs('table','columns'); + $misc->printMsg($msg); + + // Get table + $tdata = $data->getTable($_REQUEST['table']); + // Get columns + $attrs = $data->getTableAttributes($_REQUEST['table']); + // Get constraints keys + $ck = $data->getConstraintsWithFields($_REQUEST['table']); + + // Show comment if any + if ($tdata->fields['relcomment'] !== null) + echo '

', $misc->printVal($tdata->fields['relcomment']), "

\n"; + + $columns = array( + 'column' => array( + 'title' => $lang['strcolumn'], + 'field' => field('attname'), + 'url' => "colproperties.php?subject=column&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", + 'vars' => array('column' => 'attname'), + ), + 'type' => array( + 'title' => $lang['strtype'], + 'field' => field('+type'), + ), + 'notnull' => array( + 'title' => $lang['strnotnull'], + 'field' => field('attnotnull'), + 'type' => 'bool', + 'params'=> array('true' => 'NOT NULL', 'false' => ''), + ), + 'default' => array( + 'title' => $lang['strdefault'], + 'field' => field('adsrc'), + ), + 'keyprop' => array( + 'title' => $lang['strconstraints'], + 'field' => field('attname'), + 'type' => 'callback', + 'params'=> array( + 'function' => 'cstrRender', + 'keys' => $ck->getArray() + ) + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('comment'), + ), + ); + + function cstrRender($s, $p) { + global $misc, $data; + + $str =''; + foreach ($p['keys'] as $k => $c) { + + if (is_null($p['keys'][$k]['consrc'])) { + $atts = $data->getAttributeNames($_REQUEST['table'], explode(' ', $p['keys'][$k]['indkey'])); + $c['consrc'] = ($c['contype'] == 'u' ? "UNIQUE (" : "PRIMARY KEY (") . join(',', $atts) . ')'; + } + + if ($c['p_field'] == $s) + switch ($c['contype']) { + case 'p': + $str .= 'icon('PrimaryKey') .'" alt="[pk]" title="'. htmlentities($c['consrc']) .'" />'; + break; + case 'f': + $str .= 'icon('ForeignKey') .'" alt="[fk]" title="'. htmlentities($c['consrc']) .'" />'; + break; + case 'u': + $str .= 'icon('UniqueConstraint') .'" alt="[uniq]" title="'. htmlentities($c['consrc']) .'" />'; + break; + case 'c': + $str .= 'icon('CheckConstraint') .'" alt="[check]" title="'. htmlentities($c['consrc']) .'" />'; + } + } + + return $str; + } + + $return_url = urlencode("tblproperties.php?{$misc->href}&table=". urlencode($_REQUEST['table'])); + + $actions = array( + 'browse' => array( + 'title' => $lang['strbrowse'], + 'url' => "display.php?{$misc->href}&subject=column&return_url={$return_url}&table=".urlencode($_REQUEST['table'])."&return_desc=" . urlencode($lang['strback']) . '&', + 'vars' => array('column' => 'attname'), + ), + 'alter' => array( + 'title' => $lang['stralter'], + 'url' => "colproperties.php?action=properties&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", + 'vars' => array('column' => 'attname'), + ), + 'privileges' => array( + 'title' => $lang['strprivileges'], + 'url' => "privileges.php?subject=column&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", + 'vars' => array('column' => 'attname'), + ), + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "tblproperties.php?action=confirm_drop&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", + 'vars' => array('column' => 'attname'), + ), + ); + + $misc->printTable($attrs, $columns, $actions, null, 'attPre'); + + echo "\n"; + } + + $misc->printHeader($lang['strtables'] . ' - ' . $_REQUEST['table']); + $misc->printBody(); + + switch ($action) { + case 'alter': + if (isset($_POST['alter'])) doSaveAlter(); + else doDefault(); + break; + case 'confirm_alter': + doAlter(); + break; + case 'import': + doImport(); + break; + case 'export': + doExport(); + break; + case 'add_column': + if (isset($_POST['cancel'])) doDefault(); + else doAddColumn(); + break; + case 'properties': + if (isset($_POST['cancel'])) doDefault(); + else doProperties(); + break; + case 'drop': + if (isset($_POST['drop'])) doDrop(false); + else doDefault(); + break; + case 'confirm_drop': + doDrop(true); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/themes/cappuccino/global.css b/php/pgadmin/themes/cappuccino/global.css new file mode 100644 index 0000000..de6b77c --- /dev/null +++ b/php/pgadmin/themes/cappuccino/global.css @@ -0,0 +1,189 @@ +@import url(../global.css); +/** + * cappuccino style sheet + */ +/* ELEMENTS */ +body { + background-color: #ded9c9; + margin: 0; + padding: 0; + font-family: arial; + font-size: 0.9em; /*0.8em;*/ +} +body > * { margin-left: 20px } +body.browser { + background-color: #363330; + font-size: 0.9em; + border-right: 1px dashed #887f5c; + color: #fff; +} +body.browser > * { margin: 0 } +body.browser div.webfx-tree-row:hover { background: #524a42} +div.logo { + margin: 0px; + padding: 0px; + border: none; + margin-bottom: 15px; +} +h1 {font-size: 1.5em} +h2 { + color: #fff; + font-size: 1em; + font-weight: bold; + border: 2px solid #363330; + background-color: #363330; + padding: 2px 1em; + margin-top: 2em; + margin-bottom: 2em; +} +h3 { + color: #111; + font-weight: bold; +} +table { + border: 0; + border-collapse: collapse; +} +td, th { + padding: 1px 8px; +} +a { + color: #2d547b; + text-decoration: none; +} +a:hover { + color: #cc0000; + text-decoration: underline; +} +input[type=checkbox], input[type=password], input[type=text], input[type=radio] { + background: #ded4b3; + border: 1px solid #887f5c; +} +input[type=submit], input[type=button], select { + background: #c4ba95 url('../../images/themes/cappuccino/inputbckg.png') repeat-x top left; + border: 1px solid #887f5c; +} +table.error { + background-color: #dec9d0; + border: 2px solid #de7c9c; + margin: auto; +} +th.data { + color: #fff; + background-color: #363330; + border: 1px dotted #887f5c; + font-size: 0.9em; + padding: 3px 7px; +} +th.required {text-decoration: underline} +.topbar, .trail { + color: #fff; + background-color: #363330; + margin: 0; + padding: 0; + text-align: left; +} +.topbar a, .trail a, body.browser a, th.data a { + color: #a8aac2; +} +.topbar .platform, .topbar .host, .topbar .username { + font-weight: bold; +} +.topbar, .trail, .tab { + padding: 2px 1ex; +} +.trail td {padding: 2px} +.crumb .icon {margin-right: 5px} +table.tabs { + width: 100%; + border-collapse: collapse; + margin: 20px 0 40px 0; +} +.tab { + text-align: center; + vertical-align: top; + font-size: 0.8em; + border: 1px solid #887f5c; + background-color: #c8c0a2; + padding: 2px 10px; + white-space: nowrap; +} +.tab:hover {background-color: #b7af8d} +.tabs .active { + border-bottom: none; + background-color: #ded9c9; +} +.tab .icon { + display: block; +} +.active a {font-weight: bold} +a:hover {text-decoration: underline} +ul.toplink, ul.navlink { + list-style: none; + margin:0;padding:0; +} +ul.navlink{margin:20px 0 20px 20px} +ul.toplink li, ul.navlink li { + display:inline; + border-left:1px solid #000000; + margin:0;padding: 0 2px 0 5px; +} +ul.toplink li:first-child, ul.navlink li:first-child { + border: none; + padding-left:0; +} +tr.data1, tr.data2, tr.data3 { + color: #000000; + font-size: 0.8em; + border: 1px dotted #887f5c; +} +tr.data1:hover, tr.data2:hover, tr.data3:hover { + background-color: #c8c0a2; +} +.row1, .data1 { + background-color: #d8d2b9; + text-align: left; +} +.row2, .data2 { + background-color: #ded9c9; + text-align: left; +} +.row3, .data3 {background-color: #d4c8a1} +td.opbutton1, td.opbutton2 { + color: #000000; + cursor: pointer; + padding: 2px 6px; + text-align: center; + border: 1px dotted #887f5c; +} +td.opbutton1:hover, td.opbutton2:hover { + background-color: #b7af8d; +} +a.help { + color: #A46600; + vertical-align: super; + text-decoration: none; + font-size: 0.8em; +} +pre {font-size: 110%} +pre.data {font-size: 100%} +pre.error {font-size: 120%} + +.intro li {font-weight: bold} +.ac_field { + border:1px solid #363330; + background: url('../../images/themes/cappuccino/openListe.png') no-repeat right; + padding-right: 20px; +} +.bottom_link { + background: #b7af8d; + border-top: 1px dotted #887f5c; + border-left: 1px dotted #887f5c; +} + +/** FK browsing **/ +div.fk { + background: #fff; + border-left: 1px dotted #000; + padding: 5px; +} diff --git a/php/pgadmin/themes/default/global.css b/php/pgadmin/themes/default/global.css new file mode 100644 index 0000000..8281ba7 --- /dev/null +++ b/php/pgadmin/themes/default/global.css @@ -0,0 +1,258 @@ +@import url(../global.css); +/** + * Default style sheet + */ + +/** ELEMENTS */ +body { + background-color: #FFFFFF; + margin: 4px; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + padding: 0px; + font-size: smaller; /*0.8em;*/ +} +div.logo { + background-color: #CECF9C; + margin: 0px; + padding: 0px; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + font-size: smaller; /* 1em; */ + border: none; + border-bottom: 2px solid #000000; + margin-bottom: 2px; +} +body.browser { + background-color: #efefef; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + font-size: smaller; /*1em;*/ + border-right: 1px dashed #c0c0c0; +} +body.bottombar { + background-color: #CECF9C; + margin: 0px; + padding: 0px; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + font-size: smaller; /*1em;*/ + text-align: left; +} +h2 { + color: #666633; + font-size: medium; /*1.3em;*/ + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + font-weight: bold; + border: 2px solid #E6E6CC; + background-color: #F3F3E9; + padding: 2px 1em; + margin: 0 0 1ex 0; +} +h3 { + color: #666633; + font-size: small; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + font-weight: bold; +} +table.error {background-color: #E6E6CC} +table.error td {background-color: #E6E6CC} +table.navbar {background-color: #E6E6CC} +table.navbar td { + height: 25px; + color: #000000; + background-color: #F3F3E9; + text-align: center; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + font-size: smaller; /* 0.9em */ + font-weight: bold; +} +table.navbar td.active {background-color: #E6E6CC} +th.data { + color: #000000; + background-color: #E6E6CC; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + font-size: smaller; /* 0.9em */ +} +th.data a:active, th.data a:link, th.data a:visited, th.data a:hover { + font-weight: bold; +} +td.dat { + color: #ff0; + text-align: center; +} +th.required {text-decoration: underline} +td.topbar { + background-color: #CECF9C; + margin: 0px 0px; + padding: 0px; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + font-size: smaller; /*0.8em;*/ + text-align: left; +} +ul.toplink,ul.navlink { + list-style: none; + margin:0;padding:0; +} +ul.navlink{margin:20px 0} +ul.toplink li, ul.navlink li { + display:inline; + border-left:1px solid #000000; + margin:0;padding: 0 2px 0 5px; +} +ul.toplink li:first-child, ul.navlink li:first-child { + border: none; + padding-left:0; +} +tr.data1, tr.data2, tr.data3 { + color: #000000; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + font-size: smaller; /*0.8em;*/ +} +tr.data1:hover, tr.data2:hover, tr.data3:hover { + background-color: #DDD; +} +.row1, .data1 { + background-color: #F3F3E9; + text-align: left; +} +.row2, .data2 { + background-color: #E6E6CC; + text-align: left; +} +.row3, .data3 {background-color: #F3F3E9} +td.opbutton1 { + color: #000000; + border-top: 1px solid #FFFFFF; + border-right: 1px solid #706D41; + border-bottom: 1px solid #706D41; + border-left: 1px solid #FFFFFF; + cursor: pointer; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + font-size: smaller; /*0.8em;*/ + padding-left: 6px; + padding-right: 6px; + text-align: center; +} +td.opbutton2 { + color: #000000; + border-top: 1px solid #FFFFFF; + border-right: 1px solid #706D41; + border-bottom: 1px solid #706D41; + border-left: 1px solid #FFFFFF; + cursor: pointer; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + font-size: smaller; /*0.8em;*/ + padding-left: 6px; + padding-right: 6px; + text-align: center; +} +.topbar {border: 2px solid #CECF9C} +.topbar, .topbar * { + background-color: #CECF9C; +} +.topbar .platform, .topbar .host, .topbar .username { + font-weight: bold; +} +.topbar, .trail { + margin-bottom: 2px; +} +.topbar, .trail, .tab { + padding: 2px 1ex; + font-size: smaller; +} +.trail, .tab { + border: 2px solid #E6E6CC; + background-color: #F3F3E9; +} +.trail .crumb {background-color: #F3F3E9} +.crumb, .tab { + vertical-align: top; +} +.crumb .icon { + vertical-align: middle; + margin: 0 2px; +} +table.tabs { + width: 100%; + border-collapse: collapse; + margin-bottom: 1ex; +} +.tab {text-align: center} +.tabs .active {background-color: #E6E6CC} +.tab .icon {display: block} +a:active { + color: #989973; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + font-weight: normal; + text-decoration: underline; +} +a,a:link { + color: #336699; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + text-decoration: none; +} +a:visited { + color: #336699; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + text-decoration: none; +} +a:hover { + color: #cc0000; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + text-decoration: none; +} +a.navlink:link, a.toplink:link, ul.navlink li a, ul.toplink li a { + color: #336699; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + font-weight: bold; + text-decoration: none; +} +a.navlink:visited, a.toplink:visited, ul.navlink li a:visited, ul.toplink li a:visited { + color: #336699; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + font-weight: bold; + text-decoration: none; +} +a.navlink:hover, a.toplink:hover, ul.navlink li a:hover, ul.toplink li a:hover { + color: #cc0000; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + font-weight: bold; + text-decoration: none; +} +a.navlink:active, a.toplink:active, ul.navlink li a:active, ul.toplink li a:active { + color: #cc0000; + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + font-weight: bold; + text-decoration: none; +} +.active a {font-weight: bold} +a.help { + color: #E68800; + font-size: smaller; + vertical-align: super; + text-decoration: none; +} +pre {font-size: 110%} +pre.data { + font-family: arial, tahoma, verdana, helvetica, sans-serif, serif; + font-size: 100%; +} +pre.error { + font-family: "Lucida Console", "Courier New", "DejaVu Sans Mono", monospace; + font-size: 120%; +} +.intro li {font-weight: bold} +.ac_field {border:1px solid #D9D95F} +.bottom_link { + background: #eee; + border-top: 1px dotted #999; + border-left: 1px dotted #999; + font-size: smaller; +} + +/** FK browsing **/ +div#root > div.fk { + border: 1px solid #000; +} +div.fk { + background: #fff; + border-left: 1px solid #000; + padding: 5px; +} diff --git a/php/pgadmin/themes/global.css b/php/pgadmin/themes/global.css new file mode 100644 index 0000000..106e208 --- /dev/null +++ b/php/pgadmin/themes/global.css @@ -0,0 +1,108 @@ +/** + * This is hte mandatory CSS file to include on top of every CSS theme file + **/ + +img { border: none; } +p.message {color: blue} +p.comment {font-style: italic} +.left{text-align: left} +.pre {white-space: pre} + +.arg_icon { + padding-right:5pt; + padding-left:5pt; +} + +/** Browser Tree using XLoadTree 2 **/ +body.browser { + height: 100%; + margin: 0px; + padding: 0px; + text-align: left; +} +.refreshTree { + float:right; + text-align:right; + padding: 0 3px; +} +.webfx-tree-row {white-space: nowrap} +.webfx-tree-children { + background-repeat: repeat-y; + background-position-y: 1px !important; /* IE only */ +} +.webfx-tree-row img {vertical-align: middle} +.webfx-tree-item-label {margin-left: 0.5ex} +.webfx-tree-icon {margin-left: 1px} +.webfx-tree-hide-root {display: none} + +/** auto-complete on insert **/ +#fkbg { + display:none; + position:fixed; + top:0;left:0; + width:100%; + height:100%; + z-index:10; +} +#fklist { + display:none; + position:absolute; + background:#fff; + border:1px solid #000; + overflow:auto; + z-index:15; +} +#fklist table { + border-collapse:collapse; + border: 1px solid #aaa; +} +#fklist th {border: 1px solid #aaa} +#fklist td, +#fklist th { + padding: 3px 10px; + border-right: 1px solid #aaa; + font-size: 12px; +} +#fklist td a { + display:block; + color:#000; +} +#fklist td a.fkval, p.errmsg { + color:red; +} +.ac_values {width:100%} + +/** bottom link back to top **/ +.bottom_link { + position: fixed; + bottom: 0; + right: 0; + margin: 0; + padding: 4px; + background: #eee; + border-top: 1px dotted #999; + border-left: 1px dotted #999; + font-size: smaller; +} + +/** FK browsing **/ +div#root { + position: absolute; +} +div.fk { + margin-left: 20px; +} +div#fkcontainer { + margin: 0; + position: relative; + width: 100%; + background: none; + border:0px; +} +div.fk_value { + display:inline-block; +} +/** Syntax highlighting **/ +.comment {color: #008080} +.keyword {color: #FF8000} +.literal {color: #808080} diff --git a/php/pgadmin/themes/gotar/global.css b/php/pgadmin/themes/gotar/global.css new file mode 100644 index 0000000..23cef1e --- /dev/null +++ b/php/pgadmin/themes/gotar/global.css @@ -0,0 +1,242 @@ +@import url(../global.css); +/** + * Default style sheet + */ + +/** ELEMENTS */ + +body { + background-color: #336; + margin: 0px; + padding: 0px; + font-size: smaller; /*0.8em;*/ + font-family: sans-serif; + color: #fff; +} +p { + color: #fff; +} +table { + border:1px gray solid; +} +div.logo { display:none } +body.browser { + background-color: #447; + color:#4bf; + font-size: smaller; /*1em;*/ + border-right: 1px dashed #c0c0c0; +} +body.browser a { + color:#fff; +} +body.browser a:hover { + color:#cde; +} +body.browser div.webfx-tree-row:hover { background:#88d } +h2 { + color: #fff; + font-size: medium; /*1.3em;*/ + font-weight: bold; + border: 0; + background-color: #558; + padding: 0; + margin: 0; + text-align:center; +} +h3 { + color: #eee; + font-size: small; + font-weight: bold; +} +table.error {background-color: #f00} +table.error td {background-color: #f84} +th.data { + color: #ada; + background-color: #241; + font-size: smaller; /* 0.9em */ +} +th.data a:active, th.data a:link, th.data a:visited, th.data a:hover { + font-weight: bold; +} +td.dat { + color: #ff0; + text-align: center; +} +th.required {text-decoration: underline} +ul.toplink,ul.navlink { + list-style: none; + margin:0;padding:0; +} +ul.navlink{margin:20px 0} +ul.toplink li, ul.navlink li { + display:inline; + border-left:1px solid #eee; + margin:0;padding: 0 2px 0 5px; +} +ul.toplink li:first-child, ul.navlink li:first-child { + border: none; + padding-left:0; +} +tr.data1, tr.data2, tr.data3 { + color: #eed; + font-family: sans-serif; + font-size: smaller; /*0.8em;*/ +} +tr.data1:hover, tr.data2:hover, tr.data3:hover { + background-color: #39663e; +} +.row1, .data1 { + background-color: #1a3f1e; + text-align: left; +} +input, textarea, select { + border:1px #200 solid; + background:#ddf; +} +input, textarea, select { + color:#210; +} +.data1 select, .data2 select { + font-weight:bold; +} +p input:focus, .data input:focus, .data1 input:focus, .data2 input:focus, textarea:focus, .data1 select, .data2 select { +/* background:#bbf; */ + background:#eef; + color:#000; +} +.row2, .data2 { + background-color: #2b482e; + text-align: left; +} +td.opbutton1 { + border: 1px solid #484; + font-size: smaller; /*0.8em;*/ + text-align: center; +} +td.opbutton2 { + border: 1px solid #484; + font-size: smaller; /*0.8em;*/ + text-align: center; +} +td.opbutton1 a, td.opbutton2 a { + padding-left:6px; + padding-right:6px; +} +.topbar { border: 0 } +.topbar, .topbar *, .trail, .tab, .crumb { + border: 0; + background: #336; +} +.topbar .platform, .topbar .host, .topbar .username { + font-weight: bold; +} +.topbar, .trail, .tab { + padding: 2px 1ex; + font-size: smaller; + color: #ddf; +} +.crumb, .tab { + vertical-align: top; +} +.crumb .icon { + vertical-align: middle; + margin: 0; +} +table.tabs { + width: 100%; + border-collapse: collapse; + margin-bottom: 1ex; +} +.tab {text-align: center} +.tabs .active {background-color: #449} +.tab .icon {display: block} +tr,td { height:100% } +td a:not(.help), th a { display:inline-block; height:100% } /* vertical-align:middle doesn't work for block elements, CSS sux */ +td.crumb a, td.tab a { width:90% } +tr.data1 a, tr.data2 a { width:100% } +td.opbutton1 a, td.opbutton2 a { width:inherit } +td a.help { display:inline; position:absolute; width:10px; } +a.pagenav { display:inline-block; min-width:15px; } +a.toplink { display:inline } +a:active { + color: #989973; + font-weight: normal; + text-decoration: underline; +} +a,a:link { + color: #afa; + text-decoration: none; +} +a:visited { + color: #df8; + text-decoration: none; +} +a:hover { + color: #f88; + text-decoration: none; +} +a:active { + color: #c00; +} +a.navlink:link, a.toplink:link, ul.navlink li a, ul.toplink li a { + color: #afa; + font-weight: bold; + text-decoration: none; +} +a.navlink:visited, a.toplink:visited, ul.navlink li a:visited, ul.toplink li a:visited { + color: #df8; + font-weight: bold; + text-decoration: none; +} +a.navlink:hover, a.toplink:hover, ul.navlink li a:hover, ul.toplink li a:hover { + color: red; + font-weight: bold; + text-decoration: none; +} +a.navlink:active, a.toplink:active, ul.navlink li a:active, ul.toplink li a:active { + color: #c00; + font-weight: bold; + text-decoration: none; +} +.active a {font-weight: bold} +a.help { + color: #E68800; + font-size: smaller; + vertical-align: super; + text-decoration: none; +} +pre {font-size: 110%} +pre.data { + font-size: 100%; +} +.error p { + color:#822; + background:#fc8; +} +pre.error { + color: #000; + font-family: monospace; + font-size: 120%; +} +.intro li {font-weight: bold} +.ac_field {border:1px solid #D9D95F} +.bottom_link { + color: #004 !important; + background: #eee; + border-top: 1px dotted #999; + border-left: 1px dotted #999; + font-size: smaller; +} + +a.bottom_link:hover { background:#68f } + +/** FK browsing **/ +div#root > div.fk { + border: 1px solid #000; +} +div.fk { + /*background: #84c;*/ + background: rgba(128,32,64,0.6); + border-left: 1px solid #000; + padding: 5px 0 5px 0; +} diff --git a/php/pgadmin/themes/themes.php b/php/pgadmin/themes/themes.php new file mode 100644 index 0000000..14df841 --- /dev/null +++ b/php/pgadmin/themes/themes.php @@ -0,0 +1,15 @@ + 'Default', + 'cappuccino' => 'Cappuccino', + 'gotar' => 'Blue/Green' + ); +?> diff --git a/php/pgadmin/triggers.php b/php/pgadmin/triggers.php new file mode 100644 index 0000000..9aa8c87 --- /dev/null +++ b/php/pgadmin/triggers.php @@ -0,0 +1,400 @@ +alterTrigger($_POST['table'], $_POST['trigger'], $_POST['name']); + if ($status == 0) + doDefault($lang['strtriggeraltered']); + else + doAlter($lang['strtriggeralteredbad']); + } + + /** + * Function to allow altering of a trigger + */ + function doAlter($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('trigger'); + $misc->printTitle($lang['stralter'],'pg.trigger.alter'); + $misc->printMsg($msg); + + $triggerdata = $data->getTrigger($_REQUEST['table'], $_REQUEST['trigger']); + + if ($triggerdata->recordCount() > 0) { + + if (!isset($_POST['name'])) $_POST['name'] = $triggerdata->fields['tgname']; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "
{$lang['strname']}"; + echo "_maxNameLen}\" value=\"", + htmlspecialchars($_POST['name']), "\" />\n"; + echo "
\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + } + + /** + * Show confirmation of drop and perform actual drop + */ + function doDrop($confirm) { + global $data, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('trigger'); + $misc->printTitle($lang['strdrop'],'pg.trigger.drop'); + + echo "

", sprintf($lang['strconfdroptrigger'], $misc->printVal($_REQUEST['trigger']), + $misc->printVal($_REQUEST['table'])), "

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $data->dropTrigger($_POST['trigger'], $_POST['table'], isset($_POST['cascade'])); + if ($status == 0) + doDefault($lang['strtriggerdropped']); + else + doDefault($lang['strtriggerdroppedbad']); + } + + } + + /** + * Show confirmation of enable trigger and perform enabling the trigger + */ + function doEnable($confirm) { + global $data, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('trigger'); + $misc->printTitle($lang['strenable'],'pg.table.alter'); + + echo "

", sprintf($lang['strconfenabletrigger'], $misc->printVal($_REQUEST['trigger']), + $misc->printVal($_REQUEST['table'])), "

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $data->enableTrigger($_POST['trigger'], $_POST['table']); + if ($status == 0) + doDefault($lang['strtriggerenabled']); + else + doDefault($lang['strtriggerenabledbad']); + } + + } + + /** + * Show confirmation of disable trigger and perform disabling the trigger + */ + function doDisable($confirm) { + global $data, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('trigger'); + $misc->printTitle($lang['strdisable'],'pg.table.alter'); + + echo "

", sprintf($lang['strconfdisabletrigger'], $misc->printVal($_REQUEST['trigger']), + $misc->printVal($_REQUEST['table'])), "

\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + $status = $data->disableTrigger($_POST['trigger'], $_POST['table']); + if ($status == 0) + doDefault($lang['strtriggerdisabled']); + else + doDefault($lang['strtriggerdisabledbad']); + } + + } + + /** + * Let them create s.th. + */ + function doCreate($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('table'); + $misc->printTitle($lang['strcreatetrigger'],'pg.trigger.create'); + $misc->printMsg($msg); + + // Get all the functions that can be used in triggers + $funcs = $data->getTriggerFunctions(); + if ($funcs->recordCount() == 0) { + doDefault($lang['strnofunctions']); + return; + } + + /* Populate functions */ + $sel0 = new XHTML_Select('formFunction'); + while (!$funcs->EOF) { + $sel0->add(new XHTML_Option($funcs->fields['proname'])); + $funcs->moveNext(); + } + + /* Populate times */ + $sel1 = new XHTML_Select('formExecTime'); + $sel1->set_data($data->triggerExecTimes); + + /* Populate events */ + $sel2 = new XHTML_Select('formEvent'); + $sel2->set_data($data->triggerEvents); + + /* Populate occurences */ + $sel3 = new XHTML_Select('formFrequency'); + $sel3->set_data($data->triggerFrequency); + + echo "
\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
{$lang['strname']}{$lang['strwhen']}
", $sel1->fetch(), "
{$lang['strevent']}{$lang['strforeach']}
", $sel2->fetch(), " ", $sel3->fetch(), "
{$lang['strfunction']} {$lang['strarguments']}
", $sel0->fetch(), "()
\n"; + echo "

\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "
\n"; + } + + /** + * Actually creates the new trigger in the database + */ + function doSaveCreate() { + global $data; + global $lang; + + // Check that they've given a name and a definition + + if ($_POST['formFunction'] == '') + doCreate($lang['strtriggerneedsfunc']); + elseif ($_POST['formTriggerName'] == '') + doCreate($lang['strtriggerneedsname']); + elseif ($_POST['formEvent'] == '') + doCreate(); + else { + $status = $data->createTrigger($_POST['formTriggerName'], $_POST['table'], + $_POST['formFunction'], $_POST['formExecTime'], $_POST['formEvent'], + $_POST['formFrequency'], $_POST['formTriggerArgs']); + if ($status == 0) + doDefault($lang['strtriggercreated']); + else + doCreate($lang['strtriggercreatedbad']); + } + } + + /** + * List all the triggers on the table + */ + function doDefault($msg = '') { + global $data, $misc, $database; + global $lang; + + function tgPre(&$rowdata) { + global $data, $lang; + // Nasty hack to support pre-7.4 PostgreSQL + $rowdata->fields['+tgdef'] = $rowdata->fields['tgdef'] !== null + ? $rowdata->fields['tgdef'] + : $data->getTriggerDef($rowdata->fields); + } + + $misc->printTrail('table'); + $misc->printTabs('table','triggers'); + $misc->printMsg($msg); + + $triggers = $data->getTriggers($_REQUEST['table']); + + $columns = array( + 'trigger' => array( + 'title' => $lang['strname'], + 'field' => field('tgname'), + ), + 'definition' => array( + 'title' => $lang['strdefinition'], + 'field' => field('+tgdef'), + ), + 'function' => array( + 'title' => $lang['strfunction'], + 'field' => field('proproto'), + 'url' => "functions.php?action=properties&server={$_REQUEST['server']}&database={$_REQUEST['database']}&", + 'vars' => array( + 'schema' => 'pronamespace', + 'function' => 'proproto', + 'function_oid' => 'prooid', + ), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + ); + + $actions = array( + 'alter' => array( + 'title' => $lang['stralter'], + 'url' => "triggers.php?action=confirm_alter&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", + 'vars' => array('trigger' => 'tgname'), + ), + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "triggers.php?action=confirm_drop&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", + 'vars' => array('trigger' => 'tgname'), + ), + ); + if($data->hasDisableTriggers()) { + if(!$data->phpBool($triggers->fields["tgenabled"])) { + $actions['enable'] = array( + 'title' => $lang['strenable'], + 'url' => "triggers.php?action=confirm_enable&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", + 'vars' => array('trigger' => 'tgname'), + ); + } else { + $actions['disable'] = array( + 'title' => $lang['strdisable'], + 'url' => "triggers.php?action=confirm_disable&{$misc->href}&table=".urlencode($_REQUEST['table'])."&", + 'vars' => array('trigger' => 'tgname'), + ); + } + } + + $misc->printTable($triggers, $columns, $actions, $lang['strnotriggers'], 'tgPre'); + + echo "

href}&table=", urlencode($_REQUEST['table']), "\">{$lang['strcreatetrigger']}

\n"; + } + + function doTree() { + + global $misc, $data; + + $triggers = $data->getTriggers($_REQUEST['table']); + + $reqvars = $misc->getRequestVars('table'); + + $attrs = array( + 'text' => field('tgname'), + 'icon' => 'Trigger', + ); + + $misc->printTreeXML($triggers, $attrs); + exit; + } + + if ($action == 'tree') doTree(); + + $misc->printHeader($lang['strtables'] . ' - ' . $_REQUEST['table'] . ' - ' . $lang['strtriggers']); + $misc->printBody(); + + switch ($action) { + case 'alter': + if (isset($_POST['alter'])) doSaveAlter(); + else doDefault(); + break; + case 'confirm_alter': + doAlter(); + break; + case 'confirm_enable': + doEnable(true); + break; + case 'confirm_disable': + doDisable(true); + break; + case 'save_create': + if (isset($_POST['cancel'])) doDefault(); + else doSaveCreate(); + break; + case 'create': + doCreate(); + break; + case 'drop': + if (isset($_POST['yes'])) doDrop(false); + else doDefault(); + break; + case 'confirm_drop': + doDrop(true); + break; + case 'enable': + if (isset($_POST['yes'])) doEnable(false); + else doDefault(); + break; + case 'disable': + if (isset($_POST['yes'])) doDisable(false); + else doDefault(); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/types.php b/php/pgadmin/types.php new file mode 100644 index 0000000..6b28e6f --- /dev/null +++ b/php/pgadmin/types.php @@ -0,0 +1,650 @@ +getType($_REQUEST['type']); + + $misc->printTrail('type'); + $misc->printTitle($lang['strproperties'], 'pg.type'); + $misc->printMsg($msg); + + function attPre(&$rowdata) { + global $data; + $rowdata->fields['+type'] = $data->formatType($rowdata->fields['type'], $rowdata->fields['atttypmod']); + } + + if ($typedata->recordCount() > 0) { + $vals = false; + switch ($typedata->fields['typtype']) { + case 'c': + $attrs = $data->getTableAttributes($_REQUEST['type']); + + $columns = array( + 'field' => array( + 'title' => $lang['strfield'], + 'field' => field('attname'), + ), + 'type' => array( + 'title' => $lang['strtype'], + 'field' => field('+type'), + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('comment'), + ) + ); + + $actions = array(); + + $misc->printTable($attrs, $columns, $actions, null, 'attPre'); + + break; + case 'e': + $vals = $data->getEnumValues($typedata->fields['typname']); + default: + $byval = $data->phpBool($typedata->fields['typbyval']); + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + if ($data->hasEnumTypes() && $vals) { + $vals = $vals->getArray(); + $nbVals = count($vals); + echo "\n\t\n"; + echo "\n"; + for ($i=1; $i < $nbVals; $i++) + echo "\n"; + } + echo "
{$lang['strname']}", $misc->printVal($typedata->fields['typname']), "
{$lang['strinputfn']}", $misc->printVal($typedata->fields['typin']), "
{$lang['stroutputfn']}", $misc->printVal($typedata->fields['typout']), "
{$lang['strlength']}", $misc->printVal($typedata->fields['typlen']), "
{$lang['strpassbyval']}", ($byval) ? $lang['stryes'] : $lang['strno'], "
{$lang['stralignment']}", $misc->printVal($typedata->fields['typalign']), "
{$lang['strenumvalues']}{$vals[0]['enumval']}
{$vals[$i]['enumval']}
\n"; + } + + echo "

href}\">{$lang['strshowalltypes']}

\n"; + } else + doDefault($lang['strinvalidparam']); + } + + /** + * Show confirmation of drop and perform actual drop + */ + function doDrop($confirm) { + global $data, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('type'); + $misc->printTitle($lang['strdrop'], 'pg.type.drop'); + + echo "

", sprintf($lang['strconfdroptype'], $misc->printVal($_REQUEST['type'])), "

\n"; + + echo "
\n"; + echo "

\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + $status = $data->dropType($_POST['type'], isset($_POST['cascade'])); + if ($status == 0) + doDefault($lang['strtypedropped']); + else + doDefault($lang['strtypedroppedbad']); + } + + } + + /** + * Displays a screen where they can enter a new composite type + */ + function doCreateComposite($msg = '') { + global $data, $misc; + global $lang; + + if (!isset($_REQUEST['stage'])) $_REQUEST['stage'] = 1; + if (!isset($_REQUEST['name'])) $_REQUEST['name'] = ''; + if (!isset($_REQUEST['fields'])) $_REQUEST['fields'] = ''; + if (!isset($_REQUEST['typcomment'])) $_REQUEST['typcomment'] = ''; + + switch ($_REQUEST['stage']) { + case 1: + $misc->printTrail('type'); + $misc->printTitle($lang['strcreatecomptype'], 'pg.type.create'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + echo "
{$lang['strname']}_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['name']), "\" />
{$lang['strnumfields']}_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['fields']), "\" />
{$lang['strcomment']}
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + break; + case 2: + global $lang; + + // Check inputs + $fields = trim($_REQUEST['fields']); + if (trim($_REQUEST['name']) == '') { + $_REQUEST['stage'] = 1; + doCreateComposite($lang['strtypeneedsname']); + return; + } + elseif ($fields == '' || !is_numeric($fields) || $fields != (int)$fields || $fields < 1) { + $_REQUEST['stage'] = 1; + doCreateComposite($lang['strtypeneedscols']); + return; + } + + $types = $data->getTypes(true, false, true); + + $misc->printTrail('schema'); + $misc->printTitle($lang['strcreatecomptype'], 'pg.type.create'); + $misc->printMsg($msg); + + echo "
\n"; + + // Output table header + echo "\n"; + echo "\t"; + echo"\n"; + + for ($i = 0; $i < $_REQUEST['fields']; $i++) { + if (!isset($_REQUEST['field'][$i])) $_REQUEST['field'][$i] = ''; + if (!isset($_REQUEST['length'][$i])) $_REQUEST['length'][$i] = ''; + if (!isset($_REQUEST['colcomment'][$i])) $_REQUEST['colcomment'][$i] = ''; + + echo "\t\n\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + + // Output array type selector + echo "\t\t\n"; + + echo "\t\t\n"; + echo "\t\t\n\t\n"; + } + echo "
{$lang['strfield']}{$lang['strtype']}{$lang['strlength']}{$lang['strcomment']}
", $i + 1, ". _maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['field'][$i]), "\" />\n\t\t\t\n\t\t\n\t\t\t\n\t\t
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + + break; + case 3: + global $data, $lang; + + // Check inputs + $fields = trim($_REQUEST['fields']); + if (trim($_REQUEST['name']) == '') { + $_REQUEST['stage'] = 1; + doCreateComposite($lang['strtypeneedsname']); + return; + } + elseif ($fields == '' || !is_numeric($fields) || $fields != (int)$fields || $fields <= 0) { + $_REQUEST['stage'] = 1; + doCreateComposite($lang['strtypeneedscols']); + return; + } + + $status = $data->createCompositeType($_REQUEST['name'], $_REQUEST['fields'], $_REQUEST['field'], + $_REQUEST['type'], $_REQUEST['array'], $_REQUEST['length'], $_REQUEST['colcomment'], + $_REQUEST['typcomment']); + + if ($status == 0) + doDefault($lang['strtypecreated']); + elseif ($status == -1) { + $_REQUEST['stage'] = 2; + doCreateComposite($lang['strtypeneedsfield']); + return; + } + else { + $_REQUEST['stage'] = 2; + doCreateComposite($lang['strtypecreatedbad']); + return; + } + break; + default: + echo "

{$lang['strinvalidparam']}

\n"; + } + } + + /** + * Displays a screen where they can enter a new enum type + */ + function doCreateEnum($msg = '') { + global $data, $misc; + global $lang; + + if (!isset($_REQUEST['stage'])) $_REQUEST['stage'] = 1; + if (!isset($_REQUEST['name'])) $_REQUEST['name'] = ''; + if (!isset($_REQUEST['values'])) $_REQUEST['values'] = ''; + if (!isset($_REQUEST['typcomment'])) $_REQUEST['typcomment'] = ''; + + switch ($_REQUEST['stage']) { + case 1: + $misc->printTrail('type'); + $misc->printTitle($lang['strcreateenumtype'], 'pg.type.create'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + + echo "
{$lang['strname']}_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['name']), "\" />
{$lang['strnumvalues']}_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['values']), "\" />
{$lang['strcomment']}
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + break; + case 2: + global $lang; + + // Check inputs + $values = trim($_REQUEST['values']); + if (trim($_REQUEST['name']) == '') { + $_REQUEST['stage'] = 1; + doCreateEnum($lang['strtypeneedsname']); + return; + } + elseif ($values == '' || !is_numeric($values) || $values != (int)$values || $values < 1) { + $_REQUEST['stage'] = 1; + doCreateEnum($lang['strtypeneedsvals']); + return; + } + + $misc->printTrail('schema'); + $misc->printTitle($lang['strcreateenumtype'], 'pg.type.create'); + $misc->printMsg($msg); + + echo "
\n"; + + // Output table header + echo "\n"; + echo "\t\n"; + + for ($i = 0; $i < $_REQUEST['values']; $i++) { + if (!isset($_REQUEST['value'][$i])) $_REQUEST['value'][$i] = ''; + + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + } + echo "
{$lang['strvalue']}
", $i + 1, ". _maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['value'][$i]), "\" />
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + + break; + case 3: + global $data, $lang; + + // Check inputs + $values = trim($_REQUEST['values']); + if (trim($_REQUEST['name']) == '') { + $_REQUEST['stage'] = 1; + doCreateEnum($lang['strtypeneedsname']); + return; + } + elseif ($values == '' || !is_numeric($values) || $values != (int)$values || $values <= 0) { + $_REQUEST['stage'] = 1; + doCreateEnum($lang['strtypeneedsvals']); + return; + } + + $status = $data->createEnumType($_REQUEST['name'], $_REQUEST['value'], $_REQUEST['typcomment']); + + if ($status == 0) + doDefault($lang['strtypecreated']); + elseif ($status == -1) { + $_REQUEST['stage'] = 2; + doCreateEnum($lang['strtypeneedsvalue']); + return; + } + else { + $_REQUEST['stage'] = 2; + doCreateEnum($lang['strtypecreatedbad']); + return; + } + break; + default: + echo "

{$lang['strinvalidparam']}

\n"; + } + } + + /** + * Displays a screen where they can enter a new type + */ + function doCreate($msg = '') { + global $data, $misc; + global $lang; + + if (!isset($_POST['typname'])) $_POST['typname'] = ''; + if (!isset($_POST['typin'])) $_POST['typin'] = ''; + if (!isset($_POST['typout'])) $_POST['typout'] = ''; + if (!isset($_POST['typlen'])) $_POST['typlen'] = ''; + if (!isset($_POST['typdef'])) $_POST['typdef'] = ''; + if (!isset($_POST['typelem'])) $_POST['typelem'] = ''; + if (!isset($_POST['typdelim'])) $_POST['typdelim'] = ''; + if (!isset($_POST['typalign'])) $_POST['typalign'] = $data->typAlignDef; + if (!isset($_POST['typstorage'])) $_POST['typstorage'] = $data->typStorageDef; + + // Retrieve all functions and types in the database + $funcs = $data->getFunctions(true); + $types = $data->getTypes(true); + + $misc->printTrail('schema'); + $misc->printTitle($lang['strcreatetype'], 'pg.type.create'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
{$lang['strname']}_maxNameLen}\" value=\"", + htmlspecialchars($_POST['typname']), "\" />
{$lang['strinputfn']}
{$lang['stroutputfn']}
major_version, '7.4', '<') ? ' required' : '') . "\">{$lang['strlength']}
{$lang['strdefault']}
{$lang['strelement']}
{$lang['strdelimiter']}
{$lang['stralignment']}
{$lang['strstorage']}
\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + + /** + * Actually creates the new type in the database + */ + function doSaveCreate() { + global $data; + global $lang; + + // Check that they've given a name and a length. + // Note: We're assuming they've given in and out functions here + // which might be unwise... + if ($_POST['typname'] == '') doCreate($lang['strtypeneedsname']); + elseif ($_POST['typlen'] == '') doCreate($lang['strtypeneedslen']); + else { + $status = $data->createType( + $_POST['typname'], + $_POST['typin'], + $_POST['typout'], + $_POST['typlen'], + $_POST['typdef'], + $_POST['typelem'], + $_POST['typdelim'], + isset($_POST['typbyval']), + $_POST['typalign'], + $_POST['typstorage'] + ); + if ($status == 0) + doDefault($lang['strtypecreated']); + else + doCreate($lang['strtypecreatedbad']); + } + } + + /** + * Show default list of types in the database + */ + function doDefault($msg = '') { + global $data, $conf, $misc; + global $lang; + + $misc->printTrail('schema'); + $misc->printTabs('schema','types'); + $misc->printMsg($msg); + + $types = $data->getTypes(); + + $columns = array( + 'type' => array( + 'title' => $lang['strtype'], + 'field' => field('typname'), + 'url' => "types.php?action=properties&{$misc->href}&", + 'vars' => array('type' => 'basename'), + ), + 'owner' => array( + 'title' => $lang['strowner'], + 'field' => field('typowner'), + ), + 'flavour' => array( + 'title' => $lang['strflavor'], + 'field' => field('typtype'), + 'type' => 'verbatim', + 'params'=> array( + 'map' => array( + 'b' => $lang['strbasetype'], + 'c' => $lang['strcompositetype'], + 'd' => $lang['strdomain'], + 'p' => $lang['strpseudotype'], + 'e' => $lang['strenum'], + ), + 'align' => 'center', + ), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('typcomment'), + ), + ); + + if (!isset($types->fields['typtype'])) unset($columns['flavour']); + + $actions = array( + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "types.php?action=confirm_drop&{$misc->href}&", + 'vars' => array('type' => 'basename'), + ), + ); + + $misc->printTable($types, $columns, $actions, $lang['strnotypes']); + + echo "\n"; + } + + /** + * Generate XML for the browser tree. + */ + function doTree() { + global $misc, $data; + + $types = $data->getTypes(); + + $reqvars = $misc->getRequestVars('type'); + + $attrs = array( + 'text' => field('typname'), + 'icon' => 'Type', + 'toolTip'=> field('typcomment'), + 'action' => url('types.php', + $reqvars, + array( + 'action' => 'properties', + 'type' => field('basename') + ) + ) + ); + + $misc->printTreeXML($types, $attrs); + exit; + } + + if ($action == 'tree') doTree(); + + $misc->printHeader($lang['strtypes']); + $misc->printBody(); + + switch ($action) { + case 'create_comp': + if (isset($_POST['cancel'])) doDefault(); + else doCreateComposite(); + break; + case 'create_enum': + if (isset($_POST['cancel'])) doDefault(); + else doCreateEnum(); + break; + case 'save_create': + if (isset($_POST['cancel'])) doDefault(); + else doSaveCreate(); + break; + case 'create': + doCreate(); + break; + case 'drop': + if (isset($_POST['cancel'])) doDefault(); + else doDrop(false); + break; + case 'confirm_drop': + doDrop(true); + break; + case 'properties': + doProperties(); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/users.php b/php/pgadmin/users.php new file mode 100644 index 0000000..1a0c20d --- /dev/null +++ b/php/pgadmin/users.php @@ -0,0 +1,379 @@ +getServerInfo(); + + $userdata = $data->getUser($server_info['username']); + $_REQUEST['user'] = $server_info['username']; + + $misc->printTrail('user'); + $misc->printTabs('server','account'); + $misc->printMsg($msg); + + if ($userdata->recordCount() > 0) { + $userdata->fields['usesuper'] = $data->phpBool($userdata->fields['usesuper']); + $userdata->fields['usecreatedb'] = $data->phpBool($userdata->fields['usecreatedb']); + echo "\n"; + echo ""; + echo ""; + echo "\n"; + echo "\n\t\n"; + echo "\t\n"; + echo "\t\n"; + echo "\t\n"; + echo "\t\n"; + echo "\n
{$lang['strusername']}{$lang['strsuper']}{$lang['strcreatedb']}{$lang['strexpires']}{$lang['strsessiondefaults']}
", $misc->printVal($userdata->fields['usename']), "", $misc->printVal($userdata->fields['usesuper'], 'yesno'), "", $misc->printVal($userdata->fields['usecreatedb'], 'yesno'), "", ($userdata->fields['useexpires'] == 'infinity' || is_null($userdata->fields['useexpires']) ? $lang['strnever'] : $misc->printVal($userdata->fields['useexpires'])), "", $misc->printVal($userdata->fields['useconfig']), "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + + echo "

href}\">{$lang['strchangepassword']}

\n"; + } + + /** + * Show confirmation of change password and actually change password + */ + function doChangePassword($confirm, $msg = '') { + global $data, $misc; + global $lang, $conf; + + $server_info = $misc->getServerInfo(); + + if ($confirm) { + $_REQUEST['user'] = $server_info['username']; + $misc->printTrail('user'); + $misc->printTitle($lang['strchangepassword'],'pg.user.alter'); + $misc->printMsg($msg); + + if (!isset($_POST['password'])) $_POST['password'] = ''; + if (!isset($_POST['confirm'])) $_POST['confirm'] = ''; + + echo "
\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "
{$lang['strpassword']}
{$lang['strconfirm']}
\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "

\n"; + } + else { + // Check that password is minimum length + if (strlen($_POST['password']) < $conf['min_password_length']) + doChangePassword(true, $lang['strpasswordshort']); + // Check that password matches confirmation password + elseif ($_POST['password'] != $_POST['confirm']) + doChangePassword(true, $lang['strpasswordconfirm']); + else { + $status = $data->changePassword($server_info['username'], + $_POST['password']); + if ($status == 0) + doAccount($lang['strpasswordchanged']); + else + doAccount($lang['strpasswordchangedbad']); + } + } + } + + /** + * Function to allow editing of a user + */ + function doEdit($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('user'); + $misc->printTitle($lang['stralter'],'pg.user.alter'); + $misc->printMsg($msg); + + $userdata = $data->getUser($_REQUEST['username']); + + if ($userdata->recordCount() > 0) { + $server_info = $misc->getServerInfo(); + $canRename = $data->hasUserRename() && ($_REQUEST['username'] != $server_info['username']); + $userdata->fields['usesuper'] = $data->phpBool($userdata->fields['usesuper']); + $userdata->fields['usecreatedb'] = $data->phpBool($userdata->fields['usecreatedb']); + + if (!isset($_POST['formExpires'])){ + if ($canRename) $_POST['newname'] = $userdata->fields['usename']; + if ($userdata->fields['usesuper']) $_POST['formSuper'] = ''; + if ($userdata->fields['usecreatedb']) $_POST['formCreateDB'] = ''; + $_POST['formExpires'] = $userdata->fields['useexpires'] == 'infinity' ? '' : $userdata->fields['useexpires']; + $_POST['formPassword'] = ''; + } + + echo "
\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "
{$lang['strusername']}", ($canRename ? "_maxNameLen}\" value=\"" . htmlspecialchars($_POST['newname']) . "\" />" : $misc->printVal($userdata->fields['usename'])), "
{$lang['strexpires']}
{$lang['strpassword']}
{$lang['strconfirm']}
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + } + + /** + * Function to save after editing a user + */ + function doSaveEdit() { + global $data, $lang; + + // Check name and password + if (isset($_POST['newname']) && $_POST['newname'] == '') + doEdit($lang['struserneedsname']); + else if ($_POST['formPassword'] != $_POST['formConfirm']) + doEdit($lang['strpasswordconfirm']); + else { + if (isset($_POST['newname'])) $status = $data->setRenameUser($_POST['username'], $_POST['formPassword'], isset($_POST['formCreateDB']), isset($_POST['formSuper']), $_POST['formExpires'], $_POST['newname']); + else $status = $data->setUser($_POST['username'], $_POST['formPassword'], isset($_POST['formCreateDB']), isset($_POST['formSuper']), $_POST['formExpires']); + if ($status == 0) + doDefault($lang['struserupdated']); + else + doEdit($lang['struserupdatedbad']); + } + } + + /** + * Show confirmation of drop and perform actual drop + */ + function doDrop($confirm) { + global $data, $misc; + global $lang; + + if ($confirm) { + $misc->printTrail('user'); + $misc->printTitle($lang['strdrop'],'pg.user.drop'); + + echo "

", sprintf($lang['strconfdropuser'], $misc->printVal($_REQUEST['username'])), "

\n"; + + echo "
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + $status = $data->dropUser($_REQUEST['username']); + if ($status == 0) + doDefault($lang['struserdropped']); + else + doDefault($lang['struserdroppedbad']); + } + } + + /** + * Displays a screen where they can enter a new user + */ + function doCreate($msg = '') { + global $data, $misc, $username; + global $lang; + + if (!isset($_POST['formUsername'])) $_POST['formUsername'] = ''; + if (!isset($_POST['formPassword'])) $_POST['formPassword'] = ''; + if (!isset($_POST['formConfirm'])) $_POST['formConfirm'] = ''; + if (!isset($_POST['formExpires'])) $_POST['formExpires'] = ''; + + $misc->printTrail('server'); + $misc->printTitle($lang['strcreateuser'],'pg.user.create'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "
{$lang['strusername']}_maxNameLen}\" name=\"formUsername\" value=\"", htmlspecialchars($_POST['formUsername']), "\" />
{$lang['strpassword']}
{$lang['strconfirm']}
{$lang['strexpires']}
\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + + /** + * Actually creates the new user in the database + */ + function doSaveCreate() { + global $data; + global $lang; + + // Check data + if ($_POST['formUsername'] == '') + doCreate($lang['struserneedsname']); + else if ($_POST['formPassword'] != $_POST['formConfirm']) + doCreate($lang['strpasswordconfirm']); + else { + $status = $data->createUser($_POST['formUsername'], $_POST['formPassword'], + isset($_POST['formCreateDB']), isset($_POST['formSuper']), $_POST['formExpires'], array()); + if ($status == 0) + doDefault($lang['strusercreated']); + else + doCreate($lang['strusercreatedbad']); + } + } + + /** + * Show default list of users in the database + */ + function doDefault($msg = '') { + global $data, $misc; + global $lang; + + function renderUseExpires($val) { + global $lang; + return $val == 'infinity' ? $lang['strnever'] : htmlspecialchars($val); + } + + $misc->printTrail('server'); + $misc->printTabs('server','users'); + $misc->printMsg($msg); + + $users = $data->getUsers(); + + $columns = array( + 'user' => array( + 'title' => $lang['strusername'], + 'field' => field('usename'), + ), + 'superuser' => array( + 'title' => $lang['strsuper'], + 'field' => field('usesuper'), + 'type' => 'yesno', + ), + 'createdb' => array( + 'title' => $lang['strcreatedb'], + 'field' => field('usecreatedb'), + 'type' => 'yesno', + ), + 'expires' => array( + 'title' => $lang['strexpires'], + 'field' => field('useexpires'), + 'type' => 'callback', + 'params'=> array('function' => 'renderUseExpires', 'null' => $lang['strnever']), + ), + 'defaults' => array( + 'title' => $lang['strsessiondefaults'], + 'field' => field('useconfig'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + ); + + $actions = array( + 'alter' => array( + 'title' => $lang['stralter'], + 'url' => "users.php?action=edit&{$misc->href}&", + 'vars' => array('username' => 'usename'), + ), + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "users.php?action=confirm_drop&{$misc->href}&", + 'vars' => array('username' => 'usename'), + ), + ); + + $misc->printTable($users, $columns, $actions, $lang['strnousers']); + + echo "

href}\">{$lang['strcreateuser']}

\n"; + + } + + $misc->printHeader($lang['strusers']); + $misc->printBody(); + + switch ($action) { + case 'changepassword': + if (isset($_REQUEST['ok'])) doChangePassword(false); + else doAccount(); + break; + case 'confchangepassword': + doChangePassword(true); + break; + case 'account': + doAccount(); + break; + case 'save_create': + if (isset($_REQUEST['cancel'])) doDefault(); + else doSaveCreate(); + break; + case 'create': + doCreate(); + break; + case 'drop': + if (isset($_REQUEST['cancel'])) doDefault(); + else doDrop(false); + break; + case 'confirm_drop': + doDrop(true); + break; + case 'save_edit': + if (isset($_REQUEST['cancel'])) doDefault(); + else doSaveEdit(); + break; + case 'edit': + doEdit(); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/viewproperties.php b/php/pgadmin/viewproperties.php new file mode 100644 index 0000000..c52110c --- /dev/null +++ b/php/pgadmin/viewproperties.php @@ -0,0 +1,485 @@ +setView($_POST['view'], $_POST['formDefinition'], $_POST['formComment']); + if ($status == 0) + doDefinition($lang['strviewupdated']); + else + doEdit($lang['strviewupdatedbad']); + } + + /** + * Function to allow editing of a view + */ + function doEdit($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('view'); + $misc->printTitle($lang['stredit'],'pg.view.alter'); + $misc->printMsg($msg); + + $viewdata = $data->getView($_REQUEST['view']); + + if ($viewdata->recordCount() > 0) { + + if (!isset($_POST['formDefinition'])) { + $_POST['formDefinition'] = $viewdata->fields['vwdefinition']; + $_POST['formComment'] = $viewdata->fields['relcomment']; + } + + echo "
\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "
{$lang['strdefinition']}
{$lang['strcomment']}
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + } + + /** + * Allow the dumping of the data "in" a view + * NOTE:: PostgreSQL doesn't currently support dumping the data in a view + * so I have disabled the data related parts for now. In the future + * we should allow it conditionally if it becomes supported. This is + * a SMOP since it is based on pg_dump version not backend version. + */ + function doExport($msg = '') { + global $data, $misc; + global $lang; + + $misc->printTrail('view'); + $misc->printTabs('view','export'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\n"; + // Data only + echo "\n"; + + // Structure only + echo "\n"; + echo "\n\n"; + // Structure and data + echo "\n"; + echo "
{$lang['strformat']}{$lang['stroptions']}
\n"; + + echo "

{$lang['stroptions']}

\n"; + echo "

\n"; + echo "

\n"; + + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + + /** + * Show definition for a view + */ + function doDefinition($msg = '') { + global $data, $misc; + global $lang; + + // Get view + $vdata = $data->getView($_REQUEST['view']); + + $misc->printTrail('view'); + $misc->printTabs('view','definition'); + $misc->printMsg($msg); + + if ($vdata->recordCount() > 0) { + // Show comment if any + if ($vdata->fields['relcomment'] !== null) + echo "

", $misc->printVal($vdata->fields['relcomment']), "

\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "
{$lang['strdefinition']}
", $misc->printVal($vdata->fields['vwdefinition']), "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + + echo "

href}&view=", + urlencode($_REQUEST['view']), "\">{$lang['stralter']}

\n"; + } + + /** + * Displays a screen where they can alter a column in a view + */ + function doProperties($msg = '') { + global $data, $misc; + global $lang; + + if (!isset($_REQUEST['stage'])) $_REQUEST['stage'] = 1; + + switch ($_REQUEST['stage']) { + case 1: + global $lang; + + $misc->printTrail('column'); + $misc->printTitle($lang['stralter'],'pg.column.alter'); + $misc->printMsg($msg); + + echo "
\n"; + + // Output view header + echo "\n"; + echo ""; + echo ""; + + $column = $data->getTableAttributes($_REQUEST['view'], $_REQUEST['column']); + + if (!isset($_REQUEST['default'])) { + $_REQUEST['field'] = $column->fields['attname']; + $_REQUEST['default'] = $_REQUEST['olddefault'] = $column->fields['adsrc']; + $_REQUEST['comment'] = $column->fields['comment']; + } + + echo ""; + + echo ""; + echo ""; + echo ""; + + echo "
{$lang['strname']}{$lang['strtype']}{$lang['strdefault']}{$lang['strcomment']}
", $misc->printVal($data->formatType($column->fields['type'], $column->fields['atttypmod'])), "
\n"; + echo "

\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "
\n"; + + break; + case 2: + global $data, $lang; + + // Check inputs + if (trim($_REQUEST['field']) == '') { + $_REQUEST['stage'] = 1; + doProperties($lang['strcolneedsname']); + return; + } + + // Alter the view column + $status = $data->alterColumn($_REQUEST['view'], $_REQUEST['column'], $_REQUEST['field'], + false, false, $_REQUEST['default'], $_REQUEST['olddefault'], + '', '', '', '', $_REQUEST['comment']); + if ($status == 0) + doDefault($lang['strcolumnaltered']); + else { + $_REQUEST['stage'] = 1; + doProperties($lang['strcolumnalteredbad']); + return; + } + break; + default: + echo "

{$lang['strinvalidparam']}

\n"; + } + } + + function doAlter($confirm = false, $msg = '') { + if ($confirm) { + global $data, $misc, $lang; + + $misc->printTrail('view'); + $misc->printTitle($lang['stralter'], 'pg.view.alter'); + $misc->printMsg($msg); + + // Fetch view info + $view = $data->getView($_REQUEST['view']); + + if ($view->recordCount() > 0) { + if (!isset($_POST['name'])) $_POST['name'] = $view->fields['relname']; + if (!isset($_POST['owner'])) $_POST['owner'] = $view->fields['relowner']; + if (!isset($_POST['newschema'])) $_POST['newschema'] = $view->fields['nspname']; + if (!isset($_POST['comment'])) $_POST['comment'] = $view->fields['relcomment']; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + $server_info = $misc->getServerInfo(); + if ($data->isSuperUser($server_info['username'])) { + + // Fetch all users + $users = $data->getUsers(); + + echo "\n"; + echo "\n"; + } + + if ($data->hasAlterTableSchema()) { + $schemas = $data->getSchemas(); + echo "\n"; + echo "\n"; + } + + echo "\n"; + echo "\n"; + echo "
{$lang['strname']}"; + echo "_maxNameLen}\" value=\"", + htmlspecialchars($_POST['name']), "\" />
{$lang['strowner']}
{$lang['strschema']}
{$lang['strcomment']}"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "

\n"; + echo "

\n"; + echo "
\n"; + } + else echo "

{$lang['strnodata']}

\n"; + } + else{ + global $data, $lang, $_reload_browser, $misc; + + // For databases that don't allow owner change + if (!isset($_POST['owner'])) $_POST['owner'] = ''; + if (!isset($_POST['newschema'])) $_POST['newschema'] = null; + + $status = $data->alterView($_POST['view'], $_POST['name'], $_POST['owner'], $_POST['newschema'], $_POST['comment']); + if ($status == 0) { + // If view has been renamed, need to change to the new name and + // reload the browser frame. + if ($_POST['view'] != $_POST['name']) { + // Jump them to the new view name + $_REQUEST['view'] = $_POST['name']; + // Force a browser reload + $_reload_browser = true; + } + // If schema has changed, need to change to the new schema and reload the browser + if (!empty($_POST['newschema']) && ($_POST['newschema'] != $data->_schema)) { + // Jump them to the new sequence schema + $misc->setCurrentSchema($_POST['newschema']); + $_reload_browser = true; + } + doDefault($lang['strviewaltered']); + } + else doAlter(true, $lang['strviewalteredbad']); + } + } + + function doTree () { + global $misc, $data; + + $reqvars = $misc->getRequestVars('column'); + $columns = $data->getTableAttributes($_REQUEST['view']); + + $attrs = array ( + 'text' => field('attname'), + 'action' => url('colproperties.php', + $reqvars, + array( + 'view' => $_REQUEST['view'], + 'column' => field('attname') + ) + ), + 'icon' => 'Column', + 'iconAction' => url('display.php', + $reqvars, + array( + 'view' => $_REQUEST['view'], + 'column' => field('attname'), + 'query' => replace( + 'SELECT "%column%", count(*) AS "count" FROM %view% GROUP BY "%column%" ORDER BY "%column%"', + array ( + '%column%' => field('attname'), + '%view%' => $_REQUEST['view'] + ) + ) + ) + ), + 'toolTip'=> field('comment') + ); + + $misc->printTreeXML($columns, $attrs); + + exit; + } + + if ($action == 'tree') doTree(); + + /** + * Show view definition and virtual columns + */ + function doDefault($msg = '') { + global $data, $misc; + global $lang; + + function attPre(&$rowdata) { + global $data; + $rowdata->fields['+type'] = $data->formatType($rowdata->fields['type'], $rowdata->fields['atttypmod']); + } + + $misc->printTrail('view'); + $misc->printTabs('view','columns'); + $misc->printMsg($msg); + + // Get view + $vdata = $data->getView($_REQUEST['view']); + // Get columns (using same method for getting a view) + $attrs = $data->getTableAttributes($_REQUEST['view']); + + // Show comment if any + if ($vdata->fields['relcomment'] !== null) + echo "

", $misc->printVal($vdata->fields['relcomment']), "

\n"; + + $columns = array( + 'column' => array( + 'title' => $lang['strcolumn'], + 'field' => field('attname'), + ), + 'type' => array( + 'title' => $lang['strtype'], + 'field' => field('+type'), + ), + 'default' => array( + 'title' => $lang['strdefault'], + 'field' => field('adsrc'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('comment'), + ), + ); + + $actions = array( + 'alter' => array( + 'title' => $lang['stralter'], + 'url' => "viewproperties.php?action=properties&{$misc->href}&view=".urlencode($_REQUEST['view'])."&", + 'vars' => array('column' => 'attname'), + ), + ); + + $misc->printTable($attrs, $columns, $actions, null, 'attPre'); + + echo "
\n"; + + echo "\n"; + } + + $misc->printHeader($lang['strviews'] . ' - ' . $_REQUEST['view']); + $misc->printBody(); + + switch ($action) { + case 'save_edit': + if (isset($_POST['cancel'])) doDefinition(); + else doSaveEdit(); + break; + case 'edit': + doEdit(); + break; + case 'export': + doExport(); + break; + case 'definition': + doDefinition(); + break; + case 'properties': + if (isset($_POST['cancel'])) doDefault(); + else doProperties(); + break; + case 'alter': + if (isset($_POST['alter'])) doAlter(false); + else doDefault(); + break; + case 'confirm_alter': + doAlter(true); + break; + case 'drop': + if (isset($_POST['drop'])) doDrop(false); + else doDefault(); + break; + case 'confirm_drop': + doDrop(true); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/views.php b/php/pgadmin/views.php new file mode 100644 index 0000000..e784103 --- /dev/null +++ b/php/pgadmin/views.php @@ -0,0 +1,726 @@ +printTrail('view'); + $misc->printTitle($lang['strselect'], 'pg.sql.select'); + $misc->printMsg($msg); + + $attrs = $data->getTableAttributes($_REQUEST['view']); + + echo "
\n"; + if ($attrs->recordCount() > 0) { + // JavaScript for select all feature + echo "\n"; + + echo "\n"; + + // Output table header + echo ""; + echo ""; + echo ""; + + $i = 0; + while (!$attrs->EOF) { + $attrs->fields['attnotnull'] = $data->phpBool($attrs->fields['attnotnull']); + // Set up default value if there isn't one already + if (!isset($_REQUEST['values'][$attrs->fields['attname']])) + $_REQUEST['values'][$attrs->fields['attname']] = null; + if (!isset($_REQUEST['ops'][$attrs->fields['attname']])) + $_REQUEST['ops'][$attrs->fields['attname']] = null; + // Continue drawing row + $id = (($i % 2) == 0 ? '1' : '2'); + echo "\n"; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + $i++; + $attrs->moveNext(); + } + // Select all checkbox + echo ""; + echo "
{$lang['strshow']}{$lang['strcolumn']}{$lang['strtype']}{$lang['stroperator']}{$lang['strvalue']}
"; + echo "fields['attname']), "]\"", + isset($_REQUEST['show'][$attrs->fields['attname']]) ? ' checked="checked"' : '', " />", $misc->printVal($attrs->fields['attname']), "", $misc->printVal($data->formatType($attrs->fields['type'], $attrs->fields['atttypmod'])), ""; + echo "", $data->printField("values[{$attrs->fields['attname']}]", + $_REQUEST['values'][$attrs->fields['attname']], $attrs->fields['type']), "
\n"; + } + else echo "

{$lang['strinvalidparam']}

\n"; + + echo "

\n"; + echo "\n"; + echo "\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + else { + if (!isset($_POST['show'])) $_POST['show'] = array(); + if (!isset($_POST['values'])) $_POST['values'] = array(); + if (!isset($_POST['nulls'])) $_POST['nulls'] = array(); + + // Verify that they haven't supplied a value for unary operators + foreach ($_POST['ops'] as $k => $v) { + if ($data->selectOps[$v] == 'p' && $_POST['values'][$k] != '') { + doSelectRows(true, $lang['strselectunary']); + return; + } + } + + if (sizeof($_POST['show']) == 0) + doSelectRows(true, $lang['strselectneedscol']); + else { + // Generate query SQL + $query = $data->getSelectSQL($_REQUEST['view'], array_keys($_POST['show']), + $_POST['values'], $_POST['ops']); + $_REQUEST['query'] = $query; + $_REQUEST['return_url'] = "views.php?action=confselectrows&{$misc->href}&view=". urlencode($_REQUEST['view']); + $_REQUEST['return_desc'] = $lang['strback']; + + $_no_output = true; + include('./display.php'); + exit; + } + } + + } + + /** + * Show confirmation of drop and perform actual drop + */ + function doDrop($confirm) { + global $data, $misc; + global $lang, $_reload_browser; + + if (empty($_REQUEST['view']) && empty($_REQUEST['ma'])) { + doDefault($lang['strspecifyviewtodrop']); + exit(); + } + + if ($confirm) { + $misc->printTrail('view'); + $misc->printTitle($lang['strdrop'],'pg.view.drop'); + + echo "
\n"; + + //If multi drop + if (isset($_REQUEST['ma'])) { + foreach($_REQUEST['ma'] as $v) { + $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES)); + echo "

", sprintf($lang['strconfdropview'], $misc->printVal($a['view'])), "

\n"; + echo '\n"; + } + } + else { + echo "

", sprintf($lang['strconfdropview'], $misc->printVal($_REQUEST['view'])), "

\n"; + echo "\n"; + } + + echo "\n"; + + echo $misc->form; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + } + else { + if (is_array($_POST['view'])) { + $msg=''; + $status = $data->beginTransaction(); + if ($status == 0) { + foreach($_POST['view'] as $s) { + $status = $data->dropView($s, isset($_POST['cascade'])); + if ($status == 0) + $msg.= sprintf('%s: %s
', htmlentities($s), $lang['strviewdropped']); + else { + $data->endTransaction(); + doDefault(sprintf('%s%s: %s
', $msg, htmlentities($s), $lang['strviewdroppedbad'])); + return; + } + } + } + if($data->endTransaction() == 0) { + // Everything went fine, back to the Default page.... + $_reload_browser = true; + doDefault($msg); + } + else doDefault($lang['strviewdroppedbad']); + } + else{ + $status = $data->dropView($_POST['view'], isset($_POST['cascade'])); + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['strviewdropped']); + } + else + doDefault($lang['strviewdroppedbad']); + } + } + + } + + /** + * Sets up choices for table linkage, and which fields to select for the view we're creating + */ + function doSetParamsCreate($msg = '') { + global $data, $misc; + global $lang; + + // Check that they've chosen tables for the view definition + if (!isset($_POST['formTables']) ) doWizardCreate($lang['strviewneedsdef']); + else { + // Initialise variables + if (!isset($_REQUEST['formView'])) $_REQUEST['formView'] = ''; + if (!isset($_REQUEST['formComment'])) $_REQUEST['formComment'] = ''; + + $misc->printTrail('schema'); + $misc->printTitle($lang['strcreateviewwiz'], 'pg.view.create'); + $misc->printMsg($msg); + + $tblCount = sizeof($_POST['formTables']); + //unserialize our schema/table information and store in arrSelTables + for ($i = 0; $i < $tblCount; $i++) { + $arrSelTables[] = unserialize($_POST['formTables'][$i]); + } + + $linkCount = $tblCount; + + //get linking keys + $rsLinkKeys = $data->getLinkingKeys($arrSelTables); + $linkCount = $rsLinkKeys->recordCount() > $tblCount ? $rsLinkKeys->recordCount() : $tblCount; + + $arrFields = array(); //array that will hold all our table/field names + + //if we have schemas we need to specify the correct schema for each table we're retrieiving + //with getTableAttributes + $curSchema = $data->_schema; + for ($i = 0; $i < $tblCount; $i++) { + if ($data->_schema != $arrSelTables[$i]['schemaname']) { + $data->setSchema($arrSelTables[$i]['schemaname']); + } + + $attrs = $data->getTableAttributes($arrSelTables[$i]['tablename']); + while (!$attrs->EOF) { + $arrFields["{$arrSelTables[$i]['schemaname']}.{$arrSelTables[$i]['tablename']}.{$attrs->fields['attname']}"] = serialize(array( + 'schemaname' => $arrSelTables[$i]['schemaname'], + 'tablename' => $arrSelTables[$i]['tablename'], + 'fieldname' => $attrs->fields['attname']) + ); + $attrs->moveNext(); + } + + $data->setSchema($curSchema); + } + asort($arrFields); + + echo "
\n"; + echo "\n"; + echo ""; + echo "\n\n\n"; + echo ""; + echo "\n\n\n"; + echo "
{$lang['strviewname']}
\n"; + // View name + echo "_maxNameLen}\" />\n"; + echo "
{$lang['strcomment']}
\n"; + // View comments + echo "\n"; + echo "
\n"; + + // Output selector for fields to be retrieved from view + echo "\n"; + echo ""; + echo "\n\n"; + echo "
{$lang['strcolumns']}
\n"; + echo GUI::printCombo($arrFields, 'formFields[]', false, '', true); + echo "
"; + echo "
"; + echo "

"; + + // Output the Linking keys combo boxes + echo "\n"; + echo ""; + $rowClass = 'data1'; + for ($i = 0; $i < $linkCount; $i++) { + // Initialise variables + if (!isset($formLink[$i]['operator'])) $formLink[$i]['operator'] = 'INNER JOIN'; + echo "\n\n\n"; + $rowClass = $rowClass == 'data1' ? 'data2' : 'data1'; + } + echo "
{$lang['strviewlink']}
\n"; + + if (!$rsLinkKeys->EOF) { + $curLeftLink = htmlspecialchars(serialize(array('schemaname' => $rsLinkKeys->fields['p_schema'], 'tablename' => $rsLinkKeys->fields['p_table'], 'fieldname' => $rsLinkKeys->fields['p_field']) ) ); + $curRightLink = htmlspecialchars(serialize(array('schemaname' => $rsLinkKeys->fields['f_schema'], 'tablename' => $rsLinkKeys->fields['f_table'], 'fieldname' => $rsLinkKeys->fields['f_field']) ) ); + $rsLinkKeys->moveNext(); + } + else { + $curLeftLink = ''; + $curRightLink = ''; + } + + echo GUI::printCombo($arrFields, "formLink[$i][leftlink]", true, $curLeftLink, false ); + echo GUI::printCombo($data->joinOps, "formLink[$i][operator]", true, $formLink[$i]['operator']); + echo GUI::printCombo($arrFields, "formLink[$i][rightlink]", true, $curRightLink, false ); + echo "
\n
\n"; + + // Build list of available operators (infix only) + $arrOperators = array(); + foreach ($data->selectOps as $k => $v) { + if ($v == 'i') $arrOperators[$k] = $k; + } + + // Output additional conditions, note that this portion of the wizard treats the right hand side as literal values + //(not as database objects) so field names will be treated as strings, use the above linking keys section to perform joins + echo "\n"; + echo ""; + $rowClass = 'data1'; + for ($i = 0; $i < $linkCount; $i++) { + echo "\n\n\n"; + $rowClass = $rowClass == 'data1' ? 'data2' : 'data1'; + } + echo "
{$lang['strviewconditions']}
\n"; + echo GUI::printCombo($arrFields, "formCondition[$i][field]"); + echo GUI::printCombo($arrOperators, "formCondition[$i][operator]", false, false); + echo "\n"; + echo "
\n"; + echo "

\n"; + + foreach ($arrSelTables AS $curTable) { + echo "\n"; + } + + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + } + + /** + * Display a wizard where they can enter a new view + */ + function doWizardCreate($msg = '') { + global $data, $misc; + global $lang; + + $tables = $data->getTables(true); + + $misc->printTrail('schema'); + $misc->printTitle($lang['strcreateviewwiz'], 'pg.view.create'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo ""; + echo "\n\n\n"; + echo "
{$lang['strtables']}
\n"; + + $arrTables = array(); + while (!$tables->EOF) { + $arrTmp = array(); + $arrTmp['schemaname'] = $tables->fields['nspname']; + $arrTmp['tablename'] = $tables->fields['relname']; + $arrTables[$tables->fields['nspname'] . '.' . $tables->fields['relname']] = serialize($arrTmp); + $tables->moveNext(); + } + echo GUI::printCombo($arrTables, 'formTables[]', false, '', true); + + echo "
\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + + /** + * Displays a screen where they can enter a new view + */ + function doCreate($msg = '') { + global $data, $misc, $conf; + global $lang; + + if (!isset($_REQUEST['formView'])) $_REQUEST['formView'] = ''; + if (!isset($_REQUEST['formDefinition'])) $_REQUEST['formDefinition'] = 'SELECT '; + if (!isset($_REQUEST['formComment'])) $_REQUEST['formComment'] = ''; + + $misc->printTrail('schema'); + $misc->printTitle($lang['strcreateview'], 'pg.view.create'); + $misc->printMsg($msg); + + echo "
\n"; + echo "\n"; + echo "\t\n\t\t\n"; + echo "\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\n\t\n"; + echo "\t\n\t\t\n"; + echo "\t\t\n\t\n"; + echo "
{$lang['strname']}_maxNameLen}\" value=\"", + htmlspecialchars($_REQUEST['formView']), "\" />
{$lang['strdefinition']}
{$lang['strcomment']}
\n"; + echo "

\n"; + echo $misc->form; + echo "\n"; + echo "

\n"; + echo "
\n"; + } + + /** + * Actually creates the new view in the database + */ + function doSaveCreate() { + global $data, $lang, $_reload_browser; + + // Check that they've given a name and a definition + if ($_POST['formView'] == '') doCreate($lang['strviewneedsname']); + elseif ($_POST['formDefinition'] == '') doCreate($lang['strviewneedsdef']); + else { + $status = $data->createView($_POST['formView'], $_POST['formDefinition'], false, $_POST['formComment']); + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['strviewcreated']); + } + else + doCreate($lang['strviewcreatedbad']); + } + } + + /** + * Actually creates the new wizard view in the database + */ + function doSaveCreateWiz() { + global $data, $lang, $_reload_browser; + + // Check that they've given a name and fields they want to select + + if (!strlen($_POST['formView']) ) doSetParamsCreate($lang['strviewneedsname']); + else if (!isset($_POST['formFields']) || !count($_POST['formFields']) ) doSetParamsCreate($lang['strviewneedsfields']); + else { + $selFields = ''; + + if (! empty($_POST['dblFldMeth']) ) + $tmpHsh = array(); + + foreach ($_POST['formFields'] AS $curField) { + $arrTmp = unserialize($curField); + $data->fieldArrayClean($arrTmp); + if (! empty($_POST['dblFldMeth']) ) { // doublon control + if (empty($tmpHsh[$arrTmp['fieldname']])) { // field does not exist + $selFields .= "\"{$arrTmp['schemaname']}\".\"{$arrTmp['tablename']}\".\"{$arrTmp['fieldname']}\", "; + $tmpHsh[$arrTmp['fieldname']] = 1; + } else if ($_POST['dblFldMeth'] == 'rename') { // field exist and must be renamed + $tmpHsh[$arrTmp['fieldname']]++; + $selFields .= "\"{$arrTmp['schemaname']}\".\"{$arrTmp['tablename']}\".\"{$arrTmp['fieldname']}\" AS \"{$arrTmp['schemaname']}_{$arrTmp['tablename']}_{$arrTmp['fieldname']}{$tmpHsh[$arrTmp['fieldname']]}\", "; + } + /* field already exist, just ignore this one */ + } else { // no doublon control + $selFields .= "\"{$arrTmp['schemaname']}\".\"{$arrTmp['tablename']}\".\"{$arrTmp['fieldname']}\", "; + } + } + + $selFields = substr($selFields, 0, -2); + unset($arrTmp, $tmpHsh); + $linkFields = ''; + + // If we have links, out put the JOIN ... ON statements + if (is_array($_POST['formLink']) ) { + // Filter out invalid/blank entries for our links + $arrLinks = array(); + foreach ($_POST['formLink'] AS $curLink) { + if (strlen($curLink['leftlink']) && strlen($curLink['rightlink']) && strlen($curLink['operator'])) { + $arrLinks[] = $curLink; + } + } + // We must perform some magic to make sure that we have a valid join order + $count = sizeof($arrLinks); + $arrJoined = array(); + $arrUsedTbls = array(); + + // If we have at least one join condition, output it + if ($count > 0) { + $j = 0; + while ($j < $count) { + foreach ($arrLinks AS $curLink) { + + $arrLeftLink = unserialize($curLink['leftlink']); + $arrRightLink = unserialize($curLink['rightlink']); + $data->fieldArrayClean($arrLeftLink); + $data->fieldArrayClean($arrRightLink); + + $tbl1 = "\"{$arrLeftLink['schemaname']}\".\"{$arrLeftLink['tablename']}\""; + $tbl2 = "\"{$arrRightLink['schemaname']}\".\"{$arrRightLink['tablename']}\""; + + if ( (!in_array($curLink, $arrJoined) && in_array($tbl1, $arrUsedTbls)) || !count($arrJoined) ) { + + // Make sure for multi-column foreign keys that we use a table alias tables joined to more than once + // This can (and should be) more optimized for multi-column foreign keys + $adj_tbl2 = in_array($tbl2, $arrUsedTbls) ? "$tbl2 AS alias_ppa_" . mktime() : $tbl2; + + $linkFields .= strlen($linkFields) ? "{$curLink['operator']} $adj_tbl2 ON (\"{$arrLeftLink['schemaname']}\".\"{$arrLeftLink['tablename']}\".\"{$arrLeftLink['fieldname']}\" = \"{$arrRightLink['schemaname']}\".\"{$arrRightLink['tablename']}\".\"{$arrRightLink['fieldname']}\") " + : "$tbl1 {$curLink['operator']} $adj_tbl2 ON (\"{$arrLeftLink['schemaname']}\".\"{$arrLeftLink['tablename']}\".\"{$arrLeftLink['fieldname']}\" = \"{$arrRightLink['schemaname']}\".\"{$arrRightLink['tablename']}\".\"{$arrRightLink['fieldname']}\") "; + + $arrJoined[] = $curLink; + if (!in_array($tbl1, $arrUsedTbls) ) $arrUsedTbls[] = $tbl1; + if (!in_array($tbl2, $arrUsedTbls) ) $arrUsedTbls[] = $tbl2; + } + } + $j++; + } + } + } + + //if linkfields has no length then either _POST['formLink'] was not set, or there were no join conditions + //just select from all seleted tables - a cartesian join do a + if (!strlen($linkFields) ) { + foreach ($_POST['formTables'] AS $curTable) { + $arrTmp = unserialize($curTable); + $data->fieldArrayClean($arrTmp); + $linkFields .= strlen($linkFields) ? ", \"{$arrTmp['schemaname']}\".\"{$arrTmp['tablename']}\"" : "\"{$arrTmp['schemaname']}\".\"{$arrTmp['tablename']}\""; + } + } + + $addConditions = ''; + if (is_array($_POST['formCondition']) ) { + foreach ($_POST['formCondition'] AS $curCondition) { + if (strlen($curCondition['field']) && strlen($curCondition['txt']) ) { + $arrTmp = unserialize($curCondition['field']); + $data->fieldArrayClean($arrTmp); + $addConditions .= strlen($addConditions) ? " AND \"{$arrTmp['schemaname']}\".\"{$arrTmp['tablename']}\".\"{$arrTmp['fieldname']}\" {$curCondition['operator']} '{$curCondition['txt']}' " + : " \"{$arrTmp['schemaname']}\".\"{$arrTmp['tablename']}\".\"{$arrTmp['fieldname']}\" {$curCondition['operator']} '{$curCondition['txt']}' "; + } + } + } + + $viewQuery = "SELECT $selFields FROM $linkFields "; + + //add where from additional conditions + if (strlen($addConditions) ) $viewQuery .= ' WHERE ' . $addConditions; + + $status = $data->createView($_POST['formView'], $viewQuery, false, $_POST['formComment']); + if ($status == 0) { + $_reload_browser = true; + doDefault($lang['strviewcreated']); + } + else + doSetParamsCreate($lang['strviewcreatedbad']); + } + } + + /** + * Show default list of views in the database + */ + function doDefault($msg = '') { + global $data, $misc, $conf; + global $lang; + + $misc->printTrail('schema'); + $misc->printTabs('schema','views'); + $misc->printMsg($msg); + + $views = $data->getViews(); + + $columns = array( + 'view' => array( + 'title' => $lang['strview'], + 'field' => field('relname'), + 'url' => "redirect.php?subject=view&{$misc->href}&", + 'vars' => array('view' => 'relname'), + ), + 'owner' => array( + 'title' => $lang['strowner'], + 'field' => field('relowner'), + ), + 'actions' => array( + 'title' => $lang['stractions'], + ), + 'comment' => array( + 'title' => $lang['strcomment'], + 'field' => field('relcomment'), + ), + ); + + $actions = array( + 'multiactions' => array( + 'keycols' => array('view' => 'relname'), + 'url' => 'views.php', + ), + 'browse' => array( + 'title' => $lang['strbrowse'], + 'url' => "display.php?{$misc->href}&subject=view&return_url=".urlencode("views.php?{$misc->href}")."&return_desc=".urlencode($lang['strback'])."&", + 'vars' => array('view' => 'relname'), + ), + 'select' => array( + 'title' => $lang['strselect'], + 'url' => "views.php?action=confselectrows&{$misc->href}&", + 'vars' => array('view' => 'relname'), + ), + +// Insert is possible if the relevant rule for the view has been created. +// 'insert' => array( +// 'title' => $lang['strinsert'], +// 'url' => "views.php?action=confinsertrow&{$misc->href}&", +// 'vars' => array('view' => 'relname'), + // ), + + 'alter' => array( + 'title' => $lang['stralter'], + 'url' => "viewproperties.php?action=confirm_alter&{$misc->href}&", + 'vars' => array('view' => 'relname'), + ), + 'drop' => array( + 'title' => $lang['strdrop'], + 'url' => "views.php?action=confirm_drop&{$misc->href}&", + 'vars' => array('view' => 'relname'), + 'multiaction' => 'confirm_drop', + ), + ); + + $misc->printTable($views, $columns, $actions, $lang['strnoviews']); + + echo "\n"; + + } + + /** + * Generate XML for the browser tree. + */ + function doTree() { + global $misc, $data; + + $views = $data->getViews(); + + $reqvars = $misc->getRequestVars('view'); + + $attrs = array( + 'text' => field('relname'), + 'icon' => 'View', + 'iconAction' => url('display.php', $reqvars, array('view' => field('relname'))), + 'toolTip'=> field('relcomment'), + 'action' => url('redirect.php', $reqvars, array('view' => field('relname'))), + 'branch' => url('views.php', $reqvars, + array ( + 'action' => 'subtree', + 'view' => field('relname') + ) + ) + ); + + $misc->printTreeXML($views, $attrs); + exit; + } + + function doSubTree() { + global $misc, $data; + + $tabs = $misc->getNavTabs('view'); + $items = $misc->adjustTabsForTree($tabs); + $reqvars = $misc->getRequestVars('view'); + + $attrs = array( + 'text' => noEscape(field('title')), + 'icon' => field('icon'), + 'action' => url(field('url'), $reqvars, field('urlvars'), array('view' => $_REQUEST['view'])), + 'branch' => ifempty( + field('branch'), '', url(field('url'), field('urlvars'), $reqvars, + array( + 'action' => 'tree', + 'view' => $_REQUEST['view'] + ) + ) + ), + ); + + $misc->printTreeXML($items, $attrs); + exit; + } + + if ($action == 'tree') doTree(); + if ($action == 'subtree') dosubTree(); + + $misc->printHeader($lang['strviews']); + $misc->printBody(); + + switch ($action) { + case 'selectrows': + if (!isset($_REQUEST['cancel'])) doSelectRows(false); + else doDefault(); + break; + case 'confselectrows': + doSelectRows(true); + break; + case 'save_create_wiz': + if (isset($_REQUEST['cancel'])) doDefault(); + else doSaveCreateWiz(); + break; + case 'wiz_create': + doWizardCreate(); + break; + case 'set_params_create': + if (isset($_POST['cancel'])) doDefault(); + else doSetParamsCreate(); + break; + case 'save_create': + if (isset($_REQUEST['cancel'])) doDefault(); + else doSaveCreate(); + break; + case 'create': + doCreate(); + break; + case 'drop': + if (isset($_POST['drop'])) doDrop(false); + else doDefault(); + break; + case 'confirm_drop': + doDrop(true); + break; + default: + doDefault(); + break; + } + + $misc->printFooter(); + +?> diff --git a/php/pgadmin/xloadtree/xloadtree2.js b/php/pgadmin/xloadtree/xloadtree2.js new file mode 100644 index 0000000..b36eed7 --- /dev/null +++ b/php/pgadmin/xloadtree/xloadtree2.js @@ -0,0 +1,507 @@ +/*----------------------------------------------------------------------------\ +| XLoadTree 2 PRE RELEASE | +| | +| This is a pre release and may not be redistributed. | +| Watch http://webfx.eae.net for the final version | +| | +|-----------------------------------------------------------------------------| +| Created by Erik Arvidsson & Emil A Eklund | +| (http://webfx.eae.net/contact.html#erik) | +| (http://webfx.eae.net/contact.html#emil) | +| For WebFX (http://webfx.eae.net/) | +|-----------------------------------------------------------------------------| +| A tree menu system for IE 5.5+, Mozilla 1.4+, Opera 7.5+ | +|-----------------------------------------------------------------------------| +| Copyright (c) 1999 - 2005 Erik Arvidsson & Emil A Eklund | +|-----------------------------------------------------------------------------| +| This software is provided "as is", without warranty of any kind, express or | +| implied, including but not limited to the warranties of merchantability, | +| fitness for a particular purpose and noninfringement. In no event shall the | +| authors or copyright holders be liable for any claim, damages or other | +| liability, whether in an action of contract, tort or otherwise, arising | +| from, out of or in connection with the software or the use or other | +| dealings in the software. | +| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | +| This software is available under the three different licenses mentioned | +| below. To use this software you must chose, and qualify, for one of those. | +| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | +| The WebFX Non-Commercial License http://webfx.eae.net/license.html | +| Permits anyone the right to use the software in a non-commercial context | +| free of charge. | +| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | +| The WebFX Commercial license http://webfx.eae.net/commercial.html | +| Permits the license holder the right to use the software in a commercial | +| context. Such license must be specifically obtained, however it's valid for | +| any number of implementations of the licensed software. | +| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | +| GPL - The GNU General Public License http://www.gnu.org/licenses/gpl.txt | +| Permits anyone the right to use and modify the software without limitations | +| as long as proper credits are given and the original and modified source | +| code are included. Requires that the final product, software derivate from | +| the original source or any software utilizing a GPL component, such as | +| this, is also licensed under the GPL license. | +|-----------------------------------------------------------------------------| +| 2004-02-21 | Pre release distributed to a few selected tester | +| 2005-06-06 | Removed dependency on XML Extras | +|-----------------------------------------------------------------------------| +| Dependencies: xtree2.js Supplies the tree control | +|-----------------------------------------------------------------------------| +| Created 2003-??-?? | All changes are in the log above. | Updated 2004-06-06 | +|-----------------------------------------------------------------------------| +| Note local changes have been made to allow Icons to have different links | +| than thier text label counterparts. Thanks to JGuillaume de Rorthais | +\----------------------------------------------------------------------------*/ + +webFXTreeConfig.loadingText = "Loading..."; +webFXTreeConfig.loadingIcon = "images/loading.gif"; +webFXTreeConfig.errorLoadingText = "Error Loading"; +webFXTreeConfig.errorIcon = "images/exclamation.16.png"; +webFXTreeConfig.reloadText = "Click to reload"; + + +function WebFXLoadTree(sText, sXmlSrc, oAction, sBehavior, sIcon, oIconAction, sOpenIcon) { + WebFXTree.call(this, sText, oAction, sBehavior, sIcon, oIconAction, sOpenIcon); + + // setup default property values + this.src = sXmlSrc; + this.loading = !sXmlSrc; + this.loaded = !sXmlSrc; + this.errorText = ""; + + if (this.src) { + /// add loading Item + this._loadingItem = WebFXLoadTree.createLoadingItem(); + this.add(this._loadingItem); + + if (this.getExpanded()) { + WebFXLoadTree.loadXmlDocument(this); + } + } +} + +WebFXLoadTree.createLoadingItem = function () { + return new WebFXTreeItem(webFXTreeConfig.loadingText, null, null, + webFXTreeConfig.loadingIcon); +}; + +_p = WebFXLoadTree.prototype = new WebFXTree; + +_p.setExpanded = function (b) { + WebFXTree.prototype.setExpanded.call(this, b); + + if (this.src && b) { + if (!this.loaded && !this.loading) { + // load + WebFXLoadTree.loadXmlDocument(this); + } + } +}; + +function WebFXLoadTreeItem(sText, sXmlSrc, oAction, eParent, sIcon, oIconAction, sOpenIcon) { + WebFXTreeItem.call(this, sText, oAction, eParent, sIcon, oIconAction, sOpenIcon); + +// setup default property values + this.src = sXmlSrc; + this.loading = !sXmlSrc; + this.loaded = !sXmlSrc; + this.errorText = ""; + + if (this.src) { + /// add loading Item + this._loadingItem = WebFXLoadTree.createLoadingItem(); + this.add(this._loadingItem); + + if (this.getExpanded()) { + WebFXLoadTree.loadXmlDocument(this); + } + } +} + +_p = WebFXLoadTreeItem.prototype = new WebFXTreeItem; + +_p.setExpanded = function (b) { + WebFXTreeItem.prototype.setExpanded.call(this, b); + + if (this.src && b) { + if (!this.loaded && !this.loading) { + // load + WebFXLoadTree.loadXmlDocument(this); + } + } +}; + +// reloads the src file if already loaded +WebFXLoadTree.prototype.reload = +_p.reload = function () { + // if loading do nothing + if (this.loaded) { + var t = this.getTree(); + var expanded = this.getExpanded(); + var sr = t.getSuspendRedraw(); + t.setSuspendRedraw(true); + + // remove + while (this.childNodes.length > 0) { + this.remove(this.childNodes[this.childNodes.length - 1]); + } + + this.loaded = false; + + this._loadingItem = WebFXLoadTree.createLoadingItem(); + this.add(this._loadingItem); + + if (expanded) { + this.setExpanded(true); + } + + t.setSuspendRedraw(sr); + this.update(); + } else if (this.open && !this.loading) { + WebFXLoadTree.loadXmlDocument(this); + } +}; + + + +WebFXLoadTree.prototype.setSrc = +_p.setSrc = function (sSrc) { + var oldSrc = this.src; + if (sSrc == oldSrc) return; + + var expanded = this.getExpanded(); + + // remove all + this._callSuspended(function () { + // remove + while (this.childNodes.length > 0) + this.remove(this.childNodes[this.childNodes.length - 1]); + }); + this.update(); + + this.loaded = false; + this.loading = false; + if (this._loadingItem) { + this._loadingItem.dispose(); + this._loadingItem = null; + } + this.src = sSrc; + + if (sSrc) { + this._loadingItem = WebFXLoadTree.createLoadingItem(); + this.add(this._loadingItem); + } + + this.setExpanded(expanded); +}; + +WebFXLoadTree.prototype.getSrc = +_p.getSrc = function () { + return this.src; +}; + +WebFXLoadTree.prototype.dispose = function () { + WebFXTree.prototype.dispose.call(this); + if (this._xmlHttp) + { + if (this._xmlHttp.dispose) { + this._xmlHttp.dispose(); + } + try { + this._xmlHttp.onreadystatechange = null; + this._xmlHttp.abort(); + } catch (ex) {} + this._xmlHttp = null; + } +}; + +_p.dispose = function () { + WebFXTreeItem.prototype.dispose.call(this); + if (this._xmlHttp) { + if (this._xmlHttp.dispose) { + this._xmlHttp.dispose(); + } + try { + this._xmlHttp.onreadystatechange = null; + this._xmlHttp.abort(); + } catch (ex) {} + this._xmlHttp = null; + } +}; + + +// The path is divided by '/' and the item is identified by the text +WebFXLoadTree.prototype.openPath = +_p.openPath = function (sPath, bSelect, bFocus) { + // remove any old pending paths to open + delete this._pathToOpen; + //delete this._pathToOpenById; + this._selectPathOnLoad = bSelect; + this._focusPathOnLoad = bFocus; + + if (sPath == "") { + if (bSelect) { + this.select(); + } + if (bFocus) { + window.setTimeout("WebFXTreeAbstractNode._onTimeoutFocus(\"" + this.getId() + "\")", 10); + } + return; + } + + var parts = sPath.split("/"); + var remainingPath = parts.slice(1).join("/"); + + if (sPath.charAt(0) == "/") { + this.getTree().openPath(remainingPath, bSelect, bFocus); + } else { + // open + this.setExpanded(true); + if (this.loaded) { + parts = sPath.split("/"); + var ti = this.findChildByText(parts[0]); + if (!ti) { + throw "Could not find child node with text \"" + parts[0] + "\""; + } + + ti.openPath(remainingPath, bSelect, bFocus); + } else { + this._pathToOpen = sPath; + } + } +}; + + +// Opera has some serious attribute problems. We need to use getAttribute +// for certain attributes +WebFXLoadTree._attrs = ["text", "src", "action", "id", "target"]; + +WebFXLoadTree.createItemFromElement = function (oNode) { + var jsAttrs = {}; + var i, l; + + l = oNode.attributes.length; + for (i = 0; i < l; i++) { + oNode.attributes[i].nodeValue = String(oNode.attributes[i].nodeValue).replace(/&/g, "&"); // replace for Safari fix for DOM Bug + if (oNode.attributes[i] == null) { + continue; + } + jsAttrs[oNode.attributes[i].nodeName] = oNode.attributes[i].nodeValue; + } + + var name, val; + for (i = 0; i < WebFXLoadTree._attrs.length; i++) { + name = WebFXLoadTree._attrs[i]; + value = oNode.getAttribute(name); + if (value) { + jsAttrs[name] = value; + } + } + + var action; + if (jsAttrs.onaction) { + action = new Function(jsAttrs.onaction); + } else if (jsAttrs.action) { + action = jsAttrs.action; + } + var jsNode = new WebFXLoadTreeItem(jsAttrs.html || "", jsAttrs.src, action, + null, jsAttrs.icon, jsAttrs.iconaction, jsAttrs.openicon); + if (jsAttrs.text) { + jsNode.setText(jsAttrs.text); + } + + if (jsAttrs.target) { + jsNode.target = jsAttrs.target; + } + if (jsAttrs.id) { + jsNode.setId(jsAttrs.id); + } + if (jsAttrs.tooltip) { + jsNode.toolTip = jsAttrs.tooltip; + } + if (jsAttrs.expanded) { + jsNode.setExpanded(jsAttrs.expanded != "false"); + } + if (jsAttrs.onload) { + jsNode.onload = new Function(jsAttrs.onload); + } + if (jsAttrs.onerror) { + jsNode.onerror = new Function(jsAttrs.onerror); + } + + jsNode.attributes = jsAttrs; + + // go through childNodes + var cs = oNode.childNodes; + l = cs.length; + for (i = 0; i < l; i++) { + if (cs[i].tagName == "tree") { + jsNode.add(WebFXLoadTree.createItemFromElement(cs[i])); + } + } + + return jsNode; +}; + +WebFXLoadTree.loadXmlDocument = function (jsNode) { + if (jsNode.loading || jsNode.loaded) { + return; + } + jsNode.loading = true; + var id = jsNode.getId(); + jsNode._xmlHttp = window.XMLHttpRequest ? new XMLHttpRequest : new window.ActiveXObject("Microsoft.XmlHttp"); + jsNode._xmlHttp.open("GET", jsNode.src, true); // async + jsNode._xmlHttp.onreadystatechange = new Function("WebFXLoadTree._onload(\"" + id + "\")"); + + // call in new thread to allow ui to update + window.setTimeout("WebFXLoadTree._ontimeout(\"" + id + "\")", 10); +}; + +WebFXLoadTree._onload = function (sId) { + var jsNode = webFXTreeHandler.all[sId]; + if (jsNode._xmlHttp.readyState == 4) { + WebFXLoadTree.documentLoaded(jsNode); + webFXLoadTreeQueue.remove(jsNode); + if (jsNode._xmlHttp.dispose) + jsNode._xmlHttp.dispose(); + jsNode._xmlHttp = null; + } +}; + +WebFXLoadTree._ontimeout = function (sId) { + var jsNode = webFXTreeHandler.all[sId]; + webFXLoadTreeQueue.add(jsNode); +}; + + + +// Inserts an xml document as a subtree to the provided node +WebFXLoadTree.documentLoaded = function (jsNode) { + if (jsNode.loaded) { + return; + } + + jsNode.errorText = ""; + jsNode.loaded = true; + jsNode.loading = false; + + var t = jsNode.getTree(); + var oldSuspend = t.getSuspendRedraw(); + t.setSuspendRedraw(true); + + var doc = jsNode._xmlHttp.responseXML; + + // check that the load of the xml file went well + if(!doc || doc.parserError && doc.parseError.errorCode != 0 || !doc.documentElement) { + if (!doc || doc.parseError.errorCode == 0) { + jsNode.errorText = webFXTreeConfig.errorLoadingText + " " + jsNode.src + " (" + jsNode._xmlHttp.status + ": " + jsNode._xmlHttp.statusText + ")"; + } else { + jsNode.errorText = webFXTreeConfig.errorLoadingText + " " + jsNode.src + " (" + doc.parseError.reason + ")"; + } + } else { + // there is one extra level of tree elements + var root = doc.documentElement; + + // loop through all tree children + var count = 0; + var cs = root.childNodes; + var l = cs.length; + var newNode; + for (var i = 0; i < l; i++) { + if (cs[i].tagName == "tree") { + newNode=WebFXLoadTree.createItemFromElement(cs[i]); + jsNode.add(newNode); + count++; + } + } + + if (count == 1 && newNode.childNodes.length) { + var parent=jsNode.parentNode; + newNode.setExpanded(true); + } + // if no children we got an error + if (count == 0) { + jsNode.errorText = webFXTreeConfig.errorLoadingText + " " + jsNode.src + " (???)"; + } + } + + if (jsNode.errorText != "") { + jsNode._loadingItem.icon = webFXTreeConfig.errorIcon; + jsNode._loadingItem.text = jsNode.errorText; + jsNode._loadingItem.action = WebFXLoadTree._reloadParent; + jsNode._loadingItem.toolTip = webFXTreeConfig.reloadText; + + t.setSuspendRedraw(oldSuspend); + + jsNode._loadingItem.update(); + + if (typeof jsNode.onerror == "function") { + jsNode.onerror(); + } + } else { + // remove dummy + if (jsNode._loadingItem != null) { + jsNode.remove(jsNode._loadingItem); + } + + if (jsNode._pathToOpen) { + jsNode.openPath(jsNode._pathToOpen, jsNode._selectPathOnLoad, jsNode._focusPathOnLoad); + } + + t.setSuspendRedraw(oldSuspend); + jsNode.update(); + if (typeof jsNode.onload == "function") { + jsNode.onload(); + } + } +}; + +WebFXLoadTree._reloadParent = function () { + this.getParent().reload(); +}; + + + + + + + +var webFXLoadTreeQueue = { + _nodes: [], + _ie: /msie/i.test(navigator.userAgent), + _opera: /opera/i.test(navigator.userAgent), + + add: function (jsNode) { + if (this._ie || this._opera) { + this._nodes.push(jsNode); + if (this._nodes.length == 1) { + this._send(); + } + } else { + jsNode._xmlHttp.send(null); + } + }, + + remove: function (jsNode) { + if (this._ie || this._opera) { + arrayHelper.remove(this._nodes, jsNode); + if (this._nodes.length > 0) { + this._send(); + } + } + }, + + // IE only + _send: function () { + var id = this._nodes[0].getId(); + var jsNode = webFXTreeHandler.all[id]; + if (!jsNode) { + return; + } + // if no _xmlHttp then remove it + if (!jsNode._xmlHttp) { + this.remove(jsNode); + } else { + jsNode._xmlHttp.send(null); + } + } +}; diff --git a/php/pgadmin/xloadtree/xtree2.js b/php/pgadmin/xloadtree/xtree2.js new file mode 100644 index 0000000..c7feecb --- /dev/null +++ b/php/pgadmin/xloadtree/xtree2.js @@ -0,0 +1,1621 @@ +/*----------------------------------------------------------------------------\ +| XTree 2 PRE RELEASE | +| | +| This is a pre release and redistribution is discouraged. | +| Watch http://webfx.eae.net for the final version | +| | +|-----------------------------------------------------------------------------| +| Created by Erik Arvidsson & Emil A Eklund | +| (http://webfx.eae.net/contact.html#erik) | +| (http://webfx.eae.net/contact.html#emil) | +| For WebFX (http://webfx.eae.net/) | +|-----------------------------------------------------------------------------| +| A tree menu system for IE 5.5+, Mozilla 1.4+, Opera 7, KHTML | +|-----------------------------------------------------------------------------| +| Copyright (c) 1999 - 2005 Erik Arvidsson & Emil A Eklund | +|-----------------------------------------------------------------------------| +| This software is provided "as is", without warranty of any kind, express or | +| implied, including but not limited to the warranties of merchantability, | +| fitness for a particular purpose and noninfringement. In no event shall the | +| authors or copyright holders be liable for any claim, damages or other | +| liability, whether in an action of contract, tort or otherwise, arising | +| from, out of or in connection with the software or the use or other | +| dealings in the software. | +| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | +| This software is available under the three different licenses mentioned | +| below. To use this software you must chose, and qualify, for one of those. | +| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | +| The WebFX Non-Commercial License http://webfx.eae.net/license.html | +| Permits anyone the right to use the software in a non-commercial context | +| free of charge. | +| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | +| The WebFX Commercial license http://webfx.eae.net/commercial.html | +| Permits the license holder the right to use the software in a commercial | +| context. Such license must be specifically obtained, however it's valid for | +| any number of implementations of the licensed software. | +| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | +| GPL - The GNU General Public License http://www.gnu.org/licenses/gpl.txt | +| Permits anyone the right to use and modify the software without limitations | +| as long as proper credits are given and the original and modified source | +| code are included. Requires that the final product, software derivate from | +| the original source or any software utilizing a GPL component, such as | +| this, is also licensed under the GPL license. | +|-----------------------------------------------------------------------------| +| 2004-02-21 | Pre release distributed to a few selected tester | +| 2005-06-06 | Added single tab index to improve keyboard navigation | +|-----------------------------------------------------------------------------| +| Dependencies: xtree2.css Used to define the look and feel | +|-----------------------------------------------------------------------------| +| Created 2003-??-?? | All changes are in the log above. | Updated 2004-06-06 | +\----------------------------------------------------------------------------*/ + + +// +// WebFXTreePersisitance +function WebFXTreePersistence() {} +var _p = WebFXTreePersistence.prototype; +_p.getExpanded = function (oNode) { return false; }; +_p.setExpanded = function (oNode, bOpen) {}; + + + +// Cookie handling +function WebFXCookie() {} + +_p = WebFXCookie.prototype; + +_p.setCookie = function (sName, sValue, nDays) { + var expires = ""; + if (typeof nDays == "number") { + var d = new Date(); + d.setTime(d.getTime() + nDays * 24 * 60 * 60 * 1000); + expires = "; expires=" + d.toGMTString(); + } + + document.cookie = sName + "=" + escape(sValue) + expires + "; path=/"; +}; + +_p.getCookie = function (sName) { + var re = new RegExp("(\;|^)[^;]*(" + sName + ")\=([^;]*)(;|$)"); + var res = re.exec(document.cookie); + return res != null ? unescape(res[3]) : null; +}; + +_p.removeCookie = function (name) { + this.setCookie(name, "", -1); +}; + + +// +// persistence using cookies +// +// This is uses one cookie with the ids of the expanded nodes separated using '+' +// +function WebFXTreeCookiePersistence() { + this._openedMap = {}; + this._cookies = new WebFXCookie; + var s = this._cookies.getCookie(this.cookieName); + if (s) { + var a = s.split("+"); + for (var i = a.length - 1; i >= 0; i--) + this._openedMap[a[i]] = true; + } +} + +_p = WebFXTreeCookiePersistence.prototype = new WebFXTreePersistence; + +_p.cookieName = "webfx-tree-cookie-persistence" + +_p.getExpanded = function (oNode) { + return oNode.id in this._openedMap; +}; + +_p.setExpanded = function (oNode, bOpen) { + var old = this.getExpanded(oNode); + if (old != bOpen) { + if (bOpen) { + this._openedMap[oNode.id] = true; + } else { + delete this._openedMap[oNode.id]; + } + + var res = []; + var i = 0; + for (var id in this._openedMap) + res[i++] = id; + this._cookies.setCookie(this.cookieName, res.join("+")); + } +}; + + + +// this object provides a few useful methods when working with arrays +var arrayHelper = { + indexOf: function (a, o) { + for (var i = 0; i < a.length; i++) { + if (a[i] == o) { + return i; + } + } + return -1; + }, + + insertBefore: function (a, o, o2) { + var i = this.indexOf(a, o2); + if (i == -1) { + a.push(o); + } else { + a.splice(i, 0, o); + } + }, + + remove: function (a, o) { + var i = this.indexOf(a, o); + if (i != -1) { + a.splice(i, 1); + } + } +}; + +/////////////////////////////////////////////////////////////////////////////// +// WebFX Tree Config object // +/////////////////////////////////////////////////////////////////////////////// +var webFXTreeConfig = { + rootIcon : "images/folder.png", + openRootIcon : "images/openfolder.png", + folderIcon : "images/folder.png", + openFolderIcon : "images/openfolder.png", + fileIcon : "images/file.png", + iIcon : "images/I.png", + lIcon : "images/L.png", + lMinusIcon : "images/Lminus.png", + lPlusIcon : "images/Lplus.png", + tIcon : "images/T.png", + tMinusIcon : "images/Tminus.png", + tPlusIcon : "images/Tplus.png", + plusIcon : "images/plus.png", + minusIcon : "images/minus.png", + blankIcon : "images/blank.png", + defaultText : "Tree Item", + defaultAction : null, + defaultBehavior : "classic", + usePersistence : true +}; + +/////////////////////////////////////////////////////////////////////////////// +// WebFX Tree Handler object // +/////////////////////////////////////////////////////////////////////////////// + +var webFXTreeHandler = { + ie: /msie/i.test(navigator.userAgent), + opera: /opera/i.test(navigator.userAgent), + idCounter: 0, + idPrefix: "wfxt-", + getUniqueId: function () { + return this.idPrefix + this.idCounter++; + }, + all: {}, + getNodeById: function (sId) { + return all[sId]; + }, + addNode: function (oNode) { + this.all[oNode.id] = oNode; + }, + removeNode: function (oNode) { + delete this.all[oNode.id]; + }, + + handleEvent: function (e) { + var el = e.target || e.srcElement; + while (el != null && !this.all[el.id]) { + el = el.parentNode; + } + + if (el == null) { + return false; + } + var node = this.all[el.id]; + if (typeof node["_on" + e.type] == "function") { + return node["_on" + e.type](e); + } + return false; + }, + + dispose: function () { + if (this.disposed) return; + for (var id in this.all) { + this.all[id].dispose(); + } + this.disposed = true; + }, + + htmlToText: function (s) { + return String(s).replace(/\s+|<([^>])+>|&|<|>|"| /gi, this._htmlToText); + }, + + _htmlToText: function (s) { + switch (s) { + case "&": + return "&"; + case "<": + return "<"; + case ">": + return ">"; + case """: + return "\""; + case " ": + return String.fromCharCode(160); + default: + if (/\s+/.test(s)) { + return " "; + } + if (/^
|\n|\"|\u00A0/g, this._textToHtml); + }, + + _textToHtml: function (s) { + switch (s) { + case "&": + return "&"; + case "<": + return "<"; + case ">": + return ">"; + case "\n": + return "
"; + case "\"": + return """; // so we can use this in attributes + default: + return " "; + } + }, + + persistenceManager: new WebFXTreeCookiePersistence() +}; + + +/////////////////////////////////////////////////////////////////////////////// +// WebFXTreeAbstractNode +/////////////////////////////////////////////////////////////////////////////// + +function WebFXTreeAbstractNode(sText, oAction, oIconAction) { + this.childNodes = []; + if (sText) this.text = sText; + if (oAction) this.action = oAction; + if (oIconAction) this.iconAction = oIconAction; + this.id = webFXTreeHandler.getUniqueId(); + if (webFXTreeConfig.usePersistence) { + this.open = webFXTreeHandler.persistenceManager.getExpanded(this); + } + webFXTreeHandler.addNode(this); +} + + +_p = WebFXTreeAbstractNode.prototype; +_p._selected = false; +_p.indentWidth = 19; +_p.open = false; +_p.text = webFXTreeConfig.defaultText; +_p.action = null; +_p.iconAcion = null; +_p.target = null; +_p.toolTip = null; +_p._focused = false; + +/* begin tree model */ + +_p.add = function (oChild, oBefore) { + var oldLast; + var emptyBefore = this.childNodes.length == 0; + var p = oChild.parentNode; + + if (oBefore == null) { // append + if (p != null) + p.remove(oChild); + oldLast = this.getLastChild(); + this.childNodes.push(oChild); + } else { // insertBefore + if (oBefore.parentNode != this) { + throw new Error("Can only add nodes before siblings"); + } + if (p != null) { + p.remove(oChild); + } + + arrayHelper.insertBefore(this.childNodes, oChild, oBefore); + } + + if (oBefore) { + if (oBefore == this.firstChild) { + this.firstChild = oChild; + } + oChild.previousSibling = oBefore.previousSibling; + oBefore.previousSibling = oChild; + oChild.nextSibling = oBefore; + } else { + if (!this.firstChild) { + this.firstChild = oChild; + } + if (this.lastChild) { + this.lastChild.nextSibling = oChild; + } + oChild.previousSibling = this.lastChild; + this.lastChild = oChild; + } + + oChild.parentNode = this; + var t = this.getTree(); + if (t) { + oChild.tree = t; + } + var d = this.getDepth(); + if (d != null) { + oChild.depth = d + 1; + } + + if (this.getCreated() && !t.getSuspendRedraw()) { + var el = this.getChildrenElement(); + var newEl = oChild.create(); + var refEl = oBefore ? oBefore.getElement() : null; + el.insertBefore(newEl, refEl); + + if (oldLast) { + oldLast.updateExpandIcon(); + } + if (emptyBefore) { + this.setExpanded(this.getExpanded()); + // if we are using classic expand will not update icon + if (t && t.getBehavior() != "classic") + this.updateIcon(); + } + } + + return oChild; +}; + + + +_p.remove = function (oChild) { + // backwards compatible. If no argument remove the node + if (arguments.length == 0) { + if (this.parentNode) { + return this.parentNode.remove(this); + } + return null; + } + + // if we remove selected or tree with the selected we should select this + var t = this.getTree(); + var si = t ? t.getSelected() : null; + if (si == oChild || oChild.contains(si)) { + if (si.getFocused()) { + this.select(); + window.setTimeout("WebFXTreeAbstractNode._onTimeoutFocus(\"" + this.id + "\")", 10); + } else { + this.select(); + } + } + + if (oChild.parentNode != this) { + throw new Error("Can only remove children"); + } + arrayHelper.remove(this.childNodes, oChild); + + if (this.lastChild == oChild) { + this.lastChild = oChild.previousSibling; + } + if (this.firstChild == oChild) { + this.firstChild = oChild.nextSibling; + } + if (oChild.previousSibling) { + oChild.previousSibling.nextSibling = oChild.nextSibling; + } + if (oChild.nextSibling) { + oChild.nextSibling.previousSibling = oChild.previousSibling; + } + + var wasLast = oChild.isLastSibling(); + + oChild.parentNode = null; + oChild.tree = null; + oChild.depth = null; + + if (t && this.getCreated() && !t.getSuspendRedraw()) { + var el = this.getChildrenElement(); + var childEl = oChild.getElement(); + el.removeChild(childEl); + if (wasLast) { + var newLast = this.getLastChild(); + if (newLast) { + newLast.updateExpandIcon(); + } + } + if (!this.hasChildren()) { + el.style.display = "none"; + this.updateExpandIcon(); + this.updateIcon(); + } + } + + return oChild; +}; + +WebFXTreeAbstractNode._onTimeoutFocus = function (sId) { + var jsNode = webFXTreeHandler.all[sId]; + jsNode.focus(); +}; + +_p.getId = function () { + return this.id; +}; + +_p.getTree = function () { + throw new Error("getTree called on Abstract Node"); +}; + +_p.getDepth = function () { + throw new Error("getDepth called on Abstract Node"); +}; + +_p.getCreated = function () { + var t = this.getTree(); + return t && t.rendered; +}; + +_p.getParent = function () { + return this.parentNode; +}; + +_p.contains = function (oDescendant) { + if (oDescendant == null) return false; + if (oDescendant == this) return true; + var p = oDescendant.parentNode; + return this.contains(p); +}; + +_p.getChildren = _p.getChildNodes = function () { + return this.childNodes; +}; + +_p.getFirstChild = function () { + return this.childNodes[0]; +}; + +_p.getLastChild = function () { + return this.childNodes[this.childNodes.length - 1]; +}; + +_p.getPreviousSibling = function () { + return this.previousSibling; + //var p = this.parentNode; + //if (p == null) return null; + //var cs = p.childNodes; + //return cs[arrayHelper.indexOf(cs, this) - 1] +}; + +_p.getNextSibling = function () { + return this.nextSibling; + //var p = this.parentNode; + //if (p == null) return null; + //var cs = p.childNodes; + //return cs[arrayHelper.indexOf(cs, this) + 1] +}; + +_p.hasChildren = function () { + return this.childNodes.length > 0; +}; + +_p.isLastSibling = function () { + return this.nextSibling == null; + //return this.parentNode && this == this.parentNode.getLastChild(); +}; + +_p.findChildByText = function (s, n) { + if (!n) { + n = 0; + } + var isRe = s instanceof RegExp; + for (var i = 0; i < this.childNodes.length; i++) { + if (isRe && s.test(this.childNodes[i].getText()) || + this.childNodes[i].getText() == s) { + if (n == 0) { + return this.childNodes[i]; + } + n--; + } + } + return null; +}; + +_p.findNodeByText = function (s, n) { + if (!n) { + n = 0; + } + var isRe = s instanceof RegExp; + if (isRe && s.test(this.getText()) || this.getText() == s) { + if (n == 0) { + return this.childNodes[i]; + } + n--; + } + + var res; + for (var i = 0; i < this.childNodes.length; i++) { + res = this.childNodes[i].findNodeByText(s, n); + if (res) { + return res; + } + } + return null; +}; + +/* end tree model */ + +_p.setId = function (sId) { + var el = this.getElement(); + webFXTreeHandler.removeNode(this); + this.id = sId; + if (el) { + el.id = sId; + } + webFXTreeHandler.addNode(this); +}; + +_p.isSelected = function () { + return this._selected; +}; + +_p.select = function () { + this._setSelected(true); +}; + +_p.deselect = function () { + this._setSelected(false); +}; + +_p._setSelected = function (b) { + var t = this.getTree(); + if (!t) return; + if (this._selected != b) { + this._selected = b; + + var wasFocused = false; // used to keep focus state + var si = t.getSelected(); + if (b && si != null && si != this) { + var oldFireChange = t._fireChange; + wasFocused = si._focused; + t._fireChange = false; + si._setSelected(false); + t._fireChange = oldFireChange; + } + + var el = this.getRowElement(); + if (el) { + el.className = this.getRowClassName(); + } + if (b) { + this._setTabIndex(t.tabIndex); + t._selectedItem = this; + t._fireOnChange(); + t.setSelected(this); + if (wasFocused) { + this.focus(); + } + } else { + this._setTabIndex(-1); + } + + if (t.getBehavior() != "classic") { + this.updateIcon(); + } + } +}; + + +_p.getExpanded = function () { + return this.open; +}; + +_p.setExpanded = function (b) { + var ce; + this.open = b; + var t = this.getTree(); + if (this.hasChildren()) { + var si = t ? t.getSelected() : null; + if (!b && this.contains(si)) { + this.select(); + } + + var el = this.getElement(); + if (el) { + ce = this.getChildrenElement(); + if (ce) { + ce.style.display = b ? "block" : "none"; + } + var eie = this.getExpandIconElement(); + if (eie) { + eie.src = this.getExpandIconSrc(); + } + } + + if (webFXTreeConfig.usePersistence) { + webFXTreeHandler.persistenceManager.setExpanded(this, b); + } + } else { + ce = this.getChildrenElement(); + if (ce) + ce.style.display = "none"; + } + if (t && t.getBehavior() == "classic") { + this.updateIcon(); + } +}; + +_p.toggle = function () { + this.setExpanded(!this.getExpanded()); +}; + +_p.expand = function () { + this.setExpanded(true); +}; + +_p.collapse = function () { + this.setExpanded(false); +}; + +_p.collapseChildren = function () { + var cs = this.childNodes; + for (var i = 0; i < cs.length; i++) { + cs[i].collapseAll(); + } +}; + +_p.collapseAll = function () { + this.collapseChildren(); + this.collapse(); +}; + +_p.expandChildren = function () { + var cs = this.childNodes; + for (var i = 0; i < cs.length; i++) { + cs[i].expandAll(); + } +}; + +_p.expandAll = function () { + this.expandChildren(); + this.expand(); +}; + +_p.reveal = function () { + var p = this.getParent(); + if (p) { + p.setExpanded(true); + p.reveal(); + } +}; + +_p.openPath = function (sPath, bSelect, bFocus) { + if (sPath == "") { + if (bSelect) { + this.select(); + } + if (bFocus) { + window.setTimeout("WebFXTreeAbstractNode._onTimeoutFocus(\"" + this.id + "\")", 10); + } + return; + } + + var parts = sPath.split("/"); + var remainingPath = parts.slice(1).join("/"); + var t = this.getTree(); + if (sPath.charAt(0) == "/") { + if (t) { + t.openPath(remainingPath, bSelect, bFocus); + } else { + throw "Invalid path"; + } + } else { + // open + this.setExpanded(true); + parts = sPath.split("/"); + var ti = this.findChildByText(parts[0]); + if (!ti) { + throw "Could not find child node with text \"" + parts[0] + "\""; + } + ti.openPath(remainingPath, bSelect, bFocus); + } +}; + +_p.focus = function () { + var el = this.getLabelElement(); + if (el) { + el.focus(); + } +}; + +_p.getFocused = function () { + return this._focused; +}; + +_p._setTabIndex = function (i) { + var a = this.getLabelElement(); + if (a) { + a.setAttribute("tabindex", i); + } +}; + + +// HTML generation + +_p.toHtml = function () { + var sb = []; + var cs = this.childNodes; + var l = cs.length; + for (var y = 0; y < l; y++) { + sb[y] = cs[y].toHtml(); + } + + var t = this.getTree(); + var hideLines = !t.getShowLines() || t == this.parentNode && !t.getShowRootLines(); + + var childrenHtml = "
" + + sb.join("") + + "
"; + + return "
" + + this.getRowHtml() + + childrenHtml + + "
"; +}; + +_p.getRowHtml = function () { + var t = this.getTree(); + return "
" + + this.getExpandIconHtml() + + //"" + + this.getIconHtml() + + this.getLabelHtml() + + //"" + + "
"; +}; + +_p.getRowClassName = function () { + return "webfx-tree-row" + (this.isSelected() ? " selected" : "") + + (this.action ? "" : " no-action"); +}; + +_p.getLabelHtml = function () { + var toolTip = this.getToolTip(); + var target = this.getTarget(); + var link = this._getHref(); + + if (link == '#') { + return "" + + this.getHtml() + ""; + } + + return "" + + this.getHtml() + ""; +}; + +_p._getHref = function () { + if (typeof this.action == "string") + return this.action; + else + return "#"; +}; + +_p._getIconHref = function () { + if (typeof this.iconAction == "string") + return this.iconAction; + else + return this._getHref(); +} + +_p.getEventHandlersHtml = function () { + return ""; +}; + +_p.getIconHtml = function () { + // here we are not using textToHtml since the file names rarerly contains + // HTML... + var link = this._getIconHref(); + if (link == '#') + return " "; + + return ""; +}; + +_p.getIconSrc = function () { + throw new Error("getIconSrc called on Abstract Node"); +}; + +_p.getExpandIconHtml = function () { + // here we are not using textToHtml since the file names rarerly contains + // HTML... + return ""; +}; + + +_p.getExpandIconSrc = function () { + var src; + var t = this.getTree(); + var hideLines = !t.getShowLines() || t == this.parentNode && !t.getShowRootLines(); + + if (this.hasChildren()) { + var bits = 0; + /* + Bitmap used to determine which icon to use + 1 Plus + 2 Minus + 4 T Line + 8 L Line + */ + + if (t && t.getShowExpandIcons()) { + if (this.getExpanded()) { + bits = 2; + } else { + bits = 1; + } + } + + if (t && !hideLines) { + if (this.isLastSibling()) { + bits += 4; + } else { + bits += 8; + } + } + + switch (bits) { + case 1: + return webFXTreeConfig.plusIcon; + case 2: + return webFXTreeConfig.minusIcon; + case 4: + return webFXTreeConfig.lIcon; + case 5: + return webFXTreeConfig.lPlusIcon; + case 6: + return webFXTreeConfig.lMinusIcon; + case 8: + return webFXTreeConfig.tIcon; + case 9: + return webFXTreeConfig.tPlusIcon; + case 10: + return webFXTreeConfig.tMinusIcon; + default: // 0 + return webFXTreeConfig.blankIcon; + } + } else { + if (t && hideLines) { + return webFXTreeConfig.blankIcon; + } else if (this.isLastSibling()) { + return webFXTreeConfig.lIcon; + } else { + return webFXTreeConfig.tIcon; + } + } +}; + +_p.getLineStyle = function () { + return "background-position:" + this.getLineStyle2() + ";"; +}; + +_p.getLineStyle2 = function () { + return (this.isLastSibling() ? "-100" : (this.getDepth() - 1) * this.indentWidth) + "px 0"; +}; + +// End HTML generation + +// DOM +// this returns the div for the tree node +_p.getElement = function () { + return document.getElementById(this.id); +}; + +// the row is the div that is used to draw the node without the children +_p.getRowElement = function () { + var el = this.getElement(); + if (!el) return null; + return el.firstChild; +}; + +// plus/minus image +_p.getExpandIconElement = function () { + var el = this.getRowElement(); + if (!el) return null; + return el.firstChild; +}; + +_p.getIconElement = function () { + var el = this.getRowElement(); + if (!el) return null; + return el.childNodes[1]; +}; + +// anchor element +_p.getLabelElement = function () { + var el = this.getRowElement(); + if (!el) return null; + return el.lastChild; +}; + +// the div containing the children +_p.getChildrenElement = function () { + var el = this.getElement(); + if (!el) return null; + return el.lastChild; +}; + + +// IE uses about:blank if not attached to document and this can cause Win2k3 +// to fail +if (webFXTreeHandler.ie) { + _p.create = function () { + var dummy = document.createElement("div"); + dummy.style.display = "none"; + document.body.appendChild(dummy); + dummy.innerHTML = this.toHtml(); + var res = dummy.removeChild(dummy.firstChild); + document.body.removeChild(dummy); + return res; + }; +} else { + _p.create = function () { + var dummy = document.createElement("div"); + dummy.innerHTML = this.toHtml(); + return dummy.removeChild(dummy.firstChild); + }; +} + +// Getters and setters for some common fields + +_p.setIcon = function (s) { + this.icon = s; + if (this.getCreated()) { + this.updateIcon(); + } +}; + +_p.getIcon = function () { + return this.icon; +}; + +_p.setOpenIcon = function (s) { + this.openIcon = s; + if (this.getCreated()) { + this.updateIcon(); + } +}; + +_p.getOpenIcon = function () { + return this.openIcon; +}; + +_p.setText = function (s) { + this.setHtml(webFXTreeHandler.textToHtml(s)); +}; + +_p.getText = function () { + return webFXTreeHandler.htmlToText(this.getHtml()); +}; + +_p.setHtml = function (s) { + this.text = s; + var el = this.getLabelElement(); + if (el) { + el.innerHTML = s; + } +}; + +_p.getHtml = function () { + return this.text; +}; + +_p.setTarget = function (s) { + this.target = s; +}; + +_p.getTarget = function () { + return this.target; +}; + +_p.setToolTip = function (s) { + this.toolTip = s; + var el = this.getLabelElement(); + if (el) { + el.title = s; + } +}; + +_p.getToolTip = function () { + return this.toolTip; +}; + +_p.setAction = function (oAction) { + this.action = oAction; + var el = this.getLabelElement(); + if (el) { + el.href = this._getHref(); + } + el = this.getRowElement(); + if (el) { + el.className = this.getRowClassName(); + } +}; + +_p.getAction = function () { + return this.action; +}; + +_p.setIconAction = function (oAction) { + this.iconAction = oAction; + var el = this.getIconElement(); + if (el) { + el.href = this._getIconHref(); + } +} + +_p.getIconAction = function () { + if (this.iconAction) + return this.iconAction; + return _p.getAction(); +}; + +// update methods + +_p.update = function () { + var t = this.getTree(); + if (t.suspendRedraw) return; + var el = this.getElement(); + if (!el || !el.parentNode) return; + var newEl = this.create(); + el.parentNode.replaceChild(newEl, el); + this._setTabIndex(this.tabIndex); // in case root had the tab index + var si = t.getSelected(); + if (si && si.getFocused()) { + si.focus(); + } +}; + +_p.updateExpandIcon = function () { + var t = this.getTree(); + if (t.suspendRedraw) return; + var img = this.getExpandIconElement(); + img.src = this.getExpandIconSrc(); + var cel = this.getChildrenElement(); + cel.style.backgroundPosition = this.getLineStyle2(); +}; + +_p.updateIcon = function () { + var t = this.getTree(); + if (t.suspendRedraw) return; + var img = this.getIconElement(); + img.src = this.getIconSrc(); +}; + +// End DOM + +_p._callSuspended = function (f) { + var t = this.getTree(); + var sr = t.getSuspendRedraw(); + t.setSuspendRedraw(true); + f.call(this); + t.setSuspendRedraw(sr); +}; + +// Event handlers + +_p._onmousedown = function (e) { + var el = e.target || e.srcElement; + // expand icon + if (/webfx-tree-expand-icon/.test(el.className) && this.hasChildren()) { + this.toggle(); + if (webFXTreeHandler.ie) { + window.setTimeout("WebFXTreeAbstractNode._onTimeoutFocus(\"" + this.id + "\")", 10); + } + return false; + } + + this.select(); + if (/*!/webfx-tree-item-label/.test(el.className) && */!webFXTreeHandler.opera) { // opera cancels the click if focus is called + + // in case we are not clicking on the label + if (webFXTreeHandler.ie) { + window.setTimeout("WebFXTreeAbstractNode._onTimeoutFocus(\"" + this.id + "\")", 10); + } else { + this.focus(); + } + } + var rowEl = this.getRowElement(); + if (rowEl) { + rowEl.className = this.getRowClassName(); + } + + return false; +}; + +_p._onclick = function (e) { + var el = e.target || e.srcElement; + // expand icon + if (/webfx-tree-expand-icon/.test(el.className) && this.hasChildren()) { + return false; + } + + var doAction = null; + if (/webfx-tree-icon/.test(el.className) && this.iconAction) { + doAction = this.iconAction; + } else { + doAction = this.action; + } + + if (typeof doAction == "function") { + doAction(); + } else if (doAction != null) { + window.open(doAction, this.target || "_self"); + } + return false; +}; + + +_p._ondblclick = function (e) { + var el = e.target || e.srcElement; + // expand icon + if (/webfx-tree-expand-icon/.test(el.className) && this.hasChildren()) { + return; + } + + this.toggle(); +}; + +_p._onfocus = function (e) { + this.select(); + this._focused = true; +}; + +_p._onblur = function (e) { + this._focused = false; +}; + +_p._onkeydown = function (e) { + var n; + var rv = true; + switch (e.keyCode) { + case 39: // RIGHT + if (e.altKey) { + rv = true; + break; + } + if (this.hasChildren()) { + if (!this.getExpanded()) { + this.setExpanded(true); + } else { + this.getFirstChild().focus(); + } + } + rv = false; + break; + case 37: // LEFT + if (e.altKey) { + rv = true; + break; + } + if (this.hasChildren() && this.getExpanded()) { + this.setExpanded(false); + } else { + var p = this.getParent(); + var t = this.getTree(); + // don't go to root if hidden + if (p && (t.showRootNode || p != t)) { + p.focus(); + } + } + rv = false; + break; + + case 40: // DOWN + n = this.getNextShownNode(); + if (n) { + n.focus(); + } + rv = false; + break; + case 38: // UP + n = this.getPreviousShownNode() + if (n) { + n.focus(); + } + rv = false; + break; + } + + if (!rv && e.preventDefault) { + e.preventDefault(); + } + e.returnValue = rv; + return rv; +}; + +_p._onkeypress = function (e) { + if (!e.altKey && e.keyCode >= 37 && e.keyCode <= 40) { + if (e.preventDefault) { + e.preventDefault(); + } + e.returnValue = false; + return false; + } +}; + +// End event handlers + +_p.dispose = function () { + if (this.disposed) return; + for (var i = this.childNodes.length - 1; i >= 0; i--) { + this.childNodes[i].dispose(); + } + this.tree = null; + this.parentNode = null; + this.childNodes = null; + this.disposed = true; +}; + +// Some methods that are usable when navigating the tree using the arrows +_p.getLastShownDescendant = function () { + if (!this.getExpanded() || !this.hasChildren()) { + return this; + } + // we know there is at least 1 child + return this.getLastChild().getLastShownDescendant(); +}; + +_p.getNextShownNode = function () { + if (this.hasChildren() && this.getExpanded()) { + return this.getFirstChild(); + } else { + var p = this; + var next; + while (p != null) { + next = p.getNextSibling(); + if (next != null) { + return next; + } + p = p.getParent(); + } + return null; + } +}; + +_p.getPreviousShownNode = function () { + var ps = this.getPreviousSibling(); + if (ps != null) { + return ps.getLastShownDescendant(); + } + var p = this.getParent(); + var t = this.getTree(); + if (!t.showRootNode && p == t) { + return null; + } + return p; +}; + + + + + + + +/////////////////////////////////////////////////////////////////////////////// +// WebFXTree +/////////////////////////////////////////////////////////////////////////////// + +function WebFXTree(sText, oAction, sBehavior, sIcon, oIconAction, sOpenIcon) { + WebFXTreeAbstractNode.call(this, sText, oAction, oIconAction); + if (sIcon) this.icon = sIcon; + if (sOpenIcon) this.openIcon = sOpenIcon; + if (sBehavior) this.behavior = sBehavior; +} + +_p = WebFXTree.prototype = new WebFXTreeAbstractNode; +_p.indentWidth = 19; +_p.open = true; +_p._selectedItem = null; +_p._fireChange = true; +_p.rendered = false; +_p.suspendRedraw = false; +_p.showLines = true; +_p.showExpandIcons = true; +_p.showRootNode = true; +_p.showRootLines = true; + +_p.getTree = function () { + return this; +}; + +_p.getDepth = function () { + return 0; +}; + +_p.getCreated = function () { + return this.rendered; +}; + + +/* end tree model */ + +_p.getExpanded = function () { + return !this.showRootNode || WebFXTreeAbstractNode.prototype.getExpanded.call(this); +}; + +_p.setExpanded = function (b) { + if (!this.showRootNode) { + this.open = b; + } else { + WebFXTreeAbstractNode.prototype.setExpanded.call(this, b); + } +}; + +_p.getExpandIconHtml = function () { + return ""; +}; + +// we don't have an expand icon here +_p.getIconElement = function () { + var el = this.getRowElement(); + if (!el) return null; + return el.firstChild; +}; + +// no expand icon for root element +_p.getExpandIconElement = function (oDoc) { + return null; +}; + +_p.updateExpandIcon = function () { + // no expand icon +}; + +_p.getRowClassName = function () { + return WebFXTreeAbstractNode.prototype.getRowClassName.call(this) + + (this.showRootNode ? "" : " webfx-tree-hide-root"); +}; + + +// if classic then the openIcon is used for expanded, otherwise openIcon is used +// for selected + +_p.getIconSrc = function () { + var behavior = this.getTree() ? this.getTree().getBehavior() : webFXTreeConfig.defaultBehavior; + var open = behavior == "classic" && this.getExpanded() || + behavior != "classic" && this.isSelected(); + if (open && this.openIcon) { + return this.openIcon; + } + if (!open && this.icon) { + return this.icon; + } + // fall back on default icons + return open ? webFXTreeConfig.openRootIcon : webFXTreeConfig.rootIcon; +}; + +_p.getEventHandlersHtml = function () { + return " onclick=\"return webFXTreeHandler.handleEvent(event)\" " + + "onmousedown=\"return webFXTreeHandler.handleEvent(event)\" " + + "ondblclick=\"return webFXTreeHandler.handleEvent(event)\" " + + "onkeydown=\"return webFXTreeHandler.handleEvent(event)\" " + + "onkeypress=\"return webFXTreeHandler.handleEvent(event)\""; +}; + +_p.setSelected = function (o) { + if (this._selectedItem != o && o) { + o._setSelected(true); + } +}; + +_p._fireOnChange = function () { + if (this._fireChange && typeof this.onchange == "function") { + this.onchange(); + } +}; + +_p.getSelected = function () { + return this._selectedItem; +}; + +_p.tabIndex = ""; + +_p.setTabIndex = function (i) { + var n = this._selectedItem || (this.showRootNode ? this : this.firstChild); + this.tabIndex = i; + if (n) { + n._setTabIndex(i); + } +}; + +_p.getTabIndex = function () { + return this.tabIndex; +}; + +_p.setBehavior = function (s) { + this.behavior = s; +}; + +_p.getBehavior = function () { + return this.behavior || webFXTreeConfig.defaultBehavior; +}; + +_p.setShowLines = function (b) { + if (this.showLines != b) { + this.showLines = b; + if (this.rendered) { + this.update(); + } + } +}; + +_p.getShowLines = function () { + return this.showLines; +}; + +_p.setShowRootLines = function (b) { + if (this.showRootLines != b) { + this.showRootLines = b; + if (this.rendered) { + this.update(); + } + } +}; + +_p.getShowRootLines = function () { + return this.showRootLines; +}; + +_p.setShowExpandIcons = function (b) { + if (this.showExpandIcons != b) { + this.showExpandIcons = b; + if (this.rendered) { + this.getTree().update(); + } + } +}; + +_p.getShowExpandIcons = function () { + return this.showExpandIcons; +}; + +_p.setShowRootNode = function (b) { + if (this.showRootNode != b) { + this.showRootNode = b; + if (this.rendered) { + this.getTree().update(); + } + } +}; + +_p.getShowRoootNode = function () { + return this.showRootNode; +}; + +_p.onchange = function () {}; + +_p.create = function () { + var el = WebFXTreeAbstractNode.prototype.create.call(this); + this.setTabIndex(this.tabIndex); + this.rendered = true; + return el; +}; + +_p.write = function () { + document.write(this.toHtml()); + this.setTabIndex(this.tabIndex); + this.rendered = true; +}; + +_p.setSuspendRedraw = function (b) { + this.suspendRedraw = b; +}; + +_p.getSuspendRedraw = function () { + return this.suspendRedraw; +}; + + + +/////////////////////////////////////////////////////////////////////////////// +// WebFXTreeItem +/////////////////////////////////////////////////////////////////////////////// + +function WebFXTreeItem(sText, oAction, eParent, sIcon, oIconAction, sOpenIcon) { + WebFXTreeAbstractNode.call(this, sText, oAction, oIconAction); + if (sIcon) this.icon = sIcon; + if (sOpenIcon) this.openIcon = sOpenIcon; + if (eParent) eParent.add(this); +} + +_p = WebFXTreeItem.prototype = new WebFXTreeAbstractNode; +_p.tree = null; + +/* tree model */ + +_p.getDepth = function () { + if (this.depth != null) { + return this.depth; + } + if (this.parentNode) { + var pd = this.parentNode.getDepth(); + return this.depth = (pd != null ? pd + 1 : null); + } + return null; +}; + +_p.getTree = function () { + if (this.tree) { + return this.tree; + } + if (this.parentNode) { + return this.tree = this.parentNode.getTree(); + } + return null; +}; + +_p.getCreated = function () { + var t = this.getTree(); + return t && t.getCreated(); +}; + +// if classic then the openIcon is used for expanded, otherwise openIcon is used +// for selected +_p.getIconSrc = function () { + var behavior = this.getTree() ? this.getTree().getBehavior() : webFXTreeConfig.defaultBehavior; + var open = behavior == "classic" && this.getExpanded() || + behavior != "classic" && this.isSelected(); + if (open && this.openIcon) { + return this.openIcon; + } + if (!open && this.icon) { + return this.icon; + } + + // fall back on default icons + if (this.hasChildren()) { + return open ? webFXTreeConfig.openFolderIcon : webFXTreeConfig.folderIcon; + } + return webFXTreeConfig.fileIcon; +}; + +/* end tree model */ + + + + +if (window.attachEvent) { + window.attachEvent("onunload", function () { + for (var id in webFXTreeHandler.all) + webFXTreeHandler.all[id].dispose(); + }); +} diff --git a/php/phpinfo.php b/php/phpinfo.php new file mode 100644 index 0000000..c9f5eeb --- /dev/null +++ b/php/phpinfo.php @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/php/tpl/index.php b/php/tpl/index.php new file mode 100644 index 0000000..92a2ae1 --- /dev/null +++ b/php/tpl/index.php @@ -0,0 +1,45 @@ + + + + Beat Heaven: <?= $artist['name'] ?> + + + + +
+ +
+
+ 0): ?> +
+
+ + () +
+
    + + +
  1. + +
+ 0): ?> + Bonus: +
    + + +
  1. + +
+ +
+ +
+ + diff --git a/php/tpl/vksearch.php b/php/tpl/vksearch.php new file mode 100644 index 0000000..a45aea5 --- /dev/null +++ b/php/tpl/vksearch.php @@ -0,0 +1,68 @@ + + +
+ + + + + + + + + +
+ Query + + + + +
+ +
+
+ + + 0) { ?> + + + + + + + + $field) { ?> + + + + + + + + +
Play' : $field) ?>
Query time: s
No data
+ +
+ Parsed data:
+ +
+ +
\ No newline at end of file diff --git a/php/vksearch.php b/php/vksearch.php new file mode 100644 index 0000000..c95333c --- /dev/null +++ b/php/vksearch.php @@ -0,0 +1,37 @@ +parse($q); + foreach ($files as $i => $file) { + $size = File::getSizeByUrl($file['url']); + if ($size) { + $files[$i]['size'] = $size; + $files[$i]['bitrate'] = File::calculateBitrate($files[$i]['size'], $files[$i]['duration']); + } else { + unset($files[$i]); + } + } + //file_put_contents('dump/html/'. $q .'.html', $parser->getHtml()); + //file_put_contents('dump/data/'. $q .'.data', serialize($files)); + } else { + $files = unserialize(file_get_contents('dump/data/'. $q .'.data')); + } + $t_end = microtime(true); + $files = File::formatData($files); +} + +$completed = array_slice(scandir('dump/data'), 2); + + +include 'tpl/vksearch.php'; \ No newline at end of file diff --git a/rails/README b/rails/README new file mode 100644 index 0000000..7cd111f --- /dev/null +++ b/rails/README @@ -0,0 +1,211 @@ +== Welcome to Rails + +Rails is a web-application and persistence framework that includes everything +needed to create database-backed web-applications according to the +Model-View-Control pattern of separation. This pattern splits the view (also +called the presentation) into "dumb" templates that are primarily responsible +for inserting pre-built data in between HTML tags. The model contains the +"smart" domain objects (such as Account, Product, Person, Post) that holds all +the business logic and knows how to persist themselves to a database. The +controller handles the incoming requests (such as Save New Account, Update +Product, Show Post) by manipulating the model and directing data to the view. + +In Rails, the model is handled by what's called an object-relational mapping +layer entitled Active Record. This layer allows you to present the data from +database rows as objects and embellish these data objects with business logic +methods. You can read more about Active Record in +link:files/vendor/rails/activerecord/README.html. + +The controller and view are handled by the Action Pack, which handles both +layers by its two parts: Action View and Action Controller. These two layers +are bundled in a single package due to their heavy interdependence. This is +unlike the relationship between the Active Record and Action Pack that is much +more separate. Each of these packages can be used independently outside of +Rails. You can read more about Action Pack in +link:files/vendor/rails/actionpack/README.html. + + +== Getting started + +1. At the command prompt, start a new rails application using the rails command + and your application name. Ex: rails myapp + (If you've downloaded rails in a complete tgz or zip, this step is already done) +2. Change directory into myapp and start the web server: script/server (run with --help for options) +3. Go to http://localhost:3000/ and get "Welcome aboard: You’re riding the Rails!" +4. Follow the guidelines to start developing your application + + +== Web Servers + +By default, Rails will try to use Mongrel and lighttpd if they are installed, otherwise +Rails will use the WEBrick, the webserver that ships with Ruby. When you run script/server, +Rails will check if Mongrel exists, then lighttpd and finally fall back to WEBrick. This ensures +that you can always get up and running quickly. + +Mongrel is a Ruby-based webserver with a C-component (which requires compilation) that is +suitable for development and deployment of Rails applications. If you have Ruby Gems installed, +getting up and running with mongrel is as easy as: gem install mongrel. +More info at: http://mongrel.rubyforge.org + +If Mongrel is not installed, Rails will look for lighttpd. It's considerably faster than +Mongrel and WEBrick and also suited for production use, but requires additional +installation and currently only works well on OS X/Unix (Windows users are encouraged +to start with Mongrel). We recommend version 1.4.11 and higher. You can download it from +http://www.lighttpd.net. + +And finally, if neither Mongrel or lighttpd are installed, Rails will use the built-in Ruby +web server, WEBrick. WEBrick is a small Ruby web server suitable for development, but not +for production. + +But of course its also possible to run Rails on any platform that supports FCGI. +Apache, LiteSpeed, IIS are just a few. For more information on FCGI, +please visit: http://wiki.rubyonrails.com/rails/pages/FastCGI + + +== Debugging Rails + +Sometimes your application goes wrong. Fortunately there are a lot of tools that +will help you debug it and get it back on the rails. + +First area to check is the application log files. Have "tail -f" commands running +on the server.log and development.log. Rails will automatically display debugging +and runtime information to these files. Debugging info will also be shown in the +browser on requests from 127.0.0.1. + +You can also log your own messages directly into the log file from your code using +the Ruby logger class from inside your controllers. Example: + + class WeblogController < ActionController::Base + def destroy + @weblog = Weblog.find(params[:id]) + @weblog.destroy + logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!") + end + end + +The result will be a message in your log file along the lines of: + + Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1 + +More information on how to use the logger is at http://www.ruby-doc.org/core/ + +Also, Ruby documentation can be found at http://www.ruby-lang.org/ including: + +* The Learning Ruby (Pickaxe) Book: http://www.ruby-doc.org/docs/ProgrammingRuby/ +* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide) + +These two online (and free) books will bring you up to speed on the Ruby language +and also on programming in general. + + +== Breakpoints + +Breakpoint support is available through the script/breakpointer client. This +means that you can break out of execution at any point in the code, investigate +and change the model, AND then resume execution! Example: + + class WeblogController < ActionController::Base + def index + @posts = Post.find(:all) + breakpoint "Breaking out from the list" + end + end + +So the controller will accept the action, run the first line, then present you +with a IRB prompt in the breakpointer window. Here you can do things like: + +Executing breakpoint "Breaking out from the list" at .../webrick_server.rb:16 in 'breakpoint' + + >> @posts.inspect + => "[#nil, \"body\"=>nil, \"id\"=>\"1\"}>, + #\"Rails you know!\", \"body\"=>\"Only ten..\", \"id\"=>\"2\"}>]" + >> @posts.first.title = "hello from a breakpoint" + => "hello from a breakpoint" + +...and even better is that you can examine how your runtime objects actually work: + + >> f = @posts.first + => #nil, "body"=>nil, "id"=>"1"}> + >> f. + Display all 152 possibilities? (y or n) + +Finally, when you're ready to resume execution, you press CTRL-D + + +== Console + +You can interact with the domain model by starting the console through script/console. +Here you'll have all parts of the application configured, just like it is when the +application is running. You can inspect domain models, change values, and save to the +database. Starting the script without arguments will launch it in the development environment. +Passing an argument will specify a different environment, like script/console production. + +To reload your controllers and models after launching the console run reload! + +To reload your controllers and models after launching the console run reload! + + + +== Description of contents + +app + Holds all the code that's specific to this particular application. + +app/controllers + Holds controllers that should be named like weblogs_controller.rb for + automated URL mapping. All controllers should descend from ApplicationController + which itself descends from ActionController::Base. + +app/models + Holds models that should be named like post.rb. + Most models will descend from ActiveRecord::Base. + +app/views + Holds the template files for the view that should be named like + weblogs/index.rhtml for the WeblogsController#index action. All views use eRuby + syntax. + +app/views/layouts + Holds the template files for layouts to be used with views. This models the common + header/footer method of wrapping views. In your views, define a layout using the + layout :default and create a file named default.rhtml. Inside default.rhtml, + call <% yield %> to render the view using this layout. + +app/helpers + Holds view helpers that should be named like weblogs_helper.rb. These are generated + for you automatically when using script/generate for controllers. Helpers can be used to + wrap functionality for your views into methods. + +config + Configuration files for the Rails environment, the routing map, the database, and other dependencies. + +components + Self-contained mini-applications that can bundle together controllers, models, and views. + +db + Contains the database schema in schema.rb. db/migrate contains all + the sequence of Migrations for your schema. + +doc + This directory is where your application documentation will be stored when generated + using rake doc:app + +lib + Application specific libraries. Basically, any kind of custom code that doesn't + belong under controllers, models, or helpers. This directory is in the load path. + +public + The directory available for the web server. Contains subdirectories for images, stylesheets, + and javascripts. Also contains the dispatchers and the default HTML files. This should be + set as the DOCUMENT_ROOT of your web server. + +script + Helper scripts for automation and generation. + +test + Unit and functional tests along with fixtures. When using the script/generate scripts, template + test files will be generated for you and placed in this directory. + +vendor + External libraries that the application depends on. Also includes the plugins subdirectory. + This directory is in the load path. diff --git a/rails/Rakefile b/rails/Rakefile new file mode 100644 index 0000000..3bb0e85 --- /dev/null +++ b/rails/Rakefile @@ -0,0 +1,10 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require(File.join(File.dirname(__FILE__), 'config', 'boot')) + +require 'rake' +require 'rake/testtask' +require 'rake/rdoctask' + +require 'tasks/rails' diff --git a/rails/app/controllers/application.rb b/rails/app/controllers/application.rb new file mode 100644 index 0000000..d9050b5 --- /dev/null +++ b/rails/app/controllers/application.rb @@ -0,0 +1,7 @@ +# Filters added to this controller apply to all controllers in the application. +# Likewise, all the methods added will be available for all controllers. + +class ApplicationController < ActionController::Base + # Pick a unique cookie name to distinguish our session data from others' + session :session_key => '_rails_session_id' +end diff --git a/rails/app/helpers/application_helper.rb b/rails/app/helpers/application_helper.rb new file mode 100644 index 0000000..22a7940 --- /dev/null +++ b/rails/app/helpers/application_helper.rb @@ -0,0 +1,3 @@ +# Methods added to this helper will be available to all templates in the application. +module ApplicationHelper +end diff --git a/rails/config/boot.rb b/rails/config/boot.rb new file mode 100644 index 0000000..0f034f0 --- /dev/null +++ b/rails/config/boot.rb @@ -0,0 +1,39 @@ +# Don't change this file. Configuration is done in config/environment.rb and config/environments/*.rb + +RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT) + +unless defined?(Rails::Initializer) + if File.directory?("#{RAILS_ROOT}/vendor/rails") + require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer" + else + require 'rubygems' + + rails_gem_version = + if defined? RAILS_GEM_VERSION + RAILS_GEM_VERSION + else + File.read("#{File.dirname(__FILE__)}/environment.rb") =~ /^[^#]*RAILS_GEM_VERSION\s+=\s+'([\d.]+)'/ + $1 + end + + if rails_gem_version + rails_gem = Gem.cache.search('rails', "=#{rails_gem_version}.0").sort_by { |g| g.version.version }.last + + if rails_gem + gem "rails", "=#{rails_gem.version.version}" + require rails_gem.full_gem_path + '/lib/initializer' + else + STDERR.puts %(Cannot find gem for Rails =#{rails_gem_version}.0: + Install the missing gem with 'gem install -v=#{rails_gem_version} rails', or + change environment.rb to define RAILS_GEM_VERSION with your desired version. + ) + exit 1 + end + else + gem "rails" + require 'initializer' + end + end + + Rails::Initializer.run(:set_load_path) +end diff --git a/rails/config/database.yml b/rails/config/database.yml new file mode 100644 index 0000000..861386d --- /dev/null +++ b/rails/config/database.yml @@ -0,0 +1,46 @@ +# PostgreSQL versions 7.4 - 8.1 +# +# Get the C bindings: +# gem install postgres +# or use the pure-Ruby bindings on Windows: +# gem install postgres-pr +development: + adapter: postgresql + host: localhost + port: 5432 + database: beathaven + username: postgres + password: password + + # Connect on a TCP socket. Omitted by default since the client uses a + # domain socket that doesn't need configuration. Windows does not have + # domain sockets, so uncomment these lines. + #host: localhost + #port: 5432 + + # Schema search path. The server defaults to $user,public + #schema_search_path: myapp,sharedapp,public + + # Character set encoding. The server defaults to sql_ascii. + #encoding: UTF8 + + # Minimum log levels, in increasing order: + # debug5, debug4, debug3, debug2, debug1, + # info, notice, warning, error, log, fatal, or panic + # The server defaults to notice. + #min_messages: warning + +# Warning: The database defined as 'test' will be erased and +# re-generated from your development database when you run 'rake'. +# Do not set this db to the same as development or production. +test: + adapter: postgresql + database: rails_test + username: rails + password: + +production: + adapter: postgresql + database: rails_production + username: rails + password: diff --git a/rails/config/environment.rb b/rails/config/environment.rb new file mode 100644 index 0000000..ab75a0f --- /dev/null +++ b/rails/config/environment.rb @@ -0,0 +1,60 @@ +# Be sure to restart your web server when you modify this file. + +# Uncomment below to force Rails into production mode when +# you don't control web/app server and can't set it the proper way +# ENV['RAILS_ENV'] ||= 'production' + +# Specifies gem version of Rails to use when vendor/rails is not present +RAILS_GEM_VERSION = '1.2.6' unless defined? RAILS_GEM_VERSION + +# Bootstrap the Rails environment, frameworks, and default configuration +require File.join(File.dirname(__FILE__), 'boot') + +Rails::Initializer.run do |config| + # Settings in config/environments/* take precedence over those specified here + + # Skip frameworks you're not going to use (only works if using vendor/rails) + # config.frameworks -= [ :action_web_service, :action_mailer ] + + # Only load the plugins named here, by default all plugins in vendor/plugins are loaded + # config.plugins = %W( exception_notification ssl_requirement ) + + # Add additional load paths for your own custom dirs + # config.load_paths += %W( #{RAILS_ROOT}/extras ) + + # Force all environments to use the same logger level + # (by default production uses :info, the others :debug) + # config.log_level = :debug + + # Use the database for sessions instead of the file system + # (create the session table with 'rake db:sessions:create') + # config.action_controller.session_store = :active_record_store + + # Use SQL instead of Active Record's schema dumper when creating the test database. + # This is necessary if your schema can't be completely dumped by the schema dumper, + # like if you have constraints or database-specific column types + # config.active_record.schema_format = :sql + + # Activate observers that should always be running + # config.active_record.observers = :cacher, :garbage_collector + + # Make Active Record use UTC-base instead of local time + # config.active_record.default_timezone = :utc + + # Add new inflection rules using the following format + # (all these examples are active by default): + # Inflector.inflections do |inflect| + # inflect.plural /^(ox)$/i, '\1en' + # inflect.singular /^(ox)en/i, '\1' + # inflect.irregular 'person', 'people' + # inflect.uncountable %w( fish sheep ) + # end + + # See Rails::Configuration for more options +end + +# Add new mime types for use in respond_to blocks: +# Mime::Type.register "text/richtext", :rtf +# Mime::Type.register "application/x-mobile", :mobile + +# Include your application configuration below diff --git a/rails/config/environments/development.rb b/rails/config/environments/development.rb new file mode 100644 index 0000000..0589aa9 --- /dev/null +++ b/rails/config/environments/development.rb @@ -0,0 +1,21 @@ +# Settings specified here will take precedence over those in config/environment.rb + +# In the development environment your application's code is reloaded on +# every request. This slows down response time but is perfect for development +# since you don't have to restart the webserver when you make code changes. +config.cache_classes = false + +# Log error messages when you accidentally call methods on nil. +config.whiny_nils = true + +# Enable the breakpoint server that script/breakpointer connects to +config.breakpoint_server = true + +# Show full error reports and disable caching +config.action_controller.consider_all_requests_local = true +config.action_controller.perform_caching = false +config.action_view.cache_template_extensions = false +config.action_view.debug_rjs = true + +# Don't care if the mailer can't send +config.action_mailer.raise_delivery_errors = false diff --git a/rails/config/environments/production.rb b/rails/config/environments/production.rb new file mode 100644 index 0000000..cb295b8 --- /dev/null +++ b/rails/config/environments/production.rb @@ -0,0 +1,18 @@ +# Settings specified here will take precedence over those in config/environment.rb + +# The production environment is meant for finished, "live" apps. +# Code is not reloaded between requests +config.cache_classes = true + +# Use a different logger for distributed setups +# config.logger = SyslogLogger.new + +# Full error reports are disabled and caching is turned on +config.action_controller.consider_all_requests_local = false +config.action_controller.perform_caching = true + +# Enable serving of images, stylesheets, and javascripts from an asset server +# config.action_controller.asset_host = "http://assets.example.com" + +# Disable delivery errors, bad email addresses will be ignored +# config.action_mailer.raise_delivery_errors = false diff --git a/rails/config/environments/test.rb b/rails/config/environments/test.rb new file mode 100644 index 0000000..f0689b9 --- /dev/null +++ b/rails/config/environments/test.rb @@ -0,0 +1,19 @@ +# Settings specified here will take precedence over those in config/environment.rb + +# The test environment is used exclusively to run your application's +# test suite. You never need to work with it otherwise. Remember that +# your test database is "scratch space" for the test suite and is wiped +# and recreated between test runs. Don't rely on the data there! +config.cache_classes = true + +# Log error messages when you accidentally call methods on nil. +config.whiny_nils = true + +# Show full error reports and disable caching +config.action_controller.consider_all_requests_local = true +config.action_controller.perform_caching = false + +# Tell ActionMailer not to deliver emails to the real world. +# The :test delivery method accumulates sent emails in the +# ActionMailer::Base.deliveries array. +config.action_mailer.delivery_method = :test \ No newline at end of file diff --git a/rails/config/routes.rb b/rails/config/routes.rb new file mode 100644 index 0000000..9bbc463 --- /dev/null +++ b/rails/config/routes.rb @@ -0,0 +1,23 @@ +ActionController::Routing::Routes.draw do |map| + # The priority is based upon order of creation: first created -> highest priority. + + # Sample of regular route: + # map.connect 'products/:id', :controller => 'catalog', :action => 'view' + # Keep in mind you can assign values other than :controller and :action + + # Sample of named route: + # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase' + # This route can be invoked with purchase_url(:id => product.id) + + # You can have the root of your site routed by hooking up '' + # -- just remember to delete public/index.html. + # map.connect '', :controller => "welcome" + + # Allow downloading Web Service WSDL as a file with an extension + # instead of a file named 'wsdl' + map.connect ':controller/service.wsdl', :action => 'wsdl' + + # Install the default route as the lowest priority. + map.connect ':controller/:action/:id.:format' + map.connect ':controller/:action/:id' +end diff --git a/rails/doc/README_FOR_APP b/rails/doc/README_FOR_APP new file mode 100644 index 0000000..ac6c149 --- /dev/null +++ b/rails/doc/README_FOR_APP @@ -0,0 +1,2 @@ +Use this README file to introduce your application and point to useful places in the API for learning more. +Run "rake appdoc" to generate API documentation for your models and controllers. \ No newline at end of file diff --git a/rails/log/development.log b/rails/log/development.log new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/rails/log/development.log @@ -0,0 +1 @@ + diff --git a/rails/log/production.log b/rails/log/production.log new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/rails/log/production.log @@ -0,0 +1 @@ + diff --git a/rails/log/server.log b/rails/log/server.log new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/rails/log/server.log @@ -0,0 +1 @@ + diff --git a/rails/log/test.log b/rails/log/test.log new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/rails/log/test.log @@ -0,0 +1 @@ + diff --git a/rails/public/.htaccess b/rails/public/.htaccess new file mode 100644 index 0000000..d3c9983 --- /dev/null +++ b/rails/public/.htaccess @@ -0,0 +1,40 @@ +# General Apache options +AddHandler fastcgi-script .fcgi +AddHandler cgi-script .cgi +Options +FollowSymLinks +ExecCGI + +# If you don't want Rails to look in certain directories, +# use the following rewrite rules so that Apache won't rewrite certain requests +# +# Example: +# RewriteCond %{REQUEST_URI} ^/notrails.* +# RewriteRule .* - [L] + +# Redirect all requests not available on the filesystem to Rails +# By default the cgi dispatcher is used which is very slow +# +# For better performance replace the dispatcher with the fastcgi one +# +# Example: +# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] +RewriteEngine On + +# If your Rails application is accessed via an Alias directive, +# then you MUST also set the RewriteBase in this htaccess file. +# +# Example: +# Alias /myrailsapp /path/to/myrailsapp/public +# RewriteBase /myrailsapp + +RewriteRule ^$ index.html [QSA] +RewriteRule ^([^.]+)$ $1.html [QSA] +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^(.*)$ dispatch.cgi [QSA,L] + +# In case Rails experiences terminal errors +# Instead of displaying this message you can supply a file here which will be rendered instead +# +# Example: +# ErrorDocument 500 /500.html + +ErrorDocument 500 "

Application error

Rails application failed to start properly" \ No newline at end of file diff --git a/rails/public/404.html b/rails/public/404.html new file mode 100644 index 0000000..eff660b --- /dev/null +++ b/rails/public/404.html @@ -0,0 +1,30 @@ + + + + + + + The page you were looking for doesn't exist (404) + + + + + +
+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+ + \ No newline at end of file diff --git a/rails/public/500.html b/rails/public/500.html new file mode 100644 index 0000000..f0aee0e --- /dev/null +++ b/rails/public/500.html @@ -0,0 +1,30 @@ + + + + + + + We're sorry, but something went wrong + + + + + +
+

We're sorry, but something went wrong.

+

We've been notified about this issue and we'll take a look at it shortly.

+
+ + \ No newline at end of file diff --git a/rails/public/dispatch.cgi b/rails/public/dispatch.cgi new file mode 100755 index 0000000..0ca19d0 --- /dev/null +++ b/rails/public/dispatch.cgi @@ -0,0 +1,10 @@ +#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby + +require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) + +# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: +# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired +require "dispatcher" + +ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) +Dispatcher.dispatch \ No newline at end of file diff --git a/rails/public/dispatch.fcgi b/rails/public/dispatch.fcgi new file mode 100755 index 0000000..507ec32 --- /dev/null +++ b/rails/public/dispatch.fcgi @@ -0,0 +1,24 @@ +#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby +# +# You may specify the path to the FastCGI crash log (a log of unhandled +# exceptions which forced the FastCGI instance to exit, great for debugging) +# and the number of requests to process before running garbage collection. +# +# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log +# and the GC period is nil (turned off). A reasonable number of requests +# could range from 10-100 depending on the memory footprint of your app. +# +# Example: +# # Default log path, normal GC behavior. +# RailsFCGIHandler.process! +# +# # Default log path, 50 requests between GC. +# RailsFCGIHandler.process! nil, 50 +# +# # Custom log path, normal GC behavior. +# RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log' +# +require File.dirname(__FILE__) + "/../config/environment" +require 'fcgi_handler' + +RailsFCGIHandler.process! diff --git a/rails/public/dispatch.rb b/rails/public/dispatch.rb new file mode 100755 index 0000000..0ca19d0 --- /dev/null +++ b/rails/public/dispatch.rb @@ -0,0 +1,10 @@ +#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby + +require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) + +# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: +# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired +require "dispatcher" + +ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) +Dispatcher.dispatch \ No newline at end of file diff --git a/rails/public/favicon.ico b/rails/public/favicon.ico new file mode 100644 index 0000000..11e3d55 Binary files /dev/null and b/rails/public/favicon.ico differ diff --git a/rails/public/images/rails.png b/rails/public/images/rails.png new file mode 100644 index 0000000..b8441f1 Binary files /dev/null and b/rails/public/images/rails.png differ diff --git a/rails/public/index.html b/rails/public/index.html new file mode 100644 index 0000000..a2daab7 --- /dev/null +++ b/rails/public/index.html @@ -0,0 +1,277 @@ + + + + + Ruby on Rails: Welcome aboard + + + + + + +
+ + +
+ + + + +
+

Getting started

+

Here’s how to get rolling:

+ +
    +
  1. +

    Create your databases and edit config/database.yml

    +

    Rails needs to know your login and password.

    +
  2. + +
  3. +

    Use script/generate to create your models and controllers

    +

    To see all available options, run it without parameters.

    +
  4. + +
  5. +

    Set up a default route and remove or rename this file

    +

    Routes are setup in config/routes.rb.

    +
  6. +
+
+
+ + +
+ + \ No newline at end of file diff --git a/rails/public/javascripts/application.js b/rails/public/javascripts/application.js new file mode 100644 index 0000000..fe45776 --- /dev/null +++ b/rails/public/javascripts/application.js @@ -0,0 +1,2 @@ +// Place your application-specific JavaScript functions and classes here +// This file is automatically included by javascript_include_tag :defaults diff --git a/rails/public/javascripts/controls.js b/rails/public/javascripts/controls.js new file mode 100644 index 0000000..8c273f8 --- /dev/null +++ b/rails/public/javascripts/controls.js @@ -0,0 +1,833 @@ +// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// (c) 2005, 2006 Ivan Krstic (http://blogs.law.harvard.edu/ivan) +// (c) 2005, 2006 Jon Tirsen (http://www.tirsen.com) +// Contributors: +// Richard Livsey +// Rahul Bhargava +// Rob Wills +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +// Autocompleter.Base handles all the autocompletion functionality +// that's independent of the data source for autocompletion. This +// includes drawing the autocompletion menu, observing keyboard +// and mouse events, and similar. +// +// Specific autocompleters need to provide, at the very least, +// a getUpdatedChoices function that will be invoked every time +// the text inside the monitored textbox changes. This method +// should get the text for which to provide autocompletion by +// invoking this.getToken(), NOT by directly accessing +// this.element.value. This is to allow incremental tokenized +// autocompletion. Specific auto-completion logic (AJAX, etc) +// belongs in getUpdatedChoices. +// +// Tokenized incremental autocompletion is enabled automatically +// when an autocompleter is instantiated with the 'tokens' option +// in the options parameter, e.g.: +// new Ajax.Autocompleter('id','upd', '/url/', { tokens: ',' }); +// will incrementally autocomplete with a comma as the token. +// Additionally, ',' in the above example can be replaced with +// a token array, e.g. { tokens: [',', '\n'] } which +// enables autocompletion on multiple tokens. This is most +// useful when one of the tokens is \n (a newline), as it +// allows smart autocompletion after linebreaks. + +if(typeof Effect == 'undefined') + throw("controls.js requires including script.aculo.us' effects.js library"); + +var Autocompleter = {} +Autocompleter.Base = function() {}; +Autocompleter.Base.prototype = { + baseInitialize: function(element, update, options) { + this.element = $(element); + this.update = $(update); + this.hasFocus = false; + this.changed = false; + this.active = false; + this.index = 0; + this.entryCount = 0; + + if(this.setOptions) + this.setOptions(options); + else + this.options = options || {}; + + this.options.paramName = this.options.paramName || this.element.name; + this.options.tokens = this.options.tokens || []; + this.options.frequency = this.options.frequency || 0.4; + this.options.minChars = this.options.minChars || 1; + this.options.onShow = this.options.onShow || + function(element, update){ + if(!update.style.position || update.style.position=='absolute') { + update.style.position = 'absolute'; + Position.clone(element, update, { + setHeight: false, + offsetTop: element.offsetHeight + }); + } + Effect.Appear(update,{duration:0.15}); + }; + this.options.onHide = this.options.onHide || + function(element, update){ new Effect.Fade(update,{duration:0.15}) }; + + if(typeof(this.options.tokens) == 'string') + this.options.tokens = new Array(this.options.tokens); + + this.observer = null; + + this.element.setAttribute('autocomplete','off'); + + Element.hide(this.update); + + Event.observe(this.element, "blur", this.onBlur.bindAsEventListener(this)); + Event.observe(this.element, "keypress", this.onKeyPress.bindAsEventListener(this)); + }, + + show: function() { + if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update); + if(!this.iefix && + (navigator.appVersion.indexOf('MSIE')>0) && + (navigator.userAgent.indexOf('Opera')<0) && + (Element.getStyle(this.update, 'position')=='absolute')) { + new Insertion.After(this.update, + ''); + this.iefix = $(this.update.id+'_iefix'); + } + if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50); + }, + + fixIEOverlapping: function() { + Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)}); + this.iefix.style.zIndex = 1; + this.update.style.zIndex = 2; + Element.show(this.iefix); + }, + + hide: function() { + this.stopIndicator(); + if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update); + if(this.iefix) Element.hide(this.iefix); + }, + + startIndicator: function() { + if(this.options.indicator) Element.show(this.options.indicator); + }, + + stopIndicator: function() { + if(this.options.indicator) Element.hide(this.options.indicator); + }, + + onKeyPress: function(event) { + if(this.active) + switch(event.keyCode) { + case Event.KEY_TAB: + case Event.KEY_RETURN: + this.selectEntry(); + Event.stop(event); + case Event.KEY_ESC: + this.hide(); + this.active = false; + Event.stop(event); + return; + case Event.KEY_LEFT: + case Event.KEY_RIGHT: + return; + case Event.KEY_UP: + this.markPrevious(); + this.render(); + if(navigator.appVersion.indexOf('AppleWebKit')>0) Event.stop(event); + return; + case Event.KEY_DOWN: + this.markNext(); + this.render(); + if(navigator.appVersion.indexOf('AppleWebKit')>0) Event.stop(event); + return; + } + else + if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN || + (navigator.appVersion.indexOf('AppleWebKit') > 0 && event.keyCode == 0)) return; + + this.changed = true; + this.hasFocus = true; + + if(this.observer) clearTimeout(this.observer); + this.observer = + setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000); + }, + + activate: function() { + this.changed = false; + this.hasFocus = true; + this.getUpdatedChoices(); + }, + + onHover: function(event) { + var element = Event.findElement(event, 'LI'); + if(this.index != element.autocompleteIndex) + { + this.index = element.autocompleteIndex; + this.render(); + } + Event.stop(event); + }, + + onClick: function(event) { + var element = Event.findElement(event, 'LI'); + this.index = element.autocompleteIndex; + this.selectEntry(); + this.hide(); + }, + + onBlur: function(event) { + // needed to make click events working + setTimeout(this.hide.bind(this), 250); + this.hasFocus = false; + this.active = false; + }, + + render: function() { + if(this.entryCount > 0) { + for (var i = 0; i < this.entryCount; i++) + this.index==i ? + Element.addClassName(this.getEntry(i),"selected") : + Element.removeClassName(this.getEntry(i),"selected"); + + if(this.hasFocus) { + this.show(); + this.active = true; + } + } else { + this.active = false; + this.hide(); + } + }, + + markPrevious: function() { + if(this.index > 0) this.index-- + else this.index = this.entryCount-1; + this.getEntry(this.index).scrollIntoView(true); + }, + + markNext: function() { + if(this.index < this.entryCount-1) this.index++ + else this.index = 0; + this.getEntry(this.index).scrollIntoView(false); + }, + + getEntry: function(index) { + return this.update.firstChild.childNodes[index]; + }, + + getCurrentEntry: function() { + return this.getEntry(this.index); + }, + + selectEntry: function() { + this.active = false; + this.updateElement(this.getCurrentEntry()); + }, + + updateElement: function(selectedElement) { + if (this.options.updateElement) { + this.options.updateElement(selectedElement); + return; + } + var value = ''; + if (this.options.select) { + var nodes = document.getElementsByClassName(this.options.select, selectedElement) || []; + if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select); + } else + value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal'); + + var lastTokenPos = this.findLastToken(); + if (lastTokenPos != -1) { + var newValue = this.element.value.substr(0, lastTokenPos + 1); + var whitespace = this.element.value.substr(lastTokenPos + 1).match(/^\s+/); + if (whitespace) + newValue += whitespace[0]; + this.element.value = newValue + value; + } else { + this.element.value = value; + } + this.element.focus(); + + if (this.options.afterUpdateElement) + this.options.afterUpdateElement(this.element, selectedElement); + }, + + updateChoices: function(choices) { + if(!this.changed && this.hasFocus) { + this.update.innerHTML = choices; + Element.cleanWhitespace(this.update); + Element.cleanWhitespace(this.update.down()); + + if(this.update.firstChild && this.update.down().childNodes) { + this.entryCount = + this.update.down().childNodes.length; + for (var i = 0; i < this.entryCount; i++) { + var entry = this.getEntry(i); + entry.autocompleteIndex = i; + this.addObservers(entry); + } + } else { + this.entryCount = 0; + } + + this.stopIndicator(); + this.index = 0; + + if(this.entryCount==1 && this.options.autoSelect) { + this.selectEntry(); + this.hide(); + } else { + this.render(); + } + } + }, + + addObservers: function(element) { + Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this)); + Event.observe(element, "click", this.onClick.bindAsEventListener(this)); + }, + + onObserverEvent: function() { + this.changed = false; + if(this.getToken().length>=this.options.minChars) { + this.startIndicator(); + this.getUpdatedChoices(); + } else { + this.active = false; + this.hide(); + } + }, + + getToken: function() { + var tokenPos = this.findLastToken(); + if (tokenPos != -1) + var ret = this.element.value.substr(tokenPos + 1).replace(/^\s+/,'').replace(/\s+$/,''); + else + var ret = this.element.value; + + return /\n/.test(ret) ? '' : ret; + }, + + findLastToken: function() { + var lastTokenPos = -1; + + for (var i=0; i lastTokenPos) + lastTokenPos = thisTokenPos; + } + return lastTokenPos; + } +} + +Ajax.Autocompleter = Class.create(); +Object.extend(Object.extend(Ajax.Autocompleter.prototype, Autocompleter.Base.prototype), { + initialize: function(element, update, url, options) { + this.baseInitialize(element, update, options); + this.options.asynchronous = true; + this.options.onComplete = this.onComplete.bind(this); + this.options.defaultParams = this.options.parameters || null; + this.url = url; + }, + + getUpdatedChoices: function() { + entry = encodeURIComponent(this.options.paramName) + '=' + + encodeURIComponent(this.getToken()); + + this.options.parameters = this.options.callback ? + this.options.callback(this.element, entry) : entry; + + if(this.options.defaultParams) + this.options.parameters += '&' + this.options.defaultParams; + + new Ajax.Request(this.url, this.options); + }, + + onComplete: function(request) { + this.updateChoices(request.responseText); + } + +}); + +// The local array autocompleter. Used when you'd prefer to +// inject an array of autocompletion options into the page, rather +// than sending out Ajax queries, which can be quite slow sometimes. +// +// The constructor takes four parameters. The first two are, as usual, +// the id of the monitored textbox, and id of the autocompletion menu. +// The third is the array you want to autocomplete from, and the fourth +// is the options block. +// +// Extra local autocompletion options: +// - choices - How many autocompletion choices to offer +// +// - partialSearch - If false, the autocompleter will match entered +// text only at the beginning of strings in the +// autocomplete array. Defaults to true, which will +// match text at the beginning of any *word* in the +// strings in the autocomplete array. If you want to +// search anywhere in the string, additionally set +// the option fullSearch to true (default: off). +// +// - fullSsearch - Search anywhere in autocomplete array strings. +// +// - partialChars - How many characters to enter before triggering +// a partial match (unlike minChars, which defines +// how many characters are required to do any match +// at all). Defaults to 2. +// +// - ignoreCase - Whether to ignore case when autocompleting. +// Defaults to true. +// +// It's possible to pass in a custom function as the 'selector' +// option, if you prefer to write your own autocompletion logic. +// In that case, the other options above will not apply unless +// you support them. + +Autocompleter.Local = Class.create(); +Autocompleter.Local.prototype = Object.extend(new Autocompleter.Base(), { + initialize: function(element, update, array, options) { + this.baseInitialize(element, update, options); + this.options.array = array; + }, + + getUpdatedChoices: function() { + this.updateChoices(this.options.selector(this)); + }, + + setOptions: function(options) { + this.options = Object.extend({ + choices: 10, + partialSearch: true, + partialChars: 2, + ignoreCase: true, + fullSearch: false, + selector: function(instance) { + var ret = []; // Beginning matches + var partial = []; // Inside matches + var entry = instance.getToken(); + var count = 0; + + for (var i = 0; i < instance.options.array.length && + ret.length < instance.options.choices ; i++) { + + var elem = instance.options.array[i]; + var foundPos = instance.options.ignoreCase ? + elem.toLowerCase().indexOf(entry.toLowerCase()) : + elem.indexOf(entry); + + while (foundPos != -1) { + if (foundPos == 0 && elem.length != entry.length) { + ret.push("
  • " + elem.substr(0, entry.length) + "" + + elem.substr(entry.length) + "
  • "); + break; + } else if (entry.length >= instance.options.partialChars && + instance.options.partialSearch && foundPos != -1) { + if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) { + partial.push("
  • " + elem.substr(0, foundPos) + "" + + elem.substr(foundPos, entry.length) + "" + elem.substr( + foundPos + entry.length) + "
  • "); + break; + } + } + + foundPos = instance.options.ignoreCase ? + elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : + elem.indexOf(entry, foundPos + 1); + + } + } + if (partial.length) + ret = ret.concat(partial.slice(0, instance.options.choices - ret.length)) + return "
      " + ret.join('') + "
    "; + } + }, options || {}); + } +}); + +// AJAX in-place editor +// +// see documentation on http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor + +// Use this if you notice weird scrolling problems on some browsers, +// the DOM might be a bit confused when this gets called so do this +// waits 1 ms (with setTimeout) until it does the activation +Field.scrollFreeActivate = function(field) { + setTimeout(function() { + Field.activate(field); + }, 1); +} + +Ajax.InPlaceEditor = Class.create(); +Ajax.InPlaceEditor.defaultHighlightColor = "#FFFF99"; +Ajax.InPlaceEditor.prototype = { + initialize: function(element, url, options) { + this.url = url; + this.element = $(element); + + this.options = Object.extend({ + paramName: "value", + okButton: true, + okText: "ok", + cancelLink: true, + cancelText: "cancel", + savingText: "Saving...", + clickToEditText: "Click to edit", + okText: "ok", + rows: 1, + onComplete: function(transport, element) { + new Effect.Highlight(element, {startcolor: this.options.highlightcolor}); + }, + onFailure: function(transport) { + alert("Error communicating with the server: " + transport.responseText.stripTags()); + }, + callback: function(form) { + return Form.serialize(form); + }, + handleLineBreaks: true, + loadingText: 'Loading...', + savingClassName: 'inplaceeditor-saving', + loadingClassName: 'inplaceeditor-loading', + formClassName: 'inplaceeditor-form', + highlightcolor: Ajax.InPlaceEditor.defaultHighlightColor, + highlightendcolor: "#FFFFFF", + externalControl: null, + submitOnBlur: false, + ajaxOptions: {}, + evalScripts: false + }, options || {}); + + if(!this.options.formId && this.element.id) { + this.options.formId = this.element.id + "-inplaceeditor"; + if ($(this.options.formId)) { + // there's already a form with that name, don't specify an id + this.options.formId = null; + } + } + + if (this.options.externalControl) { + this.options.externalControl = $(this.options.externalControl); + } + + this.originalBackground = Element.getStyle(this.element, 'background-color'); + if (!this.originalBackground) { + this.originalBackground = "transparent"; + } + + this.element.title = this.options.clickToEditText; + + this.onclickListener = this.enterEditMode.bindAsEventListener(this); + this.mouseoverListener = this.enterHover.bindAsEventListener(this); + this.mouseoutListener = this.leaveHover.bindAsEventListener(this); + Event.observe(this.element, 'click', this.onclickListener); + Event.observe(this.element, 'mouseover', this.mouseoverListener); + Event.observe(this.element, 'mouseout', this.mouseoutListener); + if (this.options.externalControl) { + Event.observe(this.options.externalControl, 'click', this.onclickListener); + Event.observe(this.options.externalControl, 'mouseover', this.mouseoverListener); + Event.observe(this.options.externalControl, 'mouseout', this.mouseoutListener); + } + }, + enterEditMode: function(evt) { + if (this.saving) return; + if (this.editing) return; + this.editing = true; + this.onEnterEditMode(); + if (this.options.externalControl) { + Element.hide(this.options.externalControl); + } + Element.hide(this.element); + this.createForm(); + this.element.parentNode.insertBefore(this.form, this.element); + if (!this.options.loadTextURL) Field.scrollFreeActivate(this.editField); + // stop the event to avoid a page refresh in Safari + if (evt) { + Event.stop(evt); + } + return false; + }, + createForm: function() { + this.form = document.createElement("form"); + this.form.id = this.options.formId; + Element.addClassName(this.form, this.options.formClassName) + this.form.onsubmit = this.onSubmit.bind(this); + + this.createEditField(); + + if (this.options.textarea) { + var br = document.createElement("br"); + this.form.appendChild(br); + } + + if (this.options.okButton) { + okButton = document.createElement("input"); + okButton.type = "submit"; + okButton.value = this.options.okText; + okButton.className = 'editor_ok_button'; + this.form.appendChild(okButton); + } + + if (this.options.cancelLink) { + cancelLink = document.createElement("a"); + cancelLink.href = "#"; + cancelLink.appendChild(document.createTextNode(this.options.cancelText)); + cancelLink.onclick = this.onclickCancel.bind(this); + cancelLink.className = 'editor_cancel'; + this.form.appendChild(cancelLink); + } + }, + hasHTMLLineBreaks: function(string) { + if (!this.options.handleLineBreaks) return false; + return string.match(/
    /i); + }, + convertHTMLLineBreaks: function(string) { + return string.replace(/
    /gi, "\n").replace(//gi, "\n").replace(/<\/p>/gi, "\n").replace(/

    /gi, ""); + }, + createEditField: function() { + var text; + if(this.options.loadTextURL) { + text = this.options.loadingText; + } else { + text = this.getText(); + } + + var obj = this; + + if (this.options.rows == 1 && !this.hasHTMLLineBreaks(text)) { + this.options.textarea = false; + var textField = document.createElement("input"); + textField.obj = this; + textField.type = "text"; + textField.name = this.options.paramName; + textField.value = text; + textField.style.backgroundColor = this.options.highlightcolor; + textField.className = 'editor_field'; + var size = this.options.size || this.options.cols || 0; + if (size != 0) textField.size = size; + if (this.options.submitOnBlur) + textField.onblur = this.onSubmit.bind(this); + this.editField = textField; + } else { + this.options.textarea = true; + var textArea = document.createElement("textarea"); + textArea.obj = this; + textArea.name = this.options.paramName; + textArea.value = this.convertHTMLLineBreaks(text); + textArea.rows = this.options.rows; + textArea.cols = this.options.cols || 40; + textArea.className = 'editor_field'; + if (this.options.submitOnBlur) + textArea.onblur = this.onSubmit.bind(this); + this.editField = textArea; + } + + if(this.options.loadTextURL) { + this.loadExternalText(); + } + this.form.appendChild(this.editField); + }, + getText: function() { + return this.element.innerHTML; + }, + loadExternalText: function() { + Element.addClassName(this.form, this.options.loadingClassName); + this.editField.disabled = true; + new Ajax.Request( + this.options.loadTextURL, + Object.extend({ + asynchronous: true, + onComplete: this.onLoadedExternalText.bind(this) + }, this.options.ajaxOptions) + ); + }, + onLoadedExternalText: function(transport) { + Element.removeClassName(this.form, this.options.loadingClassName); + this.editField.disabled = false; + this.editField.value = transport.responseText.stripTags(); + Field.scrollFreeActivate(this.editField); + }, + onclickCancel: function() { + this.onComplete(); + this.leaveEditMode(); + return false; + }, + onFailure: function(transport) { + this.options.onFailure(transport); + if (this.oldInnerHTML) { + this.element.innerHTML = this.oldInnerHTML; + this.oldInnerHTML = null; + } + return false; + }, + onSubmit: function() { + // onLoading resets these so we need to save them away for the Ajax call + var form = this.form; + var value = this.editField.value; + + // do this first, sometimes the ajax call returns before we get a chance to switch on Saving... + // which means this will actually switch on Saving... *after* we've left edit mode causing Saving... + // to be displayed indefinitely + this.onLoading(); + + if (this.options.evalScripts) { + new Ajax.Request( + this.url, Object.extend({ + parameters: this.options.callback(form, value), + onComplete: this.onComplete.bind(this), + onFailure: this.onFailure.bind(this), + asynchronous:true, + evalScripts:true + }, this.options.ajaxOptions)); + } else { + new Ajax.Updater( + { success: this.element, + // don't update on failure (this could be an option) + failure: null }, + this.url, Object.extend({ + parameters: this.options.callback(form, value), + onComplete: this.onComplete.bind(this), + onFailure: this.onFailure.bind(this) + }, this.options.ajaxOptions)); + } + // stop the event to avoid a page refresh in Safari + if (arguments.length > 1) { + Event.stop(arguments[0]); + } + return false; + }, + onLoading: function() { + this.saving = true; + this.removeForm(); + this.leaveHover(); + this.showSaving(); + }, + showSaving: function() { + this.oldInnerHTML = this.element.innerHTML; + this.element.innerHTML = this.options.savingText; + Element.addClassName(this.element, this.options.savingClassName); + this.element.style.backgroundColor = this.originalBackground; + Element.show(this.element); + }, + removeForm: function() { + if(this.form) { + if (this.form.parentNode) Element.remove(this.form); + this.form = null; + } + }, + enterHover: function() { + if (this.saving) return; + this.element.style.backgroundColor = this.options.highlightcolor; + if (this.effect) { + this.effect.cancel(); + } + Element.addClassName(this.element, this.options.hoverClassName) + }, + leaveHover: function() { + if (this.options.backgroundColor) { + this.element.style.backgroundColor = this.oldBackground; + } + Element.removeClassName(this.element, this.options.hoverClassName) + if (this.saving) return; + this.effect = new Effect.Highlight(this.element, { + startcolor: this.options.highlightcolor, + endcolor: this.options.highlightendcolor, + restorecolor: this.originalBackground + }); + }, + leaveEditMode: function() { + Element.removeClassName(this.element, this.options.savingClassName); + this.removeForm(); + this.leaveHover(); + this.element.style.backgroundColor = this.originalBackground; + Element.show(this.element); + if (this.options.externalControl) { + Element.show(this.options.externalControl); + } + this.editing = false; + this.saving = false; + this.oldInnerHTML = null; + this.onLeaveEditMode(); + }, + onComplete: function(transport) { + this.leaveEditMode(); + this.options.onComplete.bind(this)(transport, this.element); + }, + onEnterEditMode: function() {}, + onLeaveEditMode: function() {}, + dispose: function() { + if (this.oldInnerHTML) { + this.element.innerHTML = this.oldInnerHTML; + } + this.leaveEditMode(); + Event.stopObserving(this.element, 'click', this.onclickListener); + Event.stopObserving(this.element, 'mouseover', this.mouseoverListener); + Event.stopObserving(this.element, 'mouseout', this.mouseoutListener); + if (this.options.externalControl) { + Event.stopObserving(this.options.externalControl, 'click', this.onclickListener); + Event.stopObserving(this.options.externalControl, 'mouseover', this.mouseoverListener); + Event.stopObserving(this.options.externalControl, 'mouseout', this.mouseoutListener); + } + } +}; + +Ajax.InPlaceCollectionEditor = Class.create(); +Object.extend(Ajax.InPlaceCollectionEditor.prototype, Ajax.InPlaceEditor.prototype); +Object.extend(Ajax.InPlaceCollectionEditor.prototype, { + createEditField: function() { + if (!this.cached_selectTag) { + var selectTag = document.createElement("select"); + var collection = this.options.collection || []; + var optionTag; + collection.each(function(e,i) { + optionTag = document.createElement("option"); + optionTag.value = (e instanceof Array) ? e[0] : e; + if((typeof this.options.value == 'undefined') && + ((e instanceof Array) ? this.element.innerHTML == e[1] : e == optionTag.value)) optionTag.selected = true; + if(this.options.value==optionTag.value) optionTag.selected = true; + optionTag.appendChild(document.createTextNode((e instanceof Array) ? e[1] : e)); + selectTag.appendChild(optionTag); + }.bind(this)); + this.cached_selectTag = selectTag; + } + + this.editField = this.cached_selectTag; + if(this.options.loadTextURL) this.loadExternalText(); + this.form.appendChild(this.editField); + this.options.callback = function(form, value) { + return "value=" + encodeURIComponent(value); + } + } +}); + +// Delayed observer, like Form.Element.Observer, +// but waits for delay after last key input +// Ideal for live-search fields + +Form.Element.DelayedObserver = Class.create(); +Form.Element.DelayedObserver.prototype = { + initialize: function(element, delay, callback) { + this.delay = delay || 0.5; + this.element = $(element); + this.callback = callback; + this.timer = null; + this.lastValue = $F(this.element); + Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this)); + }, + delayedListener: function(event) { + if(this.lastValue == $F(this.element)) return; + if(this.timer) clearTimeout(this.timer); + this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000); + this.lastValue = $F(this.element); + }, + onTimerEvent: function() { + this.timer = null; + this.callback(this.element, $F(this.element)); + } +}; diff --git a/rails/public/javascripts/dragdrop.js b/rails/public/javascripts/dragdrop.js new file mode 100644 index 0000000..c71ddb8 --- /dev/null +++ b/rails/public/javascripts/dragdrop.js @@ -0,0 +1,942 @@ +// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// (c) 2005, 2006 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz) +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +if(typeof Effect == 'undefined') + throw("dragdrop.js requires including script.aculo.us' effects.js library"); + +var Droppables = { + drops: [], + + remove: function(element) { + this.drops = this.drops.reject(function(d) { return d.element==$(element) }); + }, + + add: function(element) { + element = $(element); + var options = Object.extend({ + greedy: true, + hoverclass: null, + tree: false + }, arguments[1] || {}); + + // cache containers + if(options.containment) { + options._containers = []; + var containment = options.containment; + if((typeof containment == 'object') && + (containment.constructor == Array)) { + containment.each( function(c) { options._containers.push($(c)) }); + } else { + options._containers.push($(containment)); + } + } + + if(options.accept) options.accept = [options.accept].flatten(); + + Element.makePositioned(element); // fix IE + options.element = element; + + this.drops.push(options); + }, + + findDeepestChild: function(drops) { + deepest = drops[0]; + + for (i = 1; i < drops.length; ++i) + if (Element.isParent(drops[i].element, deepest.element)) + deepest = drops[i]; + + return deepest; + }, + + isContained: function(element, drop) { + var containmentNode; + if(drop.tree) { + containmentNode = element.treeNode; + } else { + containmentNode = element.parentNode; + } + return drop._containers.detect(function(c) { return containmentNode == c }); + }, + + isAffected: function(point, element, drop) { + return ( + (drop.element!=element) && + ((!drop._containers) || + this.isContained(element, drop)) && + ((!drop.accept) || + (Element.classNames(element).detect( + function(v) { return drop.accept.include(v) } ) )) && + Position.within(drop.element, point[0], point[1]) ); + }, + + deactivate: function(drop) { + if(drop.hoverclass) + Element.removeClassName(drop.element, drop.hoverclass); + this.last_active = null; + }, + + activate: function(drop) { + if(drop.hoverclass) + Element.addClassName(drop.element, drop.hoverclass); + this.last_active = drop; + }, + + show: function(point, element) { + if(!this.drops.length) return; + var affected = []; + + if(this.last_active) this.deactivate(this.last_active); + this.drops.each( function(drop) { + if(Droppables.isAffected(point, element, drop)) + affected.push(drop); + }); + + if(affected.length>0) { + drop = Droppables.findDeepestChild(affected); + Position.within(drop.element, point[0], point[1]); + if(drop.onHover) + drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element)); + + Droppables.activate(drop); + } + }, + + fire: function(event, element) { + if(!this.last_active) return; + Position.prepare(); + + if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active)) + if (this.last_active.onDrop) + this.last_active.onDrop(element, this.last_active.element, event); + }, + + reset: function() { + if(this.last_active) + this.deactivate(this.last_active); + } +} + +var Draggables = { + drags: [], + observers: [], + + register: function(draggable) { + if(this.drags.length == 0) { + this.eventMouseUp = this.endDrag.bindAsEventListener(this); + this.eventMouseMove = this.updateDrag.bindAsEventListener(this); + this.eventKeypress = this.keyPress.bindAsEventListener(this); + + Event.observe(document, "mouseup", this.eventMouseUp); + Event.observe(document, "mousemove", this.eventMouseMove); + Event.observe(document, "keypress", this.eventKeypress); + } + this.drags.push(draggable); + }, + + unregister: function(draggable) { + this.drags = this.drags.reject(function(d) { return d==draggable }); + if(this.drags.length == 0) { + Event.stopObserving(document, "mouseup", this.eventMouseUp); + Event.stopObserving(document, "mousemove", this.eventMouseMove); + Event.stopObserving(document, "keypress", this.eventKeypress); + } + }, + + activate: function(draggable) { + if(draggable.options.delay) { + this._timeout = setTimeout(function() { + Draggables._timeout = null; + window.focus(); + Draggables.activeDraggable = draggable; + }.bind(this), draggable.options.delay); + } else { + window.focus(); // allows keypress events if window isn't currently focused, fails for Safari + this.activeDraggable = draggable; + } + }, + + deactivate: function() { + this.activeDraggable = null; + }, + + updateDrag: function(event) { + if(!this.activeDraggable) return; + var pointer = [Event.pointerX(event), Event.pointerY(event)]; + // Mozilla-based browsers fire successive mousemove events with + // the same coordinates, prevent needless redrawing (moz bug?) + if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return; + this._lastPointer = pointer; + + this.activeDraggable.updateDrag(event, pointer); + }, + + endDrag: function(event) { + if(this._timeout) { + clearTimeout(this._timeout); + this._timeout = null; + } + if(!this.activeDraggable) return; + this._lastPointer = null; + this.activeDraggable.endDrag(event); + this.activeDraggable = null; + }, + + keyPress: function(event) { + if(this.activeDraggable) + this.activeDraggable.keyPress(event); + }, + + addObserver: function(observer) { + this.observers.push(observer); + this._cacheObserverCallbacks(); + }, + + removeObserver: function(element) { // element instead of observer fixes mem leaks + this.observers = this.observers.reject( function(o) { return o.element==element }); + this._cacheObserverCallbacks(); + }, + + notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag' + if(this[eventName+'Count'] > 0) + this.observers.each( function(o) { + if(o[eventName]) o[eventName](eventName, draggable, event); + }); + if(draggable.options[eventName]) draggable.options[eventName](draggable, event); + }, + + _cacheObserverCallbacks: function() { + ['onStart','onEnd','onDrag'].each( function(eventName) { + Draggables[eventName+'Count'] = Draggables.observers.select( + function(o) { return o[eventName]; } + ).length; + }); + } +} + +/*--------------------------------------------------------------------------*/ + +var Draggable = Class.create(); +Draggable._dragging = {}; + +Draggable.prototype = { + initialize: function(element) { + var defaults = { + handle: false, + reverteffect: function(element, top_offset, left_offset) { + var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02; + new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur, + queue: {scope:'_draggable', position:'end'} + }); + }, + endeffect: function(element) { + var toOpacity = typeof element._opacity == 'number' ? element._opacity : 1.0; + new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity, + queue: {scope:'_draggable', position:'end'}, + afterFinish: function(){ + Draggable._dragging[element] = false + } + }); + }, + zindex: 1000, + revert: false, + scroll: false, + scrollSensitivity: 20, + scrollSpeed: 15, + snap: false, // false, or xy or [x,y] or function(x,y){ return [x,y] } + delay: 0 + }; + + if(!arguments[1] || typeof arguments[1].endeffect == 'undefined') + Object.extend(defaults, { + starteffect: function(element) { + element._opacity = Element.getOpacity(element); + Draggable._dragging[element] = true; + new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7}); + } + }); + + var options = Object.extend(defaults, arguments[1] || {}); + + this.element = $(element); + + if(options.handle && (typeof options.handle == 'string')) + this.handle = this.element.down('.'+options.handle, 0); + + if(!this.handle) this.handle = $(options.handle); + if(!this.handle) this.handle = this.element; + + if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) { + options.scroll = $(options.scroll); + this._isScrollChild = Element.childOf(this.element, options.scroll); + } + + Element.makePositioned(this.element); // fix IE + + this.delta = this.currentDelta(); + this.options = options; + this.dragging = false; + + this.eventMouseDown = this.initDrag.bindAsEventListener(this); + Event.observe(this.handle, "mousedown", this.eventMouseDown); + + Draggables.register(this); + }, + + destroy: function() { + Event.stopObserving(this.handle, "mousedown", this.eventMouseDown); + Draggables.unregister(this); + }, + + currentDelta: function() { + return([ + parseInt(Element.getStyle(this.element,'left') || '0'), + parseInt(Element.getStyle(this.element,'top') || '0')]); + }, + + initDrag: function(event) { + if(typeof Draggable._dragging[this.element] != 'undefined' && + Draggable._dragging[this.element]) return; + if(Event.isLeftClick(event)) { + // abort on form elements, fixes a Firefox issue + var src = Event.element(event); + if(src.tagName && ( + src.tagName=='INPUT' || + src.tagName=='SELECT' || + src.tagName=='OPTION' || + src.tagName=='BUTTON' || + src.tagName=='TEXTAREA')) return; + + var pointer = [Event.pointerX(event), Event.pointerY(event)]; + var pos = Position.cumulativeOffset(this.element); + this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) }); + + Draggables.activate(this); + Event.stop(event); + } + }, + + startDrag: function(event) { + this.dragging = true; + + if(this.options.zindex) { + this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0); + this.element.style.zIndex = this.options.zindex; + } + + if(this.options.ghosting) { + this._clone = this.element.cloneNode(true); + Position.absolutize(this.element); + this.element.parentNode.insertBefore(this._clone, this.element); + } + + if(this.options.scroll) { + if (this.options.scroll == window) { + var where = this._getWindowScroll(this.options.scroll); + this.originalScrollLeft = where.left; + this.originalScrollTop = where.top; + } else { + this.originalScrollLeft = this.options.scroll.scrollLeft; + this.originalScrollTop = this.options.scroll.scrollTop; + } + } + + Draggables.notify('onStart', this, event); + + if(this.options.starteffect) this.options.starteffect(this.element); + }, + + updateDrag: function(event, pointer) { + if(!this.dragging) this.startDrag(event); + Position.prepare(); + Droppables.show(pointer, this.element); + Draggables.notify('onDrag', this, event); + + this.draw(pointer); + if(this.options.change) this.options.change(this); + + if(this.options.scroll) { + this.stopScrolling(); + + var p; + if (this.options.scroll == window) { + with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; } + } else { + p = Position.page(this.options.scroll); + p[0] += this.options.scroll.scrollLeft + Position.deltaX; + p[1] += this.options.scroll.scrollTop + Position.deltaY; + p.push(p[0]+this.options.scroll.offsetWidth); + p.push(p[1]+this.options.scroll.offsetHeight); + } + var speed = [0,0]; + if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity); + if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity); + if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity); + if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity); + this.startScrolling(speed); + } + + // fix AppleWebKit rendering + if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0); + + Event.stop(event); + }, + + finishDrag: function(event, success) { + this.dragging = false; + + if(this.options.ghosting) { + Position.relativize(this.element); + Element.remove(this._clone); + this._clone = null; + } + + if(success) Droppables.fire(event, this.element); + Draggables.notify('onEnd', this, event); + + var revert = this.options.revert; + if(revert && typeof revert == 'function') revert = revert(this.element); + + var d = this.currentDelta(); + if(revert && this.options.reverteffect) { + this.options.reverteffect(this.element, + d[1]-this.delta[1], d[0]-this.delta[0]); + } else { + this.delta = d; + } + + if(this.options.zindex) + this.element.style.zIndex = this.originalZ; + + if(this.options.endeffect) + this.options.endeffect(this.element); + + Draggables.deactivate(this); + Droppables.reset(); + }, + + keyPress: function(event) { + if(event.keyCode!=Event.KEY_ESC) return; + this.finishDrag(event, false); + Event.stop(event); + }, + + endDrag: function(event) { + if(!this.dragging) return; + this.stopScrolling(); + this.finishDrag(event, true); + Event.stop(event); + }, + + draw: function(point) { + var pos = Position.cumulativeOffset(this.element); + if(this.options.ghosting) { + var r = Position.realOffset(this.element); + pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY; + } + + var d = this.currentDelta(); + pos[0] -= d[0]; pos[1] -= d[1]; + + if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) { + pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft; + pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop; + } + + var p = [0,1].map(function(i){ + return (point[i]-pos[i]-this.offset[i]) + }.bind(this)); + + if(this.options.snap) { + if(typeof this.options.snap == 'function') { + p = this.options.snap(p[0],p[1],this); + } else { + if(this.options.snap instanceof Array) { + p = p.map( function(v, i) { + return Math.round(v/this.options.snap[i])*this.options.snap[i] }.bind(this)) + } else { + p = p.map( function(v) { + return Math.round(v/this.options.snap)*this.options.snap }.bind(this)) + } + }} + + var style = this.element.style; + if((!this.options.constraint) || (this.options.constraint=='horizontal')) + style.left = p[0] + "px"; + if((!this.options.constraint) || (this.options.constraint=='vertical')) + style.top = p[1] + "px"; + + if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering + }, + + stopScrolling: function() { + if(this.scrollInterval) { + clearInterval(this.scrollInterval); + this.scrollInterval = null; + Draggables._lastScrollPointer = null; + } + }, + + startScrolling: function(speed) { + if(!(speed[0] || speed[1])) return; + this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed]; + this.lastScrolled = new Date(); + this.scrollInterval = setInterval(this.scroll.bind(this), 10); + }, + + scroll: function() { + var current = new Date(); + var delta = current - this.lastScrolled; + this.lastScrolled = current; + if(this.options.scroll == window) { + with (this._getWindowScroll(this.options.scroll)) { + if (this.scrollSpeed[0] || this.scrollSpeed[1]) { + var d = delta / 1000; + this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] ); + } + } + } else { + this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000; + this.options.scroll.scrollTop += this.scrollSpeed[1] * delta / 1000; + } + + Position.prepare(); + Droppables.show(Draggables._lastPointer, this.element); + Draggables.notify('onDrag', this); + if (this._isScrollChild) { + Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer); + Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000; + Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000; + if (Draggables._lastScrollPointer[0] < 0) + Draggables._lastScrollPointer[0] = 0; + if (Draggables._lastScrollPointer[1] < 0) + Draggables._lastScrollPointer[1] = 0; + this.draw(Draggables._lastScrollPointer); + } + + if(this.options.change) this.options.change(this); + }, + + _getWindowScroll: function(w) { + var T, L, W, H; + with (w.document) { + if (w.document.documentElement && documentElement.scrollTop) { + T = documentElement.scrollTop; + L = documentElement.scrollLeft; + } else if (w.document.body) { + T = body.scrollTop; + L = body.scrollLeft; + } + if (w.innerWidth) { + W = w.innerWidth; + H = w.innerHeight; + } else if (w.document.documentElement && documentElement.clientWidth) { + W = documentElement.clientWidth; + H = documentElement.clientHeight; + } else { + W = body.offsetWidth; + H = body.offsetHeight + } + } + return { top: T, left: L, width: W, height: H }; + } +} + +/*--------------------------------------------------------------------------*/ + +var SortableObserver = Class.create(); +SortableObserver.prototype = { + initialize: function(element, observer) { + this.element = $(element); + this.observer = observer; + this.lastValue = Sortable.serialize(this.element); + }, + + onStart: function() { + this.lastValue = Sortable.serialize(this.element); + }, + + onEnd: function() { + Sortable.unmark(); + if(this.lastValue != Sortable.serialize(this.element)) + this.observer(this.element) + } +} + +var Sortable = { + SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/, + + sortables: {}, + + _findRootElement: function(element) { + while (element.tagName != "BODY") { + if(element.id && Sortable.sortables[element.id]) return element; + element = element.parentNode; + } + }, + + options: function(element) { + element = Sortable._findRootElement($(element)); + if(!element) return; + return Sortable.sortables[element.id]; + }, + + destroy: function(element){ + var s = Sortable.options(element); + + if(s) { + Draggables.removeObserver(s.element); + s.droppables.each(function(d){ Droppables.remove(d) }); + s.draggables.invoke('destroy'); + + delete Sortable.sortables[s.element.id]; + } + }, + + create: function(element) { + element = $(element); + var options = Object.extend({ + element: element, + tag: 'li', // assumes li children, override with tag: 'tagname' + dropOnEmpty: false, + tree: false, + treeTag: 'ul', + overlap: 'vertical', // one of 'vertical', 'horizontal' + constraint: 'vertical', // one of 'vertical', 'horizontal', false + containment: element, // also takes array of elements (or id's); or false + handle: false, // or a CSS class + only: false, + delay: 0, + hoverclass: null, + ghosting: false, + scroll: false, + scrollSensitivity: 20, + scrollSpeed: 15, + format: this.SERIALIZE_RULE, + onChange: Prototype.emptyFunction, + onUpdate: Prototype.emptyFunction + }, arguments[1] || {}); + + // clear any old sortable with same element + this.destroy(element); + + // build options for the draggables + var options_for_draggable = { + revert: true, + scroll: options.scroll, + scrollSpeed: options.scrollSpeed, + scrollSensitivity: options.scrollSensitivity, + delay: options.delay, + ghosting: options.ghosting, + constraint: options.constraint, + handle: options.handle }; + + if(options.starteffect) + options_for_draggable.starteffect = options.starteffect; + + if(options.reverteffect) + options_for_draggable.reverteffect = options.reverteffect; + else + if(options.ghosting) options_for_draggable.reverteffect = function(element) { + element.style.top = 0; + element.style.left = 0; + }; + + if(options.endeffect) + options_for_draggable.endeffect = options.endeffect; + + if(options.zindex) + options_for_draggable.zindex = options.zindex; + + // build options for the droppables + var options_for_droppable = { + overlap: options.overlap, + containment: options.containment, + tree: options.tree, + hoverclass: options.hoverclass, + onHover: Sortable.onHover + } + + var options_for_tree = { + onHover: Sortable.onEmptyHover, + overlap: options.overlap, + containment: options.containment, + hoverclass: options.hoverclass + } + + // fix for gecko engine + Element.cleanWhitespace(element); + + options.draggables = []; + options.droppables = []; + + // drop on empty handling + if(options.dropOnEmpty || options.tree) { + Droppables.add(element, options_for_tree); + options.droppables.push(element); + } + + (this.findElements(element, options) || []).each( function(e) { + // handles are per-draggable + var handle = options.handle ? + $(e).down('.'+options.handle,0) : e; + options.draggables.push( + new Draggable(e, Object.extend(options_for_draggable, { handle: handle }))); + Droppables.add(e, options_for_droppable); + if(options.tree) e.treeNode = element; + options.droppables.push(e); + }); + + if(options.tree) { + (Sortable.findTreeElements(element, options) || []).each( function(e) { + Droppables.add(e, options_for_tree); + e.treeNode = element; + options.droppables.push(e); + }); + } + + // keep reference + this.sortables[element.id] = options; + + // for onupdate + Draggables.addObserver(new SortableObserver(element, options.onUpdate)); + + }, + + // return all suitable-for-sortable elements in a guaranteed order + findElements: function(element, options) { + return Element.findChildren( + element, options.only, options.tree ? true : false, options.tag); + }, + + findTreeElements: function(element, options) { + return Element.findChildren( + element, options.only, options.tree ? true : false, options.treeTag); + }, + + onHover: function(element, dropon, overlap) { + if(Element.isParent(dropon, element)) return; + + if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) { + return; + } else if(overlap>0.5) { + Sortable.mark(dropon, 'before'); + if(dropon.previousSibling != element) { + var oldParentNode = element.parentNode; + element.style.visibility = "hidden"; // fix gecko rendering + dropon.parentNode.insertBefore(element, dropon); + if(dropon.parentNode!=oldParentNode) + Sortable.options(oldParentNode).onChange(element); + Sortable.options(dropon.parentNode).onChange(element); + } + } else { + Sortable.mark(dropon, 'after'); + var nextElement = dropon.nextSibling || null; + if(nextElement != element) { + var oldParentNode = element.parentNode; + element.style.visibility = "hidden"; // fix gecko rendering + dropon.parentNode.insertBefore(element, nextElement); + if(dropon.parentNode!=oldParentNode) + Sortable.options(oldParentNode).onChange(element); + Sortable.options(dropon.parentNode).onChange(element); + } + } + }, + + onEmptyHover: function(element, dropon, overlap) { + var oldParentNode = element.parentNode; + var droponOptions = Sortable.options(dropon); + + if(!Element.isParent(dropon, element)) { + var index; + + var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only}); + var child = null; + + if(children) { + var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap); + + for (index = 0; index < children.length; index += 1) { + if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) { + offset -= Element.offsetSize (children[index], droponOptions.overlap); + } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) { + child = index + 1 < children.length ? children[index + 1] : null; + break; + } else { + child = children[index]; + break; + } + } + } + + dropon.insertBefore(element, child); + + Sortable.options(oldParentNode).onChange(element); + droponOptions.onChange(element); + } + }, + + unmark: function() { + if(Sortable._marker) Sortable._marker.hide(); + }, + + mark: function(dropon, position) { + // mark on ghosting only + var sortable = Sortable.options(dropon.parentNode); + if(sortable && !sortable.ghosting) return; + + if(!Sortable._marker) { + Sortable._marker = + ($('dropmarker') || Element.extend(document.createElement('DIV'))). + hide().addClassName('dropmarker').setStyle({position:'absolute'}); + document.getElementsByTagName("body").item(0).appendChild(Sortable._marker); + } + var offsets = Position.cumulativeOffset(dropon); + Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'}); + + if(position=='after') + if(sortable.overlap == 'horizontal') + Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'}); + else + Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'}); + + Sortable._marker.show(); + }, + + _tree: function(element, options, parent) { + var children = Sortable.findElements(element, options) || []; + + for (var i = 0; i < children.length; ++i) { + var match = children[i].id.match(options.format); + + if (!match) continue; + + var child = { + id: encodeURIComponent(match ? match[1] : null), + element: element, + parent: parent, + children: [], + position: parent.children.length, + container: $(children[i]).down(options.treeTag) + } + + /* Get the element containing the children and recurse over it */ + if (child.container) + this._tree(child.container, options, child) + + parent.children.push (child); + } + + return parent; + }, + + tree: function(element) { + element = $(element); + var sortableOptions = this.options(element); + var options = Object.extend({ + tag: sortableOptions.tag, + treeTag: sortableOptions.treeTag, + only: sortableOptions.only, + name: element.id, + format: sortableOptions.format + }, arguments[1] || {}); + + var root = { + id: null, + parent: null, + children: [], + container: element, + position: 0 + } + + return Sortable._tree(element, options, root); + }, + + /* Construct a [i] index for a particular node */ + _constructIndex: function(node) { + var index = ''; + do { + if (node.id) index = '[' + node.position + ']' + index; + } while ((node = node.parent) != null); + return index; + }, + + sequence: function(element) { + element = $(element); + var options = Object.extend(this.options(element), arguments[1] || {}); + + return $(this.findElements(element, options) || []).map( function(item) { + return item.id.match(options.format) ? item.id.match(options.format)[1] : ''; + }); + }, + + setSequence: function(element, new_sequence) { + element = $(element); + var options = Object.extend(this.options(element), arguments[2] || {}); + + var nodeMap = {}; + this.findElements(element, options).each( function(n) { + if (n.id.match(options.format)) + nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; + n.parentNode.removeChild(n); + }); + + new_sequence.each(function(ident) { + var n = nodeMap[ident]; + if (n) { + n[1].appendChild(n[0]); + delete nodeMap[ident]; + } + }); + }, + + serialize: function(element) { + element = $(element); + var options = Object.extend(Sortable.options(element), arguments[1] || {}); + var name = encodeURIComponent( + (arguments[1] && arguments[1].name) ? arguments[1].name : element.id); + + if (options.tree) { + return Sortable.tree(element, arguments[1]).children.map( function (item) { + return [name + Sortable._constructIndex(item) + "[id]=" + + encodeURIComponent(item.id)].concat(item.children.map(arguments.callee)); + }).flatten().join('&'); + } else { + return Sortable.sequence(element, arguments[1]).map( function(item) { + return name + "[]=" + encodeURIComponent(item); + }).join('&'); + } + } +} + +// Returns true if child is contained within element +Element.isParent = function(child, element) { + if (!child.parentNode || child == element) return false; + if (child.parentNode == element) return true; + return Element.isParent(child.parentNode, element); +} + +Element.findChildren = function(element, only, recursive, tagName) { + if(!element.hasChildNodes()) return null; + tagName = tagName.toUpperCase(); + if(only) only = [only].flatten(); + var elements = []; + $A(element.childNodes).each( function(e) { + if(e.tagName && e.tagName.toUpperCase()==tagName && + (!only || (Element.classNames(e).detect(function(v) { return only.include(v) })))) + elements.push(e); + if(recursive) { + var grandchildren = Element.findChildren(e, only, recursive, tagName); + if(grandchildren) elements.push(grandchildren); + } + }); + + return (elements.length>0 ? elements.flatten() : []); +} + +Element.offsetSize = function (element, type) { + return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')]; +} diff --git a/rails/public/javascripts/effects.js b/rails/public/javascripts/effects.js new file mode 100644 index 0000000..3b02eda --- /dev/null +++ b/rails/public/javascripts/effects.js @@ -0,0 +1,1088 @@ +// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// Contributors: +// Justin Palmer (http://encytemedia.com/) +// Mark Pilgrim (http://diveintomark.org/) +// Martin Bialasinki +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +// converts rgb() and #xxx to #xxxxxx format, +// returns self (or first argument) if not convertable +String.prototype.parseColor = function() { + var color = '#'; + if(this.slice(0,4) == 'rgb(') { + var cols = this.slice(4,this.length-1).split(','); + var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3); + } else { + if(this.slice(0,1) == '#') { + if(this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase(); + if(this.length==7) color = this.toLowerCase(); + } + } + return(color.length==7 ? color : (arguments[0] || this)); +} + +/*--------------------------------------------------------------------------*/ + +Element.collectTextNodes = function(element) { + return $A($(element).childNodes).collect( function(node) { + return (node.nodeType==3 ? node.nodeValue : + (node.hasChildNodes() ? Element.collectTextNodes(node) : '')); + }).flatten().join(''); +} + +Element.collectTextNodesIgnoreClass = function(element, className) { + return $A($(element).childNodes).collect( function(node) { + return (node.nodeType==3 ? node.nodeValue : + ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? + Element.collectTextNodesIgnoreClass(node, className) : '')); + }).flatten().join(''); +} + +Element.setContentZoom = function(element, percent) { + element = $(element); + element.setStyle({fontSize: (percent/100) + 'em'}); + if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0); + return element; +} + +Element.getOpacity = function(element){ + element = $(element); + var opacity; + if (opacity = element.getStyle('opacity')) + return parseFloat(opacity); + if (opacity = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/)) + if(opacity[1]) return parseFloat(opacity[1]) / 100; + return 1.0; +} + +Element.setOpacity = function(element, value){ + element= $(element); + if (value == 1){ + element.setStyle({ opacity: + (/Gecko/.test(navigator.userAgent) && !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? + 0.999999 : 1.0 }); + if(/MSIE/.test(navigator.userAgent) && !window.opera) + element.setStyle({filter: Element.getStyle(element,'filter').replace(/alpha\([^\)]*\)/gi,'')}); + } else { + if(value < 0.00001) value = 0; + element.setStyle({opacity: value}); + if(/MSIE/.test(navigator.userAgent) && !window.opera) + element.setStyle( + { filter: element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'') + + 'alpha(opacity='+value*100+')' }); + } + return element; +} + +Element.getInlineOpacity = function(element){ + return $(element).style.opacity || ''; +} + +Element.forceRerendering = function(element) { + try { + element = $(element); + var n = document.createTextNode(' '); + element.appendChild(n); + element.removeChild(n); + } catch(e) { } +}; + +/*--------------------------------------------------------------------------*/ + +Array.prototype.call = function() { + var args = arguments; + this.each(function(f){ f.apply(this, args) }); +} + +/*--------------------------------------------------------------------------*/ + +var Effect = { + _elementDoesNotExistError: { + name: 'ElementDoesNotExistError', + message: 'The specified DOM element does not exist, but is required for this effect to operate' + }, + tagifyText: function(element) { + if(typeof Builder == 'undefined') + throw("Effect.tagifyText requires including script.aculo.us' builder.js library"); + + var tagifyStyle = 'position:relative'; + if(/MSIE/.test(navigator.userAgent) && !window.opera) tagifyStyle += ';zoom:1'; + + element = $(element); + $A(element.childNodes).each( function(child) { + if(child.nodeType==3) { + child.nodeValue.toArray().each( function(character) { + element.insertBefore( + Builder.node('span',{style: tagifyStyle}, + character == ' ' ? String.fromCharCode(160) : character), + child); + }); + Element.remove(child); + } + }); + }, + multiple: function(element, effect) { + var elements; + if(((typeof element == 'object') || + (typeof element == 'function')) && + (element.length)) + elements = element; + else + elements = $(element).childNodes; + + var options = Object.extend({ + speed: 0.1, + delay: 0.0 + }, arguments[2] || {}); + var masterDelay = options.delay; + + $A(elements).each( function(element, index) { + new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay })); + }); + }, + PAIRS: { + 'slide': ['SlideDown','SlideUp'], + 'blind': ['BlindDown','BlindUp'], + 'appear': ['Appear','Fade'] + }, + toggle: function(element, effect) { + element = $(element); + effect = (effect || 'appear').toLowerCase(); + var options = Object.extend({ + queue: { position:'end', scope:(element.id || 'global'), limit: 1 } + }, arguments[2] || {}); + Effect[element.visible() ? + Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options); + } +}; + +var Effect2 = Effect; // deprecated + +/* ------------- transitions ------------- */ + +Effect.Transitions = { + linear: Prototype.K, + sinoidal: function(pos) { + return (-Math.cos(pos*Math.PI)/2) + 0.5; + }, + reverse: function(pos) { + return 1-pos; + }, + flicker: function(pos) { + return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4; + }, + wobble: function(pos) { + return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5; + }, + pulse: function(pos, pulses) { + pulses = pulses || 5; + return ( + Math.round((pos % (1/pulses)) * pulses) == 0 ? + ((pos * pulses * 2) - Math.floor(pos * pulses * 2)) : + 1 - ((pos * pulses * 2) - Math.floor(pos * pulses * 2)) + ); + }, + none: function(pos) { + return 0; + }, + full: function(pos) { + return 1; + } +}; + +/* ------------- core effects ------------- */ + +Effect.ScopedQueue = Class.create(); +Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), { + initialize: function() { + this.effects = []; + this.interval = null; + }, + _each: function(iterator) { + this.effects._each(iterator); + }, + add: function(effect) { + var timestamp = new Date().getTime(); + + var position = (typeof effect.options.queue == 'string') ? + effect.options.queue : effect.options.queue.position; + + switch(position) { + case 'front': + // move unstarted effects after this effect + this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) { + e.startOn += effect.finishOn; + e.finishOn += effect.finishOn; + }); + break; + case 'with-last': + timestamp = this.effects.pluck('startOn').max() || timestamp; + break; + case 'end': + // start effect after last queued effect has finished + timestamp = this.effects.pluck('finishOn').max() || timestamp; + break; + } + + effect.startOn += timestamp; + effect.finishOn += timestamp; + + if(!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit)) + this.effects.push(effect); + + if(!this.interval) + this.interval = setInterval(this.loop.bind(this), 40); + }, + remove: function(effect) { + this.effects = this.effects.reject(function(e) { return e==effect }); + if(this.effects.length == 0) { + clearInterval(this.interval); + this.interval = null; + } + }, + loop: function() { + var timePos = new Date().getTime(); + this.effects.invoke('loop', timePos); + } +}); + +Effect.Queues = { + instances: $H(), + get: function(queueName) { + if(typeof queueName != 'string') return queueName; + + if(!this.instances[queueName]) + this.instances[queueName] = new Effect.ScopedQueue(); + + return this.instances[queueName]; + } +} +Effect.Queue = Effect.Queues.get('global'); + +Effect.DefaultOptions = { + transition: Effect.Transitions.sinoidal, + duration: 1.0, // seconds + fps: 25.0, // max. 25fps due to Effect.Queue implementation + sync: false, // true for combining + from: 0.0, + to: 1.0, + delay: 0.0, + queue: 'parallel' +} + +Effect.Base = function() {}; +Effect.Base.prototype = { + position: null, + start: function(options) { + this.options = Object.extend(Object.extend({},Effect.DefaultOptions), options || {}); + this.currentFrame = 0; + this.state = 'idle'; + this.startOn = this.options.delay*1000; + this.finishOn = this.startOn + (this.options.duration*1000); + this.event('beforeStart'); + if(!this.options.sync) + Effect.Queues.get(typeof this.options.queue == 'string' ? + 'global' : this.options.queue.scope).add(this); + }, + loop: function(timePos) { + if(timePos >= this.startOn) { + if(timePos >= this.finishOn) { + this.render(1.0); + this.cancel(); + this.event('beforeFinish'); + if(this.finish) this.finish(); + this.event('afterFinish'); + return; + } + var pos = (timePos - this.startOn) / (this.finishOn - this.startOn); + var frame = Math.round(pos * this.options.fps * this.options.duration); + if(frame > this.currentFrame) { + this.render(pos); + this.currentFrame = frame; + } + } + }, + render: function(pos) { + if(this.state == 'idle') { + this.state = 'running'; + this.event('beforeSetup'); + if(this.setup) this.setup(); + this.event('afterSetup'); + } + if(this.state == 'running') { + if(this.options.transition) pos = this.options.transition(pos); + pos *= (this.options.to-this.options.from); + pos += this.options.from; + this.position = pos; + this.event('beforeUpdate'); + if(this.update) this.update(pos); + this.event('afterUpdate'); + } + }, + cancel: function() { + if(!this.options.sync) + Effect.Queues.get(typeof this.options.queue == 'string' ? + 'global' : this.options.queue.scope).remove(this); + this.state = 'finished'; + }, + event: function(eventName) { + if(this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this); + if(this.options[eventName]) this.options[eventName](this); + }, + inspect: function() { + return '#'; + } +} + +Effect.Parallel = Class.create(); +Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototype), { + initialize: function(effects) { + this.effects = effects || []; + this.start(arguments[1]); + }, + update: function(position) { + this.effects.invoke('render', position); + }, + finish: function(position) { + this.effects.each( function(effect) { + effect.render(1.0); + effect.cancel(); + effect.event('beforeFinish'); + if(effect.finish) effect.finish(position); + effect.event('afterFinish'); + }); + } +}); + +Effect.Event = Class.create(); +Object.extend(Object.extend(Effect.Event.prototype, Effect.Base.prototype), { + initialize: function() { + var options = Object.extend({ + duration: 0 + }, arguments[0] || {}); + this.start(options); + }, + update: Prototype.emptyFunction +}); + +Effect.Opacity = Class.create(); +Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + if(!this.element) throw(Effect._elementDoesNotExistError); + // make this work on IE on elements without 'layout' + if(/MSIE/.test(navigator.userAgent) && !window.opera && (!this.element.currentStyle.hasLayout)) + this.element.setStyle({zoom: 1}); + var options = Object.extend({ + from: this.element.getOpacity() || 0.0, + to: 1.0 + }, arguments[1] || {}); + this.start(options); + }, + update: function(position) { + this.element.setOpacity(position); + } +}); + +Effect.Move = Class.create(); +Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + if(!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + x: 0, + y: 0, + mode: 'relative' + }, arguments[1] || {}); + this.start(options); + }, + setup: function() { + // Bug in Opera: Opera returns the "real" position of a static element or + // relative element that does not have top/left explicitly set. + // ==> Always set top and left for position relative elements in your stylesheets + // (to 0 if you do not need them) + this.element.makePositioned(); + this.originalLeft = parseFloat(this.element.getStyle('left') || '0'); + this.originalTop = parseFloat(this.element.getStyle('top') || '0'); + if(this.options.mode == 'absolute') { + // absolute movement, so we need to calc deltaX and deltaY + this.options.x = this.options.x - this.originalLeft; + this.options.y = this.options.y - this.originalTop; + } + }, + update: function(position) { + this.element.setStyle({ + left: Math.round(this.options.x * position + this.originalLeft) + 'px', + top: Math.round(this.options.y * position + this.originalTop) + 'px' + }); + } +}); + +// for backwards compatibility +Effect.MoveBy = function(element, toTop, toLeft) { + return new Effect.Move(element, + Object.extend({ x: toLeft, y: toTop }, arguments[3] || {})); +}; + +Effect.Scale = Class.create(); +Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype), { + initialize: function(element, percent) { + this.element = $(element); + if(!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + scaleX: true, + scaleY: true, + scaleContent: true, + scaleFromCenter: false, + scaleMode: 'box', // 'box' or 'contents' or {} with provided values + scaleFrom: 100.0, + scaleTo: percent + }, arguments[2] || {}); + this.start(options); + }, + setup: function() { + this.restoreAfterFinish = this.options.restoreAfterFinish || false; + this.elementPositioning = this.element.getStyle('position'); + + this.originalStyle = {}; + ['top','left','width','height','fontSize'].each( function(k) { + this.originalStyle[k] = this.element.style[k]; + }.bind(this)); + + this.originalTop = this.element.offsetTop; + this.originalLeft = this.element.offsetLeft; + + var fontSize = this.element.getStyle('font-size') || '100%'; + ['em','px','%','pt'].each( function(fontSizeType) { + if(fontSize.indexOf(fontSizeType)>0) { + this.fontSize = parseFloat(fontSize); + this.fontSizeType = fontSizeType; + } + }.bind(this)); + + this.factor = (this.options.scaleTo - this.options.scaleFrom)/100; + + this.dims = null; + if(this.options.scaleMode=='box') + this.dims = [this.element.offsetHeight, this.element.offsetWidth]; + if(/^content/.test(this.options.scaleMode)) + this.dims = [this.element.scrollHeight, this.element.scrollWidth]; + if(!this.dims) + this.dims = [this.options.scaleMode.originalHeight, + this.options.scaleMode.originalWidth]; + }, + update: function(position) { + var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position); + if(this.options.scaleContent && this.fontSize) + this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType }); + this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale); + }, + finish: function(position) { + if(this.restoreAfterFinish) this.element.setStyle(this.originalStyle); + }, + setDimensions: function(height, width) { + var d = {}; + if(this.options.scaleX) d.width = Math.round(width) + 'px'; + if(this.options.scaleY) d.height = Math.round(height) + 'px'; + if(this.options.scaleFromCenter) { + var topd = (height - this.dims[0])/2; + var leftd = (width - this.dims[1])/2; + if(this.elementPositioning == 'absolute') { + if(this.options.scaleY) d.top = this.originalTop-topd + 'px'; + if(this.options.scaleX) d.left = this.originalLeft-leftd + 'px'; + } else { + if(this.options.scaleY) d.top = -topd + 'px'; + if(this.options.scaleX) d.left = -leftd + 'px'; + } + } + this.element.setStyle(d); + } +}); + +Effect.Highlight = Class.create(); +Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + if(!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || {}); + this.start(options); + }, + setup: function() { + // Prevent executing on elements not in the layout flow + if(this.element.getStyle('display')=='none') { this.cancel(); return; } + // Disable background image during the effect + this.oldStyle = { + backgroundImage: this.element.getStyle('background-image') }; + this.element.setStyle({backgroundImage: 'none'}); + if(!this.options.endcolor) + this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff'); + if(!this.options.restorecolor) + this.options.restorecolor = this.element.getStyle('background-color'); + // init color calculations + this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this)); + this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this)); + }, + update: function(position) { + this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){ + return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColorPart()); }.bind(this)) }); + }, + finish: function() { + this.element.setStyle(Object.extend(this.oldStyle, { + backgroundColor: this.options.restorecolor + })); + } +}); + +Effect.ScrollTo = Class.create(); +Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + this.start(arguments[1] || {}); + }, + setup: function() { + Position.prepare(); + var offsets = Position.cumulativeOffset(this.element); + if(this.options.offset) offsets[1] += this.options.offset; + var max = window.innerHeight ? + window.height - window.innerHeight : + document.body.scrollHeight - + (document.documentElement.clientHeight ? + document.documentElement.clientHeight : document.body.clientHeight); + this.scrollStart = Position.deltaY; + this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart; + }, + update: function(position) { + Position.prepare(); + window.scrollTo(Position.deltaX, + this.scrollStart + (position*this.delta)); + } +}); + +/* ------------- combination effects ------------- */ + +Effect.Fade = function(element) { + element = $(element); + var oldOpacity = element.getInlineOpacity(); + var options = Object.extend({ + from: element.getOpacity() || 1.0, + to: 0.0, + afterFinishInternal: function(effect) { + if(effect.options.to!=0) return; + effect.element.hide().setStyle({opacity: oldOpacity}); + }}, arguments[1] || {}); + return new Effect.Opacity(element,options); +} + +Effect.Appear = function(element) { + element = $(element); + var options = Object.extend({ + from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0), + to: 1.0, + // force Safari to render floated elements properly + afterFinishInternal: function(effect) { + effect.element.forceRerendering(); + }, + beforeSetup: function(effect) { + effect.element.setOpacity(effect.options.from).show(); + }}, arguments[1] || {}); + return new Effect.Opacity(element,options); +} + +Effect.Puff = function(element) { + element = $(element); + var oldStyle = { + opacity: element.getInlineOpacity(), + position: element.getStyle('position'), + top: element.style.top, + left: element.style.left, + width: element.style.width, + height: element.style.height + }; + return new Effect.Parallel( + [ new Effect.Scale(element, 200, + { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), + new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], + Object.extend({ duration: 1.0, + beforeSetupInternal: function(effect) { + Position.absolutize(effect.effects[0].element) + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().setStyle(oldStyle); } + }, arguments[1] || {}) + ); +} + +Effect.BlindUp = function(element) { + element = $(element); + element.makeClipping(); + return new Effect.Scale(element, 0, + Object.extend({ scaleContent: false, + scaleX: false, + restoreAfterFinish: true, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping(); + } + }, arguments[1] || {}) + ); +} + +Effect.BlindDown = function(element) { + element = $(element); + var elementDimensions = element.getDimensions(); + return new Effect.Scale(element, 100, Object.extend({ + scaleContent: false, + scaleX: false, + scaleFrom: 0, + scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, + restoreAfterFinish: true, + afterSetup: function(effect) { + effect.element.makeClipping().setStyle({height: '0px'}).show(); + }, + afterFinishInternal: function(effect) { + effect.element.undoClipping(); + } + }, arguments[1] || {})); +} + +Effect.SwitchOff = function(element) { + element = $(element); + var oldOpacity = element.getInlineOpacity(); + return new Effect.Appear(element, Object.extend({ + duration: 0.4, + from: 0, + transition: Effect.Transitions.flicker, + afterFinishInternal: function(effect) { + new Effect.Scale(effect.element, 1, { + duration: 0.3, scaleFromCenter: true, + scaleX: false, scaleContent: false, restoreAfterFinish: true, + beforeSetup: function(effect) { + effect.element.makePositioned().makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity}); + } + }) + } + }, arguments[1] || {})); +} + +Effect.DropOut = function(element) { + element = $(element); + var oldStyle = { + top: element.getStyle('top'), + left: element.getStyle('left'), + opacity: element.getInlineOpacity() }; + return new Effect.Parallel( + [ new Effect.Move(element, {x: 0, y: 100, sync: true }), + new Effect.Opacity(element, { sync: true, to: 0.0 }) ], + Object.extend( + { duration: 0.5, + beforeSetup: function(effect) { + effect.effects[0].element.makePositioned(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle); + } + }, arguments[1] || {})); +} + +Effect.Shake = function(element) { + element = $(element); + var oldStyle = { + top: element.getStyle('top'), + left: element.getStyle('left') }; + return new Effect.Move(element, + { x: 20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { + effect.element.undoPositioned().setStyle(oldStyle); + }}) }}) }}) }}) }}) }}); +} + +Effect.SlideDown = function(element) { + element = $(element).cleanWhitespace(); + // SlideDown need to have the content of the element wrapped in a container element with fixed height! + var oldInnerBottom = element.down().getStyle('bottom'); + var elementDimensions = element.getDimensions(); + return new Effect.Scale(element, 100, Object.extend({ + scaleContent: false, + scaleX: false, + scaleFrom: window.opera ? 0 : 1, + scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, + restoreAfterFinish: true, + afterSetup: function(effect) { + effect.element.makePositioned(); + effect.element.down().makePositioned(); + if(window.opera) effect.element.setStyle({top: ''}); + effect.element.makeClipping().setStyle({height: '0px'}).show(); + }, + afterUpdateInternal: function(effect) { + effect.element.down().setStyle({bottom: + (effect.dims[0] - effect.element.clientHeight) + 'px' }); + }, + afterFinishInternal: function(effect) { + effect.element.undoClipping().undoPositioned(); + effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); } + }, arguments[1] || {}) + ); +} + +Effect.SlideUp = function(element) { + element = $(element).cleanWhitespace(); + var oldInnerBottom = element.down().getStyle('bottom'); + return new Effect.Scale(element, window.opera ? 0 : 1, + Object.extend({ scaleContent: false, + scaleX: false, + scaleMode: 'box', + scaleFrom: 100, + restoreAfterFinish: true, + beforeStartInternal: function(effect) { + effect.element.makePositioned(); + effect.element.down().makePositioned(); + if(window.opera) effect.element.setStyle({top: ''}); + effect.element.makeClipping().show(); + }, + afterUpdateInternal: function(effect) { + effect.element.down().setStyle({bottom: + (effect.dims[0] - effect.element.clientHeight) + 'px' }); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().undoPositioned().setStyle({bottom: oldInnerBottom}); + effect.element.down().undoPositioned(); + } + }, arguments[1] || {}) + ); +} + +// Bug in opera makes the TD containing this element expand for a instance after finish +Effect.Squish = function(element) { + return new Effect.Scale(element, window.opera ? 1 : 0, { + restoreAfterFinish: true, + beforeSetup: function(effect) { + effect.element.makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping(); + } + }); +} + +Effect.Grow = function(element) { + element = $(element); + var options = Object.extend({ + direction: 'center', + moveTransition: Effect.Transitions.sinoidal, + scaleTransition: Effect.Transitions.sinoidal, + opacityTransition: Effect.Transitions.full + }, arguments[1] || {}); + var oldStyle = { + top: element.style.top, + left: element.style.left, + height: element.style.height, + width: element.style.width, + opacity: element.getInlineOpacity() }; + + var dims = element.getDimensions(); + var initialMoveX, initialMoveY; + var moveX, moveY; + + switch (options.direction) { + case 'top-left': + initialMoveX = initialMoveY = moveX = moveY = 0; + break; + case 'top-right': + initialMoveX = dims.width; + initialMoveY = moveY = 0; + moveX = -dims.width; + break; + case 'bottom-left': + initialMoveX = moveX = 0; + initialMoveY = dims.height; + moveY = -dims.height; + break; + case 'bottom-right': + initialMoveX = dims.width; + initialMoveY = dims.height; + moveX = -dims.width; + moveY = -dims.height; + break; + case 'center': + initialMoveX = dims.width / 2; + initialMoveY = dims.height / 2; + moveX = -dims.width / 2; + moveY = -dims.height / 2; + break; + } + + return new Effect.Move(element, { + x: initialMoveX, + y: initialMoveY, + duration: 0.01, + beforeSetup: function(effect) { + effect.element.hide().makeClipping().makePositioned(); + }, + afterFinishInternal: function(effect) { + new Effect.Parallel( + [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }), + new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }), + new Effect.Scale(effect.element, 100, { + scaleMode: { originalHeight: dims.height, originalWidth: dims.width }, + sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true}) + ], Object.extend({ + beforeSetup: function(effect) { + effect.effects[0].element.setStyle({height: '0px'}).show(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle); + } + }, options) + ) + } + }); +} + +Effect.Shrink = function(element) { + element = $(element); + var options = Object.extend({ + direction: 'center', + moveTransition: Effect.Transitions.sinoidal, + scaleTransition: Effect.Transitions.sinoidal, + opacityTransition: Effect.Transitions.none + }, arguments[1] || {}); + var oldStyle = { + top: element.style.top, + left: element.style.left, + height: element.style.height, + width: element.style.width, + opacity: element.getInlineOpacity() }; + + var dims = element.getDimensions(); + var moveX, moveY; + + switch (options.direction) { + case 'top-left': + moveX = moveY = 0; + break; + case 'top-right': + moveX = dims.width; + moveY = 0; + break; + case 'bottom-left': + moveX = 0; + moveY = dims.height; + break; + case 'bottom-right': + moveX = dims.width; + moveY = dims.height; + break; + case 'center': + moveX = dims.width / 2; + moveY = dims.height / 2; + break; + } + + return new Effect.Parallel( + [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }), + new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}), + new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }) + ], Object.extend({ + beforeStartInternal: function(effect) { + effect.effects[0].element.makePositioned().makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); } + }, options) + ); +} + +Effect.Pulsate = function(element) { + element = $(element); + var options = arguments[1] || {}; + var oldOpacity = element.getInlineOpacity(); + var transition = options.transition || Effect.Transitions.sinoidal; + var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos, options.pulses)) }; + reverser.bind(transition); + return new Effect.Opacity(element, + Object.extend(Object.extend({ duration: 2.0, from: 0, + afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); } + }, options), {transition: reverser})); +} + +Effect.Fold = function(element) { + element = $(element); + var oldStyle = { + top: element.style.top, + left: element.style.left, + width: element.style.width, + height: element.style.height }; + element.makeClipping(); + return new Effect.Scale(element, 5, Object.extend({ + scaleContent: false, + scaleX: false, + afterFinishInternal: function(effect) { + new Effect.Scale(element, 1, { + scaleContent: false, + scaleY: false, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().setStyle(oldStyle); + } }); + }}, arguments[1] || {})); +}; + +Effect.Morph = Class.create(); +Object.extend(Object.extend(Effect.Morph.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + if(!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + style: '' + }, arguments[1] || {}); + this.start(options); + }, + setup: function(){ + function parseColor(color){ + if(!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff'; + color = color.parseColor(); + return $R(0,2).map(function(i){ + return parseInt( color.slice(i*2+1,i*2+3), 16 ) + }); + } + this.transforms = this.options.style.parseStyle().map(function(property){ + var originalValue = this.element.getStyle(property[0]); + return $H({ + style: property[0], + originalValue: property[1].unit=='color' ? + parseColor(originalValue) : parseFloat(originalValue || 0), + targetValue: property[1].unit=='color' ? + parseColor(property[1].value) : property[1].value, + unit: property[1].unit + }); + }.bind(this)).reject(function(transform){ + return ( + (transform.originalValue == transform.targetValue) || + ( + transform.unit != 'color' && + (isNaN(transform.originalValue) || isNaN(transform.targetValue)) + ) + ) + }); + }, + update: function(position) { + var style = $H(), value = null; + this.transforms.each(function(transform){ + value = transform.unit=='color' ? + $R(0,2).inject('#',function(m,v,i){ + return m+(Math.round(transform.originalValue[i]+ + (transform.targetValue[i] - transform.originalValue[i])*position)).toColorPart() }) : + transform.originalValue + Math.round( + ((transform.targetValue - transform.originalValue) * position) * 1000)/1000 + transform.unit; + style[transform.style] = value; + }); + this.element.setStyle(style); + } +}); + +Effect.Transform = Class.create(); +Object.extend(Effect.Transform.prototype, { + initialize: function(tracks){ + this.tracks = []; + this.options = arguments[1] || {}; + this.addTracks(tracks); + }, + addTracks: function(tracks){ + tracks.each(function(track){ + var data = $H(track).values().first(); + this.tracks.push($H({ + ids: $H(track).keys().first(), + effect: Effect.Morph, + options: { style: data } + })); + }.bind(this)); + return this; + }, + play: function(){ + return new Effect.Parallel( + this.tracks.map(function(track){ + var elements = [$(track.ids) || $$(track.ids)].flatten(); + return elements.map(function(e){ return new track.effect(e, Object.extend({ sync:true }, track.options)) }); + }).flatten(), + this.options + ); + } +}); + +Element.CSS_PROPERTIES = ['azimuth', 'backgroundAttachment', 'backgroundColor', 'backgroundImage', + 'backgroundPosition', 'backgroundRepeat', 'borderBottomColor', 'borderBottomStyle', + 'borderBottomWidth', 'borderCollapse', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', + 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderSpacing', 'borderTopColor', + 'borderTopStyle', 'borderTopWidth', 'bottom', 'captionSide', 'clear', 'clip', 'color', 'content', + 'counterIncrement', 'counterReset', 'cssFloat', 'cueAfter', 'cueBefore', 'cursor', 'direction', + 'display', 'elevation', 'emptyCells', 'fontFamily', 'fontSize', 'fontSizeAdjust', 'fontStretch', + 'fontStyle', 'fontVariant', 'fontWeight', 'height', 'left', 'letterSpacing', 'lineHeight', + 'listStyleImage', 'listStylePosition', 'listStyleType', 'marginBottom', 'marginLeft', 'marginRight', + 'marginTop', 'markerOffset', 'marks', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'opacity', + 'orphans', 'outlineColor', 'outlineOffset', 'outlineStyle', 'outlineWidth', 'overflowX', 'overflowY', + 'paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop', 'page', 'pageBreakAfter', 'pageBreakBefore', + 'pageBreakInside', 'pauseAfter', 'pauseBefore', 'pitch', 'pitchRange', 'position', 'quotes', + 'richness', 'right', 'size', 'speakHeader', 'speakNumeral', 'speakPunctuation', 'speechRate', 'stress', + 'tableLayout', 'textAlign', 'textDecoration', 'textIndent', 'textShadow', 'textTransform', 'top', + 'unicodeBidi', 'verticalAlign', 'visibility', 'voiceFamily', 'volume', 'whiteSpace', 'widows', + 'width', 'wordSpacing', 'zIndex']; + +Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/; + +String.prototype.parseStyle = function(){ + var element = Element.extend(document.createElement('div')); + element.innerHTML = '

    '; + var style = element.down().style, styleRules = $H(); + + Element.CSS_PROPERTIES.each(function(property){ + if(style[property]) styleRules[property] = style[property]; + }); + + var result = $H(); + + styleRules.each(function(pair){ + var property = pair[0], value = pair[1], unit = null; + + if(value.parseColor('#zzzzzz') != '#zzzzzz') { + value = value.parseColor(); + unit = 'color'; + } else if(Element.CSS_LENGTH.test(value)) + var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/), + value = parseFloat(components[1]), unit = (components.length == 3) ? components[2] : null; + + result[property.underscore().dasherize()] = $H({ value:value, unit:unit }); + }.bind(this)); + + return result; +}; + +Element.morph = function(element, style) { + new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || {})); + return element; +}; + +['setOpacity','getOpacity','getInlineOpacity','forceRerendering','setContentZoom', + 'collectTextNodes','collectTextNodesIgnoreClass','morph'].each( + function(f) { Element.Methods[f] = Element[f]; } +); + +Element.Methods.visualEffect = function(element, effect, options) { + s = effect.gsub(/_/, '-').camelize(); + effect_class = s.charAt(0).toUpperCase() + s.substring(1); + new Effect[effect_class](element, options); + return $(element); +}; + +Element.addMethods(); \ No newline at end of file diff --git a/rails/public/javascripts/prototype.js b/rails/public/javascripts/prototype.js new file mode 100644 index 0000000..5058221 --- /dev/null +++ b/rails/public/javascripts/prototype.js @@ -0,0 +1,2515 @@ +/* Prototype JavaScript framework, version 1.5.0 + * (c) 2005-2007 Sam Stephenson + * + * Prototype is freely distributable under the terms of an MIT-style license. + * For details, see the Prototype web site: http://prototype.conio.net/ + * +/*--------------------------------------------------------------------------*/ + +var Prototype = { + Version: '1.5.0', + BrowserFeatures: { + XPath: !!document.evaluate + }, + + ScriptFragment: '(?:)((\n|\r|.)*?)(?:<\/script>)', + emptyFunction: function() {}, + K: function(x) { return x } +} + +var Class = { + create: function() { + return function() { + this.initialize.apply(this, arguments); + } + } +} + +var Abstract = new Object(); + +Object.extend = function(destination, source) { + for (var property in source) { + destination[property] = source[property]; + } + return destination; +} + +Object.extend(Object, { + inspect: function(object) { + try { + if (object === undefined) return 'undefined'; + if (object === null) return 'null'; + return object.inspect ? object.inspect() : object.toString(); + } catch (e) { + if (e instanceof RangeError) return '...'; + throw e; + } + }, + + keys: function(object) { + var keys = []; + for (var property in object) + keys.push(property); + return keys; + }, + + values: function(object) { + var values = []; + for (var property in object) + values.push(object[property]); + return values; + }, + + clone: function(object) { + return Object.extend({}, object); + } +}); + +Function.prototype.bind = function() { + var __method = this, args = $A(arguments), object = args.shift(); + return function() { + return __method.apply(object, args.concat($A(arguments))); + } +} + +Function.prototype.bindAsEventListener = function(object) { + var __method = this, args = $A(arguments), object = args.shift(); + return function(event) { + return __method.apply(object, [( event || window.event)].concat(args).concat($A(arguments))); + } +} + +Object.extend(Number.prototype, { + toColorPart: function() { + var digits = this.toString(16); + if (this < 16) return '0' + digits; + return digits; + }, + + succ: function() { + return this + 1; + }, + + times: function(iterator) { + $R(0, this, true).each(iterator); + return this; + } +}); + +var Try = { + these: function() { + var returnValue; + + for (var i = 0, length = arguments.length; i < length; i++) { + var lambda = arguments[i]; + try { + returnValue = lambda(); + break; + } catch (e) {} + } + + return returnValue; + } +} + +/*--------------------------------------------------------------------------*/ + +var PeriodicalExecuter = Class.create(); +PeriodicalExecuter.prototype = { + initialize: function(callback, frequency) { + this.callback = callback; + this.frequency = frequency; + this.currentlyExecuting = false; + + this.registerCallback(); + }, + + registerCallback: function() { + this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + stop: function() { + if (!this.timer) return; + clearInterval(this.timer); + this.timer = null; + }, + + onTimerEvent: function() { + if (!this.currentlyExecuting) { + try { + this.currentlyExecuting = true; + this.callback(this); + } finally { + this.currentlyExecuting = false; + } + } + } +} +String.interpret = function(value){ + return value == null ? '' : String(value); +} + +Object.extend(String.prototype, { + gsub: function(pattern, replacement) { + var result = '', source = this, match; + replacement = arguments.callee.prepareReplacement(replacement); + + while (source.length > 0) { + if (match = source.match(pattern)) { + result += source.slice(0, match.index); + result += String.interpret(replacement(match)); + source = source.slice(match.index + match[0].length); + } else { + result += source, source = ''; + } + } + return result; + }, + + sub: function(pattern, replacement, count) { + replacement = this.gsub.prepareReplacement(replacement); + count = count === undefined ? 1 : count; + + return this.gsub(pattern, function(match) { + if (--count < 0) return match[0]; + return replacement(match); + }); + }, + + scan: function(pattern, iterator) { + this.gsub(pattern, iterator); + return this; + }, + + truncate: function(length, truncation) { + length = length || 30; + truncation = truncation === undefined ? '...' : truncation; + return this.length > length ? + this.slice(0, length - truncation.length) + truncation : this; + }, + + strip: function() { + return this.replace(/^\s+/, '').replace(/\s+$/, ''); + }, + + stripTags: function() { + return this.replace(/<\/?[^>]+>/gi, ''); + }, + + stripScripts: function() { + return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); + }, + + extractScripts: function() { + var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); + var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); + return (this.match(matchAll) || []).map(function(scriptTag) { + return (scriptTag.match(matchOne) || ['', ''])[1]; + }); + }, + + evalScripts: function() { + return this.extractScripts().map(function(script) { return eval(script) }); + }, + + escapeHTML: function() { + var div = document.createElement('div'); + var text = document.createTextNode(this); + div.appendChild(text); + return div.innerHTML; + }, + + unescapeHTML: function() { + var div = document.createElement('div'); + div.innerHTML = this.stripTags(); + return div.childNodes[0] ? (div.childNodes.length > 1 ? + $A(div.childNodes).inject('',function(memo,node){ return memo+node.nodeValue }) : + div.childNodes[0].nodeValue) : ''; + }, + + toQueryParams: function(separator) { + var match = this.strip().match(/([^?#]*)(#.*)?$/); + if (!match) return {}; + + return match[1].split(separator || '&').inject({}, function(hash, pair) { + if ((pair = pair.split('='))[0]) { + var name = decodeURIComponent(pair[0]); + var value = pair[1] ? decodeURIComponent(pair[1]) : undefined; + + if (hash[name] !== undefined) { + if (hash[name].constructor != Array) + hash[name] = [hash[name]]; + if (value) hash[name].push(value); + } + else hash[name] = value; + } + return hash; + }); + }, + + toArray: function() { + return this.split(''); + }, + + succ: function() { + return this.slice(0, this.length - 1) + + String.fromCharCode(this.charCodeAt(this.length - 1) + 1); + }, + + camelize: function() { + var parts = this.split('-'), len = parts.length; + if (len == 1) return parts[0]; + + var camelized = this.charAt(0) == '-' + ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1) + : parts[0]; + + for (var i = 1; i < len; i++) + camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1); + + return camelized; + }, + + capitalize: function(){ + return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); + }, + + underscore: function() { + return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase(); + }, + + dasherize: function() { + return this.gsub(/_/,'-'); + }, + + inspect: function(useDoubleQuotes) { + var escapedString = this.replace(/\\/g, '\\\\'); + if (useDoubleQuotes) + return '"' + escapedString.replace(/"/g, '\\"') + '"'; + else + return "'" + escapedString.replace(/'/g, '\\\'') + "'"; + } +}); + +String.prototype.gsub.prepareReplacement = function(replacement) { + if (typeof replacement == 'function') return replacement; + var template = new Template(replacement); + return function(match) { return template.evaluate(match) }; +} + +String.prototype.parseQuery = String.prototype.toQueryParams; + +var Template = Class.create(); +Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; +Template.prototype = { + initialize: function(template, pattern) { + this.template = template.toString(); + this.pattern = pattern || Template.Pattern; + }, + + evaluate: function(object) { + return this.template.gsub(this.pattern, function(match) { + var before = match[1]; + if (before == '\\') return match[2]; + return before + String.interpret(object[match[3]]); + }); + } +} + +var $break = new Object(); +var $continue = new Object(); + +var Enumerable = { + each: function(iterator) { + var index = 0; + try { + this._each(function(value) { + try { + iterator(value, index++); + } catch (e) { + if (e != $continue) throw e; + } + }); + } catch (e) { + if (e != $break) throw e; + } + return this; + }, + + eachSlice: function(number, iterator) { + var index = -number, slices = [], array = this.toArray(); + while ((index += number) < array.length) + slices.push(array.slice(index, index+number)); + return slices.map(iterator); + }, + + all: function(iterator) { + var result = true; + this.each(function(value, index) { + result = result && !!(iterator || Prototype.K)(value, index); + if (!result) throw $break; + }); + return result; + }, + + any: function(iterator) { + var result = false; + this.each(function(value, index) { + if (result = !!(iterator || Prototype.K)(value, index)) + throw $break; + }); + return result; + }, + + collect: function(iterator) { + var results = []; + this.each(function(value, index) { + results.push((iterator || Prototype.K)(value, index)); + }); + return results; + }, + + detect: function(iterator) { + var result; + this.each(function(value, index) { + if (iterator(value, index)) { + result = value; + throw $break; + } + }); + return result; + }, + + findAll: function(iterator) { + var results = []; + this.each(function(value, index) { + if (iterator(value, index)) + results.push(value); + }); + return results; + }, + + grep: function(pattern, iterator) { + var results = []; + this.each(function(value, index) { + var stringValue = value.toString(); + if (stringValue.match(pattern)) + results.push((iterator || Prototype.K)(value, index)); + }) + return results; + }, + + include: function(object) { + var found = false; + this.each(function(value) { + if (value == object) { + found = true; + throw $break; + } + }); + return found; + }, + + inGroupsOf: function(number, fillWith) { + fillWith = fillWith === undefined ? null : fillWith; + return this.eachSlice(number, function(slice) { + while(slice.length < number) slice.push(fillWith); + return slice; + }); + }, + + inject: function(memo, iterator) { + this.each(function(value, index) { + memo = iterator(memo, value, index); + }); + return memo; + }, + + invoke: function(method) { + var args = $A(arguments).slice(1); + return this.map(function(value) { + return value[method].apply(value, args); + }); + }, + + max: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (result == undefined || value >= result) + result = value; + }); + return result; + }, + + min: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (result == undefined || value < result) + result = value; + }); + return result; + }, + + partition: function(iterator) { + var trues = [], falses = []; + this.each(function(value, index) { + ((iterator || Prototype.K)(value, index) ? + trues : falses).push(value); + }); + return [trues, falses]; + }, + + pluck: function(property) { + var results = []; + this.each(function(value, index) { + results.push(value[property]); + }); + return results; + }, + + reject: function(iterator) { + var results = []; + this.each(function(value, index) { + if (!iterator(value, index)) + results.push(value); + }); + return results; + }, + + sortBy: function(iterator) { + return this.map(function(value, index) { + return {value: value, criteria: iterator(value, index)}; + }).sort(function(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }).pluck('value'); + }, + + toArray: function() { + return this.map(); + }, + + zip: function() { + var iterator = Prototype.K, args = $A(arguments); + if (typeof args.last() == 'function') + iterator = args.pop(); + + var collections = [this].concat(args).map($A); + return this.map(function(value, index) { + return iterator(collections.pluck(index)); + }); + }, + + size: function() { + return this.toArray().length; + }, + + inspect: function() { + return '#'; + } +} + +Object.extend(Enumerable, { + map: Enumerable.collect, + find: Enumerable.detect, + select: Enumerable.findAll, + member: Enumerable.include, + entries: Enumerable.toArray +}); +var $A = Array.from = function(iterable) { + if (!iterable) return []; + if (iterable.toArray) { + return iterable.toArray(); + } else { + var results = []; + for (var i = 0, length = iterable.length; i < length; i++) + results.push(iterable[i]); + return results; + } +} + +Object.extend(Array.prototype, Enumerable); + +if (!Array.prototype._reverse) + Array.prototype._reverse = Array.prototype.reverse; + +Object.extend(Array.prototype, { + _each: function(iterator) { + for (var i = 0, length = this.length; i < length; i++) + iterator(this[i]); + }, + + clear: function() { + this.length = 0; + return this; + }, + + first: function() { + return this[0]; + }, + + last: function() { + return this[this.length - 1]; + }, + + compact: function() { + return this.select(function(value) { + return value != null; + }); + }, + + flatten: function() { + return this.inject([], function(array, value) { + return array.concat(value && value.constructor == Array ? + value.flatten() : [value]); + }); + }, + + without: function() { + var values = $A(arguments); + return this.select(function(value) { + return !values.include(value); + }); + }, + + indexOf: function(object) { + for (var i = 0, length = this.length; i < length; i++) + if (this[i] == object) return i; + return -1; + }, + + reverse: function(inline) { + return (inline !== false ? this : this.toArray())._reverse(); + }, + + reduce: function() { + return this.length > 1 ? this : this[0]; + }, + + uniq: function() { + return this.inject([], function(array, value) { + return array.include(value) ? array : array.concat([value]); + }); + }, + + clone: function() { + return [].concat(this); + }, + + size: function() { + return this.length; + }, + + inspect: function() { + return '[' + this.map(Object.inspect).join(', ') + ']'; + } +}); + +Array.prototype.toArray = Array.prototype.clone; + +function $w(string){ + string = string.strip(); + return string ? string.split(/\s+/) : []; +} + +if(window.opera){ + Array.prototype.concat = function(){ + var array = []; + for(var i = 0, length = this.length; i < length; i++) array.push(this[i]); + for(var i = 0, length = arguments.length; i < length; i++) { + if(arguments[i].constructor == Array) { + for(var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++) + array.push(arguments[i][j]); + } else { + array.push(arguments[i]); + } + } + return array; + } +} +var Hash = function(obj) { + Object.extend(this, obj || {}); +}; + +Object.extend(Hash, { + toQueryString: function(obj) { + var parts = []; + + this.prototype._each.call(obj, function(pair) { + if (!pair.key) return; + + if (pair.value && pair.value.constructor == Array) { + var values = pair.value.compact(); + if (values.length < 2) pair.value = values.reduce(); + else { + key = encodeURIComponent(pair.key); + values.each(function(value) { + value = value != undefined ? encodeURIComponent(value) : ''; + parts.push(key + '=' + encodeURIComponent(value)); + }); + return; + } + } + if (pair.value == undefined) pair[1] = ''; + parts.push(pair.map(encodeURIComponent).join('=')); + }); + + return parts.join('&'); + } +}); + +Object.extend(Hash.prototype, Enumerable); +Object.extend(Hash.prototype, { + _each: function(iterator) { + for (var key in this) { + var value = this[key]; + if (value && value == Hash.prototype[key]) continue; + + var pair = [key, value]; + pair.key = key; + pair.value = value; + iterator(pair); + } + }, + + keys: function() { + return this.pluck('key'); + }, + + values: function() { + return this.pluck('value'); + }, + + merge: function(hash) { + return $H(hash).inject(this, function(mergedHash, pair) { + mergedHash[pair.key] = pair.value; + return mergedHash; + }); + }, + + remove: function() { + var result; + for(var i = 0, length = arguments.length; i < length; i++) { + var value = this[arguments[i]]; + if (value !== undefined){ + if (result === undefined) result = value; + else { + if (result.constructor != Array) result = [result]; + result.push(value) + } + } + delete this[arguments[i]]; + } + return result; + }, + + toQueryString: function() { + return Hash.toQueryString(this); + }, + + inspect: function() { + return '#'; + } +}); + +function $H(object) { + if (object && object.constructor == Hash) return object; + return new Hash(object); +}; +ObjectRange = Class.create(); +Object.extend(ObjectRange.prototype, Enumerable); +Object.extend(ObjectRange.prototype, { + initialize: function(start, end, exclusive) { + this.start = start; + this.end = end; + this.exclusive = exclusive; + }, + + _each: function(iterator) { + var value = this.start; + while (this.include(value)) { + iterator(value); + value = value.succ(); + } + }, + + include: function(value) { + if (value < this.start) + return false; + if (this.exclusive) + return value < this.end; + return value <= this.end; + } +}); + +var $R = function(start, end, exclusive) { + return new ObjectRange(start, end, exclusive); +} + +var Ajax = { + getTransport: function() { + return Try.these( + function() {return new XMLHttpRequest()}, + function() {return new ActiveXObject('Msxml2.XMLHTTP')}, + function() {return new ActiveXObject('Microsoft.XMLHTTP')} + ) || false; + }, + + activeRequestCount: 0 +} + +Ajax.Responders = { + responders: [], + + _each: function(iterator) { + this.responders._each(iterator); + }, + + register: function(responder) { + if (!this.include(responder)) + this.responders.push(responder); + }, + + unregister: function(responder) { + this.responders = this.responders.without(responder); + }, + + dispatch: function(callback, request, transport, json) { + this.each(function(responder) { + if (typeof responder[callback] == 'function') { + try { + responder[callback].apply(responder, [request, transport, json]); + } catch (e) {} + } + }); + } +}; + +Object.extend(Ajax.Responders, Enumerable); + +Ajax.Responders.register({ + onCreate: function() { + Ajax.activeRequestCount++; + }, + onComplete: function() { + Ajax.activeRequestCount--; + } +}); + +Ajax.Base = function() {}; +Ajax.Base.prototype = { + setOptions: function(options) { + this.options = { + method: 'post', + asynchronous: true, + contentType: 'application/x-www-form-urlencoded', + encoding: 'UTF-8', + parameters: '' + } + Object.extend(this.options, options || {}); + + this.options.method = this.options.method.toLowerCase(); + if (typeof this.options.parameters == 'string') + this.options.parameters = this.options.parameters.toQueryParams(); + } +} + +Ajax.Request = Class.create(); +Ajax.Request.Events = + ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; + +Ajax.Request.prototype = Object.extend(new Ajax.Base(), { + _complete: false, + + initialize: function(url, options) { + this.transport = Ajax.getTransport(); + this.setOptions(options); + this.request(url); + }, + + request: function(url) { + this.url = url; + this.method = this.options.method; + var params = this.options.parameters; + + if (!['get', 'post'].include(this.method)) { + // simulate other verbs over post + params['_method'] = this.method; + this.method = 'post'; + } + + params = Hash.toQueryString(params); + if (params && /Konqueror|Safari|KHTML/.test(navigator.userAgent)) params += '&_=' + + // when GET, append parameters to URL + if (this.method == 'get' && params) + this.url += (this.url.indexOf('?') > -1 ? '&' : '?') + params; + + try { + Ajax.Responders.dispatch('onCreate', this, this.transport); + + this.transport.open(this.method.toUpperCase(), this.url, + this.options.asynchronous); + + if (this.options.asynchronous) + setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10); + + this.transport.onreadystatechange = this.onStateChange.bind(this); + this.setRequestHeaders(); + + var body = this.method == 'post' ? (this.options.postBody || params) : null; + + this.transport.send(body); + + /* Force Firefox to handle ready state 4 for synchronous requests */ + if (!this.options.asynchronous && this.transport.overrideMimeType) + this.onStateChange(); + + } + catch (e) { + this.dispatchException(e); + } + }, + + onStateChange: function() { + var readyState = this.transport.readyState; + if (readyState > 1 && !((readyState == 4) && this._complete)) + this.respondToReadyState(this.transport.readyState); + }, + + setRequestHeaders: function() { + var headers = { + 'X-Requested-With': 'XMLHttpRequest', + 'X-Prototype-Version': Prototype.Version, + 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' + }; + + if (this.method == 'post') { + headers['Content-type'] = this.options.contentType + + (this.options.encoding ? '; charset=' + this.options.encoding : ''); + + /* Force "Connection: close" for older Mozilla browsers to work + * around a bug where XMLHttpRequest sends an incorrect + * Content-length header. See Mozilla Bugzilla #246651. + */ + if (this.transport.overrideMimeType && + (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) + headers['Connection'] = 'close'; + } + + // user-defined headers + if (typeof this.options.requestHeaders == 'object') { + var extras = this.options.requestHeaders; + + if (typeof extras.push == 'function') + for (var i = 0, length = extras.length; i < length; i += 2) + headers[extras[i]] = extras[i+1]; + else + $H(extras).each(function(pair) { headers[pair.key] = pair.value }); + } + + for (var name in headers) + this.transport.setRequestHeader(name, headers[name]); + }, + + success: function() { + return !this.transport.status + || (this.transport.status >= 200 && this.transport.status < 300); + }, + + respondToReadyState: function(readyState) { + var state = Ajax.Request.Events[readyState]; + var transport = this.transport, json = this.evalJSON(); + + if (state == 'Complete') { + try { + this._complete = true; + (this.options['on' + this.transport.status] + || this.options['on' + (this.success() ? 'Success' : 'Failure')] + || Prototype.emptyFunction)(transport, json); + } catch (e) { + this.dispatchException(e); + } + + if ((this.getHeader('Content-type') || 'text/javascript').strip(). + match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)) + this.evalResponse(); + } + + try { + (this.options['on' + state] || Prototype.emptyFunction)(transport, json); + Ajax.Responders.dispatch('on' + state, this, transport, json); + } catch (e) { + this.dispatchException(e); + } + + if (state == 'Complete') { + // avoid memory leak in MSIE: clean up + this.transport.onreadystatechange = Prototype.emptyFunction; + } + }, + + getHeader: function(name) { + try { + return this.transport.getResponseHeader(name); + } catch (e) { return null } + }, + + evalJSON: function() { + try { + var json = this.getHeader('X-JSON'); + return json ? eval('(' + json + ')') : null; + } catch (e) { return null } + }, + + evalResponse: function() { + try { + return eval(this.transport.responseText); + } catch (e) { + this.dispatchException(e); + } + }, + + dispatchException: function(exception) { + (this.options.onException || Prototype.emptyFunction)(this, exception); + Ajax.Responders.dispatch('onException', this, exception); + } +}); + +Ajax.Updater = Class.create(); + +Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { + initialize: function(container, url, options) { + this.container = { + success: (container.success || container), + failure: (container.failure || (container.success ? null : container)) + } + + this.transport = Ajax.getTransport(); + this.setOptions(options); + + var onComplete = this.options.onComplete || Prototype.emptyFunction; + this.options.onComplete = (function(transport, param) { + this.updateContent(); + onComplete(transport, param); + }).bind(this); + + this.request(url); + }, + + updateContent: function() { + var receiver = this.container[this.success() ? 'success' : 'failure']; + var response = this.transport.responseText; + + if (!this.options.evalScripts) response = response.stripScripts(); + + if (receiver = $(receiver)) { + if (this.options.insertion) + new this.options.insertion(receiver, response); + else + receiver.update(response); + } + + if (this.success()) { + if (this.onComplete) + setTimeout(this.onComplete.bind(this), 10); + } + } +}); + +Ajax.PeriodicalUpdater = Class.create(); +Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { + initialize: function(container, url, options) { + this.setOptions(options); + this.onComplete = this.options.onComplete; + + this.frequency = (this.options.frequency || 2); + this.decay = (this.options.decay || 1); + + this.updater = {}; + this.container = container; + this.url = url; + + this.start(); + }, + + start: function() { + this.options.onComplete = this.updateComplete.bind(this); + this.onTimerEvent(); + }, + + stop: function() { + this.updater.options.onComplete = undefined; + clearTimeout(this.timer); + (this.onComplete || Prototype.emptyFunction).apply(this, arguments); + }, + + updateComplete: function(request) { + if (this.options.decay) { + this.decay = (request.responseText == this.lastText ? + this.decay * this.options.decay : 1); + + this.lastText = request.responseText; + } + this.timer = setTimeout(this.onTimerEvent.bind(this), + this.decay * this.frequency * 1000); + }, + + onTimerEvent: function() { + this.updater = new Ajax.Updater(this.container, this.url, this.options); + } +}); +function $(element) { + if (arguments.length > 1) { + for (var i = 0, elements = [], length = arguments.length; i < length; i++) + elements.push($(arguments[i])); + return elements; + } + if (typeof element == 'string') + element = document.getElementById(element); + return Element.extend(element); +} + +if (Prototype.BrowserFeatures.XPath) { + document._getElementsByXPath = function(expression, parentElement) { + var results = []; + var query = document.evaluate(expression, $(parentElement) || document, + null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); + for (var i = 0, length = query.snapshotLength; i < length; i++) + results.push(query.snapshotItem(i)); + return results; + }; +} + +document.getElementsByClassName = function(className, parentElement) { + if (Prototype.BrowserFeatures.XPath) { + var q = ".//*[contains(concat(' ', @class, ' '), ' " + className + " ')]"; + return document._getElementsByXPath(q, parentElement); + } else { + var children = ($(parentElement) || document.body).getElementsByTagName('*'); + var elements = [], child; + for (var i = 0, length = children.length; i < length; i++) { + child = children[i]; + if (Element.hasClassName(child, className)) + elements.push(Element.extend(child)); + } + return elements; + } +}; + +/*--------------------------------------------------------------------------*/ + +if (!window.Element) + var Element = new Object(); + +Element.extend = function(element) { + if (!element || _nativeExtensions || element.nodeType == 3) return element; + + if (!element._extended && element.tagName && element != window) { + var methods = Object.clone(Element.Methods), cache = Element.extend.cache; + + if (element.tagName == 'FORM') + Object.extend(methods, Form.Methods); + if (['INPUT', 'TEXTAREA', 'SELECT'].include(element.tagName)) + Object.extend(methods, Form.Element.Methods); + + Object.extend(methods, Element.Methods.Simulated); + + for (var property in methods) { + var value = methods[property]; + if (typeof value == 'function' && !(property in element)) + element[property] = cache.findOrStore(value); + } + } + + element._extended = true; + return element; +}; + +Element.extend.cache = { + findOrStore: function(value) { + return this[value] = this[value] || function() { + return value.apply(null, [this].concat($A(arguments))); + } + } +}; + +Element.Methods = { + visible: function(element) { + return $(element).style.display != 'none'; + }, + + toggle: function(element) { + element = $(element); + Element[Element.visible(element) ? 'hide' : 'show'](element); + return element; + }, + + hide: function(element) { + $(element).style.display = 'none'; + return element; + }, + + show: function(element) { + $(element).style.display = ''; + return element; + }, + + remove: function(element) { + element = $(element); + element.parentNode.removeChild(element); + return element; + }, + + update: function(element, html) { + html = typeof html == 'undefined' ? '' : html.toString(); + $(element).innerHTML = html.stripScripts(); + setTimeout(function() {html.evalScripts()}, 10); + return element; + }, + + replace: function(element, html) { + element = $(element); + html = typeof html == 'undefined' ? '' : html.toString(); + if (element.outerHTML) { + element.outerHTML = html.stripScripts(); + } else { + var range = element.ownerDocument.createRange(); + range.selectNodeContents(element); + element.parentNode.replaceChild( + range.createContextualFragment(html.stripScripts()), element); + } + setTimeout(function() {html.evalScripts()}, 10); + return element; + }, + + inspect: function(element) { + element = $(element); + var result = '<' + element.tagName.toLowerCase(); + $H({'id': 'id', 'className': 'class'}).each(function(pair) { + var property = pair.first(), attribute = pair.last(); + var value = (element[property] || '').toString(); + if (value) result += ' ' + attribute + '=' + value.inspect(true); + }); + return result + '>'; + }, + + recursivelyCollect: function(element, property) { + element = $(element); + var elements = []; + while (element = element[property]) + if (element.nodeType == 1) + elements.push(Element.extend(element)); + return elements; + }, + + ancestors: function(element) { + return $(element).recursivelyCollect('parentNode'); + }, + + descendants: function(element) { + return $A($(element).getElementsByTagName('*')); + }, + + immediateDescendants: function(element) { + if (!(element = $(element).firstChild)) return []; + while (element && element.nodeType != 1) element = element.nextSibling; + if (element) return [element].concat($(element).nextSiblings()); + return []; + }, + + previousSiblings: function(element) { + return $(element).recursivelyCollect('previousSibling'); + }, + + nextSiblings: function(element) { + return $(element).recursivelyCollect('nextSibling'); + }, + + siblings: function(element) { + element = $(element); + return element.previousSiblings().reverse().concat(element.nextSiblings()); + }, + + match: function(element, selector) { + if (typeof selector == 'string') + selector = new Selector(selector); + return selector.match($(element)); + }, + + up: function(element, expression, index) { + return Selector.findElement($(element).ancestors(), expression, index); + }, + + down: function(element, expression, index) { + return Selector.findElement($(element).descendants(), expression, index); + }, + + previous: function(element, expression, index) { + return Selector.findElement($(element).previousSiblings(), expression, index); + }, + + next: function(element, expression, index) { + return Selector.findElement($(element).nextSiblings(), expression, index); + }, + + getElementsBySelector: function() { + var args = $A(arguments), element = $(args.shift()); + return Selector.findChildElements(element, args); + }, + + getElementsByClassName: function(element, className) { + return document.getElementsByClassName(className, element); + }, + + readAttribute: function(element, name) { + element = $(element); + if (document.all && !window.opera) { + var t = Element._attributeTranslations; + if (t.values[name]) return t.values[name](element, name); + if (t.names[name]) name = t.names[name]; + var attribute = element.attributes[name]; + if(attribute) return attribute.nodeValue; + } + return element.getAttribute(name); + }, + + getHeight: function(element) { + return $(element).getDimensions().height; + }, + + getWidth: function(element) { + return $(element).getDimensions().width; + }, + + classNames: function(element) { + return new Element.ClassNames(element); + }, + + hasClassName: function(element, className) { + if (!(element = $(element))) return; + var elementClassName = element.className; + if (elementClassName.length == 0) return false; + if (elementClassName == className || + elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) + return true; + return false; + }, + + addClassName: function(element, className) { + if (!(element = $(element))) return; + Element.classNames(element).add(className); + return element; + }, + + removeClassName: function(element, className) { + if (!(element = $(element))) return; + Element.classNames(element).remove(className); + return element; + }, + + toggleClassName: function(element, className) { + if (!(element = $(element))) return; + Element.classNames(element)[element.hasClassName(className) ? 'remove' : 'add'](className); + return element; + }, + + observe: function() { + Event.observe.apply(Event, arguments); + return $A(arguments).first(); + }, + + stopObserving: function() { + Event.stopObserving.apply(Event, arguments); + return $A(arguments).first(); + }, + + // removes whitespace-only text node children + cleanWhitespace: function(element) { + element = $(element); + var node = element.firstChild; + while (node) { + var nextNode = node.nextSibling; + if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) + element.removeChild(node); + node = nextNode; + } + return element; + }, + + empty: function(element) { + return $(element).innerHTML.match(/^\s*$/); + }, + + descendantOf: function(element, ancestor) { + element = $(element), ancestor = $(ancestor); + while (element = element.parentNode) + if (element == ancestor) return true; + return false; + }, + + scrollTo: function(element) { + element = $(element); + var pos = Position.cumulativeOffset(element); + window.scrollTo(pos[0], pos[1]); + return element; + }, + + getStyle: function(element, style) { + element = $(element); + if (['float','cssFloat'].include(style)) + style = (typeof element.style.styleFloat != 'undefined' ? 'styleFloat' : 'cssFloat'); + style = style.camelize(); + var value = element.style[style]; + if (!value) { + if (document.defaultView && document.defaultView.getComputedStyle) { + var css = document.defaultView.getComputedStyle(element, null); + value = css ? css[style] : null; + } else if (element.currentStyle) { + value = element.currentStyle[style]; + } + } + + if((value == 'auto') && ['width','height'].include(style) && (element.getStyle('display') != 'none')) + value = element['offset'+style.capitalize()] + 'px'; + + if (window.opera && ['left', 'top', 'right', 'bottom'].include(style)) + if (Element.getStyle(element, 'position') == 'static') value = 'auto'; + if(style == 'opacity') { + if(value) return parseFloat(value); + if(value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/)) + if(value[1]) return parseFloat(value[1]) / 100; + return 1.0; + } + return value == 'auto' ? null : value; + }, + + setStyle: function(element, style) { + element = $(element); + for (var name in style) { + var value = style[name]; + if(name == 'opacity') { + if (value == 1) { + value = (/Gecko/.test(navigator.userAgent) && + !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? 0.999999 : 1.0; + if(/MSIE/.test(navigator.userAgent) && !window.opera) + element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,''); + } else if(value == '') { + if(/MSIE/.test(navigator.userAgent) && !window.opera) + element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,''); + } else { + if(value < 0.00001) value = 0; + if(/MSIE/.test(navigator.userAgent) && !window.opera) + element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'') + + 'alpha(opacity='+value*100+')'; + } + } else if(['float','cssFloat'].include(name)) name = (typeof element.style.styleFloat != 'undefined') ? 'styleFloat' : 'cssFloat'; + element.style[name.camelize()] = value; + } + return element; + }, + + getDimensions: function(element) { + element = $(element); + var display = $(element).getStyle('display'); + if (display != 'none' && display != null) // Safari bug + return {width: element.offsetWidth, height: element.offsetHeight}; + + // All *Width and *Height properties give 0 on elements with display none, + // so enable the element temporarily + var els = element.style; + var originalVisibility = els.visibility; + var originalPosition = els.position; + var originalDisplay = els.display; + els.visibility = 'hidden'; + els.position = 'absolute'; + els.display = 'block'; + var originalWidth = element.clientWidth; + var originalHeight = element.clientHeight; + els.display = originalDisplay; + els.position = originalPosition; + els.visibility = originalVisibility; + return {width: originalWidth, height: originalHeight}; + }, + + makePositioned: function(element) { + element = $(element); + var pos = Element.getStyle(element, 'position'); + if (pos == 'static' || !pos) { + element._madePositioned = true; + element.style.position = 'relative'; + // Opera returns the offset relative to the positioning context, when an + // element is position relative but top and left have not been defined + if (window.opera) { + element.style.top = 0; + element.style.left = 0; + } + } + return element; + }, + + undoPositioned: function(element) { + element = $(element); + if (element._madePositioned) { + element._madePositioned = undefined; + element.style.position = + element.style.top = + element.style.left = + element.style.bottom = + element.style.right = ''; + } + return element; + }, + + makeClipping: function(element) { + element = $(element); + if (element._overflow) return element; + element._overflow = element.style.overflow || 'auto'; + if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden') + element.style.overflow = 'hidden'; + return element; + }, + + undoClipping: function(element) { + element = $(element); + if (!element._overflow) return element; + element.style.overflow = element._overflow == 'auto' ? '' : element._overflow; + element._overflow = null; + return element; + } +}; + +Object.extend(Element.Methods, {childOf: Element.Methods.descendantOf}); + +Element._attributeTranslations = {}; + +Element._attributeTranslations.names = { + colspan: "colSpan", + rowspan: "rowSpan", + valign: "vAlign", + datetime: "dateTime", + accesskey: "accessKey", + tabindex: "tabIndex", + enctype: "encType", + maxlength: "maxLength", + readonly: "readOnly", + longdesc: "longDesc" +}; + +Element._attributeTranslations.values = { + _getAttr: function(element, attribute) { + return element.getAttribute(attribute, 2); + }, + + _flag: function(element, attribute) { + return $(element).hasAttribute(attribute) ? attribute : null; + }, + + style: function(element) { + return element.style.cssText.toLowerCase(); + }, + + title: function(element) { + var node = element.getAttributeNode('title'); + return node.specified ? node.nodeValue : null; + } +}; + +Object.extend(Element._attributeTranslations.values, { + href: Element._attributeTranslations.values._getAttr, + src: Element._attributeTranslations.values._getAttr, + disabled: Element._attributeTranslations.values._flag, + checked: Element._attributeTranslations.values._flag, + readonly: Element._attributeTranslations.values._flag, + multiple: Element._attributeTranslations.values._flag +}); + +Element.Methods.Simulated = { + hasAttribute: function(element, attribute) { + var t = Element._attributeTranslations; + attribute = t.names[attribute] || attribute; + return $(element).getAttributeNode(attribute).specified; + } +}; + +// IE is missing .innerHTML support for TABLE-related elements +if (document.all && !window.opera){ + Element.Methods.update = function(element, html) { + element = $(element); + html = typeof html == 'undefined' ? '' : html.toString(); + var tagName = element.tagName.toUpperCase(); + if (['THEAD','TBODY','TR','TD'].include(tagName)) { + var div = document.createElement('div'); + switch (tagName) { + case 'THEAD': + case 'TBODY': + div.innerHTML = '' + html.stripScripts() + '
    '; + depth = 2; + break; + case 'TR': + div.innerHTML = '' + html.stripScripts() + '
    '; + depth = 3; + break; + case 'TD': + div.innerHTML = '
    ' + html.stripScripts() + '
    '; + depth = 4; + } + $A(element.childNodes).each(function(node){ + element.removeChild(node) + }); + depth.times(function(){ div = div.firstChild }); + + $A(div.childNodes).each( + function(node){ element.appendChild(node) }); + } else { + element.innerHTML = html.stripScripts(); + } + setTimeout(function() {html.evalScripts()}, 10); + return element; + } +}; + +Object.extend(Element, Element.Methods); + +var _nativeExtensions = false; + +if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)) + ['', 'Form', 'Input', 'TextArea', 'Select'].each(function(tag) { + var className = 'HTML' + tag + 'Element'; + if(window[className]) return; + var klass = window[className] = {}; + klass.prototype = document.createElement(tag ? tag.toLowerCase() : 'div').__proto__; + }); + +Element.addMethods = function(methods) { + Object.extend(Element.Methods, methods || {}); + + function copy(methods, destination, onlyIfAbsent) { + onlyIfAbsent = onlyIfAbsent || false; + var cache = Element.extend.cache; + for (var property in methods) { + var value = methods[property]; + if (!onlyIfAbsent || !(property in destination)) + destination[property] = cache.findOrStore(value); + } + } + + if (typeof HTMLElement != 'undefined') { + copy(Element.Methods, HTMLElement.prototype); + copy(Element.Methods.Simulated, HTMLElement.prototype, true); + copy(Form.Methods, HTMLFormElement.prototype); + [HTMLInputElement, HTMLTextAreaElement, HTMLSelectElement].each(function(klass) { + copy(Form.Element.Methods, klass.prototype); + }); + _nativeExtensions = true; + } +} + +var Toggle = new Object(); +Toggle.display = Element.toggle; + +/*--------------------------------------------------------------------------*/ + +Abstract.Insertion = function(adjacency) { + this.adjacency = adjacency; +} + +Abstract.Insertion.prototype = { + initialize: function(element, content) { + this.element = $(element); + this.content = content.stripScripts(); + + if (this.adjacency && this.element.insertAdjacentHTML) { + try { + this.element.insertAdjacentHTML(this.adjacency, this.content); + } catch (e) { + var tagName = this.element.tagName.toUpperCase(); + if (['TBODY', 'TR'].include(tagName)) { + this.insertContent(this.contentFromAnonymousTable()); + } else { + throw e; + } + } + } else { + this.range = this.element.ownerDocument.createRange(); + if (this.initializeRange) this.initializeRange(); + this.insertContent([this.range.createContextualFragment(this.content)]); + } + + setTimeout(function() {content.evalScripts()}, 10); + }, + + contentFromAnonymousTable: function() { + var div = document.createElement('div'); + div.innerHTML = '' + this.content + '
    '; + return $A(div.childNodes[0].childNodes[0].childNodes); + } +} + +var Insertion = new Object(); + +Insertion.Before = Class.create(); +Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { + initializeRange: function() { + this.range.setStartBefore(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.parentNode.insertBefore(fragment, this.element); + }).bind(this)); + } +}); + +Insertion.Top = Class.create(); +Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(true); + }, + + insertContent: function(fragments) { + fragments.reverse(false).each((function(fragment) { + this.element.insertBefore(fragment, this.element.firstChild); + }).bind(this)); + } +}); + +Insertion.Bottom = Class.create(); +Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.appendChild(fragment); + }).bind(this)); + } +}); + +Insertion.After = Class.create(); +Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { + initializeRange: function() { + this.range.setStartAfter(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.parentNode.insertBefore(fragment, + this.element.nextSibling); + }).bind(this)); + } +}); + +/*--------------------------------------------------------------------------*/ + +Element.ClassNames = Class.create(); +Element.ClassNames.prototype = { + initialize: function(element) { + this.element = $(element); + }, + + _each: function(iterator) { + this.element.className.split(/\s+/).select(function(name) { + return name.length > 0; + })._each(iterator); + }, + + set: function(className) { + this.element.className = className; + }, + + add: function(classNameToAdd) { + if (this.include(classNameToAdd)) return; + this.set($A(this).concat(classNameToAdd).join(' ')); + }, + + remove: function(classNameToRemove) { + if (!this.include(classNameToRemove)) return; + this.set($A(this).without(classNameToRemove).join(' ')); + }, + + toString: function() { + return $A(this).join(' '); + } +}; + +Object.extend(Element.ClassNames.prototype, Enumerable); +var Selector = Class.create(); +Selector.prototype = { + initialize: function(expression) { + this.params = {classNames: []}; + this.expression = expression.toString().strip(); + this.parseExpression(); + this.compileMatcher(); + }, + + parseExpression: function() { + function abort(message) { throw 'Parse error in selector: ' + message; } + + if (this.expression == '') abort('empty expression'); + + var params = this.params, expr = this.expression, match, modifier, clause, rest; + while (match = expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)) { + params.attributes = params.attributes || []; + params.attributes.push({name: match[2], operator: match[3], value: match[4] || match[5] || ''}); + expr = match[1]; + } + + if (expr == '*') return this.params.wildcard = true; + + while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)) { + modifier = match[1], clause = match[2], rest = match[3]; + switch (modifier) { + case '#': params.id = clause; break; + case '.': params.classNames.push(clause); break; + case '': + case undefined: params.tagName = clause.toUpperCase(); break; + default: abort(expr.inspect()); + } + expr = rest; + } + + if (expr.length > 0) abort(expr.inspect()); + }, + + buildMatchExpression: function() { + var params = this.params, conditions = [], clause; + + if (params.wildcard) + conditions.push('true'); + if (clause = params.id) + conditions.push('element.readAttribute("id") == ' + clause.inspect()); + if (clause = params.tagName) + conditions.push('element.tagName.toUpperCase() == ' + clause.inspect()); + if ((clause = params.classNames).length > 0) + for (var i = 0, length = clause.length; i < length; i++) + conditions.push('element.hasClassName(' + clause[i].inspect() + ')'); + if (clause = params.attributes) { + clause.each(function(attribute) { + var value = 'element.readAttribute(' + attribute.name.inspect() + ')'; + var splitValueBy = function(delimiter) { + return value + ' && ' + value + '.split(' + delimiter.inspect() + ')'; + } + + switch (attribute.operator) { + case '=': conditions.push(value + ' == ' + attribute.value.inspect()); break; + case '~=': conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break; + case '|=': conditions.push( + splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect() + ); break; + case '!=': conditions.push(value + ' != ' + attribute.value.inspect()); break; + case '': + case undefined: conditions.push('element.hasAttribute(' + attribute.name.inspect() + ')'); break; + default: throw 'Unknown operator ' + attribute.operator + ' in selector'; + } + }); + } + + return conditions.join(' && '); + }, + + compileMatcher: function() { + this.match = new Function('element', 'if (!element.tagName) return false; \ + element = $(element); \ + return ' + this.buildMatchExpression()); + }, + + findElements: function(scope) { + var element; + + if (element = $(this.params.id)) + if (this.match(element)) + if (!scope || Element.childOf(element, scope)) + return [element]; + + scope = (scope || document).getElementsByTagName(this.params.tagName || '*'); + + var results = []; + for (var i = 0, length = scope.length; i < length; i++) + if (this.match(element = scope[i])) + results.push(Element.extend(element)); + + return results; + }, + + toString: function() { + return this.expression; + } +} + +Object.extend(Selector, { + matchElements: function(elements, expression) { + var selector = new Selector(expression); + return elements.select(selector.match.bind(selector)).map(Element.extend); + }, + + findElement: function(elements, expression, index) { + if (typeof expression == 'number') index = expression, expression = false; + return Selector.matchElements(elements, expression || '*')[index || 0]; + }, + + findChildElements: function(element, expressions) { + return expressions.map(function(expression) { + return expression.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null], function(results, expr) { + var selector = new Selector(expr); + return results.inject([], function(elements, result) { + return elements.concat(selector.findElements(result || element)); + }); + }); + }).flatten(); + } +}); + +function $$() { + return Selector.findChildElements(document, $A(arguments)); +} +var Form = { + reset: function(form) { + $(form).reset(); + return form; + }, + + serializeElements: function(elements, getHash) { + var data = elements.inject({}, function(result, element) { + if (!element.disabled && element.name) { + var key = element.name, value = $(element).getValue(); + if (value != undefined) { + if (result[key]) { + if (result[key].constructor != Array) result[key] = [result[key]]; + result[key].push(value); + } + else result[key] = value; + } + } + return result; + }); + + return getHash ? data : Hash.toQueryString(data); + } +}; + +Form.Methods = { + serialize: function(form, getHash) { + return Form.serializeElements(Form.getElements(form), getHash); + }, + + getElements: function(form) { + return $A($(form).getElementsByTagName('*')).inject([], + function(elements, child) { + if (Form.Element.Serializers[child.tagName.toLowerCase()]) + elements.push(Element.extend(child)); + return elements; + } + ); + }, + + getInputs: function(form, typeName, name) { + form = $(form); + var inputs = form.getElementsByTagName('input'); + + if (!typeName && !name) return $A(inputs).map(Element.extend); + + for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) { + var input = inputs[i]; + if ((typeName && input.type != typeName) || (name && input.name != name)) + continue; + matchingInputs.push(Element.extend(input)); + } + + return matchingInputs; + }, + + disable: function(form) { + form = $(form); + form.getElements().each(function(element) { + element.blur(); + element.disabled = 'true'; + }); + return form; + }, + + enable: function(form) { + form = $(form); + form.getElements().each(function(element) { + element.disabled = ''; + }); + return form; + }, + + findFirstElement: function(form) { + return $(form).getElements().find(function(element) { + return element.type != 'hidden' && !element.disabled && + ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); + }); + }, + + focusFirstElement: function(form) { + form = $(form); + form.findFirstElement().activate(); + return form; + } +} + +Object.extend(Form, Form.Methods); + +/*--------------------------------------------------------------------------*/ + +Form.Element = { + focus: function(element) { + $(element).focus(); + return element; + }, + + select: function(element) { + $(element).select(); + return element; + } +} + +Form.Element.Methods = { + serialize: function(element) { + element = $(element); + if (!element.disabled && element.name) { + var value = element.getValue(); + if (value != undefined) { + var pair = {}; + pair[element.name] = value; + return Hash.toQueryString(pair); + } + } + return ''; + }, + + getValue: function(element) { + element = $(element); + var method = element.tagName.toLowerCase(); + return Form.Element.Serializers[method](element); + }, + + clear: function(element) { + $(element).value = ''; + return element; + }, + + present: function(element) { + return $(element).value != ''; + }, + + activate: function(element) { + element = $(element); + element.focus(); + if (element.select && ( element.tagName.toLowerCase() != 'input' || + !['button', 'reset', 'submit'].include(element.type) ) ) + element.select(); + return element; + }, + + disable: function(element) { + element = $(element); + element.disabled = true; + return element; + }, + + enable: function(element) { + element = $(element); + element.blur(); + element.disabled = false; + return element; + } +} + +Object.extend(Form.Element, Form.Element.Methods); +var Field = Form.Element; +var $F = Form.Element.getValue; + +/*--------------------------------------------------------------------------*/ + +Form.Element.Serializers = { + input: function(element) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + return Form.Element.Serializers.inputSelector(element); + default: + return Form.Element.Serializers.textarea(element); + } + }, + + inputSelector: function(element) { + return element.checked ? element.value : null; + }, + + textarea: function(element) { + return element.value; + }, + + select: function(element) { + return this[element.type == 'select-one' ? + 'selectOne' : 'selectMany'](element); + }, + + selectOne: function(element) { + var index = element.selectedIndex; + return index >= 0 ? this.optionValue(element.options[index]) : null; + }, + + selectMany: function(element) { + var values, length = element.length; + if (!length) return null; + + for (var i = 0, values = []; i < length; i++) { + var opt = element.options[i]; + if (opt.selected) values.push(this.optionValue(opt)); + } + return values; + }, + + optionValue: function(opt) { + // extend element because hasAttribute may not be native + return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; + } +} + +/*--------------------------------------------------------------------------*/ + +Abstract.TimedObserver = function() {} +Abstract.TimedObserver.prototype = { + initialize: function(element, frequency, callback) { + this.frequency = frequency; + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + this.registerCallback(); + }, + + registerCallback: function() { + setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + onTimerEvent: function() { + var value = this.getValue(); + var changed = ('string' == typeof this.lastValue && 'string' == typeof value + ? this.lastValue != value : String(this.lastValue) != String(value)); + if (changed) { + this.callback(this.element, value); + this.lastValue = value; + } + } +} + +Form.Element.Observer = Class.create(); +Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.Observer = Class.create(); +Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); + +/*--------------------------------------------------------------------------*/ + +Abstract.EventObserver = function() {} +Abstract.EventObserver.prototype = { + initialize: function(element, callback) { + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + if (this.element.tagName.toLowerCase() == 'form') + this.registerFormCallbacks(); + else + this.registerCallback(this.element); + }, + + onElementEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + }, + + registerFormCallbacks: function() { + Form.getElements(this.element).each(this.registerCallback.bind(this)); + }, + + registerCallback: function(element) { + if (element.type) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + Event.observe(element, 'click', this.onElementEvent.bind(this)); + break; + default: + Event.observe(element, 'change', this.onElementEvent.bind(this)); + break; + } + } + } +} + +Form.Element.EventObserver = Class.create(); +Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.EventObserver = Class.create(); +Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); +if (!window.Event) { + var Event = new Object(); +} + +Object.extend(Event, { + KEY_BACKSPACE: 8, + KEY_TAB: 9, + KEY_RETURN: 13, + KEY_ESC: 27, + KEY_LEFT: 37, + KEY_UP: 38, + KEY_RIGHT: 39, + KEY_DOWN: 40, + KEY_DELETE: 46, + KEY_HOME: 36, + KEY_END: 35, + KEY_PAGEUP: 33, + KEY_PAGEDOWN: 34, + + element: function(event) { + return event.target || event.srcElement; + }, + + isLeftClick: function(event) { + return (((event.which) && (event.which == 1)) || + ((event.button) && (event.button == 1))); + }, + + pointerX: function(event) { + return event.pageX || (event.clientX + + (document.documentElement.scrollLeft || document.body.scrollLeft)); + }, + + pointerY: function(event) { + return event.pageY || (event.clientY + + (document.documentElement.scrollTop || document.body.scrollTop)); + }, + + stop: function(event) { + if (event.preventDefault) { + event.preventDefault(); + event.stopPropagation(); + } else { + event.returnValue = false; + event.cancelBubble = true; + } + }, + + // find the first node with the given tagName, starting from the + // node the event was triggered on; traverses the DOM upwards + findElement: function(event, tagName) { + var element = Event.element(event); + while (element.parentNode && (!element.tagName || + (element.tagName.toUpperCase() != tagName.toUpperCase()))) + element = element.parentNode; + return element; + }, + + observers: false, + + _observeAndCache: function(element, name, observer, useCapture) { + if (!this.observers) this.observers = []; + if (element.addEventListener) { + this.observers.push([element, name, observer, useCapture]); + element.addEventListener(name, observer, useCapture); + } else if (element.attachEvent) { + this.observers.push([element, name, observer, useCapture]); + element.attachEvent('on' + name, observer); + } + }, + + unloadCache: function() { + if (!Event.observers) return; + for (var i = 0, length = Event.observers.length; i < length; i++) { + Event.stopObserving.apply(this, Event.observers[i]); + Event.observers[i][0] = null; + } + Event.observers = false; + }, + + observe: function(element, name, observer, useCapture) { + element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + (navigator.appVersion.match(/Konqueror|Safari|KHTML/) + || element.attachEvent)) + name = 'keydown'; + + Event._observeAndCache(element, name, observer, useCapture); + }, + + stopObserving: function(element, name, observer, useCapture) { + element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + (navigator.appVersion.match(/Konqueror|Safari|KHTML/) + || element.detachEvent)) + name = 'keydown'; + + if (element.removeEventListener) { + element.removeEventListener(name, observer, useCapture); + } else if (element.detachEvent) { + try { + element.detachEvent('on' + name, observer); + } catch (e) {} + } + } +}); + +/* prevent memory leaks in IE */ +if (navigator.appVersion.match(/\bMSIE\b/)) + Event.observe(window, 'unload', Event.unloadCache, false); +var Position = { + // set to true if needed, warning: firefox performance problems + // NOT neeeded for page scrolling, only if draggable contained in + // scrollable elements + includeScrollOffsets: false, + + // must be called before calling withinIncludingScrolloffset, every time the + // page is scrolled + prepare: function() { + this.deltaX = window.pageXOffset + || document.documentElement.scrollLeft + || document.body.scrollLeft + || 0; + this.deltaY = window.pageYOffset + || document.documentElement.scrollTop + || document.body.scrollTop + || 0; + }, + + realOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.scrollTop || 0; + valueL += element.scrollLeft || 0; + element = element.parentNode; + } while (element); + return [valueL, valueT]; + }, + + cumulativeOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + } while (element); + return [valueL, valueT]; + }, + + positionedOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + if (element) { + if(element.tagName=='BODY') break; + var p = Element.getStyle(element, 'position'); + if (p == 'relative' || p == 'absolute') break; + } + } while (element); + return [valueL, valueT]; + }, + + offsetParent: function(element) { + if (element.offsetParent) return element.offsetParent; + if (element == document.body) return element; + + while ((element = element.parentNode) && element != document.body) + if (Element.getStyle(element, 'position') != 'static') + return element; + + return document.body; + }, + + // caches x/y coordinate pair to use with overlap + within: function(element, x, y) { + if (this.includeScrollOffsets) + return this.withinIncludingScrolloffsets(element, x, y); + this.xcomp = x; + this.ycomp = y; + this.offset = this.cumulativeOffset(element); + + return (y >= this.offset[1] && + y < this.offset[1] + element.offsetHeight && + x >= this.offset[0] && + x < this.offset[0] + element.offsetWidth); + }, + + withinIncludingScrolloffsets: function(element, x, y) { + var offsetcache = this.realOffset(element); + + this.xcomp = x + offsetcache[0] - this.deltaX; + this.ycomp = y + offsetcache[1] - this.deltaY; + this.offset = this.cumulativeOffset(element); + + return (this.ycomp >= this.offset[1] && + this.ycomp < this.offset[1] + element.offsetHeight && + this.xcomp >= this.offset[0] && + this.xcomp < this.offset[0] + element.offsetWidth); + }, + + // within must be called directly before + overlap: function(mode, element) { + if (!mode) return 0; + if (mode == 'vertical') + return ((this.offset[1] + element.offsetHeight) - this.ycomp) / + element.offsetHeight; + if (mode == 'horizontal') + return ((this.offset[0] + element.offsetWidth) - this.xcomp) / + element.offsetWidth; + }, + + page: function(forElement) { + var valueT = 0, valueL = 0; + + var element = forElement; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + + // Safari fix + if (element.offsetParent==document.body) + if (Element.getStyle(element,'position')=='absolute') break; + + } while (element = element.offsetParent); + + element = forElement; + do { + if (!window.opera || element.tagName=='BODY') { + valueT -= element.scrollTop || 0; + valueL -= element.scrollLeft || 0; + } + } while (element = element.parentNode); + + return [valueL, valueT]; + }, + + clone: function(source, target) { + var options = Object.extend({ + setLeft: true, + setTop: true, + setWidth: true, + setHeight: true, + offsetTop: 0, + offsetLeft: 0 + }, arguments[2] || {}) + + // find page position of source + source = $(source); + var p = Position.page(source); + + // find coordinate system to use + target = $(target); + var delta = [0, 0]; + var parent = null; + // delta [0,0] will do fine with position: fixed elements, + // position:absolute needs offsetParent deltas + if (Element.getStyle(target,'position') == 'absolute') { + parent = Position.offsetParent(target); + delta = Position.page(parent); + } + + // correct by body offsets (fixes Safari) + if (parent == document.body) { + delta[0] -= document.body.offsetLeft; + delta[1] -= document.body.offsetTop; + } + + // set position + if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; + if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; + if(options.setWidth) target.style.width = source.offsetWidth + 'px'; + if(options.setHeight) target.style.height = source.offsetHeight + 'px'; + }, + + absolutize: function(element) { + element = $(element); + if (element.style.position == 'absolute') return; + Position.prepare(); + + var offsets = Position.positionedOffset(element); + var top = offsets[1]; + var left = offsets[0]; + var width = element.clientWidth; + var height = element.clientHeight; + + element._originalLeft = left - parseFloat(element.style.left || 0); + element._originalTop = top - parseFloat(element.style.top || 0); + element._originalWidth = element.style.width; + element._originalHeight = element.style.height; + + element.style.position = 'absolute'; + element.style.top = top + 'px'; + element.style.left = left + 'px'; + element.style.width = width + 'px'; + element.style.height = height + 'px'; + }, + + relativize: function(element) { + element = $(element); + if (element.style.position == 'relative') return; + Position.prepare(); + + element.style.position = 'relative'; + var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); + var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); + + element.style.top = top + 'px'; + element.style.left = left + 'px'; + element.style.height = element._originalHeight; + element.style.width = element._originalWidth; + } +} + +// Safari returns margins on body which is incorrect if the child is absolutely +// positioned. For performance reasons, redefine Position.cumulativeOffset for +// KHTML/WebKit only. +if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { + Position.cumulativeOffset = function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + if (element.offsetParent == document.body) + if (Element.getStyle(element, 'position') == 'absolute') break; + + element = element.offsetParent; + } while (element); + + return [valueL, valueT]; + } +} + +Element.addMethods(); \ No newline at end of file diff --git a/rails/public/robots.txt b/rails/public/robots.txt new file mode 100644 index 0000000..4ab9e89 --- /dev/null +++ b/rails/public/robots.txt @@ -0,0 +1 @@ +# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file \ No newline at end of file diff --git a/rails/script/about b/rails/script/about new file mode 100755 index 0000000..7b07d46 --- /dev/null +++ b/rails/script/about @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.dirname(__FILE__) + '/../config/boot' +require 'commands/about' \ No newline at end of file diff --git a/rails/script/breakpointer b/rails/script/breakpointer new file mode 100755 index 0000000..64af76e --- /dev/null +++ b/rails/script/breakpointer @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.dirname(__FILE__) + '/../config/boot' +require 'commands/breakpointer' \ No newline at end of file diff --git a/rails/script/console b/rails/script/console new file mode 100755 index 0000000..42f28f7 --- /dev/null +++ b/rails/script/console @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.dirname(__FILE__) + '/../config/boot' +require 'commands/console' \ No newline at end of file diff --git a/rails/script/destroy b/rails/script/destroy new file mode 100755 index 0000000..fa0e6fc --- /dev/null +++ b/rails/script/destroy @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.dirname(__FILE__) + '/../config/boot' +require 'commands/destroy' \ No newline at end of file diff --git a/rails/script/generate b/rails/script/generate new file mode 100755 index 0000000..ef976e0 --- /dev/null +++ b/rails/script/generate @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.dirname(__FILE__) + '/../config/boot' +require 'commands/generate' \ No newline at end of file diff --git a/rails/script/performance/benchmarker b/rails/script/performance/benchmarker new file mode 100755 index 0000000..c842d35 --- /dev/null +++ b/rails/script/performance/benchmarker @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.dirname(__FILE__) + '/../../config/boot' +require 'commands/performance/benchmarker' diff --git a/rails/script/performance/profiler b/rails/script/performance/profiler new file mode 100755 index 0000000..d855ac8 --- /dev/null +++ b/rails/script/performance/profiler @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.dirname(__FILE__) + '/../../config/boot' +require 'commands/performance/profiler' diff --git a/rails/script/plugin b/rails/script/plugin new file mode 100755 index 0000000..26ca64c --- /dev/null +++ b/rails/script/plugin @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.dirname(__FILE__) + '/../config/boot' +require 'commands/plugin' \ No newline at end of file diff --git a/rails/script/process/inspector b/rails/script/process/inspector new file mode 100755 index 0000000..bf25ad8 --- /dev/null +++ b/rails/script/process/inspector @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.dirname(__FILE__) + '/../../config/boot' +require 'commands/process/inspector' diff --git a/rails/script/process/reaper b/rails/script/process/reaper new file mode 100755 index 0000000..c77f045 --- /dev/null +++ b/rails/script/process/reaper @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.dirname(__FILE__) + '/../../config/boot' +require 'commands/process/reaper' diff --git a/rails/script/process/spawner b/rails/script/process/spawner new file mode 100755 index 0000000..7118f39 --- /dev/null +++ b/rails/script/process/spawner @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.dirname(__FILE__) + '/../../config/boot' +require 'commands/process/spawner' diff --git a/rails/script/runner b/rails/script/runner new file mode 100755 index 0000000..ccc30f9 --- /dev/null +++ b/rails/script/runner @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.dirname(__FILE__) + '/../config/boot' +require 'commands/runner' \ No newline at end of file diff --git a/rails/script/server b/rails/script/server new file mode 100755 index 0000000..dfabcb8 --- /dev/null +++ b/rails/script/server @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +require File.dirname(__FILE__) + '/../config/boot' +require 'commands/server' \ No newline at end of file diff --git a/rails/test/test_helper.rb b/rails/test/test_helper.rb new file mode 100644 index 0000000..a299c7f --- /dev/null +++ b/rails/test/test_helper.rb @@ -0,0 +1,28 @@ +ENV["RAILS_ENV"] = "test" +require File.expand_path(File.dirname(__FILE__) + "/../config/environment") +require 'test_help' + +class Test::Unit::TestCase + # Transactional fixtures accelerate your tests by wrapping each test method + # in a transaction that's rolled back on completion. This ensures that the + # test database remains unchanged so your fixtures don't have to be reloaded + # between every test method. Fewer database queries means faster tests. + # + # Read Mike Clark's excellent walkthrough at + # http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting + # + # Every Active Record database supports transactions except MyISAM tables + # in MySQL. Turn off transactional fixtures in this case; however, if you + # don't care one way or the other, switching from MyISAM to InnoDB tables + # is recommended. + self.use_transactional_fixtures = true + + # Instantiated fixtures are slow, but give you @david where otherwise you + # would need people(:david). If you don't want to migrate your existing + # test cases which use the @david style and don't mind the speed hit (each + # instantiated fixtures translates to a database query per test method), + # then set this back to true. + self.use_instantiated_fixtures = false + + # Add more helper methods to be used by all tests here... +end