|
| 1 | +<?php |
| 2 | +/* |
| 3 | + +--------------------------------------------------------------------------+ |
| 4 | + | phpMyBackupPro | |
| 5 | + +--------------------------------------------------------------------------+ |
| 6 | + | Copyright (c) 2004-2015 by Dirk Randhahn | |
| 7 | + | http://www.phpMyBackupPro.net | |
| 8 | + | version information can be found in definitions.php. | |
| 9 | + | | |
| 10 | + | This program is free software; you can redistribute it and/or | |
| 11 | + | modify it under the terms of the GNU General Public License | |
| 12 | + | as published by the Free Software Foundation; either version 2 | |
| 13 | + | of the License, or (at your option) any later version. | |
| 14 | + | | |
| 15 | + | This program is distributed in the hope that it will be useful, | |
| 16 | + | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 17 | + | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 18 | + | GNU General Public License for more details. | |
| 19 | + | | |
| 20 | + | You should have received a copy of the GNU General Public License | |
| 21 | + | along with this program; if not, write to the Free Software | |
| 22 | + | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.| |
| 23 | + +--------------------------------------------------------------------------+ |
| 24 | +*/ |
| 25 | + |
| 26 | +chdir(".."); |
| 27 | +require_once("definitions.php"); |
| 28 | + |
| 29 | +echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" |
| 30 | + \"http://www.w3.org/TR/html4/loose.dtd\"> |
| 31 | +<html".ARABIC_HTML."> |
| 32 | +<head> |
| 33 | +<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"> |
| 34 | +<link rel=\"stylesheet\" href=\"./../".PMBP_STYLESHEET_DIR.$CONF['stylesheet'].".css\" type=\"text/css\"> |
| 35 | +<title>phpMyBackupPro - ".F_HELP."</title> |
| 36 | +</head> |
| 37 | +<body> |
| 38 | +<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\" width=\"100%\">\n |
| 39 | +<tr><th colspan=\"2\" class=\"active\">"; |
| 40 | +echo PMBP_image_tag("../".PMBP_IMAGE_DIR."logo.png","phpMyBackupPro ".PMBP_WEBSITE,PMBP_WEBSITE); |
| 41 | +echo "</th></tr>\n"; |
| 42 | + |
| 43 | +// choose help text |
| 44 | +switch(preg_replace("'^.*/'","",$_GET['script'])) { |
| 45 | + case 'index.php': $filename=F_START; |
| 46 | + $html="On this page you can see system informations about the server where phpMyBackupPro is running on.<br><br> |
| 47 | + ".PMBP_I_SERVER.": Here you can see on what kind of server phpMyBackupPro is running on and the current server time.<br> |
| 48 | + "."PHP".": Here you can see the version of PHP and informations about different important PHP modules und functions. |
| 49 | + You can see the PHP memory limit value, wether gzip compression is possible, |
| 50 | + and wether you are able to send emails and transfer files via FTP on this server.<br> |
| 51 | + "."MySQL".": Here you can see your MySQL servers version and your MySQL clients version.<br> |
| 52 | + ".F_BACKUP.": Here you cann see how much diskspace is allocated by stored backups, |
| 53 | + when the last backup was build and when the last backup was build by a schedule script.<br> |
| 54 | + ".LI_LOGIN.": Here you can see when you logged in to phpMyBackupPro the last time and from with which IP."; |
| 55 | + break; |
| 56 | + case 'config.php': $filename=F_CONFIG; |
| 57 | + $html="There are two levels of configuration: basic and extended configuration options. Editing the extended configuration variables is optional. |
| 58 | + The * indicates that this item may not be blank.<br><br> |
| 59 | + Basic configuration:<br> |
| 60 | + ".C_SITENAME.": Give this system a name like e.g. 'production server'.<br> |
| 61 | + ".C_LANG.": Change the language of phpMyBackupPro. Your can download several language packages on the phpMyBackupPro project site.<br> |
| 62 | + ".C_SQL_HOST.": Enter your MySQL host e.g. 'localhost' or with portnumber 'localhost:3306'.<br> |
| 63 | + ".C_SQL_USER.": Enter your MySQL username.<br> |
| 64 | + ".C_SQL_PASSWD.": Enter your MySQL password.<br> |
| 65 | + ".C_SQL_DB.": If you want to only use one database on the server, you can enter the name of that database here.<br> |
| 66 | + ".C_FTP_USE.": Check this if you want to use FTP functions to upload your backups automatically to an FTP server.<br> |
| 67 | + ".C_FTP_BACKUP.": Check this if you want to enable the backup of directories to a FTP server.<br> |
| 68 | + ".C_FTP_REC.": Check this if you want to backup directories including their sub directories.<br> |
| 69 | + ".C_FTP_SERVER.": Enter the IP or URL of you FTP server.<br> |
| 70 | + ".C_FTP_USER.": Enter your FTP loginname.<br> |
| 71 | + ".C_FTP_PASSWD.": Enter your FTP password.<br> |
| 72 | + ".C_FTP_PATH.": Enter a path to a directory on the FTP server where you want your backups stored.<br> |
| 73 | + ".C_FTP_PASV.": Check this to use passive FTP.<br> |
| 74 | + ".C_FTP_PORT.": Enter the port on which your FTP server is available. Default port is 21.<br> |
| 75 | + ".C_FTP_DEL.": Check this to have the backup files on the FTP server automatically deleted when they are deleted locally.<br> |
| 76 | + ".C_EMAIL_USE.": Check this to send your backups automatically via Email.<br> |
| 77 | + ".C_EMAIL.": Enter the email address to which you want to send the backups.<br><br> |
| 78 | + Extended configuration:<br> |
| 79 | + ".C_STYLESHEET.": Choose a stylesheet for phpMyBackupPro. You can download and upload stylesheets on the phpMyBackupPro project site.<br> |
| 80 | + ".C_DATE.": Choose your favorite date format.<br> |
| 81 | + ".C_LOGIN.": You can switch to HTTP authentication if you want to.<br> |
| 82 | + ".C_DEL_TIME.": Specify a number of days after which the backup files are automatically deleted. Use 0 to disable this function.<br> |
| 83 | + ".C_DEL_NUMBER.": Spezify a max number of backup files to be stored for each database.<br> |
| 84 | + ".C_TIMELIMIT.": Increase the PHP time limit if there are problems with doing backups or imports.<br> |
| 85 | + ".C_CONFIRM.": Choose which actions on the import site need to be confirmed.<br> |
| 86 | + ".C_IMPORT_ERROR.": Check this to receive a list of import errors if any occur.<br> |
| 87 | + ".C_DIR_BACKUP.": Check this to enable directory backups. Valid FTP data must be entered to use this feature.<br> |
| 88 | + ".C_DIR_REC.": Check this to backup directories recursively (with all subfolders).<br> |
| 89 | + ".C_NO_LOGIN.": Check this to disable the login function. This is not recommended as everyone would get access to your database!<br><br> |
| 90 | + System variables:<br> |
| 91 | + Here you can change the values of the internal phpMyBackupPro system variables. Only change anything if you know what you are doing. |
| 92 | + You can find further help in the 'SYSTEM_VARIABLES.txt' documentation file."; |
| 93 | + break; |
| 94 | + case 'import.php': $filename=F_IMPORT; |
| 95 | + $html="Here you can see all currently stored local backup files.<br> |
| 96 | + You can get more information by clicking '".B_INFO."'.<br> |
| 97 | + By clicking '".B_VIEW."', you can read the backup file.<br> |
| 98 | + To download the backup file just click '".B_DOWNLOAD."'.<br> |
| 99 | + Click '".B_IMPORT."' to re-import the file in the database. Before you do this you can empty the database by clicking '".B_EMPTY_DB."'.<br> |
| 100 | + You can import big backups using the '".B_IMPORT_FRAG."' import. This will import the backup bit by bit.<br> |
| 101 | + To delete a backup file click '".B_DELETE."'. You can delete all backups of one database by clicking '".B_DELETE_ALL."'.<br><br> |
| 102 | + Click '".B_EMPTY_ALL."' to empty all available databases, click '".B_IMPORT_ALL."' to import the latest backup of each database, |
| 103 | + click '".B_DELETE_ALL_2."' to delete all available backup files."; |
| 104 | + break; |
| 105 | + case 'backup.php': $filename=F_BACKUP; |
| 106 | + $html="Here you can select which databases you want to backup.<br> |
| 107 | + A comment will be saved to each backup file.<br> |
| 108 | + You can choose if just the table structure, the data or both will be stored.<br> |
| 109 | + Add a 'drop table if exists ...' row to each table structure by clicking 'add drop table'<br> |
| 110 | + You can also choose the compression type for the backup files. On some systems, not all formats are available.<br><br> |
| 111 | + If you have activated the FTP backup function, you also can backup complete directories to your FTP server.<br> |
| 112 | + The selected directories and their files will be copied to the '".C_FTP_PATH."' configured on the '".F_CONFIG."' page.<br> |
| 113 | + It is not possible email the files but you can select '".EX_PACKED."' to pack all files and directories into one ZIP file. |
| 114 | + This will take more time than a normal transfer. The directory list is only generated once at the login. If you want to |
| 115 | + update the list, click on '".PMBP_EXS_UPDATE_DIRS."'."; |
| 116 | + break; |
| 117 | + case 'scheduled.php': $filename=F_SCHEDULE; |
| 118 | + $html="To automate the backup, you can generate some code to include in any existing PHP script.<br> |
| 119 | + When this script is loaded, the backup automatically starts. You can schedule when the backup will run.<br><br> |
| 120 | + Next, choose where the script will be located. The directory phpMyBackupPro must not be moved after this change! |
| 121 | + (If you have knowledge of coding PHP you can change the path later.)<br><br> |
| 122 | + A click on '".EXS_SHOW."' will show you a script that can be used for doing the scheduled backup. Copy the code and include it into an existing file, |
| 123 | + or use '".C_SAVE."' to save the script automatically with a given filename. This will overwrite an existing file with the same name!<br> |
| 124 | + Note: The file must be in the directory selected on the previous page in order to work correctly.<br> |
| 125 | + The backup will only run, when the script is opened or executed. You can include it into an existing PHP file or use a frame set with an invisible frame.<br><br> |
| 126 | + All configuration options will work in this script!<br> You can find more information about the backup options in the 'backup' help.<br><br> |
| 127 | + If you want to see a larger list of available directories go to the configuration page and change the system variable 'dir_lists' to 2!"; |
| 128 | + break; |
| 129 | + case 'db_info.php': $filename=F_DB_INFO; |
| 130 | + $html="Here you can see a small summary of your databases.<br><br> |
| 131 | + In the column 'number of rows' you can find the sum of the number of rows from all tables.<br> |
| 132 | + If a database contains tables, you can click 'tables info' to get the names, number of cols, number of rows and size of all tables of the respective database.<br> |
| 133 | + The sizes may differ from the sizes of backup files because of additional data needed in the backup files."; |
| 134 | + break; |
| 135 | + case 'sql_query.php': $filename=F_SQL_QUERY; |
| 136 | + $html="This page is to send simple sql queries to the database.<br><br> |
| 137 | + You can select a database on which you want to run the queries.<br> |
| 138 | + You can insert one or more sql queries in the textbox.<br> |
| 139 | + Queries like 'select ...' will return a result table.<br> |
| 140 | + Some queries like 'delete ...' will only tell you '".SQ_SUCCESS."'<br><br> |
| 141 | + If you upload a file to be executed you will receive an error message for each error that has happened! (and this could be a lot!)<br> |
| 142 | + The last error message contains a list of all queries, which generated errors. An 'F' before a number of the query means this query was in the file.<br><br> |
| 143 | + These functions are not mature yet! There is no guarantee that all correct queries can be processed successfully!"; |
| 144 | + break; |
| 145 | + default: $html="Sorry, no help available for this site."; |
| 146 | +} |
| 147 | + |
| 148 | +echo "<tr>\n<td>\n"; |
| 149 | +if ($filename) echo "<br><div class=\"bold_left\">Help for ".$filename.":</div><br>\n"; |
| 150 | +echo $html; |
| 151 | +echo "</td>\n</tr>\n</table>\n</body>\n</html>"; |
| 152 | +?> |
0 commit comments