1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/adminer_ynh.git synced 2024-09-03 18:06:06 +02:00
adminer_ynh/sources/root_access_disabled/adminer.php

827 lines
323 KiB
PHP
Raw Normal View History

2014-05-08 19:46:08 +02:00
<?php
/** Adminer - Compact database management
* @link https://www.adminer.org/
* @author Jakub Vrana, https://www.vrana.cz/
2014-05-08 19:46:08 +02:00
* @copyright 2007 Jakub Vrana
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
* @version 4.3.1
*/error_reporting(6135);$qc=!preg_match('~^(unsafe_raw)?$~',ini_get("filter.default"));if($qc||ini_get("filter.default_flags")){foreach(array('_GET','_POST','_COOKIE','_SERVER')as$X){$Gg=filter_input_array(constant("INPUT$X"),FILTER_UNSAFE_RAW);if($Gg)$$X=$Gg;}}if(function_exists("mb_internal_encoding"))mb_internal_encoding("8bit");if(isset($_GET["file"])){if($_SERVER["HTTP_IF_MODIFIED_SINCE"]){header("HTTP/1.1 304 Not Modified");exit;}header("Expires: ".gmdate("D, d M Y H:i:s",time()+365*24*60*60)." GMT");header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");header("Cache-Control: immutable");if($_GET["file"]=="favicon.ico"){header("Content-Type: image/x-icon");echo
2014-05-08 19:46:08 +02:00
lzw_decompress("\0\0\0` \0<EFBFBD>\0\n @\0<EFBFBD>C<><10>\"\0`E<>Q<EFBFBD><51><01><1F>?<3F>tvM'<27>Jd<4A>d\\<19>b0\0<08>\"<13><><66><D388>s5<73><35><EFBFBD><EFBFBD>A<EFBFBD>XPaJ<>0<18><><EFBFBD>8<>#R<>T<EFBFBD><54>z`<60>#.<2E><>c<EFBFBD>X<EFBFBD><58>Ȁ?<3F>-\0<05>Im?<3F>.<16>M<EFBFBD><16>\0ȯ<><1E>/(%<25>\0");}elseif($_GET["file"]=="default.css"){header("Content-Type: text/css; charset=utf-8");echo
lzw_decompress("\n1̇<>ٌ<EFBFBD>l7<6C><37>B1<42>4vb0<62><30>fs<66><73><EFBFBD>n2B<32>ѱ٘<D1B1>n:<0E>#(<28>b.\rDc)<29><>a7E<><13><><EFBFBD>l <0C>ñ<EFBFBD><C3B1>i1̎s<03><><EFBFBD>-4<><34>f<EFBFBD> <09><>i7<0E><03><><EFBFBD> <07><><EFBFBD><46>vt2<74><0E><>!<21> r0<72><30><EFBFBD><EFBFBD>t~<7E>U<1D>'3M<33><4D>W<EFBFBD>B<EFBFBD>'c<>P<EFBFBD>:6T\rc<EFBFBD>A<EFBFBD>zr_<>WK<57>\r-<2D>VNFS%~<7E>c<EFBFBD><63><EFBFBD>&<26>\\^<5E>r<EFBFBD><72><EFBFBD><EFBFBD>u<>ŎÞ<C58E>ً4'7k<37><6B><EFBFBD><EFBFBD><EFBFBD>Q<EFBFBD><51>h<16>'g\rFB\ryT7SS<53>P<EFBFBD>1=ǤcI<63><49>:<18>d<EFBFBD><64>m><3E>S8L<>J<EFBFBD><4A>t.M<><01><> ϋ`'C<><43><EFBFBD><EFBFBD>889<38><39> <11>Q<7F><51><EFBFBD><EFBFBD>2<EFBFBD>#8А<38><D090><EFBFBD><EFBFBD>6m<><6D><11><>j<1E><>h<EFBFBD><<3C><><EFBFBD><EFBFBD><EFBFBD>9/<2F><><EFBFBD>:<0E>J<EFBFBD><>\0d>!\0Z<18><0F>v<EFBFBD><76>n<EFBFBD><6E><EFBFBD><EFBFBD>o(<28><><EFBFBD><EFBFBD>k<EFBFBD>7<EFBFBD><37>s<EFBFBD><73>><3E> <0B><>!<21>R\"*nS<6E>\0@P\"<03><><EFBFBD>(<28>#[<5B><><0F>@g <0C>o<EFBFBD><01><>zn<7A>9k<39>8<18>n<EFBFBD><6E><10>1<EFBFBD>I*<2A><> =<3D>n<EFBFBD><6E><EFBFBD><0E><><EFBFBD>0<EFBFBD>c(<28>;<3B>à<EFBFBD><C3A0>!<21><><EFBFBD>*c<><63><>E7D<37>LJ<4C><4A>1<EFBFBD>J=<11><><EFBFBD>1L<31><4C>?<0F>s=#`<60>3\$4<EFBFBD><EFBFBD><EFBFBD><EFBFBD>uȱ<><C8B1>zG<0F>C YAt<>?;<3B>Q<EFBFBD>k&<26><><EFBFBD>YP<59>u<EFBFBD><75>ǯ}UaHV%G;<3B>s<EFBFBD><73><A\0\\<19><>P<EFBFBD>\\<EFBFBD><12>&ª<>V<16><>\n<EFBFBD>SU<13>t<EFBFBD><15><>r<EFBFBD><72><EFBFBD><EFBFBD>2<EFBFBD> l^<5E>Z6<5A>ej<65><6A><EFBFBD><EFBFBD>A <0C>d<EFBFBD>[<5B><73>JP<4A><50><11><><EFBFBD>ҝ<EFBFBD><D29D>8<EFBFBD>=<3D><><EFBFBD><EFBFBD>6 #˂74*<2A><0E><>#e<><65><EFBFBD>!<21>7{<EFBFBD>6<EFBFBD><EFBFBD><o<03>C<EFBFBD>9v[<5B>M<EFBFBD><4D>-`<60><>k<EFBFBD>><3E>l<>ڴ<><DAB4>I<EFBFBD><49>H<EFBFBD>3<EFBFBD>x<EFBFBD><78><EFBFBD><EFBFBD>w0t6<74><36>%MR%<25><>jh<>B<EFBFBD><<05>\0<EFBFBD>AQ<P<:<3A><>u/<2F>;\\><3E><>-<2D><>ʈ<EFBFBD><CA88> QH\nv<>L+v<>æ<EFBFBD><<3C>\r<EFBFBD><EFBFBD>v<EFBFBD><EFBFBD><EFBFBD><15>\\*<2A><><EFBFBD><EFBFBD>Ӵݢg<DDA2><67><6E> <0C>TЩ2P<32>\r<EFBFBD><EFBFBD>ߋ\"+z<>8<0E><><EFBFBD>:#<23><><1E><><08>2<EFBFBD><32>J[<5B>i<EFBFBD><69><EFBFBD><EFBFBD>;z<><7A><EFBFBD><EFBFBD><EFBFBD>r<EFBFBD>3 #<23>ى<EFBFBD>:<3A>n<EFBFBD>\r㽃e<EFBFBD>pdݍ<> <20>2c<32><63>4<EFBFBD>k<EFBFBD><6B><EFBFBD>\rG<><47>E6_<36><5F><EFBFBD>=<3D><>SZUǷ㌞O<E38C9E><4F><EFBFBD>?<1F><>þ27<32>c<EFBFBD>А<EFBFBD>hnƋ<6E><C68B>u3<75>E>\$J[<5B>q[\r<EFBFBD>I<EFBFBD>6.<2E>J<EFBFBD>\"EPr<>G̊GA<47><41>W<EFBFBD><57><EFBFBD>\r<EFBFBD><EFBFBD><EFBFBD>6<EFBFBD><EFBFBD>k<06><><EFBFBD>`.-<2D><>B2>#<15><>h<EFBFBD><68><EFBFBD>X<EFBFBD><58><EFBFBD>u\r<EFBFBD><EFBFBD>=<3D>Z<> b<>Ł(<28>╃!JZȔu<>yO<79><4F>Z<EFBFBD>M<EFBFBD><02>6<0E>lM[0<><EFBFBD><E49680>!Im<0E>y<EFBFBD>+p<>#ag<61><67><02>vW<76>:qp\"4<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>he<EFBFBD><EFBFBD><EFBFBD>0<EFBFBD>d<EFBFBD>Aq-\"<EFBFBD><EFBFBD> <0C><><EFBFBD><EFBFBD>\"2<EFBFBD> <0C><>@<40>)o<>,,<2C><><EFBFBD><EFBFBD><EFBFBD>Rb`@<40>B@<06><><1C><1B><><EFBFBD>Q\n<EFBFBD><EFBFBD>Z<EFBFBD><EFBFBD><08>™=(r~<7E>l<EFBFBD>~<7E><>h<EFBFBD>sAll<6C>\n7<>!1 !<21><>#<10>\0K<EFBFBD><04>A<EFBFBD>LH(<28>!<21>ʘagH\0<EFBFBD>T\ni<04>/<2F>\$<EFBFBD><EFBFBD><EFBFBD>4Ga<1A>I<EFBFBD>!<21>.<2E>Ř5<C598><35>M\r<EFBFBD>2<><32><11> <09>;<3B>,<2C><>LIJ<49><4A><EFBFBD>d?<3F><><14><13><>%Ո:<06>N@b.<18><01>2<EFBFBD>5<EFBFBD><35><EFBFBD>t: FAw<41>B<EFBFBD>E<EFBFBD>,<2C>-\$<EFBFBD><EFBFBD>'<27>u<0E>?<3F>tK;ḱ<6B><CD81>и<EFBFBD><D0B8>\0ouMD)k_Ph<50><68><EFBFBD>5MC}7<><37><EFBFBD>2<EFBFBD>w.Q<>B<EFBFBD>8)<29><><EFBFBD>8(DI<44>=<3D><>y`<10>ed\0s,`ɕj<C995>H<EFBFBD><48>\"(b<><62><EFBFBD>\\<EFBFBD><EFBFBD>nl<6E>\"ق^<5E>쀭eE<65>\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD>X!SqX<71><16>\r<EFBFBD><EFBFBD><EFBFBD>7A<EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><1C><>y7pP<70><50><EFBFBD><EFBFBD>a<>A<>4<EFBFBD><34>(y<>Jwm<7F>2<><32><0E><>.<2E>󉆬fp<66><70><EFBFBD>;Ƅ5<C684>J<EFBFBD>c<>q<EFBFBD>Qz\\\0[H <0B><> 3<>f'b<><62>F<EFBFBD><46><EFBFBD>Y<EFBFBD>\nA<EFBFBD>9_<EFBFBD>I<EFBFBD><EFBFBD>(<28>f<1B>ӝq<D39D>V<EFBFBD><56><02><08><><19>4<><34><EFBFBD><EFBFBD><19><>RI<52>Y<EFBFBD><59>&J<><4A>F<EFBFBD>}<7D>{FT<EFBFBD>h9[7<>h\0<EFBFBD> <1A>T<EFBFBD>^<5E><>j<><6A>q<EFBFBD>j<EFBFBD><1C><>Ք<EFBFBD><D594><EFBFBD>c<EFBFBD>WI<>@`_<>sVD<><44>[<5B>\"{1<EFBFBD><EFBFBD>3<10><> <09><><EFBFBD><EFBFBD><EFBFBD><10><<01>l<EFBFBD>l.<2E><><EFBFBD>[<5B><><1A><><><C4AF>b<EFBFBD><62>u<EFBFBD><75>/<2F>\0<EFBFBD>3<EFBFBD>va嫑Dp><3E>2 <0C>I<03>DW՚<57>kK<6B>A<EFBFBD><41>hH<68>]<5D><>F<EFBFBD><16><><EFBFBD>W<EFBFBD>!]<08>ʝ<>lt<6C>ɕR̭4L[<1B><><EFBFBD>YC cTj<c;s<>q<EFBFBD>p<EFBFBD><17> <20>5<EFBFBD>t<EFBFBD>J<EFBFBD>m6<6D>%J<>-\\<05><>eB=i <0C>-<2D>*%<25><><EFBFBD><EFBFBD><EFBFBD>TV<54>[&M8<4D>*\r<EFBFBD>b<EFBFBD>Y\rih<EFBFBD> <09><>P<EFBFBD>9T<39>-VɰZ<01><><10>۳<EFBFBD>49β<39><CEB2><EFBFBD>p-<2D>`<60><><EFBFBD><EFBFBD><EFBFBD>G<EFBFBD>ٛ'<27><><16><><EFBFBD> M<>:<3A>ř')0<18>Yu<59>c<>:!<21> x#צ<><D7A6>-l*<2A>T<EFBFBD>\nYl<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <1C><>*D<><44>X<> V\\<EFBFBD><EFBFBD><EFBFBD>ڮ<EFBFBD>]y<><79>\n<EFBFBD>2r,Ɇ<><C986><EFBFBD>,<2C>d<EFBFBD><64><><C5B3>s<EFBFBD>-<2D>+ֻu<D6BB>]<5D>\\B<16><><EFBFBD><EFBFBD>Iw<49><77>!<21>Os<4F>ԯl<D4AF><6C>YC<59>Ђ<EFBFBD><D082>:<06>@ƜEU<45>._)<01>9u<39>z<EFBFBD><7A>vψS<CF88><16><>1<1C><><02>_(S<><53>q齡r<E9BDA1>yu<79>+<2B>Z*<2A>6<EFBFBD>u<EFBFBD>y<EFBFBD><<3C><><EFBFBD>z\\|<12>ZK; <0B>e<>ז<EFBFBD>oY<6F><59><EFBFBD>;<3B><1C><><EFBFBD>l<EFBFBD><6C>x<EFBFBD><78>-7<><37><EFBFBD>4rkYY?<3F><>GWt<57><74><1D>[Kښ<4B><DA9A>zo<7A><<3C><><EFBFBD><EFBFBD> t<><74>􆶾<EFBFBD><F486B6BE>ɀg<C980><67>j<EFBFBD><6A>_!<21><>o<EFBFBD><6F><EFBFBD>\$ I<><49><EFBFBD>I<EFBFBD>.&<07>5<>P\\<EFBFBD><EFBFBD>]<5D><><EFBFBD><03><>\nC<EFBFBD>.<2E><>_<EFBFBD><5F>;<3B><>s<16>i<><69>S/g<>:<3A>P<EFBFBD>ɳauNͨ|<7C>a<EFBFBD><61><EFBFBD><EFBFBD><E199BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>6<EFBFBD>ӎٞ3<D99E>|<7C><><EFBFBD><EFBFBD>{<EFBFBD>ce<EFBFBD>X<><58><<3C>e<18>p>N<7F>}<7D><>~<1E><1E>O<EFBFBD><0F><>ҙBl<42><6C>j<EFBFBD>/<2F><>K<EFBFBD><4B>Hdch-˾<><CBBE><EFBFBD><EFBFBD><0F><>/<0E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȶ<EFBFBD><68>0<EFBFBD><30>Ќ<EFBFBD>Ћ<EFBFBD><D08B><EFBFBD><EFBFBD>H<EFBFBD><48>8<EFBFBD>j6<6A>\n+d <20>l7\r<EFBFBD><EFBFBD> <20>څ0N7e<06>Z<EFBFBD>0`m<><6D>n<05><><07>p\0<EFBFBD>\0<EFBFBD>}<7D><>@[<08><><06>i0<> <0B><> <09>~<7E><><EFBFBD>4P<34>\nА<EFBFBD>bЯ0<EFBFBD>p<> P<>4@<40> P<> <0B><1C><><EFBFBD>I\0``f<><66>\r`<60>``<60><>Y<07><>z<EFBFBD><7A> P<><0F><>\r<EFBFBD><EFBFBD><07><> p<> <0C>y H<>q<06>@<40> <0B> Q<18>q<1C><> <20>`<60><0F><12> bi<62><69><EFBFBD>UС <0C><12>@`)<29><0E><><08><> <0B><>)<29><><08>Z<EFBFBD>pj(<28>--l<><6C><EFBFBD><EFBFBD>1Q<10><>%<25>p<><0F>Y<15>\n1}<18><><16>\\*<2A><>h<EFBFBD><10>{<EFBFBD><EFBFBD>C0<>#<23><>H<EFBFBD><48>0T<30>qA<07><> <0C>b<EFBFBD>=<3D>…<EFBFBD>f- <20><12><>q<> iA<17>s'Q<><1C><><1C><><1C>Z\r<EFBFBD>Rc'<1A><>`<60><08><>q<> <0B>Y<1D>Q1<1E>ҝ2!r\"Q<EFBFBD>1<> Q<>!q<>r\0<EFBFBD>B<16><>D<08>w<1B><>\0<EFBFBD><11><><EFBFBD><EFBFBD><EFBFBD>q<>\$<EFBFBD>S<11><>\"<EFBFBD>]q<><1E>@`豲@,<11>\"r\"<EFBFBD>)&<26><>&<26>\nt<EFBFBD><EFBFBD>b<EFBFBD>m0<1A>2<EFBFBD>)Qw\n<EFBFBD><EFBFBD> <0C><> <20> <0B><>p(0<>*<2A><><1A>Ҏ<EFBFBD><D28E><EFBFBD><1B>q\n<EFBFBD>&i\n<EFBFBD> \"<EFBFBD>p<><11><>1<><1E>C<08><><12><10>\"<EFBFBD>.1y.q^ <0B><><EFBFBD>2<EFBFBD><11><>\0<EFBFBD>.<2E><>Q<>0<EFBFBD><12>r<EFBFBD><18>)/\0ڔ!/<12>.S+1R<31>/3:5<>Ɲ<EFBFBD>11<31>\nB<EFBFBD>43 4<>G#〜`<60>Sa <20>ra6<><06><>es7<12>q<12>,<>j3q4)<29>\$<04><><EFBFBD><EFBFBD> <0B>@*<2A><>-<2D><>9<EFBFBD><06><>\n<EFBFBD><EFBFBD>\"0<EFBFBD>',<2C>h<EFBFBD>S}\"<04>3ss9<><39>1<EFBFBD><31>7S-=1g4 <09><pr.<2E><>)LA9<41><39><EFBFBD>´ <20><>/9<10>S<>?<3F>/5H}><3E>.<2E><>4LD;<3B><>@2!A<><41>@<40><><07>Br<42><17>-/<2F>+016S<><53>#<23>)<03><>\"Ži@<40>`P;.\n<0E><><)Ա<>V\nl8<EFBFBD>K#gk<1C>d|<7C><>8<>l<EFBFBD><6C><EFBFBD>.lf.<2E>?<11>A@\rÆ.<2E>\$J2tN#<23>Rr<52>AE<41><45>E<EFBFBD><1C><>e<19><>F<EFBFBD><46>FӦg<D3A6>8*<2A>");}elseif($_GET["file"]=="functions.js"){header("Content-Type: text/javascript; charset=utf-8");echo
lzw_decompress("f:<3A><>gCI<43><49>\n0<EFBFBD><0E>S<EFBFBD> <0C>a9<61><39>S`<60><><0F><><EFBFBD>&<26>(<28><>n0<6E><30><EFBFBD>QI<51><49>f<EFBFBD><66>\$<EFBFBD>At^ s<>G<07><>tf6e<1C><>y<><79>()L<>S<EFBFBD><53>P'<17><><EFBFBD><EFBFBD><EFBFBD>R'<15>fq]\"<EFBFBD>s> )<29><>`<60>H2<13>Eq9<04><>?<13>*)<29><>t'<27><>ϧ<EFBFBD>\n \r<EFBFBD>s<<3C>Pi2IN<49><13>*(=2<1B>gX<67><58><EFBFBD>.3<EFBFBD>N<EFBFBD>Y4<>B<<3C>L<EFBFBD><4C><08>i<18>̥2<CCA5><05>z=<13>0H<><48><EFBFBD>'<27><EFBFBD>u<EFBFBD>tt:<3A><><EFBFBD><03><><EFBFBD>e<EFBFBD>]`pX9<58><39>o5<6F>g<EFBFBD><67>I<EFBFBD><49>,2O4<4F><34> х<>M<EFBFBD>S<EFBFBD>(<28>a<EFBFBD><61>#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|<7C>G<>b<7F><62><EFBFBD>x<EFBFBD>^Z[<5B><><EFBFBD>G<EFBFBD><47>uTv <0C>m@V<><56>( <0B><><0E>bN<<3C><>`<60><> X<><58>1<EFBFBD>+<2B><>9J8<4A>2\r<EFBFBD>K<EFBFBD>9 <0B>h<EFBFBD> <09><><EFBFBD>`<13><><EFBFBD><EFBFBD><EFBFBD>I8䛱 S<18><><EFBFBD>t<>2<EFBFBD>+,<2C><>I<EFBFBD><49> <20><>p<EFBFBD>9 m@<40>:<0E><><EFBFBD><05>x<EFBFBD>)<29><><EFBFBD>C<11><>x<EFBFBD>3<EFBFBD><33>4P7<05><>- <0E>4<EFBFBD>r\"p3Fh<EFBFBD><EFBFBD>-5<><35>U4͉<34>\\6<EFBFBD><EFBFBD><D\$ <0C>l<EFBFBD>9<EFBFBD>R4t7<74><37>dD3<44>p<>Γk<CE93>:)\\;<3B><03><><EFBFBD><06>\r@<40>t<EFBFBD>\$4O<EFBFBD><<3C><13>!pd<1A><><EFBFBD>QJ\r<EFBFBD>H<EFBFBD>}:&<26><><EFBFBD><EFBFBD>Ȅ<EFBFBD>5YWJ<57><4A><EFBFBD><06><>`<60>N<EFBFBD><4E>bKNS<4E><53><EFBFBD>a<EFBFBD><61><EFBFBD><12> <0C>d>2W<32>ŅbDj:9[21c<31><63><EFBFBD>ȝ<EFBFBD>:X<>@<40>q<EFBFBD>#<23><>4<>L<EFBFBD>'J<12><>+DHe<48>3<EFBFBD>.<2E>O<03><><4B><CBB0><1E>pV<14><>t2<>wp; Ɠ<><17><>\r?<10>OzDq.<14><18><>-<2D>\"<EFBFBD>Z<EFBFBD><EFBFBD>c<EFBFBD>X3!/>P<>F<EFBFBD>s<EFBFBD>ɲ<EFBFBD><C9B2>0<EFBFBD>(<28><><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD><EFBFBD>T63sVQo<51><6F>SΑ<53>b<EFBFBD>߅^r\$<EFBFBD>@C<> r2)<29><><EFBFBD> <20>V<EFBFBD>)+nܷz<DCB7><1E><><EFBFBD><EFBFBD><EFBFBD>l<><6C>{<EFBFBD>K#<23><>9<EFBFBD>{<EFBFBD>ۯl<03><><1D>m<EFBFBD>Q<EFBFBD><51>h<1E>*ɗP<C997>:<3A>c<EFBFBD>]<5D>7<EFBFBD><37><EFBFBD>=<3D><>L<EFBFBD><4C><EFBFBD>i;<3B>2<07><><17><><EFBFBD><EFBFBD><\\<EFBFBD>J<EFBFBD><EFBFBD><EFBFBD>b<EFBFBD>n<EFBFBD><EFBFBD><EFBFBD><EFBFBD>n<EFBFBD>_iӴ<EFBFBD>J\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><15>C:<3A><14><>`N4<4E>̖<EFBFBD>'Aw:4}<7D>ۣ<EFBFBD>W\080<38><30>L3<4C><1D>J;<3B>i<EFBFBD>)\\<EFBFBD>=/N<>u=ZV6&cea<65><61><EFBFBD>p<EFBFBD><70>.[<5B>v<EFBFBD>tPZ<0E><>X`֔<><D694>+z<1E>'<27><>9<>.\$\$<EFBFBD><EFBFBD><EFBFBD>@\n\r<EFBFBD>]_<>ٮ<EFBFBD><D9AE>h<EFBFBD>kk<6B>Ms>`̖<>j<EFBFBD>%<25>\\9ж<><D0B6>(' <0B>j A<>>BCd\"K\$ CA<17> <0B><><1E><10>.².`<60><>.E<><EFBFBD><10>yy\0<EFBFBD>D2<1E>8t <01>6<EFBFBD><36>8 <10>FL<46><4C><EFBFBD><02><><EFBFBD><EFBFBD>B*<2A><><EFBFBD>,<2C>|\nx\\@<40><1F>@<40><03>3r <20><><02><>WKQb,%<25><17><>DBf<07>ȳD|͌<>E0/<2F>2><3E>Y!Ć'<11><1E>`<60>f<1E>mH<01><B<>B0\r*\0Gx<47> <0B>n <0C>Y4<59><34><0E><>,<2C>L<EFBFBD><4C><EFBFBD><06><><EFBFBD>%S<>,<2C>v<EFBFBD>0<EFBFBD><18> <0C>X<EFBFBD>Q<EFBFBD>1<05>HId`<60>!.<2E>V<EFBFBD> <0B>H/<10><>×<EFBFBD>H<08><>0<EFBFBD>U<02><>0™<30><C299>`<60>LI<4C>8<EFBFBD><38>k<EFBFBD><6B>2<EFBFBD>4JYN<59>&<26>8x<38><78>J<>k:AK㝡nW<12>!<04><0F><><EFBFBD><1D>I<EFBFBD>;' <0C> <0B>\":2<><32><EFBFBD>4<EFBFBD>~<7E>J<EFBFBD>8<><38><EFBFBD><EFBFBD><E19291>G<EFBFBD><47>\"M<EFBFBD>=\rZ'<27>n<EFBFBD>i9F<39><1F><><EFBFBD>r<EFBFBD><02>R<EFBFBD>t <0B>3\0<EFBFBD><EFBFBD>Ҳ<EFBFBD>2<>y<14><>B^<5E><>b'<07><>z<EFBFBD>ɲ(<28>#<23>d9It<49>&W<>jNa<4E><1B>C(<28> j<>Ė?h<10><><EFBFBD>j<EFBFBD><6A><EFBFBD><01>քZ\$0<EFBFBD><EFBFBD>ү<EFBFBD>J A_<41>\n<EFBFBD>!T<>O<EFBFBD>4<><{a<EFBFBD><EFBFBD>?<3F><>o <20><1C><>-<2D><><06><>?Hl<48>\"<EFBFBD>2<EFBFBD>y<>=<3D><12>R<><52><EFBFBD>ф<EFBFBD><D184><EFBFBD><EFBFBD>͊<>P&<26>G<EFBFBD><47><EFBFBD>4<EFBFBD><34>%()<14>\r5M<EFBFBD><EFBFBD><EFBFBD><EFBFBD>LT<EFBFBD>\0<EFBFBD><EFBFBD><EFBFBD>xBI<EFBFBD>=ltv<>2Jhv<68><76><05>~/:<3A><10>p<EFBFBD><70>:8\"д5<EFBFBD><EFBFBD><EFBFBD>0<EFBFBD>#<23>*<2A>7<EFBFBD><37><EFBFBD><14>\n<EFBFBD>q<EFBFBD>><3E><>G\$<EFBFBD><EFBFBD><02> ): <09><>\"<EFBFBD>#<23><>KfI<66>!<21>v<EFBFBD>+?{<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Qg<51><67>{<EFBFBD>R<EFBFBD>Q<EFBFBD><EFBFBD>C<><43><0F>}<7D>#<23><>iIb<49>g<EFBFBD><67><EFBFBD>X<EFBFBD><58><1B><><EFBFBD>}<7D><>`<60>}3<>%@<40><1B>{_k<EFBFBD>}0<><30><EFBFBD>ȗ<EFBFBD>p<18>!<21>a<EFBFBD><05><7<05>e <0C><><13>F<EFBFBD>?<18><15><><EFBFBD><EFBFBD>X<EFBFBD>D<EFBFBD><44><EFBFBD>, <20><>Ck<43><0E><>U<EFBFBD><55>L><3E>1<><31><EFBFBD>܇<EFBFBD><DC87><06><>p0<70>#<23>\$<EFBFBD><EFBFBD><EFBFBD>V)pY<70>s5A<35>:<04><>U<>(9<1E>5<EFBFBD><1D>,F+<2B>&<26>*{<EFBFBD><EFBFBD>-<2D><04><13><1F>:<3A><><EFBFBD><EFBFBD>:7<><37>:ʙyP<1F><><0E><><EFBFBD><EFBFBD>X<>+<2B><><EFBFBD>\n<EFBFBD>I;<3B><>\\s<EFBFBD><EFBFBD>P<EFBFBD><EFBFBD>1<EFBFBD> <0C><><EFBFBD><EFBFBD>r<EFBFBD><12>NJ<4E>AT'-<2D><><EFBFBD>k?<3F><>Y@<40><><EFBFBD><7F><EFBFBD>f<><66>b񎒔R<F18E9294>J<EFBFBD>i<EFBFBD>m<>B~<7E><><EFBFBD>K\rK<EFBFBD><EFBFBD>t<EFBFBD>4<EFBFBD><EFBFBD>;O<>Kc<4B>9% H<>5<EFBFBD><35>d<EFBFBD>3<EFBFBD><33>e8j<38>P<><50>[s<><73>9,<2C>Ę<EFBFBD>bzK<7A><4B><EFBFBD><EFBFBD>W&e<>d8<><38><EFBFBD>)<12><><EFBFBD><0E>uP<75><50><0E><>> <0B># P&<26><>P <09>pba<><1D>ͨy<CDA8><79><EFBFBD><EFBFBD>\$3}<7D><>{<EFBFBD><EFBFBD><EFBFBD>hy<EFBFBD>(<28>dW<03><><EFBFBD><EFBFBD><02><><EFBFBD>_<EFBFBD>:<3A>'A؂<41>P<EFBFBD><14>I\"<EFBFBD>!<21><>[`<60>n8<6E><38>i/@<40><><EFBFBD>P <09>f<05>Ў冩<D08E>V <09><><EFBFBD><02>s<EFBFBD>C<EFBFBD>8 <0C><><15>Ny<4E><01>h<04><>tEnAj.-<2D><>6<18><>qwJ <0C>?<3F>ù<EFBFBD>A<EFBFBD>hu <09><><EFBFBD>s<EFBFBD><73>A<><41>O7<4F><37>j<EFBFBD><6A>\n ]<5D> 0<>^<5E> <09>\nY <0C><>\$<EFBFBD>Ζ_<>\r<EFBFBD>\$<EFBFBD>u*<01><>ޡ<EFBFBD>Ex/d<>pdR<64>d<1A><>:<3A>I<EFBFBD>oD<6F><44><EFBFBD><EFBFBD>sQ<73><10>f<EFBFBD><66>I<EFBFBD><49><EFBFBD><EFBFBD><EFBFBD>8<EFBFBD>,<2C><>K<EFBFBD><10>IsM@aq\n/<2F><17><>M<>R<EFBFBD><52><EFBFBD><EFBFBD>C<1E>-a<>a<EFBFBD><61><EFBFBD>/<2F>H<>!<18>4F<34><46>I<EFBFBD><49><EFBFBD>pŔMϫ<4D><CFAB>_؇H<D887>9{<EFBFBD>.<2E>\$W<EFBFBD><EFBFBD><EFBFBD>#{<1A><>Ү<EFBFBD><05><>:<3A>S<EFBFBD><53><EFBFBD>(<28>'l<>MY<4D>:lʞ<6C>mD\$<EFBFBD>\0<EFBFBD><EFBFBD><EFBFBD>\0<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'<27>~<05><> Z@<40> <0B><><EFBFBD><EFBFBD>V<05><><04>L\"<EFBFBD>jn<6A><6E>5<EFBFBD><35>Nl<4E><6C><EFBFBD><EFBFBD><EFBFBD>K<EFBFBD>fj&<26>M <0C><1A>O<EFBFBD><4F>dbӰN<D3B0><4E><04><>O\$i)<29>N<EFBFBD> (<28><01>!P)<02>0+<2B>6HpN<70><4E><EFBFBD>F<EFBFBD><46><EFBFBD>Ж<EFBFBD><D096>?L\n<EFBFBD><EFBFBD><0E>-h<>0<EFBFBD><30>,.e<><65>\"<EFBFBD><07>6m#<23> <09><><EFBFBD>o&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>g<EFBFBD>Z<EFBFBD>@P<>k<08>_<><5F>%\\\\'<27><><EFBFBD>\0]\$(<28>5<EFBFBD>N fq<66>|<05>p<> `<60><> <<3C><>R<EFBFBD><52><EFBFBD> <20><>͸<EFBFBD><06><0E><>I\0<EFBFBD><13><><EFBFBD>L<EFBFBD>|<7C>\$<EFBFBD><12><>(<28><><EFBFBD>ŬTkQ6k<36>B@0H<30><48><EFBFBD>P<EFBFBD>\r<EFBFBD><EFBFBD><EFBFBD>#<23>u<10><>+<18><>ܲpT<70><54><5A>/<2F>\r y<02>Pp%\0^8<><38>\r<EFBFBD><EFBFBD><EFBFBD><07><19><>4<EFBFBD><34>\0<EFBFBD><EFBFBD>1<><31><EFBFBD><EFBFBD>Qn*+B8q<38><EFBFBD>F<>\0д<EFBFBD>ܱ<EFBFBD><EFBFBD><EFBFBD>\n<EFBFBD><EFBFBD><EFBFBD>.<2E><><EFBFBD><EFBFBD>H<EFBFBD><05>%<13><>3<EFBFBD><33>&P<>F<05>ф<>X<><58><EFBFBD><EFBFBD>`O <20><><EFBFBD><EFBFBD>9R <19>B<EFBFBD><42>\r <20>10<><30>콇O <20>X<EFBFBD><58>^+<2B><><EFBFBD><EFBFBD><EFBFBD>i<EFBFBD><69>ArD<72>4<><16>`<60> -<2D>.i`4<>'<06>,\$<EFBFBD>V<EFBFBD>,_ c~;Bn<<3C>1\$,]%<25>l<EFBFBD><6C>D=<3D><>\$ <0C>).1b%g<><67>z<><7A><EFBFBD>}<7D><>G2<47>1]8uP<75><50><EFBFBD>D] /z <20><><EFBFBD>g<EFBFBD>+'<27>7D\0] <0B><><EFBFBD><EFBFBD>a<EFBFBD><61> pV<0E><>L <0C><>0<>+`Xp<58><70> <20><18>d<EFBFBD>-h<>+h(<28><05><><EFBFBD><EFBFBD><EFBFBD>\n<EFBFBD><02><>f<EFBFBD><66><10>s2,<2C>2<EFBFBD>@z <20>.I``<60>*<2A><18>1l?<10><0F>R<EFBFBD><52><10>W.<2E>.c%\$<EFBFBD><EFBFBD><EFBFBD>s+4 <0B><><EFBFBD><EFBFBD>6<EFBFBD>\$Cr<EFBFBD>F)0<><30>\r<EFBFBD>1-<2D>`<60>ӌ <20>j<EFBFBD>L<EFBFBD> \r<EFBFBD>8<13><><EFBFBD>l<EFBFBD>0<><13>*.L<>Kp<4B>\r<EFBFBD><EFBFBD>\r<EFBFBD>/r<>L<0F>a8<0E>2K<32>1n<31>b<EFBFBD><62>4<EFBFBD>L<EFBFBD><4C><EFBFBD><EFBFBD>,<2C>ˬ<EFBFBD><CBAC><EFBFBD><EFBFBD>\nij<EFBFBD><EFBFBD>r<04>i#ǩ8<02>1<7F>bx<62>2<04><>\$N<EFBFBD>\re<18> <20>\r\"8<EFBFBD>'<27><12><><EFBFBD><EFBFBD><EFBFBD>\r<EFBFBD>-<2D>P<EFBFBD><50>Y<11>0<EFBFBD><30> Yb<08>S\0<EFBFBD><EFBFBD><EFBFBD>\\jK+q6V<07>h<13>1<EFBFBD>U<10>z`p<><70><EFBFBD>R<>E<EFBFBD>C<><14><>X<EFBFBD><58><EFBFBD><EFBFBD>% <0C>F 5<>F4f-<03>tP<>ID6\0NF<><46>N<EFBFBD>4<EFBFBD>_<0F>0<EFBFBD><30>\riL@<40>n<EFBFBD><6E>P<EFBFBD>^<5E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%'<27> <0C>G<><04><04><><EFBFBD><EFBFBD><EFBFBD>\\<EFBFBD>F<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>&<26>4<EFBFBD><34>I*5<07>O<EFBFBD><4F>O<EFBFBD><4F>P<04>)8<10>)<29>*L<>;<3B><>4E<34>] <0C>\$<EFBFBD><EFBFBD><EFBFBD>\0L3<>E <20>Ek<45><6B><EFBFBD><EFBFBD>It%e<>\nb<EFBFBD>(<28><>SM<53>}<7D><>7s<37><16> ۏ<>)gi<><69>F<EFBFBD><46>&<26><>-XH<58> <20><><EFBFBD><EFBFBD>B<>M5~jrPj̾-|֤<>9<EFBFBD><39><EFBFBD>p<EFBFBD><07>5<><35>;o<><6F>5<EFBFBD> <0C><><EFBFBD><EFBFBD>c\nd<EFBFBD><EFBFBD>u<EFBFBD> <09><> <0C>\rL<EFBFBD>h<EFBFBD>'\n<EFBFBD>''<27>< O\0<EFBFBD><EFBFBD>e,. <20><>\"t\r<EFBFBD>k^<5E>{_<03>_gT<05><>`\0<EFBFBD> Mk?<3F>2<>\r:Db%<15>]U<>[<5B><>1<EFBFBD><31>cu<63>[<5B><>[9]<5D><><EFBFBD>/ EV>k@<40>a\r_\"<EFBFBD>b6]<5D> E<>D <0C>Q^)ș <0C>@Ps<>ITr vT\0<EFBFBD>VR<56>W@ <20>iR<69>2/<2F>b<EFBFBD>,Xr<58> <0C> j<>^<5E><>0<EFBFBD><30><14><>k<EFBFBD><6B><EFBFBD>C<EFBFBD>l<EFBFBD><6C>fl'8E<38><45><14><>o<>W<EFBFBD><57><EFBFBD>I<EFBFBD><49>mp룶<70>/&<><7F>+<2B><><EFBFBD><EFBFBD>X<07><>k.<2E><>\\<EFBFBD>4 <0C>0d<30>r\"<EFBFBD><EFBFBD>kb\nH\$Т<EFBFBD><EFBFBD>KC<EFBFBD><EFBFBD>o<EFBFBD>Oo<EFBFBD> <0C>G%\r<EFBFBD><EFBFBD><10><>ύl<CF8D><6C><EFBFBD><EFBFBD> <12><> <20>]<5D>P7\"* hP P<>\rc<EFBFBD>_<EFBFBD>X[`<60><><EFBFBD><EFBFBD> <0C><>7<EFBFBD>:`<60><>U<EFBFBD><55>ߨ<EFBFBD>I<EFBFBD><49>w<EFBFBD>d<07><>;<3B><> <09><><17>x<07> t<17><05><>8d \0<EFBFBD> @<40>jw<6A>v<17> <20><>{<EFBFBD><EFBFBD> b<> <09>p<EFBFBD><70><EFBFBD><EFBFBD>cy<><79>\n<EFBFBD><EFBFBD>, u< <09><>\"uyE:<3A><>Z`<LF<4C><46><1E><>2<EFBFBD><32>cw<63>S<EFBFBD>d<>%uw<75><77>u<EFBFBD>߀#pqNN<1A><>N<07>\n<EFBFBD>#@<07>E<EFBFBD>#\"@|d%kwc\"*<2A>x<05> <0B><>w<EFBFBD><77>\0
lzw_decompress("v0<EFBFBD><EFBFBD>F<EFBFBD><EFBFBD><EFBFBD><EFBFBD>==<3D><>FS <09><>_6<4D><C6B3><EFBFBD>r:<3A>E<EFBFBD>CI<43><49>o:<3A>C<11><>Xc<58><63>\r<EFBFBD>؄J(:=<3D>E<EFBFBD><13><>a28<03>x<EFBFBD><78>?<0F>'<27>i<EFBFBD>SANN<02><><EFBFBD>xs<78>NB<><42>Vl0<6C><30><EFBFBD>S <09><>Ul<14>(D|҄<><D284>P<EFBFBD><50>><17>E<EFBFBD>㩶yH ch<><68>-3Eb<45><62> <20>b<EFBFBD><62>pE<70>p<EFBFBD>9.<2E><><EFBFBD><EFBFBD>~\n<EFBFBD>?Kb<4B>iw|<7C>`<60><>d.<2E>x8EN<45><4E>!<21><>2<><05>3<EFBFBD><33><EFBFBD>\r<EFBFBD><1C><>Y<EFBFBD><59><EFBFBD>y6GFmY<6D>8o7\n\r<10>0<EFBFBD><30>\0<EFBFBD>Dbc<EFBFBD>!<21>Q7Шd8<64><38><EFBFBD>~<7E><>N)<1D>Eг`<60>Ns<4E><73>`<60>S)<29>O<EFBFBD><4F> <0B><>/<2F><<0E>x<EFBFBD>9<EFBFBD>o<EFBFBD><6F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>3n<><6E>2<EFBFBD>!r<>:;<3B>+<2B>9<EFBFBD><43><C8A8><EFBFBD>\n<<3C><>`<60><><EFBFBD>b<EFBFBD>\\<EFBFBD>?<3F>`<60>4\r#`<60><<3C>Be <0C>B#<1A>N <20><>\r.D`<60><>j<EFBFBD>4<EFBFBD><34><EFBFBD>p<EFBFBD>ar<61><72> <>><3E>8<EFBFBD>\$<EFBFBD>c<EFBFBD><EFBFBD>1<EFBFBD>c<EFBFBD><EFBFBD><1D>c<EFBFBD><63><EFBFBD><04>{n7<12><><07><08>A<>N<15>RLi\r1<EFBFBD><EFBFBD><EFBFBD>!<21>(<28> j´<6A>+<2B><>62<36>X<>8+<18><05><><EFBFBD>.\r<EFBFBD><18><04><><EFBFBD>!x<><78><0E>h<EFBFBD>' <0C><><EFBFBD>6S<36>\0R<05><><EFBFBD><EFBFBD>O<EFBFBD>\n<EFBFBD><14>1(W0<57><30><EFBFBD><EFBFBD>7q<><71>:N<>E:68n+<2B><>մ5_(<28>s<EFBFBD>\r<EFBFBD><EFBFBD><EFBFBD><EFBFBD> /m<>6P<36>@<40>EQ<45><51><EFBFBD>9\n<EFBFBD>V-<2D><><EFBFBD>\"<EFBFBD>.:<3A>J<EFBFBD><4A>8we<77>q<EFBFBD><>X<EFBFBD>]<5D><>Y X<>e<EFBFBD>zW<7A><57> <20>7<EFBFBD><37>Z1<5A><31>hQf<51><66>u<EFBFBD>j<EFBFBD>4Z{p\\AU<EFBFBD>J<<3C><>k<><6B>@<40>ɍ<EFBFBD><C98D>@<14>}&<13><><EFBFBD>L7 U<>wuYh<59><68>2<EFBFBD><32>@<40>u<EFBFBD> P<>7<EFBFBD>A<EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD>3 Û<><1E>XEͅZ<CD85>]<5D>l<05>@Mplv<>)<01> <20><07>HW<48><05><>y><03>Y<59>-<2D>Y<EFBFBD><59>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><0F>hC<68>[*<2A><>F<EFBFBD><46>#~<1F>!<21>`<60>\r#0P<10><43>f<03><><EFBFBD> <0B><><EFBFBD>\\<EFBFBD><EFBFBD><0E>^<5E>%B<<3C>\\<EFBFBD>f<>ޱ<><DEB1><EFBFBD><EFBFBD><EFBFBD>&/<2F>O<EFBFBD><4F>L\\jF<EFBFBD><EFBFBD>jZ<EFBFBD>1<EFBFBD>\\:ƴ><04>N<EFBFBD><4E>XaF<61>A<EFBFBD><1B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>f<EFBFBD>h{\"s\n<EFBFBD>64<EFBFBD><EFBFBD><EFBFBD><EFBFBD><16><>?<05>8<EFBFBD>^p<15>\"<EFBFBD>ȸ\\<EFBFBD>e(<28>P<05>N<EFBFBD><4E>q[g<><67>r<EFBFBD>&<26>}Ph<50><68><EFBFBD><EFBFBD>W<EFBFBD><57>*<2A><>r_s<5F>P<EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD>\n<EFBFBD><EFBFBD><EFBFBD>om<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>#<23><0F><>.<2E>\0@<40>pdW <20> \$Һ<EFBFBD>Q۽Tl0<6C> <20><1D>HdH<64>)<29><>ۏ<> <0C>)P<03><><EFBFBD>H<EFBFBD>g<04><>U<><55><EFBFBD><EFBFBD>B<>e\r<EFBFBD>t:<3A><>\0)\"<EFBFBD>t<EFBFBD>,<2C><><18><><EFBFBD>[<5B>(D<>O\nR8!<21>Ƭ֚<C6AC><D69A>lA<6C>V<EFBFBD><10>4<03>h<EFBFBD><1E>Sq<<15><>@}<7D><><EFBFBD>gK<67>]<5D><><EFBFBD>]<5D>=90<39><30>'<27><><1D><>wA<<3C><><EFBFBD><1D>a<EFBFBD>~<7E><>W<><57><EFBFBD>D|A<><41><EFBFBD>2<0E>X<EFBFBD>U2<55><32>yŊ<><C58A>=<05>p)<29>\0P <0C>s<0F><>n<EFBFBD>3<06><>r<EFBFBD>f\0<EFBFBD>F<EFBFBD><EFBFBD><EFBFBD>v<EFBFBD><EFBFBD>G <0C><01>I@<40>%<25><><EFBFBD>+<2B><>_I`<60> <0C><><EFBFBD>\r.<2E><>N<EFBFBD><0F><>KI<4B>[<15>ʖSJ<53><05><>aUf<55>Sz<53><7A><EFBFBD>M<1F><><EFBFBD> %<25><>\"Q|9<04><>Bc<42>a<EFBFBD>q\0<EFBFBD>8<EFBFBD>#<23><a<><61>:z1Uf<15><>><3E>Z<10>l<EFBFBD><6C><01><><EFBFBD><EFBFBD>e5#U@iUG‚<47><C282>n<EFBFBD>s<><73><10>;gxL<07>pP<>?B<><42><EFBFBD>Q<EFBFBD>\\<15>b <1F><>龒Q<E9BE92>=7<>:<3A><0F>ݡQ<DDA1>\r:<3A>t<EFBFBD><74>:y(<28> <20>\n<EFBFBD>d)<29><07><>\n<EFBFBD>X;<3B><><EFBFBD><EFBFBD><11>CaA<61>\r<EFBFBD><EFBFBD><EFBFBD><EFBFBD>P<EFBFBD>GH<EFBFBD>!<21><><EFBFBD>@<40>9\n\nAl~H<><48><EFBFBD>V\ns<><73>ի<EFBFBD>Ư<EFBFBD>bBr<42><72><EFBFBD><05><><06><><1A><>3<EFBFBD>\r<EFBFBD>P<EFBFBD>% <0B>ф\r}b/<2F>Α\$<EFBFBD>5<>P<EFBFBD>C<EFBFBD>\"w<13>B_<42><5F><EFBFBD>U<>gAt<41><74><EFBFBD><EFBFBD><EFBFBD>^Q<><51>U<EFBFBD><01><>j<EFBFBD><6A><EFBFBD><EFBFBD>Bvh졄4<ECA184>)<29><> +<2B>)<<3C>j^<5E><L<><4C>4U*<2A><><EFBFBD>Bg<42><67><EFBFBD><EFBFBD><1C>*n<>ʖ<>-<2D><><EFBFBD><EFBFBD> 9 O\$<EFBFBD><EFBFBD>طzyM<EFBFBD>3<0E>\\9<EFBFBD><EFBFBD><1E>.o<><6F><EFBFBD><EFBFBD><10><>E(i<><07><> <0B><><EFBFBD>7 tߚ<74><DF9A>-&<26>\nj!\r<EFBFBD><EFBFBD>y<>y<EFBFBD>D1g<31><67><EFBFBD>]<5D><>yR<79>7\"<EFBFBD><EFBFBD><1D><13><><EFBFBD>~<10><><EFBFBD><EFBFBD>)TZ0E9M<39>YZt Xe!<21>f<EFBFBD>@<40>{Ȭyl 8<>;<3B><><EFBFBD>R{<EFBFBD><EFBFBD>8<EFBFBD>Į<>e<EFBFBD>+UL<>'<27>F<>1<EFBFBD><04><>8PE5- <09>_!<21>7<EFBFBD><37><EFBFBD>[2<>J<EFBFBD><01>;<3B>HR<48><52>ǹ<>8p痲݇@<40><>0,ծpsK0\r<01>4<EFBFBD><34>\$sJ<73><0E><>4<EFBFBD>DZ<44><5A>I<0E><>'\$cL<EFBFBD>R<EFBFBD><EFBFBD>MpY&<1E><><EFBFBD><EFBFBD>i<EFBFBD>z3G<06>zҚJ%<25><>P<>-<2D><01>[<5B>/x<><78>T<EFBFBD>{p<EFBFBD><EFBFBD>z<>C<05>v<02><05><>:<3A>V'<27>\\<EFBFBD><EFBFBD>KJa<EFBFBD><EFBFBD>M<EFBFBD>&<26><><EFBFBD>Ӿ\"<EFBFBD><EFBFBD>e<13>o^Q+h^<5E><02>iT<69><54>1<EFBFBD>OR<4F>l<EFBFBD>,5[ݘ\$<EFBFBD><EFBFBD>)<29><>N<EFBFBD>\n<EFBFBD><1A>[<02>b<EFBFBD><62><EFBFBD>|;<3B><><EFBFBD>p<70>74<37>ܔ¢<DC94><C2A2>I<EFBFBD>C<EFBFBD>\\<EFBFBD><1B>X<03><>\n%<25>h<EFBFBD>I<EFBFBD><49>4<>g<EFBFBD>P:<<3C><><EFBFBD>k<EFBFBD>1Q<31>+\\<EFBFBD><EFBFBD>^咠<>V<EFBFBD><56>C<EFBFBD><43><18>W<EFBFBD><57>`83B-9F@<40>n<17>T><3E><><EFBFBD>lj-<2D><><EFBFBD><EFBFBD>&<26><>`9q<39><71><EFBFBD><01><1E><1F><>P<EFBFBD>y6<79><36>\r.y<>&<26><02><><EFBFBD><18><>E8<45>0<EFBFBD><30><EFBFBD><1F>kA<6B><41>V<EFBFBD>T7<54>p<EFBFBD><70>x<EFBFBD>)ޡ~<7E>M<EFBFBD><4D>΁<EFBFBD>!<21>Et<13><><EFBFBD>P\\<EFBFBD><EFBFBD>ϗm~c<>B<EFBFBD>\\\n<EFBFBD>m<EFBFBD>v{<EFBFBD><EFBFBD><EFBFBD>9`G[<5B><06>~xsL<73>\\<EFBFBD>I<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Xwy\n<EFBFBD><EFBFBD><02>u<EFBFBD><75><0E><>S<EFBFBD>c<07><><03>1?A<>*<2A><03><>{ <0B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϳ<EFBFBD>|9޾/<2F><><EFBFBD><EFBFBD>E<EFBFBD><45>4<EFBFBD><34>/<2F>W<EFBFBD>[ȳ><3E><>] <0B>r<EFBFBD><1F><><EFBFBD>v<EFBFBD>~B<> PB`T<08>H>0<>B<0F><0F>)<04><>><3E>N!4\"<EFBFBD><EFBFBD><EFBFBD>xW-<2D>X)<29>0<EFBFBD>BhA0<41><30>J2P@><3E>AA)<29>S<EFBFBD><53>n<EFBFBD><6E>n<>O<EFBFBD>Q<EFBFBD><51><EFBFBD><EFBFBD><EFBFBD>b<EFBFBD>r<EFBFBD><72><EFBFBD>Ҧ<EFBFBD><D2A6><0E><><EFBFBD>h<EFBFBD><68><><C88B><EFBFBD>(<28><>\n<EFBFBD><EFBFBD>F<EFBFBD>˜<EFBFBD>ϖ<EFBFBD>ƙ<03>(<28>γ<0E><>P\0<EFBFBD>N<EFBFBD><EFBFBD>o}<01><>l<EFBFBD><<3C>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD><18><>l<EFBFBD>oq\0/Q\0of*ʑN<> <0C>P<06>\r/<14>pA<07>Y\0p\\<EFBFBD><EFBFBD>~<7E><>b<EFBFBD>Lh <20>!<06><> <09>P<EFBFBD><50>d<EFBFBD>.<2E><07>y\no\0<EFBFBD> <0C><>ж<EFBFBD>P pt<70>P<EFBFBD> ov<6F>Ђkn<6B><6E>\0z+<2B><>l6<6C><36><EFBFBD><01><><EFBFBD>0<EFBFBD><30><EFBFBD><EFBFBD>P<>oF<04>N<EFBFBD><4E>F<EFBFBD><46>Op<> <0C>N `<60> <0C><>\rog<10><> 0}P<>\n<EFBFBD><EFBFBD>@<40><><EFBFBD>15\r<EFBFBD>9\$M\r<EFBFBD>\\<EFBFBD>\ngg<> <0C><><0E><>\$Q \r<EFBFBD><0F>Dd<44><64><EFBFBD>8\$<EFBFBD><EFBFBD>k<EFBFBD>D<EFBFBD>Ԇ<05>&<26><><18><> <0B><><EFBFBD>bѬ<>갿<07><> <09>=\n0<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Pؠ~ج6e<><65><EFBFBD>2%<25>x\"p<EFBFBD>@X<><58>~ <0C><><11>?<3F> цZelf\0<EFBFBD>Z), ,^<5E>`<60>\0<EFBFBD>8&<26><04> <0F>٩<><1A> r<1A><> <05><><EFBFBD>kFJ<08><>P>V<><11>ԍp<D48D><70>8%2><3E>B m<><6D> <18>@<40><>G(<07><1A><>s\$<EFBFBD><05>d<EFBFBD>̜v<CC9C>\"<EFBFBD>p<EFBFBD>w<EFBFBD><EFBFBD>6<EFBFBD><EFBFBD>}(V <0B><4B>K<EFBFBD>L ¾<><1E><>W<EFBFBD><57> q<>\r<EFBFBD><EFBFBD><EFBFBD>̤ʀQ<1C>L%<25>P<EFBFBD>dJ<64><4A>H<04>NxK:\n<EFBFBD><EFBFBD> <20>%fn<66><6E><EFBFBD><>D<EFBFBD>M <0B> <20>[#<23>T\r<EFBFBD><EFBFBD>r<EFBFBD>.<2E>LL<04>&W/>h6 @<40>E<EFBFBD><45> <0B>LP<4C>v<EFBFBD>C<EFBFBD><43>6O:Yh^ mn6<6E>n<EFBFBD>j>7`z `N<04>\\<EFBFBD>j\rg<EFBFBD>\r<EFBFBD>i2I\$\"@<40>[`<05>hM<68>3q3d<33> <0B>\0ֵ<EFBFBD><EFBFBD>ys\$ `<60>D<EFBFBD><44>\$\0<EFBFBD>QOf1<EFBFBD>&<02>\"~0<><30> `<60> <0B> \"@ZG<>) Y:S<><53><EFBFBD>D.S<><CD88><EFBFBD>3<><33> d<><07>m<EFBFBD>U5<55><35> <0B> <04><<3C>S<EFBFBD>SZ3<> %r<><72><EFBFBD><04><>{<EFBFBD>e3Cu6<EFBFBD>o73<EFBFBD>d<EFBFBD>L\"<EFBFBD>c7<EFBFBD>LN<EFBFBD><EFBFBD>Y<EFBFBD><EFBFBD><EFBFBD>k<EFBFBD>><3E><><EFBFBD><EFBFBD>.<2E>p<EFBFBD><70>2<EFBFBD>Q<1E><><04><><04><><EFBFBD>3<EFBFBD>VذWB<57>Dt Cq#C@<40>I<EFBFBD>P<>DT_D<5F>:<3A><>Q<<3C>UF<55>=<3D>1<1B>@\$<EFBFBD><EFBFBD>6<> <c<>r<EFBFBD>f%<25><0F>,|<7C>27#w7<77>Tq<54><71>6s<36>l-1cP<63>m<EFBFBD>q<EFBFBD><71>\n@<40> <0C><>5\0P!`\\\r@<40>\"C<EFBFBD>-\0RR<EFBFBD>tFH8<EFBFBD>|N<> <0C>-<2D><>d<EFBFBD>g<><0E><>\r<EFBFBD><EFBFBD>)F<>*h<>`<60><><EFBFBD>CK4<4B>1<EFBFBD>ʍkMKCRf@w4B<04>J<><4A>2\"<EFBFBD>\r1Q4<51>2 ,\"<EFBFBD><EFBFBD>'<27><EFBFBD>x <0C><>y<05>R<EFBFBD>%RēS<18>5K<><4B>IFz #XP<58>><0F><>f<EFBFBD><18>-WX\r<EFBFBD><EFBFBD><EFBFBD><EFBFBD>pU<0E><>D<EFBFBD>t&7@<40><><EFBFBD><EFBFBD>?<3F><><1F><> <08><><EFBFBD>}O1<4F>2<EFBFBD><32>2<EFBFBD>#UK*<2A>)<29><EFBFBD>0o<><3E>]H<><04><>ƿr<C6BF><72>LGN<47><0E><><EFBFBD>W%<25><>M^<5E><>9X:<3A>ɥN<C9A5><4E><EFBFBD><EFBFBD><EFBFBD>s<EFBFBD>E<><16>@xy<78>(H<>ƙMd<4D>5<52B<32> <20><>k!>\r^J`<60>I<EFBFBD>S<EFBFBD>N<EFBFBD><4E>4'ƚ*<05>*`<60>><03><>`|<7C>0,<2C>DJ<44>Fxb<78> <0C><>4lTؕ<54>[<5B><>[<5B><>\\<EFBFBD><EFBFBD><05>Ԡ<EFBFBD>\\{<EFBFBD><EFBFBD>6\\ޖ<16> <20><>(#mJԣ,<07>`<60>I<><49>J<15>խ<EFBFBD><D5AD><EFBFBD>l<EFBFBD><0E> <20>j<EFBFBD>j֟?֣kG<6B>k<EFBFBD>T9<54><39>]3ohuJ<75><4A><EFBFBD><0F><>W<EFBFBD>\rk<EFBFBD><EFBFBD>)\0<EFBFBD>3<EFBFBD><0E>@x<><78>,<2C>-<1B> 5B<35><42><EFBFBD><EFBFBD>=<3D><>࣐#<23>gf<67><04>&<26><><03>Z`<60>#<23>o<EFBFBD> <0B>Xf<58><66>\r <20>Jh<4A><68><EFBFBD><EFBFBD><EFBFBD>5rqnz <0B><><16>s<>,6<>o<EFBFBD>tD<>y<EFBFBD><79><EFBFBD>b<EFBFBD><62>h<EFBFBD><05>Ctn<74>9n<><6E><EFBFBD>`<11>X<11>&<26>\r'tpL<70>7<12>Η<EFBFBD>&<26><><EFBFBD>l<EFBFBD>Z-<02><08>w<EFBFBD>{ r<0F><>@iUzM<7A>{r<EFBFBD>m<EFBFBD>SB<EFBFBD>\r@<40> H*BD.7<EFBFBD>(<28><12>3XCV <20><W<>у<EFBFBD>|d<08>q*@<40><>@<40><><EFBFBD>+x<><04>̼`<60><><EFBFBD>^<5E>̘߬__<5F><5F>ND<4E>X\0Q_D]}t<>Y<EFBFBD><59>p<EFBFBD>f <0C>w<EFBFBD><77>\"<EFBFBD>3
connection(){global$g;return$g;}function
adminer(){global$c;return$c;}function
idf_unescape($Lc){$kd=substr($Lc,-1);return
str_replace($kd.$kd,$kd,substr($Lc,1,-1));}function
2014-05-08 19:46:08 +02:00
escape_string($X){return
substr(q($X),1,-1);}function
2015-07-03 19:50:03 +02:00
number($X){return
preg_replace('~[^0-9]+~','',$X);}function
remove_slashes($Te,$qc=false){if(get_magic_quotes_gpc()){while(list($z,$X)=each($Te)){foreach($X
as$cd=>$W){unset($Te[$z][$cd]);if(is_array($W)){$Te[$z][stripslashes($cd)]=$W;$Te[]=&$Te[$z][stripslashes($cd)];}else$Te[$z][stripslashes($cd)]=($qc?$W:stripslashes($W));}}}}function
bracket_escape($Lc,$_a=false){static$vg=array(':'=>':1',']'=>':2','['=>':3','"'=>':4');return
strtr($Lc,($_a?array_flip($vg):$vg));}function
charset($g){return(version_compare($g->server_info,"5.5.3")>=0?"utf8mb4":"utf8");}function
h($Pf){return
str_replace("\0","&#0;",htmlspecialchars($Pf,ENT_QUOTES,'utf-8'));}function
nbsp($Pf){return(trim($Pf)!=""?h($Pf):"&nbsp;");}function
nl_br($Pf){return
str_replace("\n","<br>",$Pf);}function
checkbox($E,$Y,$Na,$gd="",$ee="",$Ra="",$hd=""){$K="<input type='checkbox' name='$E' value='".h($Y)."'".($Na?" checked":"").($hd?" aria-labelledby='$hd'":"").($ee?' onclick="'.h($ee).'"':'').">";return($gd!=""||$Ra?"<label".($Ra?" class='$Ra'":"").">$K".h($gd)."</label>":$K);}function
optionlist($ie,$xf=null,$Ng=false){$K="";foreach($ie
as$cd=>$W){$je=array($cd=>$W);if(is_array($W)){$K.='<optgroup label="'.h($cd).'">';$je=$W;}foreach($je
as$z=>$X)$K.='<option'.($Ng||is_string($z)?' value="'.h($z).'"':'').(($Ng||is_string($z)?(string)$z:$X)===$xf?' selected':'').'>'.h($X);if(is_array($W))$K.='</optgroup>';}return$K;}function
html_select($E,$ie,$Y="",$de=true,$hd=""){if($de)return"<select name='".h($E)."'".(is_string($de)?' onchange="'.h($de).'"':"").($hd?" aria-labelledby='$hd'":"").">".optionlist($ie,$Y)."</select>";$K="";foreach($ie
as$z=>$X)$K.="<label><input type='radio' name='".h($E)."' value='".h($z)."'".($z==$Y?" checked":"").">".h($X)."</label>";return$K;}function
select_input($wa,$ie,$Y="",$Ge=""){return($ie?"<select$wa><option value=''>$Ge".optionlist($ie,$Y,true)."</select>":"<input$wa size='10' value='".h($Y)."' placeholder='$Ge'>");}function
2014-05-08 19:46:08 +02:00
confirm(){return" onclick=\"return confirm('".lang(0)."');\"";}function
print_fieldset($v,$pd,$Vg=false,$ee=""){echo"<fieldset><legend><a href='#fieldset-$v' onclick=\"".h($ee)."return !toggle('fieldset-$v');\">$pd</a></legend><div id='fieldset-$v'".($Vg?"":" class='hidden'").">\n";}function
bold($Ga,$Ra=""){return($Ga?" class='active $Ra'":($Ra?" class='$Ra'":""));}function
odd($K=' class="odd"'){static$u=0;if(!$K)$u=-1;return($u++%2?$K:'');}function
js_escape($Pf){return
addcslashes($Pf,"\r\n'\\/");}function
json_row($z,$X=null){static$rc=true;if($rc)echo"{";if($z!=""){echo($rc?"":",")."\n\t\"".addcslashes($z,"\r\n\t\"\\/").'": '.($X!==null?'"'.addcslashes($X,"\r\n\"\\/").'"':'null');$rc=false;}else{echo"\n}\n";$rc=true;}}function
ini_bool($Pc){$X=ini_get($Pc);return(preg_match('~^(on|true|yes)$~i',$X)||(int)$X);}function
sid(){static$K;if($K===null)$K=(SID&&!($_COOKIE&&ini_bool("session.use_cookies")));return$K;}function
set_password($Sg,$O,$V,$G){$_SESSION["pwds"][$Sg][$O][$V]=($_COOKIE["adminer_key"]&&is_string($G)?array(encrypt_string($G,$_COOKIE["adminer_key"])):$G);}function
get_password(){$K=get_session("pwds");if(is_array($K))$K=($_COOKIE["adminer_key"]?decrypt_string($K[0],$_COOKIE["adminer_key"]):false);return$K;}function
q($Pf){global$g;return$g->quote($Pf);}function
get_vals($I,$d=0){global$g;$K=array();$J=$g->query($I);if(is_object($J)){while($L=$J->fetch_row())$K[]=$L[$d];}return$K;}function
get_key_vals($I,$h=null,$lg=0){global$g;if(!is_object($h))$h=$g;$K=array();$h->timeout=$lg;$J=$h->query($I);$h->timeout=0;if(is_object($J)){while($L=$J->fetch_row())$K[$L[0]]=$L[1];}return$K;}function
get_rows($I,$h=null,$l="<p class='error'>"){global$g;$eb=(is_object($h)?$h:$g);$K=array();$J=$eb->query($I);if(is_object($J)){while($L=$J->fetch_assoc())$K[]=$L;}elseif(!$J&&!is_object($h)&&$l&&defined("PAGE_HEADER"))echo$l.error()."\n";return$K;}function
unique_array($L,$x){foreach($x
as$w){if(preg_match("~PRIMARY|UNIQUE~",$w["type"])){$K=array();foreach($w["columns"]as$z){if(!isset($L[$z]))continue
2;$K[$z]=$L[$z];}return$K;}}}function
escape_key($z){if(preg_match('(^([\w(]+)('.str_replace("_",".*",preg_quote(idf_escape("_"))).')([ \w)]+)$)',$z,$C))return$C[1].idf_escape(idf_unescape($C[2])).$C[3];return
idf_escape($z);}function
where($Z,$n=array()){global$g,$y;$K=array();foreach((array)$Z["where"]as$z=>$X){$z=bracket_escape($z,1);$d=escape_key($z);$K[]=$d.($y=="sql"&&preg_match('~^[0-9]*\\.[0-9]*$~',$X)?" LIKE ".q(addcslashes($X,"%_\\")):($y=="mssql"?" LIKE ".q(preg_replace('~[_%[]~','[\0]',$X)):" = ".unconvert_field($n[$z],q($X))));if($y=="sql"&&preg_match('~char|text~',$n[$z]["type"])&&preg_match("~[^ -@]~",$X))$K[]="$d = ".q($X)." COLLATE ".charset($g)."_bin";}foreach((array)$Z["null"]as$z)$K[]=escape_key($z)." IS NULL";return
implode(" AND ",$K);}function
where_check($X,$n=array()){parse_str($X,$Ma);remove_slashes(array(&$Ma));return
where($Ma,$n);}function
where_link($u,$d,$Y,$fe="="){return"&where%5B$u%5D%5Bcol%5D=".urlencode($d)."&where%5B$u%5D%5Bop%5D=".urlencode(($Y!==null?$fe:"IS NULL"))."&where%5B$u%5D%5Bval%5D=".urlencode($Y);}function
convert_fields($e,$n,$N=array()){$K="";foreach($e
as$z=>$X){if($N&&!in_array(idf_escape($z),$N))continue;$ua=convert_field($n[$z]);if($ua)$K.=", $ua AS ".idf_escape($z);}return$K;}function
cookie($E,$Y,$sd=2592000){global$ba;return
header("Set-Cookie: $E=".urlencode($Y).($sd?"; expires=".gmdate("D, d M Y H:i:s",time()+$sd)." GMT":"")."; path=".preg_replace('~\\?.*~','',$_SERVER["REQUEST_URI"]).($ba?"; secure":"")."; HttpOnly; SameSite=lax",false);}function
2014-05-08 19:46:08 +02:00
restart_session(){if(!ini_bool("session.use_cookies"))session_start();}function
stop_session(){if(!ini_bool("session.use_cookies"))session_write_close();}function&get_session($z){return$_SESSION[$z][DRIVER][SERVER][$_GET["username"]];}function
set_session($z,$X){$_SESSION[$z][DRIVER][SERVER][$_GET["username"]]=$X;}function
auth_url($Sg,$O,$V,$k=null){global$Gb;preg_match('~([^?]*)\\??(.*)~',remove_from_uri(implode("|",array_keys($Gb))."|username|".($k!==null?"db|":"").session_name()),$C);return"$C[1]?".(sid()?SID."&":"").($Sg!="server"||$O!=""?urlencode($Sg)."=".urlencode($O)."&":"")."username=".urlencode($V).($k!=""?"&db=".urlencode($k):"").($C[2]?"&$C[2]":"");}function
2014-05-08 19:46:08 +02:00
is_ajax(){return($_SERVER["HTTP_X_REQUESTED_WITH"]=="XMLHttpRequest");}function
redirect($B,$D=null){if($D!==null){restart_session();$_SESSION["messages"][preg_replace('~^[^?]*~','',($B!==null?$B:$_SERVER["REQUEST_URI"]))][]=$D;}if($B!==null){if($B=="")$B=".";header("Location: $B");exit;}}function
query_redirect($I,$B,$D,$bf=true,$ec=true,$kc=false,$kg=""){global$g,$l,$c;if($ec){$Lf=microtime(true);$kc=!$g->query($I);$kg=format_time($Lf);}$Kf="";if($I)$Kf=$c->messageQuery($I,$kg);if($kc){$l=error().$Kf;return
false;}if($bf)redirect($B,$D.$Kf);return
true;}function
queries($I){global$g;static$We=array();static$Lf;if(!$Lf)$Lf=microtime(true);if($I===null)return
array(implode("\n",$We),format_time($Lf));$We[]=(preg_match('~;$~',$I)?"DELIMITER ;;\n$I;\nDELIMITER ":$I).";";return$g->query($I);}function
apply_queries($I,$S,$ac='table'){foreach($S
as$Q){if(!queries("$I ".$ac($Q)))return
2014-05-08 19:46:08 +02:00
false;}return
true;}function
queries_redirect($B,$D,$bf){list($We,$kg)=queries(null);return
query_redirect($We,$B,$D,$bf,false,!$bf,$kg);}function
format_time($Lf){return
lang(1,max(0,microtime(true)-$Lf));}function
remove_from_uri($we=""){return
substr(preg_replace("~(?<=[?&])($we".(SID?"":"|".session_name()).")=[^&]*&~",'',"$_SERVER[REQUEST_URI]&"),0,-1);}function
pagination($F,$nb){return" ".($F==$nb?$F+1:'<a href="'.h(remove_from_uri("page").($F?"&page=$F".($_GET["next"]?"&next=".urlencode($_GET["next"]):""):"")).'">'.($F+1)."</a>");}function
get_file($z,$vb=false){$oc=$_FILES[$z];if(!$oc)return
null;foreach($oc
as$z=>$X)$oc[$z]=(array)$X;$K='';foreach($oc["error"]as$z=>$l){if($l)return$l;$E=$oc["name"][$z];$sg=$oc["tmp_name"][$z];$fb=file_get_contents($vb&&preg_match('~\\.gz$~',$E)?"compress.zlib://$sg":$sg);if($vb){$Lf=substr($fb,0,3);if(function_exists("iconv")&&preg_match("~^\xFE\xFF|^\xFF\xFE~",$Lf,$hf))$fb=iconv("utf-16","utf-8",$fb);elseif($Lf=="\xEF\xBB\xBF")$fb=substr($fb,3);$K.=$fb."\n\n";}else$K.=$fb;}return$K;}function
upload_error($l){$Bd=($l==UPLOAD_ERR_INI_SIZE?ini_get("upload_max_filesize"):0);return($l?lang(2).($Bd?" ".lang(3,$Bd):""):lang(4));}function
repeat_pattern($Ee,$qd){return
str_repeat("$Ee{0,65535}",$qd/65535)."$Ee{0,".($qd%65535)."}";}function
2014-05-08 19:46:08 +02:00
is_utf8($X){return(preg_match('~~u',$X)&&!preg_match('~[\\0-\\x8\\xB\\xC\\xE-\\x1F]~',$X));}function
shorten_utf8($Pf,$qd=80,$Tf=""){if(!preg_match("(^(".repeat_pattern("[\t\r\n -\x{10FFFF}]",$qd).")($)?)u",$Pf,$C))preg_match("(^(".repeat_pattern("[\t\r\n -~]",$qd).")($)?)",$Pf,$C);return
h($C[1]).$Tf.(isset($C[2])?"":"<i>...</i>");}function
2014-05-08 19:46:08 +02:00
format_number($X){return
strtr(number_format($X,0,".",lang(5)),preg_split('~~u',lang(6),-1,PREG_SPLIT_NO_EMPTY));}function
friendly_url($X){return
preg_replace('~[^a-z0-9_]~i','-',$X);}function
hidden_fields($Te,$Mc=array()){while(list($z,$X)=each($Te)){if(!in_array($z,$Mc)){if(is_array($X)){foreach($X
as$cd=>$W)$Te[$z."[$cd]"]=$W;}else
echo'<input type="hidden" name="'.h($z).'" value="'.h($X).'">';}}}function
2014-05-08 19:46:08 +02:00
hidden_fields_get(){echo(sid()?'<input type="hidden" name="'.session_name().'" value="'.h(session_id()).'">':''),(SERVER!==null?'<input type="hidden" name="'.DRIVER.'" value="'.h(SERVER).'">':""),'<input type="hidden" name="username" value="'.h($_GET["username"]).'">';}function
table_status1($Q,$lc=false){$K=table_status($Q,$lc);return($K?$K:array("Name"=>$Q));}function
column_foreign_keys($Q){global$c;$K=array();foreach($c->foreignKeys($Q)as$o){foreach($o["source"]as$X)$K[$X][]=$o;}return$K;}function
enum_input($U,$wa,$m,$Y,$Ub=null){global$c;preg_match_all("~'((?:[^']|'')*)'~",$m["length"],$xd);$K=($Ub!==null?"<label><input type='$U'$wa value='$Ub'".((is_array($Y)?in_array($Ub,$Y):$Y===0)?" checked":"")."><i>".lang(7)."</i></label>":"");foreach($xd[1]as$u=>$X){$X=stripcslashes(str_replace("''","'",$X));$Na=(is_int($Y)?$Y==$u+1:(is_array($Y)?in_array($u+1,$Y):$Y===$X));$K.=" <label><input type='$U'$wa value='".($u+1)."'".($Na?' checked':'').'>'.h($c->editVal($X,$m)).'</label>';}return$K;}function
input($m,$Y,$r){global$g,$Bg,$c,$y;$E=h(bracket_escape($m["field"]));echo"<td class='function'>";if(is_array($Y)&&!$r){$ta=array($Y);if(version_compare(PHP_VERSION,5.4)>=0)$ta[]=JSON_PRETTY_PRINT;$Y=call_user_func_array('json_encode',$ta);$r="json";}$jf=($y=="mssql"&&$m["auto_increment"]);if($jf&&!$_POST["save"])$r=null;$zc=(isset($_GET["select"])||$jf?array("orig"=>lang(8)):array())+$c->editFunctions($m);$wa=" name='fields[$E]'";if($m["type"]=="enum")echo
nbsp($zc[""])."<td>".$c->editInput($_GET["edit"],$m,$wa,$Y);else{$rc=0;foreach($zc
as$z=>$X){if($z===""||!$X)break;$rc++;}$de=($rc?" onchange=\"var f = this.form['function[".h(js_escape(bracket_escape($m["field"])))."]']; if ($rc > f.selectedIndex) f.selectedIndex = $rc;\" onkeyup='keyupChange.call(this);'":"");$wa.=$de;$Ec=(in_array($r,$zc)||isset($zc[$r]));echo(count($zc)>1?"<select name='function[$E]' onchange='functionChange(this);'".on_help("getTarget(event).value.replace(/^SQL\$/, '')",1).">".optionlist($zc,$r===null||$Ec?$r:"")."</select>":nbsp(reset($zc))).'<td>';$Rc=$c->editInput($_GET["edit"],$m,$wa,$Y);if($Rc!="")echo$Rc;elseif(preg_match('~bool~',$m["type"]))echo"<input type='hidden'$wa value='0'>"."<input type='checkbox'".(in_array(strtolower($Y),array('1','t','true','y','yes','on'))?" checked='checked'":"")."$wa value='1'>";elseif($m["type"]=="set"){preg_match_all("~'((?:[^']|'')*)'~",$m["length"],$xd);foreach($xd[1]as$u=>$X){$X=stripcslashes(str_replace("''","'",$X));$Na=(is_int($Y)?($Y>>$u)&1:in_array($X,explode(",",$Y),true));echo" <label><input type='checkbox' name='fields[$E][$u]' value='".(1<<$u)."'".($Na?' checked':'')."$de>".h($c->editVal($X,$m)).'</label>';}}elseif(preg_match('~blob|bytea|raw|file~',$m["type"])&&ini_bool("file_uploads"))echo"<input type='file' name='fields-$E'$de>";elseif(($ig=preg_match('~text|lob~',$m["type"]))||preg_match("~\n~",$Y)){if($ig&&$y!="sqlite")$wa.=" cols='50' rows='12'";else{$M=min(12,substr_count($Y,"\n")+1);$wa.=" cols='30' rows='$M'".($M==1?" style='height: 1.2em;'":"");}echo"<textarea$wa>".h($Y).'</textarea>';}elseif($r=="json"||preg_match('~^jsonb?$~',$m["type"]))echo"<textarea$wa cols='50' rows='12' class='jush-js'>".h($Y).'</textarea>';else{$Dd=(!preg_match('~int~',$m["type"])&&preg_match('~^(\\d+)(,(\\d+))?$~',$m["length"],$C)?((preg_match("~binary~",$m["type"])?2:1)*$C[1]+($C[3]?1:0)+($C[2]&&!$m["unsigned"]?1:0)):($Bg[$m["type"]]?$Bg[$m["type"]]+($m["unsigned"]?0:1):0));if($y=='sql'&&$g->server_info>=5.6&&preg_match('~time~',$m["type"]))$Dd+=7;echo"<input".((!$Ec||$r==="")&&preg_match('~(?<!o)int~',$m["type"])&&!preg_match('~\[\]~',$m["full_type"])?" type='number'":"")." value='".h($Y)."'".($Dd?" data-maxlength='$Dd'":"").(preg_match('~char|binary~',$m["type"])&&$Dd>20?" size='40'":"")."$wa>";}}}function
process_input($m){global$c;$Lc=bracket_escape($m["field"]);$r=$_POST["function"][$Lc];$Y=$_POST["fields"][$Lc];if($m["type"]=="enum"){if($Y==-1)return
false;if($Y=="")return"NULL";return+$Y;}if($m["auto_increment"]&&$Y=="")return
null;if($r=="orig")return($m["on_update"]=="CURRENT_TIMESTAMP"?idf_escape($m["field"]):false);if($r=="NULL")return"NULL";if($m["type"]=="set")return
2015-07-03 19:50:03 +02:00
array_sum((array)$Y);if($r=="json"){$r="";$Y=json_decode($Y,true);if(!is_array($Y))return
false;return$Y;}if(preg_match('~blob|bytea|raw|file~',$m["type"])&&ini_bool("file_uploads")){$oc=get_file("fields-$Lc");if(!is_string($oc))return
2014-05-08 19:46:08 +02:00
false;return
q($oc);}return$c->processInput($m,$Y,$r);}function
fields_from_edit(){global$Fb;$K=array();foreach((array)$_POST["field_keys"]as$z=>$X){if($X!=""){$X=bracket_escape($X);$_POST["function"][$X]=$_POST["field_funs"][$z];$_POST["fields"][$X]=$_POST["field_vals"][$z];}}foreach((array)$_POST["fields"]as$z=>$X){$E=bracket_escape($z,1);$K[$E]=array("field"=>$E,"privileges"=>array("insert"=>1,"update"=>1),"null"=>1,"auto_increment"=>($z==$Fb->primary),);}return$K;}function
search_tables(){global$c,$g;$_GET["where"][0]["op"]="LIKE %%";$_GET["where"][0]["val"]=$_POST["query"];$wc=false;foreach(table_status('',true)as$Q=>$R){$E=$c->tableName($R);if(isset($R["Engine"])&&$E!=""&&(!$_POST["tables"]||in_array($Q,$_POST["tables"]))){$J=$g->query("SELECT".limit("1 FROM ".table($Q)," WHERE ".implode(" AND ",$c->selectSearchProcess(fields($Q),array())),1));if(!$J||$J->fetch_row()){if(!$wc){echo"<ul>\n";$wc=true;}echo"<li>".($J?"<a href='".h(ME."select=".urlencode($Q)."&where[0][op]=".urlencode($_GET["where"][0]["op"])."&where[0][val]=".urlencode($_GET["where"][0]["val"]))."'>$E</a>\n":"$E: <span class='error'>".error()."</span>\n");}}}echo($wc?"</ul>":"<p class='message'>".lang(9))."\n";}function
dump_headers($Kc,$Kd=false){global$c;$K=$c->dumpHeaders($Kc,$Kd);$ue=$_POST["output"];if($ue!="text")header("Content-Disposition: attachment; filename=".$c->dumpFilename($Kc).".$K".($ue!="file"&&!preg_match('~[^0-9a-z]~',$ue)?".$ue":""));session_write_close();ob_flush();flush();return$K;}function
dump_csv($L){foreach($L
as$z=>$X){if(preg_match("~[\"\n,;\t]~",$X)||$X==="")$L[$z]='"'.str_replace('"','""',$X).'"';}echo
implode(($_POST["format"]=="csv"?",":($_POST["format"]=="tsv"?"\t":";")),$L)."\r\n";}function
apply_sql_function($r,$d){return($r?($r=="unixepoch"?"DATETIME($d, '$r')":($r=="count distinct"?"COUNT(DISTINCT ":strtoupper("$r("))."$d)"):$d);}function
get_temp_dir(){$K=ini_get("upload_tmp_dir");if(!$K){if(function_exists('sys_get_temp_dir'))$K=sys_get_temp_dir();else{$pc=@tempnam("","");if(!$pc)return
false;$K=dirname($pc);unlink($pc);}}return$K;}function
password_file($i){$pc=get_temp_dir()."/adminer.key";$K=@file_get_contents($pc);if($K||!$i)return$K;$q=@fopen($pc,"w");if($q){chmod($pc,0660);$K=rand_string();fwrite($q,$K);fclose($q);}return$K;}function
2014-05-08 19:46:08 +02:00
rand_string(){return
md5(uniqid(mt_rand(),true));}function
select_value($X,$A,$m,$jg){global$c,$ba;if(is_array($X)){$K="";foreach($X
as$cd=>$W)$K.="<tr>".($X!=array_values($X)?"<th>".h($cd):"")."<td>".select_value($W,$A,$m,$jg);return"<table cellspacing='0'>$K</table>";}if(!$A)$A=$c->selectLink($X,$m);if($A===null){if(is_mail($X))$A="mailto:$X";if($Ve=is_url($X))$A=(($Ve=="http"&&$ba)||preg_match('~WebKit|Firefox~i',$_SERVER["HTTP_USER_AGENT"])?$X:"https://www.adminer.org/redirect/?url=".urlencode($X));}$K=$c->editVal($X,$m);if($K!==null){if($K==="")$K="&nbsp;";elseif(!is_utf8($K))$K="\0";elseif($jg!=""&&is_shortable($m))$K=shorten_utf8($K,max(0,+$jg));else$K=h($K);}return$c->selectVal($K,$A,$m,$X);}function
is_mail($Rb){$va='[-a-z0-9!#$%&\'*+/=?^_`{|}~]';$Eb='[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])';$Ee="$va+(\\.$va+)*@($Eb?\\.)+$Eb";return
is_string($Rb)&&preg_match("(^$Ee(,\\s*$Ee)*\$)i",$Rb);}function
is_url($Pf){$Eb='[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])';return(preg_match("~^(https?)://($Eb?\\.)+$Eb(:\\d+)?(/.*)?(\\?.*)?(#.*)?\$~i",$Pf,$C)?strtolower($C[1]):"");}function
is_shortable($m){return
preg_match('~char|text|lob|geometry|point|linestring|polygon|string|bytea~',$m["type"]);}function
count_rows($Q,$Z,$Xc,$t){global$y;$I=" FROM ".table($Q).($Z?" WHERE ".implode(" AND ",$Z):"");return($Xc&&($y=="sql"||count($t)==1)?"SELECT COUNT(DISTINCT ".implode(", ",$t).")$I":"SELECT COUNT(*)".($Xc?" FROM (SELECT 1$I$Ac) x":$I));}function
slow_query($I){global$c,$T;$k=$c->database();$lg=$c->queryTimeout();if(support("kill")&&is_object($h=connect())&&($k==""||$h->select_db($k))){$ed=$h->result(connection_id());echo'<script type="text/javascript">
2014-05-08 19:46:08 +02:00
var timeout = setTimeout(function () {
ajax(\'',js_escape(ME),'script=kill\', function () {
}, \'token=',$T,'&kill=',$ed,'\');
}, ',1000*$lg,');
2014-05-08 19:46:08 +02:00
</script>
';}else$h=null;ob_flush();flush();$K=@get_key_vals($I,$h,$lg);if($h){echo"<script type='text/javascript'>clearTimeout(timeout);</script>\n";ob_flush();flush();}return
array_keys($K);}function
get_token(){$Ze=rand(1,1e6);return($Ze^$_SESSION["token"]).":$Ze";}function
verify_token(){list($T,$Ze)=explode(":",$_POST["token"]);return($Ze^$_SESSION["token"])==$T;}function
lzw_decompress($Da){$Ab=256;$Ea=8;$Ta=array();$kf=0;$lf=0;for($u=0;$u<strlen($Da);$u++){$kf=($kf<<8)+ord($Da[$u]);$lf+=8;if($lf>=$Ea){$lf-=$Ea;$Ta[]=$kf>>$lf;$kf&=(1<<$lf)-1;$Ab++;if($Ab>>$Ea)$Ea++;}}$_b=range("\0","\xFF");$K="";foreach($Ta
as$u=>$Sa){$Qb=$_b[$Sa];if(!isset($Qb))$Qb=$Zg.$Zg[0];$K.=$Qb;if($u)$_b[]=$Zg.$Qb[0];$Zg=$Qb;}return$K;}function
on_help($Za,$Df=0){return" onmouseover='helpMouseover(this, event, ".h($Za).", $Df);' onmouseout='helpMouseout(this, event);'";}function
edit_form($b,$n,$L,$Jg){global$c,$y,$T,$l;$Yf=$c->tableName(table_status1($b,true));page_header(($Jg?lang(10):lang(11)),$l,array("select"=>array($b,$Yf)),$Yf);if($L===false)echo"<p class='error'>".lang(12)."\n";echo'<form action="" method="post" enctype="multipart/form-data" id="form">
';if(!$n)echo"<p class='error'>".lang(13)."\n";else{echo"<table cellspacing='0' onkeydown='return editingKeydown(event);'>\n";foreach($n
as$E=>$m){echo"<tr><th>".$c->fieldName($m);$wb=$_GET["set"][bracket_escape($E)];if($wb===null){$wb=$m["default"];if($m["type"]=="bit"&&preg_match("~^b'([01]*)'\$~",$wb,$hf))$wb=$hf[1];}$Y=($L!==null?($L[$E]!=""&&$y=="sql"&&preg_match("~enum|set~",$m["type"])?(is_array($L[$E])?array_sum($L[$E]):+$L[$E]):$L[$E]):(!$Jg&&$m["auto_increment"]?"":(isset($_GET["select"])?false:$wb)));if(!$_POST["save"]&&is_string($Y))$Y=$c->editVal($Y,$m);$r=($_POST["save"]?(string)$_POST["function"][$E]:($Jg&&$m["on_update"]=="CURRENT_TIMESTAMP"?"now":($Y===false?null:($Y!==null?'':'NULL'))));if(preg_match("~time~",$m["type"])&&$Y=="CURRENT_TIMESTAMP"){$Y="";$r="now";}input($m,$Y,$r);echo"\n";}if(!support("table"))echo"<tr>"."<th><input name='field_keys[]' onkeyup='keyupChange.call(this);' onchange='fieldChange(this);' value=''>"."<td class='function'>".html_select("field_funs[]",$c->editFunctions(array("null"=>isset($_GET["select"]))))."<td><input name='field_vals[]'>"."\n";echo"</table>\n";}echo"<p>\n";if($n){echo"<input type='submit' value='".lang(14)."'>\n";if(!isset($_GET["select"]))echo"<input type='submit' name='insert' value='".($Jg?lang(15)."' onclick='return !ajaxForm(this.form, \"".lang(16).'...", this)':lang(17))."' title='Ctrl+Shift+Enter'>\n";}echo($Jg?"<input type='submit' name='delete' value='".lang(18)."'".confirm().">\n":($_POST||!$n?"":"<script type='text/javascript'>focus(document.getElementById('form').getElementsByTagName('td')[1].firstChild);</script>\n"));if(isset($_GET["select"]))hidden_fields(array("check"=>(array)$_POST["check"],"clone"=>$_POST["clone"],"all"=>$_POST["all"]));echo'<input type="hidden" name="referer" value="',h(isset($_POST["referer"])?$_POST["referer"]:$_SERVER["HTTP_REFERER"]),'">
2014-05-08 19:46:08 +02:00
<input type="hidden" name="save" value="1">
<input type="hidden" name="token" value="',$T,'">
</form>
';}global$c,$g,$Gb,$Nb,$Xb,$l,$zc,$Bc,$ba,$Qc,$y,$a,$jd,$ce,$Fe,$Qf,$Fc,$T,$xg,$Bg,$Ig,$fa;if(!$_SERVER["REQUEST_URI"])$_SERVER["REQUEST_URI"]=$_SERVER["ORIG_PATH_INFO"];if(!strpos($_SERVER["REQUEST_URI"],'?')&&$_SERVER["QUERY_STRING"]!="")$_SERVER["REQUEST_URI"].="?$_SERVER[QUERY_STRING]";$ba=$_SERVER["HTTPS"]&&strcasecmp($_SERVER["HTTPS"],"off");@ini_set("session.use_trans_sid",false);session_cache_limiter("");if(!defined("SID")){session_name("adminer_sid");$xe=array(0,preg_replace('~\\?.*~','',$_SERVER["REQUEST_URI"]),"",$ba);if(version_compare(PHP_VERSION,'5.2.0')>=0)$xe[]=true;call_user_func_array('session_set_cookie_params',$xe);session_start();}remove_slashes(array(&$_GET,&$_POST,&$_COOKIE),$qc);if(get_magic_quotes_runtime())set_magic_quotes_runtime(false);@set_time_limit(0);@ini_set("zend.ze1_compatibility_mode",false);@ini_set("precision",20);$jd=array('en'=>'English','ar'=>'العربية','bg'=>'Български','bn'=>'বাংলা','bs'=>'Bosanski','ca'=>'Català','cs'=>'Čeština','da'=>'Dansk','de'=>'Deutsch','el'=>'Ελληνικά','es'=>'Español','et'=>'Eesti','fa'=>'فارسی','fi'=>'Suomi','fr'=>'Français','gl'=>'Galego','hu'=>'Magyar','id'=>'Bahasa Indonesia','it'=>'Italiano','ja'=>'日本語','ko'=>'한국어','lt'=>'Lietuvių','nl'=>'Nederlands','no'=>'Norsk','pl'=>'Polski','pt'=>'Português','pt-br'=>'Português (Brazil)','ro'=>'Limba Română','ru'=>'Русский','sk'=>'Slovenčina','sl'=>'Slovenski','sr'=>'Српски','ta'=>'த‌மிழ்','th'=>'ภาษาไทย','tr'=>'Türkçe','uk'=>'Українська','vi'=>'Tiếng Việt','zh'=>'简体中文','zh-tw'=>'繁體中文',);function
get_lang(){global$a;return$a;}function
lang($Lc,$Td=null){if(is_string($Lc)){$Ie=array_search($Lc,get_translations("en"));if($Ie!==false)$Lc=$Ie;}global$a,$xg;$wg=($xg[$Lc]?$xg[$Lc]:$Lc);if(is_array($wg)){$Ie=($Td==1?0:($a=='cs'||$a=='sk'?($Td&&$Td<5?1:2):($a=='fr'?(!$Td?0:1):($a=='pl'?($Td%10>1&&$Td%10<5&&$Td/10%10!=1?1:2):($a=='sl'?($Td%100==1?0:($Td%100==2?1:($Td%100==3||$Td%100==4?2:3))):($a=='lt'?($Td%10==1&&$Td%100!=11?0:($Td%10>1&&$Td/10%10!=1?1:2)):($a=='bs'||$a=='ru'||$a=='sr'||$a=='uk'?($Td%10==1&&$Td%100!=11?0:($Td%10>1&&$Td%10<5&&$Td/10%10!=1?1:2)):1)))))));$wg=$wg[$Ie];}$ta=func_get_args();array_shift($ta);$vc=str_replace("%d","%s",$wg);if($vc!=$wg)$ta[0]=format_number($Td);return
vsprintf($vc,$ta);}function
switch_lang(){global$a,$jd;echo"<form action='' method='post'>\n<div id='lang'>",lang(19).": ".html_select("lang",$jd,$a,"this.form.submit();")," <input type='submit' value='".lang(20)."' class='hidden'>\n","<input type='hidden' name='token' value='".get_token()."'>\n";echo"</div>\n</form>\n";}if(isset($_POST["lang"])&&verify_token()){cookie("adminer_lang",$_POST["lang"]);$_SESSION["lang"]=$_POST["lang"];$_SESSION["translations"]=array();redirect(remove_from_uri());}$a="en";if(isset($jd[$_COOKIE["adminer_lang"]])){cookie("adminer_lang",$_COOKIE["adminer_lang"]);$a=$_COOKIE["adminer_lang"];}elseif(isset($jd[$_SESSION["lang"]]))$a=$_SESSION["lang"];else{$ka=array();preg_match_all('~([-a-z]+)(;q=([0-9.]+))?~',str_replace("_","-",strtolower($_SERVER["HTTP_ACCEPT_LANGUAGE"])),$xd,PREG_SET_ORDER);foreach($xd
as$C)$ka[$C[1]]=(isset($C[3])?$C[3]:1);arsort($ka);foreach($ka
as$z=>$H){if(isset($jd[$z])){$a=$z;break;}$z=preg_replace('~-.*~','',$z);if(!isset($ka[$z])&&isset($jd[$z])){$a=$z;break;}}}$xg=$_SESSION["translations"];if($_SESSION["translations_version"]!=1747417079){$xg=array();$_SESSION["translations_version"]=1747417079;}function
get_translations($id){switch($id){case"en":$f="A9D<07>y<EFBFBD>@s:<3A>G<EFBFBD><47>(<28>ff<66><66><EFBFBD><EFBFBD><EFBFBD> <09><>:<1B>S<><53><EFBFBD>a2 \"1<>..L'<27>I<EFBFBD><49>m<EFBFBD>#<23>s,<2C>K<17><>OP#I<>@%9<><39>i4<08>o2ύ<32><CF8D><EFBFBD><EFBFBD><EFBFBD>,9<>%<02>P<EFBFBD>b2<19><06>a<EFBFBD><61>r\n2<EFBFBD>NC<>(<28>r4<72><34>1C`(<28>:Eb<45>9A<14>i:<02>&㙔<>y<EFBFBD><79>F<><46><EFBFBD>Y<><59>\r<13>\n<EFBFBD> 8Z<0E>S=\$A<19><> <0C><13>`<60>=<3D>܌<EFBFBD><DC8C><EFBFBD>0<EFBFBD>\n<EFBFBD><EFBFBD>dF<EFBFBD> <09><>n:Zΰ)<29><>Q<EFBFBD><51><EFBFBD><EFBFBD><EFBFBD><EFBFBD><0E>Ak<41><6B><EFBFBD><06>}<7D><>e<EFBFBD><65>AD<41><44><EFBFBD><EFBFBD>a<EFBFBD>į<EFBFBD><C4AF><EFBFBD><EFBFBD><EFBFBD>g9ۥ<39>+<2B>d<EFBFBD><64><EFBFBD>od;n<><6E>=:vHV<48> <09><>G2<47><32><EFBFBD>[)L<>Q<EFBFBD><51>/<2F>ӗJ<D397><4A><<3C>P<EFBFBD>0<EFBFBD>c<EFBFBD><EFBFBD>S<EFBFBD><53><EFBFBD>P#<23>7<EFBFBD>Ct<04>\r<EFBFBD><EFBFBD><EFBFBD><EFBFBD><08>\"<07>Ѐ<><D080><EFBFBD>D4<0E><><EFBFBD>9<EFBFBD>Ax^;Łr@6<>k<EFBFBD>\\<EFBFBD><EFBFBD><EFBFBD>|/ <0C><>4<EFBFBD><34>xDЎL<D08E><4C> <0B><>z5<7A>A<EFBFBD><41><EFBFBD>\"<EFBFBD>+`<05>|<7C><>Ϙ<EFBFBD>7<EFBFBD>h<EFBFBD><02><><EFBFBD><EFBFBD><EFBFBD>#<23>2<EFBFBD>jk6<6B><36><12><EFBFBD><EE83BA>ʄ<EFBFBD><CA84><08>ΎA&2<><32>T<EFBFBD>:4(<28>N'O\r<EFBFBD>:6<><36><08><<3C><>HKCQ\nH!<21><>b_ \n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>l<><6C><EFBFBD>#<23>0<EFBFBD><30>h\r7 <0C>0<EFBFBD>:<3A>s<EFBFBD><73>I4<49><34><EFBFBD>2<EFBFBD>B0<42>7L<37><4C><EFBFBD>= <0C>:3<><33><EFBFBD><EFBFBD><EFBFBD><EFBFBD>c@ޏ#<23>пU<D0BF>:<3A>2)#.<2E><><EFBFBD>ZZ<5A>\n<EFBFBD>,3 <0B>㥄 ֭}cT\r<EFBFBD><EFBFBD>p9<EFBFBD>m<EFBFBD>Q/<2F>\ru4<EFBFBD>\$9<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:+^S<><53>c´z<02> <20>\n<EFBFBD>0<EFBFBD>L<EFBFBD><EFBFBD>._x<04>2<EFBFBD>t<EFBFBD>8Y@P<><b <0B><>2<EFBFBD>b.^<5E>k<EFBFBD><6B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\r<EFBFBD>0<EFBFBD>6F)@<40> <20>Ȩ7<C8A8>P<EFBFBD><50><<3C>k<EFBFBD><6B>g@<40>5Q <0C>\0<EFBFBD>x<><78><EFBFBD>r~<7E><>u<с9<D181>kbg(@Ǟy<><79>\rhZ&p<> :F<>E<EFBFBD>n<><6E>/c<>V4<56>\"<18>)̸<>5<EFBFBD><35>t<EFBFBD>g<EFBFBD><67>:H<><48>חf<14><0F><>:<3A>Q1@<40><><EFBFBD><EFBFBD>\r(ɡ<><C9A1>Ĺ<EFBFBD>i[<5B>ܔ%O<><4F>8@<40>4Ŏjk<6A>C<EFBFBD>TAD<>4QE<><45>\\2i<EFBFBD><EFBFBD>i\r<EFBFBD><EFBFBD>t9<EFBFBD><EFBFBD><EFBFBD><EFBFBD>!H<>0<EFBFBD>\$IRb<EFBFBD> <0B><><EFBFBD><EFBFBD>*l<>-<2D>,n[(úPL<50>) 6Gp<47><70>c<EFBFBD>*<2A><>ʈ@<40><>2% <0B> <0B><><EFBFBD><EFBFBD><EFBFBD>N<><4E>!Ք<><D594><02><>(q}<7D>l<EFBFBD>\n\0RH<EFBFBD> \"mD<EFBFBD><EFBFBD><12><><EFBFBD><EFBFBD>k<EFBFBD>x<EFBFBD><78>U<EFBFBD>bTK q0i<30><69><EFBFBD>'Wܪɛ<DCAA>\$<EFBFBD> 2<><E29EB3><EFBFBD>~<7E>]4<>B<EFBFBD><42>@<40><>@<40>b<>HJYM/<2F><>mM<><4D> <0C> <0C>`<60>S<EFBFBD><53>B뤏%<25>jO<6A><4F><EFBFBD>%\rI<EFBFBD>˜T^<5E><19>\"j<EFBFBD><EFBFBD><EFBFBD>F`ϵ:<3A><>O b<13>5<EFBFBD><35><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>^<5E>w *<2A>ƒ<EFBFBD>J<EFBFBD>M<EFBFBD><4D><>D<EFBFBD>ΗWA7 FL<46><4C>`<60><><11>,K)<29>ó<EFBFBD>A<EFBFBD><41>2V%<25>2<EFBFBD><32><EFBFBD><EFBFBD><0F>\n5<EFBFBD><EFBFBD>4! <20><13>\0U\n <20>@<40><02><> <08>&Y<<3C>Ԋ<EFBFBD>8a<38>\0<EFBFBD>8<EFBFBD>\0<<3C>amJ<02><><EFBFBD><EFBFBD>d<EFBFBD><14><><EFBFBD>TG%<25><>(<28><> E`<60>/<2F><e<><65><EFBFBD><EFBFBD><EFBFBD>P<EFBFBD><50>9<EFBFBD>1f<31><66>D0<44>`<60>ӣ?L<>30f<<3C><17><><EFBFBD>h1|<06><10><>AX<41><58><EFBFBD><EFBFBD>vB<76>q<0E>lEb:W)<29>[<5B>;<1D>l<0E>B<EFBFBD>0a<30>3<EFBFBD><33><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>qE\0<EFBFBD><EFBFBD>*HP%\0<EFBFBD><EFBFBD>Z<1D><><EFBFBD><EFBFBD>\$<EFBFBD><EFBFBD>R<EFBFBD><EFBFBD>x<13>0|<7C><>O<EFBFBD>i<EFBFBD>Π<EFBFBD><CEA0>6 I<>-\r<EFBFBD><EFBFBD><EFBFBD><14><>B<EFBFBD>iO\0(*\"<EFBFBD>k\nz<EFBFBD>Okе<EFBFBD><EFBFBD>𣂙K:<3A>Ԅ<>K<EFBFBD><4B>&<26>2G !M B<>;<3B>)<29><16>*B<7F><42>8<EFBFBD>a<EFBFBD>;<3B>@<40><> y<08><><EFBFBD>OVb<56>N<EFBFBD>E1<45><31><EFBFBD>0f.<2E><12>I<EFBFBD><49>P <20>0<EFBFBD>!<21>~<7E>D<EFBFBD><44><EFBFBD>2<EFBFBD><32>^<5E><><08><><EFBFBD><EFBFBD>֕^Or<4F>\0<EFBFBD>X<><1D>Q!<21><>d(<28>6<EFBFBD>NCO\$!<%<25>6<EFBFBD>c<EFBFBD>*<2A><><EFBFBD><04>R<EFBFBD><52>r<>Y# _-e<>Fu3h:<3A>mJa<4A>V\"<EFBFBD>S<EFBFBD>3ImXK<05>F<EFBFBD>Yj<59><6A><EFBFBD>%<25><><EFBFBD><EFBFBD><EFBFBD>R#Ό\nm<EFBFBD>V%9<11>Q <09><1C><76>u<EFBFBD><75><EFBFBD><<3C><01><>\0<EFBFBD><EFBFBD>C<11>?<3F><><EFBFBD>Q5g{<18><>\r<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>aSI<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>XB<EFBFBD>vBA<EFBFBD>,<2C><>!<21>C<EFBFBD>]<5D><>1-<2D>%A<><41><08><>,<2C>Lt<4C>`<60>O<><4F>J#<23><>m`<60><>?0<><10>g\0<EFBFBD>aJ<EFBFBD><EFBFBD><EFBFBD>v<18>-*k<>5.<2E>198<39>8d<38><64>I<EFBFBD>MqF3<46>k<EFBFBD>p<EFBFBD>sE*<2A>\n<EFBFBD>F*<2A>S*<2A><>ڕaٕ<61>ƍ=<3D>˒<EFBFBD>ĸ<EFBFBD>6YN<59>Wi<>><3E>F<EFBFBD>9U<39><55><EFBFBD>58\0<EFBFBD>J<EFBFBD>yP<EFBFBD><EFBFBD>kJ\\뭠R[<5B>a<EFBFBD><61><14><><EFBFBD>61|ϛЗD2,<2C><>sϘ?E<>M<EFBFBD><4D><EFBFBD>}<7D><><EFBFBD>81Y<31><59> [Z`<60><>a<EFBFBD>8P<04>*<2A><>4Tp&ZY<5A><59><EFBFBD> hC5<43><35><15><><EFBFBD><EFBFBD>!<21><><EFBFBD>-<2D>:<3A><>yYơUz0<7A><30>]o<>t&;<3B><>j<EFBFBD><6A><EFBFBD><EFBFBD>j<EFBFBD>FyK<79>T攪<54><E694AA>\$8<>2FY<14>C<EFBFBD>P<05><><EFBFBD><EFBFBD>i<>O<EFBFBD><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>&<26><><EFBFBD><EFBFBD>D !Z?E<><45>v<EFBFBD><76>=<1A>V<EFBFBD>j<EFBFBD><6A>**A<>liL<18><><EFBFBD>e<EFBFBD><65><EFBFBD>J<><4A>u<><75><EFBFBD>Mz<4D>Yg<59><67>L<EFBFBD>^<5E><>{F<><46><EFBFBD><EFBFBD><18>k<EFBFBD><Kg<>Ƶ<>C<EFBFBD>k#V<><56><EFBFBD>ZW%<14>:<3A>^5[<5B>.x<>P<EFBFBD><50><EFBFBD><EFBFBD>k8ͧ<38><1C><><1C>dJL<4A><4C><06>Pq<50>֞<EF8BA6>=r.<11>:WD Z<><5A>T<EFBFBD><54>ϕ<EFBFBD><1A><>Bs<42>r<03>X[<5B>H!<21>c\"<1B>pdN<13><><10><><EFBFBD>\r8T<EFBFBD>5_<EFBFBD>t}g<12><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Un<55>Ѻ<EFBFBD>,<2C><>H<EFBFBD><48>V18<31><38>~?<3F>P<EFBFBD><50>~Ll<0F>u<EFBFBD><75>{S<><53>y`<60><><D7AA><08><>OQ<4F>a3<><08><1D><><EFBFBD>l<EFBFBD><6C>tj<10>I<EFBFBD><49><EFBFBD><E4B89E><EFBFBD><E5B9A9>~<7E>Ѥx<D1A4>X<EFBFBD><58>FK<46>m ~”<><C294><EFBFBD>g'<27>S\r<EFBFBD>p<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <0B>a<EFBFBD>n<>}O<><4F>v<EFBFBD>Z<EFBFBD><5A>Xce<63><65>5<EFBFBD>2G<32>\r<EFBFBD>͘<EFBFBD><EFBFBD>33<EFBFBD><EFBFBD>P<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\r&L<>@<40> A<><41>5<EFBFBD>@3<><33>><3E>MB%<25><02>O<EFBFBD><4F><EFBFBD><EFBFBD>Ɛ~o*|Bp3@<40><><EFBFBD>߉z<DF89><7A>ʊϖ<CA8A>C<EFBFBD>6<EFBFBD><36><EFBFBD><EFBFBD>h.⚫<><E29AAB>3<0F>\r/<2F>o#@<40>F@C<>4<EFBFBD><34>**\$s<><E69891>E<>R\" \"Nlb<6C><62>Ƅ<>V<EFBFBD><56><EFBFBD> p.l<1C><EFBFBD><08>9<08>~<7E>K<EFBFBD><4B>P<EFBFBD><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><1A>Щ\0<EFBFBD>v<EFBFBD>cȣ<EFBFBD>`\nf_<><5F>2<EFBFBD><02><><EFBFBD>c\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>8bC<EFBFBD><EFBFBD>i<EFBFBD>\0<EFBFBD><EFBFBD><EFBFBD><EFBFBD>/j}P<>`<60><>\0<EFBFBD> #N<><4E>\n<EFBFBD><EFBFBD>2%<25>m <0B>vOB<4F>1e<><65><EFBFBD><EFBFBD>s<EFBFBD><1A>f<>#N <09><>y<EFBFBD><79>X<EFBFBD><EFBFBD><12><1A>\0<EFBFBD>><3E><04>F6\"<EFBFBD>-J<>2<EFBFBD><1A>@<40><05>*\$<EFBFBD><EFBFBD><EFBFBD>b<EFBFBD><EFBFBD><EFBFBD>[<15><><EFBFBD> <0C>Ƒd<05>";break;case"ar":$f="<EFBFBD>C<EFBFBD>P<EFBFBD><><C28D>l*<2A>\r<EFBFBD>,&\n<EFBFBD>A<EFBFBD><15><><EFBFBD>(J.<19><>0Se\\<EFBFBD>\r<EFBFBD><EFBFBD>b<>@<40>0<>,\nQ,l)<29><><EFBFBD>µ<EFBFBD><C2B5><EFBFBD>A<14><>j_1<5F>C<EFBFBD>M<EFBFBD><4D>e <0B><>S<>\ng@<40>Og<4F><67><EFBFBD><EFBFBD>X<EFBFBD>DM<44>)<29><>0<18><>cA<63><41>n8<1C>e*y#au4<75><34> <20>Ir*;rS<72>U<>dJ }<7D><><EFBFBD>*z<>U<12>@<40><>X;ai1l(n<><1B><><EFBFBD><EFBFBD><EFBFBD>[<14>y<EFBFBD>d<EFBFBD>u 'c(<28><>oF<><46><EFBFBD><EFBFBD>e3<65>Nb<03><><EFBFBD>p2N<>S<EFBFBD><53>ӳ:LZ<4C>z<EFBFBD>P<EFBFBD>\\b<EFBFBD><EFBFBD>u<EFBFBD>.<2E>[<5B>Q`u !<15>)<29><>&<26><<3C>q)<29><> <20><>F>ء<>Ps7X<37>5g5<67>K<EFBFBD>K<EFBFBD>¦<EFBFBD><C2A6><EFBFBD><EFBFBD><EFBFBD><30>f<EFBFBD><66><EFBFBD><EFBFBD><08>l;<02>>+<2B>2<EFBFBD>*<2A>s<EFBFBD><73><EFBFBD><EFBFBD><1A>U#<23><13>l<14>bhU<68><55>Ҫ<EFBFBD> j&<26><>ʃ\\(,ĺ_\r2<0F> ?<3F><>X<EFBFBD>EH<45>x<EFBFBD>ƈjN<6A><4E>0<EFBFBD> <20><>eJT*<2A><><10>B<EFBFBD>sޜ:<3A><><EFBFBD><EFBFBD>E<EFBFBD><45>'+R<><08><>ҳ<EFBFBD><03>1Px0<78>#<23><>3<07><10>:<0E><><EFBFBD><05>x<EFBFBD>9<EFBFBD><39><08>6<EFBFBD>c(<28>\r<EFBFBD><EFBFBD><EFBFBD><17><>u\0<7cp<63>4<EFBFBD><34>D<> 3<><33>:M\"<EFBFBD><EFBFBD>0<EFBFBD><EFBFBD>XD #h<>׍<EFBFBD><08><05>|<7C><>t<EFBFBD>z7<7A><37><EFBFBD>l9<6C><39><EFBFBD><EFBFBD>&\r<><DA9E>&<26>mB?%2mi[W 2NA<4E><41>C<EFBFBD><43>?N<><04>W嵑12<31><32><EFBFBD>Kɣ<4B><C9A3><16><>n<EFBFBD>A-S\\<EFBFBD><08>|<7C>+e|<12><><65><CD9E>ιg<>W\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><<3C><08>8<EFBFBD>:<3A><><EFBFBD>@; #`<60>2<EFBFBD><32>j<EFBFBD>]<5D><>\\^<5E><>6zp<7A><70><EFBFBD>U<EFBFBD><55>kR<<3C><>J<EFBFBD>#%Y<><59>\\<EFBFBD><10><>Y=<3D><>l<16><>ilEe-<2D>Z<EFBFBD><5A>P<EFBFBD>~\r<EFBFBD>c<EFBFBD>Ҏc(<28><><EFBFBD>dRU<><15><><EFBFBD><EFBFBD>]vRl<><6C>4x<34>WJ<04><><EFBFBD>1|<7C>!<21>io<69>1lk<6C>Ȧָ<>lE<6C><16><><EFBFBD>6<EFBFBD>\$<EFBFBD>Rl<EFBFBD><EFBFBD>!<21><><EFBFBD><78><C999><EFBFBD><EFBFBD>;\rl<EFBFBD><EFBFBD>I<EFBFBD><EFBFBD><EFBFBD>m<EFBFBD>lV<EFBFBD>!ʛV<CA9B>^n<>%<25>sC<><43>3<>ҍ<>0<EFBFBD>6O,+<2B>,<2C>n<EFBFBD>[<1F><>P<EFBFBD>7<EFBFBD>m(<<3C><03> :<3A>cd9<64><39><EFBFBD>@6\r<EFBFBD>;<3B>9<EFBFBD><39><EFBFBD><EFBFBD><EFBFBD> #8<><38><EFBFBD>%<25>Op<>݅<03>R<EFBFBD><52><EFBFBD>idb<><62># <20><><EFBFBD><EFBFBD>[2<>ZG<>jp<6A>o<EFBFBD><6B>\r<EFBFBD><EFBFBD><EFBFBD><EFBFBD>}<7D>\$ Ѩ<>*s,J <0C><>+%d<>cK<63>l{<EFBFBD>t<EFBFBD><17>BU<42>8.H<>l®!<21>:<3A>%<25>\r<EFBFBD> b<><62><EFBFBD><EFBFBD><EFBFBD>.Iq/0<>C<><43>F<>0<><30>UHe<01>4<EFBFBD>`<60><>eL<65><4C>5<EFBFBD><35>ޜS<DE9C>wN<77><4E><<3C><><EFBFBD><EFBFBD><EFBFBD>\n<EFBFBD>P<EFBFBD>D<><44>pTr<54>JH6)E,<2C>ҜSʁQ*G<><47><EFBFBD>B<EFBFBD>UO 0<><30>J<EFBFBD>MJzuA<75>O+2<>D <0C>)?ii<13><><EFBFBD><02><>L)<29><><EFBFBD><EFBFBD>B<EFBFBD>+<2B><>U\$<EFBFBD><EFBFBD><EFBFBD><EFBFBD>V<EFBFBD>P:!A<>4<07>D<EFBFBD>ك!<21><><EFBFBD>h<>V<EFBFBD><56>E)<29>-<2D><><EFBFBD>8`Μ<>\$<EFBFBD><10>aRLת<4C>0<EFBFBD><04><>u\"<EFBFBD>Jd<18><>R<EFBFBD>|<7C>Z<16><0F>=<15><>u <j<><EFBFBD><EA9099>4L<> <0C><>T<EFBFBD>u<EFBFBD><75>r<>7<EFBFBD><37>&`<60><><EFBFBD> <0C><>7<EFBFBD><37>@a<>d<EFBFBD>f<EFBFBD>@<40>\0<EFBFBD><EFBFBD>a<>7<EFBFBD><37>8<<10>(j<>Jϲ\0<EFBFBD>¡ \"-E<><45>Bc-<10>3\\<05> .҈A <09>|3<>E+<2B><>x<EFBFBD>c<EFBFBD><58>\$
2014-05-08 19:46:08 +02:00
Min_PDO
extends
PDO{var$_result,$server_info,$affected_rows,$errno,$error;function
__construct(){global$c;$Ie=array_search("SQL",$c->operators);if($Ie!==false)unset($c->operators[$Ie]);}function
dsn($Kb,$V,$G){try{parent::__construct($Kb,$V,$G);}catch(Exception$cc){auth_error(h($cc->getMessage()));}$this->setAttribute(13,array('Min_PDOStatement'));$this->server_info=@$this->getAttribute(4);}function
query($I,$Cg=false){$J=parent::query($I);$this->error="";if(!$J){list(,$this->errno,$this->error)=$this->errorInfo();return
false;}$this->store_result($J);return$J;}function
multi_query($I){return$this->_result=$this->query($I);}function
store_result($J=null){if(!$J){$J=$this->_result;if(!$J)return
false;}if($J->columnCount()){$J->num_rows=$J->rowCount();return$J;}$this->affected_rows=$J->rowCount();return
2014-05-08 19:46:08 +02:00
true;}function
next_result(){if(!$this->_result)return
false;$this->_result->_offset=0;return@$this->_result->nextRowset();}function
result($I,$m=0){$J=$this->query($I);if(!$J)return
false;$L=$J->fetch();return$L[$m];}}class
2014-05-08 19:46:08 +02:00
Min_PDOStatement
extends
PDOStatement{var$_offset=0,$num_rows;function
fetch_assoc(){return$this->fetch(2);}function
fetch_row(){return$this->fetch(3);}function
fetch_field(){$L=(object)$this->getColumnMeta($this->_offset++);$L->orgtable=$L->table;$L->orgname=$L->name;$L->charsetnr=(in_array("blob",(array)$L->flags)?63:0);return$L;}}}$Gb=array();class
2014-05-08 19:46:08 +02:00
Min_SQL{var$_conn;function
__construct($g){$this->_conn=$g;}function
select($Q,$N,$Z,$t,$ke=array(),$_=1,$F=0,$Pe=false){global$c,$y;$Xc=(count($t)<count($N));$I=$c->selectQueryBuild($N,$Z,$t,$ke,$_,$F);if(!$I)$I="SELECT".limit(($_GET["page"]!="last"&&+$_&&$t&&$Xc&&$y=="sql"?"SQL_CALC_FOUND_ROWS ":"").implode(", ",$N)."\nFROM ".table($Q),($Z?"\nWHERE ".implode(" AND ",$Z):"").($t&&$Xc?"\nGROUP BY ".implode(", ",$t):"").($ke?"\nORDER BY ".implode(", ",$ke):""),($_!=""?+$_:null),($F?$_*$F:0),"\n");$Lf=microtime(true);$K=$this->_conn->query($I);if($Pe)echo$c->selectQuery($I,format_time($Lf));return$K;}function
delete($Q,$Xe,$_=0){$I="FROM ".table($Q);return
queries("DELETE".($_?limit1($I,$Xe):" $I$Xe"));}function
update($Q,$P,$Xe,$_=0,$zf="\n"){$Qg=array();foreach($P
as$z=>$X)$Qg[]="$z = $X";$I=table($Q)." SET$zf".implode(",$zf",$Qg);return
queries("UPDATE".($_?limit1($I,$Xe):" $I$Xe"));}function
insert($Q,$P){return
queries("INSERT INTO ".table($Q).($P?" (".implode(", ",array_keys($P)).")\nVALUES (".implode(", ",$P).")":" DEFAULT VALUES"));}function
insertUpdate($Q,$M,$Oe){return
2014-05-08 19:46:08 +02:00
false;}function
begin(){return
queries("BEGIN");}function
commit(){return
queries("COMMIT");}function
rollback(){return
queries("ROLLBACK");}}$Gb=array("server"=>"MySQL")+$Gb;if(!defined("DRIVER")){$Le=array("MySQLi","MySQL","PDO_MySQL");define("DRIVER","server");if(extension_loaded("mysqli")){class
2014-05-08 19:46:08 +02:00
Min_DB
extends
MySQLi{var$extension="MySQLi";function
__construct(){parent::init();}function
connect($O="",$V="",$G="",$rb=null,$He=null,$Hf=null){mysqli_report(MYSQLI_REPORT_OFF);list($Ic,$He)=explode(":",$O,2);$K=@$this->real_connect(($O!=""?$Ic:ini_get("mysqli.default_host")),($O.$V!=""?$V:ini_get("mysqli.default_user")),($O.$V.$G!=""?$G:ini_get("mysqli.default_pw")),$rb,(is_numeric($He)?$He:ini_get("mysqli.default_port")),(!is_numeric($He)?$He:$Hf));return$K;}function
set_charset($La){if(parent::set_charset($La))return
true;parent::set_charset('utf8');return$this->query("SET NAMES $La");}function
result($I,$m=0){$J=$this->query($I);if(!$J)return
false;$L=$J->fetch_array();return$L[$m];}function
quote($Pf){return"'".$this->escape_string($Pf)."'";}}}elseif(extension_loaded("mysql")&&!(ini_get("sql.safe_mode")&&extension_loaded("pdo_mysql"))){class
2014-05-08 19:46:08 +02:00
Min_DB{var$extension="MySQL",$server_info,$affected_rows,$errno,$error,$_link,$_result;function
connect($O,$V,$G){$this->_link=@mysql_connect(($O!=""?$O:ini_get("mysql.default_host")),("$O$V"!=""?$V:ini_get("mysql.default_user")),("$O$V$G"!=""?$G:ini_get("mysql.default_password")),true,131072);if($this->_link)$this->server_info=mysql_get_server_info($this->_link);else$this->error=mysql_error();return(bool)$this->_link;}function
set_charset($La){if(function_exists('mysql_set_charset')){if(mysql_set_charset($La,$this->_link))return
true;mysql_set_charset('utf8',$this->_link);}return$this->query("SET NAMES $La");}function
quote($Pf){return"'".mysql_real_escape_string($Pf,$this->_link)."'";}function
select_db($rb){return
mysql_select_db($rb,$this->_link);}function
query($I,$Cg=false){$J=@($Cg?mysql_unbuffered_query($I,$this->_link):mysql_query($I,$this->_link));$this->error="";if(!$J){$this->errno=mysql_errno($this->_link);$this->error=mysql_error($this->_link);return
false;}if($J===true){$this->affected_rows=mysql_affected_rows($this->_link);$this->info=mysql_info($this->_link);return
2014-05-08 19:46:08 +02:00
true;}return
new
Min_Result($J);}function
multi_query($I){return$this->_result=$this->query($I);}function
2014-05-08 19:46:08 +02:00
store_result(){return$this->_result;}function
next_result(){return
false;}function
result($I,$m=0){$J=$this->query($I);if(!$J||!$J->num_rows)return
2014-05-08 19:46:08 +02:00
false;return
mysql_result($J->_result,0,$m);}}class
2014-05-08 19:46:08 +02:00
Min_Result{var$num_rows,$_result,$_offset=0;function
__construct($J){$this->_result=$J;$this->num_rows=mysql_num_rows($J);}function
2014-05-08 19:46:08 +02:00
fetch_assoc(){return
mysql_fetch_assoc($this->_result);}function
fetch_row(){return
mysql_fetch_row($this->_result);}function
fetch_field(){$K=mysql_fetch_field($this->_result,$this->_offset++);$K->orgtable=$K->table;$K->orgname=$K->name;$K->charsetnr=($K->blob?63:0);return$K;}function
2014-05-08 19:46:08 +02:00
__destruct(){mysql_free_result($this->_result);}}}elseif(extension_loaded("pdo_mysql")){class
Min_DB
extends
Min_PDO{var$extension="PDO_MySQL";function
connect($O,$V,$G){$this->dsn("mysql:charset=utf8;host=".str_replace(":",";unix_socket=",preg_replace('~:(\\d)~',';port=\\1',$O)),$V,$G);return
2014-05-08 19:46:08 +02:00
true;}function
set_charset($La){$this->query("SET NAMES $La");}function
select_db($rb){return$this->query("USE ".idf_escape($rb));}function
query($I,$Cg=false){$this->setAttribute(1000,!$Cg);return
parent::query($I,$Cg);}}}class
2014-05-08 19:46:08 +02:00
Min_Driver
extends
Min_SQL{function
insert($Q,$P){return($P?parent::insert($Q,$P):queries("INSERT INTO ".table($Q)." ()\nVALUES ()"));}function
insertUpdate($Q,$M,$Oe){$e=array_keys(reset($M));$Me="INSERT INTO ".table($Q)." (".implode(", ",$e).") VALUES\n";$Qg=array();foreach($e
as$z)$Qg[$z]="$z = VALUES($z)";$Tf="\nON DUPLICATE KEY UPDATE ".implode(", ",$Qg);$Qg=array();$qd=0;foreach($M
as$P){$Y="(".implode(", ",$P).")";if($Qg&&(strlen($Me)+$qd+strlen($Y)+strlen($Tf)>1e6)){if(!queries($Me.implode(",\n",$Qg).$Tf))return
false;$Qg=array();$qd=0;}$Qg[]=$Y;$qd+=strlen($Y)+2;}return
queries($Me.implode(",\n",$Qg).$Tf);}}function
idf_escape($Lc){return"`".str_replace("`","``",$Lc)."`";}function
table($Lc){return
idf_escape($Lc);}function
connect(){global$c,$Bg,$Qf;$g=new
Min_DB;$mb=$c->credentials();if($g->connect($mb[0],$mb[1],$mb[2])){$g->set_charset(charset($g));$g->query("SET sql_quote_show_create = 1, autocommit = 1");if(version_compare($g->server_info,'5.7.8')>=0){$Qf[lang(21)][]="json";$Bg["json"]=4294967295;}return$g;}$K=$g->error;if(function_exists('iconv')&&!is_utf8($K)&&strlen($sf=iconv("windows-1250","utf-8",$K))>strlen($K))$K=$sf;return$K;}function
get_databases($sc){global$g;$K=get_session("dbs");if($K===null){$I=($g->server_info>=5?"SELECT SCHEMA_NAME FROM information_schema.SCHEMATA":"SHOW DATABASES");$K=($sc?slow_query($I):get_vals($I));restart_session();set_session("dbs",$K);stop_session();}return$K;}function
limit($I,$Z,$_,$Vd=0,$zf=" "){return" $I$Z".($_!==null?$zf."LIMIT $_".($Vd?" OFFSET $Vd":""):"");}function
limit1($I,$Z){return
limit($I,$Z,1);}function
db_collation($k,$Xa){global$g;$K=null;$i=$g->result("SHOW CREATE DATABASE ".idf_escape($k),1);if(preg_match('~ COLLATE ([^ ]+)~',$i,$C))$K=$C[1];elseif(preg_match('~ CHARACTER SET ([^ ]+)~',$i,$C))$K=$Xa[$C[1]][-1];return$K;}function
engines(){$K=array();foreach(get_rows("SHOW ENGINES")as$L){if(preg_match("~YES|DEFAULT~",$L["Support"]))$K[]=$L["Engine"];}return$K;}function
logged_user(){global$g;return$g->result("SELECT USER()");}function
tables_list(){global$g;return
get_key_vals($g->server_info>=5?"SELECT TABLE_NAME, TABLE_TYPE FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() ORDER BY TABLE_NAME":"SHOW TABLES");}function
count_tables($j){$K=array();foreach($j
as$k)$K[$k]=count(get_vals("SHOW TABLES IN ".idf_escape($k)));return$K;}function
table_status($E="",$lc=false){global$g;$K=array();foreach(get_rows($lc&&$g->server_info>=5?"SELECT TABLE_NAME AS Name, ENGINE AS Engine, TABLE_COMMENT AS Comment FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() ".($E!=""?"AND TABLE_NAME = ".q($E):"ORDER BY Name"):"SHOW TABLE STATUS".($E!=""?" LIKE ".q(addcslashes($E,"%_\\")):""))as$L){if($L["Engine"]=="InnoDB")$L["Comment"]=preg_replace('~(?:(.+); )?InnoDB free: .*~','\\1',$L["Comment"]);if(!isset($L["Engine"]))$L["Comment"]="";if($E!="")return$L;$K[$L["Name"]]=$L;}return$K;}function
2014-05-08 19:46:08 +02:00
is_view($R){return$R["Engine"]===null;}function
fk_support($R){global$g;return
preg_match('~InnoDB|IBMDB2I~i',$R["Engine"])||(preg_match('~NDB~i',$R["Engine"])&&version_compare($g->server_info,'5.6')>=0);}function
fields($Q){$K=array();foreach(get_rows("SHOW FULL COLUMNS FROM ".table($Q))as$L){preg_match('~^([^( ]+)(?:\\((.+)\\))?( unsigned)?( zerofill)?$~',$L["Type"],$C);$K[$L["Field"]]=array("field"=>$L["Field"],"full_type"=>$L["Type"],"type"=>$C[1],"length"=>$C[2],"unsigned"=>ltrim($C[3].$C[4]),"default"=>($L["Default"]!=""||preg_match("~char|set~",$C[1])?$L["Default"]:null),"null"=>($L["Null"]=="YES"),"auto_increment"=>($L["Extra"]=="auto_increment"),"on_update"=>(preg_match('~^on update (.+)~i',$L["Extra"],$C)?$C[1]:""),"collation"=>$L["Collation"],"privileges"=>array_flip(preg_split('~, *~',$L["Privileges"])),"comment"=>$L["Comment"],"primary"=>($L["Key"]=="PRI"),);}return$K;}function
indexes($Q,$h=null){$K=array();foreach(get_rows("SHOW INDEX FROM ".table($Q),$h)as$L){$E=$L["Key_name"];$K[$E]["type"]=($E=="PRIMARY"?"PRIMARY":($L["Index_type"]=="FULLTEXT"?"FULLTEXT":($L["Non_unique"]?($L["Index_type"]=="SPATIAL"?"SPATIAL":"INDEX"):"UNIQUE")));$K[$E]["columns"][]=$L["Column_name"];$K[$E]["lengths"][]=($L["Index_type"]=="SPATIAL"?null:$L["Sub_part"]);$K[$E]["descs"][]=null;}return$K;}function
foreign_keys($Q){global$g,$ce;static$Ee='`(?:[^`]|``)+`';$K=array();$kb=$g->result("SHOW CREATE TABLE ".table($Q),1);if($kb){preg_match_all("~CONSTRAINT ($Ee) FOREIGN KEY ?\\(((?:$Ee,? ?)+)\\) REFERENCES ($Ee)(?:\\.($Ee))? \\(((?:$Ee,? ?)+)\\)(?: ON DELETE ($ce))?(?: ON UPDATE ($ce))?~",$kb,$xd,PREG_SET_ORDER);foreach($xd
as$C){preg_match_all("~$Ee~",$C[2],$If);preg_match_all("~$Ee~",$C[5],$eg);$K[idf_unescape($C[1])]=array("db"=>idf_unescape($C[4]!=""?$C[3]:$C[4]),"table"=>idf_unescape($C[4]!=""?$C[4]:$C[3]),"source"=>array_map('idf_unescape',$If[0]),"target"=>array_map('idf_unescape',$eg[0]),"on_delete"=>($C[6]?$C[6]:"RESTRICT"),"on_update"=>($C[7]?$C[7]:"RESTRICT"),);}}return$K;}function
view($E){global$g;return
array("select"=>preg_replace('~^(?:[^`]|`[^`]*`)*\\s+AS\\s+~isU','',$g->result("SHOW CREATE VIEW ".table($E),1)));}function
collations(){$K=array();foreach(get_rows("SHOW COLLATION")as$L){if($L["Default"])$K[$L["Charset"]][-1]=$L["Collation"];else$K[$L["Charset"]][]=$L["Collation"];}ksort($K);foreach($K
as$z=>$X)asort($K[$z]);return$K;}function
information_schema($k){global$g;return($g->server_info>=5&&$k=="information_schema")||($g->server_info>=5.5&&$k=="performance_schema");}function
error(){global$g;return
h(preg_replace('~^You have an error.*syntax to use~U',"Syntax error",$g->error));}function
create_database($k,$Wa){return
queries("CREATE DATABASE ".idf_escape($k).($Wa?" COLLATE ".q($Wa):""));}function
drop_databases($j){$K=apply_queries("DROP DATABASE",$j,'idf_escape');restart_session();set_session("dbs",null);return$K;}function
rename_database($E,$Wa){$K=false;if(create_database($E,$Wa)){$if=array();foreach(tables_list()as$Q=>$U)$if[]=table($Q)." TO ".idf_escape($E).".".table($Q);$K=(!$if||queries("RENAME TABLE ".implode(", ",$if)));if($K)queries("DROP DATABASE ".idf_escape(DB));restart_session();set_session("dbs",null);}return$K;}function
auto_increment(){$za=" PRIMARY KEY";if($_GET["create"]!=""&&$_POST["auto_increment_col"]){foreach(indexes($_GET["create"])as$w){if(in_array($_POST["fields"][$_POST["auto_increment_col"]]["orig"],$w["columns"],true)){$za="";break;}if($w["type"]=="PRIMARY")$za=" UNIQUE";}}return" AUTO_INCREMENT$za";}function
alter_table($Q,$E,$n,$tc,$bb,$Vb,$Wa,$ya,$Ae){$sa=array();foreach($n
as$m)$sa[]=($m[1]?($Q!=""?($m[0]!=""?"CHANGE ".idf_escape($m[0]):"ADD"):" ")." ".implode($m[1]).($Q!=""?$m[2]:""):"DROP ".idf_escape($m[0]));$sa=array_merge($sa,$tc);$Mf=($bb!==null?" COMMENT=".q($bb):"").($Vb?" ENGINE=".q($Vb):"").($Wa?" COLLATE ".q($Wa):"").($ya!=""?" AUTO_INCREMENT=$ya":"");if($Q=="")return
queries("CREATE TABLE ".table($E)." (\n".implode(",\n",$sa)."\n)$Mf$Ae");if($Q!=$E)$sa[]="RENAME TO ".table($E);if($Mf)$sa[]=ltrim($Mf);return($sa||$Ae?queries("ALTER TABLE ".table($Q)."\n".implode(",\n",$sa).$Ae):true);}function
alter_indexes($Q,$sa){foreach($sa
as$z=>$X)$sa[$z]=($X[2]=="DROP"?"\nDROP INDEX ".idf_escape($X[1]):"\nADD $X[0] ".($X[0]=="PRIMARY"?"KEY ":"").($X[1]!=""?idf_escape($X[1])." ":"")."(".implode(", ",$X[2]).")");return
queries("ALTER TABLE ".table($Q).implode(",",$sa));}function
2014-05-08 19:46:08 +02:00
truncate_tables($S){return
apply_queries("TRUNCATE TABLE",$S);}function
drop_views($Ug){return
queries("DROP VIEW ".implode(", ",array_map('table',$Ug)));}function
2014-05-08 19:46:08 +02:00
drop_tables($S){return
queries("DROP TABLE ".implode(", ",array_map('table',$S)));}function
move_tables($S,$Ug,$eg){$if=array();foreach(array_merge($S,$Ug)as$Q)$if[]=table($Q)." TO ".idf_escape($eg).".".table($Q);return
queries("RENAME TABLE ".implode(", ",$if));}function
copy_tables($S,$Ug,$eg){queries("SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'");foreach($S
as$Q){$E=($eg==DB?table("copy_$Q"):idf_escape($eg).".".table($Q));if(!queries("\nDROP TABLE IF EXISTS $E")||!queries("CREATE TABLE $E LIKE ".table($Q))||!queries("INSERT INTO $E SELECT * FROM ".table($Q)))return
false;}foreach($Ug
as$Q){$E=($eg==DB?table("copy_$Q"):idf_escape($eg).".".table($Q));$Tg=view($Q);if(!queries("DROP VIEW IF EXISTS $E")||!queries("CREATE VIEW $E AS $Tg[select]"))return
2014-05-08 19:46:08 +02:00
false;}return
true;}function
trigger($E){if($E=="")return
array();$M=get_rows("SHOW TRIGGERS WHERE `Trigger` = ".q($E));return
reset($M);}function
triggers($Q){$K=array();foreach(get_rows("SHOW TRIGGERS LIKE ".q(addcslashes($Q,"%_\\")))as$L)$K[$L["Trigger"]]=array($L["Timing"],$L["Event"]);return$K;}function
2014-05-08 19:46:08 +02:00
trigger_options(){return
array("Timing"=>array("BEFORE","AFTER"),"Event"=>array("INSERT","UPDATE","DELETE"),"Type"=>array("FOR EACH ROW"),);}function
routine($E,$U){global$g,$Xb,$Qc,$Bg;$qa=array("bool","boolean","integer","double precision","real","dec","numeric","fixed","national char","national varchar");$Ag="((".implode("|",array_merge(array_keys($Bg),$qa)).")\\b(?:\\s*\\(((?:[^'\")]|$Xb)++)\\))?\\s*(zerofill\\s*)?(unsigned(?:\\s+zerofill)?)?)(?:\\s*(?:CHARSET|CHARACTER\\s+SET)\\s*['\"]?([^'\"\\s,]+)['\"]?)?";$Ee="\\s*(".($U=="FUNCTION"?"":$Qc).")?\\s*(?:`((?:[^`]|``)*)`\\s*|\\b(\\S+)\\s+)$Ag";$i=$g->result("SHOW CREATE $U ".idf_escape($E),2);preg_match("~\\(((?:$Ee\\s*,?)*)\\)\\s*".($U=="FUNCTION"?"RETURNS\\s+$Ag\\s+":"")."(.*)~is",$i,$C);$n=array();preg_match_all("~$Ee\\s*,?~is",$C[1],$xd,PREG_SET_ORDER);foreach($xd
as$we){$E=str_replace("``","`",$we[2]).$we[3];$n[]=array("field"=>$E,"type"=>strtolower($we[5]),"length"=>preg_replace_callback("~$Xb~s",'normalize_enum',$we[6]),"unsigned"=>strtolower(preg_replace('~\\s+~',' ',trim("$we[8] $we[7]"))),"null"=>1,"full_type"=>$we[4],"inout"=>strtoupper($we[1]),"collation"=>strtolower($we[9]),);}if($U!="FUNCTION")return
array("fields"=>$n,"definition"=>$C[11]);return
array("fields"=>$n,"returns"=>array("type"=>$C[12],"length"=>$C[13],"unsigned"=>$C[15],"collation"=>$C[16]),"definition"=>$C[17],"language"=>"SQL",);}function
2014-05-08 19:46:08 +02:00
routines(){return
get_rows("SELECT ROUTINE_NAME, ROUTINE_TYPE, DTD_IDENTIFIER FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = ".q(DB));}function
routine_languages(){return
array();}function
last_id(){global$g;return$g->result("SELECT LAST_INSERT_ID()");}function
explain($g,$I){return$g->query("EXPLAIN ".($g->server_info>=5.1?"PARTITIONS ":"").$I);}function
2014-05-08 19:46:08 +02:00
found_rows($R,$Z){return($Z||$R["Engine"]!="InnoDB"?null:$R["Rows"]);}function
types(){return
array();}function
schemas(){return
array();}function
get_schema(){return"";}function
set_schema($uf){return
2014-05-08 19:46:08 +02:00
true;}function
create_sql($Q,$ya){global$g;$K=$g->result("SHOW CREATE TABLE ".table($Q),1);if(!$ya)$K=preg_replace('~ AUTO_INCREMENT=\\d+~','',$K);return$K;}function
2014-05-08 19:46:08 +02:00
truncate_sql($Q){return"TRUNCATE ".table($Q);}function
use_sql($rb){return"USE ".idf_escape($rb);}function
trigger_sql($Q,$Rf){$K="";foreach(get_rows("SHOW TRIGGERS LIKE ".q(addcslashes($Q,"%_\\")),null,"-- ")as$L)$K.="\n".($Rf=='CREATE+ALTER'?"DROP TRIGGER IF EXISTS ".idf_escape($L["Trigger"]).";;\n":"")."CREATE TRIGGER ".idf_escape($L["Trigger"])." $L[Timing] $L[Event] ON ".table($L["Table"])." FOR EACH ROW\n$L[Statement];;\n";return$K;}function
2014-05-08 19:46:08 +02:00
show_variables(){return
get_key_vals("SHOW VARIABLES");}function
process_list(){return
get_rows("SHOW FULL PROCESSLIST");}function
show_status(){return
get_key_vals("SHOW STATUS");}function
replication_status($U){return
get_rows("SHOW $U STATUS");}function
convert_field($m){if(preg_match("~binary~",$m["type"]))return"HEX(".idf_escape($m["field"]).")";if($m["type"]=="bit")return"BIN(".idf_escape($m["field"])." + 0)";if(preg_match("~geometry|point|linestring|polygon~",$m["type"]))return"AsWKT(".idf_escape($m["field"]).")";}function
unconvert_field($m,$K){if(preg_match("~binary~",$m["type"]))$K="UNHEX($K)";if($m["type"]=="bit")$K="CONV($K, 2, 10) + 0";if(preg_match("~geometry|point|linestring|polygon~",$m["type"]))$K="GeomFromText($K)";return$K;}function
support($mc){global$g;return!preg_match("~scheme|sequence|type|view_trigger|materializedview".($g->server_info<5.1?"|event|partitioning".($g->server_info<5?"|routine|trigger|view":""):"")."~",$mc);}function
kill_process($X){return
queries("KILL ".number($X));}function
connection_id(){return"SELECT CONNECTION_ID()";}function
max_connections(){global$g;return$g->result("SELECT @@max_connections");}$y="sql";$Bg=array();$Qf=array();foreach(array(lang(22)=>array("tinyint"=>3,"smallint"=>5,"mediumint"=>8,"int"=>10,"bigint"=>20,"decimal"=>66,"float"=>12,"double"=>21),lang(23)=>array("date"=>10,"datetime"=>19,"timestamp"=>19,"time"=>10,"year"=>4),lang(21)=>array("char"=>255,"varchar"=>65535,"tinytext"=>255,"text"=>65535,"mediumtext"=>16777215,"longtext"=>4294967295),lang(24)=>array("enum"=>65535,"set"=>64),lang(25)=>array("bit"=>20,"binary"=>255,"varbinary"=>65535,"tinyblob"=>255,"blob"=>65535,"mediumblob"=>16777215,"longblob"=>4294967295),lang(26)=>array("geometry"=>0,"point"=>0,"linestring"=>0,"polygon"=>0,"multipoint"=>0,"multilinestring"=>0,"multipolygon"=>0,"geometrycollection"=>0),)as$z=>$X){$Bg+=$X;$Qf[$z]=array_keys($X);}$Ig=array("unsigned","zerofill","unsigned zerofill");$ge=array("=","<",">","<=",">=","!=","LIKE","LIKE %%","REGEXP","IN","IS NULL","NOT LIKE","NOT REGEXP","NOT IN","IS NOT NULL","SQL");$zc=array("char_length","date","from_unixtime","lower","round","sec_to_time","time_to_sec","upper");$Bc=array("avg","count","count distinct","group_concat","max","min","sum");$Nb=array(array("char"=>"md5/sha1/password/encrypt/uuid","binary"=>"md5/sha1","date|time"=>"now",),array("(^|[^o])int|float|double|decimal"=>"+/-","date"=>"+ interval/- interval","time"=>"addtime/subtime","char|text"=>"concat",));}define("SERVER",$_GET[DRIVER]);define("DB",$_GET["db"]);define("ME",preg_replace('~^[^?]*/([^?]*).*~','\\1',$_SERVER["REQUEST_URI"]).'?'.(sid()?SID.'&':'').(SERVER!==null?DRIVER."=".urlencode(SERVER).'&':'').(isset($_GET["username"])?"username=".urlencode($_GET["username"]).'&':'').(DB!=""?'db='.urlencode(DB).'&'.(isset($_GET["ns"])?"ns=".urlencode($_GET["ns"])."&":""):''));$fa="4.3.1";class
2014-05-08 19:46:08 +02:00
Adminer{var$operators;function
name(){return"<a href='https://www.adminer.org/' target='_blank' id='h1'>Adminer</a>";}function
2014-05-08 19:46:08 +02:00
credentials(){return
array(SERVER,$_GET["username"],get_password());}function
permanentLogin($i=false){return
password_file($i);}function
2014-05-08 19:46:08 +02:00
bruteForceKey(){return$_SERVER["REMOTE_ADDR"];}function
database(){return
DB;}function
databases($sc=true){return
get_databases($sc);}function
2014-05-08 19:46:08 +02:00
schemas(){return
schemas();}function
queryTimeout(){return
5;}function
headers(){return
true;}function
head(){return
true;}function
loginForm(){global$Gb;echo'<table cellspacing="0">
<tr><th>',lang(27);?><td><input type='hidden' name='auth[driver]' value='server'>MySQL
<tr><th><?php echo
lang(28),'<td><input name="auth[server]" value="',h(SERVER),'" title="hostname[:port]" placeholder="localhost" autocapitalize="off">
<tr><th>',lang(29),'<td><input name="auth[username]" id="username" value="',h($_GET["username"]),'" autocapitalize="off">
<tr><th>',lang(30),'<td><input type="password" name="auth[password]">
<tr><th>',lang(31),'<td><input name="auth[db]" value="',h($_GET["db"]),'" autocapitalize="off">
2014-05-08 19:46:08 +02:00
</table>
<script type="text/javascript">
focus(document.getElementById(\'username\'));
2014-05-08 19:46:08 +02:00
</script>
',"<p><input type='submit' value='".lang(32)."'>\n",checkbox("auth[permanent]",1,$_COOKIE["adminer_permanent"],lang(33))."\n";}function
login($ud,$G){global$y;if($y=="sqlite")return
lang(34,'<code>login()</code>');return
true;}function
tableName($Xf){return
h($Xf["Name"]);}function
fieldName($m,$ke=0){return'<span title="'.h($m["full_type"]).'">'.h($m["field"]).'</span>';}function
selectLinks($Xf,$P=""){echo'<p class="links">';$td=array("select"=>lang(35));if(support("table")||support("indexes"))$td["table"]=lang(36);if(support("table")){if(is_view($Xf))$td["view"]=lang(37);else$td["create"]=lang(38);}if($P!==null)$td["edit"]=lang(39);foreach($td
as$z=>$X)echo" <a href='".h(ME)."$z=".urlencode($Xf["Name"]).($z=="edit"?$P:"")."'".bold(isset($_GET[$z])).">$X</a>";echo"\n";}function
2014-05-08 19:46:08 +02:00
foreignKeys($Q){return
foreign_keys($Q);}function
backwardKeys($Q,$Wf){return
2014-05-08 19:46:08 +02:00
array();}function
backwardKeysPrint($Aa,$L){}function
selectQuery($I,$kg){global$y;return"<p><code class='jush-$y'>".h(str_replace("\n"," ",$I))."</code> <span class='time'>($kg)</span>".(support("sql")?" <a href='".h(ME)."sql=".urlencode($I)."'>".lang(10)."</a>":"")."</p>";}function
sqlCommandQuery($I){return
shorten_utf8(trim($I),1000);}function
2014-05-08 19:46:08 +02:00
rowDescription($Q){return"";}function
rowDescriptions($M,$uc){return$M;}function
selectLink($X,$m){}function
selectVal($X,$A,$m,$se){$K=($X===null?"<i>NULL</i>":(preg_match("~char|binary~",$m["type"])&&!preg_match("~var~",$m["type"])?"<code>$X</code>":$X));if(preg_match('~blob|bytea|raw|file~',$m["type"])&&!is_utf8($X))$K="<i>".lang(40,strlen($se))."</i>";if(preg_match('~json~',$m["type"]))$K="<code class='jush-js'>$K</code>";return($A?"<a href='".h($A)."'".(is_url($A)?" rel='noreferrer'":"").">$K</a>":$K);}function
editVal($X,$m){return$X;}function
tableStructurePrint($n){echo"<table cellspacing='0'>\n","<thead><tr><th>".lang(41)."<td>".lang(42).(support("comment")?"<td>".lang(43):"")."</thead>\n";foreach($n
as$m){echo"<tr".odd()."><th>".h($m["field"]),"<td><span title='".h($m["collation"])."'>".h($m["full_type"])."</span>",($m["null"]?" <i>NULL</i>":""),($m["auto_increment"]?" <i>".lang(44)."</i>":""),(isset($m["default"])?" <span title='".lang(45)."'>[<b>".h($m["default"])."</b>]</span>":""),(support("comment")?"<td>".nbsp($m["comment"]):""),"\n";}echo"</table>\n";}function
tableIndexesPrint($x){echo"<table cellspacing='0'>\n";foreach($x
as$E=>$w){ksort($w["columns"]);$Pe=array();foreach($w["columns"]as$z=>$X)$Pe[]="<i>".h($X)."</i>".($w["lengths"][$z]?"(".$w["lengths"][$z].")":"").($w["descs"][$z]?" DESC":"");echo"<tr title='".h($E)."'><th>$w[type]<td>".implode(", ",$Pe)."\n";}echo"</table>\n";}function
selectColumnsPrint($N,$e){global$zc,$Bc;print_fieldset("select",lang(46),$N);$u=0;$N[""]=array();foreach($N
as$z=>$X){$X=$_GET["columns"][$z];$d=select_input(" name='columns[$u][col]' onchange='".($z!==""?"selectFieldChange(this.form)":"selectAddRow(this)").";'",$e,$X["col"]);echo"<div>".($zc||$Bc?"<select name='columns[$u][fun]' onchange='helpClose();".($z!==""?"":" this.nextSibling.nextSibling.onchange();")."'".on_help("getTarget(event).value && getTarget(event).value.replace(/ |\$/, '(') + ')'",1).">".optionlist(array(-1=>"")+array_filter(array(lang(47)=>$zc,lang(48)=>$Bc)),$X["fun"])."</select>"."($d)":$d)."</div>\n";$u++;}echo"</div></fieldset>\n";}function
selectSearchPrint($Z,$e,$x){print_fieldset("search",lang(49),$Z);foreach($x
as$u=>$w){if($w["type"]=="FULLTEXT"){echo"(<i>".implode("</i>, <i>",array_map('h',$w["columns"]))."</i>) AGAINST"," <input type='search' name='fulltext[$u]' value='".h($_GET["fulltext"][$u])."' onchange='selectFieldChange(this.form);'>",checkbox("boolean[$u]",1,isset($_GET["boolean"][$u]),"BOOL"),"<br>\n";}}$_GET["where"]=(array)$_GET["where"];reset($_GET["where"]);$Ka="this.nextSibling.onchange();";for($u=0;$u<=count($_GET["where"]);$u++){list(,$X)=each($_GET["where"]);if(!$X||("$X[col]$X[val]"!=""&&in_array($X["op"],$this->operators))){echo"<div>".select_input(" name='where[$u][col]' onchange='$Ka'",$e,$X["col"],"(".lang(50).")"),html_select("where[$u][op]",$this->operators,$X["op"],$Ka),"<input type='search' name='where[$u][val]' value='".h($X["val"])."' onchange='".($X?"selectFieldChange(this.form)":"selectAddRow(this)").";' onkeydown='selectSearchKeydown(this, event);' onsearch='selectSearchSearch(this);'></div>\n";}}echo"</div></fieldset>\n";}function
selectOrderPrint($ke,$e,$x){print_fieldset("sort",lang(51),$ke);$u=0;foreach((array)$_GET["order"]as$z=>$X){if($X!=""){echo"<div>".select_input(" name='order[$u]' onchange='selectFieldChange(this.form);'",$e,$X),checkbox("desc[$u]",1,isset($_GET["desc"][$z]),lang(52))."</div>\n";$u++;}}echo"<div>".select_input(" name='order[$u]' onchange='selectAddRow(this);'",$e),checkbox("desc[$u]",1,false,lang(52))."</div>\n","</div></fieldset>\n";}function
selectLimitPrint($_){echo"<fieldset><legend>".lang(53)."</legend><div>";echo"<input type='number' name='limit' class='size' value='".h($_)."' onchange='selectFieldChange(this.form);'>","</div></fieldset>\n";}function
selectLengthPrint($jg){if($jg!==null){echo"<fieldset><legend>".lang(54)."</legend><div>","<input type='number' name='text_length' class='size' value='".h($jg)."'>","</div></fieldset>\n";}}function
selectActionPrint($x){echo"<fieldset><legend>".lang(55)."</legend><div>","<input type='submit' value='".lang(46)."'>"," <span id='noindex' title='".lang(56)."'></span>","<script type='text/javascript'>\n","var indexColumns = ";$e=array();foreach($x
as$w){$ob=reset($w["columns"]);if($w["type"]!="FULLTEXT"&&$ob)$e[$ob]=1;}$e[""]=1;foreach($e
as$z=>$X)json_row($z);echo";\n","selectFieldChange(document.getElementById('form'));\n","</script>\n","</div></fieldset>\n";}function
2014-05-08 19:46:08 +02:00
selectCommandPrint(){return!information_schema(DB);}function
selectImportPrint(){return!information_schema(DB);}function
selectEmailPrint($Sb,$e){}function
selectColumnsProcess($e,$x){global$zc,$Bc;$N=array();$t=array();foreach((array)$_GET["columns"]as$z=>$X){if($X["fun"]=="count"||($X["col"]!=""&&(!$X["fun"]||in_array($X["fun"],$zc)||in_array($X["fun"],$Bc)))){$N[$z]=apply_sql_function($X["fun"],($X["col"]!=""?idf_escape($X["col"]):"*"));if(!in_array($X["fun"],$Bc))$t[]=$N[$z];}}return
array($N,$t);}function
selectSearchProcess($n,$x){global$g,$y;$K=array();foreach($x
as$u=>$w){if($w["type"]=="FULLTEXT"&&$_GET["fulltext"][$u]!="")$K[]="MATCH (".implode(", ",array_map('idf_escape',$w["columns"])).") AGAINST (".q($_GET["fulltext"][$u]).(isset($_GET["boolean"][$u])?" IN BOOLEAN MODE":"").")";}foreach((array)$_GET["where"]as$X){if("$X[col]$X[val]"!=""&&in_array($X["op"],$this->operators)){$db=" $X[op]";if(preg_match('~IN$~',$X["op"])){$Nc=process_length($X["val"]);$db.=" ".($Nc!=""?$Nc:"(NULL)");}elseif($X["op"]=="SQL")$db=" $X[val]";elseif($X["op"]=="LIKE %%")$db=" LIKE ".$this->processInput($n[$X["col"]],"%$X[val]%");elseif($X["op"]=="ILIKE %%")$db=" ILIKE ".$this->processInput($n[$X["col"]],"%$X[val]%");elseif(!preg_match('~NULL$~',$X["op"]))$db.=" ".$this->processInput($n[$X["col"]],$X["val"]);if($X["col"]!="")$K[]=idf_escape($X["col"]).$db;else{$Ya=array();foreach($n
as$E=>$m){$Zc=preg_match('~char|text|enum|set~',$m["type"]);if((is_numeric($X["val"])||!preg_match('~(^|[^o])int|float|double|decimal|bit~',$m["type"]))&&(!preg_match("~[\x80-\xFF]~",$X["val"])||$Zc)){$E=idf_escape($E);$Ya[]=($y=="sql"&&$Zc&&!preg_match("~^utf8_~",$m["collation"])?"CONVERT($E USING ".charset($g).")":$E);}}$K[]=($Ya?"(".implode("$db OR ",$Ya)."$db)":"0");}}}return$K;}function
selectOrderProcess($n,$x){$K=array();foreach((array)$_GET["order"]as$z=>$X){if($X!="")$K[]=(preg_match('~^((COUNT\\(DISTINCT |[A-Z0-9_]+\\()(`(?:[^`]|``)+`|"(?:[^"]|"")+")\\)|COUNT\\(\\*\\))$~',$X)?$X:idf_escape($X)).(isset($_GET["desc"][$z])?" DESC":"");}return$K;}function
2014-05-08 19:46:08 +02:00
selectLimitProcess(){return(isset($_GET["limit"])?$_GET["limit"]:"50");}function
selectLengthProcess(){return(isset($_GET["text_length"])?$_GET["text_length"]:"100");}function
selectEmailProcess($Z,$uc){return
2014-05-08 19:46:08 +02:00
false;}function
selectQueryBuild($N,$Z,$t,$ke,$_,$F){return"";}function
messageQuery($I,$kg){global$y;restart_session();$Gc=&get_session("queries");$v="sql-".count($Gc[$_GET["db"]]);if(strlen($I)>1e6)$I=preg_replace('~[\x80-\xFF]+$~','',substr($I,0,1e6))."\n...";$Gc[$_GET["db"]][]=array($I,time(),$kg);return" <span class='time'>".@date("H:i:s")."</span> <a href='#$v' onclick=\"return !toggle('$v');\">".lang(57)."</a>"."<div id='$v' class='hidden'><pre><code class='jush-$y'>".shorten_utf8($I,1000).'</code></pre>'.($kg?" <span class='time'>($kg)</span>":'').(support("sql")?'<p><a href="'.h(str_replace("db=".urlencode(DB),"db=".urlencode($_GET["db"]),ME).'sql=&history='.(count($Gc[$_GET["db"]])-1)).'">'.lang(10).'</a>':'').'</div>';}function
editFunctions($m){global$Nb;$K=($m["null"]?"NULL/":"");foreach($Nb
as$z=>$zc){if(!$z||(!isset($_GET["call"])&&(isset($_GET["select"])||where($_GET)))){foreach($zc
as$Ee=>$X){if(!$Ee||preg_match("~$Ee~",$m["type"]))$K.="/$X";}if($z&&!preg_match('~set|blob|bytea|raw|file~',$m["type"]))$K.="/SQL";}}if($m["auto_increment"]&&!isset($_GET["select"])&&!where($_GET))$K=lang(44);return
explode("/",$K);}function
editInput($Q,$m,$wa,$Y){if($m["type"]=="enum")return(isset($_GET["select"])?"<label><input type='radio'$wa value='-1' checked><i>".lang(8)."</i></label> ":"").($m["null"]?"<label><input type='radio'$wa value=''".($Y!==null||isset($_GET["select"])?"":" checked")."><i>NULL</i></label> ":"").enum_input("radio",$wa,$m,$Y,0);return"";}function
processInput($m,$Y,$r=""){if($r=="SQL")return$Y;$E=$m["field"];$K=q($Y);if(preg_match('~^(now|getdate|uuid)$~',$r))$K="$r()";elseif(preg_match('~^current_(date|timestamp)$~',$r))$K=$r;elseif(preg_match('~^([+-]|\\|\\|)$~',$r))$K=idf_escape($E)." $r $K";elseif(preg_match('~^[+-] interval$~',$r))$K=idf_escape($E)." $r ".(preg_match("~^(\\d+|'[0-9.: -]') [A-Z_]+$~i",$Y)?$Y:$K);elseif(preg_match('~^(addtime|subtime|concat)$~',$r))$K="$r(".idf_escape($E).", $K)";elseif(preg_match('~^(md5|sha1|password|encrypt)$~',$r))$K="$r($K)";return
unconvert_field($m,$K);}function
dumpOutput(){$K=array('text'=>lang(58),'file'=>lang(59));if(function_exists('gzencode'))$K['gz']='gzip';return$K;}function
2014-05-08 19:46:08 +02:00
dumpFormat(){return
array('sql'=>'SQL','csv'=>'CSV,','csv;'=>'CSV;','tsv'=>'TSV');}function
dumpDatabase($k){}function
dumpTable($Q,$Rf,$ad=0){if($_POST["format"]!="sql"){echo"\xef\xbb\xbf";if($Rf)dump_csv(array_keys(fields($Q)));}else{if($ad==2){$n=array();foreach(fields($Q)as$E=>$m)$n[]=idf_escape($E)." $m[full_type]";$i="CREATE TABLE ".table($Q)." (".implode(", ",$n).")";}else$i=create_sql($Q,$_POST["auto_increment"]);set_utf8mb4($i);if($Rf&&$i){if($Rf=="DROP+CREATE"||$ad==1)echo"DROP ".($ad==2?"VIEW":"TABLE")." IF EXISTS ".table($Q).";\n";if($ad==1)$i=remove_definer($i);echo"$i;\n\n";}}}function
dumpData($Q,$Rf,$I){global$g,$y;$zd=($y=="sqlite"?0:1048576);if($Rf){if($_POST["format"]=="sql"){if($Rf=="TRUNCATE+INSERT")echo
truncate_sql($Q).";\n";$n=fields($Q);}$J=$g->query($I,1);if($J){$Sc="";$Ia="";$dd=array();$Tf="";$nc=($Q!=''?'fetch_assoc':'fetch_row');while($L=$J->$nc()){if(!$dd){$Qg=array();foreach($L
as$X){$m=$J->fetch_field();$dd[]=$m->name;$z=idf_escape($m->name);$Qg[]="$z = VALUES($z)";}$Tf=($Rf=="INSERT+UPDATE"?"\nON DUPLICATE KEY UPDATE ".implode(", ",$Qg):"").";\n";}if($_POST["format"]!="sql"){if($Rf=="table"){dump_csv($dd);$Rf="INSERT";}dump_csv($L);}else{if(!$Sc)$Sc="INSERT INTO ".table($Q)." (".implode(", ",array_map('idf_escape',$dd)).") VALUES";foreach($L
as$z=>$X){$m=$n[$z];$L[$z]=($X!==null?unconvert_field($m,preg_match('~(^|[^o])int|float|double|decimal~',$m["type"])&&$X!=''?$X:q($X)):"NULL");}$sf=($zd?"\n":" ")."(".implode(",\t",$L).")";if(!$Ia)$Ia=$Sc.$sf;elseif(strlen($Ia)+4+strlen($sf)+strlen($Tf)<$zd)$Ia.=",$sf";else{echo$Ia.$Tf;$Ia=$Sc.$sf;}}}if($Ia)echo$Ia.$Tf;}elseif($_POST["format"]=="sql")echo"-- ".str_replace("\n"," ",$g->error)."\n";}}function
dumpFilename($Kc){return
friendly_url($Kc!=""?$Kc:(SERVER!=""?SERVER:"localhost"));}function
dumpHeaders($Kc,$Kd=false){$ue=$_POST["output"];$ic=(preg_match('~sql~',$_POST["format"])?"sql":($Kd?"tar":"csv"));header("Content-Type: ".($ue=="gz"?"application/x-gzip":($ic=="tar"?"application/x-tar":($ic=="sql"||$ue!="file"?"text/plain":"text/csv")."; charset=utf-8")));if($ue=="gz")ob_start('ob_gzencode',1e6);return$ic;}function
homepage(){echo'<p class="links">'.($_GET["ns"]==""&&support("database")?'<a href="'.h(ME).'database=">'.lang(60)."</a>\n":""),(support("scheme")?"<a href='".h(ME)."scheme='>".($_GET["ns"]!=""?lang(61):lang(62))."</a>\n":""),($_GET["ns"]!==""?'<a href="'.h(ME).'schema=">'.lang(63)."</a>\n":""),(support("privileges")?"<a href='".h(ME)."privileges='>".lang(64)."</a>\n":"");return
true;}function
navigation($Jd){global$fa,$y,$Gb,$g;echo'<h1>
',$this->name(),' <span class="version">',$fa,'</span>
<a href="https://www.adminer.org/#download" target="_blank" id="version">',(version_compare($fa,$_COOKIE["adminer_version"])<0?h($_COOKIE["adminer_version"]):""),'</a>
2014-05-08 19:46:08 +02:00
</h1>
';if($Jd=="auth"){$rc=true;foreach((array)$_SESSION["pwds"]as$Sg=>$Bf){foreach($Bf
as$O=>$Og){foreach($Og
as$V=>$G){if($G!==null){if($rc){echo"<p id='logins' onmouseover='menuOver(this, event);' onmouseout='menuOut(this);'>\n";$rc=false;}$ub=$_SESSION["db"][$Sg][$O][$V];foreach(($ub?array_keys($ub):array(""))as$k)echo"<a href='".h(auth_url($Sg,$O,$V,$k))."'>($Gb[$Sg]) ".h($V.($O!=""?"@$O":"").($k!=""?" - $k":""))."</a><br>\n";}}}}}else{if($_GET["ns"]!==""&&!$Jd&&DB!=""){$g->select_db(DB);$S=table_status('',true);}echo'<script type="text/javascript" src="',h(preg_replace("~\\?.*~","",ME))."?file=jush.js&amp;version=4.3.1&amp;driver=mysql",'"></script>
';if(support("sql")){echo'<script type="text/javascript">
';if($S){$td=array();foreach($S
as$Q=>$U)$td[]=preg_quote($Q,'/');echo"var jushLinks = { $y: [ '".js_escape(ME).(support("table")?"table=":"select=")."\$&', /\\b(".implode("|",$td).")\\b/g ] };\n";foreach(array("bac","bra","sqlite_quo","mssql_bra")as$X)echo"jushLinks.$X = jushLinks.$y;\n";}echo'bodyLoad(\'',(is_object($g)?substr($g->server_info,0,3):""),'\');
2014-05-08 19:46:08 +02:00
</script>
';}$this->databasesPrint($Jd);if(DB==""||!$Jd){echo"<p class='links'>".(support("sql")?"<a href='".h(ME)."sql='".bold(isset($_GET["sql"])&&!isset($_GET["import"])).">".lang(57)."</a>\n<a href='".h(ME)."import='".bold(isset($_GET["import"])).">".lang(65)."</a>\n":"")."";if(support("dump"))echo"<a href='".h(ME)."dump=".urlencode(isset($_GET["table"])?$_GET["table"]:$_GET["select"])."' id='dump'".bold(isset($_GET["dump"])).">".lang(66)."</a>\n";}if($_GET["ns"]!==""&&!$Jd&&DB!=""){echo'<a href="'.h(ME).'create="'.bold($_GET["create"]==="").">".lang(67)."</a>\n";if(!$S)echo"<p class='message'>".lang(9)."\n";else$this->tablesPrint($S);}}}function
databasesPrint($Jd){global$c,$g;$j=$this->databases();echo'<form action="">
2014-05-08 19:46:08 +02:00
<p id="dbs">
';hidden_fields_get();$sb=" onmousedown='dbMouseDown(event, this);' onchange='dbChange(this);'";echo"<span title='".lang(68)."'>DB</span>: ".($j?"<select name='db'$sb>".optionlist(array(""=>"")+$j,DB)."</select>":'<input name="db" value="'.h(DB).'" autocapitalize="off">'),"<input type='submit' value='".lang(20)."'".($j?" class='hidden'":"").">\n";if($Jd!="db"&&DB!=""&&$g->select_db(DB)){}echo(isset($_GET["sql"])?'<input type="hidden" name="sql" value="">':(isset($_GET["schema"])?'<input type="hidden" name="schema" value="">':(isset($_GET["dump"])?'<input type="hidden" name="dump" value="">':(isset($_GET["privileges"])?'<input type="hidden" name="privileges" value="">':"")))),"</p></form>\n";}function
tablesPrint($S){echo"<ul id='tables' onmouseover='menuOver(this, event);' onmouseout='menuOut(this);'>\n";foreach($S
as$Q=>$Mf){echo'<li><a href="'.h(ME).'select='.urlencode($Q).'"'.bold($_GET["select"]==$Q||$_GET["edit"]==$Q,"select").">".lang(69)."</a> ";$E=$this->tableName($Mf);echo(support("table")||support("indexes")?'<a href="'.h(ME).'table='.urlencode($Q).'"'.bold(in_array($Q,array($_GET["table"],$_GET["create"],$_GET["indexes"],$_GET["foreign"],$_GET["trigger"])),(is_view($Mf)?"view":"structure"))." title='".lang(36)."'>$E</a>":"<span>$E</span>")."\n";}echo"</ul>\n";}}$c=(function_exists('adminer_object')?adminer_object():new
Adminer);if($c->operators===null)$c->operators=$ge;function
page_header($ng,$l="",$Ha=array(),$og=""){global$a,$fa,$c,$Gb,$y;page_headers();if(is_ajax()&&$l){page_messages($l);exit;}$pg=$ng.($og!=""?": $og":"");$qg=strip_tags($pg.(SERVER!=""&&SERVER!="localhost"?h(" - ".SERVER):"")." - ".$c->name());echo'<!DOCTYPE html>
<html lang="',$a,'" dir="',lang(70),'">
2014-05-08 19:46:08 +02:00
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta name="robots" content="noindex">
2015-07-03 19:50:03 +02:00
<meta name="referrer" content="origin-when-crossorigin">
<title>',$qg,'</title>
<link rel="stylesheet" type="text/css" href="',h(preg_replace("~\\?.*~","",ME))."?file=default.css&amp;version=4.3.1&amp;driver=mysql",'">
<script type="text/javascript" src="',h(preg_replace("~\\?.*~","",ME))."?file=functions.js&amp;version=4.3.1&amp;driver=mysql",'"></script>
';if($c->head()){echo'<link rel="shortcut icon" type="image/x-icon" href="',h(preg_replace("~\\?.*~","",ME))."?file=favicon.ico&amp;version=4.3.1&amp;driver=mysql",'">
<link rel="apple-touch-icon" href="',h(preg_replace("~\\?.*~","",ME))."?file=favicon.ico&amp;version=4.3.1&amp;driver=mysql",'">
2014-05-08 19:46:08 +02:00
';if(file_exists("adminer.css")){echo'<link rel="stylesheet" type="text/css" href="adminer.css">
';}}echo'
<body class="',lang(70),' nojs" onkeydown="bodyKeydown(event);" onclick="bodyClick(event);"',(isset($_COOKIE["adminer_version"])?"":" onload=\"verifyVersion('$fa');\"");?>>
2014-05-08 19:46:08 +02:00
<script type="text/javascript">
2015-07-03 19:50:03 +02:00
document.body.className = document.body.className.replace(/ nojs/, ' js');
var offlineMessage = '<?php echo
js_escape(lang(71)),'\';
2014-05-08 19:46:08 +02:00
</script>
<div id="help" class="jush-',$y,' jsonly hidden" onmouseover="helpOpen = 1;" onmouseout="helpMouseout(this, event);"></div>
2014-05-08 19:46:08 +02:00
<div id="content">
';if($Ha!==null){$A=substr(preg_replace('~\b(username|db|ns)=[^&]*&~','',ME),0,-1);echo'<p id="breadcrumb"><a href="'.h($A?$A:".").'">'.$Gb[DRIVER].'</a> &raquo; ';$A=substr(preg_replace('~\b(db|ns)=[^&]*&~','',ME),0,-1);$O=(SERVER!=""?h(SERVER):lang(28));if($Ha===false)echo"$O\n";else{echo"<a href='".($A?h($A):".")."' accesskey='1' title='Alt+Shift+1'>$O</a> &raquo; ";if($_GET["ns"]!=""||(DB!=""&&is_array($Ha)))echo'<a href="'.h($A."&db=".urlencode(DB).(support("scheme")?"&ns=":"")).'">'.h(DB).'</a> &raquo; ';if(is_array($Ha)){if($_GET["ns"]!="")echo'<a href="'.h(substr(ME,0,-1)).'">'.h($_GET["ns"]).'</a> &raquo; ';foreach($Ha
as$z=>$X){$yb=(is_array($X)?$X[1]:h($X));if($yb!="")echo"<a href='".h(ME."$z=").urlencode(is_array($X)?$X[0]:$X)."'>$yb</a> &raquo; ";}}echo"$ng\n";}}echo"<h2>$pg</h2>\n","<div id='ajaxstatus' class='jsonly hidden'></div>\n";restart_session();page_messages($l);$j=&get_session("dbs");if(DB!=""&&$j&&!in_array(DB,$j,true))$j=null;stop_session();define("PAGE_HEADER",1);}function
page_headers(){global$c;header("Content-Type: text/html; charset=utf-8");header("Cache-Control: no-cache");if($c->headers()){header("X-Frame-Options: deny");header("X-XSS-Protection: 0");}}function
page_messages($l){$Kg=preg_replace('~^[^?]*~','',$_SERVER["REQUEST_URI"]);$Hd=$_SESSION["messages"][$Kg];if($Hd){echo"<div class='message'>".implode("</div>\n<div class='message'>",$Hd)."</div>\n";unset($_SESSION["messages"][$Kg]);}if($l)echo"<div class='error'>$l</div>\n";}function
page_footer($Jd=""){global$c,$T;echo'</div>
2014-05-08 19:46:08 +02:00
';switch_lang();if($Jd!="auth"){echo'<form action="" method="post">
2014-05-08 19:46:08 +02:00
<p class="logout">
2015-07-03 19:50:03 +02:00
<input type="submit" name="logout" value="',lang(72),'" id="logout">
2014-05-08 19:46:08 +02:00
<input type="hidden" name="token" value="',$T,'">
</p>
</form>
';}echo'<div id="menu">
';$c->navigation($Jd);echo'</div>
2014-05-08 19:46:08 +02:00
<script type="text/javascript">setupSubmitHighlight(document);</script>
';}function
int32($Md){while($Md>=2147483648)$Md-=4294967296;while($Md<=-2147483649)$Md+=4294967296;return(int)$Md;}function
long2str($W,$Wg){$sf='';foreach($W
as$X)$sf.=pack('V',$X);if($Wg)return
substr($sf,0,end($W));return$sf;}function
str2long($sf,$Wg){$W=array_values(unpack('V*',str_pad($sf,4*ceil(strlen($sf)/4),"\0")));if($Wg)$W[]=strlen($sf);return$W;}function
xxtea_mx($bh,$ah,$Uf,$cd){return
int32((($bh>>5&0x7FFFFFF)^$ah<<2)+(($ah>>3&0x1FFFFFFF)^$bh<<4))^int32(($Uf^$ah)+($cd^$bh));}function
encrypt_string($Of,$z){if($Of=="")return"";$z=array_values(unpack("V*",pack("H*",md5($z))));$W=str2long($Of,true);$Md=count($W)-1;$bh=$W[$Md];$ah=$W[0];$H=floor(6+52/($Md+1));$Uf=0;while($H-->0){$Uf=int32($Uf+0x9E3779B9);$Mb=$Uf>>2&3;for($ve=0;$ve<$Md;$ve++){$ah=$W[$ve+1];$Ld=xxtea_mx($bh,$ah,$Uf,$z[$ve&3^$Mb]);$bh=int32($W[$ve]+$Ld);$W[$ve]=$bh;}$ah=$W[0];$Ld=xxtea_mx($bh,$ah,$Uf,$z[$ve&3^$Mb]);$bh=int32($W[$Md]+$Ld);$W[$Md]=$bh;}return
2014-05-08 19:46:08 +02:00
long2str($W,false);}function
decrypt_string($Of,$z){if($Of=="")return"";if(!$z)return
false;$z=array_values(unpack("V*",pack("H*",md5($z))));$W=str2long($Of,false);$Md=count($W)-1;$bh=$W[$Md];$ah=$W[0];$H=floor(6+52/($Md+1));$Uf=int32($H*0x9E3779B9);while($Uf){$Mb=$Uf>>2&3;for($ve=$Md;$ve>0;$ve--){$bh=$W[$ve-1];$Ld=xxtea_mx($bh,$ah,$Uf,$z[$ve&3^$Mb]);$ah=int32($W[$ve]-$Ld);$W[$ve]=$ah;}$bh=$W[$Md];$Ld=xxtea_mx($bh,$ah,$Uf,$z[$ve&3^$Mb]);$ah=int32($W[0]-$Ld);$W[0]=$ah;$Uf=int32($Uf-0x9E3779B9);}return
long2str($W,true);}$g='';$Fc=$_SESSION["token"];if(!$Fc)$_SESSION["token"]=rand(1,1e6);$T=get_token();$Fe=array();if($_COOKIE["adminer_permanent"]){foreach(explode(" ",$_COOKIE["adminer_permanent"])as$X){list($z)=explode(":",$X);$Fe[$z]=$X;}}function
add_invalid_login(){global$c;$pc=get_temp_dir()."/adminer.invalid";$q=@fopen($pc,"r+");if(!$q){$q=@fopen($pc,"w");if(!$q)return;}flock($q,LOCK_EX);$Vc=unserialize(stream_get_contents($q));$kg=time();if($Vc){foreach($Vc
as$Wc=>$X){if($X[0]<$kg)unset($Vc[$Wc]);}}$Uc=&$Vc[$c->bruteForceKey()];if(!$Uc)$Uc=array($kg+30*60,0);$Uc[1]++;$_f=serialize($Vc);rewind($q);fwrite($q,$_f);ftruncate($q,strlen($_f));flock($q,LOCK_UN);fclose($q);}$xa=$_POST["auth"];if($xa){$Vc=unserialize(@file_get_contents(get_temp_dir()."/adminer.invalid"));$Uc=$Vc[$c->bruteForceKey()];$Rd=($Uc[1]>30?$Uc[0]-time():0);if($Rd>0)auth_error(lang(73,ceil($Rd/60)));session_regenerate_id();$Sg=$xa["driver"];$O=$xa["server"];$V=$xa["username"];$G=(string)$xa["password"];$k=$xa["db"];set_password($Sg,$O,$V,$G);$_SESSION["db"][$Sg][$O][$V][$k]=true;if($xa["permanent"]){$z=base64_encode($Sg)."-".base64_encode($O)."-".base64_encode($V)."-".base64_encode($k);$Qe=$c->permanentLogin(true);$Fe[$z]="$z:".base64_encode($Qe?encrypt_string($G,$Qe):"");cookie("adminer_permanent",implode(" ",$Fe));}if(count($_POST)==1||DRIVER!=$Sg||SERVER!=$O||$_GET["username"]!==$V||DB!=$k)redirect(auth_url($Sg,$O,$V,$k));}elseif($_POST["logout"]){if($Fc&&!verify_token()){page_header(lang(72),lang(74));page_footer("db");exit;}else{foreach(array("pwds","db","dbs","queries")as$z)set_session($z,null);unset_permanent();redirect(substr(preg_replace('~\b(username|db|ns)=[^&]*&~','',ME),0,-1),lang(75));}}elseif($Fe&&!$_SESSION["pwds"]){session_regenerate_id();$Qe=$c->permanentLogin();foreach($Fe
as$z=>$X){list(,$Qa)=explode(":",$X);list($Sg,$O,$V,$k)=array_map('base64_decode',explode("-",$z));set_password($Sg,$O,$V,decrypt_string(base64_decode($Qa),$Qe));$_SESSION["db"][$Sg][$O][$V][$k]=true;}}function
unset_permanent(){global$Fe;foreach($Fe
as$z=>$X){list($Sg,$O,$V,$k)=array_map('base64_decode',explode("-",$z));if($Sg==DRIVER&&$O==SERVER&&$V==$_GET["username"]&&$k==DB)unset($Fe[$z]);}cookie("adminer_permanent",implode(" ",$Fe));}function
auth_error($l){global$c,$Fc;$Cf=session_name();if(isset($_GET["username"])){header("HTTP/1.1 403 Forbidden");if(($_COOKIE[$Cf]||$_GET[$Cf])&&!$Fc)$l=lang(76);else{add_invalid_login();$G=get_password();if($G!==null){if($G===false)$l.='<br>'.lang(77,'<code>permanentLogin()</code>');set_password(DRIVER,SERVER,$_GET["username"],null);}unset_permanent();}}if(!$_COOKIE[$Cf]&&$_GET[$Cf]&&ini_bool("session.use_only_cookies"))$l=lang(78);$xe=session_get_cookie_params();cookie("adminer_key",($_COOKIE["adminer_key"]?$_COOKIE["adminer_key"]:rand_string()),$xe["lifetime"]);page_header(lang(32),$l,null);echo"<form action='' method='post'>\n";$c->loginForm();echo"<div>";hidden_fields($_POST,array("auth"));echo"</div>\n","</form>\n";page_footer("auth");exit;}if(isset($_GET["username"])){if(!class_exists("Min_DB")){unset($_SESSION["pwds"][DRIVER]);unset_permanent();page_header(lang(79),lang(80,implode(", ",$Le)),false);page_footer("auth");exit;}$g=connect();}$Fb=new
Min_Driver($g);if(!is_object($g)||($ud=$c->login($_GET["username"],get_password()))!==true)auth_error((is_string($g)?h($g):(is_string($ud)?$ud:lang(81))));if($xa&&$_POST["token"])$_POST["token"]=$T;$l='';if($_POST){if(!verify_token()){$Pc="max_input_vars";$Cd=ini_get($Pc);if(extension_loaded("suhosin")){foreach(array("suhosin.request.max_vars","suhosin.post.max_vars")as$z){$X=ini_get($z);if($X&&(!$Cd||$X<$Cd)){$Pc=$z;$Cd=$X;}}}$l=(!$_POST["token"]&&$Cd?lang(82,"'$Pc'"):lang(74).' '.lang(83));}}elseif($_SERVER["REQUEST_METHOD"]=="POST"){$l=lang(84,"'post_max_size'");if(isset($_GET["sql"]))$l.=' '.lang(85);}if(!ini_bool("session.use_cookies")||@ini_set("session.use_cookies",false)!==false)session_write_close();function
select($J,$h=null,$ne=array(),$_=0){global$y;$td=array();$x=array();$e=array();$Fa=array();$Bg=array();$K=array();odd('');for($u=0;(!$_||$u<$_)&&($L=$J->fetch_row());$u++){if(!$u){echo"<table cellspacing='0' class='nowrap'>\n","<thead><tr>";for($bd=0;$bd<count($L);$bd++){$m=$J->fetch_field();$E=$m->name;$me=$m->orgtable;$le=$m->orgname;$K[$m->table]=$me;if($ne&&$y=="sql")$td[$bd]=($E=="table"?"table=":($E=="possible_keys"?"indexes=":null));elseif($me!=""){if(!isset($x[$me])){$x[$me]=array();foreach(indexes($me,$h)as$w){if($w["type"]=="PRIMARY"){$x[$me]=array_flip($w["columns"]);break;}}$e[$me]=$x[$me];}if(isset($e[$me][$le])){unset($e[$me][$le]);$x[$me][$le]=$bd;$td[$bd]=$me;}}if($m->charsetnr==63)$Fa[$bd]=true;$Bg[$bd]=$m->type;echo"<th".($me!=""||$m->name!=$le?" title='".h(($me!=""?"$me.":"").$le)."'":"").">".h($E).($ne?doc_link(array('sql'=>"explain-output.html#explain_".strtolower($E))):"");}echo"</thead>\n";}echo"<tr".odd().">";foreach($L
as$z=>$X){if($X===null)$X="<i>NULL</i>";elseif($Fa[$z]&&!is_utf8($X))$X="<i>".lang(40,strlen($X))."</i>";elseif(!strlen($X))$X="&nbsp;";else{$X=h($X);if($Bg[$z]==254)$X="<code>$X</code>";}if(isset($td[$z])&&!$e[$td[$z]]){if($ne&&$y=="sql"){$Q=$L[array_search("table=",$td)];$A=$td[$z].urlencode($ne[$Q]!=""?$ne[$Q]:$Q);}else{$A="edit=".urlencode($td[$z]);foreach($x[$td[$z]]as$Ua=>$bd)$A.="&where".urlencode("[".bracket_escape($Ua)."]")."=".urlencode($L[$bd]);}$X="<a href='".h(ME.$A)."'>$X</a>";}echo"<td>$X";}}echo($u?"</table>":"<p class='message'>".lang(12))."\n";return$K;}function
referencable_primary($yf){$K=array();foreach(table_status('',true)as$Yf=>$Q){if($Yf!=$yf&&fk_support($Q)){foreach(fields($Yf)as$m){if($m["primary"]){if($K[$Yf]){unset($K[$Yf]);break;}$K[$Yf]=$m;}}}}return$K;}function
textarea($E,$Y,$M=10,$Ya=80){global$y;echo"<textarea name='$E' rows='$M' cols='$Ya' class='sqlarea jush-$y' spellcheck='false' wrap='off'>";if(is_array($Y)){foreach($Y
2014-05-08 19:46:08 +02:00
as$X)echo
h($X[0])."\n\n\n";}else
echo
h($Y);echo"</textarea>";}function
edit_type($z,$m,$Xa,$p=array()){global$Qf,$Bg,$Ig,$ce;$U=$m["type"];echo'<td><select name="',h($z),'[type]" class="type" onfocus="lastType = selectValue(this);" onchange="editingTypeChange(this);"',on_help("getTarget(event).value",1),' aria-labelledby="label-type">';if($U&&!isset($Bg[$U])&&!isset($p[$U]))array_unshift($Qf,$U);if($p)$Qf[lang(86)]=$p;echo
optionlist($Qf,$U),'</select>
<td><input name="',h($z),'[length]" value="',h($m["length"]),'" size="3" onfocus="editingLengthFocus(this);"',(!$m["length"]&&preg_match('~var(char|binary)$~',$U)?" class='required'":""),' onchange="editingLengthChange(this);" onkeyup="this.onchange();" aria-labelledby="label-length"><td class="options">';echo"<select name='".h($z)."[collation]'".(preg_match('~(char|text|enum|set)$~',$U)?"":" class='hidden'").'><option value="">('.lang(87).')'.optionlist($Xa,$m["collation"]).'</select>',($Ig?"<select name='".h($z)."[unsigned]'".(!$U||preg_match('~((^|[^o])int|float|double|decimal)$~',$U)?"":" class='hidden'").'><option>'.optionlist($Ig,$m["unsigned"]).'</select>':''),(isset($m['on_update'])?"<select name='".h($z)."[on_update]'".(preg_match('~timestamp|datetime~',$U)?"":" class='hidden'").'>'.optionlist(array(""=>"(".lang(88).")","CURRENT_TIMESTAMP"),$m["on_update"]).'</select>':''),($p?"<select name='".h($z)."[on_delete]'".(preg_match("~`~",$U)?"":" class='hidden'")."><option value=''>(".lang(89).")".optionlist(explode("|",$ce),$m["on_delete"])."</select> ":" ");}function
process_length($qd){global$Xb;return(preg_match("~^\\s*\\(?\\s*$Xb(?:\\s*,\\s*$Xb)*+\\s*\\)?\\s*\$~",$qd)&&preg_match_all("~$Xb~",$qd,$xd)?"(".implode(",",$xd[0]).")":preg_replace('~^[0-9].*~','(\0)',preg_replace('~[^-0-9,+()[\]]~','',$qd)));}function
process_type($m,$Va="COLLATE"){global$Ig;return" $m[type]".process_length($m["length"]).(preg_match('~(^|[^o])int|float|double|decimal~',$m["type"])&&in_array($m["unsigned"],$Ig)?" $m[unsigned]":"").(preg_match('~char|text|enum|set~',$m["type"])&&$m["collation"]?" $Va ".q($m["collation"]):"");}function
process_field($m,$_g){global$y;$wb=$m["default"];return
array(idf_escape(trim($m["field"])),process_type($_g),($m["null"]?" NULL":" NOT NULL"),(isset($wb)?" DEFAULT ".((preg_match('~time~',$m["type"])&&preg_match('~^CURRENT_TIMESTAMP$~i',$wb))||($y=="sqlite"&&preg_match('~^CURRENT_(TIME|TIMESTAMP|DATE)$~i',$wb))||($m["type"]=="bit"&&preg_match("~^([0-9]+|b'[0-1]+')\$~",$wb))||($y=="pgsql"&&preg_match("~^[a-z]+\\(('[^']*')+\\)\$~",$wb))?$wb:q($wb)):""),(preg_match('~timestamp|datetime~',$m["type"])&&$m["on_update"]?" ON UPDATE $m[on_update]":""),(support("comment")&&$m["comment"]!=""?" COMMENT ".q($m["comment"]):""),($m["auto_increment"]?auto_increment():null),);}function
type_class($U){foreach(array('char'=>'text','date'=>'time|year','binary'=>'blob','enum'=>'set',)as$z=>$X){if(preg_match("~$z|$X~",$U))return" class='$z'";}}function
edit_fields($n,$Xa,$U="TABLE",$p=array(),$cb=false){global$g,$Qc;$n=array_values($n);echo'<thead><tr class="wrap">
';if($U=="PROCEDURE"){echo'<td>&nbsp;';}echo'<th id="label-name">',($U=="TABLE"?lang(90):lang(91)),'<td id="label-type">',lang(42),'<textarea id="enum-edit" rows="4" cols="12" wrap="off" style="display: none;" onblur="editingLengthBlur(this);"></textarea>
<td id="label-length">',lang(92),'<td>',lang(93);if($U=="TABLE"){echo'<td id="label-null">NULL
<td><input type="radio" name="auto_increment_col" value=""><acronym id="label-ai" title="',lang(44),'">AI</acronym>',doc_link(array('sql'=>"example-auto-increment.html",'sqlite'=>"autoinc.html",'pgsql'=>"datatype.html#DATATYPE-SERIAL",'mssql'=>"ms186775.aspx",)),'<td id="label-default">',lang(45),(support("comment")?"<td id='label-comment'".($cb?"":" class='hidden'").">".lang(43):"");}echo'<td>',"<input type='image' class='icon' name='add[".(support("move_col")?0:count($n))."]' src='".h(preg_replace("~\\?.*~","",ME))."?file=plus.gif&amp;version=4.3.1&amp;driver=mysql' alt='+' title='".lang(94)."'>",'<script type="text/javascript">row_count = ',count($n),';</script>
2014-05-08 19:46:08 +02:00
</thead>
<tbody onkeydown="return editingKeydown(event);">
';foreach($n
as$u=>$m){$u++;$oe=$m[($_POST?"orig":"field")];$Bb=(isset($_POST["add"][$u-1])||(isset($m["field"])&&!$_POST["drop_col"][$u]))&&(support("drop_col")||$oe=="");echo'<tr',($Bb?"":" style='display: none;'"),'>
',($U=="PROCEDURE"?"<td>".html_select("fields[$u][inout]",explode("|",$Qc),$m["inout"]):""),'<th>';if($Bb){echo'<input name="fields[',$u,'][field]" value="',h($m["field"]),'" onchange="editingNameChange(this);',($m["field"]!=""||count($n)>1?'':' editingAddRow(this);" onkeyup="if (this.value) editingAddRow(this);'),'" maxlength="64" autocapitalize="off" aria-labelledby="label-name">';}echo'<input type="hidden" name="fields[',$u,'][orig]" value="',h($oe),'">
';edit_type("fields[$u]",$m,$Xa,$p);if($U=="TABLE"){echo'<td>',checkbox("fields[$u][null]",1,$m["null"],"","","block","label-null"),'<td><label class="block"><input type="radio" name="auto_increment_col" value="',$u,'"';if($m["auto_increment"]){echo' checked';}?> onclick="var field = this.form['fields[' + this.value + '][field]']; if (!field.value) { field.value = 'id'; field.onchange(); }" aria-labelledby="label-ai"></label><td><?php
2014-05-08 19:46:08 +02:00
echo
checkbox("fields[$u][has_default]",1,$m["has_default"],"","","","label-default"),'<input name="fields[',$u,'][default]" value="',h($m["default"]),'" onkeyup="keyupChange.call(this);" onchange="this.previousSibling.checked = true;" aria-labelledby="label-default">
',(support("comment")?"<td".($cb?"":" class='hidden'")."><input name='fields[$u][comment]' value='".h($m["comment"])."' maxlength='".($g->server_info>=5.5?1024:255)."' aria-labelledby='label-comment'>":"");}echo"<td>",(support("move_col")?"<input type='image' class='icon' name='add[$u]' src='".h(preg_replace("~\\?.*~","",ME))."?file=plus.gif&amp;version=4.3.1&amp;driver=mysql' alt='+' title='".lang(94)."' onclick='return !editingAddRow(this, 1);'>&nbsp;"."<input type='image' class='icon' name='up[$u]' src='".h(preg_replace("~\\?.*~","",ME))."?file=up.gif&amp;version=4.3.1&amp;driver=mysql' alt='^' title='".lang(95)."' onclick='return !editingMoveRow(this, 1);'>&nbsp;"."<input type='image' class='icon' name='down[$u]' src='".h(preg_replace("~\\?.*~","",ME))."?file=down.gif&amp;version=4.3.1&amp;driver=mysql' alt='v' title='".lang(96)."' onclick='return !editingMoveRow(this, 0);'>&nbsp;":""),($oe==""||support("drop_col")?"<input type='image' class='icon' name='drop_col[$u]' src='".h(preg_replace("~\\?.*~","",ME))."?file=cross.gif&amp;version=4.3.1&amp;driver=mysql' alt='x' title='".lang(97)."' onclick=\"return !editingRemoveRow(this, 'fields\$1[field]');\">":""),"\n";}}function
process_fields(&$n){$Vd=0;if($_POST["up"]){$kd=0;foreach($n
as$z=>$m){if(key($_POST["up"])==$z){unset($n[$z]);array_splice($n,$kd,0,array($m));break;}if(isset($m["field"]))$kd=$Vd;$Vd++;}}elseif($_POST["down"]){$wc=false;foreach($n
as$z=>$m){if(isset($m["field"])&&$wc){unset($n[key($_POST["down"])]);array_splice($n,$Vd,0,array($wc));break;}if(key($_POST["down"])==$z)$wc=$m;$Vd++;}}elseif($_POST["add"]){$n=array_values($n);array_splice($n,key($_POST["add"]),0,array(array()));}elseif(!$_POST["drop_col"])return
2014-05-08 19:46:08 +02:00
false;return
true;}function
normalize_enum($C){return"'".str_replace("'","''",addcslashes(stripcslashes(str_replace($C[0][0].$C[0][0],$C[0][0],substr($C[0],1,-1))),'\\'))."'";}function
grant($s,$Se,$e,$be){if(!$Se)return
true;if($Se==array("ALL PRIVILEGES","GRANT OPTION"))return($s=="GRANT"?queries("$s ALL PRIVILEGES$be WITH GRANT OPTION"):queries("$s ALL PRIVILEGES$be")&&queries("$s GRANT OPTION$be"));return
queries("$s ".preg_replace('~(GRANT OPTION)\\([^)]*\\)~','\\1',implode("$e, ",$Se).$e).$be);}function
drop_create($Hb,$i,$Ib,$hg,$Jb,$B,$Gd,$Ed,$Fd,$Yd,$Pd){if($_POST["drop"])query_redirect($Hb,$B,$Gd);elseif($Yd=="")query_redirect($i,$B,$Fd);elseif($Yd!=$Pd){$lb=queries($i);queries_redirect($B,$Ed,$lb&&queries($Hb));if($lb)queries($Ib);}else
queries_redirect($B,$Ed,queries($hg)&&queries($Jb)&&queries($Hb)&&queries($i));}function
create_trigger($be,$L){global$y;$mg=" $L[Timing] $L[Event]".($L["Event"]=="UPDATE OF"?" ".idf_escape($L["Of"]):"");return"CREATE TRIGGER ".idf_escape($L["Trigger"]).($y=="mssql"?$be.$mg:$mg.$be).rtrim(" $L[Type]\n$L[Statement]",";").";";}function
create_routine($pf,$L){global$Qc;$P=array();$n=(array)$L["fields"];ksort($n);foreach($n
as$m){if($m["field"]!="")$P[]=(preg_match("~^($Qc)\$~",$m["inout"])?"$m[inout] ":"").idf_escape($m["field"]).process_type($m,"CHARACTER SET");}return"CREATE $pf ".idf_escape(trim($L["name"]))." (".implode(", ",$P).")".(isset($_GET["function"])?" RETURNS".process_type($L["returns"],"CHARACTER SET"):"").($L["language"]?" LANGUAGE $L[language]":"").rtrim("\n$L[definition]",";").";";}function
remove_definer($I){return
preg_replace('~^([A-Z =]+) DEFINER=`'.preg_replace('~@(.*)~','`@`(%|\\1)',logged_user()).'`~','\\1',$I);}function
format_foreign_key($o){global$ce;return" FOREIGN KEY (".implode(", ",array_map('idf_escape',$o["source"])).") REFERENCES ".table($o["table"])." (".implode(", ",array_map('idf_escape',$o["target"])).")".(preg_match("~^($ce)\$~",$o["on_delete"])?" ON DELETE $o[on_delete]":"").(preg_match("~^($ce)\$~",$o["on_update"])?" ON UPDATE $o[on_update]":"");}function
tar_file($pc,$rg){$K=pack("a100a8a8a8a12a12",$pc,644,0,0,decoct($rg->size),decoct(time()));$Pa=8*32;for($u=0;$u<strlen($K);$u++)$Pa+=ord($K[$u]);$K.=sprintf("%06o",$Pa)."\0 ";echo$K,str_repeat("\0",512-strlen($K));$rg->send();echo
str_repeat("\0",511-($rg->size+511)%512);}function
ini_bytes($Pc){$X=ini_get($Pc);switch(strtolower(substr($X,-1))){case'g':$X*=1024;case'm':$X*=1024;case'k':$X*=1024;}return$X;}function
doc_link($De){global$y,$g;$Lg=array('sql'=>"http://dev.mysql.com/doc/refman/".substr($g->server_info,0,3)."/en/",'sqlite'=>"http://www.sqlite.org/",'pgsql'=>"http://www.postgresql.org/docs/".substr($g->server_info,0,3)."/static/",'mssql'=>"http://msdn.microsoft.com/library/",'oracle'=>"http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/",);return($De[$y]?"<a href='$Lg[$y]$De[$y]' target='_blank' rel='noreferrer'><sup>?</sup></a>":"");}function
ob_gzencode($Pf){return
gzencode($Pf);}function
db_size($k){global$g;if(!$g->select_db($k))return"?";$K=0;foreach(table_status()as$R)$K+=$R["Data_length"]+$R["Index_length"];return
format_number($K);}function
set_utf8mb4($i){global$g;static$P=false;if(!$P&&preg_match('~\butf8mb4~i',$i)){$P=true;echo"SET NAMES ".charset($g).";\n\n";}}function
connect_error(){global$c,$g,$T,$l,$Gb;if(DB!=""){header("HTTP/1.1 404 Not Found");page_header(lang(31).": ".h(DB),lang(98),true);}else{if($_POST["db"]&&!$l)queries_redirect(substr(ME,0,-1),lang(99),drop_databases($_POST["db"]));page_header(lang(100),$l,false);echo"<p class='links'>\n";foreach(array('database'=>lang(101),'privileges'=>lang(64),'processlist'=>lang(102),'variables'=>lang(103),'status'=>lang(104),'replication'=>lang(105),)as$z=>$X){if(support($z))echo"<a href='".h(ME)."$z='>$X</a>\n";}echo"<p>".lang(106,$Gb[DRIVER],"<b>".h($g->server_info)."</b>","<b>$g->extension</b>")."\n","<p>".lang(107,"<b>".h(logged_user())."</b>")."\n";$j=$c->databases();if($j){$vf=support("scheme");$Xa=collations();echo"<form action='' method='post'>\n","<table cellspacing='0' class='checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);'>\n","<thead><tr>".(support("database")?"<td>&nbsp;":"")."<th>".lang(31)." - <a href='".h(ME)."refresh=1'>".lang(108)."</a>"."<td>".lang(109)."<td>".lang(110)."<td>".lang(111)." - <a href='".h(ME)."dbsize=1' onclick=\"return !ajaxSetHtml('".h(js_escape(ME))."script=connect');\">".lang(112)."</a>"."</thead>\n";$j=($_GET["dbsize"]?count_tables($j):array_flip($j));foreach($j
as$k=>$S){$of=h(ME)."db=".urlencode($k);$v=h("Db-".$k);echo"<tr".odd().">".(support("database")?"<td>".checkbox("db[]",$k,in_array($k,(array)$_POST["db"]),"","","",$v):""),"<th><a href='$of' id='$k'>".h($k)."</a>";$Wa=nbsp(db_collation($k,$Xa));echo"<td>".(support("database")?"<a href='$of".($vf?"&amp;ns=":"")."&amp;database=' title='".lang(60)."'>$Wa</a>":$Wa),"<td align='right'><a href='$of&amp;schema=' id='tables-".h($k)."' title='".lang(63)."'>".($_GET["dbsize"]?$S:"?")."</a>","<td align='right' id='size-".h($k)."'>".($_GET["dbsize"]?db_size($k):"?"),"\n";}echo"</table>\n",(support("database")?"<fieldset><legend>".lang(113)." <span id='selected'></span></legend><div>\n"."<input type='hidden' name='all' value='' onclick=\"selectCount('selected', formChecked(this, /^db/));\">\n"."<input type='submit' name='drop' value='".lang(114)."'".confirm().">\n"."</div></fieldset>\n":""),"<script type='text/javascript'>tableCheck();</script>\n","<input type='hidden' name='token' value='$T'>\n","</form>\n";}}page_footer("db");}if(isset($_GET["status"]))$_GET["variables"]=$_GET["status"];if(isset($_GET["import"]))$_GET["sql"]=$_GET["import"];if(!(DB!=""?$g->select_db(DB):isset($_GET["sql"])||isset($_GET["dump"])||isset($_GET["database"])||isset($_GET["processlist"])||isset($_GET["privileges"])||isset($_GET["user"])||isset($_GET["replication"])||isset($_GET["variables"])||$_GET["script"]=="connect"||$_GET["script"]=="kill")){if(DB!=""||$_GET["refresh"]){restart_session();set_session("dbs",null);}connect_error();exit;}$ce="RESTRICT|NO ACTION|CASCADE|SET NULL|SET DEFAULT";class
2014-05-08 19:46:08 +02:00
TmpFile{var$handler;var$size;function
__construct(){$this->handler=tmpfile();}function
write($gb){$this->size+=strlen($gb);fwrite($this->handler,$gb);}function
send(){fseek($this->handler,0);fpassthru($this->handler);fclose($this->handler);}}$Xb="'(?:''|[^'\\\\]|\\\\.)*'";$Qc="IN|OUT|INOUT";if(isset($_GET["select"])&&($_POST["edit"]||$_POST["clone"])&&!$_POST["save"])$_GET["edit"]=$_GET["select"];if(isset($_GET["callf"]))$_GET["call"]=$_GET["callf"];if(isset($_GET["function"]))$_GET["procedure"]=$_GET["function"];if(isset($_GET["download"])){$b=$_GET["download"];$n=fields($b);header("Content-Type: application/octet-stream");header("Content-Disposition: attachment; filename=".friendly_url("$b-".implode("_",$_GET["where"])).".".friendly_url($_GET["field"]));$N=array(idf_escape($_GET["field"]));$J=$Fb->select($b,$N,array(where($_GET,$n)),$N);$L=($J?$J->fetch_row():array());echo$L[0];exit;}elseif(isset($_GET["table"])){$b=$_GET["table"];$n=fields($b);if(!$n)$l=error();$R=table_status1($b,true);page_header(($n&&is_view($R)?$R['Engine']=='materialized view'?lang(115):lang(116):lang(117)).": ".h($b),$l);$c->selectLinks($R);$bb=$R["Comment"];if($bb!="")echo"<p>".lang(43).": ".h($bb)."\n";if($n)$c->tableStructurePrint($n);if(!is_view($R)){if(support("indexes")){echo"<h3 id='indexes'>".lang(118)."</h3>\n";$x=indexes($b);if($x)$c->tableIndexesPrint($x);echo'<p class="links"><a href="'.h(ME).'indexes='.urlencode($b).'">'.lang(119)."</a>\n";}if(fk_support($R)){echo"<h3 id='foreign-keys'>".lang(86)."</h3>\n";$p=foreign_keys($b);if($p){echo"<table cellspacing='0'>\n","<thead><tr><th>".lang(120)."<td>".lang(121)."<td>".lang(89)."<td>".lang(88)."<td>&nbsp;</thead>\n";foreach($p
as$E=>$o){echo"<tr title='".h($E)."'>","<th><i>".implode("</i>, <i>",array_map('h',$o["source"]))."</i>","<td><a href='".h($o["db"]!=""?preg_replace('~db=[^&]*~',"db=".urlencode($o["db"]),ME):($o["ns"]!=""?preg_replace('~ns=[^&]*~',"ns=".urlencode($o["ns"]),ME):ME))."table=".urlencode($o["table"])."'>".($o["db"]!=""?"<b>".h($o["db"])."</b>.":"").($o["ns"]!=""?"<b>".h($o["ns"])."</b>.":"").h($o["table"])."</a>","(<i>".implode("</i>, <i>",array_map('h',$o["target"]))."</i>)","<td>".nbsp($o["on_delete"])."\n","<td>".nbsp($o["on_update"])."\n",'<td><a href="'.h(ME.'foreign='.urlencode($b).'&name='.urlencode($E)).'">'.lang(122).'</a>';}echo"</table>\n";}echo'<p class="links"><a href="'.h(ME).'foreign='.urlencode($b).'">'.lang(123)."</a>\n";}}if(support(is_view($R)?"view_trigger":"trigger")){echo"<h3 id='triggers'>".lang(124)."</h3>\n";$zg=triggers($b);if($zg){echo"<table cellspacing='0'>\n";foreach($zg
as$z=>$X)echo"<tr valign='top'><td>".h($X[0])."<td>".h($X[1])."<th>".h($z)."<td><a href='".h(ME.'trigger='.urlencode($b).'&name='.urlencode($z))."'>".lang(122)."</a>\n";echo"</table>\n";}echo'<p class="links"><a href="'.h(ME).'trigger='.urlencode($b).'">'.lang(125)."</a>\n";}}elseif(isset($_GET["schema"])){page_header(lang(63),"",array(),h(DB.($_GET["ns"]?".$_GET[ns]":"")));$Zf=array();$ag=array();$da=($_GET["schema"]?$_GET["schema"]:$_COOKIE["adminer_schema-".str_replace(".","_",DB)]);preg_match_all('~([^:]+):([-0-9.]+)x([-0-9.]+)(_|$)~',$da,$xd,PREG_SET_ORDER);foreach($xd
as$u=>$C){$Zf[$C[1]]=array($C[2],$C[3]);$ag[]="\n\t'".js_escape($C[1])."': [ $C[2], $C[3] ]";}$tg=0;$Ca=-1;$uf=array();$ff=array();$od=array();foreach(table_status('',true)as$Q=>$R){if(is_view($R))continue;$Ie=0;$uf[$Q]["fields"]=array();foreach(fields($Q)as$E=>$m){$Ie+=1.25;$m["pos"]=$Ie;$uf[$Q]["fields"][$E]=$m;}$uf[$Q]["pos"]=($Zf[$Q]?$Zf[$Q]:array($tg,0));foreach($c->foreignKeys($Q)as$X){if(!$X["db"]){$md=$Ca;if($Zf[$Q][1]||$Zf[$X["table"]][1])$md=min(floatval($Zf[$Q][1]),floatval($Zf[$X["table"]][1]))-1;else$Ca-=.1;while($od[(string)$md])$md-=.0001;$uf[$Q]["references"][$X["table"]][(string)$md]=array($X["source"],$X["target"]);$ff[$X["table"]][$Q][(string)$md]=$X["target"];$od[(string)$md]=true;}}$tg=max($tg,$uf[$Q]["pos"][0]+2.5+$Ie);}echo'<div id="schema" style="height: ',$tg,'em;" onselectstart="return false;">
2014-05-08 19:46:08 +02:00
<script type="text/javascript">
var tablePos = {',implode(",",$ag)."\n",'};
var em = document.getElementById(\'schema\').offsetHeight / ',$tg,';
2014-05-08 19:46:08 +02:00
document.onmousemove = schemaMousemove;
document.onmouseup = function (ev) {
schemaMouseup(ev, \'',js_escape(DB),'\');
};
</script>
';foreach($uf
as$E=>$Q){echo"<div class='table' style='top: ".$Q["pos"][0]."em; left: ".$Q["pos"][1]."em;' onmousedown='schemaMousedown(this, event);'>",'<a href="'.h(ME).'table='.urlencode($E).'"><b>'.h($E)."</b></a>";foreach($Q["fields"]as$m){$X='<span'.type_class($m["type"]).' title="'.h($m["full_type"].($m["null"]?" NULL":'')).'">'.h($m["field"]).'</span>';echo"<br>".($m["primary"]?"<i>$X</i>":$X);}foreach((array)$Q["references"]as$fg=>$gf){foreach($gf
as$md=>$cf){$nd=$md-$Zf[$E][1];$u=0;foreach($cf[0]as$If)echo"\n<div class='references' title='".h($fg)."' id='refs$md-".($u++)."' style='left: $nd"."em; top: ".$Q["fields"][$If]["pos"]."em; padding-top: .5em;'><div style='border-top: 1px solid Gray; width: ".(-$nd)."em;'></div></div>";}}foreach((array)$ff[$E]as$fg=>$gf){foreach($gf
as$md=>$e){$nd=$md-$Zf[$E][1];$u=0;foreach($e
as$eg)echo"\n<div class='references' title='".h($fg)."' id='refd$md-".($u++)."' style='left: $nd"."em; top: ".$Q["fields"][$eg]["pos"]."em; height: 1.25em; background: url(".h(preg_replace("~\\?.*~","",ME))."?file=arrow.gif) no-repeat right center;&amp;version=4.3.1&amp;driver=mysql'><div style='height: .5em; border-bottom: 1px solid Gray; width: ".(-$nd)."em;'></div></div>";}}echo"\n</div>\n";}foreach($uf
as$E=>$Q){foreach((array)$Q["references"]as$fg=>$gf){foreach($gf
as$md=>$cf){$Id=$tg;$Ad=-10;foreach($cf[0]as$z=>$If){$Je=$Q["pos"][0]+$Q["fields"][$If]["pos"];$Ke=$uf[$fg]["pos"][0]+$uf[$fg]["fields"][$cf[1][$z]]["pos"];$Id=min($Id,$Je,$Ke);$Ad=max($Ad,$Je,$Ke);}echo"<div class='references' id='refl$md' style='left: $md"."em; top: $Id"."em; padding: .5em 0;'><div style='border-right: 1px solid Gray; margin-top: 1px; height: ".($Ad-$Id)."em;'></div></div>\n";}}}echo'</div>
<p class="links"><a href="',h(ME."schema=".urlencode($da)),'" id="schema-link">',lang(126),'</a>
';}elseif(isset($_GET["dump"])){$b=$_GET["dump"];if($_POST&&!$l){$jb="";foreach(array("output","format","db_style","routines","events","table_style","auto_increment","triggers","data_style")as$z)$jb.="&$z=".urlencode($_POST[$z]);cookie("adminer_export",substr($jb,1));$S=array_flip((array)$_POST["tables"])+array_flip((array)$_POST["data"]);$ic=dump_headers((count($S)==1?key($S):DB),(DB==""||count($S)>1));$Yc=preg_match('~sql~',$_POST["format"]);if($Yc){echo"-- Adminer $fa ".$Gb[DRIVER]." dump\n\n";if($y=="sql"){echo"SET NAMES utf8;
2014-05-08 19:46:08 +02:00
SET time_zone = '+00:00';
".($_POST["data_style"]?"SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
":"")."
";$g->query("SET time_zone = '+00:00';");}}$Rf=$_POST["db_style"];$j=array(DB);if(DB==""){$j=$_POST["databases"];if(is_string($j))$j=explode("\n",rtrim(str_replace("\r","",$j),"\n"));}foreach((array)$j
as$k){$c->dumpDatabase($k);if($g->select_db($k)){if($Yc&&preg_match('~CREATE~',$Rf)&&($i=$g->result("SHOW CREATE DATABASE ".idf_escape($k),1))){set_utf8mb4($i);if($Rf=="DROP+CREATE")echo"DROP DATABASE IF EXISTS ".idf_escape($k).";\n";echo"$i;\n";}if($Yc){if($Rf)echo
use_sql($k).";\n\n";$te="";if($_POST["routines"]){foreach(array("FUNCTION","PROCEDURE")as$pf){foreach(get_rows("SHOW $pf STATUS WHERE Db = ".q($k),null,"-- ")as$L){$i=remove_definer($g->result("SHOW CREATE $pf ".idf_escape($L["Name"]),2));set_utf8mb4($i);$te.=($Rf!='DROP+CREATE'?"DROP $pf IF EXISTS ".idf_escape($L["Name"]).";;\n":"")."$i;;\n\n";}}}if($_POST["events"]){foreach(get_rows("SHOW EVENTS",null,"-- ")as$L){$i=remove_definer($g->result("SHOW CREATE EVENT ".idf_escape($L["Name"]),3));set_utf8mb4($i);$te.=($Rf!='DROP+CREATE'?"DROP EVENT IF EXISTS ".idf_escape($L["Name"]).";;\n":"")."$i;;\n\n";}}if($te)echo"DELIMITER ;;\n\n$te"."DELIMITER ;\n\n";}if($_POST["table_style"]||$_POST["data_style"]){$Ug=array();foreach(table_status('',true)as$E=>$R){$Q=(DB==""||in_array($E,(array)$_POST["tables"]));$pb=(DB==""||in_array($E,(array)$_POST["data"]));if($Q||$pb){if($ic=="tar"){$rg=new
TmpFile;ob_start(array($rg,'write'),1e5);}$c->dumpTable($E,($Q?$_POST["table_style"]:""),(is_view($R)?2:0));if(is_view($R))$Ug[]=$E;elseif($pb){$n=fields($E);$c->dumpData($E,$_POST["data_style"],"SELECT *".convert_fields($n,$n)." FROM ".table($E));}if($Yc&&$_POST["triggers"]&&$Q&&($zg=trigger_sql($E,$_POST["table_style"])))echo"\nDELIMITER ;;\n$zg\nDELIMITER ;\n";if($ic=="tar"){ob_end_flush();tar_file((DB!=""?"":"$k/")."$E.csv",$rg);}elseif($Yc)echo"\n";}}foreach($Ug
as$Tg)$c->dumpTable($Tg,$_POST["table_style"],1);if($ic=="tar")echo
pack("x512");}}}if($Yc)echo"-- ".$g->result("SELECT NOW()")."\n";exit;}page_header(lang(66),$l,($_GET["export"]!=""?array("table"=>$_GET["export"]):array()),h(DB));echo'
2014-05-08 19:46:08 +02:00
<form action="" method="post">
<table cellspacing="0">
';$tb=array('','USE','DROP+CREATE','CREATE');$bg=array('','DROP+CREATE','CREATE');$qb=array('','TRUNCATE+INSERT','INSERT');if($y=="sql")$qb[]='INSERT+UPDATE';parse_str($_COOKIE["adminer_export"],$L);if(!$L)$L=array("output"=>"text","format"=>"sql","db_style"=>(DB!=""?"":"CREATE"),"table_style"=>"DROP+CREATE","data_style"=>"INSERT");if(!isset($L["events"])){$L["routines"]=$L["events"]=($_GET["dump"]=="");$L["triggers"]=$L["table_style"];}echo"<tr><th>".lang(127)."<td>".html_select("output",$c->dumpOutput(),$L["output"],0)."\n";echo"<tr><th>".lang(128)."<td>".html_select("format",$c->dumpFormat(),$L["format"],0)."\n";echo($y=="sqlite"?"":"<tr><th>".lang(31)."<td>".html_select('db_style',$tb,$L["db_style"]).(support("routine")?checkbox("routines",1,$L["routines"],lang(129)):"").(support("event")?checkbox("events",1,$L["events"],lang(130)):"")),"<tr><th>".lang(110)."<td>".html_select('table_style',$bg,$L["table_style"]).checkbox("auto_increment",1,$L["auto_increment"],lang(44)).(support("trigger")?checkbox("triggers",1,$L["triggers"],lang(124)):""),"<tr><th>".lang(131)."<td>".html_select('data_style',$qb,$L["data_style"]),'</table>
<p><input type="submit" value="',lang(66),'">
2014-05-08 19:46:08 +02:00
<input type="hidden" name="token" value="',$T,'">
<table cellspacing="0">
';$Ne=array();if(DB!=""){$Na=($b!=""?"":" checked");echo"<thead><tr>","<th style='text-align: left;'><label class='block'><input type='checkbox' id='check-tables'$Na onclick='formCheck(this, /^tables\\[/);'>".lang(110)."</label>","<th style='text-align: right;'><label class='block'>".lang(131)."<input type='checkbox' id='check-data'$Na onclick='formCheck(this, /^data\\[/);'></label>","</thead>\n";$Ug="";$cg=tables_list();foreach($cg
as$E=>$U){$Me=preg_replace('~_.*~','',$E);$Na=($b==""||$b==(substr($b,-1)=="%"?"$Me%":$E));$Pe="<tr><td>".checkbox("tables[]",$E,$Na,$E,"checkboxClick(event, this); formUncheck('check-tables');","block");if($U!==null&&!preg_match('~table~i',$U))$Ug.="$Pe\n";else
echo"$Pe<td align='right'><label class='block'><span id='Rows-".h($E)."'></span>".checkbox("data[]",$E,$Na,"","checkboxClick(event, this); formUncheck('check-data');")."</label>\n";$Ne[$Me]++;}echo$Ug;if($cg)echo"<script type='text/javascript'>ajaxSetHtml('".js_escape(ME)."script=db');</script>\n";}else{echo"<thead><tr><th style='text-align: left;'><label class='block'><input type='checkbox' id='check-databases'".($b==""?" checked":"")." onclick='formCheck(this, /^databases\\[/);'>".lang(31)."</label></thead>\n";$j=$c->databases();if($j){foreach($j
as$k){if(!information_schema($k)){$Me=preg_replace('~_.*~','',$k);echo"<tr><td>".checkbox("databases[]",$k,$b==""||$b=="$Me%",$k,"formUncheck('check-databases');","block")."\n";$Ne[$Me]++;}}}else
2014-05-08 19:46:08 +02:00
echo"<tr><td><textarea name='databases' rows='10' cols='20'></textarea>";}echo'</table>
</form>
';$rc=true;foreach($Ne
as$z=>$X){if($z!=""&&$X>1){echo($rc?"<p>":" ")."<a href='".h(ME)."dump=".urlencode("$z%")."'>".h($z)."</a>";$rc=false;}}}elseif(isset($_GET["privileges"])){page_header(lang(64));echo'<p class="links"><a href="'.h(ME).'user=">'.lang(132)."</a>";$J=$g->query("SELECT User, Host FROM mysql.".(DB==""?"user":"db WHERE ".q(DB)." LIKE Db")." ORDER BY Host, User");$s=$J;if(!$J)$J=$g->query("SELECT SUBSTRING_INDEX(CURRENT_USER, '@', 1) AS User, SUBSTRING_INDEX(CURRENT_USER, '@', -1) AS Host");echo"<form action=''><p>\n";hidden_fields_get();echo"<input type='hidden' name='db' value='".h(DB)."'>\n",($s?"":"<input type='hidden' name='grant' value=''>\n"),"<table cellspacing='0'>\n","<thead><tr><th>".lang(29)."<th>".lang(28)."<th>&nbsp;</thead>\n";while($L=$J->fetch_assoc())echo'<tr'.odd().'><td>'.h($L["User"])."<td>".h($L["Host"]).'<td><a href="'.h(ME.'user='.urlencode($L["User"]).'&host='.urlencode($L["Host"])).'">'.lang(10)."</a>\n";if(!$s||DB!="")echo"<tr".odd()."><td><input name='user' autocapitalize='off'><td><input name='host' value='localhost' autocapitalize='off'><td><input type='submit' value='".lang(10)."'>\n";echo"</table>\n","</form>\n";}elseif(isset($_GET["sql"])){if(!$l&&$_POST["export"]){dump_headers("sql");$c->dumpTable("","");$c->dumpData("","table",$_POST["query"]);exit;}restart_session();$Hc=&get_session("queries");$Gc=&$Hc[DB];if(!$l&&$_POST["clear"]){$Gc=array();redirect(remove_from_uri("history"));}page_header((isset($_GET["import"])?lang(65):lang(57)),$l);if(!$l&&$_POST){$q=false;if(!isset($_GET["import"]))$I=$_POST["query"];elseif($_POST["webfile"]){$q=@fopen((file_exists("adminer.sql")?"adminer.sql":"compress.zlib://adminer.sql.gz"),"rb");$I=($q?fread($q,1e6):false);}else$I=get_file("sql_file",true);if(is_string($I)){if(function_exists('memory_get_usage'))@ini_set("memory_limit",max(ini_bytes("memory_limit"),2*strlen($I)+memory_get_usage()+8e6));if($I!=""&&strlen($I)<1e6){$H=$I.(preg_match("~;[ \t\r\n]*\$~",$I)?"":";");if(!$Gc||reset(end($Gc))!=$H){restart_session();$Gc[]=array($H,time());set_session("queries",$Hc);stop_session();}}$Jf="(?:\\s|/\\*[\s\S]*?\\*/|(?:#|-- )[^\n]*\n?|--\r?\n)";$xb=";";$Vd=0;$Ub=true;$h=connect();if(is_object($h)&&DB!="")$h->select_db(DB);$ab=0;$Zb=array();$ye='[\'"'.($y=="sql"?'`#':($y=="sqlite"?'`[':($y=="mssql"?'[':''))).']|/\\*|-- |$'.($y=="pgsql"?'|\\$[^$]*\\$':'');$ug=microtime(true);parse_str($_COOKIE["adminer_export"],$la);$Lb=$c->dumpFormat();unset($Lb["sql"]);while($I!=""){if(!$Vd&&preg_match("~^$Jf*+DELIMITER\\s+(\\S+)~i",$I,$C)){$xb=$C[1];$I=substr($I,strlen($C[0]));}else{preg_match('('.preg_quote($xb)."\\s*|$ye)",$I,$C,PREG_OFFSET_CAPTURE,$Vd);list($wc,$Ie)=$C[0];if(!$wc&&$q&&!feof($q))$I.=fread($q,1e5);else{if(!$wc&&rtrim($I)=="")break;$Vd=$Ie+strlen($wc);if($wc&&rtrim($wc)!=$xb){while(preg_match('('.($wc=='/*'?'\\*/':($wc=='['?']':(preg_match('~^-- |^#~',$wc)?"\n":preg_quote($wc)."|\\\\."))).'|$)s',$I,$C,PREG_OFFSET_CAPTURE,$Vd)){$sf=$C[0][0];if(!$sf&&$q&&!feof($q))$I.=fread($q,1e5);else{$Vd=$C[0][1]+strlen($sf);if($sf[0]!="\\")break;}}}else{$Ub=false;$H=substr($I,0,$Ie);$ab++;$Pe="<pre id='sql-$ab'><code class='jush-$y'>".$c->sqlCommandQuery($H)."</code></pre>\n";if($y=="sqlite"&&preg_match("~^$Jf*+ATTACH\\b~i",$H,$C)){echo$Pe,"<p class='error'>".lang(133)."\n";$Zb[]=" <a href='#sql-$ab'>$ab</a>";if($_POST["error_stops"])break;}else{if(!$_POST["only_errors"]){echo$Pe;ob_flush();flush();}$Lf=microtime(true);if($g->multi_query($H)&&is_object($h)&&preg_match("~^$Jf*+USE\\b~i",$H))$h->query($H);do{$J=$g->store_result();$kg=" <span class='time'>(".format_time($Lf).")</span>".(strlen($H)<1000?" <a href='".h(ME)."sql=".urlencode(trim($H))."'>".lang(10)."</a>":"");if($g->error){echo($_POST["only_errors"]?$Pe:""),"<p class='error'>".lang(134).($g->errno?" ($g->errno)":"").": ".error()."\n";$Zb[]=" <a href='#sql-$ab'>$ab</a>";if($_POST["error_stops"])break
2;}elseif(is_object($J)){$_=$_POST["limit"];$ne=select($J,$h,array(),$_);if(!$_POST["only_errors"]){echo"<form action='' method='post'>\n";$Sd=$J->num_rows;echo"<p>".($Sd?($_&&$Sd>$_?lang(135,$_):"").lang(136,$Sd):""),$kg;$v="export-$ab";$hc=", <a href='#$v' onclick=\"return !toggle('$v');\">".lang(66)."</a><span id='$v' class='hidden'>: ".html_select("output",$c->dumpOutput(),$la["output"])." ".html_select("format",$Lb,$la["format"])."<input type='hidden' name='query' value='".h($H)."'>"." <input type='submit' name='export' value='".lang(66)."'><input type='hidden' name='token' value='$T'></span>\n";if($h&&preg_match("~^($Jf|\\()*+SELECT\\b~i",$H)&&($gc=explain($h,$H))){$v="explain-$ab";echo", <a href='#$v' onclick=\"return !toggle('$v');\">EXPLAIN</a>$hc","<div id='$v' class='hidden'>\n";select($gc,$h,$ne);echo"</div>\n";}else
echo$hc;echo"</form>\n";}}else{if(preg_match("~^$Jf*+(CREATE|DROP|ALTER)$Jf++(DATABASE|SCHEMA)\\b~i",$H)){restart_session();set_session("dbs",null);stop_session();}if(!$_POST["only_errors"])echo"<p class='message' title='".h($g->info)."'>".lang(137,$g->affected_rows)."$kg\n";}$Lf=microtime(true);}while($g->next_result());}$I=substr($I,$Vd);$Vd=0;}}}}if($Ub)echo"<p class='message'>".lang(138)."\n";elseif($_POST["only_errors"]){echo"<p class='message'>".lang(139,$ab-count($Zb))," <span class='time'>(".format_time($ug).")</span>\n";}elseif($Zb&&$ab>1)echo"<p class='error'>".lang(134).": ".implode("",$Zb)."\n";}else
echo"<p class='error'>".upload_error($I)."\n";}echo'
2014-05-08 19:46:08 +02:00
<form action="" method="post" enctype="multipart/form-data" id="form">
';$ec="<input type='submit' value='".lang(140)."' title='Ctrl+Enter'>";if(!isset($_GET["import"])){$H=$_GET["sql"];if($_POST)$H=$_POST["query"];elseif($_GET["history"]=="all")$H=$Gc;elseif($_GET["history"]!="")$H=$Gc[$_GET["history"]][0];echo"<p>";textarea("query",$H,20);echo($_POST?"":"<script type='text/javascript'>document.getElementsByTagName('textarea')[0].focus();</script>\n"),"<p>$ec\n",lang(141).": <input type='number' name='limit' class='size' value='".h($_POST?$_POST["limit"]:$_GET["limit"])."'>\n";}else{echo"<fieldset><legend>".lang(142)."</legend><div>",(ini_bool("file_uploads")?"SQL (&lt; ".ini_get("upload_max_filesize")."B): <input type='file' name='sql_file[]' multiple>\n$ec":lang(143)),"</div></fieldset>\n","<fieldset><legend>".lang(144)."</legend><div>",lang(145,"<code>adminer.sql".(extension_loaded("zlib")?"[.gz]":"")."</code>"),' <input type="submit" name="webfile" value="'.lang(146).'">',"</div></fieldset>\n","<p>";}echo
checkbox("error_stops",1,($_POST?$_POST["error_stops"]:isset($_GET["import"])),lang(147))."\n",checkbox("only_errors",1,($_POST?$_POST["only_errors"]:isset($_GET["import"])),lang(148))."\n","<input type='hidden' name='token' value='$T'>\n";if(!isset($_GET["import"])&&$Gc){print_fieldset("history",lang(149),$_GET["history"]!="");for($X=end($Gc);$X;$X=prev($Gc)){$z=key($Gc);list($H,$kg,$Pb)=$X;echo'<a href="'.h(ME."sql=&history=$z").'">'.lang(10)."</a>"." <span class='time' title='".@date('Y-m-d',$kg)."'>".@date("H:i:s",$kg)."</span>"." <code class='jush-$y'>".shorten_utf8(ltrim(str_replace("\n"," ",str_replace("\r","",preg_replace('~^(#|-- ).*~m','',$H)))),80,"</code>").($Pb?" <span class='time'>($Pb)</span>":"")."<br>\n";}echo"<input type='submit' name='clear' value='".lang(150)."'>\n","<a href='".h(ME."sql=&history=all")."'>".lang(151)."</a>\n","</div></fieldset>\n";}echo'</form>
';}elseif(isset($_GET["edit"])){$b=$_GET["edit"];$n=fields($b);$Z=(isset($_GET["select"])?(count($_POST["check"])==1?where_check($_POST["check"][0],$n):""):where($_GET,$n));$Jg=(isset($_GET["select"])?$_POST["edit"]:$Z);foreach($n
as$E=>$m){if(!isset($m["privileges"][$Jg?"update":"insert"])||$c->fieldName($m)=="")unset($n[$E]);}if($_POST&&!$l&&!isset($_GET["select"])){$B=$_POST["referer"];if($_POST["insert"])$B=($Jg?null:$_SERVER["REQUEST_URI"]);elseif(!preg_match('~^.+&select=.+$~',$B))$B=ME."select=".urlencode($b);$x=indexes($b);$Eg=unique_array($_GET["where"],$x);$Ye="\nWHERE $Z";if(isset($_POST["delete"]))queries_redirect($B,lang(152),$Fb->delete($b,$Ye,!$Eg));else{$P=array();foreach($n
as$E=>$m){$X=process_input($m);if($X!==false&&$X!==null)$P[idf_escape($E)]=$X;}if($Jg){if(!$P)redirect($B);queries_redirect($B,lang(153),$Fb->update($b,$P,$Ye,!$Eg));if(is_ajax()){page_headers();page_messages($l);exit;}}else{$J=$Fb->insert($b,$P);$ld=($J?last_id():0);queries_redirect($B,lang(154,($ld?" $ld":"")),$J);}}}$L=null;if($_POST["save"])$L=(array)$_POST["fields"];elseif($Z){$N=array();foreach($n
as$E=>$m){if(isset($m["privileges"]["select"])){$ua=convert_field($m);if($_POST["clone"]&&$m["auto_increment"])$ua="''";if($y=="sql"&&preg_match("~enum|set~",$m["type"]))$ua="1*".idf_escape($E);$N[]=($ua?"$ua AS ":"").idf_escape($E);}}$L=array();if(!support("table"))$N=array("*");if($N){$J=$Fb->select($b,$N,array($Z),$N,array(),(isset($_GET["select"])?2:1));$L=$J->fetch_assoc();if(!$L)$L=false;if(isset($_GET["select"])&&(!$L||$J->fetch_assoc()))$L=null;}}if(!support("table")&&!$n){if(!$Z){$J=$Fb->select($b,array("*"),$Z,array("*"));$L=($J?$J->fetch_assoc():false);if(!$L)$L=array($Fb->primary=>"");}if($L){foreach($L
as$z=>$X){if(!$Z)$L[$z]=null;$n[$z]=array("field"=>$z,"null"=>($z!=$Fb->primary),"auto_increment"=>($z==$Fb->primary));}}}edit_form($b,$n,$L,$Jg);}elseif(isset($_GET["create"])){$b=$_GET["create"];$ze=array();foreach(array('HASH','LINEAR HASH','KEY','LINEAR KEY','RANGE','LIST')as$z)$ze[$z]=$z;$ef=referencable_primary($b);$p=array();foreach($ef
as$Yf=>$m)$p[str_replace("`","``",$Yf)."`".str_replace("`","``",$m["field"])]=$Yf;$qe=array();$R=array();if($b!=""){$qe=fields($b);$R=table_status($b);if(!$R)$l=lang(9);}$L=$_POST;$L["fields"]=(array)$L["fields"];if($L["auto_increment_col"])$L["fields"][$L["auto_increment_col"]]["auto_increment"]=true;if($_POST&&!process_fields($L["fields"])&&!$l){if($_POST["drop"])queries_redirect(substr(ME,0,-1),lang(155),drop_tables(array($b)));else{$n=array();$ra=array();$Mg=false;$tc=array();$pe=reset($qe);$pa=" FIRST";foreach($L["fields"]as$z=>$m){$o=$p[$m["type"]];$_g=($o!==null?$ef[$o]:$m);if($m["field"]!=""){if(!$m["has_default"])$m["default"]=null;if($z==$L["auto_increment_col"])$m["auto_increment"]=true;$Ue=process_field($m,$_g);$ra[]=array($m["orig"],$Ue,$pa);if($Ue!=process_field($pe,$pe)){$n[]=array($m["orig"],$Ue,$pa);if($m["orig"]!=""||$pa)$Mg=true;}if($o!==null)$tc[idf_escape($m["field"])]=($b!=""&&$y!="sqlite"?"ADD":" ").format_foreign_key(array('table'=>$p[$m["type"]],'source'=>array($m["field"]),'target'=>array($_g["field"]),'on_delete'=>$m["on_delete"],));$pa=" AFTER ".idf_escape($m["field"]);}elseif($m["orig"]!=""){$Mg=true;$n[]=array($m["orig"]);}if($m["orig"]!=""){$pe=next($qe);if(!$pe)$pa="";}}$Ae="";if($ze[$L["partition_by"]]){$Be=array();if($L["partition_by"]=='RANGE'||$L["partition_by"]=='LIST'){foreach(array_filter($L["partition_names"])as$z=>$X){$Y=$L["partition_values"][$z];$Be[]="\n PARTITION ".idf_escape($X)." VALUES ".($L["partition_by"]=='RANGE'?"LESS THAN":"IN").($Y!=""?" ($Y)":" MAXVALUE");}}$Ae.="\nPARTITION BY $L[partition_by]($L[partition])".($Be?" (".implode(",",$Be)."\n)":($L["partitions"]?" PARTITIONS ".(+$L["partitions"]):""));}elseif(support("partitioning")&&preg_match("~partitioned~",$R["Create_options"]))$Ae.="\nREMOVE PARTITIONING";$D=lang(156);if($b==""){cookie("adminer_engine",$L["Engine"]);$D=lang(157);}$E=trim($L["name"]);queries_redirect(ME.(support("table")?"table=":"select=").urlencode($E),$D,alter_table($b,$E,($y=="sqlite"&&($Mg||$tc)?$ra:$n),$tc,($L["Comment"]!=$R["Comment"]?$L["Comment"]:null),($L["Engine"]&&$L["Engine"]!=$R["Engine"]?$L["Engine"]:""),($L["Collation"]&&$L["Collation"]!=$R["Collation"]?$L["Collation"]:""),($L["Auto_increment"]!=""?number($L["Auto_increment"]):""),$Ae));}}page_header(($b!=""?lang(38):lang(67)),$l,array("table"=>$b),h($b));if(!$_POST){$L=array("Engine"=>$_COOKIE["adminer_engine"],"fields"=>array(array("field"=>"","type"=>(isset($Bg["int"])?"int":(isset($Bg["integer"])?"integer":"")))),"partition_names"=>array(""),);if($b!=""){$L=$R;$L["name"]=$b;$L["fields"]=array();if(!$_GET["auto_increment"])$L["Auto_increment"]="";foreach($qe
as$m){$m["has_default"]=isset($m["default"]);$L["fields"][]=$m;}if(support("partitioning")){$yc="FROM information_schema.PARTITIONS WHERE TABLE_SCHEMA = ".q(DB)." AND TABLE_NAME = ".q($b);$J=$g->query("SELECT PARTITION_METHOD, PARTITION_ORDINAL_POSITION, PARTITION_EXPRESSION $yc ORDER BY PARTITION_ORDINAL_POSITION DESC LIMIT 1");list($L["partition_by"],$L["partitions"],$L["partition"])=$J->fetch_row();$Be=get_key_vals("SELECT PARTITION_NAME, PARTITION_DESCRIPTION $yc AND PARTITION_NAME != '' ORDER BY PARTITION_ORDINAL_POSITION");$Be[""]="";$L["partition_names"]=array_keys($Be);$L["partition_values"]=array_values($Be);}}}$Xa=collations();$Wb=engines();foreach($Wb
as$Vb){if(!strcasecmp($Vb,$L["Engine"])){$L["Engine"]=$Vb;break;}}echo'
2014-05-08 19:46:08 +02:00
<form action="" method="post" id="form">
<p>
';if(support("columns")||$b==""){echo
lang(158),': <input name="name" maxlength="64" value="',h($L["name"]),'" autocapitalize="off">
';if($b==""&&!$_POST){?><script type='text/javascript'>focus(document.getElementById('form')['name']);</script><?php }echo($Wb?"<select name='Engine' onchange='helpClose();'".on_help("getTarget(event).value",1).">".optionlist(array(""=>"(".lang(159).")")+$Wb,$L["Engine"])."</select>":""),' ',($Xa&&!preg_match("~sqlite|mssql~",$y)?html_select("Collation",array(""=>"(".lang(87).")")+$Xa,$L["Collation"]):""),' <input type="submit" value="',lang(14),'">
2014-05-08 19:46:08 +02:00
';}echo'
';if(support("columns")){echo'<table cellspacing="0" id="edit-fields" class="nowrap">
';$cb=($_POST?$_POST["comments"]:$L["Comment"]!="");if(!$_POST&&!$cb){foreach($L["fields"]as$m){if($m["comment"]!=""){$cb=true;break;}}}edit_fields($L["fields"],$Xa,"TABLE",$p,$cb);echo'</table>
2014-05-08 19:46:08 +02:00
<p>
',lang(44),': <input type="number" name="Auto_increment" size="6" value="',h($L["Auto_increment"]),'">
',checkbox("defaults",1,true,lang(160),"columnShow(this.checked, 5)","jsonly");if(!$_POST["defaults"]){echo'<script type="text/javascript">editingHideDefaults()</script>';}echo(support("comment")?"<label><input type='checkbox' name='comments' value='1' class='jsonly' onclick=\"columnShow(this.checked, 6); toggle('Comment'); if (this.checked) this.form['Comment'].focus();\"".($cb?" checked":"").">".lang(43)."</label>".' <input name="Comment" id="Comment" value="'.h($L["Comment"]).'" maxlength="'.($g->server_info>=5.5?2048:60).'"'.($cb?'':' class="hidden"').'>':''),'<p>
2014-05-08 19:46:08 +02:00
<input type="submit" value="',lang(14),'">
';}echo'
';if($b!=""){echo'<input type="submit" name="drop" value="',lang(114),'"',confirm(),'>';}if(support("partitioning")){$_e=preg_match('~RANGE|LIST~',$L["partition_by"]);print_fieldset("partition",lang(161),$L["partition_by"]);echo'<p>
',"<select name='partition_by' onchange='partitionByChange(this);'".on_help("getTarget(event).value.replace(/./, 'PARTITION BY \$&')",1).">".optionlist(array(""=>"")+$ze,$L["partition_by"])."</select>",'(<input name="partition" value="',h($L["partition"]),'">)
',lang(162),': <input type="number" name="partitions" class="size',($_e||!$L["partition_by"]?" hidden":""),'" value="',h($L["partitions"]),'">
<table cellspacing="0" id="partition-table"',($_e?"":" class='hidden'"),'>
<thead><tr><th>',lang(163),'<th>',lang(164),'</thead>
';foreach($L["partition_names"]as$z=>$X){echo'<tr>','<td><input name="partition_names[]" value="'.h($X).'"'.($z==count($L["partition_names"])-1?' onchange="partitionNameChange(this);"':'').' autocapitalize="off">','<td><input name="partition_values[]" value="'.h($L["partition_values"][$z]).'">';}echo'</table>
2014-05-08 19:46:08 +02:00
</div></fieldset>
';}echo'<input type="hidden" name="token" value="',$T,'">
</form>
';}elseif(isset($_GET["indexes"])){$b=$_GET["indexes"];$Oc=array("PRIMARY","UNIQUE","INDEX");$R=table_status($b,true);if(preg_match('~MyISAM|M?aria'.($g->server_info>=5.6?'|InnoDB':'').'~i',$R["Engine"]))$Oc[]="FULLTEXT";if(preg_match('~MyISAM|M?aria'.($g->server_info>=5.7?'|InnoDB':'').'~i',$R["Engine"]))$Oc[]="SPATIAL";$x=indexes($b);$Oe=array();if($y=="mongo"){$Oe=$x["_id_"];unset($Oc[0]);unset($x["_id_"]);}$L=$_POST;if($_POST&&!$l&&!$_POST["add"]&&!$_POST["drop_col"]){$sa=array();foreach($L["indexes"]as$w){$E=$w["name"];if(in_array($w["type"],$Oc)){$e=array();$rd=array();$zb=array();$P=array();ksort($w["columns"]);foreach($w["columns"]as$z=>$d){if($d!=""){$qd=$w["lengths"][$z];$yb=$w["descs"][$z];$P[]=idf_escape($d).($qd?"(".(+$qd).")":"").($yb?" DESC":"");$e[]=$d;$rd[]=($qd?$qd:null);$zb[]=$yb;}}if($e){$fc=$x[$E];if($fc){ksort($fc["columns"]);ksort($fc["lengths"]);ksort($fc["descs"]);if($w["type"]==$fc["type"]&&array_values($fc["columns"])===$e&&(!$fc["lengths"]||array_values($fc["lengths"])===$rd)&&array_values($fc["descs"])===$zb){unset($x[$E]);continue;}}$sa[]=array($w["type"],$E,$P);}}}foreach($x
as$E=>$fc)$sa[]=array($fc["type"],$E,"DROP");if(!$sa)redirect(ME."table=".urlencode($b));queries_redirect(ME."table=".urlencode($b),lang(165),alter_indexes($b,$sa));}page_header(lang(118),$l,array("table"=>$b),h($b));$n=array_keys(fields($b));if($_POST["add"]){foreach($L["indexes"]as$z=>$w){if($w["columns"][count($w["columns"])]!="")$L["indexes"][$z]["columns"][]="";}$w=end($L["indexes"]);if($w["type"]||array_filter($w["columns"],'strlen'))$L["indexes"][]=array("columns"=>array(1=>""));}if(!$L){foreach($x
as$z=>$w){$x[$z]["name"]=$z;$x[$z]["columns"][]="";}$x[]=array("columns"=>array(1=>""));$L["indexes"]=$x;}echo'
2014-05-08 19:46:08 +02:00
<form action="" method="post">
<table cellspacing="0" class="nowrap">
<thead><tr>
<th id="label-type">',lang(166),'<th><input type="submit" class="wayoff">',lang(167),'<th id="label-name">',lang(168);?>
<th><noscript><input type='image' class='icon' name='add[0]' src='" . h(preg_replace("~\\?.*~", "", ME)) . "?file=plus.gif&amp;version=4.3.1&amp;driver=mysql' alt='+' title='<?php echo
lang(94),'\'></noscript>&nbsp;
2014-05-08 19:46:08 +02:00
</thead>
';if($Oe){echo"<tr><td>PRIMARY<td>";foreach($Oe["columns"]as$z=>$d){echo
select_input(" disabled",$n,$d),"<label><input disabled type='checkbox'>".lang(52)."</label> ";}echo"<td><td>\n";}$bd=1;foreach($L["indexes"]as$w){if(!$_POST["drop_col"]||$bd!=key($_POST["drop_col"])){echo"<tr><td>".html_select("indexes[$bd][type]",array(-1=>"")+$Oc,$w["type"],($bd==count($L["indexes"])?"indexesAddRow(this);":1),"label-type"),"<td>";ksort($w["columns"]);$u=1;foreach($w["columns"]as$z=>$d){echo"<span>".select_input(" name='indexes[$bd][columns][$u]' onchange=\"".($u==count($w["columns"])?"indexesAddColumn":"indexesChangeColumn")."(this, '".h(js_escape($y=="sql"?"":$_GET["indexes"]."_"))."');\" title='".lang(41)."'",($n?array_combine($n,$n):$n),$d),($y=="sql"||$y=="mssql"?"<input type='number' name='indexes[$bd][lengths][$u]' class='size' value='".h($w["lengths"][$z])."' title='".lang(92)."'>":""),($y!="sql"?checkbox("indexes[$bd][descs][$u]",1,$w["descs"][$z],lang(52)):"")," </span>";$u++;}echo"<td><input name='indexes[$bd][name]' value='".h($w["name"])."' autocapitalize='off' aria-labelledby='label-name'>\n","<td><input type='image' class='icon' name='drop_col[$bd]' src='".h(preg_replace("~\\?.*~","",ME))."?file=cross.gif&amp;version=4.3.1&amp;driver=mysql' alt='x' title='".lang(97)."' onclick=\"return !editingRemoveRow(this, 'indexes\$1[type]');\">\n";}$bd++;}echo'</table>
2014-05-08 19:46:08 +02:00
<p>
<input type="submit" value="',lang(14),'">
<input type="hidden" name="token" value="',$T,'">
</form>
';}elseif(isset($_GET["database"])){$L=$_POST;if($_POST&&!$l&&!isset($_POST["add_x"])){$E=trim($L["name"]);if($_POST["drop"]){$_GET["db"]="";queries_redirect(remove_from_uri("db|database"),lang(169),drop_databases(array(DB)));}elseif(DB!==$E){if(DB!=""){$_GET["db"]=$E;queries_redirect(preg_replace('~\bdb=[^&]*&~','',ME)."db=".urlencode($E),lang(170),rename_database($E,$L["collation"]));}else{$j=explode("\n",str_replace("\r","",$E));$Sf=true;$kd="";foreach($j
as$k){if(count($j)==1||$k!=""){if(!create_database($k,$L["collation"]))$Sf=false;$kd=$k;}}restart_session();set_session("dbs",null);queries_redirect(ME."db=".urlencode($kd),lang(171),$Sf);}}else{if(!$L["collation"])redirect(substr(ME,0,-1));query_redirect("ALTER DATABASE ".idf_escape($E).(preg_match('~^[a-z0-9_]+$~i',$L["collation"])?" COLLATE $L[collation]":""),substr(ME,0,-1),lang(172));}}page_header(DB!=""?lang(60):lang(101),$l,array(),h(DB));$Xa=collations();$E=DB;if($_POST)$E=$L["name"];elseif(DB!="")$L["collation"]=db_collation(DB,$Xa);elseif($y=="sql"){foreach(get_vals("SHOW GRANTS")as$s){if(preg_match('~ ON (`(([^\\\\`]|``|\\\\.)*)%`\\.\\*)?~',$s,$C)&&$C[1]){$E=stripcslashes(idf_unescape("`$C[2]`"));break;}}}echo'
2014-05-08 19:46:08 +02:00
<form action="" method="post">
<p>
',($_POST["add_x"]||strpos($E,"\n")?'<textarea id="name" name="name" rows="10" cols="40">'.h($E).'</textarea><br>':'<input name="name" id="name" value="'.h($E).'" maxlength="64" autocapitalize="off">')."\n".($Xa?html_select("collation",array(""=>"(".lang(87).")")+$Xa,$L["collation"]).doc_link(array('sql'=>"charset-charsets.html",'mssql'=>"ms187963.aspx",)):"");?>
2014-05-08 19:46:08 +02:00
<script type='text/javascript'>focus(document.getElementById('name'));</script>
<input type="submit" value="<?php echo
lang(14),'">
';if(DB!="")echo"<input type='submit' name='drop' value='".lang(114)."'".confirm().">\n";elseif(!$_POST["add_x"]&&$_GET["db"]=="")echo"<input type='image' class='icon' name='add' src='".h(preg_replace("~\\?.*~","",ME))."?file=plus.gif&amp;version=4.3.1&amp;driver=mysql' alt='+' title='".lang(94)."'>\n";echo'<input type="hidden" name="token" value="',$T,'">
2014-05-08 19:46:08 +02:00
</form>
';}elseif(isset($_GET["call"])){$ca=$_GET["call"];page_header(lang(173).": ".h($ca),$l);$pf=routine($ca,(isset($_GET["callf"])?"FUNCTION":"PROCEDURE"));$Nc=array();$te=array();foreach($pf["fields"]as$u=>$m){if(substr($m["inout"],-3)=="OUT")$te[$u]="@".idf_escape($m["field"])." AS ".idf_escape($m["field"]);if(!$m["inout"]||substr($m["inout"],0,2)=="IN")$Nc[]=$u;}if(!$l&&$_POST){$Ja=array();foreach($pf["fields"]as$z=>$m){if(in_array($z,$Nc)){$X=process_input($m);if($X===false)$X="''";if(isset($te[$z]))$g->query("SET @".idf_escape($m["field"])." = $X");}$Ja[]=(isset($te[$z])?"@".idf_escape($m["field"]):$X);}$I=(isset($_GET["callf"])?"SELECT":"CALL")." ".table($ca)."(".implode(", ",$Ja).")";echo"<p><code class='jush-$y'>".h($I)."</code> <a href='".h(ME)."sql=".urlencode($I)."'>".lang(10)."</a>\n";if(!$g->multi_query($I))echo"<p class='error'>".error()."\n";else{$h=connect();if(is_object($h))$h->select_db(DB);do{$J=$g->store_result();if(is_object($J))select($J,$h);else
echo"<p class='message'>".lang(174,$g->affected_rows)."\n";}while($g->next_result());if($te)select($g->query("SELECT ".implode(", ",$te)));}}echo'
2014-05-08 19:46:08 +02:00
<form action="" method="post">
';if($Nc){echo"<table cellspacing='0'>\n";foreach($Nc
as$z){$m=$pf["fields"][$z];$E=$m["field"];echo"<tr><th>".$c->fieldName($m);$Y=$_POST["fields"][$E];if($Y!=""){if($m["type"]=="enum")$Y=+$Y;if($m["type"]=="set")$Y=array_sum($Y);}input($m,$Y,(string)$_POST["function"][$E]);echo"\n";}echo"</table>\n";}echo'<p>
<input type="submit" value="',lang(173),'">
2014-05-08 19:46:08 +02:00
<input type="hidden" name="token" value="',$T,'">
</form>
';}elseif(isset($_GET["foreign"])){$b=$_GET["foreign"];$E=$_GET["name"];$L=$_POST;if($_POST&&!$l&&!$_POST["add"]&&!$_POST["change"]&&!$_POST["change-js"]){$D=($_POST["drop"]?lang(175):($E!=""?lang(176):lang(177)));$B=ME."table=".urlencode($b);if(!$_POST["drop"]){$L["source"]=array_filter($L["source"],'strlen');ksort($L["source"]);$eg=array();foreach($L["source"]as$z=>$X)$eg[$z]=$L["target"][$z];$L["target"]=$eg;}if($y=="sqlite")queries_redirect($B,$D,recreate_table($b,$b,array(),array(),array(" $E"=>($_POST["drop"]?"":" ".format_foreign_key($L)))));else{$sa="ALTER TABLE ".table($b);$Hb="\nDROP ".($y=="sql"?"FOREIGN KEY ":"CONSTRAINT ").idf_escape($E);if($_POST["drop"])query_redirect($sa.$Hb,$B,$D);else{query_redirect($sa.($E!=""?"$Hb,":"")."\nADD".format_foreign_key($L),$B,$D);$l=lang(178)."<br>$l";}}}page_header(lang(179),$l,array("table"=>$b),h($b));if($_POST){ksort($L["source"]);if($_POST["add"])$L["source"][]="";elseif($_POST["change"]||$_POST["change-js"])$L["target"]=array();}elseif($E!=""){$p=foreign_keys($b);$L=$p[$E];$L["source"][]="";}else{$L["table"]=$b;$L["source"]=array("");}$If=array_keys(fields($b));$eg=($b===$L["table"]?$If:array_keys(fields($L["table"])));$df=array_keys(array_filter(table_status('',true),'fk_support'));echo'
2014-05-08 19:46:08 +02:00
<form action="" method="post">
<p>
';if($L["db"]==""&&$L["ns"]==""){echo
lang(180),':
',html_select("table",$df,$L["table"],"this.form['change-js'].value = '1'; this.form.submit();"),'<input type="hidden" name="change-js" value="">
<noscript><p><input type="submit" name="change" value="',lang(181),'"></noscript>
2014-05-08 19:46:08 +02:00
<table cellspacing="0">
<thead><tr><th id="label-source">',lang(120),'<th id="label-target">',lang(121),'</thead>
';$bd=0;foreach($L["source"]as$z=>$X){echo"<tr>","<td>".html_select("source[".(+$z)."]",array(-1=>"")+$If,$X,($bd==count($L["source"])-1?"foreignAddRow(this);":1),"label-source"),"<td>".html_select("target[".(+$z)."]",$eg,$L["target"][$z],1,"label-target");$bd++;}echo'</table>
2014-05-08 19:46:08 +02:00
<p>
',lang(89),': ',html_select("on_delete",array(-1=>"")+explode("|",$ce),$L["on_delete"]),' ',lang(88),': ',html_select("on_update",array(-1=>"")+explode("|",$ce),$L["on_update"]),doc_link(array('sql'=>"innodb-foreign-key-constraints.html",'pgsql'=>"sql-createtable.html#SQL-CREATETABLE-REFERENCES",'mssql'=>"ms174979.aspx",'oracle'=>"clauses002.htm#sthref2903",)),'<p>
2014-05-08 19:46:08 +02:00
<input type="submit" value="',lang(14),'">
<noscript><p><input type="submit" name="add" value="',lang(182),'"></noscript>
';}if($E!=""){echo'<input type="submit" name="drop" value="',lang(114),'"',confirm(),'>';}echo'<input type="hidden" name="token" value="',$T,'">
2014-05-08 19:46:08 +02:00
</form>
';}elseif(isset($_GET["view"])){$b=$_GET["view"];$L=$_POST;$re="VIEW";if($y=="pgsql"&&$b!=""){$Mf=table_status($b);$re=strtoupper($Mf["Engine"]);}if($_POST&&!$l){$E=trim($L["name"]);$ua=" AS\n$L[select]";$B=ME."table=".urlencode($E);$D=lang(183);$U=($_POST["materialized"]?"MATERIALIZED VIEW":"VIEW");if(!$_POST["drop"]&&$b==$E&&$y!="sqlite"&&$U=="VIEW"&&$re=="VIEW")query_redirect(($y=="mssql"?"ALTER":"CREATE OR REPLACE")." VIEW ".table($E).$ua,$B,$D);else{$gg=$E."_adminer_".uniqid();drop_create("DROP $re ".table($b),"CREATE $U ".table($E).$ua,"DROP $U ".table($E),"CREATE $U ".table($gg).$ua,"DROP $U ".table($gg),($_POST["drop"]?substr(ME,0,-1):$B),lang(184),$D,lang(185),$b,$E);}}if(!$_POST&&$b!=""){$L=view($b);$L["name"]=$b;$L["materialized"]=($re!="VIEW");if(!$l)$l=error();}page_header(($b!=""?lang(37):lang(186)),$l,array("table"=>$b),h($b));echo'
2014-05-08 19:46:08 +02:00
<form action="" method="post">
<p>',lang(168),': <input name="name" value="',h($L["name"]),'" maxlength="64" autocapitalize="off">
',(support("materializedview")?" ".checkbox("materialized",1,$L["materialized"],lang(115)):""),'<p>';textarea("select",$L["select"]);echo'<p>
2014-05-08 19:46:08 +02:00
<input type="submit" value="',lang(14),'">
';if($_GET["view"]!=""){echo'<input type="submit" name="drop" value="',lang(114),'"',confirm(),'>';}echo'<input type="hidden" name="token" value="',$T,'">
2014-05-08 19:46:08 +02:00
</form>
';}elseif(isset($_GET["event"])){$aa=$_GET["event"];$Tc=array("YEAR","QUARTER","MONTH","DAY","HOUR","MINUTE","WEEK","SECOND","YEAR_MONTH","DAY_HOUR","DAY_MINUTE","DAY_SECOND","HOUR_MINUTE","HOUR_SECOND","MINUTE_SECOND");$Nf=array("ENABLED"=>"ENABLE","DISABLED"=>"DISABLE","SLAVESIDE_DISABLED"=>"DISABLE ON SLAVE");$L=$_POST;if($_POST&&!$l){if($_POST["drop"])query_redirect("DROP EVENT ".idf_escape($aa),substr(ME,0,-1),lang(187));elseif(in_array($L["INTERVAL_FIELD"],$Tc)&&isset($Nf[$L["STATUS"]])){$tf="\nON SCHEDULE ".($L["INTERVAL_VALUE"]?"EVERY ".q($L["INTERVAL_VALUE"])." $L[INTERVAL_FIELD]".($L["STARTS"]?" STARTS ".q($L["STARTS"]):"").($L["ENDS"]?" ENDS ".q($L["ENDS"]):""):"AT ".q($L["STARTS"]))." ON COMPLETION".($L["ON_COMPLETION"]?"":" NOT")." PRESERVE";queries_redirect(substr(ME,0,-1),($aa!=""?lang(188):lang(189)),queries(($aa!=""?"ALTER EVENT ".idf_escape($aa).$tf.($aa!=$L["EVENT_NAME"]?"\nRENAME TO ".idf_escape($L["EVENT_NAME"]):""):"CREATE EVENT ".idf_escape($L["EVENT_NAME"]).$tf)."\n".$Nf[$L["STATUS"]]." COMMENT ".q($L["EVENT_COMMENT"]).rtrim(" DO\n$L[EVENT_DEFINITION]",";").";"));}}page_header(($aa!=""?lang(190).": ".h($aa):lang(191)),$l);if(!$L&&$aa!=""){$M=get_rows("SELECT * FROM information_schema.EVENTS WHERE EVENT_SCHEMA = ".q(DB)." AND EVENT_NAME = ".q($aa));$L=reset($M);}echo'
2014-05-08 19:46:08 +02:00
<form action="" method="post">
<table cellspacing="0">
<tr><th>',lang(168),'<td><input name="EVENT_NAME" value="',h($L["EVENT_NAME"]),'" maxlength="64" autocapitalize="off">
<tr><th title="datetime">',lang(192),'<td><input name="STARTS" value="',h("$L[EXECUTE_AT]$L[STARTS]"),'">
<tr><th title="datetime">',lang(193),'<td><input name="ENDS" value="',h($L["ENDS"]),'">
<tr><th>',lang(194),'<td><input type="number" name="INTERVAL_VALUE" value="',h($L["INTERVAL_VALUE"]),'" class="size"> ',html_select("INTERVAL_FIELD",$Tc,$L["INTERVAL_FIELD"]),'<tr><th>',lang(104),'<td>',html_select("STATUS",$Nf,$L["STATUS"]),'<tr><th>',lang(43),'<td><input name="EVENT_COMMENT" value="',h($L["EVENT_COMMENT"]),'" maxlength="64">
<tr><th>&nbsp;<td>',checkbox("ON_COMPLETION","PRESERVE",$L["ON_COMPLETION"]=="PRESERVE",lang(195)),'</table>
<p>';textarea("EVENT_DEFINITION",$L["EVENT_DEFINITION"]);echo'<p>
2014-05-08 19:46:08 +02:00
<input type="submit" value="',lang(14),'">
';if($aa!=""){echo'<input type="submit" name="drop" value="',lang(114),'"',confirm(),'>';}echo'<input type="hidden" name="token" value="',$T,'">
2014-05-08 19:46:08 +02:00
</form>
';}elseif(isset($_GET["procedure"])){$ca=$_GET["procedure"];$pf=(isset($_GET["function"])?"FUNCTION":"PROCEDURE");$L=$_POST;$L["fields"]=(array)$L["fields"];if($_POST&&!process_fields($L["fields"])&&!$l){$gg="$L[name]_adminer_".uniqid();drop_create("DROP $pf ".idf_escape($ca),create_routine($pf,$L),"DROP $pf ".idf_escape($L["name"]),create_routine($pf,array("name"=>$gg)+$L),"DROP $pf ".idf_escape($gg),substr(ME,0,-1),lang(196),lang(197),lang(198),$ca,$L["name"]);}page_header(($ca!=""?(isset($_GET["function"])?lang(199):lang(200)).": ".h($ca):(isset($_GET["function"])?lang(201):lang(202))),$l);if(!$_POST&&$ca!=""){$L=routine($ca,$pf);$L["name"]=$ca;}$Xa=get_vals("SHOW CHARACTER SET");sort($Xa);$qf=routine_languages();echo'
2014-05-08 19:46:08 +02:00
<form action="" method="post" id="form">
<p>',lang(168),': <input name="name" value="',h($L["name"]),'" maxlength="64" autocapitalize="off">
',($qf?lang(19).": ".html_select("language",$qf,$L["language"]):""),'<input type="submit" value="',lang(14),'">
2014-05-08 19:46:08 +02:00
<table cellspacing="0" class="nowrap">
';edit_fields($L["fields"],$Xa,$pf);if(isset($_GET["function"])){echo"<tr><td>".lang(203);edit_type("returns",$L["returns"],$Xa);}echo'</table>
<p>';textarea("definition",$L["definition"]);echo'<p>
2014-05-08 19:46:08 +02:00
<input type="submit" value="',lang(14),'">
';if($ca!=""){echo'<input type="submit" name="drop" value="',lang(114),'"',confirm(),'>';}echo'<input type="hidden" name="token" value="',$T,'">
2014-05-08 19:46:08 +02:00
</form>
';}elseif(isset($_GET["trigger"])){$b=$_GET["trigger"];$E=$_GET["name"];$yg=trigger_options();$L=(array)trigger($E)+array("Trigger"=>$b."_bi");if($_POST){if(!$l&&in_array($_POST["Timing"],$yg["Timing"])&&in_array($_POST["Event"],$yg["Event"])&&in_array($_POST["Type"],$yg["Type"])){$be=" ON ".table($b);$Hb="DROP TRIGGER ".idf_escape($E).($y=="pgsql"?$be:"");$B=ME."table=".urlencode($b);if($_POST["drop"])query_redirect($Hb,$B,lang(204));else{if($E!="")queries($Hb);queries_redirect($B,($E!=""?lang(205):lang(206)),queries(create_trigger($be,$_POST)));if($E!="")queries(create_trigger($be,$L+array("Type"=>reset($yg["Type"]))));}}$L=$_POST;}page_header(($E!=""?lang(207).": ".h($E):lang(208)),$l,array("table"=>$b));echo'
2014-05-08 19:46:08 +02:00
<form action="" method="post" id="form">
<table cellspacing="0">
<tr><th>',lang(209),'<td>',html_select("Timing",$yg["Timing"],$L["Timing"],"triggerChange(/^".preg_quote($b,"/")."_[ba][iud]$/, '".js_escape($b)."', this.form);"),'<tr><th>',lang(210),'<td>',html_select("Event",$yg["Event"],$L["Event"],"this.form['Timing'].onchange();"),(in_array("UPDATE OF",$yg["Event"])?" <input name='Of' value='".h($L["Of"])."' class='hidden'>":""),'<tr><th>',lang(42),'<td>',html_select("Type",$yg["Type"],$L["Type"]),'</table>
<p>',lang(168),': <input name="Trigger" value="',h($L["Trigger"]);?>" maxlength="64" autocapitalize="off">
2014-05-08 19:46:08 +02:00
<script type="text/javascript">document.getElementById('form')['Timing'].onchange();</script>
<p><?php textarea("Statement",$L["Statement"]);echo'<p>
2014-05-08 19:46:08 +02:00
<input type="submit" value="',lang(14),'">
';if($E!=""){echo'<input type="submit" name="drop" value="',lang(114),'"',confirm(),'>';}echo'<input type="hidden" name="token" value="',$T,'">
2014-05-08 19:46:08 +02:00
</form>
';}elseif(isset($_GET["user"])){$ea=$_GET["user"];$Se=array(""=>array("All privileges"=>""));foreach(get_rows("SHOW PRIVILEGES")as$L){foreach(explode(",",($L["Privilege"]=="Grant option"?"":$L["Context"]))as$hb)$Se[$hb][$L["Privilege"]]=$L["Comment"];}$Se["Server Admin"]+=$Se["File access on server"];$Se["Databases"]["Create routine"]=$Se["Procedures"]["Create routine"];unset($Se["Procedures"]["Create routine"]);$Se["Columns"]=array();foreach(array("Select","Insert","Update","References")as$X)$Se["Columns"][$X]=$Se["Tables"][$X];unset($Se["Server Admin"]["Usage"]);foreach($Se["Tables"]as$z=>$X)unset($Se["Databases"][$z]);$Od=array();if($_POST){foreach($_POST["objects"]as$z=>$X)$Od[$X]=(array)$Od[$X]+(array)$_POST["grants"][$z];}$_c=array();$Zd="";if(isset($_GET["host"])&&($J=$g->query("SHOW GRANTS FOR ".q($ea)."@".q($_GET["host"])))){while($L=$J->fetch_row()){if(preg_match('~GRANT (.*) ON (.*) TO ~',$L[0],$C)&&preg_match_all('~ *([^(,]*[^ ,(])( *\\([^)]+\\))?~',$C[1],$xd,PREG_SET_ORDER)){foreach($xd
as$X){if($X[1]!="USAGE")$_c["$C[2]$X[2]"][$X[1]]=true;if(preg_match('~ WITH GRANT OPTION~',$L[0]))$_c["$C[2]$X[2]"]["GRANT OPTION"]=true;}}if(preg_match("~ IDENTIFIED BY PASSWORD '([^']+)~",$L[0],$C))$Zd=$C[1];}}if($_POST&&!$l){$ae=(isset($_GET["host"])?q($ea)."@".q($_GET["host"]):"''");if($_POST["drop"])query_redirect("DROP USER $ae",ME."privileges=",lang(211));else{$Qd=q($_POST["user"])."@".q($_POST["host"]);$Ce=$_POST["pass"];if($Ce!=''&&!$_POST["hashed"]){$Ce=$g->result("SELECT PASSWORD(".q($Ce).")");$l=!$Ce;}$lb=false;if(!$l){if($ae!=$Qd){$lb=queries(($g->server_info<5?"GRANT USAGE ON *.* TO":"CREATE USER")." $Qd IDENTIFIED BY PASSWORD ".q($Ce));$l=!$lb;}elseif($Ce!=$Zd)queries("SET PASSWORD FOR $Qd = ".q($Ce));}if(!$l){$mf=array();foreach($Od
as$Ud=>$s){if(isset($_GET["grant"]))$s=array_filter($s);$s=array_keys($s);if(isset($_GET["grant"]))$mf=array_diff(array_keys(array_filter($Od[$Ud],'strlen')),$s);elseif($ae==$Qd){$Xd=array_keys((array)$_c[$Ud]);$mf=array_diff($Xd,$s);$s=array_diff($s,$Xd);unset($_c[$Ud]);}if(preg_match('~^(.+)\\s*(\\(.*\\))?$~U',$Ud,$C)&&(!grant("REVOKE",$mf,$C[2]," ON $C[1] FROM $Qd")||!grant("GRANT",$s,$C[2]," ON $C[1] TO $Qd"))){$l=true;break;}}}if(!$l&&isset($_GET["host"])){if($ae!=$Qd)queries("DROP USER $ae");elseif(!isset($_GET["grant"])){foreach($_c
as$Ud=>$mf){if(preg_match('~^(.+)(\\(.*\\))?$~U',$Ud,$C))grant("REVOKE",array_keys($mf),$C[2]," ON $C[1] FROM $Qd");}}}queries_redirect(ME."privileges=",(isset($_GET["host"])?lang(212):lang(213)),!$l);if($lb)$g->query("DROP USER $Qd");}}page_header((isset($_GET["host"])?lang(29).": ".h("$ea@$_GET[host]"):lang(132)),$l,array("privileges"=>array('',lang(64))));if($_POST){$L=$_POST;$_c=$Od;}else{$L=$_GET+array("host"=>$g->result("SELECT SUBSTRING_INDEX(CURRENT_USER, '@', -1)"));$L["pass"]=$Zd;if($Zd!="")$L["hashed"]=true;$_c[(DB==""||$_c?"":idf_escape(addcslashes(DB,"%_\\"))).".*"]=array();}echo'<form action="" method="post">
2014-05-08 19:46:08 +02:00
<table cellspacing="0">
<tr><th>',lang(28),'<td><input name="host" maxlength="60" value="',h($L["host"]),'" autocapitalize="off">
<tr><th>',lang(29),'<td><input name="user" maxlength="16" value="',h($L["user"]),'" autocapitalize="off">
<tr><th>',lang(30),'<td><input name="pass" id="pass" value="',h($L["pass"]),'">
';if(!$L["hashed"]){echo'<script type="text/javascript">typePassword(document.getElementById(\'pass\'));</script>';}echo
checkbox("hashed",1,$L["hashed"],lang(214),"typePassword(this.form['pass'], this.checked);"),'</table>
2014-05-08 19:46:08 +02:00
';echo"<table cellspacing='0'>\n","<thead><tr><th colspan='2'>".lang(64).doc_link(array('sql'=>"grant.html#priv_level"));$u=0;foreach($_c
as$Ud=>$s){echo'<th>'.($Ud!="*.*"?"<input name='objects[$u]' value='".h($Ud)."' size='10' autocapitalize='off'>":"<input type='hidden' name='objects[$u]' value='*.*' size='10'>*.*");$u++;}echo"</thead>\n";foreach(array(""=>"","Server Admin"=>lang(28),"Databases"=>lang(31),"Tables"=>lang(117),"Columns"=>lang(41),"Procedures"=>lang(215),)as$hb=>$yb){foreach((array)$Se[$hb]as$Re=>$bb){echo"<tr".odd()."><td".($yb?">$yb<td":" colspan='2'").' lang="en" title="'.h($bb).'">'.h($Re);$u=0;foreach($_c
as$Ud=>$s){$E="'grants[$u][".h(strtoupper($Re))."]'";$Y=$s[strtoupper($Re)];if($hb=="Server Admin"&&$Ud!=(isset($_c["*.*"])?"*.*":".*"))echo"<td>&nbsp;";elseif(isset($_GET["grant"]))echo"<td><select name=$E><option><option value='1'".($Y?" selected":"").">".lang(216)."<option value='0'".($Y=="0"?" selected":"").">".lang(217)."</select>";else
echo"<td align='center'><label class='block'><input type='checkbox' name=$E value='1'".($Y?" checked":"").($Re=="All privileges"?" id='grants-$u-all'":($Re=="Grant option"?"":" onclick=\"if (this.checked) formUncheck('grants-$u-all');\""))."></label>";$u++;}}}echo"</table>\n",'<p>
2014-05-08 19:46:08 +02:00
<input type="submit" value="',lang(14),'">
';if(isset($_GET["host"])){echo'<input type="submit" name="drop" value="',lang(114),'"',confirm(),'>';}echo'<input type="hidden" name="token" value="',$T,'">
2014-05-08 19:46:08 +02:00
</form>
';}elseif(isset($_GET["processlist"])){if(support("kill")&&$_POST&&!$l){$fd=0;foreach((array)$_POST["kill"]as$X){if(kill_process($X))$fd++;}queries_redirect(ME."processlist=",lang(218,$fd),$fd||!$_POST["kill"]);}page_header(lang(102),$l);echo'
2014-05-08 19:46:08 +02:00
<form action="" method="post">
<table cellspacing="0" onclick="tableClick(event);" ondblclick="tableClick(event, true);" class="nowrap checkable">
';$u=-1;foreach(process_list()as$u=>$L){if(!$u){echo"<thead><tr lang='en'>".(support("kill")?"<th>&nbsp;":"");foreach($L
as$z=>$X)echo"<th>$z".doc_link(array('sql'=>"show-processlist.html#processlist_".strtolower($z),'pgsql'=>"monitoring-stats.html#PG-STAT-ACTIVITY-VIEW",'oracle'=>"../b14237/dynviews_2088.htm",));echo"</thead>\n";}echo"<tr".odd().">".(support("kill")?"<td>".checkbox("kill[]",$L[$y=="sql"?"Id":"pid"],0):"");foreach($L
as$z=>$X)echo"<td>".(($y=="sql"&&$z=="Info"&&preg_match("~Query|Killed~",$L["Command"])&&$X!="")||($y=="pgsql"&&$z=="current_query"&&$X!="<IDLE>")||($y=="oracle"&&$z=="sql_text"&&$X!="")?"<code class='jush-$y'>".shorten_utf8($X,100,"</code>").' <a href="'.h(ME.($L["db"]!=""?"db=".urlencode($L["db"])."&":"")."sql=".urlencode($X)).'">'.lang(219).'</a>':nbsp($X));echo"\n";}echo'</table>
2014-05-08 19:46:08 +02:00
<script type=\'text/javascript\'>tableCheck();</script>
<p>
';if(support("kill")){echo($u+1)."/".lang(220,max_connections()),"<p><input type='submit' value='".lang(221)."'>\n";}echo'<input type="hidden" name="token" value="',$T,'">
2014-05-08 19:46:08 +02:00
</form>
';}elseif(isset($_GET["replication"])){page_header(lang(105));echo"<h3>".lang(222).doc_link(array("sql"=>"show-master-status.html"))."</h3>\n";$wd=replication_status("MASTER");if(!$wd)echo"<p class='message'>".lang(12)."\n";else{echo"<table cellspacing='0'>\n";foreach($wd[0]as$z=>$X){echo"<tr>","<th>".h($z),"<td>".nbsp($X);}echo"</table>\n";}$Gf=replication_status("SLAVE");if($Gf){echo"<h3>".lang(223).doc_link(array("sql"=>"show-slave-status.html"))."</h3>\n";foreach($Gf[0]as$Ff){echo"<table cellspacing='0'>\n";foreach($Ff
as$z=>$X){echo"<tr>","<th>".h($z),"<td>".nbsp($X);}echo"</table>\n";}}}elseif(isset($_GET["select"])){$b=$_GET["select"];$R=table_status1($b);$x=indexes($b);$n=fields($b);$p=column_foreign_keys($b);$Wd="";if($R["Oid"]){$Wd=($y=="sqlite"?"rowid":"oid");$x[]=array("type"=>"PRIMARY","columns"=>array($Wd));}parse_str($_COOKIE["adminer_import"],$ma);$nf=array();$e=array();$jg=null;foreach($n
as$z=>$m){$E=$c->fieldName($m);if(isset($m["privileges"]["select"])&&$E!=""){$e[$z]=html_entity_decode(strip_tags($E),ENT_QUOTES);if(is_shortable($m))$jg=$c->selectLengthProcess();}$nf+=$m["privileges"];}list($N,$t)=$c->selectColumnsProcess($e,$x);$Xc=count($t)<count($N);$Z=$c->selectSearchProcess($n,$x);$ke=$c->selectOrderProcess($n,$x);$_=$c->selectLimitProcess();$yc=($N?implode(", ",$N):"*".($Wd?", $Wd":"")).convert_fields($e,$n,$N)."\nFROM ".table($b);$Ac=($t&&$Xc?"\nGROUP BY ".implode(", ",$t):"").($ke?"\nORDER BY ".implode(", ",$ke):"");if($_GET["val"]&&is_ajax()){header("Content-Type: text/plain; charset=utf-8");foreach($_GET["val"]as$Fg=>$L){$ua=convert_field($n[key($L)]);$N=array($ua?$ua:idf_escape(key($L)));$Z[]=where_check($Fg,$n);$K=$Fb->select($b,$N,$Z,$N);if($K)echo
reset($K->fetch_row());}exit;}if($_POST&&!$l){$Yg=$Z;if(!$_POST["all"]&&is_array($_POST["check"])){$Oa=array();foreach($_POST["check"]as$Ma)$Oa[]=where_check($Ma,$n);$Yg[]="((".implode(") OR (",$Oa)."))";}$Yg=($Yg?"\nWHERE ".implode(" AND ",$Yg):"");$Oe=$Hg=null;foreach($x
as$w){if($w["type"]=="PRIMARY"){$Oe=array_flip($w["columns"]);$Hg=($N?$Oe:array());break;}}foreach((array)$Hg
as$z=>$X){if(in_array(idf_escape($z),$N))unset($Hg[$z]);}if($_POST["export"]){cookie("adminer_import","output=".urlencode($_POST["output"])."&format=".urlencode($_POST["format"]));dump_headers($b);$c->dumpTable($b,"");if(!is_array($_POST["check"])||$Hg===array())$I="SELECT $yc$Yg$Ac";else{$Dg=array();foreach($_POST["check"]as$X)$Dg[]="(SELECT".limit($yc,"\nWHERE ".($Z?implode(" AND ",$Z)." AND ":"").where_check($X,$n).$Ac,1).")";$I=implode(" UNION ALL ",$Dg);}$c->dumpData($b,"table",$I);exit;}if(!$c->selectEmailProcess($Z,$p)){if($_POST["save"]||$_POST["delete"]){$J=true;$na=0;$P=array();if(!$_POST["delete"]){foreach($e
as$E=>$X){$X=process_input($n[$E]);if($X!==null&&($_POST["clone"]||$X!==false))$P[idf_escape($E)]=($X!==false?$X:idf_escape($E));}}if($_POST["delete"]||$P){if($_POST["clone"])$I="INTO ".table($b)." (".implode(", ",array_keys($P)).")\nSELECT ".implode(", ",$P)."\nFROM ".table($b);if($_POST["all"]||($Hg===array()&&is_array($_POST["check"]))||$Xc){$J=($_POST["delete"]?$Fb->delete($b,$Yg):($_POST["clone"]?queries("INSERT $I$Yg"):$Fb->update($b,$P,$Yg)));$na=$g->affected_rows;}else{foreach((array)$_POST["check"]as$X){$Xg="\nWHERE ".($Z?implode(" AND ",$Z)." AND ":"").where_check($X,$n);$J=($_POST["delete"]?$Fb->delete($b,$Xg,1):($_POST["clone"]?queries("INSERT".limit1($I,$Xg)):$Fb->update($b,$P,$Xg)));if(!$J)break;$na+=$g->affected_rows;}}}$D=lang(224,$na);if($_POST["clone"]&&$J&&$na==1){$ld=last_id();if($ld)$D=lang(154," $ld");}queries_redirect(remove_from_uri($_POST["all"]&&$_POST["delete"]?"page":""),$D,$J);if(!$_POST["delete"]){edit_form($b,$n,(array)$_POST["fields"],!$_POST["clone"]);page_footer();exit;}}elseif(!$_POST["import"]){if(!$_POST["val"])$l=lang(225);else{$J=true;$na=0;foreach($_POST["val"]as$Fg=>$L){$P=array();foreach($L
as$z=>$X){$z=bracket_escape($z,1);$P[idf_escape($z)]=(preg_match('~char|text~',$n[$z]["type"])||$X!=""?$c->processInput($n[$z],$X):"NULL");}$J=$Fb->update($b,$P," WHERE ".($Z?implode(" AND ",$Z)." AND ":"").where_check($Fg,$n),!($Xc||$Hg===array())," ");if(!$J)break;$na+=$g->affected_rows;}queries_redirect(remove_from_uri(),lang(224,$na),$J);}}elseif(!is_string($oc=get_file("csv_file",true)))$l=upload_error($oc);elseif(!preg_match('~~u',$oc))$l=lang(226);else{cookie("adminer_import","output=".urlencode($ma["output"])."&format=".urlencode($_POST["separator"]));$J=true;$Ya=array_keys($n);preg_match_all('~(?>"[^"]*"|[^"\\r\\n]+)+~',$oc,$xd);$na=count($xd[0]);$Fb->begin();$zf=($_POST["separator"]=="csv"?",":($_POST["separator"]=="tsv"?"\t":";"));$M=array();foreach($xd[0]as$z=>$X){preg_match_all("~((?>\"[^\"]*\")+|[^$zf]*)$zf~",$X.$zf,$yd);if(!$z&&!array_diff($yd[1],$Ya)){$Ya=$yd[1];$na--;}else{$P=array();foreach($yd[1]as$u=>$Ua)$P[idf_escape($Ya[$u])]=($Ua==""&&$n[$Ya[$u]]["null"]?"NULL":q(str_replace('""','"',preg_replace('~^"|"$~','',$Ua))));$M[]=$P;}}$J=(!$M||$Fb->insertUpdate($b,$M,$Oe));if($J)$J=$Fb->commit();queries_redirect(remove_from_uri("page"),lang(227,$na),$J);$Fb->rollback();}}}$Yf=$c->tableName($R);if(is_ajax()){page_headers();ob_start();}else
page_header(lang(46).": $Yf",$l);$P=null;if(isset($nf["insert"])||!support("table")){$P="";foreach((array)$_GET["where"]as$X){if(count($p[$X["col"]])==1&&($X["op"]=="="||(!$X["op"]&&!preg_match('~[_%]~',$X["val"]))))$P.="&set".urlencode("[".bracket_escape($X["col"])."]")."=".urlencode($X["val"]);}}$c->selectLinks($R,$P);if(!$e&&support("table"))echo"<p class='error'>".lang(228).($n?".":": ".error())."\n";else{echo"<form action='' id='form'>\n","<div style='display: none;'>";hidden_fields_get();echo(DB!=""?'<input type="hidden" name="db" value="'.h(DB).'">'.(isset($_GET["ns"])?'<input type="hidden" name="ns" value="'.h($_GET["ns"]).'">':""):"");echo'<input type="hidden" name="select" value="'.h($b).'">',"</div>\n";$c->selectColumnsPrint($N,$e);$c->selectSearchPrint($Z,$e,$x);$c->selectOrderPrint($ke,$e,$x);$c->selectLimitPrint($_);$c->selectLengthPrint($jg);$c->selectActionPrint($x);echo"</form>\n";$F=$_GET["page"];if($F=="last"){$xc=$g->result(count_rows($b,$Z,$Xc,$t));$F=floor(max(0,$xc-1)/$_);}$wf=$N;if(!$wf){$wf[]="*";if($Wd)$wf[]=$Wd;}$ib=convert_fields($e,$n,$N);if($ib)$wf[]=substr($ib,2);$J=$Fb->select($b,$wf,$Z,$t,$ke,$_,$F,true);if(!$J)echo"<p class='error'>".error()."\n";else{if($y=="mssql"&&$F)$J->seek($_*$F);$Tb=array();echo"<form action='' method='post' enctype='multipart/form-data'>\n";$M=array();while($L=$J->fetch_assoc()){if($F&&$y=="oracle")unset($L["RNUM"]);$M[]=$L;}if($_GET["page"]!="last"&&+$_&&$t&&$Xc&&$y=="sql")$xc=$g->result(" SELECT FOUND_ROWS()");if(!$M)echo"<p class='message'>".lang(12)."\n";else{$Ba=$c->backwardKeys($b,$Yf);echo"<table id='table' cellspacing='0' class='nowrap checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);' onkeydown='return editingKeydown(event);'>\n","<thead><tr>".(!$t&&$N?"":"<td><input type='checkbox' id='all-page' onclick='formCheck(this, /check/);' class='jsonly'> <a href='".h($_GET["modify"]?remove_from_uri("modify"):$_SERVER["REQUEST_URI"]."&modify=1")."'>".lang(229)."</a>");$Nd=array();$zc=array();reset($N);$af=1;foreach($M[0]as$z=>$X){if($z!=$Wd){$X=$_GET["columns"][key($N)];$m=$n[$N?($X?$X["col"]:current($N)):$z];$E=($m?$c->fieldName($m,$af):($X["fun"]?"*":$z));if($E!=""){$af++;$Nd[$z]=$E;$d=idf_escape($z);$Jc=remove_from_uri('(order|desc)[^=]*|page').'&order%5B0%5D='.urlencode($z);$yb="&desc%5B0%5D=1";echo'<th onmouseover="columnMouse(this);" onmouseout="columnMouse(this, \' hidden\');">','<a href="'.h($Jc.($ke[0]==$d||$ke[0]==$z||(!$ke&&$Xc&&$t[0]==$d)?$yb:'')).'">';echo
apply_sql_function($X["fun"],$E)."</a>";echo"<span class='column hidden'>","<a href='".h($Jc.$yb)."' title='".lang(52)."' class='text'> ↓</a>";if(!$X["fun"])echo'<a href="#fieldset-search" onclick="selectSearch(\''.h(js_escape($z)).'\'); return false;" title="'.lang(49).'" class="text jsonly"> =</a>';echo"</span>";}$zc[$z]=$X["fun"];next($N);}}$rd=array();if($_GET["modify"]){foreach($M
as$L){foreach($L
as$z=>$X)$rd[$z]=max($rd[$z],min(40,strlen(utf8_decode($X))));}}echo($Ba?"<th>".lang(230):"")."</thead>\n";if(is_ajax()){if($_%2==1&&$F%2==1)odd();ob_end_clean();}foreach($c->rowDescriptions($M,$p)as$Md=>$L){$Eg=unique_array($M[$Md],$x);if(!$Eg){$Eg=array();foreach($M[$Md]as$z=>$X){if(!preg_match('~^(COUNT\\((\\*|(DISTINCT )?`(?:[^`]|``)+`)\\)|(AVG|GROUP_CONCAT|MAX|MIN|SUM)\\(`(?:[^`]|``)+`\\))$~',$z))$Eg[$z]=$X;}}$Fg="";foreach($Eg
as$z=>$X){if(($y=="sql"||$y=="pgsql")&&strlen($X)>64){$z=(strpos($z,'(')?$z:idf_escape($z));$z="MD5(".($y=='sql'&&preg_match("~^utf8_~",$n[$z]["collation"])?$z:"CONVERT($z USING ".charset($g).")").")";$X=md5($X);}$Fg.="&".($X!==null?urlencode("where[".bracket_escape($z)."]")."=".urlencode($X):"null%5B%5D=".urlencode($z));}echo"<tr".odd().">".(!$t&&$N?"":"<td>".checkbox("check[]",substr($Fg,1),in_array(substr($Fg,1),(array)$_POST["check"]),"","this.form['all'].checked = false; formUncheck('all-page');").($Xc||information_schema(DB)?"":" <a href='".h(ME."edit=".urlencode($b).$Fg)."'>".lang(231)."</a>"));foreach($L
as$z=>$X){if(isset($Nd[$z])){$m=$n[$z];if($X!=""&&(!isset($Tb[$z])||$Tb[$z]!=""))$Tb[$z]=(is_mail($X)?$Nd[$z]:"");$A="";if(preg_match('~blob|bytea|raw|file~',$m["type"])&&$X!="")$A=ME.'download='.urlencode($b).'&field='.urlencode($z).$Fg;if(!$A&&$X!==null){foreach((array)$p[$z]as$o){if(count($p[$z])==1||end($o["source"])==$z){$A="";foreach($o["source"]as$u=>$If)$A.=where_link($u,$o["target"][$u],$M[$Md][$If]);$A=($o["db"]!=""?preg_replace('~([?&]db=)[^&]+~','\\1'.urlencode($o["db"]),ME):ME).'select='.urlencode($o["table"]).$A;if($o["ns"])$A=preg_replace('~([?&]ns=)[^&]+~','\\1'.urlencode($o["ns"]),$A);if(count($o["source"])==1)break;}}}if($z=="COUNT(*)"){$A=ME."select=".urlencode($b);$u=0;foreach((array)$_GET["where"]as$W){if(!array_key_exists($W["col"],$Eg))$A.=where_link($u++,$W["col"],$W["val"],$W["op"]);}foreach($Eg
as$cd=>$W)$A.=where_link($u++,$cd,$W);}$X=select_value($X,$A,$m,$jg);$v=h("val[$Fg][".bracket_escape($z)."]");$Y=$_POST["val"][$Fg][bracket_escape($z)];$Ob=!is_array($L[$z])&&is_utf8($X)&&$M[$Md][$z]==$L[$z]&&!$zc[$z];$ig=preg_match('~text|lob~',$m["type"]);if(($_GET["modify"]&&$Ob)||$Y!==null){$Cc=h($Y!==null?$Y:$L[$z]);echo"<td>".($ig?"<textarea name='$v' cols='30' rows='".(substr_count($L[$z],"\n")+1)."'>$Cc</textarea>":"<input name='$v' value='$Cc' size='$rd[$z]'>");}else{$vd=strpos($X,"<i>...</i>");echo"<td id='$v' onclick=\"selectClick(this, event, ".($vd?2:($ig?1:0)).($Ob?"":", '".h(lang(232))."'").");\">$X";}}}if($Ba)echo"<td>";$c->backwardKeysPrint($Ba,$M[$Md]);echo"</tr>\n";}if(is_ajax())exit;echo"</table>\n";}if(($M||$F)&&!is_ajax()){$dc=true;if($_GET["page"]!="last"){if(!+$_)$xc=count($M);elseif($y!="sql"||!$Xc){$xc=($Xc?false:found_rows($R,$Z));if($xc<max(1e4,2*($F+1)*$_))$xc=reset(slow_query(count_rows($b,$Z,$Xc,$t)));else$dc=false;}}if(+$_&&($xc===false||$xc>$_||$F)){echo"<p class='pages'>";$_d=($xc===false?$F+(count($M)>=$_?2:1):floor(($xc-1)/$_));if($y!="simpledb"){echo'<a href="'.h(remove_from_uri("page"))."\" onclick=\"pageClick(this.href, +prompt('".lang(233)."', '".($F+1)."'), event); return false;\">".lang(233)."</a>:",pagination(0,$F).($F>5?" ...":"");for($u=max(1,$F-4);$u<min($_d,$F+5);$u++)echo
pagination($u,$F);if($_d>0){echo($F+5<$_d?" ...":""),($dc&&$xc!==false?pagination($_d,$F):" <a href='".h(remove_from_uri("page")."&page=last")."' title='~$_d'>".lang(234)."</a>");}echo(($xc===false?count($M)+1:$xc-$F*$_)>$_?' <a href="'.h(remove_from_uri("page")."&page=".($F+1)).'" onclick="return !selectLoadMore(this, '.(+$_).', \''.lang(235).'...\');" class="loadmore">'.lang(236).'</a>':'');}else{echo
lang(233).":",pagination(0,$F).($F>1?" ...":""),($F?pagination($F,$F):""),($_d>$F?pagination($F+1,$F).($_d>$F+1?" ...":""):"");}}echo"<p class='count'>\n",($xc!==false?"(".($dc?"":"~ ").lang(136,$xc).") ":"");$Cb=($dc?"":"~ ").$xc;echo
checkbox("all",1,0,lang(237),"var checked = formChecked(this, /check/); selectCount('selected', this.checked ? '$Cb' : checked); selectCount('selected2', this.checked || !checked ? '$Cb' : checked);")."\n";if($c->selectCommandPrint()){echo'<fieldset',($_GET["modify"]?'':' class="jsonly"'),'><legend>',lang(229),'</legend><div>
<input type="submit" value="',lang(14),'"',($_GET["modify"]?'':' title="'.lang(225).'"'),'>
2014-05-08 19:46:08 +02:00
</div></fieldset>
<fieldset><legend>',lang(113),' <span id="selected"></span></legend><div>
2014-05-08 19:46:08 +02:00
<input type="submit" name="edit" value="',lang(10),'">
<input type="submit" name="clone" value="',lang(219),'">
2014-05-08 19:46:08 +02:00
<input type="submit" name="delete" value="',lang(18),'"',confirm(),'>
</div></fieldset>
';}$vc=$c->dumpFormat();foreach((array)$_GET["columns"]as$d){if($d["fun"]){unset($vc['sql']);break;}}if($vc){print_fieldset("export",lang(66)." <span id='selected2'></span>");$ue=$c->dumpOutput();echo($ue?html_select("output",$ue,$ma["output"])." ":""),html_select("format",$vc,$ma["format"])," <input type='submit' name='export' value='".lang(66)."'>\n","</div></fieldset>\n";}echo(!$t&&$N?"":"<script type='text/javascript'>tableCheck();</script>\n");}if($c->selectImportPrint()){print_fieldset("import",lang(65),!$M);echo"<input type='file' name='csv_file'> ",html_select("separator",array("csv"=>"CSV,","csv;"=>"CSV;","tsv"=>"TSV"),$ma["format"],1);echo" <input type='submit' name='import' value='".lang(65)."'>","</div></fieldset>\n";}$c->selectEmailPrint(array_filter($Tb,'strlen'),$e);echo"<p><input type='hidden' name='token' value='$T'></p>\n","</form>\n";}}if(is_ajax()){ob_end_clean();exit;}}elseif(isset($_GET["variables"])){$Mf=isset($_GET["status"]);page_header($Mf?lang(104):lang(103));$Rg=($Mf?show_status():show_variables());if(!$Rg)echo"<p class='message'>".lang(12)."\n";else{echo"<table cellspacing='0'>\n";foreach($Rg
as$z=>$X){echo"<tr>","<th><code class='jush-".$y.($Mf?"status":"set")."'>".h($z)."</code>","<td>".nbsp($X);}echo"</table>\n";}}elseif(isset($_GET["script"])){header("Content-Type: text/javascript; charset=utf-8");if($_GET["script"]=="db"){$Vf=array("Data_length"=>0,"Index_length"=>0,"Data_free"=>0);foreach(table_status()as$E=>$R){json_row("Comment-$E",nbsp($R["Comment"]));if(!is_view($R)){foreach(array("Engine","Collation")as$z)json_row("$z-$E",nbsp($R[$z]));foreach($Vf+array("Auto_increment"=>0,"Rows"=>0)as$z=>$X){if($R[$z]!=""){$X=format_number($R[$z]);json_row("$z-$E",($z=="Rows"&&$X&&$R["Engine"]==($Kf=="pgsql"?"table":"InnoDB")?"~ $X":$X));if(isset($Vf[$z]))$Vf[$z]+=($R["Engine"]!="InnoDB"||$z!="Data_free"?$R[$z]:0);}elseif(array_key_exists($z,$R))json_row("$z-$E");}}}foreach($Vf
as$z=>$X)json_row("sum-$z",format_number($X));json_row("");}elseif($_GET["script"]=="kill")$g->query("KILL ".number($_POST["kill"]));else{foreach(count_tables($c->databases())as$k=>$X){json_row("tables-$k",$X);json_row("size-$k",db_size($k));}json_row("");}exit;}else{$dg=array_merge((array)$_POST["tables"],(array)$_POST["views"]);if($dg&&!$l&&!$_POST["search"]){$J=true;$D="";if($y=="sql"&&count($_POST["tables"])>1&&($_POST["drop"]||$_POST["truncate"]||$_POST["copy"]))queries("SET foreign_key_checks = 0");if($_POST["truncate"]){if($_POST["tables"])$J=truncate_tables($_POST["tables"]);$D=lang(238);}elseif($_POST["move"]){$J=move_tables((array)$_POST["tables"],(array)$_POST["views"],$_POST["target"]);$D=lang(239);}elseif($_POST["copy"]){$J=copy_tables((array)$_POST["tables"],(array)$_POST["views"],$_POST["target"]);$D=lang(240);}elseif($_POST["drop"]){if($_POST["views"])$J=drop_views($_POST["views"]);if($J&&$_POST["tables"])$J=drop_tables($_POST["tables"]);$D=lang(241);}elseif($y!="sql"){$J=($y=="sqlite"?queries("VACUUM"):apply_queries("VACUUM".($_POST["optimize"]?"":" ANALYZE"),$_POST["tables"]));$D=lang(242);}elseif(!$_POST["tables"])$D=lang(9);elseif($J=queries(($_POST["optimize"]?"OPTIMIZE":($_POST["check"]?"CHECK":($_POST["repair"]?"REPAIR":"ANALYZE")))." TABLE ".implode(", ",array_map('idf_escape',$_POST["tables"])))){while($L=$J->fetch_assoc())$D.="<b>".h($L["Table"])."</b>: ".h($L["Msg_text"])."<br>";}queries_redirect(substr(ME,0,-1),$D,$J);}page_header(($_GET["ns"]==""?lang(31).": ".h(DB):lang(243).": ".h($_GET["ns"])),$l,true);if($c->homepage()){if($_GET["ns"]!==""){echo"<h3 id='tables-views'>".lang(244)."</h3>\n";$cg=tables_list();if(!$cg)echo"<p class='message'>".lang(9)."\n";else{echo"<form action='' method='post'>\n";if(support("table")){echo"<fieldset><legend>".lang(245)." <span id='selected2'></span></legend><div>","<input type='search' name='query' value='".h($_POST["query"])."'> <input type='submit' name='search' value='".lang(49)."'>\n","</div></fieldset>\n";if($_POST["search"]&&$_POST["query"]!="")search_tables();}$Db=doc_link(array('sql'=>'show-table-status.html'));echo"<table cellspacing='0' class='nowrap checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);'>\n",'<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="formCheck(this, /^(tables|views)\[/);" class="jsonly">','<th>'.lang(117),'<td>'.lang(246).doc_link(array('sql'=>'storage-engines.html')),'<td>'.lang(109).doc_link(array('sql'=>'charset-mysql.html')),'<td>'.lang(247).$Db,'<td>'.lang(248).$Db,'<td>'.lang(249).$Db,'<td>'.lang(44).doc_link(array('sql'=>'example-auto-increment.html')),'<td>'.lang(250).$Db,(support("comment")?'<td>'.lang(43).$Db:''),"</thead>\n";$S=0;foreach($cg
as$E=>$U){$Tg=($U!==null&&!preg_match('~table~i',$U));$v=h("Table-".$E);echo'<tr'.odd().'><td>'.checkbox(($Tg?"views[]":"tables[]"),$E,in_array($E,$dg,true),"","formUncheck('check-all');","",$v),'<th>'.(support("table")||support("indexes")?"<a href='".h(ME)."table=".urlencode($E)."' title='".lang(36)."' id='$v'>".h($E).'</a>':h($E));if($Tg){echo'<td colspan="6"><a href="'.h(ME)."view=".urlencode($E).'" title="'.lang(37).'">'.(preg_match('~materialized~i',$U)?lang(115):lang(116)).'</a>','<td align="right"><a href="'.h(ME)."select=".urlencode($E).'" title="'.lang(35).'">?</a>';}else{foreach(array("Engine"=>array(),"Collation"=>array(),"Data_length"=>array("create",lang(38)),"Index_length"=>array("indexes",lang(119)),"Data_free"=>array("edit",lang(39)),"Auto_increment"=>array("auto_increment=1&create",lang(38)),"Rows"=>array("select",lang(35)),)as$z=>$A){$v=" id='$z-".h($E)."'";echo($A?"<td align='right'>".(support("table")||$z=="Rows"||(support("indexes")&&$z!="Data_length")?"<a href='".h(ME."$A[0]=").urlencode($E)."'$v title='$A[1]'>?</a>":"<span$v>?</span>"):"<td id='$z-".h($E)."'>&nbsp;");}$S++;}echo(support("comment")?"<td id='Comment-".h($E)."'>&nbsp;":"");}echo"<tr><td>&nbsp;<th>".lang(220,count($cg)),"<td>".nbsp($y=="sql"?$g->result("SELECT @@storage_engine"):""),"<td>".nbsp(db_collation(DB,collations()));foreach(array("Data_length","Index_length","Data_free")as$z)echo"<td align='right' id='sum-$z'>&nbsp;";echo"</table>\n";if(!information_schema(DB)){$Pg="<input type='submit' value='".lang(251)."'".on_help("'VACUUM'")."> ";$he="<input type='submit' name='optimize' value='".lang(252)."'".on_help($y=="sql"?"'OPTIMIZE TABLE'":"'VACUUM OPTIMIZE'")."> ";echo"<fieldset><legend>".lang(113)." <span id='selected'></span></legend><div>".($y=="sqlite"?$Pg:($y=="pgsql"?$Pg.$he:($y=="sql"?"<input type='submit' value='".lang(253)."'".on_help("'ANALYZE TABLE'")."> ".$he."<input type='submit' name='check' value='".lang(254)."'".on_help("'CHECK TABLE'")."> "."<input type='submit' name='repair' value='".lang(255)."'".on_help("'REPAIR TABLE'")."> ":"")))."<input type='submit' name='truncate' value='".lang(256)."'".confirm().on_help($y=="sqlite"?"'DELETE'":"'TRUNCATE".($y=="pgsql"?"'":" TABLE'"))."> "."<input type='submit' name='drop' value='".lang(114)."'".confirm().on_help("'DROP TABLE'").">\n";$j=(support("scheme")?$c->schemas():$c->databases());if(count($j)!=1&&$y!="sqlite"){$k=(isset($_POST["target"])?$_POST["target"]:(support("scheme")?$_GET["ns"]:DB));echo"<p>".lang(257).": ",($j?html_select("target",$j,$k):'<input name="target" value="'.h($k).'" autocapitalize="off">')," <input type='submit' name='move' value='".lang(258)."'>",(support("copy")?" <input type='submit' name='copy' value='".lang(259)."'>":""),"\n";}echo"<input type='hidden' name='all' value='' onclick=\"selectCount('selected', formChecked(this, /^(tables|views)\[/));".(support("table")?" selectCount('selected2', formChecked(this, /^tables\[/) || $S);":"")."\">\n";echo"<input type='hidden' name='token' value='$T'>\n","</div></fieldset>\n";}echo"</form>\n","<script type='text/javascript'>tableCheck();</script>\n";}echo'<p class="links"><a href="'.h(ME).'create=">'.lang(67)."</a>\n",(support("view")?'<a href="'.h(ME).'view=">'.lang(186)."</a>\n":"");if(support("routine")){echo"<h3 id='routines'>".lang(129)."</h3>\n";$rf=routines();if($rf){echo"<table cellspacing='0'>\n",'<thead><tr><th>'.lang(168).'<td>'.lang(42).'<td>'.lang(203)."<td>&nbsp;</thead>\n";odd('');foreach($rf
as$L){echo'<tr'.odd().'>','<th><a href="'.h(ME).($L["ROUTINE_TYPE"]!="PROCEDURE"?'callf=':'call=').urlencode($L["ROUTINE_NAME"]).'">'.h($L["ROUTINE_NAME"]).'</a>','<td>'.h($L["ROUTINE_TYPE"]),'<td>'.h($L["DTD_IDENTIFIER"]),'<td><a href="'.h(ME).($L["ROUTINE_TYPE"]!="PROCEDURE"?'function=':'procedure=').urlencode($L["ROUTINE_NAME"]).'">'.lang(122)."</a>";}echo"</table>\n";}echo'<p class="links">'.(support("procedure")?'<a href="'.h(ME).'procedure=">'.lang(202).'</a>':'').'<a href="'.h(ME).'function=">'.lang(201)."</a>\n";}if(support("event")){echo"<h3 id='events'>".lang(130)."</h3>\n";$M=get_rows("SHOW EVENTS");if($M){echo"<table cellspacing='0'>\n","<thead><tr><th>".lang(168)."<td>".lang(260)."<td>".lang(192)."<td>".lang(193)."<td></thead>\n";foreach($M
as$L){echo"<tr>","<th>".h($L["Name"]),"<td>".($L["Execute at"]?lang(261)."<td>".$L["Execute at"]:lang(194)." ".$L["Interval value"]." ".$L["Interval field"]."<td>$L[Starts]"),"<td>$L[Ends]",'<td><a href="'.h(ME).'event='.urlencode($L["Name"]).'">'.lang(122).'</a>';}echo"</table>\n";$bc=$g->result("SELECT @@event_scheduler");if($bc&&$bc!="ON")echo"<p class='error'><code class='jush-sqlset'>event_scheduler</code>: ".h($bc)."\n";}echo'<p class="links"><a href="'.h(ME).'event=">'.lang(191)."</a>\n";}if($cg)echo"<script type='text/javascript'>ajaxSetHtml('".js_escape(ME)."script=db');</script>\n";}}}page_footer();