Initial commit
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
** v 2.0.3 **
|
||||
Date: 7-January-2012
|
||||
|
||||
- number of tables per page option added
|
||||
- rename table option added
|
||||
- multiple table rename option added
|
||||
- search in table option added
|
||||
- some bugs fixed
|
||||
- size of the table and number of rows info added
|
||||
- language pack option added (english only for now)
|
||||
|
||||
|
||||
_______________________________
|
||||
** v 2.0.2 **
|
||||
Date: 22-Octomber-2011
|
||||
|
||||
- multiple drop,empty and export table option added
|
||||
- small bugs fixed
|
||||
- pagination in table list added
|
||||
|
||||
|
||||
_______________________________
|
||||
** v 2.0.1 REBUILD **
|
||||
|
||||
* SINCE IS A REBUILD VERSION THIS IS THE FIRST RELESE *
|
||||
Date: 05-July-2011
|
||||
|
||||
wap phpmyadmin 2.0.1 REBUILD can:
|
||||
|
||||
- view tables list
|
||||
- add tables
|
||||
- execute sql code
|
||||
- export database in .sql file, you can also zip it
|
||||
- upload and execute sql file
|
||||
- import via url and execute sql file
|
||||
- view a file list with backup files from export
|
||||
- view table structure
|
||||
- add column
|
||||
- copy table
|
||||
- insert data
|
||||
- browse table
|
||||
- edit data
|
||||
- clear table
|
||||
- drop table
|
||||
- edit column
|
||||
- browse column
|
||||
- drop column
|
||||
- multiple delete records, tables, columns
|
||||
|
||||
please report bugs at [email protected]
|
||||
@@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
@@ -0,0 +1,24 @@
|
||||
/********************
|
||||
* *
|
||||
* ionutvmi *
|
||||
* wap phpmyadmin *
|
||||
* v 2.0.3 *
|
||||
* *
|
||||
********************/
|
||||
|
||||
/*** REQUIREMENTS **/
|
||||
You need a database already created so you can use this.
|
||||
|
||||
|
||||
/****** INSTALL ****/
|
||||
1. unzip wap_phpmyadmin_2_0_3.zip file
|
||||
2. chmod data folder 777
|
||||
3. ENJOY AND USE IT
|
||||
|
||||
|
||||
/******* bugs ******/
|
||||
I'M STILL TESTING THIS SCRIPT SO IF YOU FIND ANY BUGS PLEASE REPORT IT AT [email protected]
|
||||
|
||||
|
||||
Thank you,
|
||||
ionutvmi
|
||||
@@ -0,0 +1,301 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
$tb=trim($_GET['tb']);
|
||||
$vmi=$_GET['vmi'];
|
||||
echo "<div class='shout'><b>".$lang["CREATE_COLUMN"]."</b><p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='table.php?k=$k&tb=$tb'>$tb</a>><a href='?k=$k&tb=$tb'>".$lang["add_column"]."</a><br/>- - -<br/>";
|
||||
if (!$vmi) {
|
||||
echo "
|
||||
<form action='?k=$k&vmi=ionutvmi&tb=$tb' method='post' align='left'>
|
||||
".$lang["colunm_name"].": <input name='tc' value='id'><br/> ".$lang["type"].": ";
|
||||
print ' <select name="ct">
|
||||
<option value="VARCHAR">VARCHAR</option>
|
||||
<option value="TINYINT">TINYINT</option>
|
||||
<option value="TEXT">TEXT</option>
|
||||
<option value="DATE">DATE</option>
|
||||
<option value="SMALLINT">SMALLINT</option>
|
||||
<option value="MEDIUMINT">MEDIUMINT</option>
|
||||
<option value="INT" SELECTED>INT</option>
|
||||
<option value="BIGINT">BIGINT</option>
|
||||
<option value="FLOAT">FLOAT</option>
|
||||
<option value="DOUBLE">DOUBLE</option>
|
||||
<option value="DECIMAL">DECIMAL</option>
|
||||
<option value="DATETIME">DATETIME</option>
|
||||
<option value="TIMESTAMP">TIMESTAMP</option>
|
||||
<option value="TIME">TIME</option>
|
||||
<option value="YEAR">YEAR</option>
|
||||
<option value="CHAR">CHAR</option>
|
||||
<option value="TINYBLOB">TINYBLOB</option>
|
||||
<option value="TINYTEXT">TINYTEXT</option>
|
||||
<option value="BLOB">BLOB</option>
|
||||
<option value="MEDIUMBLOB">MEDIUMBLOB</option>
|
||||
<option value="MEDIUMTEXT">MEDIUMTEXT</option>
|
||||
<option value="LONGBLOB">LONGBLOB</option>
|
||||
<option value="LONGTEXT">LONGTEXT</option>
|
||||
<option value="ENUM">ENUM</option>
|
||||
<option value="SET">SET</option>
|
||||
<option value="BOOL">BOOL</option>
|
||||
<option value="BINARY">BINARY</option>
|
||||
<option value="VARBINARY">VARBINARY</option>';
|
||||
print "</select><br/>
|
||||
".$lang["Length"].": <input name='lg'><br/>";
|
||||
print $lang["Collation"].':<select name="co"> <option value=""> </option>
|
||||
<optgroup label="armscii8" title="ARMSCII-8 Armenian">
|
||||
<option value="armscii8_bin" title="Armenian, Binary">armscii8_bin</option>
|
||||
<option value="armscii8_general_ci" title="Armenian, case-insensitive">armscii8_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="ascii" title="US ASCII">
|
||||
<option value="ascii_bin" title="West European (multilingual), Binary">ascii_bin</option>
|
||||
<option value="ascii_general_ci" title="West European (multilingual), case-insensitive">ascii_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="big5" title="Big5 Traditional Chinese">
|
||||
<option value="big5_bin" title="Traditional Chinese, Binary">big5_bin</option>
|
||||
<option value="big5_chinese_ci" title="Traditional Chinese, case-insensitive">big5_chinese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="binary" title="Binary pseudo charset">
|
||||
<option value="binary" title="Binary">binary</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp1250" title="Windows Central European">
|
||||
<option value="cp1250_bin" title="Central European (multilingual), Binary">cp1250_bin</option>
|
||||
<option value="cp1250_croatian_ci" title="Croatian, case-insensitive">cp1250_croatian_ci</option>
|
||||
<option value="cp1250_czech_cs" title="Czech, case-sensitive">cp1250_czech_cs</option>
|
||||
<option value="cp1250_general_ci" title="Central European (multilingual), case-insensitive">cp1250_general_ci</option>
|
||||
<option value="cp1250_polish_ci" title="Polish, case-insensitive">cp1250_polish_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp1251" title="Windows Cyrillic">
|
||||
<option value="cp1251_bin" title="Cyrillic (multilingual), Binary">cp1251_bin</option>
|
||||
<option value="cp1251_bulgarian_ci" title="Bulgarian, case-insensitive">cp1251_bulgarian_ci</option>
|
||||
<option value="cp1251_general_ci" title="Cyrillic (multilingual), case-insensitive">cp1251_general_ci</option>
|
||||
<option value="cp1251_general_cs" title="Cyrillic (multilingual), case-sensitive">cp1251_general_cs</option>
|
||||
<option value="cp1251_ukrainian_ci" title="Ukrainian, case-insensitive">cp1251_ukrainian_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp1256" title="Windows Arabic">
|
||||
<option value="cp1256_bin" title="Arabic, Binary">cp1256_bin</option>
|
||||
<option value="cp1256_general_ci" title="Arabic, case-insensitive">cp1256_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp1257" title="Windows Baltic">
|
||||
<option value="cp1257_bin" title="Baltic (multilingual), Binary">cp1257_bin</option>
|
||||
<option value="cp1257_general_ci" title="Baltic (multilingual), case-insensitive">cp1257_general_ci</option>
|
||||
<option value="cp1257_lithuanian_ci" title="Lithuanian, case-insensitive">cp1257_lithuanian_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp850" title="DOS West European">
|
||||
<option value="cp850_bin" title="West European (multilingual), Binary">cp850_bin</option>
|
||||
<option value="cp850_general_ci" title="West European (multilingual), case-insensitive">cp850_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp852" title="DOS Central European">
|
||||
<option value="cp852_bin" title="Central European (multilingual), Binary">cp852_bin</option>
|
||||
<option value="cp852_general_ci" title="Central European (multilingual), case-insensitive">cp852_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp866" title="DOS Russian">
|
||||
<option value="cp866_bin" title="Russian, Binary">cp866_bin</option>
|
||||
<option value="cp866_general_ci" title="Russian, case-insensitive">cp866_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp932" title="SJIS for Windows Japanese">
|
||||
<option value="cp932_bin" title="Japanese, Binary">cp932_bin</option>
|
||||
<option value="cp932_japanese_ci" title="Japanese, case-insensitive">cp932_japanese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="dec8" title="DEC West European">
|
||||
<option value="dec8_bin" title="West European (multilingual), Binary">dec8_bin</option>
|
||||
<option value="dec8_swedish_ci" title="Swedish, case-insensitive">dec8_swedish_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="eucjpms" title="UJIS for Windows Japanese">
|
||||
<option value="eucjpms_bin" title="Japanese, Binary">eucjpms_bin</option>
|
||||
<option value="eucjpms_japanese_ci" title="Japanese, case-insensitive">eucjpms_japanese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="euckr" title="EUC-KR Korean">
|
||||
<option value="euckr_bin" title="Korean, Binary">euckr_bin</option>
|
||||
<option value="euckr_korean_ci" title="Korean, case-insensitive">euckr_korean_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="gb2312" title="GB2312 Simplified Chinese">
|
||||
<option value="gb2312_bin" title="Simplified Chinese, Binary">gb2312_bin</option>
|
||||
<option value="gb2312_chinese_ci" title="Simplified Chinese, case-insensitive">gb2312_chinese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="gbk" title="GBK Simplified Chinese">
|
||||
<option value="gbk_bin" title="Simplified Chinese, Binary">gbk_bin</option>
|
||||
<option value="gbk_chinese_ci" title="Simplified Chinese, case-insensitive">gbk_chinese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="geostd8" title="GEOSTD8 Georgian">
|
||||
<option value="geostd8_bin" title="Georgian, Binary">geostd8_bin</option>
|
||||
<option value="geostd8_general_ci" title="Georgian, case-insensitive">geostd8_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="greek" title="ISO 8859-7 Greek">
|
||||
<option value="greek_bin" title="Greek, Binary">greek_bin</option>
|
||||
<option value="greek_general_ci" title="Greek, case-insensitive">greek_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="hebrew" title="ISO 8859-8 Hebrew">
|
||||
<option value="hebrew_bin" title="Hebrew, Binary">hebrew_bin</option>
|
||||
<option value="hebrew_general_ci" title="Hebrew, case-insensitive">hebrew_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="hp8" title="HP West European">
|
||||
<option value="hp8_bin" title="West European (multilingual), Binary">hp8_bin</option>
|
||||
<option value="hp8_english_ci" title="English, case-insensitive">hp8_english_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="keybcs2" title="DOS Kamenicky Czech-Slovak">
|
||||
<option value="keybcs2_bin" title="Czech-Slovak, Binary">keybcs2_bin</option>
|
||||
<option value="keybcs2_general_ci" title="Czech-Slovak, case-insensitive">keybcs2_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="koi8r" title="KOI8-R Relcom Russian">
|
||||
<option value="koi8r_bin" title="Russian, Binary">koi8r_bin</option>
|
||||
<option value="koi8r_general_ci" title="Russian, case-insensitive">koi8r_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="koi8u" title="KOI8-U Ukrainian">
|
||||
<option value="koi8u_bin" title="Ukrainian, Binary">koi8u_bin</option>
|
||||
<option value="koi8u_general_ci" title="Ukrainian, case-insensitive">koi8u_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="latin1" title="cp1252 West European">
|
||||
<option value="latin1_bin" title="West European (multilingual), Binary">latin1_bin</option>
|
||||
<option value="latin1_danish_ci" title="Danish, case-insensitive">latin1_danish_ci</option>
|
||||
<option value="latin1_general_ci" title="West European (multilingual), case-insensitive">latin1_general_ci</option>
|
||||
<option value="latin1_general_cs" title="West European (multilingual), case-sensitive">latin1_general_cs</option>
|
||||
<option value="latin1_german1_ci" title="German (dictionary), case-insensitive">latin1_german1_ci</option>
|
||||
<option value="latin1_german2_ci" title="German (phone book), case-insensitive">latin1_german2_ci</option>
|
||||
<option value="latin1_spanish_ci" title="Spanish, case-insensitive">latin1_spanish_ci</option>
|
||||
<option value="latin1_swedish_ci" title="Swedish, case-insensitive">latin1_swedish_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="latin2" title="ISO 8859-2 Central European">
|
||||
<option value="latin2_bin" title="Central European (multilingual), Binary">latin2_bin</option>
|
||||
<option value="latin2_croatian_ci" title="Croatian, case-insensitive">latin2_croatian_ci</option>
|
||||
<option value="latin2_czech_cs" title="Czech, case-sensitive">latin2_czech_cs</option>
|
||||
<option value="latin2_general_ci" title="Central European (multilingual), case-insensitive">latin2_general_ci</option>
|
||||
<option value="latin2_hungarian_ci" title="Hungarian, case-insensitive">latin2_hungarian_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="latin5" title="ISO 8859-9 Turkish">
|
||||
<option value="latin5_bin" title="Turkish, Binary">latin5_bin</option>
|
||||
<option value="latin5_turkish_ci" title="Turkish, case-insensitive">latin5_turkish_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="latin7" title="ISO 8859-13 Baltic">
|
||||
<option value="latin7_bin" title="Baltic (multilingual), Binary">latin7_bin</option>
|
||||
<option value="latin7_estonian_cs" title="Estonian, case-sensitive">latin7_estonian_cs</option>
|
||||
<option value="latin7_general_ci" title="Baltic (multilingual), case-insensitive">latin7_general_ci</option>
|
||||
<option value="latin7_general_cs" title="Baltic (multilingual), case-sensitive">latin7_general_cs</option>
|
||||
</optgroup>
|
||||
<optgroup label="macce" title="Mac Central European">
|
||||
<option value="macce_bin" title="Central European (multilingual), Binary">macce_bin</option>
|
||||
<option value="macce_general_ci" title="Central European (multilingual), case-insensitive">macce_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="macroman" title="Mac West European">
|
||||
<option value="macroman_bin" title="West European (multilingual), Binary">macroman_bin</option>
|
||||
<option value="macroman_general_ci" title="West European (multilingual), case-insensitive">macroman_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="sjis" title="Shift-JIS Japanese">
|
||||
<option value="sjis_bin" title="Japanese, Binary">sjis_bin</option>
|
||||
<option value="sjis_japanese_ci" title="Japanese, case-insensitive">sjis_japanese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="swe7" title="7bit Swedish">
|
||||
<option value="swe7_bin" title="Swedish, Binary">swe7_bin</option>
|
||||
<option value="swe7_swedish_ci" title="Swedish, case-insensitive">swe7_swedish_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="tis620" title="TIS620 Thai">
|
||||
<option value="tis620_bin" title="Thai, Binary">tis620_bin</option>
|
||||
<option value="tis620_thai_ci" title="Thai, case-insensitive">tis620_thai_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="ucs2" title="UCS-2 Unicode">
|
||||
<option value="ucs2_bin" title="Unicode (multilingual), Binary">ucs2_bin</option>
|
||||
<option value="ucs2_czech_ci" title="Czech, case-insensitive">ucs2_czech_ci</option>
|
||||
<option value="ucs2_danish_ci" title="Danish, case-insensitive">ucs2_danish_ci</option>
|
||||
<option value="ucs2_esperanto_ci" title="Esperanto, case-insensitive">ucs2_esperanto_ci</option>
|
||||
<option value="ucs2_estonian_ci" title="Estonian, case-insensitive">ucs2_estonian_ci</option>
|
||||
<option value="ucs2_general_ci" title="Unicode (multilingual), case-insensitive">ucs2_general_ci</option>
|
||||
<option value="ucs2_hungarian_ci" title="Hungarian, case-insensitive">ucs2_hungarian_ci</option>
|
||||
<option value="ucs2_icelandic_ci" title="Icelandic, case-insensitive">ucs2_icelandic_ci</option>
|
||||
<option value="ucs2_latvian_ci" title="Latvian, case-insensitive">ucs2_latvian_ci</option>
|
||||
<option value="ucs2_lithuanian_ci" title="Lithuanian, case-insensitive">ucs2_lithuanian_ci</option>
|
||||
<option value="ucs2_persian_ci" title="Persian, case-insensitive">ucs2_persian_ci</option>
|
||||
<option value="ucs2_polish_ci" title="Polish, case-insensitive">ucs2_polish_ci</option>
|
||||
<option value="ucs2_roman_ci" title="West European, case-insensitive">ucs2_roman_ci</option>
|
||||
<option value="ucs2_romanian_ci" title="Romanian, case-insensitive">ucs2_romanian_ci</option>
|
||||
<option value="ucs2_slovak_ci" title="Slovak, case-insensitive">ucs2_slovak_ci</option>
|
||||
<option value="ucs2_slovenian_ci" title="Slovenian, case-insensitive">ucs2_slovenian_ci</option>
|
||||
<option value="ucs2_spanish2_ci" title="Traditional Spanish, case-insensitive">ucs2_spanish2_ci</option>
|
||||
<option value="ucs2_spanish_ci" title="Spanish, case-insensitive">ucs2_spanish_ci</option>
|
||||
<option value="ucs2_swedish_ci" title="Swedish, case-insensitive">ucs2_swedish_ci</option>
|
||||
<option value="ucs2_turkish_ci" title="Turkish, case-insensitive">ucs2_turkish_ci</option>
|
||||
<option value="ucs2_unicode_ci" title="Unicode (multilingual), case-insensitive">ucs2_unicode_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="ujis" title="EUC-JP Japanese">
|
||||
<option value="ujis_bin" title="Japanese, Binary">ujis_bin</option>
|
||||
<option value="ujis_japanese_ci" title="Japanese, case-insensitive">ujis_japanese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="utf8" title="UTF-8 Unicode">
|
||||
<option value="utf8_bin" title="Unicode (multilingual), Binary">utf8_bin</option>
|
||||
<option value="utf8_czech_ci" title="Czech, case-insensitive">utf8_czech_ci</option>
|
||||
<option value="utf8_danish_ci" title="Danish, case-insensitive">utf8_danish_ci</option>
|
||||
<option value="utf8_esperanto_ci" title="Esperanto, case-insensitive">utf8_esperanto_ci</option>
|
||||
<option value="utf8_estonian_ci" title="Estonian, case-insensitive">utf8_estonian_ci</option>
|
||||
<option value="utf8_general_ci" title="Unicode (multilingual), case-insensitive">utf8_general_ci</option>
|
||||
<option value="utf8_hungarian_ci" title="Hungarian, case-insensitive">utf8_hungarian_ci</option>
|
||||
<option value="utf8_icelandic_ci" title="Icelandic, case-insensitive">utf8_icelandic_ci</option>
|
||||
<option value="utf8_latvian_ci" title="Latvian, case-insensitive">utf8_latvian_ci</option>
|
||||
<option value="utf8_lithuanian_ci" title="Lithuanian, case-insensitive">utf8_lithuanian_ci</option>
|
||||
<option value="utf8_persian_ci" title="Persian, case-insensitive">utf8_persian_ci</option>
|
||||
<option value="utf8_polish_ci" title="Polish, case-insensitive">utf8_polish_ci</option>
|
||||
<option value="utf8_roman_ci" title="West European, case-insensitive">utf8_roman_ci</option>
|
||||
<option value="utf8_romanian_ci" title="Romanian, case-insensitive">utf8_romanian_ci</option>
|
||||
<option value="utf8_slovak_ci" title="Slovak, case-insensitive">utf8_slovak_ci</option>
|
||||
<option value="utf8_slovenian_ci" title="Slovenian, case-insensitive">utf8_slovenian_ci</option>
|
||||
<option value="utf8_spanish2_ci" title="Traditional Spanish, case-insensitive">utf8_spanish2_ci</option>
|
||||
<option value="utf8_spanish_ci" title="Spanish, case-insensitive">utf8_spanish_ci</option>
|
||||
<option value="utf8_swedish_ci" title="Swedish, case-insensitive">utf8_swedish_ci</option>
|
||||
<option value="utf8_turkish_ci" title="Turkish, case-insensitive">utf8_turkish_ci</option>
|
||||
<option value="utf8_unicode_ci" title="Unicode (multilingual), case-insensitive">utf8_unicode_ci</option>
|
||||
</optgroup>
|
||||
</select><br/>'.$lang["Attributes"].': <select name="at"> <option value="" selected="selected"></option>
|
||||
<option value="UNSIGNED">UNSIGNED</option>
|
||||
<option value="UNSIGNED ZEROFILL">UNSIGNED ZEROFILL</option>
|
||||
<option value="ON UPDATE CURRENT_TIMESTAMP">ON UPDATE CURRENT_TIMESTAMP</option>
|
||||
</select><br/>NULL <select name="nu"><option value="NOT NULL" selected="selected" >not null</option>
|
||||
<option value="">null</option></select><br/>'.$lang["Default"].': <input name="df"><br/>'.$lang["Extra"].': <select name="ex"><option value=""> </option>
|
||||
<option value="AUTO_INCREMENT">auto_increment</option>
|
||||
</select><br>'.$lang["Field_Key"].': <select name="fk">
|
||||
<option value="0">---</option>
|
||||
<option value="1">Primary</option>
|
||||
<option value="2">Index</option>
|
||||
<option value="3">Unique</option>
|
||||
</select><br/>';
|
||||
print "<input type='radio' name='pos' value='' checked>".$lang["At_End_Of_Table"]." <br/>
|
||||
<input type='radio' name='pos' value='FIRST'>".$lang["At_Beginning_Of_Table"]." <br/>
|
||||
<input type='radio' name='pos' value='AFTER'>".$lang["After"]." <select name='afp'>";
|
||||
|
||||
$col=mysqli_query($conn, "SHOW COLUMNS FROM `$tb`");
|
||||
while ($r = mysqli_fetch_array($col)){
|
||||
$cc=$r["Field"];
|
||||
print "<option value='$cc'> $cc </option>";
|
||||
}
|
||||
print "</select><br/><input type='submit' value='".$lang["create"]."'></form>";
|
||||
} else {
|
||||
$tc=trim($_POST['tc']);
|
||||
$ct=trim($_POST['ct']);
|
||||
$lg=trim($_POST['lg']);
|
||||
$co=trim($_POST['co']);
|
||||
$at=trim($_POST['at']);
|
||||
$nu=trim($_POST['nu']);
|
||||
$df=trim($_POST['df']);
|
||||
if($df !="") $df="DEFAULT '$df'";
|
||||
$ex=trim($_POST['ex']);
|
||||
$fk=trim($_POST['fk']);
|
||||
if($fk==0) $fkk="";
|
||||
if($fk==1) $fkk=",PRIMARY KEY(`$tc`)";
|
||||
if($fk==2) $fkk=",INDEX(`$tc`)";
|
||||
if($fk==3) $fkk=",UNIQUE(`$tc`)";
|
||||
if($lg !="") $lg="($lg)";
|
||||
|
||||
$po=$_POST["pos"];
|
||||
if($po == "AFTER") $po = "AFTER `".$_POST["afp"]."`";
|
||||
$sql="ALTER TABLE `$tb` ADD `$tc` $ct $lg $co $at $nu $df $ex $fkk $po";
|
||||
$create=mysqli_query($conn, $sql);
|
||||
print "<center><i>".$lang["Query"].": ".htmlspecialchars($sql)."</i></center>";
|
||||
if ($create) {
|
||||
printf($lang["column_created"],$tc);
|
||||
} else {
|
||||
echo $lang["Error"].": ";
|
||||
echo mysqli_error($conn);
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,292 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include('config.php');
|
||||
include('head.php');
|
||||
|
||||
$vmi=$_GET['vmi'];
|
||||
echo "<div class='shout'><b>".$lang["ADD_TABLE"]."</b><p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='?k=$k'>".strtolower($lang["ADD_TABLE"])."</a><br/>- - -<br/>";
|
||||
if (!$vmi) {
|
||||
echo "
|
||||
<form action='?k=$k&vmi=ionutvmi' method='post' align='left'>
|
||||
".$lang["table_name"].":<input name='tn' value='table'><br/>
|
||||
".$lang["colunm_name"].": <input name='tc' value='id'><br/> ".$lang["type"].": ";
|
||||
print ' <select name="ct">
|
||||
<option value="VARCHAR">VARCHAR</option>
|
||||
<option value="TINYINT">TINYINT</option>
|
||||
<option value="TEXT">TEXT</option>
|
||||
<option value="DATE">DATE</option>
|
||||
<option value="SMALLINT">SMALLINT</option>
|
||||
<option value="MEDIUMINT">MEDIUMINT</option>
|
||||
<option value="INT" SELECTED>INT</option>
|
||||
<option value="BIGINT">BIGINT</option>
|
||||
<option value="FLOAT">FLOAT</option>
|
||||
<option value="DOUBLE">DOUBLE</option>
|
||||
<option value="DECIMAL">DECIMAL</option>
|
||||
<option value="DATETIME">DATETIME</option>
|
||||
<option value="TIMESTAMP">TIMESTAMP</option>
|
||||
<option value="TIME">TIME</option>
|
||||
<option value="YEAR">YEAR</option>
|
||||
<option value="CHAR">CHAR</option>
|
||||
<option value="TINYBLOB">TINYBLOB</option>
|
||||
<option value="TINYTEXT">TINYTEXT</option>
|
||||
<option value="BLOB">BLOB</option>
|
||||
<option value="MEDIUMBLOB">MEDIUMBLOB</option>
|
||||
<option value="MEDIUMTEXT">MEDIUMTEXT</option>
|
||||
<option value="LONGBLOB">LONGBLOB</option>
|
||||
<option value="LONGTEXT">LONGTEXT</option>
|
||||
<option value="ENUM">ENUM</option>
|
||||
<option value="SET">SET</option>
|
||||
<option value="BOOL">BOOL</option>
|
||||
<option value="BINARY">BINARY</option>
|
||||
<option value="VARBINARY">VARBINARY</option>';
|
||||
print "</select><br/>
|
||||
".$lang["Length"].": <input name='lg'><br/>";
|
||||
print $lang["Collation"].':<select name="co"> <option value=""> </option>
|
||||
<optgroup label="armscii8" title="ARMSCII-8 Armenian">
|
||||
<option value="armscii8_bin" title="Armenian, Binary">armscii8_bin</option>
|
||||
<option value="armscii8_general_ci" title="Armenian, case-insensitive">armscii8_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="ascii" title="US ASCII">
|
||||
<option value="ascii_bin" title="West European (multilingual), Binary">ascii_bin</option>
|
||||
<option value="ascii_general_ci" title="West European (multilingual), case-insensitive">ascii_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="big5" title="Big5 Traditional Chinese">
|
||||
<option value="big5_bin" title="Traditional Chinese, Binary">big5_bin</option>
|
||||
<option value="big5_chinese_ci" title="Traditional Chinese, case-insensitive">big5_chinese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="binary" title="Binary pseudo charset">
|
||||
<option value="binary" title="Binary">binary</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp1250" title="Windows Central European">
|
||||
<option value="cp1250_bin" title="Central European (multilingual), Binary">cp1250_bin</option>
|
||||
<option value="cp1250_croatian_ci" title="Croatian, case-insensitive">cp1250_croatian_ci</option>
|
||||
<option value="cp1250_czech_cs" title="Czech, case-sensitive">cp1250_czech_cs</option>
|
||||
<option value="cp1250_general_ci" title="Central European (multilingual), case-insensitive">cp1250_general_ci</option>
|
||||
<option value="cp1250_polish_ci" title="Polish, case-insensitive">cp1250_polish_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp1251" title="Windows Cyrillic">
|
||||
<option value="cp1251_bin" title="Cyrillic (multilingual), Binary">cp1251_bin</option>
|
||||
<option value="cp1251_bulgarian_ci" title="Bulgarian, case-insensitive">cp1251_bulgarian_ci</option>
|
||||
<option value="cp1251_general_ci" title="Cyrillic (multilingual), case-insensitive">cp1251_general_ci</option>
|
||||
<option value="cp1251_general_cs" title="Cyrillic (multilingual), case-sensitive">cp1251_general_cs</option>
|
||||
<option value="cp1251_ukrainian_ci" title="Ukrainian, case-insensitive">cp1251_ukrainian_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp1256" title="Windows Arabic">
|
||||
<option value="cp1256_bin" title="Arabic, Binary">cp1256_bin</option>
|
||||
<option value="cp1256_general_ci" title="Arabic, case-insensitive">cp1256_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp1257" title="Windows Baltic">
|
||||
<option value="cp1257_bin" title="Baltic (multilingual), Binary">cp1257_bin</option>
|
||||
<option value="cp1257_general_ci" title="Baltic (multilingual), case-insensitive">cp1257_general_ci</option>
|
||||
<option value="cp1257_lithuanian_ci" title="Lithuanian, case-insensitive">cp1257_lithuanian_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp850" title="DOS West European">
|
||||
<option value="cp850_bin" title="West European (multilingual), Binary">cp850_bin</option>
|
||||
<option value="cp850_general_ci" title="West European (multilingual), case-insensitive">cp850_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp852" title="DOS Central European">
|
||||
<option value="cp852_bin" title="Central European (multilingual), Binary">cp852_bin</option>
|
||||
<option value="cp852_general_ci" title="Central European (multilingual), case-insensitive">cp852_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp866" title="DOS Russian">
|
||||
<option value="cp866_bin" title="Russian, Binary">cp866_bin</option>
|
||||
<option value="cp866_general_ci" title="Russian, case-insensitive">cp866_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp932" title="SJIS for Windows Japanese">
|
||||
<option value="cp932_bin" title="Japanese, Binary">cp932_bin</option>
|
||||
<option value="cp932_japanese_ci" title="Japanese, case-insensitive">cp932_japanese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="dec8" title="DEC West European">
|
||||
<option value="dec8_bin" title="West European (multilingual), Binary">dec8_bin</option>
|
||||
<option value="dec8_swedish_ci" title="Swedish, case-insensitive">dec8_swedish_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="eucjpms" title="UJIS for Windows Japanese">
|
||||
<option value="eucjpms_bin" title="Japanese, Binary">eucjpms_bin</option>
|
||||
<option value="eucjpms_japanese_ci" title="Japanese, case-insensitive">eucjpms_japanese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="euckr" title="EUC-KR Korean">
|
||||
<option value="euckr_bin" title="Korean, Binary">euckr_bin</option>
|
||||
<option value="euckr_korean_ci" title="Korean, case-insensitive">euckr_korean_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="gb2312" title="GB2312 Simplified Chinese">
|
||||
<option value="gb2312_bin" title="Simplified Chinese, Binary">gb2312_bin</option>
|
||||
<option value="gb2312_chinese_ci" title="Simplified Chinese, case-insensitive">gb2312_chinese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="gbk" title="GBK Simplified Chinese">
|
||||
<option value="gbk_bin" title="Simplified Chinese, Binary">gbk_bin</option>
|
||||
<option value="gbk_chinese_ci" title="Simplified Chinese, case-insensitive">gbk_chinese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="geostd8" title="GEOSTD8 Georgian">
|
||||
<option value="geostd8_bin" title="Georgian, Binary">geostd8_bin</option>
|
||||
<option value="geostd8_general_ci" title="Georgian, case-insensitive">geostd8_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="greek" title="ISO 8859-7 Greek">
|
||||
<option value="greek_bin" title="Greek, Binary">greek_bin</option>
|
||||
<option value="greek_general_ci" title="Greek, case-insensitive">greek_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="hebrew" title="ISO 8859-8 Hebrew">
|
||||
<option value="hebrew_bin" title="Hebrew, Binary">hebrew_bin</option>
|
||||
<option value="hebrew_general_ci" title="Hebrew, case-insensitive">hebrew_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="hp8" title="HP West European">
|
||||
<option value="hp8_bin" title="West European (multilingual), Binary">hp8_bin</option>
|
||||
<option value="hp8_english_ci" title="English, case-insensitive">hp8_english_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="keybcs2" title="DOS Kamenicky Czech-Slovak">
|
||||
<option value="keybcs2_bin" title="Czech-Slovak, Binary">keybcs2_bin</option>
|
||||
<option value="keybcs2_general_ci" title="Czech-Slovak, case-insensitive">keybcs2_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="koi8r" title="KOI8-R Relcom Russian">
|
||||
<option value="koi8r_bin" title="Russian, Binary">koi8r_bin</option>
|
||||
<option value="koi8r_general_ci" title="Russian, case-insensitive">koi8r_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="koi8u" title="KOI8-U Ukrainian">
|
||||
<option value="koi8u_bin" title="Ukrainian, Binary">koi8u_bin</option>
|
||||
<option value="koi8u_general_ci" title="Ukrainian, case-insensitive">koi8u_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="latin1" title="cp1252 West European">
|
||||
<option value="latin1_bin" title="West European (multilingual), Binary">latin1_bin</option>
|
||||
<option value="latin1_danish_ci" title="Danish, case-insensitive">latin1_danish_ci</option>
|
||||
<option value="latin1_general_ci" title="West European (multilingual), case-insensitive">latin1_general_ci</option>
|
||||
<option value="latin1_general_cs" title="West European (multilingual), case-sensitive">latin1_general_cs</option>
|
||||
<option value="latin1_german1_ci" title="German (dictionary), case-insensitive">latin1_german1_ci</option>
|
||||
<option value="latin1_german2_ci" title="German (phone book), case-insensitive">latin1_german2_ci</option>
|
||||
<option value="latin1_spanish_ci" title="Spanish, case-insensitive">latin1_spanish_ci</option>
|
||||
<option value="latin1_swedish_ci" title="Swedish, case-insensitive">latin1_swedish_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="latin2" title="ISO 8859-2 Central European">
|
||||
<option value="latin2_bin" title="Central European (multilingual), Binary">latin2_bin</option>
|
||||
<option value="latin2_croatian_ci" title="Croatian, case-insensitive">latin2_croatian_ci</option>
|
||||
<option value="latin2_czech_cs" title="Czech, case-sensitive">latin2_czech_cs</option>
|
||||
<option value="latin2_general_ci" title="Central European (multilingual), case-insensitive">latin2_general_ci</option>
|
||||
<option value="latin2_hungarian_ci" title="Hungarian, case-insensitive">latin2_hungarian_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="latin5" title="ISO 8859-9 Turkish">
|
||||
<option value="latin5_bin" title="Turkish, Binary">latin5_bin</option>
|
||||
<option value="latin5_turkish_ci" title="Turkish, case-insensitive">latin5_turkish_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="latin7" title="ISO 8859-13 Baltic">
|
||||
<option value="latin7_bin" title="Baltic (multilingual), Binary">latin7_bin</option>
|
||||
<option value="latin7_estonian_cs" title="Estonian, case-sensitive">latin7_estonian_cs</option>
|
||||
<option value="latin7_general_ci" title="Baltic (multilingual), case-insensitive">latin7_general_ci</option>
|
||||
<option value="latin7_general_cs" title="Baltic (multilingual), case-sensitive">latin7_general_cs</option>
|
||||
</optgroup>
|
||||
<optgroup label="macce" title="Mac Central European">
|
||||
<option value="macce_bin" title="Central European (multilingual), Binary">macce_bin</option>
|
||||
<option value="macce_general_ci" title="Central European (multilingual), case-insensitive">macce_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="macroman" title="Mac West European">
|
||||
<option value="macroman_bin" title="West European (multilingual), Binary">macroman_bin</option>
|
||||
<option value="macroman_general_ci" title="West European (multilingual), case-insensitive">macroman_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="sjis" title="Shift-JIS Japanese">
|
||||
<option value="sjis_bin" title="Japanese, Binary">sjis_bin</option>
|
||||
<option value="sjis_japanese_ci" title="Japanese, case-insensitive">sjis_japanese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="swe7" title="7bit Swedish">
|
||||
<option value="swe7_bin" title="Swedish, Binary">swe7_bin</option>
|
||||
<option value="swe7_swedish_ci" title="Swedish, case-insensitive">swe7_swedish_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="tis620" title="TIS620 Thai">
|
||||
<option value="tis620_bin" title="Thai, Binary">tis620_bin</option>
|
||||
<option value="tis620_thai_ci" title="Thai, case-insensitive">tis620_thai_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="ucs2" title="UCS-2 Unicode">
|
||||
<option value="ucs2_bin" title="Unicode (multilingual), Binary">ucs2_bin</option>
|
||||
<option value="ucs2_czech_ci" title="Czech, case-insensitive">ucs2_czech_ci</option>
|
||||
<option value="ucs2_danish_ci" title="Danish, case-insensitive">ucs2_danish_ci</option>
|
||||
<option value="ucs2_esperanto_ci" title="Esperanto, case-insensitive">ucs2_esperanto_ci</option>
|
||||
<option value="ucs2_estonian_ci" title="Estonian, case-insensitive">ucs2_estonian_ci</option>
|
||||
<option value="ucs2_general_ci" title="Unicode (multilingual), case-insensitive">ucs2_general_ci</option>
|
||||
<option value="ucs2_hungarian_ci" title="Hungarian, case-insensitive">ucs2_hungarian_ci</option>
|
||||
<option value="ucs2_icelandic_ci" title="Icelandic, case-insensitive">ucs2_icelandic_ci</option>
|
||||
<option value="ucs2_latvian_ci" title="Latvian, case-insensitive">ucs2_latvian_ci</option>
|
||||
<option value="ucs2_lithuanian_ci" title="Lithuanian, case-insensitive">ucs2_lithuanian_ci</option>
|
||||
<option value="ucs2_persian_ci" title="Persian, case-insensitive">ucs2_persian_ci</option>
|
||||
<option value="ucs2_polish_ci" title="Polish, case-insensitive">ucs2_polish_ci</option>
|
||||
<option value="ucs2_roman_ci" title="West European, case-insensitive">ucs2_roman_ci</option>
|
||||
<option value="ucs2_romanian_ci" title="Romanian, case-insensitive">ucs2_romanian_ci</option>
|
||||
<option value="ucs2_slovak_ci" title="Slovak, case-insensitive">ucs2_slovak_ci</option>
|
||||
<option value="ucs2_slovenian_ci" title="Slovenian, case-insensitive">ucs2_slovenian_ci</option>
|
||||
<option value="ucs2_spanish2_ci" title="Traditional Spanish, case-insensitive">ucs2_spanish2_ci</option>
|
||||
<option value="ucs2_spanish_ci" title="Spanish, case-insensitive">ucs2_spanish_ci</option>
|
||||
<option value="ucs2_swedish_ci" title="Swedish, case-insensitive">ucs2_swedish_ci</option>
|
||||
<option value="ucs2_turkish_ci" title="Turkish, case-insensitive">ucs2_turkish_ci</option>
|
||||
<option value="ucs2_unicode_ci" title="Unicode (multilingual), case-insensitive">ucs2_unicode_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="ujis" title="EUC-JP Japanese">
|
||||
<option value="ujis_bin" title="Japanese, Binary">ujis_bin</option>
|
||||
<option value="ujis_japanese_ci" title="Japanese, case-insensitive">ujis_japanese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="utf8" title="UTF-8 Unicode">
|
||||
<option value="utf8_bin" title="Unicode (multilingual), Binary">utf8_bin</option>
|
||||
<option value="utf8_czech_ci" title="Czech, case-insensitive">utf8_czech_ci</option>
|
||||
<option value="utf8_danish_ci" title="Danish, case-insensitive">utf8_danish_ci</option>
|
||||
<option value="utf8_esperanto_ci" title="Esperanto, case-insensitive">utf8_esperanto_ci</option>
|
||||
<option value="utf8_estonian_ci" title="Estonian, case-insensitive">utf8_estonian_ci</option>
|
||||
<option value="utf8_general_ci" title="Unicode (multilingual), case-insensitive">utf8_general_ci</option>
|
||||
<option value="utf8_hungarian_ci" title="Hungarian, case-insensitive">utf8_hungarian_ci</option>
|
||||
<option value="utf8_icelandic_ci" title="Icelandic, case-insensitive">utf8_icelandic_ci</option>
|
||||
<option value="utf8_latvian_ci" title="Latvian, case-insensitive">utf8_latvian_ci</option>
|
||||
<option value="utf8_lithuanian_ci" title="Lithuanian, case-insensitive">utf8_lithuanian_ci</option>
|
||||
<option value="utf8_persian_ci" title="Persian, case-insensitive">utf8_persian_ci</option>
|
||||
<option value="utf8_polish_ci" title="Polish, case-insensitive">utf8_polish_ci</option>
|
||||
<option value="utf8_roman_ci" title="West European, case-insensitive">utf8_roman_ci</option>
|
||||
<option value="utf8_romanian_ci" title="Romanian, case-insensitive">utf8_romanian_ci</option>
|
||||
<option value="utf8_slovak_ci" title="Slovak, case-insensitive">utf8_slovak_ci</option>
|
||||
<option value="utf8_slovenian_ci" title="Slovenian, case-insensitive">utf8_slovenian_ci</option>
|
||||
<option value="utf8_spanish2_ci" title="Traditional Spanish, case-insensitive">utf8_spanish2_ci</option>
|
||||
<option value="utf8_spanish_ci" title="Spanish, case-insensitive">utf8_spanish_ci</option>
|
||||
<option value="utf8_swedish_ci" title="Swedish, case-insensitive">utf8_swedish_ci</option>
|
||||
<option value="utf8_turkish_ci" title="Turkish, case-insensitive">utf8_turkish_ci</option>
|
||||
<option value="utf8_unicode_ci" title="Unicode (multilingual), case-insensitive">utf8_unicode_ci</option>
|
||||
</optgroup>
|
||||
</select><br/>'.$lang["Attributes"].': <select name="at"> <option value="" selected="selected"></option>
|
||||
<option value="UNSIGNED">UNSIGNED</option>
|
||||
<option value="UNSIGNED ZEROFILL">UNSIGNED ZEROFILL</option>
|
||||
<option value="ON UPDATE CURRENT_TIMESTAMP">ON UPDATE CURRENT_TIMESTAMP</option>
|
||||
</select><br/>NULL <select name="nu"><option value="NOT NULL" selected="selected" >not null</option>
|
||||
<option value="">null</option></select><br/>'.$lang["Default"].': <input name="df"><br/>'.$lang["Extra"].': <select name="ex"><option value=""> </option>
|
||||
<option value="AUTO_INCREMENT">auto_increment</option>
|
||||
</select><br>'.$lang["Field_Key"].': <select name="fk">
|
||||
<option value="0">---</option>
|
||||
<option value="1">Primary</option>
|
||||
<option value="2">Index</option>
|
||||
<option value="3">Unique</option>
|
||||
</select><br/>';
|
||||
print "<input type='submit' value='".$lang["create"]."'></form>";
|
||||
} else {
|
||||
$tn=trim($_POST['tn']);
|
||||
$tc=trim($_POST['tc']);
|
||||
$ct=trim($_POST['ct']);
|
||||
$lg=trim($_POST['lg']);
|
||||
$co=trim($_POST['co']);
|
||||
$at=trim($_POST['at']);
|
||||
$nu=trim($_POST['nu']);
|
||||
$df=trim($_POST['df']);
|
||||
if($df !="") $df="DEFAULT '$df'";
|
||||
$ex=trim($_POST['ex']);
|
||||
$fk=trim($_POST['fk']);
|
||||
if($fk==0) $fkk="";
|
||||
if($fk==1) $fkk=",PRIMARY KEY(`$tc`)";
|
||||
if($fk==2) $fkk=",INDEX(`$tc`)";
|
||||
if($fk==3) $fkk=",UNIQUE(`$tc`)";
|
||||
if($lg !="") $lg="($lg)";
|
||||
$sql ="CREATE TABLE `$tn` (
|
||||
`$tc` $ct $lg $co $at $nu $df $ex $fkk)";
|
||||
echo "<center>".$lang["Query"].": <i>".htmlspecialchars($sql)."</i></center><p align='left'>";
|
||||
$create=mysqli_query($conn,"$sql");
|
||||
if ($create) {
|
||||
printf($lang["table_created"],$tn);
|
||||
} else {
|
||||
echo $lang["Error"].": ";
|
||||
echo mysqli_error($conn);
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,183 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
|
||||
|
||||
$tb=trim($_GET['tb']);
|
||||
$sql="SELECT * FROM `$tb`";
|
||||
$result = mysqli_query($conn,$sql);
|
||||
if (!$result) {
|
||||
echo "<div class='shout'>".strtoupper($lang["Browse"])."<br/>".$lang["Query"].": ".htmlspecialchars($sql)."<p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='table.php?k=$k&tb=$tb'>$tb</a><br/>- - -<br/>".$lang["Browse"]."</a> |<a href='table.php?k=$k&tb=$tb'>".$lang["Structure"]."</a> | <a href='search.php?k=$k&tb=$tb'>".$lang["Search"]."</a> | <a href='in.php?k=$k&tb=$tb'>".$lang["Insert"]."</a> | <a href='trun.php?k=$k&tb=$tb'>".$lang["Clear"]."</a> | <a href='dropt.php?k=$k&tb=$tb'>".$lang["Drop"]."</a><br/>- - -<br/>
|
||||
";
|
||||
printf($lang["table_not_exists"],$tb);
|
||||
} else {
|
||||
|
||||
|
||||
$xx = mysqli_query($conn,"SHOW INDEXES FROM `$tb` WHERE Key_name = 'PRIMARY'");
|
||||
$nrr=mysqli_num_rows($xx);
|
||||
|
||||
if($nrr>0){
|
||||
while ($row = mysqli_fetch_array($xx)) {
|
||||
$cvn= $row['Column_name'];
|
||||
$cv[]=$cvn."``0";
|
||||
}
|
||||
} else {
|
||||
$i=0;
|
||||
while ($i < mysqli_num_fields($result)) {
|
||||
$meta = mysqli_fetch_field_direct($result, $i);
|
||||
$cvn=$meta->name;
|
||||
$cv[]=$cvn."``1";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
// get column
|
||||
|
||||
$nnm=$_GET['nm'];
|
||||
if(!$nnm) {
|
||||
$meta = mysqli_fetch_field_direct($result, 0);
|
||||
$nm=$meta->name;
|
||||
}else{
|
||||
$nm= trim(base64_decode($nnm));
|
||||
}
|
||||
// get nr of columns
|
||||
// $val=mysqli_query($conn,"SELECT * FROM `$tb`");
|
||||
$nr=mysqli_num_rows($result);
|
||||
if ($nr >0) {
|
||||
// get psge
|
||||
|
||||
if(!isset($_GET['page'])){
|
||||
$page = 1;
|
||||
} else {
|
||||
$page = (int)$_GET['page'];
|
||||
}
|
||||
|
||||
if($page <= 0) $page=1;
|
||||
$perp = (int)$_GET['perp'];
|
||||
if(!$perp) $perp=10;
|
||||
if($perp <= 0) $perp=10;
|
||||
$from = (($page * $perp) - $perp);
|
||||
$total_pages = ceil($nr / $perp);
|
||||
if ($page>$total_pages) {
|
||||
die("error"); }
|
||||
$or=$_GET['or'];
|
||||
if(!$or) $or=0;
|
||||
if ($or==0) {
|
||||
$ord='asc'; } else {
|
||||
$ord='desc'; }
|
||||
$sql="SELECT * FROM `$tb` ORDER BY `$nm` $ord LIMIT $from, $perp";
|
||||
$val=mysqli_query($conn,$sql);
|
||||
echo "<div class='shout'>".strtoupper($lang["Browse"])."<br/>".$lang["Query"].": ".htmlspecialchars($sql)."<p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='table.php?k=$k&tb=$tb'>$tb</a><br/>- - -<br/>".$lang["Browse"]."</a> |<a href='table.php?k=$k&tb=$tb'>".$lang["Structure"]."</a> | <a href='search.php?k=$k&tb=$tb'>".$lang["Search"]."</a> | <a href='in.php?k=$k&tb=$tb'>".$lang["Insert"]."</a> | <a href='trun.php?k=$k&tb=$tb'>".$lang["Clear"]."</a> | <a href='dropt.php?k=$k&tb=$tb'>".$lang["Drop"]."</a><br/>- - -<br/>
|
||||
";
|
||||
// column list
|
||||
$col=mysqli_query($conn,"SHOW COLUMNS FROM `$tb`");
|
||||
while ($r = mysqli_fetch_array($col)){
|
||||
$nn[]=$r['Field'];
|
||||
}
|
||||
echo "<form action='?' align='left'><select name='nm'>";
|
||||
foreach($nn as $n){
|
||||
$nc=base64_encode($n);
|
||||
if($nm == $n)
|
||||
echo "<option value='$nc' SELECTED> ".htmlspecialchars($n)." </option>";
|
||||
else
|
||||
echo "<option value='$nc'> ".htmlspecialchars($n)." </option>";
|
||||
}
|
||||
echo "</select> <input type='hidden' name='k' value='$k'>
|
||||
<input type='hidden' name='page' value='$page'>
|
||||
<input type='hidden' name='tb' value='$tb'>
|
||||
<input type='hidden' name='perp' value='$perp'>
|
||||
<input type='hidden' name='or' value='$or'>
|
||||
<input type='submit' value='".$lang["Show"]."'><br>- - -<br></form><p align='left'>";
|
||||
|
||||
// asc/desc
|
||||
|
||||
if ($ord=='asc') {
|
||||
echo $lang["Asc"]." | <a href='?k=$k&nm=$nnm&tb=$tb&or=1&page=$page&perp=$perp'>".$lang["Desc"]."</a><br/><br/>"; } else {
|
||||
echo "<a href='?k=$k&nm=$nnm&tb=$tb&page=$page&perp=$perp'>".$lang["Asc"]."</a> | ".$lang["Desc"]."<br/><br/>"; }
|
||||
|
||||
// column values
|
||||
echo "<form action='mdelc.php?k=$k&tb=$tb' method='post' align='left'>";
|
||||
while ($row = mysqli_fetch_array($val)) {
|
||||
$v=$row["$nm"];
|
||||
$pri="";
|
||||
foreach ($cv as $c){
|
||||
$cc=explode("``",$c);
|
||||
$c=$cc[0];
|
||||
$pv= $row["$c"];
|
||||
if($cc[1] == 0) {
|
||||
$cc="`$tb`.`$c`";
|
||||
} else {
|
||||
$cc= "CONVERT(`$tb`.`$c` USING utf8)";
|
||||
}
|
||||
$pri.=" $cc = '$pv' AND";
|
||||
}
|
||||
$pri=substr($pri,0,-3);
|
||||
$pri=base64_encode($pri);
|
||||
|
||||
|
||||
echo "<input type='checkbox' name='i[]' value='$pri'> - <b><a href='br2.php?k=$k&tb=$tb&pri=$pri'>".htmlspecialchars($v)."</a></b>";
|
||||
echo "<br/>
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
echo "<br/>- - -<br/><input type='submit' name='delbr' value='".$lang["DELETE_SELECTED"]."'></form><p align='left'>- - -<br/>";
|
||||
mysqli_free_result($val);
|
||||
|
||||
|
||||
// pagination function
|
||||
function pag($total,$currentPage,$baseLink,$nextPrev=true,$limit=10) {
|
||||
global $lang;
|
||||
if(!$total OR !$currentPage OR !$baseLink) {
|
||||
return false; } //Total Number of pages
|
||||
$totalPages = ceil($total/$limit); //Text to use after number of pages
|
||||
$txtPagesAfter = ($totalPages==1)? " page": " pages"; //Start off the list.
|
||||
$txtPageList = '<br />' .$totalPages.$txtPagesAfter .': <br />' ; //Show only 3 pages before current page(so that we don't have too many pages)
|
||||
$min = ($currentPage - 3 < $totalPages && $currentPage-3 > 0) ? $currentPage-3 : 1; //Show only 3 pages after current page(so that we don't have too many pages)
|
||||
$max = ($currentPage + 3 > $totalPages) ? $totalPages : $currentPage+3; //Variable for the actual page links
|
||||
$pageLinks = ""; //Loop to generate the page links
|
||||
for($i=$min;$i<=$max ;$i++) {
|
||||
if($currentPage==$i) { //Current Page
|
||||
$pageLinks .= ' <b class="selected">'.$i.'</b> ' ; }
|
||||
else { $pageLinks .= ' <a href="'.$baseLink.$i.'" class="page">'.$i.'</a> ' ; } }
|
||||
if($nextPrev ) { //Next and previous links
|
||||
$next = ($currentPage + 1 > $totalPages) ? false : '<a href="'.$baseLink.($currentPage + 1) .'">'.$lang["Next"].'</a>' ;
|
||||
$prev = ($currentPage - 1 <= 0 ) ? false : '<a href="'.$baseLink.($currentPage - 1).'">'.$lang["Prev"].'</a>' ; }
|
||||
$first= ($currentPage > 2) ? '<a href="'.$baseLink.'1">'.$lang["First"].'</a> ': false ;
|
||||
|
||||
$last= ($currentPage < ($totalPages - 2)) ? " <a href='".$baseLink.$totalPages."'>".$lang["Last"]."</a> " : false ;
|
||||
|
||||
return $txtPageList.$first.$prev.$pageLinks.$next.$last; }
|
||||
// end pagination
|
||||
|
||||
// show pages
|
||||
if($total_pages != 1)
|
||||
echo pag($nr,$page,"?or=$or&nm=$nnm&k=$k&perp=$perp&tb=$tb&page=",true,$perp);
|
||||
else
|
||||
echo "1 page<br>- - -";
|
||||
|
||||
if ($total_pages>2) {
|
||||
echo "<form action='?' align='left'><input type='hidden' name='k' value='$k'><input type='hidden' name='tb' value='$tb'><input type='hidden' name='nm' value='$nnm'><input type='hidden' name='perp' value='$perp'><input name='page' value='$page' size='2'>";
|
||||
if ($ord=='desc') echo "<input type='hidden' name='or' value='$or'>";
|
||||
echo " <input type='submit' value='".$lang["Jump"]."'><br/>- - -</form>";
|
||||
}
|
||||
|
||||
echo "<form action='?' align='left'><br/>".$lang["Show"]." <input type='hidden' name='k' value='$k'><input type='hidden' name='tb' value='$tb'>
|
||||
<input type='hidden' name='or' value='$or'><input type='hidden' name='nm' value='$nnm'>
|
||||
<input name='perp' value='$perp' size='2'>";
|
||||
echo " <input type='submit' value='".$lang["Per_Page"]."'></form>";
|
||||
|
||||
} else {
|
||||
echo "<div class='shout'>".strtoupper($lang["Browse"])."<br/>".$lang["Query"].": ".htmlspecialchars($sql)."<p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='table.php?k=$k&tb=$tb'>$tb</a><br/>- - -<br/>".$lang["Browse"]."</a> |<a href='table.php?k=$k&tb=$tb'>".$lang["Structure"]."</a> | <a href='search.php?k=$k&tb=$tb'>".$lang["Search"]."</a> | <a href='in.php?k=$k&tb=$tb'>".$lang["Insert"]."</a> | <a href='trun.php?k=$k&tb=$tb'>".$lang["Clear"]."</a> | <a href='dropt.php?k=$k&tb=$tb'>".$lang["Drop"]."</a><br/>- - -<br/>
|
||||
";
|
||||
echo $lang["No_values_inserted"]."<br/>";
|
||||
}
|
||||
}
|
||||
echo "<p align='center'>$nr ".$lang["records"]."</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
|
||||
|
||||
$tb=trim($_GET['tb']);
|
||||
$prim=$_GET['pri'];
|
||||
$pri=base64_decode($prim);
|
||||
$vmi=$_GET['vmi'];
|
||||
echo "<div class='shout'>".$lang["INFO"]."<p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='table.php?k=$k&tb=$tb'>$tb</a>><a href='br.php?k=$k&tb=$tb'>".$lang["Browse"]."</a>><a href='?k=$k&tb=$tb&pri=$prim'>".$lang["INFO"]."</a><br/>- - -<br/><a href='edit_rec.php?k=$k&tb=$tb&pri=$prim'>".$lang["Edit"]."</a> | <a href='drop_rec.php?k=$k&tb=$tb&pri=$prim'>".$lang["Drop"]."</a> (".$lang["delete"].")<br/>- - -
|
||||
";
|
||||
$result = mysqli_query($conn,"SELECT * FROM `$tb`");
|
||||
if (!$result) {
|
||||
printf($lang["table_not_exists"],$tb); } else {
|
||||
|
||||
$de = mysqli_query($conn,"SHOW COLUMNS FROM `$tb`");
|
||||
$nr=@mysqli_num_rows($de);
|
||||
if ($nr >0) {
|
||||
$i = 0;
|
||||
echo "<table border='1' width='100%' cellpadding='0' cellspacing='0'><tr><td>".strtoupper($lang["Column"])."</td><td>".strtoupper($lang["Value"])."</td></tr>";
|
||||
while ($row = mysqli_fetch_array($de)) {
|
||||
$meta = mysqli_fetch_field_direct($result, $i);
|
||||
$nm=$meta->name;
|
||||
$ga = mysqli_query($conn,"SELECT `$nm` FROM `$tb` WHERE $pri");
|
||||
$r = mysqli_fetch_array($ga);
|
||||
$rr=$r["$nm"];
|
||||
echo "<tr><td>".htmlentities($nm)."</td> <td>".htmlentities($rr)."</td></tr>";
|
||||
echo "<!-- ionutvmi -->";
|
||||
$i++;
|
||||
}
|
||||
echo "</table>";
|
||||
} else {
|
||||
echo $lang["No_values_inserted"];
|
||||
}
|
||||
|
||||
}
|
||||
echo "</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
$tb=trim($_GET['tb']);
|
||||
$cl=trim($_GET['cl']);
|
||||
echo "<div class='shout'>
|
||||
<b>$cl</b> <p align='left'>
|
||||
<a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='table.php?k=$k&tb=$tb'>$tb</a>><a href='?k=$k&tb=$tb&cl=$cl'>$cl</a><br/>- - -<br/>
|
||||
» <a href='edit_col.php?k=$k&tb=$tb&cl=$cl'>".$lang["Edit"]."</a><br/><br/>
|
||||
» <a href='br.php?k=$k&tb=$tb&nm=".base64_encode($cl)."'>".$lang["Browse"]."</a><br/><br/>
|
||||
» <a href='copyc.php?k=$k&tb=$tb&cl=".$cl."'>".$lang["Copy"]."</a><br/><br/>
|
||||
» <a href='dropc.php?k=$k&tb=$tb&cl=$cl'>".$lang["Drop"]."</a> (".$lang["delete"].")
|
||||
</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
error_reporting(0);
|
||||
// language pack
|
||||
include "lang/index.php";
|
||||
|
||||
function daddslashes($string) {
|
||||
if(!get_magic_quotes_gpc()) {
|
||||
$string = addslashes($string);
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
|
||||
$k=trim($_GET['k']);
|
||||
if($k=="") die('error');
|
||||
$kz=base64_decode($k);
|
||||
$kz=explode("^^^",$kz);
|
||||
$host=daddslashes($kz[0]);
|
||||
$user=daddslashes($kz[1]);
|
||||
$pass=daddslashes($kz[2]);
|
||||
$dbn=daddslashes($kz[3]);
|
||||
$port=daddslashes($kz[4]);
|
||||
$conn = @mysqli_connect($host, $user, $pass, $dbn, $port) or die ($lang["No_connection_to_mysql"].'(' . mysqli_connect_errno().')'.mysqli_connect_error());
|
||||
mysqli_query($conn,"set sql_mode = ''");
|
||||
mysqli_query($conn,"set names utf8");
|
||||
?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
$tb=trim($_GET['tb']);
|
||||
$cl=trim($_GET['cl']);
|
||||
$vmi=$_GET['vmi'];
|
||||
echo "<div class='shout'>
|
||||
COPY - $cl <p align='left'><a href='.php?k=$k'>".$lang["tables"]."</a>><a href='table.php?k=$k&tb=$tb'>$tb</a>><a href='col.php?k=$k&tb=$tb&cl=$cl'>$cl</a><br/>- - -<br/>";
|
||||
if(!$vmi) {
|
||||
echo "<form action='?vmi=ionutvmi&k=$k&tb=$tb&cl=$cl' method='post' align='left'>
|
||||
".$lang["Copy_to"].":<input name='nm' value='name2'><br/>
|
||||
<input type='submit' value='".$lang["Copy"]."'></form>";
|
||||
} else {
|
||||
$nm=trim($_POST['nm']);
|
||||
$d=mysqli_query($conn,"ALTER TABLE `$tb` ADD `$nm` TEXT NOT NULL;");
|
||||
$d=mysqli_query($conn,"UPDATE `$tb` SET `$nm` = `$cl`;");
|
||||
if ($d) {
|
||||
echo "<b>
|
||||
$cl </b> ".$lang["copyed_to"]." <b> $nm </b> !"; } else {
|
||||
echo $lang["Error"].": ";
|
||||
echo mysqli_error($conn);
|
||||
}
|
||||
}
|
||||
echo "</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
$tb=trim($_GET['tb']);
|
||||
$vmi=$_GET['vmi'];
|
||||
echo "<div class='shout'>
|
||||
COPY - $tb <p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>";
|
||||
if(!$vmi) {
|
||||
echo "><a href='table.php?k=$k&tb=$tb'>$tb</a><br/>- - -<br/><form action='?vmi=ionutvmi&k=$k&tb=$tb' method='post' align='left'>
|
||||
".$lang["Copy_to"].":<input name='nm' value='table2'><br/>
|
||||
<select name='tp'><option value='1'>".$lang["Copy_structure_and_data"]."</option><option value='2'>".$lang["Copy_structure"]."</option></select><br/><input type='submit' value='".$lang["Copy"]."'></form>";
|
||||
} else {
|
||||
$tp=trim($_POST['tp']); $nm=trim($_POST['nm']);
|
||||
if ($tp=='1') {
|
||||
$d=mysqli_query($conn,"CREATE TABLE `$nm` SELECT * FROM `$tb`");
|
||||
if ($d) {
|
||||
echo "<br/>- - -<br/><b>
|
||||
$tb </b> ".$lang["copyed_to"]." <b> $nm </b> !"; } else {
|
||||
echo "<br/>- - -<br/>".$lang["Error"].": ";
|
||||
echo mysqli_error($conn);
|
||||
}
|
||||
} elseif ($tp=='2') {
|
||||
$d=mysqli_query($conn,"CREATE TABLE `$nm` LIKE `$tb`");
|
||||
if ($d) {
|
||||
echo "<br/>- - -<br/><b>
|
||||
$tb ".$lang["structure"]."</b> ".$lang["copyed_to"]." <b> $nm </b> !"; } else {
|
||||
echo "<br/>- - -<br/>".$lang["Error"].": ";
|
||||
echo mysqli_error($conn);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
echo "</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,62 @@
|
||||
body
|
||||
{
|
||||
font-size:small;
|
||||
margin-top :0;
|
||||
margin-left :0;
|
||||
margin-right :0;
|
||||
text-align :center;
|
||||
line-height:100%;
|
||||
color:black;
|
||||
background-color :#ffffff;
|
||||
vertical-align: middle;
|
||||
max-width:480px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo
|
||||
{
|
||||
padding:4px;
|
||||
margin:3px;
|
||||
border:1px dotted lime;
|
||||
background-color:#000000;
|
||||
text-align:center
|
||||
}
|
||||
|
||||
.header, .footer
|
||||
{
|
||||
background:#888;
|
||||
font-weight:bold;
|
||||
margin:3px;
|
||||
border:1px solid black;
|
||||
padding:3px;
|
||||
color:white;
|
||||
-moz-border-radius:4px;
|
||||
-webkit-border-radius:4px;
|
||||
}
|
||||
|
||||
.shout
|
||||
{
|
||||
margin:3px;
|
||||
background:#f3f3f3;
|
||||
border:1px solid black;
|
||||
-moz-border-radius:4px;
|
||||
-webkit-border-radius:4px;
|
||||
text-align:center;
|
||||
padding:3px;
|
||||
}
|
||||
a:link, a:visited, a:active
|
||||
{
|
||||
color : #235a81;
|
||||
text-decoration : none;
|
||||
font-weight : bold;
|
||||
}
|
||||
a:hover
|
||||
{
|
||||
text-decoration: underline;
|
||||
color: #235a81;
|
||||
}
|
||||
|
||||
.header,.footer a
|
||||
{
|
||||
color: white;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include '../config.php';
|
||||
include '../head.php';
|
||||
echo "<div class='shout'>".strtoupper($lang["Files"]." ".$lang["saved"])." <p align='left'><a href='../tables.php?k=$k'>".$lang["tables"]." </a><br/>- - -<br/>";
|
||||
$ac=$_GET['ac'];
|
||||
if (!$ac) {
|
||||
if ($handle = opendir('.')) {
|
||||
$q=0;
|
||||
while (false !=($file=readdir($handle))) {
|
||||
if ($file !='.' && $file !='..' && $file !='index.php' && $file !='default.css') {
|
||||
echo "» <a href='$file'>$file </a> - <a href='?k=$k&ac=d&f=$file'>(".$lang["delete"].")</a><br/>";
|
||||
$q++; } }
|
||||
if ($q==0) {
|
||||
echo $lang["No_files"]." !"; }
|
||||
closedir($handle);
|
||||
} else {
|
||||
echo $lang["Error"].": Folder can not be open !"; }
|
||||
} else {
|
||||
$f=$_GET['f'];
|
||||
unlink($f);
|
||||
echo "$f ".$lang["deleted"]." ! <br><br><a href='?k=$k'>".$lang["Back"]."</a>";
|
||||
}
|
||||
echo "</div>";
|
||||
include('../foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,62 @@
|
||||
body
|
||||
{
|
||||
font-size:small;
|
||||
margin-top :0;
|
||||
margin-left :0;
|
||||
margin-right :0;
|
||||
text-align :center;
|
||||
line-height:100%;
|
||||
color:black;
|
||||
background-color :#ffffff;
|
||||
vertical-align: middle;
|
||||
max-width:480px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo
|
||||
{
|
||||
padding:4px;
|
||||
margin:3px;
|
||||
border:1px dotted lime;
|
||||
background-color:#000000;
|
||||
text-align:center
|
||||
}
|
||||
|
||||
.header, .footer
|
||||
{
|
||||
background:#888;
|
||||
font-weight:bold;
|
||||
margin:3px;
|
||||
border:1px solid black;
|
||||
padding:3px;
|
||||
color:white;
|
||||
-moz-border-radius:4px;
|
||||
-webkit-border-radius:4px;
|
||||
}
|
||||
|
||||
.shout
|
||||
{
|
||||
margin:3px;
|
||||
background:#f3f3f3;
|
||||
border:1px solid black;
|
||||
-moz-border-radius:4px;
|
||||
-webkit-border-radius:4px;
|
||||
text-align:center;
|
||||
padding:3px;
|
||||
}
|
||||
a:link, a:visited, a:active
|
||||
{
|
||||
color : #235a81;
|
||||
text-decoration : none;
|
||||
font-weight : bold;
|
||||
}
|
||||
a:hover
|
||||
{
|
||||
text-decoration: underline;
|
||||
color: #235a81;
|
||||
}
|
||||
|
||||
.header,.footer a
|
||||
{
|
||||
color: white;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
|
||||
|
||||
$tb=trim($_GET['tb']);
|
||||
$prim=$_GET['pri'];
|
||||
$pri=base64_decode($prim);
|
||||
$vmi=$_GET['vmi'];
|
||||
echo "<div class='shout'>
|
||||
DROP - $v <p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>";
|
||||
if (!$vmi)
|
||||
{
|
||||
echo "><a href='table.php?k=$k&tb=$tb'>$tb</a>><a href='br2.php?k=$k&tb=$tb&pri=$prim'>$v</a>><a href='?k=$k&tb=$tb&prim=$prim'>".$lang["Drop"]."</a><br/><br/>- - -<br/>".$lang["DROP_DELETE_this_record"]." <br/><br/><a href='?k=$k&tb=$tb&pri=$prim&vmi=ionutvmi'>".$lang["Yes"]."</a> | <a href='br.php?k=$k&tb=$tb'>".$lang["No"]."</a>
|
||||
"; } else {
|
||||
$d=mysqli_query($conn,"DELETE FROM `$tb` WHERE $pri LIMIT 1");
|
||||
if ($d) {
|
||||
echo "<br/>- - -<br/><i>".htmlspecialchars("DELETE FROM `$tb` WHERE $pri LIMIT 1")."</i>
|
||||
<br/><br/>".$lang["Record_droped"]; } else {
|
||||
echo "<br/>- - -<br/>".$lang["Error"].": ";
|
||||
echo mysqli_error($conn);
|
||||
}
|
||||
}
|
||||
echo "</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
$tb=trim($_GET['tb']);
|
||||
$cl=trim($_GET['cl']);
|
||||
$vmi=$_GET['vmi'];
|
||||
echo "<div class='shout'>
|
||||
DROP - $cl <p align='left'><a href='vmi.php?k=$k'>Tables</a>";
|
||||
if (!$vmi)
|
||||
{
|
||||
echo "><a href='table.php?k=$k&tb=$tb'>$tb</a>><a href='col.php?k=$k&tb=$tb&cl=$cl'>$cl</a>><a href='?k=$k&tb=$tb&cl=$cl'>Drop</a><br/><br/>- - -<br/>".$lang["DROP_DELETE_COLUMN"]." $cl ? <br/><a href='?k=$k&tb=$tb&cl=$cl&vmi=ionutvmi'>".$lang["Yes"]."</a> | <a href='col.php?k=$k&tb=$tb&cl=$cl'>".$lang["No"]."</a>
|
||||
"; } else {
|
||||
$d=mysqli_query($conn,"ALTER TABLE `$tb` DROP `$cl`");
|
||||
if ($d) {
|
||||
echo "><a href='table.php?k=$k&tb=$tb'>$tb</a><br/>- - -<br/>
|
||||
Column $cl droped !"; } else {
|
||||
echo "<br/>- - -<br/>".$lang["Error"].": ";
|
||||
echo mysqli_error($conn);
|
||||
}
|
||||
}
|
||||
echo "</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
|
||||
|
||||
$tb=trim($_GET['tb']);
|
||||
$vmi=$_GET['vmi'];
|
||||
echo "<div class='shout'>
|
||||
DROP - $tb <p align='left'><a href='tables.php?k=$k'>Tables</a>";
|
||||
if (!$vmi)
|
||||
{
|
||||
echo "><a href='table.php?k=$k&tb=$tb'>$tb</a>><a href='?k=$k&tb=$tb'>Drop</a><br/><br/>- - -<br/>".$lang["DROP_DELETE_TABLE"]." $tb ? <br/><br/><a href='?k=$k&tb=$tb&vmi=ionutvmi'>".$lang["Yes"]."</a> | <a href='table.php?k=$k&tb=$tb'>".$lang["No"]."</a>
|
||||
"; } else {
|
||||
$sql="DROP TABLE `$tb`";
|
||||
$d=mysqli_query($conn,$sql);
|
||||
if ($d) {
|
||||
echo "<br/>- - -<br/><center>".$lang["Query"].": <i>".htmlspecialchars($sql)."</i></center><p align='left'>";
|
||||
printf($lang["Table_droped"],$tb);
|
||||
} else {
|
||||
echo "<br/>- - -<br/><center>".$lang["Query"].": <i>".htmlspecialchars($sql)."</i></center><p align='left'>".$lang["Error"].": ";
|
||||
echo mysqli_error($conn);
|
||||
}
|
||||
}
|
||||
echo "</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,293 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
|
||||
|
||||
$tb=trim($_GET['tb']);
|
||||
$cl=trim($_GET['cl']);
|
||||
$vmi=$_GET['vmi'];
|
||||
echo "<div class='shout'><b>".$lang["MODIFY_COLUMN"]."</b><br/>$cl<p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='table.php?k=$k&tb=$tb'>$tb</a>";
|
||||
if (!$vmi) {
|
||||
echo "><a href='col.php?k=$k&tb=$tb&cl=$cl'>$cl</a>><a href='?k=$k&tb=$tb&cl=$cl'>".$lang["edit_column"]."</a><br/>- - -<br/>";
|
||||
echo "
|
||||
<form action='?k=$k&vmi=ionutvmi&tb=$tb&cl=$cl' method='post' align='left'>
|
||||
".$lang["colunm_name"].": <input name='tc' value='$cl'><br/> ".$lang["type"].": ";
|
||||
/// get column details
|
||||
$xx=mysqli_query($conn,"SHOW COLUMNS FROM `$tb`");
|
||||
while ($r = mysqli_fetch_array($xx)){
|
||||
if ($r["Field"] == $cl){
|
||||
$t=$r["Type"];
|
||||
$t=explode("(",$t);
|
||||
$type = $t[0];
|
||||
$l=explode(")",$t[1]);
|
||||
$lh=$l[0];
|
||||
$uns=$l[1];
|
||||
$null=0;
|
||||
if ($r["Null"] == "NO") $null=1;
|
||||
$avmi=$r["Default"];
|
||||
if ($avmi != "") $df=$avmi;
|
||||
echo $r["Extra"];
|
||||
if($r["Extra"] == "auto_increment") $zx="SELECTED";
|
||||
}
|
||||
}
|
||||
print ' <select name="ct">';
|
||||
$qq= array("VARCHAR","TINYINT","TEXT","DATE","SMALLINT","MEDIUMINT","INT","BIGINT","FLOAT","DOUBLE","DECIMAL","DATETIME","TIMESTAMP","TIME","YEAR","CHAR","TINYBLOB","TINYTEXT","BLOB","MEDIUMBLOB","MEDIUMTEXT","LONGBLOB","LONGTEXT","ENUM","SET","BOOL","BINARY","VARBINARY");
|
||||
foreach($qq as $q){
|
||||
if($type == strtolower($q))
|
||||
print "<option value='$q' SELECTED>$q</option>";
|
||||
else
|
||||
print "<option value='$q'>$q</option>";
|
||||
}
|
||||
print "</select><br/>
|
||||
".$lang["Length"].": <input name='lg' value='$lh'><br/>";
|
||||
print $lang["Collation"].':<select name="co"> <option value=""> </option>
|
||||
<optgroup label="armscii8" title="ARMSCII-8 Armenian">
|
||||
<option value="armscii8_bin" title="Armenian, Binary">armscii8_bin</option>
|
||||
<option value="armscii8_general_ci" title="Armenian, case-insensitive">armscii8_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="ascii" title="US ASCII">
|
||||
<option value="ascii_bin" title="West European (multilingual), Binary">ascii_bin</option>
|
||||
<option value="ascii_general_ci" title="West European (multilingual), case-insensitive">ascii_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="big5" title="Big5 Traditional Chinese">
|
||||
<option value="big5_bin" title="Traditional Chinese, Binary">big5_bin</option>
|
||||
<option value="big5_chinese_ci" title="Traditional Chinese, case-insensitive">big5_chinese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="binary" title="Binary pseudo charset">
|
||||
<option value="binary" title="Binary">binary</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp1250" title="Windows Central European">
|
||||
<option value="cp1250_bin" title="Central European (multilingual), Binary">cp1250_bin</option>
|
||||
<option value="cp1250_croatian_ci" title="Croatian, case-insensitive">cp1250_croatian_ci</option>
|
||||
<option value="cp1250_czech_cs" title="Czech, case-sensitive">cp1250_czech_cs</option>
|
||||
<option value="cp1250_general_ci" title="Central European (multilingual), case-insensitive">cp1250_general_ci</option>
|
||||
<option value="cp1250_polish_ci" title="Polish, case-insensitive">cp1250_polish_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp1251" title="Windows Cyrillic">
|
||||
<option value="cp1251_bin" title="Cyrillic (multilingual), Binary">cp1251_bin</option>
|
||||
<option value="cp1251_bulgarian_ci" title="Bulgarian, case-insensitive">cp1251_bulgarian_ci</option>
|
||||
<option value="cp1251_general_ci" title="Cyrillic (multilingual), case-insensitive">cp1251_general_ci</option>
|
||||
<option value="cp1251_general_cs" title="Cyrillic (multilingual), case-sensitive">cp1251_general_cs</option>
|
||||
<option value="cp1251_ukrainian_ci" title="Ukrainian, case-insensitive">cp1251_ukrainian_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp1256" title="Windows Arabic">
|
||||
<option value="cp1256_bin" title="Arabic, Binary">cp1256_bin</option>
|
||||
<option value="cp1256_general_ci" title="Arabic, case-insensitive">cp1256_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp1257" title="Windows Baltic">
|
||||
<option value="cp1257_bin" title="Baltic (multilingual), Binary">cp1257_bin</option>
|
||||
<option value="cp1257_general_ci" title="Baltic (multilingual), case-insensitive">cp1257_general_ci</option>
|
||||
<option value="cp1257_lithuanian_ci" title="Lithuanian, case-insensitive">cp1257_lithuanian_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp850" title="DOS West European">
|
||||
<option value="cp850_bin" title="West European (multilingual), Binary">cp850_bin</option>
|
||||
<option value="cp850_general_ci" title="West European (multilingual), case-insensitive">cp850_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp852" title="DOS Central European">
|
||||
<option value="cp852_bin" title="Central European (multilingual), Binary">cp852_bin</option>
|
||||
<option value="cp852_general_ci" title="Central European (multilingual), case-insensitive">cp852_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp866" title="DOS Russian">
|
||||
<option value="cp866_bin" title="Russian, Binary">cp866_bin</option>
|
||||
<option value="cp866_general_ci" title="Russian, case-insensitive">cp866_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="cp932" title="SJIS for Windows Japanese">
|
||||
<option value="cp932_bin" title="Japanese, Binary">cp932_bin</option>
|
||||
<option value="cp932_japanese_ci" title="Japanese, case-insensitive">cp932_japanese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="dec8" title="DEC West European">
|
||||
<option value="dec8_bin" title="West European (multilingual), Binary">dec8_bin</option>
|
||||
<option value="dec8_swedish_ci" title="Swedish, case-insensitive">dec8_swedish_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="eucjpms" title="UJIS for Windows Japanese">
|
||||
<option value="eucjpms_bin" title="Japanese, Binary">eucjpms_bin</option>
|
||||
<option value="eucjpms_japanese_ci" title="Japanese, case-insensitive">eucjpms_japanese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="euckr" title="EUC-KR Korean">
|
||||
<option value="euckr_bin" title="Korean, Binary">euckr_bin</option>
|
||||
<option value="euckr_korean_ci" title="Korean, case-insensitive">euckr_korean_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="gb2312" title="GB2312 Simplified Chinese">
|
||||
<option value="gb2312_bin" title="Simplified Chinese, Binary">gb2312_bin</option>
|
||||
<option value="gb2312_chinese_ci" title="Simplified Chinese, case-insensitive">gb2312_chinese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="gbk" title="GBK Simplified Chinese">
|
||||
<option value="gbk_bin" title="Simplified Chinese, Binary">gbk_bin</option>
|
||||
<option value="gbk_chinese_ci" title="Simplified Chinese, case-insensitive">gbk_chinese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="geostd8" title="GEOSTD8 Georgian">
|
||||
<option value="geostd8_bin" title="Georgian, Binary">geostd8_bin</option>
|
||||
<option value="geostd8_general_ci" title="Georgian, case-insensitive">geostd8_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="greek" title="ISO 8859-7 Greek">
|
||||
<option value="greek_bin" title="Greek, Binary">greek_bin</option>
|
||||
<option value="greek_general_ci" title="Greek, case-insensitive">greek_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="hebrew" title="ISO 8859-8 Hebrew">
|
||||
<option value="hebrew_bin" title="Hebrew, Binary">hebrew_bin</option>
|
||||
<option value="hebrew_general_ci" title="Hebrew, case-insensitive">hebrew_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="hp8" title="HP West European">
|
||||
<option value="hp8_bin" title="West European (multilingual), Binary">hp8_bin</option>
|
||||
<option value="hp8_english_ci" title="English, case-insensitive">hp8_english_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="keybcs2" title="DOS Kamenicky Czech-Slovak">
|
||||
<option value="keybcs2_bin" title="Czech-Slovak, Binary">keybcs2_bin</option>
|
||||
<option value="keybcs2_general_ci" title="Czech-Slovak, case-insensitive">keybcs2_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="koi8r" title="KOI8-R Relcom Russian">
|
||||
<option value="koi8r_bin" title="Russian, Binary">koi8r_bin</option>
|
||||
<option value="koi8r_general_ci" title="Russian, case-insensitive">koi8r_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="koi8u" title="KOI8-U Ukrainian">
|
||||
<option value="koi8u_bin" title="Ukrainian, Binary">koi8u_bin</option>
|
||||
<option value="koi8u_general_ci" title="Ukrainian, case-insensitive">koi8u_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="latin1" title="cp1252 West European">
|
||||
<option value="latin1_bin" title="West European (multilingual), Binary">latin1_bin</option>
|
||||
<option value="latin1_danish_ci" title="Danish, case-insensitive">latin1_danish_ci</option>
|
||||
<option value="latin1_general_ci" title="West European (multilingual), case-insensitive">latin1_general_ci</option>
|
||||
<option value="latin1_general_cs" title="West European (multilingual), case-sensitive">latin1_general_cs</option>
|
||||
<option value="latin1_german1_ci" title="German (dictionary), case-insensitive">latin1_german1_ci</option>
|
||||
<option value="latin1_german2_ci" title="German (phone book), case-insensitive">latin1_german2_ci</option>
|
||||
<option value="latin1_spanish_ci" title="Spanish, case-insensitive">latin1_spanish_ci</option>
|
||||
<option value="latin1_swedish_ci" title="Swedish, case-insensitive">latin1_swedish_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="latin2" title="ISO 8859-2 Central European">
|
||||
<option value="latin2_bin" title="Central European (multilingual), Binary">latin2_bin</option>
|
||||
<option value="latin2_croatian_ci" title="Croatian, case-insensitive">latin2_croatian_ci</option>
|
||||
<option value="latin2_czech_cs" title="Czech, case-sensitive">latin2_czech_cs</option>
|
||||
<option value="latin2_general_ci" title="Central European (multilingual), case-insensitive">latin2_general_ci</option>
|
||||
<option value="latin2_hungarian_ci" title="Hungarian, case-insensitive">latin2_hungarian_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="latin5" title="ISO 8859-9 Turkish">
|
||||
<option value="latin5_bin" title="Turkish, Binary">latin5_bin</option>
|
||||
<option value="latin5_turkish_ci" title="Turkish, case-insensitive">latin5_turkish_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="latin7" title="ISO 8859-13 Baltic">
|
||||
<option value="latin7_bin" title="Baltic (multilingual), Binary">latin7_bin</option>
|
||||
<option value="latin7_estonian_cs" title="Estonian, case-sensitive">latin7_estonian_cs</option>
|
||||
<option value="latin7_general_ci" title="Baltic (multilingual), case-insensitive">latin7_general_ci</option>
|
||||
<option value="latin7_general_cs" title="Baltic (multilingual), case-sensitive">latin7_general_cs</option>
|
||||
</optgroup>
|
||||
<optgroup label="macce" title="Mac Central European">
|
||||
<option value="macce_bin" title="Central European (multilingual), Binary">macce_bin</option>
|
||||
<option value="macce_general_ci" title="Central European (multilingual), case-insensitive">macce_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="macroman" title="Mac West European">
|
||||
<option value="macroman_bin" title="West European (multilingual), Binary">macroman_bin</option>
|
||||
<option value="macroman_general_ci" title="West European (multilingual), case-insensitive">macroman_general_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="sjis" title="Shift-JIS Japanese">
|
||||
<option value="sjis_bin" title="Japanese, Binary">sjis_bin</option>
|
||||
<option value="sjis_japanese_ci" title="Japanese, case-insensitive">sjis_japanese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="swe7" title="7bit Swedish">
|
||||
<option value="swe7_bin" title="Swedish, Binary">swe7_bin</option>
|
||||
<option value="swe7_swedish_ci" title="Swedish, case-insensitive">swe7_swedish_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="tis620" title="TIS620 Thai">
|
||||
<option value="tis620_bin" title="Thai, Binary">tis620_bin</option>
|
||||
<option value="tis620_thai_ci" title="Thai, case-insensitive">tis620_thai_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="ucs2" title="UCS-2 Unicode">
|
||||
<option value="ucs2_bin" title="Unicode (multilingual), Binary">ucs2_bin</option>
|
||||
<option value="ucs2_czech_ci" title="Czech, case-insensitive">ucs2_czech_ci</option>
|
||||
<option value="ucs2_danish_ci" title="Danish, case-insensitive">ucs2_danish_ci</option>
|
||||
<option value="ucs2_esperanto_ci" title="Esperanto, case-insensitive">ucs2_esperanto_ci</option>
|
||||
<option value="ucs2_estonian_ci" title="Estonian, case-insensitive">ucs2_estonian_ci</option>
|
||||
<option value="ucs2_general_ci" title="Unicode (multilingual), case-insensitive">ucs2_general_ci</option>
|
||||
<option value="ucs2_hungarian_ci" title="Hungarian, case-insensitive">ucs2_hungarian_ci</option>
|
||||
<option value="ucs2_icelandic_ci" title="Icelandic, case-insensitive">ucs2_icelandic_ci</option>
|
||||
<option value="ucs2_latvian_ci" title="Latvian, case-insensitive">ucs2_latvian_ci</option>
|
||||
<option value="ucs2_lithuanian_ci" title="Lithuanian, case-insensitive">ucs2_lithuanian_ci</option>
|
||||
<option value="ucs2_persian_ci" title="Persian, case-insensitive">ucs2_persian_ci</option>
|
||||
<option value="ucs2_polish_ci" title="Polish, case-insensitive">ucs2_polish_ci</option>
|
||||
<option value="ucs2_roman_ci" title="West European, case-insensitive">ucs2_roman_ci</option>
|
||||
<option value="ucs2_romanian_ci" title="Romanian, case-insensitive">ucs2_romanian_ci</option>
|
||||
<option value="ucs2_slovak_ci" title="Slovak, case-insensitive">ucs2_slovak_ci</option>
|
||||
<option value="ucs2_slovenian_ci" title="Slovenian, case-insensitive">ucs2_slovenian_ci</option>
|
||||
<option value="ucs2_spanish2_ci" title="Traditional Spanish, case-insensitive">ucs2_spanish2_ci</option>
|
||||
<option value="ucs2_spanish_ci" title="Spanish, case-insensitive">ucs2_spanish_ci</option>
|
||||
<option value="ucs2_swedish_ci" title="Swedish, case-insensitive">ucs2_swedish_ci</option>
|
||||
<option value="ucs2_turkish_ci" title="Turkish, case-insensitive">ucs2_turkish_ci</option>
|
||||
<option value="ucs2_unicode_ci" title="Unicode (multilingual), case-insensitive">ucs2_unicode_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="ujis" title="EUC-JP Japanese">
|
||||
<option value="ujis_bin" title="Japanese, Binary">ujis_bin</option>
|
||||
<option value="ujis_japanese_ci" title="Japanese, case-insensitive">ujis_japanese_ci</option>
|
||||
</optgroup>
|
||||
<optgroup label="utf8" title="UTF-8 Unicode">
|
||||
<option value="utf8_bin" title="Unicode (multilingual), Binary">utf8_bin</option>
|
||||
<option value="utf8_czech_ci" title="Czech, case-insensitive">utf8_czech_ci</option>
|
||||
<option value="utf8_danish_ci" title="Danish, case-insensitive">utf8_danish_ci</option>
|
||||
<option value="utf8_esperanto_ci" title="Esperanto, case-insensitive">utf8_esperanto_ci</option>
|
||||
<option value="utf8_estonian_ci" title="Estonian, case-insensitive">utf8_estonian_ci</option>
|
||||
<option value="utf8_general_ci" title="Unicode (multilingual), case-insensitive">utf8_general_ci</option>
|
||||
<option value="utf8_hungarian_ci" title="Hungarian, case-insensitive">utf8_hungarian_ci</option>
|
||||
<option value="utf8_icelandic_ci" title="Icelandic, case-insensitive">utf8_icelandic_ci</option>
|
||||
<option value="utf8_latvian_ci" title="Latvian, case-insensitive">utf8_latvian_ci</option>
|
||||
<option value="utf8_lithuanian_ci" title="Lithuanian, case-insensitive">utf8_lithuanian_ci</option>
|
||||
<option value="utf8_persian_ci" title="Persian, case-insensitive">utf8_persian_ci</option>
|
||||
<option value="utf8_polish_ci" title="Polish, case-insensitive">utf8_polish_ci</option>
|
||||
<option value="utf8_roman_ci" title="West European, case-insensitive">utf8_roman_ci</option>
|
||||
<option value="utf8_romanian_ci" title="Romanian, case-insensitive">utf8_romanian_ci</option>
|
||||
<option value="utf8_slovak_ci" title="Slovak, case-insensitive">utf8_slovak_ci</option>
|
||||
<option value="utf8_slovenian_ci" title="Slovenian, case-insensitive">utf8_slovenian_ci</option>
|
||||
<option value="utf8_spanish2_ci" title="Traditional Spanish, case-insensitive">utf8_spanish2_ci</option>
|
||||
<option value="utf8_spanish_ci" title="Spanish, case-insensitive">utf8_spanish_ci</option>
|
||||
<option value="utf8_swedish_ci" title="Swedish, case-insensitive">utf8_swedish_ci</option>
|
||||
<option value="utf8_turkish_ci" title="Turkish, case-insensitive">utf8_turkish_ci</option>
|
||||
<option value="utf8_unicode_ci" title="Unicode (multilingual), case-insensitive">utf8_unicode_ci</option>
|
||||
</optgroup>
|
||||
</select><br/>'.$lang["Attributes"].': <select name="at"> <option value="" selected="selected"></option>';
|
||||
$u=array("UNSIGNED","UNSIGNED ZEROFILL","ON UPDATE CURRENT_TIMESTAMP");
|
||||
foreach ($u as $uu){
|
||||
if (trim($uns) == strtolower($uu))
|
||||
print "<option value='$uu' SELECTED>$uu</option>";
|
||||
else
|
||||
print "<option value='$uu'>$uu</option>";
|
||||
}
|
||||
print '</select><br/>NULL <select name="nu">';
|
||||
if($null == 1){
|
||||
print '<option value="NOT NULL" selected="selected">not null</option>
|
||||
<option value="">null</option>'; } else {
|
||||
print '<option value="NOT NULL">not null</option>
|
||||
<option value="" SELECTED>null</option>';
|
||||
}
|
||||
|
||||
print '</select><br/>'.$lang["Default"].': <input name="df" value="'.$df.'"><br/>'.$lang["Extra"].': <select name="ex">';
|
||||
|
||||
print '<option value=""> </option>
|
||||
<option value="AUTO_INCREMENT"'.$zx.'>auto_increment</option>';
|
||||
|
||||
|
||||
print '</select><br/>';
|
||||
print "<input type='submit' value='".$lang["Save"]."'></form>";
|
||||
} else {
|
||||
$tc=trim($_POST['tc']);
|
||||
$ct=trim($_POST['ct']);
|
||||
$lg=trim($_POST['lg']);
|
||||
$co=trim($_POST['co']);
|
||||
$at=trim($_POST['at']);
|
||||
$nu=trim($_POST['nu']);
|
||||
$df=trim($_POST['df']);
|
||||
$ex=trim($_POST['ex']);
|
||||
if($lg !="") $lg="($lg)";
|
||||
$create=mysqli_query($conn,"ALTER TABLE `$tb` CHANGE `$cl` `$tc` $ct $lg $co $at $nu $df $ex");
|
||||
if ($create) {
|
||||
echo "><a href='col.php?k=$k&tb=$tb&cl=$tc'>$tc</a>><a href='?k=$k&tb=$tb&cl=$tc'>".$lang["edit_column"]."</a><br/>- - -<br/>";
|
||||
printf($lang["Column_saved"],$tc);
|
||||
} else {
|
||||
echo "><a href='col.php?k=$k&tb=$tb&cl=$cl'>$cl</a>><a href='?k=$k&tb=$tb&cl=$cl'>".$lang["edit_column"]."</a><br/>- - -<br/>".$lang["Error"].": ";
|
||||
echo mysqli_error($conn);
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
|
||||
|
||||
$tb=trim($_GET['tb']);
|
||||
$prim=$_GET['pri'];
|
||||
$pri=base64_decode($prim);
|
||||
|
||||
$vmi=$_GET['vmi'];
|
||||
echo "<div class='shout'>".$lang["INFO"]."<p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='table.php?k=$k&tb=$tb'>$tb</a><br/>- - -<br/>";
|
||||
$result = mysqli_query($conn,"SELECT * FROM `$tb`");
|
||||
if (!$result) {
|
||||
printf($lang["table_not_exists"],$tb); } else {
|
||||
if (!$vmi) {
|
||||
echo "<form action='?k=$k&tb=$tb&pri=$prim&vmi=ionutvmi' align='left' method='post'>";
|
||||
$de = mysqli_query($conn,"SHOW COLUMNS FROM `$tb`");
|
||||
$nr=@mysqli_num_rows($de);
|
||||
if ($nr >0) {
|
||||
$i = 0;
|
||||
while ($row = mysqli_fetch_array($de)) {
|
||||
$meta = mysqli_fetch_field_direct($result, $i);
|
||||
$nm=$meta->name;
|
||||
$ga = mysqli_query($conn,"SELECT `$nm` FROM `$tb` WHERE $pri");
|
||||
$r = mysqli_fetch_array($ga);
|
||||
$rr=$r["$nm"];
|
||||
echo "» $nm: <textarea rows='1' name='$nm'>".$rr."</textarea><br/>";
|
||||
echo "<br/> ";
|
||||
$i++;
|
||||
}
|
||||
echo "<input type='submit' value='".$lang["Save"]."'></form>";
|
||||
} else {
|
||||
echo $lang["No_values_inserted"];
|
||||
}
|
||||
} else {
|
||||
$de = mysqli_query($conn,"SHOW COLUMNS FROM `$tb`");
|
||||
$updt="";
|
||||
$i=0;
|
||||
while ($row = mysqli_fetch_array($de)) {
|
||||
$meta = mysqli_fetch_field_direct($result, $i);
|
||||
$nm=$meta->name; // column name
|
||||
$ga = mysqli_query($conn,"SELECT `$nm` FROM `$tb` WHERE $pri");
|
||||
$r = mysqli_fetch_array($ga);
|
||||
$rr=$r["$nm"]; // original value
|
||||
$nv =mysqli_real_escape_string($conn,trim($_POST["$nm"])); // new value
|
||||
// check if is anything to change
|
||||
$nvv=stripslashes($nv);
|
||||
if($rr != $nvv){
|
||||
$updt.= " `$nm`='$nv',";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if($updt !="") {
|
||||
$updt=substr($updt,"0","-1");
|
||||
$dosql = "UPDATE `$tb` SET $updt WHERE $pri LIMIT 1";
|
||||
echo "<i>".htmlspecialchars($dosql)."</i><br/>";
|
||||
$do = mysqli_query($conn,$dosql);
|
||||
if (!$do)
|
||||
echo mysqli_error($conn);
|
||||
else
|
||||
echo $lang["saved"]." !";
|
||||
} else {
|
||||
echo $lang["Nothing_to_change"];
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,108 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
$vmi=$_GET['vmi'];
|
||||
echo "<div class='shout'>".strtoupper($lang["Export"])."<p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='?k=$k'>".$lang["Export"]."</a><br/>- - -<br/>";
|
||||
if (!$vmi) {
|
||||
echo "<form action='?k=$k&vmi=ionutvmi' align='left' method='post'>".$lang["Export"].":<br/><select name='extb[]' multiple='multiple'>";
|
||||
$tables = mysqli_query($conn,"SHOW TABLES FROM `$dbn`");
|
||||
while($tabs = mysqli_fetch_row($tables)):
|
||||
print "<option value='$tabs[0]' selected> $tabs[0] </option>";
|
||||
endwhile;
|
||||
print "</select><br/><select name='tp'><option value='vmi'>".$lang["structure_only"]."</option><option value='full'>".$lang["structure_data"]."</option></select> <br><input type='checkbox' name='zip' value='vmi'> ".$lang["Zip_sql_file"]."<br><input type='submit' value='".$lang["ok"]."'></form>
|
||||
|
||||
";
|
||||
} elseif ($vmi=='ionutvmi') {
|
||||
/* backup the db OR just a table */
|
||||
function backup_tables($tables = '*',$dt,$zx)
|
||||
{
|
||||
global $k,$lang,$conn;
|
||||
|
||||
//get all of the tables
|
||||
if($tables == '*')
|
||||
{
|
||||
$tables = array();
|
||||
$result = mysqli_query($conn,'SHOW TABLES');
|
||||
while($row = mysqli_fetch_row($result))
|
||||
{
|
||||
$tables[] = $row[0];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$tables = is_array($tables) ? $tables : explode(',',$tables);
|
||||
}
|
||||
|
||||
//cycle through
|
||||
foreach($tables as $table)
|
||||
{
|
||||
$result = mysqli_query($conn,'SELECT * FROM `'.$table.'`');
|
||||
$num_fields = mysqli_num_fields($result);
|
||||
$return.= 'DROP TABLE `'.$table.'`;';
|
||||
$row2 = mysqli_fetch_row(mysqli_query($conn,'SHOW CREATE TABLE `'.$table.'`'));
|
||||
$return.= "\n\n".$row2[1].";\n\n";
|
||||
if($dt=="full"){
|
||||
for ($i = 0; $i < $num_fields; $i++)
|
||||
{
|
||||
while($row = mysqli_fetch_row($result))
|
||||
{
|
||||
$return.= 'INSERT INTO `'.$table.'` VALUES(';
|
||||
for($j=0; $j<$num_fields; $j++)
|
||||
{
|
||||
$row[$j] = addslashes($row[$j]);
|
||||
$row[$j] = str_replace("\n","\\n",$row[$j]);
|
||||
if (isset($row[$j])) { $return.= '"'.$row[$j].'"' ; } else { $return.= '""'; }
|
||||
if ($j<($num_fields-1)) { $return.= ','; }
|
||||
}
|
||||
$return.= ");\n";
|
||||
}
|
||||
} }
|
||||
$return.="\n\n\n";
|
||||
}
|
||||
//save file
|
||||
$dd="backup-".date('d_M_Y')."_".time().".sql";
|
||||
|
||||
$handle = fopen("data/$dd","w+");
|
||||
fwrite($handle,$return);
|
||||
fclose($handle);
|
||||
if ($zx==1) {
|
||||
fopen("data/$dd.zip","w");
|
||||
|
||||
$zip = new ZipArchive;
|
||||
if ($zip->open("data/$dd.zip") === TRUE) {
|
||||
$zip->addFile("data/$dd", "$dd") or die('error');
|
||||
}
|
||||
$zip->close();
|
||||
echo "- ".$lang["File"]." $dd.zip ".$lang["created"].".<br/><br/>- <a href='data/$dd.zip'>".$lang["DOWNLOAD"]." $dd.zip </a><br/><br/>- <a href='?k=$k&vmi=del&f=$dd.zip'>".$lang["delete"]." ".$lang["File"]." $dd.zip </a><br/>";
|
||||
} else {
|
||||
echo "- ".$lang["File"]." $dd ".$lang["created"].".<br/><br/>- <a href='data/$dd'>".$lang["DOWNLOAD"]." $dd </a><br/><br/>- <a href='?k=$k&vmi=del&f=$dd'>".$lang["delete"]." ".$lang["File"]." $dd </a><br/>";
|
||||
}
|
||||
|
||||
echo $f;
|
||||
}
|
||||
$tbs=$_POST['extb'];
|
||||
if(!$tbs) die($lang["No_Table_Selected"]);
|
||||
$z=0;
|
||||
if (isset($_POST['zip'])) {
|
||||
$z=1;
|
||||
}
|
||||
// echo $_POST['tp'];
|
||||
backup_tables($tbs,$_POST['tp'],$z);
|
||||
|
||||
}
|
||||
if ($vmi=='del') {
|
||||
$f=$_GET['f'];
|
||||
$g= @unlink("data/$f");
|
||||
if ($g) {
|
||||
printf($lang["FILE_DELETED"],$f); } else {
|
||||
echo $lang["Error"];
|
||||
}
|
||||
}
|
||||
echo "</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
echo "<div class='footer'>©ionutvmi | ".$lang["Check_for_updates"]." | 7-Jan-2012</div>
|
||||
|
||||
</body></html>";
|
||||
?>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
echo '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">';
|
||||
echo "<head><title>wap phpmyadmin by ionutvmi</title><link rel='stylesheet' href='./default.css'/></head><body>";
|
||||
echo "<div class='header'><a href='./index.php' style='color:white;'>wap phpmyadmin v2.0.3</a></div>";
|
||||
|
||||
function err($txt){
|
||||
print "<div class='shout'>$txt </div>";
|
||||
include 'foot.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.tk
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
$vmi=$_POST['vmi'];
|
||||
print "<div class='shout'>".$lang["IMPORT_SQL"]."<br/><p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='?k=$k'>".strtolower($lang["IMPORT_SQL"])."</a><br/>- - -<br/>";
|
||||
if(!$vmi) {
|
||||
print "- ".$lang["only_sql_files"].".<br/><br/><form action='?k=$k' method='post' align='left'>".$lang["Url"].":<br/><input name='vmi' value='http://'><br/>".$lang["Separator"].": <input name='sep' size='2' value=';'><br/><select name='del'><option value='yes'>".$lang["Delete_after_execute"]."</option><option value='vmi'>".$lang["Save_after_execute"]."</option></select><br/><select name='shw'>
|
||||
<option value='no'>".$lang["HIDE_MESSAGES"]."</option>
|
||||
<option value='yes'>".$lang["SHOW_MESSAGES"]."</option></select><br/><input type='submit' value='".$lang["Execute"]."'>";
|
||||
|
||||
} else {
|
||||
if($vmi==''||$vmi=='http://') die($lang["enter_url"]);
|
||||
$ext= end(explode('.', $vmi));
|
||||
if($ext !="sql") die($lang["file_must_be_sql"]);
|
||||
$sep=trim($_POST['sep']);
|
||||
$shw=$_POST['shw'];
|
||||
if(!$sep) die($lang["enter_separator"]);
|
||||
$filename="import".rand(1,100).".sql";
|
||||
$dir="data/".$filename;
|
||||
if(!copy($vmi,$dir)) {
|
||||
die($lang["ERROR_File_NOT_copyed"]); } else {
|
||||
// IF FILE IS UPLOAD
|
||||
$handle = fopen("data/$filename", "r");
|
||||
$contents = fread($handle, filesize("data/$filename"));
|
||||
fclose($handle);
|
||||
echo "- $filename uploaded !<br/>";
|
||||
$sql=str_replace("\r\n","\n",$contents); $sql=str_replace("\n","\r",$sql);
|
||||
$sql=preg_replace("~(--|##)[^\r]*\r~","\r",$sql);
|
||||
$sql=preg_replace("~\r\s*\r~","\r",$sql);
|
||||
|
||||
$contents=explode($sep,$sql);
|
||||
$q=0;
|
||||
foreach($contents as $coo) {
|
||||
if(!empty($coo)) {
|
||||
$do=mysqli_query($conn,$coo);
|
||||
$cop=htmlspecialchars(substr($coo, 0, 40));
|
||||
if ($do) {
|
||||
$q++;
|
||||
if($shw=="yes") {
|
||||
echo "><i style='color:lime'>$cop...</i> ".$lang["executed"]."!<br/>"; }
|
||||
} else {
|
||||
if($shw=="yes") {
|
||||
echo "><i style='color: red'>$cop...</i> ".$lang["not_executed"]." ! ".$lang["Error"].": ";
|
||||
echo mysqli_error($conn)."<br/>"; }
|
||||
} }
|
||||
}
|
||||
echo "<br/>$q ".strtolower($lang["Query"]." ".$lang["executed"])." !";
|
||||
if ($_POST['del'] == "yes") {
|
||||
unlink("data/$filename");
|
||||
echo "<br/>- ".$lang["deleted"]." !"; } else {
|
||||
echo "<br/>- ".$lang["saved"]."!"; }
|
||||
|
||||
|
||||
}}
|
||||
echo "</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
$tb=trim($_GET['tb']);
|
||||
$vmi=$_GET['vmi'];
|
||||
$sql="SELECT * FROM `$tb`";
|
||||
echo "<div class='shout'>".strtoupper($lang["Insert"])."<br/>".$lang["Query"].": <i>".htmlspecialchars($sql)."</i><p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='table.php?k=$k&tb=$tb'>$tb</a><br/>- - -<br/><a href='br.php?k=$k&tb=$tb'>".$lang["Browse"]."</a> |<a href='table.php?k=$k&tb=$tb'> ".$lang["Structure"]." </a> | <a href='search.php?k=$k&tb=$tb'>".$lang["Search"]."</a> | ".$lang["Insert"]." | <a href='trun.php?k=$k&tb=$tb'>".$lang["Clear"]."</a> | <a href='dropt.php?k=$k&tb=$tb'>".$lang["Drop"]."</a><br/>- - -<br/>
|
||||
";
|
||||
$result = mysqli_query($conn,$sql);
|
||||
if (!$result) {
|
||||
printf($lang["table_not_exists"],$tb);
|
||||
} else {
|
||||
if (!$vmi) {
|
||||
echo "<form action='?k=$k&tb=$tb&vmi=ionutvmi' align='left' method='post'>
|
||||
";
|
||||
$i = 0;
|
||||
while ($i < mysqli_num_fields($result)) {
|
||||
$meta = mysqli_fetch_field_direct($result, $i);
|
||||
echo "<b>".htmlspecialchars($meta->name)."</b>";
|
||||
echo ": <input name='$meta->name'><br/>
|
||||
";
|
||||
$i++;
|
||||
}
|
||||
echo "<input type='submit' value='".$lang["Insert"]."'></form>";
|
||||
mysqli_free_result($result);
|
||||
} else {
|
||||
$i = 0; $wh=""; $val="";
|
||||
$nrf= mysqli_num_fields($result) - 1;
|
||||
while ($i < mysqli_num_fields($result)) {
|
||||
$meta = mysqli_fetch_field_direct($result, $i);
|
||||
$t=$_POST[$meta->name];
|
||||
if($i == $nrf) {
|
||||
$wh.="`$meta->name`";
|
||||
$val.="'$t'"; } else {
|
||||
$wh.="`$meta->name`,";
|
||||
$val.="'$t',"; }
|
||||
$i++;
|
||||
}
|
||||
$do = mysqli_query($conn,"INSERT INTO `$tb` ($wh) VALUES ($val)");
|
||||
$sqll="INSERT INTO `$tb` ($wh) VALUES ($val)";
|
||||
if($do)
|
||||
echo "<center>".$lang["Query"].": <i>".htmlspecialchars($sqll)."</i></center><p align='left'><br/><br/>".$lang["Done"]." !";
|
||||
else
|
||||
echo "<center>".$lang["Query"].": <i>".htmlspecialchars($sqll)."</i></center><p align='left'><br/>".$lang["Error"].": ".mysqli_error($conn);
|
||||
} }
|
||||
echo "</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
error_reporting(0);
|
||||
include "lang/index.php";
|
||||
include 'head.php';
|
||||
$vmi=trim($_GET['vmi']);
|
||||
if(!$vmi){
|
||||
print "
|
||||
<div class='shout'>
|
||||
<form action='?'>
|
||||
".$lang["Database_Server"].":<br/> <input name='dbs' value='localhost'><br/>
|
||||
".$lang["Database_Port"].":<br/> <input name='port' value='3306'><br/>
|
||||
".$lang["Database_User"].":<br/> <input name='dbu'><br/>
|
||||
".$lang["Database_Password"].":<br/> <input type='password' name='dbp'><br/>
|
||||
".$lang["Database_Name"].":<br/> <input name='dbn'><br/>
|
||||
<br/><input name='vmi' type='submit' value='".$lang["ENTER_DB"]."'>
|
||||
</form></div>";
|
||||
}
|
||||
else{
|
||||
$a=trim($_GET['dbs']);
|
||||
$b=trim($_GET['dbu']);
|
||||
$c=trim($_GET['dbp']);
|
||||
$d=trim($_GET['dbn']);
|
||||
$e=trim($_GET['port']);
|
||||
if($a=="" || $b=="" || $c=="" || $d=="" || $e=="") err("Something is blank");
|
||||
$e=base64_encode($a."^^^".$b."^^^".$c."^^^".$d."^^^".$e);
|
||||
print"<div class='shout'> ".$lang["WELCOME"]." $dbu <br/>
|
||||
<br/> » <a href='tables.php?k=$e'>".$lang["ENTER"]."</a> «
|
||||
</div>";
|
||||
}
|
||||
|
||||
include 'foot.php';
|
||||
?>
|
||||
@@ -0,0 +1,9 @@
|
||||
**** wap phpmyadmin ****
|
||||
**** Thanks to Mr. Hu from China ****
|
||||
|
||||
** INSTALL **
|
||||
Replace the lang/index.php file with the index.php file from this archive
|
||||
|
||||
|
||||
- to translate wap phpmyadmin in your language edit `index.php` file from current folder
|
||||
- if you want to share your translation and make it available for other users send the translated version at [email protected]
|
||||
@@ -0,0 +1,172 @@
|
||||
<?php
|
||||
/*
|
||||
##任何人未经允许不得肆意修改此版权内容和底部版权##
|
||||
* wap-phpmyadminV2
|
||||
* 糖果技术维护制作
|
||||
* 汉化提议加入团队
|
||||
* 联系QQ:992170510
|
||||
* @.版权归俄网所有
|
||||
* 源址pimp-wap.net
|
||||
* 2012(c)copyright
|
||||
##任何人未经允许不得肆意修改此版权内容和底部版权##
|
||||
*/
|
||||
$lang["tables"] = "数据库表";
|
||||
$lang["no_tables"] = "没有数据库表";
|
||||
$lang["With_selected"] = "选择";
|
||||
$lang["Drop"] = "删除";
|
||||
$lang["Export"] = "备份";
|
||||
$lang["Empty"] = "清空";
|
||||
$lang["Go"] = "执行";
|
||||
$lang["Add_table"] = "新建数据库表";
|
||||
$lang["Sql_code"] = "Sql语句";
|
||||
$lang["Upload_sql"] = "上传sql";
|
||||
$lang["Import_sql"] = "导入sql";
|
||||
$lang["Files"] = "文件";
|
||||
$lang["Query"] = "执行语句";
|
||||
$lang["Show"] = "显示";
|
||||
$lang["Per_Page"] = "每页显示";
|
||||
$lang["First"] = "第一";
|
||||
$lang["Last"] = "最后";
|
||||
$lang["Prev"] = "上页";
|
||||
$lang["Next"] = "下页";
|
||||
$lang["Rename"] = "重命名";
|
||||
$lang["saved"] = "已经保存";
|
||||
$lang["Save"] = "存为";
|
||||
$lang["delete"] = "删除";
|
||||
$lang["No_files"] = "没有文件";
|
||||
$lang["Error"] = "错误";
|
||||
$lang["Folder_can_not_be_open"] = "文件无法打开";
|
||||
$lang["deleted"] = "已经删除";
|
||||
$lang["Back"] = "返回管理";
|
||||
$lang["CREATE_COLUMN"] = "创建列";
|
||||
$lang["add_column"] = "添加列";
|
||||
$lang["colunm_name"] = "列名";
|
||||
$lang["type"] = "类型";
|
||||
$lang["Length"] = "长度";
|
||||
$lang["Collation"] = "整理";
|
||||
$lang["Attributes"] = "属性";
|
||||
$lang["Default"] = "默认";
|
||||
$lang["Extra"] = "附加";
|
||||
$lang["Field_Key"] = "关键领域";
|
||||
$lang["At_End_Of_Table"] = "在表的结尾";
|
||||
$lang["At_Beginning_Of_Table"] = "在表的开头";
|
||||
$lang["After"] = "后";
|
||||
$lang["create"] = "创建";
|
||||
$lang["column_created"] = "栏 <b>%s </b> 已创建!"; // keep %s unchanged
|
||||
$lang["ADD_TABLE"] = "新建表格";
|
||||
$lang["table_name"] = "表格名称";
|
||||
$lang["table_created"] = "表格 <b>%s </b> 成功被创建"; // keep %s unchanged
|
||||
$lang["Browse"] = "浏览";
|
||||
$lang["Structure"] = "结构";
|
||||
$lang["Search"] = "搜索";
|
||||
$lang["Insert"] = "插入";
|
||||
$lang["Clear"] = "清除";
|
||||
$lang["Drop"] = "删除";
|
||||
$lang["table_not_exists"] = "表格 <b>%s </b> 不存在"; // keep %s unchanged
|
||||
$lang["Asc"] = "递增"; // short for ascending
|
||||
$lang["Desc"] = "递减"; // short for descending
|
||||
$lang["DELETE_SELECTED"] = "删除选项";
|
||||
$lang["Jump"] = "跳";
|
||||
$lang["No_values_inserted"] = "没有任何值";
|
||||
$lang["records"] = "记录";
|
||||
$lang["INFO"] = "信息";
|
||||
$lang["Edit"] = "修改";
|
||||
$lang["Column"] = "栏";
|
||||
$lang["Value"] = "值";
|
||||
$lang["No_connection_to_mysql"] = "没有连接到数据库";
|
||||
$lang["ERROR_WRONG_DB_NAME"] = "错误的数据名字";
|
||||
$lang["Copy_to"] = "复制到";
|
||||
$lang["Copy"] = "复制";
|
||||
$lang["copyed_to"] = "复制到";
|
||||
$lang["Copy_structure_and_data"] = "复制结构+数据";
|
||||
$lang["Copy_structure"] = "复制结构";
|
||||
$lang["structure"] = "结构";
|
||||
$lang["DROP_DELETE_this_record"] = "删除这个记录 ?";
|
||||
$lang["Yes"] = "是";
|
||||
$lang["No"] = "否";
|
||||
$lang["Record_droped"] = "记录已删除 !";
|
||||
$lang["DROP_DELETE_COLUMN"] = "删除此项吗?";
|
||||
$lang["DROP_DELETE_TABLE"] = "删除此数据库表吗?";
|
||||
$lang["Table_droped"] = "已经删除<b>%s </b>表!"; // keep %s unchanged
|
||||
$lang["MODIFY_COLUMN"] = "修改列";
|
||||
$lang["edit_column"] = "修改列";
|
||||
$lang["Column_saved"] = "保存 <b>%s </b> 列 !"; // keep %s unchanged
|
||||
$lang["Nothing_to_change"] = "没有任何变动";
|
||||
$lang["structure_only"] = "结构";
|
||||
$lang["structure_data"] = "结构和数据";
|
||||
$lang["Zip_sql_file"] = "备份并打包";
|
||||
$lang["F"] = "文件创建成功,下载后请删除";
|
||||
$lang["DD"] = "下载文件";
|
||||
$lang["123"] = "这将清空表内所有内容";
|
||||
$lang["ok"] = "确定";
|
||||
$lang["File"] = "文件";
|
||||
$lang["created"] = "创建";
|
||||
$lang["DOWNLOAD"] = "下载";
|
||||
$lang["No_Table_Selected"] = "没有选择表 !!!";
|
||||
$lang["FILE_DELETED"] = "文件 %s 删除"; // keep %s unchanged
|
||||
$dat=date('Y-m-d');
|
||||
$lang["title"] = "wap-phpmyadmin中文版(由糖果技术维护制作)";
|
||||
$lang["tops"] = "wap-phpmyadmin中文V2";
|
||||
$lang["Check_for_updates"] = "wap-phpmyadmin中文版由<a href='#'><font color='red'>糖果技术</font></a>维护制作<br>".$dat."";
|
||||
$lang["IMPORT_SQL"] = "导入sql";
|
||||
$lang["only_sql_files"] = "仅仅sql文件";
|
||||
$lang["Url"] = "网址";
|
||||
$lang["Separator"] = "分离器";
|
||||
$lang["Delete_after_execute"] = "执行语句后删除sql文件";
|
||||
$lang["Save_after_execute"] = "执行语句后保存sql文件";
|
||||
$lang["HIDE_MESSAGES"] = "隐藏消息";
|
||||
$lang["SHOW_MESSAGES"] = "显示消息";
|
||||
$lang["Execute"] = "执行";
|
||||
$lang["enter_url"] = "输入网址";
|
||||
$lang["file_must_be_sql"] = "文件必须是sql";
|
||||
$lang["enter_separator"] = "进入分离器";
|
||||
$lang["ERROR_File_NOT_copyed"] = "错误.文件不能复制";
|
||||
$lang["executed"] = "执行";
|
||||
$lang["not_executed"] = "不执行";
|
||||
$lang["Done"] = "完成";
|
||||
$lang["Database_Server"] = "数据库地址";
|
||||
$lang["Database_Port"] = "数据库端口";
|
||||
$lang["Database_User"] = "数据库用户";
|
||||
$lang["Database_Password"] = "数据库密码";
|
||||
$lang["Database_Name"] = "数据库名称";
|
||||
$lang["ENTER_DB"] = "执行数据库";
|
||||
$lang["WELCOME"] = "欢迎回来!登陆管理成功";
|
||||
$lang["ENTER"] = "进入管理数据库";
|
||||
$lang["You_selected_records"] = "你选择了 %s 记录"; // keep %s unchanged
|
||||
$lang["You_selected_columns"] = "你选择了 %s 列"; // keep %s unchanged
|
||||
$lang["You_selected_tables"] = "你选择了 %s 数据库表"; // keep %s unchanged
|
||||
$lang["DO_YOU_WANT_TO_DELETE_RECORDS"] = "确认删除记录?";
|
||||
$lang["DO_YOU_WANT_TO_DELETE_COLUMNS"] = "确认删除此列?";
|
||||
$lang["DO_YOU_WANT_TO_ACT_TABLE"] = "确认操作此数据库表?";
|
||||
$lang["Nothing_selected"] = "没有选择 !";
|
||||
$lang["Column_cl_droped"] = "<br/>列<b>%s </b>删除!"; // keep %s unchanged
|
||||
$lang["SELECTED"] = "已选";
|
||||
$lang["Table"] = "数据库表";
|
||||
$lang["Was_emptyed"] = "被成功清空";
|
||||
$lang["was_renamed_to"] = "更名为";
|
||||
$lang["Rename_to"] = "更名为";
|
||||
$lang["renamed_to"] = "更名为";
|
||||
$lang["No_condition_to_search"] = "没有条件进行搜索!";
|
||||
$lang["Search_has_been_submited_wait"] = "搜索已提交等待重定向或<a href='%s'>点击这里</a>!"; // keep %s unchanged
|
||||
$lang["No_results_search"] = "<div class='shout'>你的搜索没有结果,请尝试<a href='%s'>返回</a>重新测试!"; // keep %s unchanged
|
||||
$lang["No_records_search"] = "表必须包含一些数据,然后才可以使用搜索选项 !<br/>";
|
||||
$lang["DO_NOT_USE_THIS_IF_YOU_DO_NOT_KNOW_HOW"] = "如果你不知道这是什么,请不要使用这个";
|
||||
$lang["DO_NOT_FORGET_TO_INCLUDE_SEPARATOR_IN SQL_CODE"] = "如果你不知道这是什么,请不要使用这个";
|
||||
$lang["copy_table"] = "复制表";
|
||||
$lang["rename_table"] = "重命名表";
|
||||
$lang["TRUNCATE_TABLE"] = "清空数据库表";
|
||||
$lang["UPLOAD_SQL"] = "上传sql文件";
|
||||
$lang["Upload"] = "上传";
|
||||
$lang["Max"] = "限制"; // as in maximum
|
||||
$lang["only_sql_files"] = "请上传后缀为sql的文件!";
|
||||
$lang["ERROR_NO_FILE_SELECTED"] = "错误!没有选定的文件";
|
||||
$lang["EXT_NOT_ALLOWED"] = "未获准续期";
|
||||
$lang["FILE_IS_TO_BIG_Maxim"] = "文件太大,超出预设值";
|
||||
$lang["File_name_already_exists"] = "名字重复,请重试";
|
||||
$lang["ERROR_Try_again"] = "出错,请重试";
|
||||
$lang["row"] = "行";
|
||||
$lang["rows"] = "行";
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
|
||||
|
||||
$tb=trim($_GET['tb']);
|
||||
|
||||
echo "<div class='shout'>".$lang["DELETE_SELECTED"];
|
||||
$result = mysqli_query($conn,"SELECT * FROM `$tb`");
|
||||
if (!$result) {
|
||||
printf($lang["table_not_exists"],$tb); } else {
|
||||
$vmi=$_GET['vmi'];
|
||||
echo "<p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='table.php?k=$k&tb=$tb'>$tb</a><br/>- - -<br/>";
|
||||
if (!$vmi) {
|
||||
$rec=$_POST['i'];
|
||||
$nrs=count($rec);
|
||||
printf($lang["You_selected_records"],$nrs);
|
||||
echo " !<br/><br/>";
|
||||
echo $lang["DO_YOU_WANT_TO_DELETE_RECORDS"]."<br/><br/><br/>
|
||||
<form action='?vmi=ionutvmi&k=$k&tb=$tb' method='post' align='left'>";
|
||||
foreach ($rec as $files) {
|
||||
echo "<input type='hidden' name='i[]' id='i[]' value='$files'/>";
|
||||
}
|
||||
echo "<input type='submit' value='".strtoupper($lang["Yes"]." ".$lang["delete"])."'></form><a href='br.php?k=$k&tb=$tb'>".$lang["Back"]."</a>";
|
||||
} else {
|
||||
$fl=$_POST['i'];
|
||||
foreach ($fl as $clm) {
|
||||
$pri=base64_decode($clm);
|
||||
$d=mysqli_query($conn,"DELETE FROM `$tb` WHERE $pri");
|
||||
if ($d) {
|
||||
echo "<br/>".$lang["Record_droped"]; } else {
|
||||
echo "<br/>".$lang["Error"].": ";
|
||||
echo mysqli_error($conn); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo "</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
$tb=trim($_GET['tb']);
|
||||
|
||||
echo "<div class='shout'>".$lang["DELETE_SELECTED"];
|
||||
$result = mysqli_query($conn,"SELECT * FROM `$tb`");
|
||||
if (!$result) {
|
||||
printf($lang["table_not_exists"],$tb); } else {
|
||||
$vmi=$_GET['vmi'];
|
||||
echo "<p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='table.php?k=$k&tb=$tb'>$tb</a><br/>- - -<br/>";
|
||||
if (!$vmi) {
|
||||
$rec=$_POST['i'];
|
||||
if(!$rec) {
|
||||
echo $lang["Nothing_selected"];
|
||||
} else {
|
||||
$nrs=count($nrs);
|
||||
printf($lang["You_selected_columns"],$nrs);
|
||||
echo ":<br/><br/>";
|
||||
foreach ($rec as $ag) {
|
||||
echo "$ag <br/>";
|
||||
}
|
||||
echo $lang["DO_YOU_WANT_TO_DELETE_COLUMNS"]."<br/><br/><br/>
|
||||
<form action='?vmi=ionutvmi&k=$k&tb=$tb' method='post' align='left'>";
|
||||
foreach ($rec as $files) {
|
||||
echo "<input type='hidden' name='i[]' id='i[]' value='$files'/>";
|
||||
}
|
||||
echo "<input type='submit' value='".strtoupper($lang["Yes"]." ".$lang["delete"])."'></form> <a href='table.php?k=$k&tb=$tb'>".$lang["Back"]."</a>";
|
||||
}
|
||||
} else {
|
||||
$fl=$_POST['i'];
|
||||
foreach ($fl as $clm) {
|
||||
$d=mysqli_query($conn,"ALTER TABLE `$tb` DROP `$clm`");
|
||||
if ($d) {
|
||||
printf($lang["Column_cl_droped"],$clm); } else {
|
||||
echo "<br/>".$lang["Error"].": ";
|
||||
echo mysqli_error($conn); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo "</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.tk
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
$vmi=$_GET['vmi'];
|
||||
$act=trim($_POST['act']);
|
||||
|
||||
|
||||
echo "<div class='shout'>$act ".$lang["SELECTED"]."
|
||||
<p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a><br/>- - -<br/>";
|
||||
|
||||
if (!$vmi) {
|
||||
$rec=$_POST['tb'];
|
||||
if($rec && $act)
|
||||
{
|
||||
if($act == 'RENAME')
|
||||
{
|
||||
echo "<form action='?vmi=ionutvmi&k=$k' method='post' align='left'>";
|
||||
foreach($rec as $o)
|
||||
{
|
||||
echo "$o to <input name='new[]' type='text' value='$o'><input type='hidden' name='extb[]' value='$o'><br/>";
|
||||
}
|
||||
echo "<input type='hidden' name='act' value='$act'> <input type='submit' value='RENAME'>";
|
||||
} else
|
||||
{
|
||||
$nrs=count($rec);
|
||||
printf($lang["You_selected_tables"],$nrs);
|
||||
echo ":<br/><br/>";
|
||||
foreach ($rec as $ag) {
|
||||
echo "$ag <br/>";
|
||||
}
|
||||
printf($lang["DO_YOU_WANT_TO_ACT_TABLE"],$act);
|
||||
echo "<br/><br/>";
|
||||
|
||||
if($act !='EXPORT') {
|
||||
echo "<form action='?vmi=ionutvmi&k=$k' method='post' align='left'>"; } else {
|
||||
echo "<form action='export.php?k=$k&vmi=ionutvmi' method='post' align='left'>
|
||||
<select name='tp'><option value='vmi'>".$lang["structure_only"]."</option><option value='full'>".$lang["structure_data"]."</option></select> <br><input type='checkbox' name='zip' value='vmi'> ".$lang["Zip_sql_file"]."<br>
|
||||
";
|
||||
}
|
||||
foreach ($rec as $files) {
|
||||
echo "<input type='hidden' name='extb[]' value='$files'/>";
|
||||
}
|
||||
|
||||
echo "<input type='hidden' name='act' value='$act'><input type='submit' value='YES $act'></form>";
|
||||
}
|
||||
} else {
|
||||
echo $lang["Nothing_selected"];
|
||||
}
|
||||
echo "<br/> <a href='tables.php?k=$k'>".$lang["Back"]."</a>";
|
||||
} else {
|
||||
$fl=$_POST['extb'];
|
||||
$new=$_POST['new'];
|
||||
$i=0;
|
||||
foreach ($fl as $clm) {
|
||||
if($act=="DROP") {
|
||||
$d=mysqli_query($conn,"DROP TABLE `$clm`");
|
||||
if ($d) {
|
||||
echo "<br/>".$lang["Table"]." ".htmlspecialchars($clm)." ".$lang["deleted"]." !"; } else {
|
||||
echo "<br/>".$lang["Error"].": ";
|
||||
echo mysqli_error($conn); }
|
||||
} elseif($act=="EMPTY") {
|
||||
$d=mysqli_query($conn,"TRUNCATE TABLE `$clm`");
|
||||
if ($d) {
|
||||
echo "<br/>".$lang["Table"]." ".htmlspecialchars($clm)." ".$lang["Was_emptyed"]." !"; } else {
|
||||
echo "<br/>".$lang["Error"].": ";
|
||||
echo mysqli_error($conn); }
|
||||
} elseif ($act=='RENAME') {
|
||||
$new_name=$new[$i]; ++$i;
|
||||
$d=mysqli_query($conn,"ALTER TABLE `$clm` RENAME `$new_name`");
|
||||
if ($d)
|
||||
{
|
||||
echo "<br/> <b>$clm </b> ".$lang["was_renamed_to"]." <b>$new_name</b> ";
|
||||
} else
|
||||
{
|
||||
echo "<br/>".$lang["Error"].": ";
|
||||
echo mysqli_error($conn);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
echo "</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
|
||||
/************************************************************\
|
||||
*
|
||||
* PHP Array Pagination Copyright 2007 - Derek Harvey
|
||||
* www.lotsofcode.com
|
||||
*
|
||||
* This file is part of PHP Array Pagination .
|
||||
*
|
||||
* PHP Array Pagination is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PHP Array Pagination is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with PHP Array Pagination ; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
\************************************************************/
|
||||
// edit for wap phpmyadmin
|
||||
class pagination
|
||||
{
|
||||
|
||||
var $page = 1; // Current Page
|
||||
var $perPage = 10; // Items on each page, defaulted to 10
|
||||
var $showFirstAndLast = false; // if you would like the first and last page options.
|
||||
|
||||
function generate($array, $perPage = 10)
|
||||
{
|
||||
// Assign the items per page variable
|
||||
if (!empty($perPage))
|
||||
$this->perPage = $perPage;
|
||||
|
||||
// Assign the page variable
|
||||
if (!empty($_GET['page'])) {
|
||||
$this->page = $_GET['page']; // using the get method
|
||||
} else {
|
||||
$this->page = 1; // if we don't have a page number then assume we are on the first page
|
||||
}
|
||||
|
||||
// Take the length of the array
|
||||
$this->length = count($array);
|
||||
|
||||
// Get the number of pages
|
||||
$this->pages = ceil($this->length / $this->perPage);
|
||||
|
||||
// Calculate the starting point
|
||||
$this->start = ceil(($this->page - 1) * $this->perPage);
|
||||
|
||||
// Return the part of the array we have requested
|
||||
return array_slice($array, $this->start, $this->perPage);
|
||||
}
|
||||
|
||||
function links()
|
||||
{
|
||||
global $lang;
|
||||
// Initiate the links array
|
||||
$plinks = array();
|
||||
$links = array();
|
||||
$slinks = array();
|
||||
|
||||
// Concatenate the get variables to add to the page numbering string
|
||||
if (count($_GET)) {
|
||||
$queryURL = '';
|
||||
foreach ($_GET as $key => $value) {
|
||||
if ($key != 'page') {
|
||||
$queryURL .= '&'.$key.'='.$value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If we have more then one pages
|
||||
if (($this->pages) > 1)
|
||||
{
|
||||
// Assign the 'previous page' link into the array if we are not on the first page
|
||||
if ($this->page != 1) {
|
||||
if ($this->showFirstAndLast) {
|
||||
$plinks[] = ' <a href="?page=1'.$queryURL.'">«« '.$lang["First"].' </a> ';
|
||||
}
|
||||
$plinks[] = ' <a href="?page='.($this->page - 1).$queryURL.'">« '.$lang["Prev"].'</a> ';
|
||||
}
|
||||
|
||||
// Assign all the page numbers & links to the array
|
||||
for ($j = 1; $j < ($this->pages + 1); $j++) {
|
||||
if ($this->page == $j) {
|
||||
$links[] = ' <a class="selected">'.$j.'</a> '; // If we are on the same page as the current item
|
||||
} else {
|
||||
$links[] = ' <a href="?page='.$j.$queryURL.'">'.$j.'</a> '; // add the link to the array
|
||||
}
|
||||
}
|
||||
|
||||
// Assign the 'next page' if we are not on the last page
|
||||
if ($this->page < $this->pages) {
|
||||
$slinks[] = ' <a href="?page='.($this->page + 1).$queryURL.'"> '.$lang["Next"].' » </a> ';
|
||||
if ($this->showFirstAndLast) {
|
||||
$slinks[] = ' <a href="?page='.($this->pages).$queryURL.'"> '.$lang["Last"].' »» </a> ';
|
||||
}
|
||||
}
|
||||
|
||||
// Push the array into a string using any some glue
|
||||
return implode(' ', $plinks).implode($this->implodeBy, $links).implode(' ', $slinks);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
$tb=trim($_GET['tb']);
|
||||
$vmi=$_GET['vmi'];
|
||||
echo "<div class='shout'>
|
||||
".$lang["Rename"]." - $tb <p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>";
|
||||
if(!$vmi) {
|
||||
echo "><a href='table.php?k=$k&tb=$tb'>$tb</a><br/>- - -<br/><form action='?vmi=ionutvmi&k=$k&tb=$tb' method='post' align='left'>
|
||||
".$lang["Rename_to"].":<input name='nm' value='table2'><br/>
|
||||
<input type='submit' value='".$lang["Go"]."'></form>";
|
||||
} else {
|
||||
$tp=trim($_POST['tp']); $nm=trim($_POST['nm']);
|
||||
|
||||
$d=mysqli_query($conn,"ALTER TABLE `$tb` RENAME `$nm`");
|
||||
if ($d) {
|
||||
echo "<br/>- - -<br/><b>
|
||||
$tb </b> ".$lang["renamed_to"]." <b> $nm </b> !"; } else {
|
||||
echo "<br/>- - -<br/>".$lang["Error"].": ";
|
||||
echo mysqli_error($conn);
|
||||
}
|
||||
}
|
||||
echo "</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,354 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
|
||||
|
||||
$tb=trim($_GET['tb']);
|
||||
$sql="SELECT * FROM `$tb`";
|
||||
$result = mysqli_query($conn,$sql);
|
||||
if (!$result) {
|
||||
echo "<div class='shout'>".strtoupper($lang["Search"])."<br/>".$lang["Query"].": ".htmlspecialchars($sql)."<p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='table.php?k=$k&tb=$tb'>$tb</a><br/>- - -<br/><a href='br.php?k=$k&tb=$tb'>".$lang["Browse"]."</a> |<a href='table.php?k=$k&tb=$tb'> ".$lang["Structure"]." </a> | ".$lang["Search"]." | <a href='in.php?k=$k&tb=$tb'>".$lang["Insert"]."</a> | <a href='trun.php?k=$k&tb=$tb'>".$lang["Clear"]."</a> | <a href='dropt.php?k=$k&tb=$tb'>".$lang["Drop"]."</a><br/>- - -<br/>";
|
||||
printf($lang["table_not_exists"],$tb);
|
||||
} else {
|
||||
|
||||
|
||||
$xx = mysqli_query($conn,"SHOW INDEXES FROM `$tb` WHERE Key_name = 'PRIMARY'");
|
||||
$nrr=mysqli_num_rows($xx);
|
||||
|
||||
if($nrr>0){
|
||||
while ($row = mysqli_fetch_array($xx)) {
|
||||
$cvn= $row['Column_name'];
|
||||
$cv[]=$cvn."``0";
|
||||
}
|
||||
} else {
|
||||
$i=0;
|
||||
while ($i < mysqli_num_fields($result)) {
|
||||
$meta = mysqli_fetch_field_direct($result, $i);
|
||||
$cvn=$meta->name;
|
||||
$cv[]=$cvn."``1";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
// get column
|
||||
|
||||
$nnm=$_GET['nm'];
|
||||
if(!$nnm) {
|
||||
$meta = mysqli_fetch_field_direct($result, 0);
|
||||
$nm=$meta->name;
|
||||
}else{
|
||||
$nm= trim(base64_decode($nnm));
|
||||
}
|
||||
// get nr of columns
|
||||
// $val=mysqli_query($conn,"SELECT * FROM `$tb`");
|
||||
$nr=mysqli_num_rows($result);
|
||||
if ($nr >0) {
|
||||
|
||||
|
||||
$vmi=$_GET["vmi"];
|
||||
|
||||
if(!$vmi) {
|
||||
echo "<div class='shout'>".strtoupper($lang["Search"])."<br/>".$lang["Query"].": ".htmlspecialchars($sql)."<p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='table.php?k=$k&tb=$tb'>$tb</a><br/>- - -<br/><a href='br.php?k=$k&tb=$tb'>".$lang["Browse"]."</a> |<a href='table.php?k=$k&tb=$tb'> ".$lang["Structure"]." </a> | ".$lang["Search"]." | <a href='in.php?k=$k&tb=$tb'>".$lang["Insert"]."</a> | <a href='trun.php?k=$k&tb=$tb'>".$lang["Clear"]."</a> | <a href='dropt.php?k=$k&tb=$tb'>".$lang["Drop"]."</a><br/>- - -<br/>";
|
||||
|
||||
echo "<form action='?k=$k&tb=$tb&vmi=ionutvmi' align='left' method='post'>
|
||||
";
|
||||
$i = 0;
|
||||
while ($i < mysqli_num_fields($result)) {
|
||||
$meta = mysqli_fetch_field_direct($result, $i);
|
||||
|
||||
echo "<b>".htmlspecialchars($meta->name)."</b><input type='hidden' name='nm[]' value='".$meta->name."'>";
|
||||
echo '<select name="func[]">';
|
||||
|
||||
if($meta->numeric == 1) {
|
||||
echo ' <option value="1">></option>
|
||||
<option value="2">>=</option>
|
||||
<option value="3"><</option>
|
||||
<option value="4"><=</option>';
|
||||
}
|
||||
echo ' <option value="5" SELECTED>LIKE</option>
|
||||
<option value="6">LIKE %...%</option>
|
||||
<option value="7">NOT LIKE</option>
|
||||
<option value="8">=</option>
|
||||
<option value="9">!=</option>
|
||||
<option value="10">REGEXP</option>
|
||||
<option value="11">REGEXP ^...$</option>
|
||||
<option value="12">NOT REGEXP</option>
|
||||
<option value="13">= \'\'</option>
|
||||
<option value="14">!= \'\'</option>
|
||||
<option value="15">IN (...)</option>
|
||||
<option value="16">NOT IN (...)</option>
|
||||
<option value="17">BETWEEN</option>
|
||||
<option value="18">NOT BETWEEN</option>
|
||||
<option value="19">IS NULL</option>
|
||||
<option value="20">IS NOT NULL</option>
|
||||
</select>';
|
||||
|
||||
echo " <input name='sq[]' type='text'><br/>";
|
||||
$i++;
|
||||
}
|
||||
echo "<input type='submit' name='q' value='".$lang["Search"]."'></form>";
|
||||
mysqli_free_result($result);
|
||||
|
||||
} else {
|
||||
if($_POST['q']) {
|
||||
|
||||
$fun=$_POST['func'];
|
||||
$nm=$_POST['nm'];
|
||||
$sq=$_POST['sq'];
|
||||
$vi=0;
|
||||
$cond='';
|
||||
foreach($fun as $fu)
|
||||
{
|
||||
if(trim($sq[$vi]) != '' || $fu=='13' || $fu=='14' || $fu=='19' || $fu=='20')
|
||||
{
|
||||
if($fu == '1')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` > ".$sq[$vi];
|
||||
}
|
||||
if($fu == '2')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` >= ".$sq[$vi];
|
||||
}
|
||||
if($fu == '3')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` < ".$sq[$vi];
|
||||
}
|
||||
if($fu == '4')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` <= ".$sq[$vi];
|
||||
}
|
||||
if($fu == '5')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` LIKE '".$sq[$vi]."'";
|
||||
}
|
||||
if($fu == '6')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` LIKE '%".$sq[$vi]."%'";
|
||||
}
|
||||
if($fu == '7')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` NOT LIKE '".$sq[$vi]."'";
|
||||
}
|
||||
if($fu == '8')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` = '".$sq[$vi]."'";
|
||||
}
|
||||
if($fu == '9')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` != '".$sq[$vi]."'";
|
||||
}
|
||||
if($fu == '10')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` REGEXP '".$sq[$vi]."'";
|
||||
}
|
||||
if($fu == '11')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` REGEXP '^".$sq[$vi]."$'";
|
||||
}
|
||||
if($fu == '12')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` NOT REGEXP '".$sq[$vi]."'";
|
||||
}
|
||||
if($fu == '13')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` =''";
|
||||
}
|
||||
if($fu == '14')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` !=''";
|
||||
}
|
||||
if($fu == '15')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` IN (".$sq[$vi].")";
|
||||
}
|
||||
if($fu == '16')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` NOT IN (".$sq[$vi].")";
|
||||
}
|
||||
if($fu == '17')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` BETWEEN ".str_replace(',',' AND ',$sq[$vi]);
|
||||
}
|
||||
if($fu == '18')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` NOT BETWEEN ".str_replace(',',' AND ',$sq[$vi]);
|
||||
}
|
||||
if($fu == '19')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` IS NULL ";
|
||||
}
|
||||
if($fu == '20')
|
||||
{
|
||||
$cond.=" AND `".$nm[$vi]."` IS NOT NULL ";
|
||||
}
|
||||
|
||||
}
|
||||
++$vi;
|
||||
}
|
||||
$cond= base64_encode(substr($cond, 4));
|
||||
$link="?k=$k&tb=$tb&vmi=ionutvmi&cc=$cond";
|
||||
|
||||
echo "<div class='shout'>
|
||||
<meta http-equiv=\"refresh\" content=\"0; url=$link\" />";
|
||||
printf($lang["Search_has_been_submited_wait"],$link);
|
||||
echo " <br/>
|
||||
</div>";
|
||||
include "foot.php";
|
||||
exit;
|
||||
}
|
||||
|
||||
if(!$_GET['cc']) die($lang["No_condition_to_search"]);
|
||||
|
||||
$ccod=trim($_GET["cc"]);
|
||||
$cond= base64_decode($ccod);
|
||||
$cond= "WHERE (".$cond.")";
|
||||
// number of results
|
||||
$nr = mysqli_num_rows(mysqli_query($conn,"SELECT * FROM `$tb` $cond"));
|
||||
|
||||
if($nr > 0) {
|
||||
// get psge
|
||||
if(!isset($_GET['page'])){
|
||||
$page = 1;
|
||||
} else {
|
||||
$page = (int)$_GET['page'];
|
||||
}
|
||||
if($page <= 0) $page=1;
|
||||
$perp = (int)$_GET['perp'];
|
||||
if(!$perp) $perp=10;
|
||||
if($perp <= 0) $perp=10;
|
||||
$from = (($page * $perp) - $perp);
|
||||
$total_pages = ceil($nr / $perp);
|
||||
if ($page>$total_pages) {
|
||||
die("error"); }
|
||||
$or=$_GET['or'];
|
||||
if(!$or) $or=0;
|
||||
if ($or==0) {
|
||||
$ord='asc'; } else {
|
||||
$ord='desc'; }
|
||||
$sql="SELECT * FROM `$tb` $cond ORDER BY `$nm` $ord LIMIT $from, $perp";
|
||||
$val=mysqli_query($conn,$sql);
|
||||
echo "<div class='shout'>".strtoupper($lang["Search"])."<br/>".$lang["Query"].": ".htmlspecialchars($sql)."<p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='table.php?k=$k&tb=$tb'>$tb</a><br/>- - -<br/><a href='br.php?k=$k&tb=$tb'>".$lang["Browse"]."</a> |<a href='table.php?k=$k&tb=$tb'> ".$lang["Structure"]." </a> | ".$lang["Search"]." | <a href='in.php?k=$k&tb=$tb'>".$lang["Insert"]."</a> | <a href='trun.php?k=$k&tb=$tb'>".$lang["Clear"]."</a> | <a href='dropt.php?k=$k&tb=$tb'>".$lang["Drop"]."</a><br/>- - -<br/>";
|
||||
// column list
|
||||
$col=mysqli_query($conn,"SHOW COLUMNS FROM `$tb`");
|
||||
while ($r = mysqli_fetch_array($col)){
|
||||
$nn[]=$r['Field'];
|
||||
}
|
||||
echo "<form action='?' align='left'><select name='nm'>";
|
||||
foreach($nn as $n){
|
||||
$nc=base64_encode($n);
|
||||
if($nm == $n)
|
||||
echo "<option value='$nc' SELECTED> ".htmlspecialchars($n)." </option>";
|
||||
else
|
||||
echo "<option value='$nc'> ".htmlspecialchars($n)." </option>";
|
||||
}
|
||||
echo "</select> <input type='hidden' name='k' value='$k'>
|
||||
<input type='hidden' name='page' value='$page'>
|
||||
<input type='hidden' name='tb' value='$tb'>
|
||||
<input type='hidden' name='perp' value='$perp'>
|
||||
<input type='hidden' name='or' value='$or'>
|
||||
<input type='hidden' name='cc' value='$ccod'>
|
||||
<input type='hidden' name='vmi' value='ionutvmi'>
|
||||
<input type='submit' value='".$lang["Show"]."'><br>- - -<br></form><p align='left'>";
|
||||
|
||||
// asc/desc
|
||||
|
||||
if ($ord=='asc') {
|
||||
echo $lang["Asc"]." | <a href='?k=$k&nm=$nnm&tb=$tb&or=1&page=$page&perp=$perp&cc=$ccod&vmi=ionutvmi'>".$lang["Desc"]."</a><br/><br/>"; } else {
|
||||
echo "<a href='?k=$k&nm=$nnm&tb=$tb&page=$page&perp=$perp&cc=$ccod&vmi=ionutvmi'>".$lang["Asc"]."</a> | ".$lang["Desc"]."<br/><br/>"; }
|
||||
|
||||
// column values
|
||||
echo "<form action='mdelc.php?k=$k&tb=$tb' method='post' align='left'>";
|
||||
while ($row = mysqli_fetch_array($val)) {
|
||||
$v=$row["$nm"];
|
||||
$pri="";
|
||||
foreach ($cv as $c){
|
||||
$cc=explode("``",$c);
|
||||
$c=$cc[0];
|
||||
$pv= $row["$c"];
|
||||
if($cc[1] == 0) {
|
||||
$cc="`$tb`.`$c`";
|
||||
} else {
|
||||
$cc= "CONVERT(`$tb`.`$c` USING utf8)";
|
||||
}
|
||||
$pri.=" $cc = '$pv' AND";
|
||||
}
|
||||
$pri=substr($pri,0,-3);
|
||||
$pri=base64_encode($pri);
|
||||
|
||||
|
||||
echo "<input type='checkbox' name='i[]' value='$pri'> - <b><a href='br2.php?k=$k&tb=$tb&pri=$pri'>".htmlspecialchars($v)."</a></b>";
|
||||
echo "<br/>
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
echo "<br/>- - -<br/><input type='submit' name='delbr' value='".$lang["DELETE_SELECTED"]."'></form><p align='left'>- - -<br/>";
|
||||
mysqli_free_result($val);
|
||||
|
||||
|
||||
// pagination function
|
||||
function pag($total,$currentPage,$baseLink,$nextPrev=true,$limit=10) {
|
||||
global $lang;
|
||||
if(!$total OR !$currentPage OR !$baseLink) {
|
||||
return false; } //Total Number of pages
|
||||
$totalPages = ceil($total/$limit); //Text to use after number of pages
|
||||
$txtPagesAfter = ($totalPages==1)? " page": " pages"; //Start off the list.
|
||||
$txtPageList = '<br />' .$totalPages.$txtPagesAfter .': <br />' ; //Show only 3 pages before current page(so that we don't have too many pages)
|
||||
$min = ($currentPage - 3 < $totalPages && $currentPage-3 > 0) ? $currentPage-3 : 1; //Show only 3 pages after current page(so that we don't have too many pages)
|
||||
$max = ($currentPage + 3 > $totalPages) ? $totalPages : $currentPage+3; //Variable for the actual page links
|
||||
$pageLinks = ""; //Loop to generate the page links
|
||||
for($i=$min;$i<=$max ;$i++) {
|
||||
if($currentPage==$i) { //Current Page
|
||||
$pageLinks .= ' <b class="selected">'.$i.'</b> ' ; }
|
||||
else { $pageLinks .= ' <a href="'.$baseLink.$i.'" class="page">'.$i.'</a> ' ; } }
|
||||
if($nextPrev ) { //Next and previous links
|
||||
$next = ($currentPage + 1 > $totalPages) ? false : '<a href="'.$baseLink.($currentPage + 1) .'">'.$lang["Next"].'</a>' ;
|
||||
$prev = ($currentPage - 1 <= 0 ) ? false : '<a href="'.$baseLink.($currentPage - 1).'">'.$lang["Prev"].'</a>' ; }
|
||||
$first= ($currentPage > 2) ? '<a href="'.$baseLink.'1">'.$lang["First"].'</a> ': false ;
|
||||
|
||||
$last= ($currentPage < ($totalPages - 2)) ? " <a href='".$baseLink.$totalPages."'>".$lang["Last"]."</a> " : false ;
|
||||
|
||||
return $txtPageList.$first.$prev.$pageLinks.$next.$last; }
|
||||
// end pagination
|
||||
|
||||
// show pages
|
||||
if($total_pages != 1)
|
||||
echo pag($nr,$page,"?or=$or&nm=$nnm&k=$k&perp=$perp&tb=$tb&cc=$ccod&vmi=ionutvmi&page=",true,$perp);
|
||||
else
|
||||
echo "1 page<br>- - -";
|
||||
|
||||
if ($total_pages>2) {
|
||||
echo "<form action='?' align='left'><input type='hidden' name='k' value='$k'><input type='hidden' name='tb' value='$tb'><input type='hidden' name='nm' value='$nnm'><input type='hidden' name='perp' value='$perp'>
|
||||
<input type='hidden' name='cc' value='$ccod'>
|
||||
<input type='hidden' name='vmi' value='ionutvmi'>
|
||||
<input name='page' value='$page' size='2'>";
|
||||
if ($ord=='desc') echo "<input type='hidden' name='or' value='$or'>";
|
||||
echo " <input type='submit' value='".$lang["Jump"]."'><br/>- - -</form>";
|
||||
}
|
||||
|
||||
echo "<form action='?' align='left'><br/>".$lang["Show"]." <input type='hidden' name='k' value='$k'><input type='hidden' name='tb' value='$tb'>
|
||||
<input type='hidden' name='or' value='$or'>
|
||||
<input type='hidden' name='cc' value='$ccod'>
|
||||
<input type='hidden' name='vmi' value='ionutvmi'>
|
||||
<input type='hidden' name='nm' value='$nnm'>
|
||||
<input name='perp' value='$perp' size='2'>";
|
||||
echo " <input type='submit' value='".$lang["Per_Page"]."'></form>";
|
||||
|
||||
} else {
|
||||
printf($lang["No_results_search"],"?k=$k&tb=$tb");
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
echo "<div class='shout'>".strtoupper($lang["Search"])."<br/>".$lang["Query"].": ".htmlspecialchars($sql)."<p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='table.php?k=$k&tb=$tb'>$tb</a><br/>- - -<br/><a href='br.php?k=$k&tb=$tb'>".$lang["Browse"]."</a> |<a href='table.php?k=$k&tb=$tb'> ".$lang["Structure"]." </a> | ".$lang["Search"]." | <a href='in.php?k=$k&tb=$tb'>".$lang["Insert"]."</a> | <a href='trun.php?k=$k&tb=$tb'>".$lang["Clear"]."</a> | <a href='dropt.php?k=$k&tb=$tb'>".$lang["Drop"]."</a><br/>- - -<br/>";
|
||||
echo $lang["No_records_search"];
|
||||
}
|
||||
}
|
||||
echo "<p align='center'>$nr ".$lang["records"]."</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
echo "<div class='shout'>".strtoupper($lang["Sql_code"])." <p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='?k=$k'>".$lang["Sql_code"]."</a><br/>- - -<br/>";
|
||||
$k=$_GET['k'];
|
||||
$vmi=$_GET['vmi'];
|
||||
if (!$vmi) {
|
||||
echo "<form action='?k=$k&vmi=ionutvmi' method='post' align='left'>
|
||||
(!) ".$lang["DO_NOT_USE_THIS_IF_YOU_DO_NOT_KNOW_HOW"]." !<br/>(!) ".$lang["DO_NOT_FORGET_TO_INCLUDE_SEPARATOR_IN SQL_CODE"]."<br/>
|
||||
Code:<br/>
|
||||
<textarea name='sql' rows='10'>;</textarea>
|
||||
<br/>".$lang["Separator"].": <input name='sep' value=';' size='2'><br><input type='submit' value='".$lang["Execute"]."'/>
|
||||
</form>
|
||||
";
|
||||
} else {
|
||||
$sql=stripslashes($_POST['sql']); $sep=trim($_POST['sep']);
|
||||
$sql=str_replace("\r\n","\n",$sql); $sql=str_replace("\n","\r",$sql);
|
||||
$sql=preg_replace("~(--|##)[^\r]*\r~","\r",$sql);
|
||||
$sql=preg_replace("~\r\s*\r~","\r",$sql);
|
||||
$sq=explode($sep,$sql);
|
||||
foreach ($sq as $sql) {
|
||||
if(!empty($sql)){
|
||||
$do= mysqli_query($conn,$sql);
|
||||
$wp=htmlspecialchars(substr($sql,0,40));
|
||||
if ($do) {
|
||||
echo "<i style='color:lime'>$wp...</i> ".$lang["Done"]." !<br/>"; } else {
|
||||
echo "<i style='color:red'>$wp...</i> ".$lang["Error"].": ";
|
||||
echo mysqli_error($conn)."<br/>";
|
||||
} }
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
$tb=trim($_GET['tb']);
|
||||
$sql="SELECT * FROM `$tb`";
|
||||
echo "<div class='shout'>$tb <br/>".$lang["Query"].": <i>".htmlspecialchars($sql)."</i><p align='left'>
|
||||
<a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='?k=$k&tb=$tb'>$tb</a><br/>- - -<br/>";
|
||||
$result = mysqli_query($conn,$sql);
|
||||
if ($result) {
|
||||
echo "<a href='br.php?k=$k&tb=$tb'>".$lang["Browse"]."</a> | ".$lang["Structure"]." | <a href='search.php?k=$k&tb=$tb'>".$lang["Search"]."</a> | <a href='in.php?k=$k&tb=$tb'>".$lang["Insert"]."</a> | <a href='trun.php?k=$k&tb=$tb'>".$lang["Clear"]."</a> | <a href='dropt.php?k=$k&tb=$tb'>".$lang["Drop"]."</a><br/>- - -<br/>
|
||||
";
|
||||
|
||||
function mysqli_result($res, $row, $field=0) {
|
||||
$res->data_seek($row);
|
||||
$datarow = $res->fetch_array();
|
||||
return $datarow[$field];
|
||||
}
|
||||
function mysql_fetch_fields($tb) {
|
||||
global $conn;
|
||||
// LIMIT 1 means to only read rows before row 1 (0-indexed)
|
||||
$result = mysqli_query($conn,"SELECT * FROM `$tb` LIMIT 0");
|
||||
$describe = mysqli_query($conn,"SHOW COLUMNS FROM `$tb`");
|
||||
$num = mysqli_num_fields($result);
|
||||
$output = array();
|
||||
for ($i = 0; $i < $num; ++$i) {
|
||||
$field = mysqli_fetch_field_direct($result, $i);
|
||||
// Analyze 'extra' field
|
||||
$field->auto_increment = (strpos(mysqli_result($describe, $i, 'Extra'), 'auto_increment') === FALSE ? 0 : 1);
|
||||
// Create the column_definition
|
||||
$field->definition = mysqli_result($describe, $i, 'Type');
|
||||
if ($field->not_null && !$field->primary_key) $field->definition .= ' NOT NULL';
|
||||
$avmi=mysqli_result($describe, $i, 'Default');
|
||||
if ( $avmi != "" && $avmi != "NULL")
|
||||
$field->def=$avmi;
|
||||
else
|
||||
$field->def=false;
|
||||
if ($field->def) $field->definition .= " DEFAULT '" . mysqli_real_escape_string($conn,$field->def) . "'";
|
||||
if ($field->auto_increment) $field->definition .= ' AUTO_INCREMENT';
|
||||
if ($key = mysqli_result($describe, $i, 'Key')) {
|
||||
if ($field->primary_key) $field->definition .= ' PRIMARY KEY';
|
||||
else $field->definition .= ' UNIQUE KEY';
|
||||
}
|
||||
// Create the field length
|
||||
//$field->len = mysqli_fetch_field_direct($result, $i);
|
||||
// Store the field into the output
|
||||
$output[$field->name] = $field;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
// Show
|
||||
echo "<form action='mdelcl.php?k=$k&tb=$tb' method='post' align='left'>";
|
||||
$fields = mysql_fetch_fields("$tb");
|
||||
foreach ($fields as $key => $field) {
|
||||
echo "»<input type='checkbox' name='i[]' value='$field->name'> <a href='col.php?k=$k&tb=$tb&cl=$field->name'>".htmlspecialchars($field->name)."</a> ";
|
||||
echo htmlspecialchars($field->definition)." <br/>";
|
||||
}
|
||||
echo "<input type='submit' value='".$lang["DELETE_SELECTED"]."'></form>- - - <br/>
|
||||
<a href='addcol.php?k=$k&tb=$tb'>".$lang["add_column"]."</a> |
|
||||
<a href='copyt.php?k=$k&tb=$tb'>".$lang["copy_table"]."</a> |
|
||||
<a href='rename.php?k=$k&tb=$tb'>".$lang["rename_table"]."</a>";
|
||||
} else {
|
||||
printf($lang["table_not_exists"],$tb); }
|
||||
echo "</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
// per page
|
||||
$perp=(int)$_GET['perp'];
|
||||
$perp=($perp==0) ? "10" : $perp;
|
||||
|
||||
$sql = "SHOW TABLES FROM `$dbn`";
|
||||
echo "<div class='shout'><b>".$lang["tables"]."</b><br/>".$lang["Query"].": <i>".htmlentities($sql)."</i><p align='left'>";
|
||||
$result = mysqli_query($conn,$sql);
|
||||
$nr = mysqli_num_rows($result);
|
||||
if ($nr =='0') {
|
||||
echo $lang["no_tables"]." !";
|
||||
} else {
|
||||
echo "<form action='mtb.php?k=$k' method='post' align='left'>";
|
||||
while ($row = mysqli_fetch_row($result)) {
|
||||
$vmi[]=$row[0];
|
||||
}
|
||||
// calculate tbl size and rows
|
||||
$result = mysqli_query($conn,"SHOW TABLE STATUS");
|
||||
function convert($size)
|
||||
{
|
||||
$unit=array('B','KB','MB','GB','TB','PB');
|
||||
return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];
|
||||
}
|
||||
while($row = mysqli_fetch_array($result)) {
|
||||
|
||||
$total_size = convert($row[ "Data_length" ] + $row[ "Index_length" ]);
|
||||
$size[$row['Name']] = $total_size."^".$row['Rows'];
|
||||
}
|
||||
include 'pagination.class.php';
|
||||
$pagination = new pagination;
|
||||
$vmi = $pagination->generate($vmi,$perp);
|
||||
|
||||
foreach($vmi as $tb) {
|
||||
$a= explode("^",$size[$tb]);
|
||||
echo "<input type='checkbox' name='tb[]' value='$tb'> <a href='table.php?k=$k&tb=$tb'>".htmlentities($tb)."</a> | ".$a[0]." | ".($a[1] == 1 ? '1 '.$lang["row"]: $a[1].' '.$lang["rows"])."<br/>";
|
||||
|
||||
}
|
||||
echo "<br/>
|
||||
<select name='act'>
|
||||
<option value=''>".$lang["With_selected"]."...</option>
|
||||
<option value='DROP'>".$lang["Drop"]."</option>
|
||||
<option value='EXPORT'>".$lang["Export"]."</option>
|
||||
<option value='EMPTY'>".$lang["Empty"]."</option>
|
||||
<option value='RENAME'>".$lang["Rename"]."</option>
|
||||
</select>
|
||||
<input type='submit' value='".$lang["Go"]."'></form><p align='left'>";
|
||||
echo $pagination->links();
|
||||
mysqli_free_result($result);
|
||||
}
|
||||
echo "<br/>- - -<br/>
|
||||
<form action='?' align='left'>".$lang["Show"]."<input type='text' name='perp' value='$perp' size='3'> <input type='hidden' value='$k' name='k'> <input type='submit' value='".$lang["Per_Page"]."'> </form><br/>
|
||||
<a href='addtable.php?k=$k'>".$lang["Add_table"]."</a> |
|
||||
<a href='sql.php?k=$k'>".$lang["Sql_code"]."</a> |
|
||||
<a href='export.php?k=$k'>".$lang["Export"]."</a> |
|
||||
<a href='upl.php?k=$k'>".$lang["Upload_sql"]."</a> |
|
||||
<a href='import.php?k=$k'>".$lang["Import_sql"]."</a> |
|
||||
<a href='data/index.php?k=$k'>".$lang["Files"]."</a><br/>
|
||||
<br/> $nr ".strtolower($lang["tables"])."
|
||||
</div>";
|
||||
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
|
||||
|
||||
$tb=trim($_GET['tb']);
|
||||
$vmi=$_GET['vmi'];
|
||||
echo "<div class='shout'>
|
||||
CLEAR - $tb <p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='table.php?k=$k&tb=$tb'>$tb</a>><a href='?k=$k&tb=$tb'>".$lang["Clear"]."</a>";
|
||||
if (!$vmi)
|
||||
{
|
||||
echo "<br/><br/>- - -<br/>- This will delete all records !<br/> ".$lang["TRUNCATE_TABLE"]." ".htmlspecialchars($tb)." ? <br/><br/><a href='?k=$k&tb=$tb&vmi=ionutvmi'>".$lang["Yes"]."</a> | <a href='table.php?k=$k&tb=$tb'>".$lang["No"]."</a>"; } else {
|
||||
$sql="TRUNCATE TABLE `$tb`";
|
||||
$d=mysqli_query($conn,$sql);
|
||||
if ($d) {
|
||||
echo "<br/>- - -<br/><center>".$lang["Query"].": <i>".htmlspecialchars($sql)."</i></center><p align='left'>
|
||||
Table $tb cleared !"; } else {
|
||||
echo "<br/>- - -<br/><center>".$lang["Query"].": <i>".htmlspecialchars($sql)."</i></center><p align='left'>".$lang["Error"].": ";
|
||||
echo mysqli_error($conn);
|
||||
}
|
||||
}
|
||||
echo "</div>";
|
||||
include('foot.php');
|
||||
?>
|
||||
@@ -0,0 +1,108 @@
|
||||
<?php
|
||||
/*
|
||||
* wap phpmyadmin
|
||||
* ionutvmi
|
||||
* pimp-wap.net
|
||||
*/
|
||||
include 'config.php';
|
||||
include 'head.php';
|
||||
$vmi=$_GET['vmi'];
|
||||
$size_bytes = 12288000; // max file size in bytes
|
||||
$kb = $size_bytes / 1024;
|
||||
$mb = $size_bytes / 1024000;
|
||||
echo "<div class='shout'>".$lang["UPLOAD_SQL"]." <p align='left'><a href='tables.php?k=$k'>".$lang["tables"]."</a>><a href='?k=$k'>".$lang["Upload"]."</a><br/>- - -<br/>";
|
||||
if (!$vmi) {
|
||||
echo "- ".$lang["Max"].": <b>$mb</b> MB<br/> - ".$lang["only_sql_files"];
|
||||
echo '<form method="post" enctype="multipart/form-data" action="?k='.$k.'&vmi=add" align="left">';
|
||||
echo '<input type="file" name="filetoupload"><br>';
|
||||
echo '<select name="del"><option value="yes">'.$lang["Delete_after_execute"].' !</option><option value="no">'.$lang["Save_after_execute"].' !</option></select><br>'.$lang["Separator"].': <input name="sep" value=";" size="2"><br>
|
||||
<select name="shw">
|
||||
<option value="no">'.$lang["HIDE_MESSAGES"].'</option>
|
||||
<option value="yes">'.$lang["SHOW_MESSAGES"].'</option></select><br/>
|
||||
<input type="Submit" name="uploadform" value="'.$lang["Upload"].'">';
|
||||
echo '</form></div>';
|
||||
include('foot.php');
|
||||
}
|
||||
if($vmi=="add"){
|
||||
$upload_dir='data/';
|
||||
$filename = $_FILES['filetoupload']['name'];
|
||||
$size = $_FILES['filetoupload']['size'];
|
||||
$extlimit = "yes"; //yes/no
|
||||
$ext = strrchr($_FILES['filetoupload']['name'],'.');
|
||||
if (!is_uploaded_file($_FILES['filetoupload']['tmp_name']))
|
||||
{
|
||||
echo $lang["ERROR_NO_FILE_SELECTED"]."!<br />";
|
||||
echo "</div>";
|
||||
include("foot.php");
|
||||
exit();
|
||||
}
|
||||
//IF EXT IS ALLOWED
|
||||
if (($extlimit == "yes") && ($ext !=".sql")) {
|
||||
echo($lang["EXT_NOT_ALLOWED"]."<br />");
|
||||
echo "</div>";
|
||||
include('foot.php');
|
||||
exit(); }
|
||||
// check file size
|
||||
if ($size > $size_bytes) {
|
||||
$kb = $size_bytes / 1024;
|
||||
echo $lang["FILE_IS_TO_BIG_Maxim"]." <b>$kb</b> KB.<br />";
|
||||
echo "</div>";
|
||||
include("foot.php");
|
||||
exit();
|
||||
}
|
||||
//IF FILE EXIST
|
||||
if (file_exists("$upload_dir/$filename"))
|
||||
{
|
||||
echo($lang["File_name_already_exists"]);
|
||||
echo "</div>";
|
||||
include("foot.php");
|
||||
exit();
|
||||
}
|
||||
if (move_uploaded_file($_FILES['filetoupload']['tmp_name'],$upload_dir.$filename))
|
||||
{
|
||||
// IF FILE IS UPLOAD
|
||||
$handle = fopen("data/$filename", "r");
|
||||
$contents = fread($handle, filesize("data/$filename"));
|
||||
fclose($handle);
|
||||
echo "- $filename uploaded !<br/>";
|
||||
$sep=trim($_POST['sep']);
|
||||
$shw=$_POST['shw'];
|
||||
$sql=str_replace("\r\n","\n",$contents); $sql=str_replace("\n","\r",$sql);
|
||||
$sql=preg_replace("~(--|##)[^\r]*\r~","\r",$sql);
|
||||
$sql=preg_replace("~\r\s*\r~","\r",$sql);
|
||||
|
||||
$contents=explode($sep,$sql);
|
||||
$q=0;
|
||||
foreach($contents as $coo) {
|
||||
if(!empty($coo)) {
|
||||
$do=mysqli_query($conn,$coo);
|
||||
$cop=htmlspecialchars(substr($coo, 0, 40));
|
||||
if ($do) {
|
||||
$q++;
|
||||
if($shw=="yes") {
|
||||
echo "><i style='color:lime'>$cop...</i> ".$lang["executed"]." !<br/>"; }
|
||||
} else {
|
||||
if($shw=="yes") {
|
||||
echo "><i style='color: red'>$cop...</i> ".$lang["not_executed"]." ! ".$lang["Error"].": ";
|
||||
echo mysqli_error($conn)."<br/>"; }
|
||||
} }
|
||||
}
|
||||
echo "<br/>$q ".strtolower($lang["Query"]." ".$lang["executed"])." !";
|
||||
if ($_POST['del'] == "yes") {
|
||||
unlink("data/$filename");
|
||||
echo "<br/>- ".$lang["deleted"]." !"; } else {
|
||||
echo "<br/>- ".$lang["saved"]." !"; }
|
||||
echo "</div>";
|
||||
include("foot.php");
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
//IF IS ERROR
|
||||
echo $lang["ERROR_Try_again"]."<br />";
|
||||
echo "</div>";
|
||||
include("foot.php");
|
||||
exit();
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user