├── robots.txt ├── test.php ├── php ├── RELEASE-DATE-2.11.6 ├── favicon.ico ├── pmd │ ├── images │ │ ├── bord.png │ │ ├── def.png │ │ ├── exec.png │ │ ├── grid.png │ │ ├── help.png │ │ ├── pdf.png │ │ ├── save.png │ │ ├── bottom.png │ │ ├── reload.png │ │ ├── resize.png │ │ ├── table.png │ │ ├── favicon.ico │ │ ├── relation.png │ │ ├── 2leftarrow.png │ │ ├── 2rightarrow.png │ │ ├── ang_direct.png │ │ ├── downarrow1.png │ │ ├── downarrow2.png │ │ ├── exec_small.png │ │ ├── rightarrow1.png │ │ ├── rightarrow2.png │ │ ├── uparrow2_m.png │ │ ├── 2leftarrow_m.png │ │ ├── 2rightarrow_m.png │ │ ├── display_field.png │ │ ├── downarrow2_m.png │ │ └── help_relation.png │ └── styles │ │ └── default │ │ └── images │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 8.png │ │ ├── Header.png │ │ ├── small_tab.png │ │ ├── top_panel.png │ │ ├── Field_small.png │ │ ├── FieldKey_small.png │ │ ├── Header_Linked.png │ │ ├── left_panel_tab.png │ │ ├── Field_small_char.png │ │ ├── Field_small_date.png │ │ ├── Field_small_int.png │ │ └── left_panel_butt.png ├── lang │ ├── japanese-euc.inc.php │ ├── japanese-sjis.inc.php │ ├── korean-euc-kr.inc.php │ ├── thai-tis-620.inc.php │ ├── bulgarian-koi8-r.inc.php │ ├── czech-iso-8859-2.inc.php │ ├── dutch-iso-8859-1.inc.php │ ├── greek-iso-8859-7.inc.php │ ├── russian-cp-866.inc.php │ ├── russian-koi8-r.inc.php │ ├── basque-iso-8859-1.inc.php │ ├── catalan-iso-8859-1.inc.php │ ├── czech-windows-1250.inc.php │ ├── danish-iso-8859-1.inc.php │ ├── dutch-iso-8859-15.inc.php │ ├── finnish-iso-8859-1.inc.php │ ├── french-iso-8859-1.inc.php │ ├── french-iso-8859-15.inc.php │ ├── german-iso-8859-1.inc.php │ ├── german-iso-8859-15.inc.php │ ├── italian-iso-8859-1.inc.php │ ├── polish-iso-8859-2.inc.php │ ├── slovak-iso-8859-2.inc.php │ ├── spanish-iso-8859-1.inc.php │ ├── swedish-iso-8859-1.inc.php │ ├── turkish-iso-8859-9.inc.php │ ├── albanian-iso-8859-1.inc.php │ ├── arabic-windows-1256.inc.php │ ├── bosnian-windows-1250.inc.php │ ├── croatian-iso-8859-2.inc.php │ ├── croatian-windows-1250.inc.php │ ├── estonian-iso-8859-1.inc.php │ ├── finnish-iso-8859-15.inc.php │ ├── galician-iso-8859-1.inc.php │ ├── hebrew-iso-8859-8-i.inc.php │ ├── hungarian-iso-8859-2.inc.php │ ├── italian-iso-8859-15.inc.php │ ├── latvian-windows-1257.inc.php │ ├── norwegian-iso-8859-1.inc.php │ ├── persian-windows-1256.inc.php │ ├── polish-windows-1250.inc.php │ ├── portuguese-iso-8859-1.inc.php │ ├── romanian-iso-8859-1.inc.php │ ├── russian-windows-1251.inc.php │ ├── slovak-windows-1250.inc.php │ ├── slovenian-iso-8859-2.inc.php │ ├── spanish-iso-8859-15.inc.php │ ├── tatarish-iso-8859-9.inc.php │ ├── azerbaijani-iso-8859-9.inc.php │ ├── bulgarian-windows-1251.inc.php │ ├── lithuanian-windows-1257.inc.php │ ├── portuguese-iso-8859-15.inc.php │ ├── slovenian-windows-1250.inc.php │ ├── ukrainian-windows-1251.inc.php │ ├── chinese_simplified-gb2312.inc.php │ ├── chinese_traditional-big5.inc.php │ ├── serbian_latin-windows-1250.inc.php │ ├── brazilian_portuguese-iso-8859-1.inc.php │ ├── serbian_cyrillic-windows-1251.inc.php │ ├── belarusian_cyrillic-windows-1251.inc.php │ ├── macedonian_cyrillic-windows-1251.inc.php │ ├── remove_message.sh │ ├── add_message.sh │ ├── add_message_file.sh │ └── translatecount.sh ├── themes │ ├── original │ │ ├── screen.png │ │ ├── img │ │ │ ├── b_sdb.png │ │ │ ├── b_sql.png │ │ │ ├── error.ico │ │ │ ├── item.png │ │ │ ├── s_asc.png │ │ │ ├── s_db.png │ │ │ ├── s_tbl.png │ │ │ ├── b_docs.png │ │ │ ├── b_drop.png │ │ │ ├── b_edit.png │ │ │ ├── b_empty.png │ │ │ ├── b_ftext.png │ │ │ ├── b_help.png │ │ │ ├── b_home.png │ │ │ ├── b_index.png │ │ │ ├── b_info.png │ │ │ ├── b_minus.png │ │ │ ├── b_newdb.png │ │ │ ├── b_plus.png │ │ │ ├── b_print.png │ │ │ ├── b_props.png │ │ │ ├── b_save.png │ │ │ ├── b_tipp.png │ │ │ ├── b_view.png │ │ │ ├── b_views.png │ │ │ ├── bd_drop.png │ │ │ ├── php_sym.png │ │ │ ├── s_asci.png │ │ │ ├── s_desc.png │ │ │ ├── s_error.png │ │ │ ├── s_host.png │ │ │ ├── s_info.png │ │ │ ├── s_lang.png │ │ │ ├── s_okay.png │ │ │ ├── s_theme.png │ │ │ ├── s_vars.png │ │ │ ├── s_views.png │ │ │ ├── s_warn.png │ │ │ ├── spacer.png │ │ │ ├── arrow_ltr.png │ │ │ ├── arrow_rtl.png │ │ │ ├── asc_order.png │ │ │ ├── b_bookmark.png │ │ │ ├── b_browse.png │ │ │ ├── b_calendar.png │ │ │ ├── b_comment.png │ │ │ ├── b_deltbl.png │ │ │ ├── b_docsql.png │ │ │ ├── b_engine.png │ │ │ ├── b_export.png │ │ │ ├── b_import.png │ │ │ ├── b_insrow.png │ │ │ ├── b_lastpage.png │ │ │ ├── b_newtbl.png │ │ │ ├── b_nextpage.png │ │ │ ├── b_pdfdoc.png │ │ │ ├── b_prevpage.png │ │ │ ├── b_primary.png │ │ │ ├── b_sbrowse.png │ │ │ ├── b_search.png │ │ │ ├── b_selboard.png │ │ │ ├── b_select.png │ │ │ ├── b_sqldoc.png │ │ │ ├── b_sqlhelp.png │ │ │ ├── b_tblops.png │ │ │ ├── b_unique.png │ │ │ ├── b_usradd.png │ │ │ ├── b_usrcheck.png │ │ │ ├── b_usrdrop.png │ │ │ ├── b_usredit.png │ │ │ ├── b_usrlist.png │ │ │ ├── bd_browse.png │ │ │ ├── bd_deltbl.png │ │ │ ├── bd_empty.png │ │ │ ├── bd_ftext.png │ │ │ ├── bd_index.png │ │ │ ├── bd_insrow.png │ │ │ ├── bd_primary.png │ │ │ ├── bd_sbrowse.png │ │ │ ├── bd_select.png │ │ │ ├── bd_unique.png │ │ │ ├── item_ltr.png │ │ │ ├── item_rtl.png │ │ │ ├── logo_left.png │ │ │ ├── logo_right.png │ │ │ ├── pma_logo2.png │ │ │ ├── s_cancel.png │ │ │ ├── s_cancel2.png │ │ │ ├── s_error2.png │ │ │ ├── s_fulltext.png │ │ │ ├── s_loggoff.png │ │ │ ├── s_notice.png │ │ │ ├── s_passwd.png │ │ │ ├── s_process.png │ │ │ ├── s_really.png │ │ │ ├── s_reload.png │ │ │ ├── s_rights.png │ │ │ ├── s_status.png │ │ │ ├── window-new.png │ │ │ ├── b_firstpage.png │ │ │ ├── b_relations.png │ │ │ ├── b_tblanalyse.png │ │ │ ├── b_tblexport.png │ │ │ ├── b_tblimport.png │ │ │ ├── bd_firstpage.png │ │ │ ├── bd_lastpage.png │ │ │ ├── bd_nextpage.png │ │ │ ├── bd_prevpage.png │ │ │ ├── s_attention.png │ │ │ ├── b_dbstatistics.png │ │ │ ├── b_tbloptimize.png │ │ │ ├── s_partialtext.png │ │ │ └── vertical_line.png │ │ ├── info.inc.php │ │ └── css │ │ │ └── theme_print.css.php │ └── darkblue_orange │ │ ├── screen.png │ │ ├── img │ │ ├── b_sdb.png │ │ ├── b_sql.png │ │ ├── error.ico │ │ ├── item.png │ │ ├── s_asc.png │ │ ├── s_db.png │ │ ├── s_tbl.png │ │ ├── b_browse.png │ │ ├── b_deltbl.png │ │ ├── b_docs.png │ │ ├── b_docsql.png │ │ ├── b_drop.png │ │ ├── b_edit.png │ │ ├── b_empty.png │ │ ├── b_engine.png │ │ ├── b_export.png │ │ ├── b_ftext.png │ │ ├── b_help.png │ │ ├── b_home.png │ │ ├── b_import.png │ │ ├── b_index.png │ │ ├── b_info.png │ │ ├── b_insrow.png │ │ ├── b_minus.png │ │ ├── b_newdb.png │ │ ├── b_newtbl.png │ │ ├── b_pdfdoc.png │ │ ├── b_plus.png │ │ ├── b_print.png │ │ ├── b_props.png │ │ ├── b_save.png │ │ ├── b_search.png │ │ ├── b_select.png │ │ ├── b_sqldoc.png │ │ ├── b_tblops.png │ │ ├── b_tipp.png │ │ ├── b_unique.png │ │ ├── b_usradd.png │ │ ├── b_view.png │ │ ├── b_views.png │ │ ├── bd_drop.png │ │ ├── bd_empty.png │ │ ├── bd_ftext.png │ │ ├── bd_index.png │ │ ├── item_ltr.png │ │ ├── item_rtl.png │ │ ├── php_sym.png │ │ ├── s_asci.png │ │ ├── s_cancel.png │ │ ├── s_desc.png │ │ ├── s_error.png │ │ ├── s_error2.png │ │ ├── s_host.png │ │ ├── s_info.png │ │ ├── s_lang.png │ │ ├── s_notice.png │ │ ├── s_okay.png │ │ ├── s_passwd.png │ │ ├── s_really.png │ │ ├── s_reload.png │ │ ├── s_rights.png │ │ ├── s_status.png │ │ ├── s_theme.png │ │ ├── s_vars.png │ │ ├── s_views.png │ │ ├── s_warn.png │ │ ├── spacer.png │ │ ├── tbl_th.png │ │ ├── arrow_ltr.png │ │ ├── arrow_rtl.png │ │ ├── asc_order.png │ │ ├── b_bookmark.png │ │ ├── b_calendar.png │ │ ├── b_comment.png │ │ ├── b_lastpage.png │ │ ├── b_nextpage.png │ │ ├── b_prevpage.png │ │ ├── b_primary.png │ │ ├── b_sbrowse.png │ │ ├── b_selboard.png │ │ ├── b_sqlhelp.png │ │ ├── b_usrcheck.png │ │ ├── b_usrdrop.png │ │ ├── b_usredit.png │ │ ├── b_usrlist.png │ │ ├── bd_browse.png │ │ ├── bd_deltbl.png │ │ ├── bd_insrow.png │ │ ├── bd_primary.png │ │ ├── bd_sbrowse.png │ │ ├── bd_select.png │ │ ├── bd_unique.png │ │ ├── logo_left.png │ │ ├── logo_right.png │ │ ├── pma_logo2.png │ │ ├── s_cancel2.png │ │ ├── s_fulltext.png │ │ ├── s_loggoff.png │ │ ├── s_process.png │ │ ├── tbl_header.png │ │ ├── window-new.png │ │ ├── b_firstpage.png │ │ ├── b_relations.png │ │ ├── b_tblanalyse.png │ │ ├── b_tblexport.png │ │ ├── b_tblimport.png │ │ ├── b_tbloptimize.png │ │ ├── bd_firstpage.png │ │ ├── bd_lastpage.png │ │ ├── bd_nextpage.png │ │ ├── bd_prevpage.png │ │ ├── s_attention.png │ │ ├── s_partialtext.png │ │ └── b_dbstatistics.png │ │ └── info.inc.php ├── libraries │ ├── tcpdf │ │ └── font │ │ │ ├── dejavusans.z │ │ │ ├── dejavuserif.z │ │ │ ├── dejavusans-bold.z │ │ │ ├── dejavusans.ctg.z │ │ │ ├── dejavuserif-bold.z │ │ │ ├── dejavuserif.ctg.z │ │ │ ├── dejavusans-bold.ctg.z │ │ │ ├── dejavuserif-bold.ctg.z │ │ │ └── README │ ├── .htaccess │ ├── transformations │ │ ├── README │ │ ├── text_plain__formatted.inc.php │ │ ├── TEMPLATE_MIMETYPE │ │ ├── text_plain__sql.inc.php │ │ ├── template_generator_mimetype.sh │ │ ├── image_jpeg__link.inc.php │ │ ├── template_generator.sh │ │ ├── application_octetstream__hex.inc.php │ │ ├── text_plain__imagelink.inc.php │ │ ├── text_plain__link.inc.php │ │ ├── generator.sh │ │ ├── image_png__inline.inc.php │ │ ├── image_jpeg__inline.inc.php │ │ ├── TEMPLATE │ │ ├── application_octetstream__download.inc.php │ │ └── text_plain__substr.inc.php │ ├── engines │ │ ├── merge.lib.php │ │ ├── berkeleydb.lib.php │ │ ├── innobase.lib.php │ │ ├── binlog.lib.php │ │ ├── mrg_myisam.lib.php │ │ ├── memory.lib.php │ │ └── ndbcluster.lib.php │ ├── language.lib.php │ ├── dbg │ │ └── setup.php │ ├── header_http.inc.php │ ├── export │ │ └── excel.php │ ├── tbl_common.php │ ├── server_common.inc.php │ └── cleanup.lib.php ├── CREDITS ├── INSTALL ├── TODO ├── contrib │ ├── packaging │ │ └── Fedora │ │ │ └── phpMyAdmin-http.conf │ └── README ├── show_config_errors.php ├── phpinfo.php ├── test │ ├── FailTest.php │ ├── Environment_test.php │ ├── PMA_get_real_size_test.php │ ├── PMA_STR_sub_test.php │ ├── PMA_sanitize_test.php │ ├── PMA_transformation_getOptions_test.php │ └── PMA_escapeJsString_test.php ├── readme.php ├── license.php ├── scripts │ ├── convertcfg.pl │ ├── remove_control_m.sh │ └── find_unused_messages.sh ├── chk_rel.php ├── db_import.php ├── server_import.php ├── server_sql.php ├── tbl_import.php ├── calendar.php ├── pmd_help.php ├── tbl_sql.php ├── db_sql.php ├── themes.php ├── print.css └── db_create.php ├── README.md ├── xss.tar.gz ├── admin ├── style │ └── images │ │ ├── bg.png │ │ ├── Thumbs.db │ │ └── logo.gif ├── templates │ ├── admin_footer.html │ ├── admin_menu.html │ └── admin_header.html ├── index.php └── source │ ├── admin_index.php │ └── admin_module.php ├── source ├── js │ └── boxy │ │ ├── boxy-ne.png │ │ ├── boxy-nw.png │ │ ├── boxy-se.png │ │ └── boxy-sw.png ├── global.func.php ├── index.php ├── common.php ├── do.php ├── keepsession.php ├── login.php └── code.php ├── update.sh ├── themes └── default │ ├── templates │ ├── header.html │ ├── notice.html │ └── menus.html │ └── style │ ├── style.css │ └── print.css ├── captcha.php ├── index.php ├── libs ├── internals │ ├── core.get_microtime.php │ ├── core.get_include_path.php │ ├── core.process_compiled_include.php │ ├── core.write_compiled_resource.php │ ├── core.assign_smarty_interface.php │ └── core.is_trusted.php └── plugins │ ├── modifier.lower.php │ ├── modifier.upper.php │ ├── modifier.indent.php │ ├── modifier.string_format.php │ ├── modifier.replace.php │ ├── modifier.wordwrap.php │ ├── modifier.cat.php │ ├── modifier.count_paragraphs.php │ ├── modifier.spacify.php │ ├── modifier.default.php │ ├── modifier.count_sentences.php │ ├── modifier.strip_tags.php │ ├── modifier.nl2br.php │ ├── modifier.strip.php │ ├── modifier.count_characters.php │ ├── modifier.count_words.php │ ├── shared.escape_special_chars.php │ ├── function.debug.php │ ├── function.popup_init.php │ ├── modifier.truncate_utf8.php │ ├── function.eval.php │ ├── modifier.capitalize.php │ ├── compiler.assign.php │ ├── function.assign_debug_info.php │ ├── shared.make_timestamp.php │ ├── modifier.regex_replace.php │ └── modifier.truncate.php ├── templates_c ├── %%71^714^714F4B17%%header.html.php └── %%8E^8E8^8E89046B%%notice.html.php ├── scripts └── keepsession.php ├── authtest.php ├── download.php └── test.html /robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / -------------------------------------------------------------------------------- /test.php: -------------------------------------------------------------------------------- 1 | ) 2 | ==================== 3 | 4 | See the Documentation.html for complete instructions on how to use transformation plugins. 5 | -------------------------------------------------------------------------------- /php/CREDITS: -------------------------------------------------------------------------------- 1 | $Id: CREDITS 5152 2003-11-18 15:20:45Z nijel $ 2 | 3 | 4 | phpMyAdmin - Credits 5 | ==================== 6 | 7 | Please have a look to the Documentation.txt or 8 | Documentation.html files. 9 | 10 | -------------------------------------------------------------------------------- /php/INSTALL: -------------------------------------------------------------------------------- 1 | $Id: INSTALL 9537 2006-10-12 16:27:13Z nijel $ 2 | 3 | phpMyAdmin - Installation 4 | ------------------------- 5 | 6 | Please have a look to the Documentation.txt or 7 | Documentation.html files. 8 | 9 | 10 | -------------------------------------------------------------------------------- /admin/templates/admin_footer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /update.sh: -------------------------------------------------------------------------------- 1 | git config --global user.name "zonehook" 2 | git config --global user.email "zonehook@gmail.com" 3 | git init 4 | git add . 5 | git commit -m 'first commit' 6 | git remote add origin git@github.com:zonehook/XSS-Platform.git 7 | git push origin master 8 | -------------------------------------------------------------------------------- /admin/templates/admin_menu.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /php/TODO: -------------------------------------------------------------------------------- 1 | $Id: TODO 9537 2006-10-12 16:27:13Z nijel $ 2 | 3 | phpMyAdmin - Todo 4 | ================= 5 | 6 | We are currently using the Sourceforge Tracker as Todo list: 7 | 8 | http://sourceforge.net/tracker/?atid=377411&group_id=23067&func=browse 9 | 10 | -- swix/20010704 11 | -------------------------------------------------------------------------------- /themes/default/templates/header.html: -------------------------------------------------------------------------------- 1 |

XSS Platform 2 | {if $show.user.userId>0} 3 | 用户:{$show.user.userName} , 退出 4 | {/if} 5 |

6 |
-------------------------------------------------------------------------------- /php/libraries/engines/merge.lib.php: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /captcha.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /php/contrib/packaging/Fedora/phpMyAdmin-http.conf: -------------------------------------------------------------------------------- 1 | # 2 | # MySQL server administration. 3 | # 4 | Alias /phpMyAdmin /var/www/myadmin 5 | 6 | 7 | DirectoryIndex index.php 8 | Options Indexes Includes ExecCGI 9 | AllowOverride None 10 | Order deny,allow 11 | Allow from all 12 | 13 | -------------------------------------------------------------------------------- /php/libraries/engines/berkeleydb.lib.php: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /php/themes/original/info.inc.php: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /php/libraries/engines/innobase.lib.php: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /php/themes/darkblue_orange/info.inc.php: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /php/libraries/transformations/text_plain__formatted.inc.php: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /source/global.func.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /php/show_config_errors.php: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /php/libraries/language.lib.php: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /php/phpinfo.php: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /php/test/FailTest.php: -------------------------------------------------------------------------------- 1 | assertEquals(0, 1); 20 | } 21 | } 22 | ?> -------------------------------------------------------------------------------- /php/libraries/transformations/TEMPLATE_MIMETYPE: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /php/readme.php: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /php/contrib/README: -------------------------------------------------------------------------------- 1 | $Id: README 8657 2006-02-22 15:35:00Z nijel $ 2 | 3 | This directory contains various stuff contributed by users that might be 4 | useful to other. There is no guarantee it will work for you. 5 | 6 | Current content of this directory: 7 | 8 | packaging - Contains files needed for creating packages for various 9 | distributions. Please prefer official packages from your vendor if 10 | possible. 11 | 12 | vim: expandtab ts=4 sw=4 sts=4 tw=78 13 | -------------------------------------------------------------------------------- /libs/internals/core.get_microtime.php: -------------------------------------------------------------------------------- 1 | 24 | -------------------------------------------------------------------------------- /php/license.php: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /php/scripts/convertcfg.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | # $Id: convertcfg.pl 5152 2003-11-18 15:20:45Z nijel $ 4 | # 5 | # Configuration converter 6 | # Converts from old-style (Pre-2.3) configuration files to new format found in PMA-2.3 7 | # 8 | # Takes input from STDIN, sends output to STDOUT 9 | # 10 | # By Robin Johnson robbat2@users.sourceforge.net 11 | # Many thanks to Patrick Lougheed pat@tfsb.org 12 | # 13 | 14 | while(<>) 15 | { s/\$cfg(\w+)/\$cfg\[\'$1\'\]/g; 16 | print; 17 | } 18 | 19 | 20 | -------------------------------------------------------------------------------- /php/scripts/remove_control_m.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # $Id: remove_control_m.sh 5152 2003-11-18 15:20:45Z nijel $ 4 | # 5 | # Script to remove ^M from files for DOS <-> UNIX conversions 6 | # 7 | 8 | if [ $# != 1 ] 9 | then 10 | echo "Usage: remove_control_m.sh " 11 | echo "" 12 | echo "Example: remove_control_m.sh php3" 13 | exit 14 | fi 15 | 16 | for i in `find . -name "*.$1"` 17 | do 18 | echo $i 19 | tr -d '\015' < $i > ${i}.new 20 | rm $i 21 | mv ${i}.new $i 22 | done; 23 | 24 | -------------------------------------------------------------------------------- /templates_c/%%71^714^714F4B17%%header.html.php: -------------------------------------------------------------------------------- 1 | 3 |

XSS Platform 4 | _tpl_vars['show']['user']['userId'] > 0): ?> 5 | 用户:_tpl_vars['show']['user']['userName']; ?> 6 | , 退出 8 | 9 |

10 |
-------------------------------------------------------------------------------- /php/libraries/transformations/text_plain__sql.inc.php: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /admin/index.php: -------------------------------------------------------------------------------- 1 | adminLevel<=0) die('Access Denied'); 9 | 10 | define('ADMIN_PATH',dirname(__FILE__)); 11 | define('TEMPLATE_PATH',dirname(__FILE__)); 12 | 13 | $do=Val('do','GET',0); 14 | $dos=array('admin_index','admin_module'); 15 | 16 | if(!in_array($do,$dos)) $do='admin_index'; 17 | include(ADMIN_PATH.'/source/'.$do.'.php'); 18 | ?> -------------------------------------------------------------------------------- /source/index.php: -------------------------------------------------------------------------------- 1 | userId<=0) $user->ToLogin(); 9 | 10 | include('common.php'); 11 | 12 | $smarty=InitSmarty(); 13 | $smarty->assign('do',$do); 14 | $smarty->assign('show',$show); 15 | $smarty->assign('url',$url); 16 | $smarty->assign('projects',$projects); 17 | $smarty->assign('modules',$modules); 18 | $smarty->display('index.html'); 19 | ?> -------------------------------------------------------------------------------- /php/libraries/engines/binlog.lib.php: -------------------------------------------------------------------------------- 1 | 25 | -------------------------------------------------------------------------------- /php/chk_rel.php: -------------------------------------------------------------------------------- 1 | 27 | -------------------------------------------------------------------------------- /php/db_import.php: -------------------------------------------------------------------------------- 1 | 27 | 28 | -------------------------------------------------------------------------------- /scripts/keepsession.php: -------------------------------------------------------------------------------- 1 | Dataset("SELECT * FROM ".Tb('keepsession')); 10 | 11 | $f=new SaeFetchurl(); 12 | 13 | foreach($rows as $row){ 14 | if(time()>$row['updateTime']+300){ 15 | $f->setHeader("Cookie",urldecode($row['cookie'])); 16 | $con=$f->fetch($row['url']); 17 | $db->Execute("UPDATE ".Tb('keepsession')." SET updateTime='".time()."' WHERE id='{$row[id]}'"); 18 | } 19 | } 20 | ?> -------------------------------------------------------------------------------- /libs/plugins/modifier.lower.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: lower
14 | * Purpose: convert string to lowercase 15 | * @link http://smarty.php.net/manual/en/language.modifier.lower.php 16 | * lower (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param string 19 | * @return string 20 | */ 21 | function smarty_modifier_lower($string) 22 | { 23 | return strtolower($string); 24 | } 25 | 26 | ?> 27 | -------------------------------------------------------------------------------- /libs/plugins/modifier.upper.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: upper
14 | * Purpose: convert string to uppercase 15 | * @link http://smarty.php.net/manual/en/language.modifier.upper.php 16 | * upper (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param string 19 | * @return string 20 | */ 21 | function smarty_modifier_upper($string) 22 | { 23 | return strtoupper($string); 24 | } 25 | 26 | ?> 27 | -------------------------------------------------------------------------------- /admin/templates/admin_header.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /php/server_import.php: -------------------------------------------------------------------------------- 1 | 31 | 32 | -------------------------------------------------------------------------------- /php/lang/remove_message.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # $Id: remove_message.sh 5152 2003-11-18 15:20:45Z nijel $ 3 | # 4 | # Shell script that removes a message from all message files (Lem9) 5 | # it checks for the message, followed by a space 6 | # 7 | # Example: remove_message.sh 'strMessageToRemove' 8 | # 9 | 10 | if [ $# -ne 1 ] ; then 11 | echo "usage: remove_message.sh 'strMessageToRemove'" 12 | exit 1 13 | fi 14 | 15 | for file in *.inc.php 16 | do 17 | echo "lines before:" `wc -l $file` 18 | grep -v "$1 " ${file} > ${file}.new 19 | rm $file 20 | mv ${file}.new $file 21 | echo " lines after:" `wc -l $file` 22 | done 23 | echo " " 24 | -------------------------------------------------------------------------------- /php/libraries/transformations/template_generator_mimetype.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # $Id: template_generator_mimetype.sh 9537 2006-10-12 16:27:13Z nijel $ 3 | # 4 | # Shell script that adds a new mimetype without transform function. 5 | # 6 | # The filename should contain either 'mimetype_subtype' or 'mimetype'. 7 | # The suffix '.inc.php' is appended automatically! 8 | # 9 | # Example: template_generator_mimetype.sh 'filename' 10 | # 11 | if [ $# == 0 ] 12 | then 13 | echo "Usage: template_generator_mimetype.sh 'filename'" 14 | echo "" 15 | exit 65 16 | fi 17 | 18 | ./generator.sh 'TEMPLATE_MIMETYPE' "$1" 19 | echo " " 20 | echo "New MIMETYPE $1.inc.php added." 21 | -------------------------------------------------------------------------------- /php/libraries/engines/mrg_myisam.lib.php: -------------------------------------------------------------------------------- 1 | 30 | -------------------------------------------------------------------------------- /php/libraries/transformations/image_jpeg__link.inc.php: -------------------------------------------------------------------------------- 1 | '[BLOB]'); 15 | $buffer = PMA_transformation_global_html_replace($buffer, $transform_options); 16 | 17 | return $buffer; 18 | } 19 | 20 | ?> 21 | -------------------------------------------------------------------------------- /php/libraries/engines/memory.lib.php: -------------------------------------------------------------------------------- 1 | array( 21 | 'type' => PMA_ENGINE_DETAILS_TYPE_SIZE, 22 | ), 23 | ); 24 | } 25 | } 26 | 27 | ?> 28 | -------------------------------------------------------------------------------- /libs/plugins/modifier.indent.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: indent
14 | * Purpose: indent lines of text 15 | * @link http://smarty.php.net/manual/en/language.modifier.indent.php 16 | * indent (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param string 19 | * @param integer 20 | * @param string 21 | * @return string 22 | */ 23 | function smarty_modifier_indent($string,$chars=4,$char=" ") 24 | { 25 | return preg_replace('!^!m',str_repeat($char,$chars),$string); 26 | } 27 | 28 | ?> 29 | -------------------------------------------------------------------------------- /source/common.php: -------------------------------------------------------------------------------- 1 | Dataset("SELECT * FROM ".Tb('project')." WHERE userId='".$user->userId."' ORDER BY id dESC"); 12 | foreach($projects as $k=>$v){ 13 | $projects[$k]['contentNum']=$db->FirstValue("SELECT COUNT(*) FROM ".Tb('project_content')." WHERE projectId='{$v[id]}'"); 14 | } 15 | //模块 16 | $modules=$db->Dataset("SELECT * FROM ".Tb('module')." WHERE userId='".$user->userId."' OR (isOpen=1 AND isAudit=1) ORDER BY id dESC"); 17 | ?> -------------------------------------------------------------------------------- /libs/plugins/modifier.string_format.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: string_format
14 | * Purpose: format strings via sprintf 15 | * @link http://smarty.php.net/manual/en/language.modifier.string.format.php 16 | * string_format (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param string 19 | * @param string 20 | * @return string 21 | */ 22 | function smarty_modifier_string_format($string, $format) 23 | { 24 | return sprintf($format, $string); 25 | } 26 | 27 | /* vim: set expandtab: */ 28 | 29 | ?> 30 | -------------------------------------------------------------------------------- /themes/default/style/style.css: -------------------------------------------------------------------------------- 1 | code { 2 | background-color: #F8F8F8; 3 | border: 1px solid #CCCCCC; 4 | color: #333333; 5 | display: block; 6 | font-family: Lucida Console,Courier New,Courier,mono,monospace; 7 | font-size: 12px; 8 | line-height: 18px; 9 | margin: 0 auto; 10 | overflow: auto; 11 | padding: 4px 8px; 12 | word-wrap: break-word; 13 | } 14 | 15 | .menus { padding:10px; width:150px; margin-right:10px; border:#e0e0e0 1px solid } 16 | .menus .menutitle { font-size:14px; font-weight:bold; width:100%;overflow: hidden } 17 | .menus .menutitle a { text-decoration:none } 18 | .menus .menutitle a.right { font-size:12px; font-weight: normal; } 19 | .menus ul,menus li { list-style:none } -------------------------------------------------------------------------------- /authtest.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /libs/plugins/modifier.replace.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: replace
14 | * Purpose: simple search/replace 15 | * @link http://smarty.php.net/manual/en/language.modifier.replace.php 16 | * replace (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param string 19 | * @param string 20 | * @param string 21 | * @return string 22 | */ 23 | function smarty_modifier_replace($string, $search, $replace) 24 | { 25 | return str_replace($search, $replace, $string); 26 | } 27 | 28 | /* vim: set expandtab: */ 29 | 30 | ?> 31 | -------------------------------------------------------------------------------- /php/server_sql.php: -------------------------------------------------------------------------------- 1 | 37 | -------------------------------------------------------------------------------- /libs/plugins/modifier.wordwrap.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: wordwrap
14 | * Purpose: wrap a string of text at a given length 15 | * @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php 16 | * wordwrap (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param string 19 | * @param integer 20 | * @param string 21 | * @param boolean 22 | * @return string 23 | */ 24 | function smarty_modifier_wordwrap($string,$length=80,$break="\n",$cut=false) 25 | { 26 | return wordwrap($string,$length,$break,$cut); 27 | } 28 | 29 | ?> 30 | -------------------------------------------------------------------------------- /libs/plugins/modifier.cat.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: cat
14 | * Date: Feb 24, 2003 15 | * Purpose: catenate a value to a variable 16 | * Input: string to catenate 17 | * Example: {$var|cat:"foo"} 18 | * @link http://smarty.php.net/manual/en/language.modifier.cat.php cat 19 | * (Smarty online manual) 20 | * @author Monte Ohrt 21 | * @version 1.0 22 | * @param string 23 | * @param string 24 | * @return string 25 | */ 26 | function smarty_modifier_cat($string, $cat) 27 | { 28 | return $string . $cat; 29 | } 30 | 31 | /* vim: set expandtab: */ 32 | 33 | ?> 34 | -------------------------------------------------------------------------------- /libs/plugins/modifier.count_paragraphs.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: count_paragraphs
14 | * Purpose: count the number of paragraphs in a text 15 | * @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php 16 | * count_paragraphs (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param string 19 | * @return integer 20 | */ 21 | function smarty_modifier_count_paragraphs($string) 22 | { 23 | // count \r or \n characters 24 | return count(preg_split('/[\r\n]+/', $string)); 25 | } 26 | 27 | /* vim: set expandtab: */ 28 | 29 | ?> 30 | -------------------------------------------------------------------------------- /php/libraries/transformations/template_generator.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # $Id: template_generator.sh 9537 2006-10-12 16:27:13Z nijel $ 3 | # 4 | # Shell script that adds a new mimetype with transform function. 5 | # 6 | # The filename should contain either 'mimetype_subtype' or 'mimetype'. 7 | # The suffix '.inc.php' is appended automatically! 8 | # 9 | # The 'description' parameter will add a new entry in the language file. Watch out for 10 | # special escaping. 11 | # 12 | # Example: template_generator.sh 'filename' 'description' 13 | # 14 | if [ $# == 0 ] 15 | then 16 | echo "Usage: template_generator.sh 'filename' 'description'" 17 | echo "" 18 | exit 65 19 | fi 20 | 21 | 22 | 23 | ./generator.sh 'TEMPLATE' "$1" "$2" 24 | echo " " 25 | echo "New TRANSFORM FUNCTION $1.inc.php added." 26 | -------------------------------------------------------------------------------- /php/tbl_import.php: -------------------------------------------------------------------------------- 1 | 33 | 34 | -------------------------------------------------------------------------------- /libs/plugins/modifier.spacify.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: spacify
14 | * Purpose: add spaces between characters in a string 15 | * @link http://smarty.php.net/manual/en/language.modifier.spacify.php 16 | * spacify (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param string 19 | * @param string 20 | * @return string 21 | */ 22 | function smarty_modifier_spacify($string, $spacify_char = ' ') 23 | { 24 | return implode($spacify_char, 25 | preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY)); 26 | } 27 | 28 | /* vim: set expandtab: */ 29 | 30 | ?> 31 | -------------------------------------------------------------------------------- /libs/plugins/modifier.default.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: default
14 | * Purpose: designate default value for empty variables 15 | * @link http://smarty.php.net/manual/en/language.modifier.default.php 16 | * default (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param string 19 | * @param string 20 | * @return string 21 | */ 22 | function smarty_modifier_default($string, $default = '') 23 | { 24 | if (!isset($string) || $string === '') 25 | return $default; 26 | else 27 | return $string; 28 | } 29 | 30 | /* vim: set expandtab: */ 31 | 32 | ?> 33 | -------------------------------------------------------------------------------- /libs/plugins/modifier.count_sentences.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: count_sentences 14 | * Purpose: count the number of sentences in a text 15 | * @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php 16 | * count_sentences (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param string 19 | * @return integer 20 | */ 21 | function smarty_modifier_count_sentences($string) 22 | { 23 | // find periods with a word before but not after. 24 | return preg_match_all('/[^\s]\.(?!\w)/', $string, $match); 25 | } 26 | 27 | /* vim: set expandtab: */ 28 | 29 | ?> 30 | -------------------------------------------------------------------------------- /php/test/Environment_test.php: -------------------------------------------------------------------------------- 1 | assertTrue(version_compare('4.1', phpversion(), '<='), 20 | 'phpMyAdmin requires PHP 4.1 or above'); 21 | } 22 | 23 | public function testMySQL() 24 | { 25 | $this->markTestIncomplete(); 26 | } 27 | 28 | public function testSession() 29 | { 30 | $this->markTestIncomplete(); 31 | } 32 | } 33 | ?> -------------------------------------------------------------------------------- /libs/plugins/modifier.strip_tags.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: strip_tags
14 | * Purpose: strip html tags from text 15 | * @link http://smarty.php.net/manual/en/language.modifier.strip.tags.php 16 | * strip_tags (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param string 19 | * @param boolean 20 | * @return string 21 | */ 22 | function smarty_modifier_strip_tags($string, $replace_with_space = true) 23 | { 24 | if ($replace_with_space) 25 | return preg_replace('!<[^>]*?>!', ' ', $string); 26 | else 27 | return strip_tags($string); 28 | } 29 | 30 | /* vim: set expandtab: */ 31 | 32 | ?> 33 | -------------------------------------------------------------------------------- /php/libraries/transformations/application_octetstream__hex.inc.php: -------------------------------------------------------------------------------- 1 | 29 | -------------------------------------------------------------------------------- /php/themes/original/css/theme_print.css.php: -------------------------------------------------------------------------------- 1 | 11 | /* For printview */ 12 | body, table, th, td { 13 | color: #000000; 14 | background-color: #ffffff; 15 | } 16 | 17 | img { 18 | border: 0; 19 | } 20 | 21 | table, th, td { 22 | border-width: 0.1em; 23 | border-color: #000000; 24 | border-style: solid; 25 | } 26 | 27 | table { 28 | border-collapse: collapse; 29 | border-spacing: 0; 30 | } 31 | 32 | th, td { 33 | padding: 0.2em; 34 | } 35 | 36 | th { 37 | font-weight: bold; 38 | background-color: #e5e5e5; 39 | } 40 | -------------------------------------------------------------------------------- /php/calendar.php: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | 25 | 26 |
27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /php/libraries/dbg/setup.php: -------------------------------------------------------------------------------- 1 | ' 19 | .sprintf($GLOBALS['strCantLoad'], 'DBG') 20 | .' ' 21 | .$GLOBALS['strDocu'] . '' 22 | .''; 23 | } else { 24 | $GLOBALS['DBG'] = true; 25 | } 26 | } 27 | ?> -------------------------------------------------------------------------------- /libs/plugins/modifier.nl2br.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: nl2br
14 | * Date: Feb 26, 2003 15 | * Purpose: convert \r\n, \r or \n to <
> 16 | * Input:
17 | * - contents = contents to replace 18 | * - preceed_test = if true, includes preceeding break tags 19 | * in replacement 20 | * Example: {$text|nl2br} 21 | * @link http://smarty.php.net/manual/en/language.modifier.nl2br.php 22 | * nl2br (Smarty online manual) 23 | * @version 1.0 24 | * @author Monte Ohrt 25 | * @param string 26 | * @return string 27 | */ 28 | function smarty_modifier_nl2br($string) 29 | { 30 | return nl2br($string); 31 | } 32 | 33 | /* vim: set expandtab: */ 34 | 35 | ?> 36 | -------------------------------------------------------------------------------- /php/libraries/header_http.inc.php: -------------------------------------------------------------------------------- 1 | 28 | -------------------------------------------------------------------------------- /php/libraries/transformations/text_plain__imagelink.inc.php: -------------------------------------------------------------------------------- 1 | '' . $buffer . ''); 15 | $buffer = PMA_transformation_global_html_replace($buffer, $transform_options); 16 | return $buffer; 17 | } 18 | 19 | ?> 20 | -------------------------------------------------------------------------------- /libs/plugins/modifier.strip.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: strip
14 | * Purpose: Replace all repeated spaces, newlines, tabs 15 | * with a single space or supplied replacement string.
16 | * Example: {$var|strip} {$var|strip:" "} 17 | * Date: September 25th, 2002 18 | * @link http://smarty.php.net/manual/en/language.modifier.strip.php 19 | * strip (Smarty online manual) 20 | * @author Monte Ohrt 21 | * @version 1.0 22 | * @param string 23 | * @param string 24 | * @return string 25 | */ 26 | function smarty_modifier_strip($text, $replace = ' ') 27 | { 28 | return preg_replace('!\s+!', $replace, $text); 29 | } 30 | 31 | /* vim: set expandtab: */ 32 | 33 | ?> 34 | -------------------------------------------------------------------------------- /libs/plugins/modifier.count_characters.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: count_characteres
14 | * Purpose: count the number of characters in a text 15 | * @link http://smarty.php.net/manual/en/language.modifier.count.characters.php 16 | * count_characters (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param string 19 | * @param boolean include whitespace in the character count 20 | * @return integer 21 | */ 22 | function smarty_modifier_count_characters($string, $include_spaces = false) 23 | { 24 | if ($include_spaces) 25 | return(strlen($string)); 26 | 27 | return preg_match_all("/[^\s]/",$string, $match); 28 | } 29 | 30 | /* vim: set expandtab: */ 31 | 32 | ?> 33 | -------------------------------------------------------------------------------- /php/lang/add_message.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # $Id: add_message.sh 9537 2006-10-12 16:27:13Z nijel $ 3 | # 4 | # Shell script that adds a message to all message files (Lem9) 5 | # 6 | # Example: add_message.sh '$strNewMessage' 'new message contents' 7 | # 8 | 9 | if [ $# -ne 2 ] ; then 10 | echo "usage: add_message.sh '\$strNewMessage' 'new message contents'" 11 | exit 1 12 | fi 13 | 14 | for file in *.inc.php 15 | do 16 | echo $file " " 17 | grep -v '?>' ${file} > ${file}.new 18 | case $file in 19 | english*) 20 | echo "$1 = '"$2"';" >> ${file}.new 21 | ;; 22 | *) 23 | echo "$1 = '"$2"'; //to translate" >> ${file}.new 24 | ;; 25 | esac 26 | echo "?>" >> ${file}.new 27 | rm $file 28 | mv ${file}.new $file 29 | done 30 | ./sort_lang.sh english* 31 | echo " " 32 | echo "Message added to all message files (including english)" 33 | -------------------------------------------------------------------------------- /libs/plugins/modifier.count_words.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: count_words
14 | * Purpose: count the number of words in a text 15 | * @link http://smarty.php.net/manual/en/language.modifier.count.words.php 16 | * count_words (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param string 19 | * @return integer 20 | */ 21 | function smarty_modifier_count_words($string) 22 | { 23 | // split text by ' ',\r,\n,\f,\t 24 | $split_array = preg_split('/\s+/',$string); 25 | // count matches that contain alphanumerics 26 | $word_count = preg_grep('/[a-zA-Z0-9\\x80-\\xff]/', $split_array); 27 | 28 | return count($word_count); 29 | } 30 | 31 | /* vim: set expandtab: */ 32 | 33 | ?> 34 | -------------------------------------------------------------------------------- /php/lang/add_message_file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # $Id: add_message_file.sh 7364 2005-09-24 08:49:52Z nijel $ 3 | # 4 | # Shell script that adds a message file to all message files 5 | # adding "//to translate" on each line 6 | # 7 | # Example: add_message_file.sh xxx 8 | # 9 | if [ $# -ne 1 ] ; then 10 | echo "usage: add_message_file.sh filename" 11 | exit 1 12 | fi 13 | 14 | for file in *.inc.php 15 | do 16 | echo $file " " 17 | grep -v '?>' ${file} > ${file}.new 18 | case $file in 19 | english*) 20 | sed -n 's/\(.*\);/\1;/p' $1 >> ${file}.new 21 | ;; 22 | *) 23 | sed -n 's/\(.*\);/\1; \/\/to translate/p' $1 >> ${file}.new 24 | ;; 25 | esac 26 | echo "?>" >> ${file}.new 27 | rm $file 28 | mv ${file}.new $file 29 | done 30 | ./sort_lang.sh english* 31 | echo " " 32 | echo "Messages added to add message files (including english)" 33 | -------------------------------------------------------------------------------- /libs/plugins/shared.escape_special_chars.php: -------------------------------------------------------------------------------- 1 | 13 | * Purpose: used by other smarty functions to escape 14 | * special chars except for already escaped ones 15 | * @author Monte Ohrt 16 | * @param string 17 | * @return string 18 | */ 19 | function smarty_function_escape_special_chars($string) 20 | { 21 | if(!is_array($string)) { 22 | $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string); 23 | $string = htmlspecialchars($string); 24 | $string = str_replace(array('%%%SMARTY_START%%%','%%%SMARTY_END%%%'), array('&',';'), $string); 25 | } 26 | return $string; 27 | } 28 | 29 | /* vim: set expandtab: */ 30 | 31 | ?> 32 | -------------------------------------------------------------------------------- /php/libraries/engines/ndbcluster.lib.php: -------------------------------------------------------------------------------- 1 | array( 19 | ), 20 | ); 21 | } 22 | 23 | /** 24 | * @return string SQL query LIKE pattern 25 | */ 26 | function getVariablesLikePattern() 27 | { 28 | return 'ndb\\_%'; 29 | } 30 | 31 | /** 32 | * returns string with filename for the MySQL helppage 33 | * about this storage engne 34 | * 35 | * @return string mysql helppage filename 36 | */ 37 | function getMysqlHelpPage() 38 | { 39 | return 'ndbcluster'; 40 | } 41 | } 42 | 43 | ?> 44 | -------------------------------------------------------------------------------- /libs/plugins/function.debug.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: debug
14 | * Date: July 1, 2002
15 | * Purpose: popup debug window 16 | * @link http://smarty.php.net/manual/en/language.function.debug.php {debug} 17 | * (Smarty online manual) 18 | * @author Monte Ohrt 19 | * @version 1.0 20 | * @param array 21 | * @param Smarty 22 | * @return string output from {@link Smarty::_generate_debug_output()} 23 | */ 24 | function smarty_function_debug($params, &$smarty) 25 | { 26 | if (isset($params['output'])) { 27 | $smarty->assign('_smarty_debug_output', $params['output']); 28 | } 29 | require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php'); 30 | return smarty_core_display_debug_console(null, $smarty); 31 | } 32 | 33 | /* vim: set expandtab: */ 34 | 35 | ?> 36 | -------------------------------------------------------------------------------- /download.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | xsser.me for sae 齐迹 6 | 7 | 8 | 9 |

xsser.me for sae

10 |

特别注意,此版本仅用于SAE平台,你非要本地使用我表示你肯定用不了!

11 |

step1:导入数据库文件

12 |

step2:执行sql 替换数据库中写死的xsser.me sql:UPDATE oc_module SET code=REPLACE(code, 'http://xsser.me', 'http://你懂的.sinaapp.com');

13 |

step3:修改配置文件中的 发送邮件的邮箱和密码,config.php文件倒数2-3行。。修改$config['urlroot']为你的域名

14 |

step4:请确定可以已经初始化了你的sae上的mysql和memcache

15 |

如果你还有问题,请关注我的微博并@齐迹2010

16 |

你确定已经关注我的微博了?那就开始下载把click

17 | 18 | 19 | 20 | UPDATE oc_module SET code=REPLACE(code, 'http://xsser.me', 'http://xss.alisec.cn'); -------------------------------------------------------------------------------- /php/libraries/transformations/text_plain__link.inc.php: -------------------------------------------------------------------------------- 1 | '' . (isset($options[1]) ? $options[1] : '%1$s') . ''); 15 | 16 | $transform_options = array ('string' => '' . (isset($options[1]) ? $options[1] : $buffer) . ''); 17 | 18 | $buffer = PMA_transformation_global_html_replace($buffer, $transform_options); 19 | 20 | return $buffer; 21 | 22 | } 23 | 24 | ?> 25 | -------------------------------------------------------------------------------- /themes/default/templates/notice.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {$notice.str} 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 |
16 |
{$notice.str} {$notice.urltitle}
17 |
18 | 19 | -------------------------------------------------------------------------------- /php/pmd_help.php: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Designer 23 | 24 | 25 | 26 | ' . $GLOBALS['strToSelectRelation'] . '
'; 28 | echo '

'; 29 | echo '

' . $GLOBALS['strDesignerHelpDisplayField'] . '

'; 30 | ?> 31 | 32 | 33 | -------------------------------------------------------------------------------- /php/libraries/transformations/generator.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # $Id: generator.sh 9537 2006-10-12 16:27:13Z nijel $ 3 | # 4 | # Shell script that adds a new function file using a template. Should not be called directly 5 | # but instead by template_Generator.sh and template_generator_mimetype.sh 6 | # 7 | # 8 | # $1: Template 9 | # $2: Filename 10 | # $3: (optional) Description 11 | 12 | if [ $# == 0 ] 13 | then 14 | echo "Please call template_generator.sh or template_generator_mimetype.sh instead" 15 | echo "" 16 | exit 65 17 | fi 18 | functionupper="`echo $2 | tr [:lower:] [:upper:]`" 19 | functionlower="`echo $2 | tr [:upper:] [:lower:]`" 20 | 21 | cat $1 | sed "s/\[ENTER_FILENAME_HERE\]/$functionupper/" | sed "s/\[enter_filename_here\]/$functionlower/" >> $2.inc.php 22 | 23 | if [ "$3" ] 24 | then 25 | echo "" 26 | echo "To do later:" 27 | echo "cd ../../lang" 28 | echo "./add_message.sh '\$strTransformation_${functionlower}' '$3'" 29 | echo "" 30 | fi 31 | 32 | echo "Created $2.inc.php" 33 | echo "" 34 | -------------------------------------------------------------------------------- /source/do.php: -------------------------------------------------------------------------------- 1 | FirstRow("SELECT * FROM ".Tb('project')." WHERE authCode='{$auth}'"); 12 | if(empty($project)) exit('Auth Err.'); 13 | 14 | switch($act){ 15 | case 'content': 16 | default: 17 | $domain=Val('domain','GET'); 18 | $where=''; 19 | if(!empty($domain)) $where.=" AND domain='{$domain}'"; 20 | $contents=$db->FirstColumn("SELECT content FROM ".Tb('project_content')." WHERE projectId='{$project[id]}' {$where} ORDER BY id DESC"); 21 | $data=array(); 22 | foreach($contents as $k=>$v){ 23 | $row=array(); 24 | $v=(array)json_decode($v); 25 | $row['url']=$v['opener']?$v['opener']: $v['toplocation']; 26 | $row['cookie']=$v['cookie']; 27 | $data[]=$row; 28 | } 29 | echo JsonEncode($data); 30 | break; 31 | } 32 | ?> -------------------------------------------------------------------------------- /php/lang/translatecount.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $Id: translatecount.sh 5152 2003-11-18 15:20:45Z nijel $ 3 | ## 4 | # Shell script to produce counts of just how out of date the translations are! 5 | ## 6 | # Accepts optional parameters of a list of files to produce counts from 7 | # Defaults to using all files 8 | ## 9 | # Written by Robin Johnson 10 | ## 11 | srcfilelist=${@} 12 | destfilelist="" 13 | translationmatch='//to translate' 14 | suffixtoremove='.inc.php' 15 | added=0 16 | if [ -z "${srcfilelist}" ]; then 17 | srcfilelist="*.inc.php" 18 | added=1 19 | fi; 20 | for i in ${srcfilelist}; do 21 | if [ ! -e ${i} ]; then 22 | $i=`eval ${i}*php3` 23 | fi 24 | if [ -e ${i} ]; then 25 | destfilelist="${destfilelist} ${i}" 26 | fi; 27 | done; 28 | destfilelist=`echo ${destfilelist} | xargs -n1 | egrep '.inc.php$'` 29 | if [ ! -z "${destfilelist}" ]; then 30 | grep -c -- "${translationmatch}" ${destfilelist} | sort -t':' -n +1 | sed -e "s/${suffixtoremove}//g" | xargs -n1 | egrep -v ':0$' 31 | fi; 32 | -------------------------------------------------------------------------------- /php/libraries/export/excel.php: -------------------------------------------------------------------------------- 1 | 'strStrucExcelCSV', 15 | 'extension' => 'csv', 16 | 'mime_type' => 'text/comma-separated-values', 17 | 'options' => array( 18 | array('type' => 'text', 'name' => 'null', 'text' => 'strReplaceNULLBy'), 19 | array('type' => 'bool', 'name' => 'columns', 'text' => 'strPutColNames'), 20 | array('type' => 'select', 'name' => 'edition', 'values' => array('win' => 'Windows', 'mac' => 'Excel 2003 / Macintosh'), 'text' => 'strExcelEdition'), 21 | array('type' => 'hidden', 'name' => 'data'), 22 | ), 23 | 'options_text' => 'strOptions', 24 | ); 25 | } else { 26 | /* Everything rest is coded in csv plugin */ 27 | require './libraries/export/csv.php'; 28 | } 29 | ?> 30 | -------------------------------------------------------------------------------- /php/test/PMA_get_real_size_test.php: -------------------------------------------------------------------------------- 1 | assertEquals(0, PMA_get_real_size('0')); 21 | } 22 | 23 | public function testKilobyte() 24 | { 25 | $this->assertEquals(1024, PMA_get_real_size('1kb')); 26 | } 27 | 28 | public function testKilobyte2() 29 | { 30 | $this->assertEquals(1024 * 1024, PMA_get_real_size('1024k')); 31 | } 32 | 33 | public function testMegabyte() 34 | { 35 | $this->assertEquals(8 * 1024 * 1024, PMA_get_real_size('8m')); 36 | } 37 | 38 | public function testGigabyte() 39 | { 40 | $this->assertEquals(12 * 1024 * 1024 * 1024, PMA_get_real_size('12gb')); 41 | } 42 | } 43 | ?> -------------------------------------------------------------------------------- /source/keepsession.php: -------------------------------------------------------------------------------- 1 | FirstRow("SELECT * FROM ".Tb('project')." WHERE urlKey='{$urlKey}'"); 15 | 16 | if(!empty($project) && !empty($url) && !empty($cookie)){ 17 | $hash=md5($url.$cookie); 18 | $existed=$db->FirstValue("SELECT COUNT(*) FROM ".Tb('keepsession')." WHERE hash='{$hash}'"); 19 | if($existed<=0){ 20 | //判断用户key session的请求数量 21 | $sum=$db->FirstValue("SELECT COUNT(*) FROM ".Tb('keepsession')." WHERE userId='{$project[userId]}'"); 22 | if($sum<10){ 23 | $sqlValues=array( 24 | 'projectId'=>$project['id'], 25 | 'userId'=>$project['userId'], 26 | 'url'=>$url, 27 | 'cookie'=>$cookie, 28 | 'hash'=>$hash, 29 | 'addTime'=>time(), 30 | 'updateTime'=>time() 31 | ); 32 | $db->AutoExecute(Tb('keepsession'),$sqlValues); 33 | } 34 | } 35 | } 36 | ?> -------------------------------------------------------------------------------- /php/libraries/transformations/image_png__inline.inc.php: -------------------------------------------------------------------------------- 1 | '[__BUFFER__]'); 16 | } else { 17 | $transform_options = array ('string' => '[__BUFFER__]'); 18 | } 19 | $buffer = PMA_transformation_global_html_replace($buffer, $transform_options); 20 | 21 | return $buffer; 22 | } 23 | 24 | ?> 25 | -------------------------------------------------------------------------------- /php/tbl_sql.php: -------------------------------------------------------------------------------- 1 | 47 | -------------------------------------------------------------------------------- /php/libraries/transformations/image_jpeg__inline.inc.php: -------------------------------------------------------------------------------- 1 | '[__BUFFER__]'); 16 | } else { 17 | $transform_options = array ('string' => '[__BUFFER__]'); 18 | } 19 | $buffer = PMA_transformation_global_html_replace($buffer, $transform_options); 20 | 21 | return $buffer; 22 | } 23 | 24 | ?> 25 | -------------------------------------------------------------------------------- /php/test/PMA_STR_sub_test.php: -------------------------------------------------------------------------------- 1 | assertEquals('čšě', 40 | PMA_substr('čšěčščěš', 0, 3)); 41 | } 42 | } 43 | ?> -------------------------------------------------------------------------------- /libs/plugins/function.popup_init.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: popup_init
14 | * Purpose: initialize overlib 15 | * @link http://smarty.php.net/manual/en/language.function.popup.init.php {popup_init} 16 | * (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param array 19 | * @param Smarty 20 | * @return string 21 | */ 22 | function smarty_function_popup_init($params, &$smarty) 23 | { 24 | $zindex = 1000; 25 | 26 | if (!empty($params['zindex'])) { 27 | $zindex = $params['zindex']; 28 | } 29 | 30 | if (!empty($params['src'])) { 31 | return '' . "\n" 32 | . '' . "\n"; 33 | } else { 34 | $smarty->trigger_error("popup_init: missing src parameter"); 35 | } 36 | } 37 | 38 | /* vim: set expandtab: */ 39 | 40 | ?> 41 | -------------------------------------------------------------------------------- /test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 无标题文档 6 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /libs/plugins/modifier.truncate_utf8.php: -------------------------------------------------------------------------------- 1 | 0)); $i++) 11 | { 12 | if($number = strpos(str_pad(decbin(ord(substr($string, $i, 1))), 8, '0', STR_PAD_LEFT), '0')) 13 | { 14 | if($length < 1.0) 15 | { 16 | break; 17 | } 18 | 19 | $result .= substr($string, $i, $number); 20 | 21 | $length -= 1.0; 22 | 23 | $i += $number - 1; 24 | } 25 | else 26 | { 27 | $result .= substr($string, $i, 1); 28 | 29 | $length -= 0.5; 30 | } 31 | } 32 | 33 | $result = htmlspecialchars($result, ENT_QUOTES, 'UTF-8'); 34 | 35 | if($i < $strlen) 36 | { 37 | $result .= $etc; 38 | } 39 | 40 | return $result; 41 | } 42 | ?> -------------------------------------------------------------------------------- /php/db_sql.php: -------------------------------------------------------------------------------- 1 | 46 | -------------------------------------------------------------------------------- /themes/default/templates/menus.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /libs/internals/core.get_include_path.php: -------------------------------------------------------------------------------- 1 | 45 | -------------------------------------------------------------------------------- /libs/internals/core.process_compiled_include.php: -------------------------------------------------------------------------------- 1 | _cache_including; 20 | $smarty->_cache_including = true; 21 | 22 | $_return = $params['results']; 23 | 24 | foreach ($smarty->_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) { 25 | $smarty->_include($_include_file_path, true); 26 | } 27 | 28 | foreach ($smarty->_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) { 29 | $_return = preg_replace_callback('!(\{nocache\:('.$_cache_serial.')#(\d+)\})!s', 30 | array(&$smarty, '_process_compiled_include_callback'), 31 | $_return); 32 | } 33 | $smarty->_cache_including = $_cache_including; 34 | return $_return; 35 | } 36 | 37 | ?> 38 | -------------------------------------------------------------------------------- /php/libraries/tbl_common.php: -------------------------------------------------------------------------------- 1 | = 50002 && $db === 'information_schema') { 18 | $db_is_information_schema = true; 19 | } else { 20 | $db_is_information_schema = false; 21 | } 22 | 23 | /** 24 | * Set parameters for links 25 | * @deprecated 26 | */ 27 | $url_query = PMA_generate_common_url($db, $table); 28 | 29 | $url_params['db'] = $db; 30 | $url_params['table'] = $table; 31 | 32 | /** 33 | * Defines the urls to return to in case of error in a sql statement 34 | */ 35 | $err_url_0 = $cfg['DefaultTabDatabase'] . PMA_generate_common_url(array('db' => $db,)); 36 | $err_url = $cfg['DefaultTabTable'] . PMA_generate_common_url($url_params); 37 | 38 | 39 | /** 40 | * Ensures the database and the table exist (else move to the "parent" script) 41 | */ 42 | require_once './libraries/db_table_exists.lib.php'; 43 | 44 | ?> 45 | -------------------------------------------------------------------------------- /php/scripts/find_unused_messages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Simple script to find unused message strings by Michal Čihař 4 | 5 | tmp1=`mktemp` 6 | tmp2=`mktemp` 7 | grep -o '\' lang/english-iso-8859-1.inc.php \ 8 | | grep -Ev '^str(Transformation_|ShowStatus)' | sort -u > $tmp1 9 | grep -ho '\' `find . -type f -a -name '*.php' -a -not -path '*/lang/*'` \ 10 | | grep -Ev '^str(Transformation_|ShowStatus)' | sort -u > $tmp2 11 | 12 | echo Please note that you need to check results of this script, it doesn\'t 13 | echo understand PHP, it only tries to find what looks like message name. 14 | 15 | echo 16 | echo Used messages not present in english language file: 17 | echo '(this contains generated messages and composed message names, so these' 18 | echo 'are not necessary a errors!)' 19 | echo 20 | 21 | # filter out known false positives 22 | diff $tmp1 $tmp2 | awk '/^>/ {print $2}' | grep -Ev '(strEncto|strXkana|strDBLink|strPrivDesc|strPrivDescProcess|strTableListOptions|strMissingParameter|strAttribute|strDoSelectAll)' 23 | 24 | echo 25 | echo Not used messages present in english language file: 26 | echo 27 | 28 | diff $tmp1 $tmp2 | awk '/^ 13 | * Name: eval
14 | * Purpose: evaluate a template variable as a template
15 | * @link http://smarty.php.net/manual/en/language.function.eval.php {eval} 16 | * (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param array 19 | * @param Smarty 20 | */ 21 | function smarty_function_eval($params, &$smarty) 22 | { 23 | 24 | if (!isset($params['var'])) { 25 | $smarty->trigger_error("eval: missing 'var' parameter"); 26 | return; 27 | } 28 | 29 | if($params['var'] == '') { 30 | return; 31 | } 32 | 33 | $smarty->_compile_source('evaluated template', $params['var'], $_var_compiled); 34 | 35 | ob_start(); 36 | $smarty->_eval('?>' . $_var_compiled); 37 | $_contents = ob_get_contents(); 38 | ob_end_clean(); 39 | 40 | if (!empty($params['assign'])) { 41 | $smarty->assign($params['assign'], $_contents); 42 | } else { 43 | return $_contents; 44 | } 45 | } 46 | 47 | /* vim: set expandtab: */ 48 | 49 | ?> 50 | -------------------------------------------------------------------------------- /libs/plugins/modifier.capitalize.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: capitalize
14 | * Purpose: capitalize words in the string 15 | * @link http://smarty.php.net/manual/en/language.modifiers.php#LANGUAGE.MODIFIER.CAPITALIZE 16 | * capitalize (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param string 19 | * @return string 20 | */ 21 | function smarty_modifier_capitalize($string, $uc_digits = false) 22 | { 23 | smarty_modifier_capitalize_ucfirst(null, $uc_digits); 24 | return preg_replace_callback('!\'?\b\w(\w|\')*\b!', 'smarty_modifier_capitalize_ucfirst', $string); 25 | } 26 | 27 | function smarty_modifier_capitalize_ucfirst($string, $uc_digits = null) 28 | { 29 | static $_uc_digits = false; 30 | 31 | if(isset($uc_digits)) { 32 | $_uc_digits = $uc_digits; 33 | return; 34 | } 35 | 36 | if(substr($string[0],0,1) != "'" && !preg_match("!\d!",$string[0]) || $_uc_digits) 37 | return ucfirst($string[0]); 38 | else 39 | return $string[0]; 40 | } 41 | 42 | 43 | ?> 44 | -------------------------------------------------------------------------------- /php/libraries/transformations/TEMPLATE: -------------------------------------------------------------------------------- 1 | mimetype contains the original MimeType of the field (i.e. 'text/plain', 'image/jpeg' etc.) 24 | 25 | return $buffer; 26 | } 27 | 28 | ?> 29 | -------------------------------------------------------------------------------- /php/test/PMA_sanitize_test.php: -------------------------------------------------------------------------------- 1 | assertEquals('[a@javascript:alert(\'XSS\');@target]link', 21 | PMA_sanitize('[a@javascript:alert(\'XSS\');@target]link[/a]')); 22 | } 23 | 24 | public function testLink() 25 | { 26 | $this->assertEquals('link', 27 | PMA_sanitize('[a@http://www.phpmyadmin.net/@target]link[/a]')); 28 | } 29 | 30 | public function testHtmlTags() 31 | { 32 | $this->assertEquals('<div onclick="">', 33 | PMA_sanitize('
')); 34 | } 35 | 36 | public function testBbcoe() 37 | { 38 | $this->assertEquals('strong', 39 | PMA_sanitize('[b]strong[/b]')); 40 | } 41 | } 42 | ?> -------------------------------------------------------------------------------- /libs/internals/core.write_compiled_resource.php: -------------------------------------------------------------------------------- 1 | compile_dir)) { 19 | // compile_dir not writable, see if it exists 20 | if(!@is_dir($smarty->compile_dir)) { 21 | $smarty->trigger_error('the $compile_dir \'' . $smarty->compile_dir . '\' does not exist, or is not a directory.', E_USER_ERROR); 22 | return false; 23 | } 24 | $smarty->trigger_error('unable to write to $compile_dir \'' . realpath($smarty->compile_dir) . '\'. Be sure $compile_dir is writable by the web server user.', E_USER_ERROR); 25 | return false; 26 | } 27 | */ 28 | $_params = array('filename' => $params['compile_path'], 'contents' => $params['compiled_content'], 'create_dirs' => true); 29 | require_once(SMARTY_CORE_DIR . 'core.write_file.php'); 30 | smarty_core_write_file($_params, $smarty); 31 | return true; 32 | } 33 | 34 | /* vim: set expandtab: */ 35 | 36 | ?> 37 | -------------------------------------------------------------------------------- /php/themes.php: -------------------------------------------------------------------------------- 1 | 23 | 37 | 38 | 39 | 40 |

phpMyAdmin -

41 | printPreviews(); 43 | ?> 44 | 45 | 46 | -------------------------------------------------------------------------------- /libs/plugins/compiler.assign.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: assign
13 | * Purpose: assign a value to a template variable 14 | * @link http://smarty.php.net/manual/en/language.custom.functions.php#LANGUAGE.FUNCTION.ASSIGN {assign} 15 | * (Smarty online manual) 16 | * @author Monte Ohrt (initial author) 17 | * @author messju mohr (conversion to compiler function) 18 | * @param string containing var-attribute and value-attribute 19 | * @param Smarty_Compiler 20 | */ 21 | function smarty_compiler_assign($tag_attrs, &$compiler) 22 | { 23 | $_params = $compiler->_parse_attrs($tag_attrs); 24 | 25 | if (!isset($_params['var'])) { 26 | $compiler->_syntax_error("assign: missing 'var' parameter", E_USER_WARNING); 27 | return; 28 | } 29 | 30 | if (!isset($_params['value'])) { 31 | $compiler->_syntax_error("assign: missing 'value' parameter", E_USER_WARNING); 32 | return; 33 | } 34 | 35 | return "\$this->assign({$_params['var']}, {$_params['value']});"; 36 | } 37 | 38 | /* vim: set expandtab: */ 39 | 40 | ?> 41 | -------------------------------------------------------------------------------- /php/libraries/transformations/application_octetstream__download.inc.php: -------------------------------------------------------------------------------- 1 | $val) { 19 | if ($val->name == $options[1]) { 20 | $pos = $key; 21 | break; 22 | } 23 | } 24 | if (isset($pos)) { 25 | $cn = $row[$pos]; 26 | } 27 | } 28 | if (empty($cn)) { 29 | $cn = 'binary_file.dat'; 30 | } 31 | } 32 | 33 | return 34 | sprintf( 35 | '%s', 36 | 37 | $options['wrapper_link'], 38 | urlencode($cn), 39 | htmlspecialchars($cn), 40 | htmlspecialchars($cn) 41 | ); 42 | } 43 | 44 | ?> 45 | -------------------------------------------------------------------------------- /libs/plugins/function.assign_debug_info.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: assign_debug_info
13 | * Purpose: assign debug info to the template
14 | * @author Monte Ohrt 15 | * @param array unused in this plugin, this plugin uses {@link Smarty::$_config}, 16 | * {@link Smarty::$_tpl_vars} and {@link Smarty::$_smarty_debug_info} 17 | * @param Smarty 18 | */ 19 | function smarty_function_assign_debug_info($params, &$smarty) 20 | { 21 | $assigned_vars = $smarty->_tpl_vars; 22 | ksort($assigned_vars); 23 | if (@is_array($smarty->_config[0])) { 24 | $config_vars = $smarty->_config[0]; 25 | ksort($config_vars); 26 | $smarty->assign("_debug_config_keys", array_keys($config_vars)); 27 | $smarty->assign("_debug_config_vals", array_values($config_vars)); 28 | } 29 | 30 | $included_templates = $smarty->_smarty_debug_info; 31 | 32 | $smarty->assign("_debug_keys", array_keys($assigned_vars)); 33 | $smarty->assign("_debug_vals", array_values($assigned_vars)); 34 | 35 | $smarty->assign("_debug_tpls", $included_templates); 36 | } 37 | 38 | /* vim: set expandtab: */ 39 | 40 | ?> 41 | -------------------------------------------------------------------------------- /php/print.css: -------------------------------------------------------------------------------- 1 | .print_ignore { 2 | display: none; 3 | } 4 | 5 | body, table, th, td { 6 | color: #000000; 7 | background-color: #ffffff; 8 | font-size: 8pt; 9 | } 10 | 11 | img { 12 | border: 0; 13 | } 14 | 15 | table, th, td { 16 | border-width: 0.1em; 17 | border-color: #000000; 18 | border-style: solid; 19 | } 20 | 21 | table { 22 | border-collapse: collapse; 23 | border-spacing: 0; 24 | } 25 | 26 | th, td { 27 | padding: 0.2em; 28 | } 29 | 30 | th { 31 | font-weight: bold; 32 | background-color: #e5e5e5; 33 | } 34 | 35 | @media print { 36 | .print_ignore { 37 | display: none; 38 | } 39 | 40 | body, table, th, td { 41 | color: #000000; 42 | background-color: #ffffff; 43 | font-size: 8pt; 44 | } 45 | 46 | img { 47 | border: 0; 48 | } 49 | 50 | table, th, td { 51 | border-width: 1px; 52 | border-color: #000000; 53 | border-style: solid; 54 | } 55 | 56 | table { 57 | border-collapse: collapse; 58 | border-spacing: 0; 59 | } 60 | 61 | th, td { 62 | padding: 0.2em; 63 | } 64 | 65 | th { 66 | font-weight: bold; 67 | background-color: #e5e5e5; 68 | } 69 | } -------------------------------------------------------------------------------- /libs/plugins/shared.make_timestamp.php: -------------------------------------------------------------------------------- 1 | 11 | * Purpose: used by other smarty functions to make a timestamp 12 | * from a string. 13 | * @author Monte Ohrt 14 | * @param string 15 | * @return string 16 | */ 17 | function smarty_make_timestamp($string) 18 | { 19 | if(empty($string)) { 20 | // use "now": 21 | $time = time(); 22 | 23 | } elseif (preg_match('/^\d{14}$/', $string)) { 24 | // it is mysql timestamp format of YYYYMMDDHHMMSS? 25 | $time = mktime(substr($string, 8, 2),substr($string, 10, 2),substr($string, 12, 2), 26 | substr($string, 4, 2),substr($string, 6, 2),substr($string, 0, 4)); 27 | 28 | } elseif (is_numeric($string)) { 29 | // it is a numeric string, we handle it as timestamp 30 | $time = (int)$string; 31 | 32 | } else { 33 | // strtotime should handle it 34 | $time = strtotime($string); 35 | if ($time == -1 || $time === false) { 36 | // strtotime() was not able to parse $string, use "now": 37 | $time = time(); 38 | } 39 | } 40 | return $time; 41 | 42 | } 43 | 44 | /* vim: set expandtab: */ 45 | 46 | ?> 47 | -------------------------------------------------------------------------------- /source/login.php: -------------------------------------------------------------------------------- 1 | userId<=0){ 25 | if($user->Login($username,$userpwd,$auto)){ 26 | ShowSuccess('登录成功'); 27 | }else{ 28 | ShowError('登录失败,请检查用户/邮箱或密码',$url['login']); 29 | } 30 | } 31 | break; 32 | case 'logout': 33 | if($user->Logout()){ 34 | ShowSuccess('成功退出'); 35 | } 36 | break; 37 | default: 38 | if($user->userId>0){ 39 | ShowError('已经登录'); 40 | } 41 | $smarty=InitSmarty(); 42 | $smarty->assign('do',$do); 43 | $smarty->assign('show',$show); 44 | $smarty->assign('url',$url); 45 | $smarty->display('login.html'); 46 | break; 47 | } 48 | ?> -------------------------------------------------------------------------------- /themes/default/style/print.css: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------- 2 | 3 | 4 | Blueprint CSS Framework 1.0.1 5 | http://blueprintcss.org 6 | 7 | * Copyright (c) 2007-Present. See LICENSE for more info. 8 | * See README for instructions on how to use Blueprint. 9 | * For credits and origins, see AUTHORS. 10 | * This is a compressed file. See the sources in the 'src' directory. 11 | 12 | ----------------------------------------------------------------------- */ 13 | 14 | /* print.css */ 15 | body {line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#000;background:none;font-size:10pt;} 16 | .container {background:none;} 17 | hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;} 18 | hr.space {background:#fff;color:#fff;visibility:hidden;} 19 | h1, h2, h3, h4, h5, h6 {font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;} 20 | code {font:.9em "Courier New", Monaco, Courier, monospace;} 21 | a img {border:none;} 22 | p img.top {margin-top:0;} 23 | blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;} 24 | .small {font-size:.9em;} 25 | .large {font-size:1.1em;} 26 | .quiet {color:#999;} 27 | .hide {display:none;} 28 | a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;} 29 | /*a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;}*/ -------------------------------------------------------------------------------- /php/test/PMA_transformation_getOptions_test.php: -------------------------------------------------------------------------------- 1 | assertEquals(array('option1 ', ' option2 '), 21 | PMA_transformation_getOptions("option1 , option2 ")); 22 | } 23 | 24 | public function testQuoted() 25 | { 26 | $this->assertEquals(array('option1', ' option2'), 27 | PMA_transformation_getOptions("'option1' ,' option2' ")); 28 | } 29 | 30 | public function testComma() 31 | { 32 | $this->assertEquals(array('2,3', ' ,, option ,,'), 33 | PMA_transformation_getOptions("'2,3' ,' ,, option ,,' ")); 34 | } 35 | 36 | public function testEmptyOptions() 37 | { 38 | $this->assertEquals(array('', '', ''), 39 | PMA_transformation_getOptions("'',,")); 40 | } 41 | 42 | public function testEmpty() 43 | { 44 | $this->assertEquals(array(), 45 | PMA_transformation_getOptions('')); 46 | } 47 | } 48 | ?> -------------------------------------------------------------------------------- /libs/internals/core.assign_smarty_interface.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: assign_smarty_interface
13 | * Purpose: assign the $smarty interface variable 14 | * @param array Format: null 15 | * @param Smarty 16 | */ 17 | function smarty_core_assign_smarty_interface($params, &$smarty) 18 | { 19 | if (isset($smarty->_smarty_vars) && isset($smarty->_smarty_vars['request'])) { 20 | return; 21 | } 22 | 23 | $_globals_map = array('g' => 'HTTP_GET_VARS', 24 | 'p' => 'HTTP_POST_VARS', 25 | 'c' => 'HTTP_COOKIE_VARS', 26 | 's' => 'HTTP_SERVER_VARS', 27 | 'e' => 'HTTP_ENV_VARS'); 28 | 29 | $_smarty_vars_request = array(); 30 | 31 | foreach (preg_split('!!', strtolower($smarty->request_vars_order)) as $_c) { 32 | if (isset($_globals_map[$_c])) { 33 | $_smarty_vars_request = array_merge($_smarty_vars_request, $GLOBALS[$_globals_map[$_c]]); 34 | } 35 | } 36 | $_smarty_vars_request = @array_merge($_smarty_vars_request, $GLOBALS['HTTP_SESSION_VARS']); 37 | 38 | $smarty->_smarty_vars['request'] = $_smarty_vars_request; 39 | } 40 | 41 | /* vim: set expandtab: */ 42 | 43 | ?> 44 | -------------------------------------------------------------------------------- /php/libraries/transformations/text_plain__substr.inc.php: -------------------------------------------------------------------------------- 1 | 51 | -------------------------------------------------------------------------------- /libs/plugins/modifier.regex_replace.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: regex_replace
14 | * Purpose: regular expression search/replace 15 | * @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php 16 | * regex_replace (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param string 19 | * @param string|array 20 | * @param string|array 21 | * @return string 22 | */ 23 | function smarty_modifier_regex_replace($string, $search, $replace) 24 | { 25 | if(is_array($search)) { 26 | foreach($search as $idx => $s) 27 | $search[$idx] = _smarty_regex_replace_check($s); 28 | } else { 29 | $search = _smarty_regex_replace_check($search); 30 | } 31 | 32 | return preg_replace($search, $replace, $string); 33 | } 34 | 35 | function _smarty_regex_replace_check($search) 36 | { 37 | if (($pos = strpos($search,"\0")) !== false) 38 | $search = substr($search,0,$pos); 39 | if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) { 40 | /* remove eval-modifier from $search */ 41 | $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]); 42 | } 43 | return $search; 44 | } 45 | 46 | /* vim: set expandtab: */ 47 | 48 | ?> 49 | -------------------------------------------------------------------------------- /libs/internals/core.is_trusted.php: -------------------------------------------------------------------------------- 1 | trusted_dir)) { 23 | $_rp = realpath($params['resource_name']); 24 | foreach ((array)$smarty->trusted_dir as $curr_dir) { 25 | if (!empty($curr_dir) && is_readable ($curr_dir)) { 26 | $_cd = realpath($curr_dir); 27 | if (strncmp($_rp, $_cd, strlen($_cd)) == 0 28 | && substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR ) { 29 | $_smarty_trusted = true; 30 | break; 31 | } 32 | } 33 | } 34 | } 35 | 36 | } else { 37 | // resource is not on local file system 38 | $_smarty_trusted = call_user_func_array($smarty->_plugins['resource'][$params['resource_type']][0][3], 39 | array($params['resource_name'], $smarty)); 40 | } 41 | 42 | return $_smarty_trusted; 43 | } 44 | 45 | /* vim: set expandtab: */ 46 | 47 | ?> 48 | -------------------------------------------------------------------------------- /admin/source/admin_index.php: -------------------------------------------------------------------------------- 1 | tbPrefix.'user'; 11 | $tbSession=$db->tbPrefix.'session'; 12 | $tbContent=$db->tbPrefix.'content'; 13 | $tbComment=$db->tbPrefix.'comment'; 14 | //社区概况 15 | $situation=array(); 16 | $situation['userCount']=$db->FirstValue("SELECT COUNT(*) FROM {$tbUser}"); //注册用户总数 17 | $tbSession=$db->tbPrefix.'session'; 18 | $situation['onlineCount']=$db->FirstValue("SELECT COUNT(DISTINCT userId) FROM {$tbSession} WHERE updateTime>".(time()-EXPIRES)); //在线用户总数 19 | $situation['onlineUsers']=$db->Dataset("SELECT DISTINCT u.id,u.userName FROM {$tbSession} s INNER JOIN {$tbUser} u ON u.id=s.userId WHERE updateTime>".(time()-EXPIRES)); //在线用户 20 | 21 | //系统环境 22 | $sysInfo=array(); 23 | $sysInfo['sys_version']='IT121 1.0'; 24 | $sysInfo['serverOS']=PHP_OS; 25 | $sysInfo['serverSoftware']=$_SERVER['SERVER_SOFTWARE']; 26 | $sysInfo['phpVersion']='PHP v'.PHP_VERSION; 27 | $sysInfo['mysqlVersion']='MySQL '.$db->FirstValue('SELECT VERSION()'); 28 | 29 | include(ROOT_PATH.'/source/common.php'); 30 | $smarty=InitSmarty(1); 31 | 32 | $smarty->assign('situation',$situation); 33 | $smarty->assign('sysInfo',$sysInfo); 34 | $smarty->assign('do',$do); 35 | $smarty->assign('show',$show); 36 | $smarty->assign('url',$url); 37 | $smarty->display('admin_index.html'); 38 | ?> -------------------------------------------------------------------------------- /templates_c/%%8E^8E8^8E89046B%%notice.html.php: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | <?php echo $this->_tpl_vars['notice']['str']; ?> 8 | 9 | 11 | 13 | 15 | 17 | 21 | 22 | 23 |
24 |
_tpl_vars['notice']['str']; ?> 26 | _tpl_vars['notice']['urltitle']; ?> 28 |
29 |
30 | 31 | -------------------------------------------------------------------------------- /libs/plugins/modifier.truncate.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: truncate
14 | * Purpose: Truncate a string to a certain length if necessary, 15 | * optionally splitting in the middle of a word, and 16 | * appending the $etc string or inserting $etc into the middle. 17 | * @link http://smarty.php.net/manual/en/language.modifier.truncate.php 18 | * truncate (Smarty online manual) 19 | * @author Monte Ohrt 20 | * @param string 21 | * @param integer 22 | * @param string 23 | * @param boolean 24 | * @param boolean 25 | * @return string 26 | */ 27 | function smarty_modifier_truncate($string, $length = 80, $etc = '...', 28 | $break_words = false, $middle = false) 29 | { 30 | if ($length == 0) 31 | return ''; 32 | 33 | if (strlen($string) > $length) { 34 | $length -= min($length, strlen($etc)); 35 | if (!$break_words && !$middle) { 36 | $string = preg_replace('/\s+?(\S+)?$/', '', substr($string, 0, $length+1)); 37 | } 38 | if(!$middle) { 39 | return substr($string, 0, $length) . $etc; 40 | } else { 41 | return substr($string, 0, $length/2) . $etc . substr($string, -$length/2); 42 | } 43 | } else { 44 | return $string; 45 | } 46 | } 47 | 48 | /* vim: set expandtab: */ 49 | 50 | ?> 51 | -------------------------------------------------------------------------------- /php/libraries/server_common.inc.php: -------------------------------------------------------------------------------- 1 | 59 | -------------------------------------------------------------------------------- /source/code.php: -------------------------------------------------------------------------------- 1 | FirstRow("SELECT * FROM ".Tb('project')." WHERE id='{$id}' OR urlKey='{$urlKey}'"); 17 | if(empty($project)) exit(); 18 | $moduleSetKeys=json_decode($project['moduleSetKeys'],true); 19 | /* 模块 begin */ 20 | $moduleIds=array(); 21 | if(!empty($project['modules'])) $moduleIds=json_decode($project['modules']); 22 | if(!empty($moduleIds)){ 23 | $modulesStr=implode(',',$moduleIds); 24 | $modules=$db->Dataset("SELECT * FROM ".Tb('module')." WHERE id IN ($modulesStr)"); 25 | if(!empty($modules)){ 26 | foreach($modules as $module){ 27 | $module['code']=str_replace('{projectId}',$project['urlKey'],$module['code']); 28 | //module里是否有配置的参数 29 | if(!empty($module['setkeys'])){ 30 | $setkeys=json_decode($module['setkeys'],true); 31 | foreach($setkeys as $setkey){ 32 | $module['code']=str_replace('{set.'.$setkey.'}',$moduleSetKeys["setkey_{$module[id]}_{$setkey}"],$module['code']); 33 | } 34 | } 35 | echo htmlspecialchars_decode($module['code'],ENT_QUOTES); 36 | } 37 | } 38 | } 39 | /* 模块 end */ 40 | /* 项目自定义代码 */ 41 | echo htmlspecialchars_decode($project['code'],ENT_QUOTES); 42 | ?> -------------------------------------------------------------------------------- /php/test/PMA_escapeJsString_test.php: -------------------------------------------------------------------------------- 1 | 7 | * @package phpMyAdmin-test 8 | * @version $Id: PMA_escapeJsString_test.php 10237 2007-04-01 08:23:23Z cybot_tm $ 9 | */ 10 | 11 | /** 12 | * Tests core. 13 | */ 14 | require_once 'PHPUnit/Framework.php'; 15 | 16 | /** 17 | * Include to test. 18 | */ 19 | require_once './libraries/js_escape.lib.php'; 20 | 21 | /** 22 | * Test java script escaping. 23 | * 24 | */ 25 | class PMA_escapeJsString_test extends PHPUnit_Framework_TestCase 26 | { 27 | public function testEscape_1() 28 | { 29 | $this->assertEquals('\\\';', PMA_escapeJsString('\';')); 30 | } 31 | 32 | public function testEscape_2() 33 | { 34 | $this->assertEquals('\r\n\\\'")); 35 | } 36 | 37 | public function testEscape_3() 38 | { 39 | $this->assertEquals('\\\';[XSS]', PMA_escapeJsString('\';[XSS]')); 40 | } 41 | 42 | public function testEscape_4() 43 | { 44 | $this->assertEquals('[HTML]', PMA_escapeJsString('[HTML]')); 45 | } 46 | 47 | public function testEscape_5() 48 | { 49 | $this->assertEquals('"\\\'\\\\\\\'"', PMA_escapeJsString('"\'\\\'"')); 50 | } 51 | 52 | public function testEscape_6() 53 | { 54 | $this->assertEquals("\\\\\'\'\'\'\'\'\'\'\'\'\'\'\\\\", PMA_escapeJsString("\\''''''''''''\\")); 55 | } 56 | 57 | } 58 | ?> 59 | -------------------------------------------------------------------------------- /admin/source/admin_module.php: -------------------------------------------------------------------------------- 1 | tbPrefix.'module'; 18 | $db->Execute("UPDATE {$tbModule} SET isAudit='{$isAudit}',managerId='".$user->userId."',managerName='".$user->userName."' WHERE id='{$id}'"); 19 | ShowSuccess('操作成功',URL_ROOT.'/admin/index.php?do=admin_module'); 20 | break; 21 | default: 22 | $db=DBConnect(); 23 | $tbModule=$db->tbPrefix.'module'; 24 | $tbUser=$db->tbPrefix.'user'; 25 | $where=" AND isOpen=1"; 26 | include(ROOT_PATH.'/source/class/Pager.class.php'); 27 | $countSql="SELECT COUNT(*) FROM {$tbModule} WHERE 1=1 {$where} ORDER BY id DESC"; 28 | $sql="SELECT m.*,u.userName AS userName FROM {$tbModule} m INNER JOIN {$tbUser} u ON u.id=m.userId WHERE 1=1 {$where} ORDER BY id DESC"; 29 | $href='./index.php?do=admin_module'; 30 | if(!empty($act)) $href.='&act='.$act; 31 | $pager=new Pager($countSql,$sql,$href,20,5,Val('pNO','GET',1)); 32 | $modules=$pager->data; 33 | $smarty=InitSmarty(1); 34 | $smarty->assign('modules',$modules); 35 | $smarty->assign('nav',$pager->nav); 36 | $smarty->assign('do',$do); 37 | $smarty->assign('show',$show); 38 | $smarty->assign('url',$url); 39 | $smarty->display('admin_module.html'); 40 | break; 41 | } 42 | ?> -------------------------------------------------------------------------------- /php/db_create.php: -------------------------------------------------------------------------------- 1 | = 40101) { 27 | list($db_charset) = explode('_', $db_collation); 28 | if (in_array($db_charset, $mysql_charsets) && in_array($db_collation, $mysql_collations[$db_charset])) { 29 | $sql_query .= ' DEFAULT' . PMA_generateCharsetQueryPart($db_collation); 30 | } 31 | unset($db_charset, $db_collation); 32 | } 33 | $sql_query .= ';'; 34 | 35 | $result = PMA_DBI_try_query($sql_query); 36 | 37 | if (! $result) { 38 | $message = PMA_DBI_getError(); 39 | // avoid displaying the not-created db name in header or navi panel 40 | $GLOBALS['db'] = ''; 41 | $GLOBALS['table'] = ''; 42 | require_once './libraries/header.inc.php'; 43 | require_once './main.php'; 44 | } else { 45 | $message = $strDatabase . ' ' . htmlspecialchars($db) . ' ' . $strHasBeenCreated; 46 | require_once './libraries/header.inc.php'; 47 | require_once './' . $cfg['DefaultTabDatabase']; 48 | } 49 | ?> 50 | -------------------------------------------------------------------------------- /php/libraries/cleanup.lib.php: -------------------------------------------------------------------------------- 1 | 46 | --------------------------------------------------------------------------------